Browse Source

先进模范数据抽取到大屏表screen_pioneer_dataV0.2

master
yinzuomei 5 years ago
parent
commit
025ef42093
  1. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java
  2. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalCpcIndexServiceImpl.java
  3. 27
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java
  4. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java
  5. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyService.java
  6. 19
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyService.java
  7. 34
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityCpcMonthlyServiceImpl.java
  8. 40
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexServiceAblityGridMonthlyServiceImpl.java
  9. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenPioneerDataService.java
  10. 42
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenPioneerDataServiceImpl.java
  11. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java
  12. 66
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPioneerDataDao.xml

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java

@ -43,7 +43,10 @@ public interface ScreenPioneerDataDao extends BaseDao<ScreenPioneerDataEntity> {
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Integer deletePioneerData(@Param("customerId") String customerId);
Integer deletePioneerData(@Param("customerId") String customerId,
@Param("orgType") String orgType,
@Param("dataEndTime")String dataEndTime,
@Param("deleteSize") Integer deleteSize);
/**
* 10党建引领-先锋模范数据
@ -74,4 +77,13 @@ public interface ScreenPioneerDataDao extends BaseDao<ScreenPioneerDataEntity> {
* @Date 2020/9/22 15:03
**/
List<ScreenPioneerDataEntity> initAgencyPioneerDataList(@Param("customerId")String customerId, @Param("agencyLevel")String agencyLevel);
/**
* @return void
* @param list
* @author yinzuomei
* @description 插入 entity
* @Date 2020/9/22 15:55
**/
void insertBatchEntity(@Param("list") List<ScreenPioneerDataEntity> list);
}

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalCpcIndexServiceImpl.java

@ -2,7 +2,6 @@ package com.epmet.service.evaluationindex.extract.dataToIndex.impl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.IndexCalConstant;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity;
import com.epmet.service.evaluationindex.extract.dataToIndex.CalCpcIndexService;
import com.epmet.service.evaluationindex.extract.todata.*;
@ -10,7 +9,6 @@ import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthl
import com.epmet.service.stats.DimCustomerPartymemberService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -63,9 +61,6 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
}
String quarterId= DateUtils.getQuarterId(monthId);
String yearId=DateUtils.getYearId(monthId);
//2、删除之前统计过的
factIndexPartyAblityCpcMonthlyService.deleteFactIndexPartyAblityCpcMonthly(customerId, monthId);
//1、党员提出话题数
Map<String, Integer> createTopicCountMap = calCreateTopicCount(customerId, monthId);
@ -88,7 +83,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
//9、自建群活跃度——议题转项目率
Map<String, BigDecimal> topicToIssueRatioMap = caltopicToIssueRatio(customerId, monthId, indexPartyAblityCpcList, userCreatedGroups);
//3、计算实际值,更新
//2、计算实际值,更新
for (FactIndexPartyAblityCpcMonthlyEntity indexPartyAblityCpcEntity : indexPartyAblityCpcList) {
indexPartyAblityCpcEntity.setMonthId(monthId);
indexPartyAblityCpcEntity.setQuarterId(quarterId);
@ -127,12 +122,8 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService {
indexPartyAblityCpcEntity.setTopicToIssueRatio(topicToIssueRatioMap.get(indexPartyAblityCpcEntity.getUserId()));
}
}
//4、分批插入批量插入
List<List<FactIndexPartyAblityCpcMonthlyEntity>> partition = ListUtils.partition(indexPartyAblityCpcList, IndexCalConstant.INSERT_SIZE);
partition.forEach(list -> {
factIndexPartyAblityCpcMonthlyService.saveFactIndexPartyAblityCpcMonthlyEntity(list);
});
//3、删除之前统计过的、批插入批量插入
factIndexPartyAblityCpcMonthlyService.delAndSavePartyAblityCpcMonthly(customerId,monthId,indexPartyAblityCpcList);
}

27
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java

@ -1,11 +1,8 @@
package com.epmet.service.evaluationindex.extract.dataToIndex.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.ExtractConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.constant.ProjectEvaluateConstant;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao;
import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO;
@ -72,8 +69,6 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
@Autowired
private FactIndexServiceAblityGridMonthlyService factIndexServiceAbilityGridMonthlyService;
@Autowired
private FactIndexServiceAblityGridMonthlyService factIndexServiceAblityGridMonthlyService;
@Autowired
private ActInfoService actInfoService;
@Autowired
private UserService userService;
@ -459,13 +454,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
}
}
//3、批量删
factIndexServiceAblityGridMonthlyService.deleteBatchIndexServiceAblityGridMonthly(customerId,monthId);
//4、批量增
List<List<FactIndexServiceAblityGridMonthlyEntity>> partition = ListUtils.partition(entityList, IndexCalConstant.INSERT_SIZE);
partition.forEach(list -> {
this.saveFactIndexServiceAblityGridMonthlyEntity(list);
});
//3、批量删、批量增
factIndexServiceAbilityGridMonthlyService.delAndSaveServiceAbilityGridMonthly(customerId,monthId,entityList);
return true;
}
@ -479,19 +469,6 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
System.out.println(partyVolunteerRatio);
}*/
/**
* @param list
* @return void
* @author yinzuomei
* @description 批量插入网格相关-服务能力指标表
* @Date 2020/9/21 10:04
**/
@DataSource(DataSourceConstant.EVALUATION_INDEX)
private void saveFactIndexServiceAblityGridMonthlyEntity(List<FactIndexServiceAblityGridMonthlyEntity> list) {
factIndexServiceAbilityGridMonthlyService.insertBatchEntity(list);
}
/**
* @Description 小数四舍五入保留六位小数
* @param d

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java

@ -1,6 +1,7 @@
package com.epmet.service.evaluationindex.extract.toscreen.impl;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity;
import com.epmet.service.evaluationindex.extract.toscreen.PioneerDataExtractService;
import com.epmet.service.evaluationindex.screen.ScreenPioneerDataService;
@ -48,6 +49,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
**/
@Override
public void extractGridPioneerData(String customerId, String dateId) {
//查询客户下所有的网格,初始数据值为0
List<ScreenPioneerDataEntity> gridList=screenPioneerDataService.initPioneerDataList(customerId,"grid", StrConstant.EPMETY_STR);
if(CollectionUtils.isEmpty(gridList)){
return;
@ -56,7 +58,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
entity.setDataEndTime(dateId);
});
screenPioneerDataService.delAndSavePioneerData(customerId,"grid",dateId, IndexCalConstant.DELETE_SIZE,gridList);
}
@Override

16
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyService.java

@ -34,18 +34,10 @@ public interface FactIndexPartyAblityCpcMonthlyService extends BaseService<FactI
* @return void
* @param customerId
* @param monthId
* @param indexPartyAblityCpcList
* @author yinzuomei
* @description 删除这个客户这个月 党员相关-党建能力的数据
* @Date 2020/9/21 16:01
* @description 先删后增
* @Date 2020/9/22 16:30
**/
void deleteFactIndexPartyAblityCpcMonthly(String customerId, String monthId);
/**
* @return void
* @param list
* @author yinzuomei
* @description 批量插入党员相关党建能力表
* @Date 2020/9/21 16:04
**/
void saveFactIndexPartyAblityCpcMonthlyEntity(List<FactIndexPartyAblityCpcMonthlyEntity> list);
void delAndSavePartyAblityCpcMonthly(String customerId, String monthId, List<FactIndexPartyAblityCpcMonthlyEntity> indexPartyAblityCpcList);
}

19
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyService.java

@ -31,15 +31,6 @@ import java.util.List;
* @since v1.0.0 2020-09-21
*/
public interface FactIndexServiceAblityGridMonthlyService extends BaseService<FactIndexServiceAblityGridMonthlyEntity> {
/**
* @return void
* @param customerId
* @param monthId
* @author yinzuomei
* @description 批量删除网格相关-服务能力指标表
* @Date 2020/9/21 16:38
**/
void deleteBatchIndexServiceAblityGridMonthly(String customerId, String monthId);
/**
* @return java.util.List<com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity>
@ -52,10 +43,12 @@ public interface FactIndexServiceAblityGridMonthlyService extends BaseService<Fa
/**
* @return void
* @param list
* @param customerId
* @param monthId
* @param entityList
* @author yinzuomei
* @description 批量插入网格相关-服务能力指标表
* @Date 2020/9/21 10:05
* @description 先删后增
* @Date 2020/9/22 16:45
**/
void insertBatchEntity(List<FactIndexServiceAblityGridMonthlyEntity> list);
void delAndSaveServiceAbilityGridMonthly(String customerId, String monthId, List<FactIndexServiceAblityGridMonthlyEntity> entityList);
}

34
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityCpcMonthlyServiceImpl.java

@ -21,50 +21,46 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity;
import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyService;
import org.apache.commons.collections4.ListUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* 党建能力-党员相关的事实表
* 党建能力-党员相关的事实表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-09-21
*/
@Service
public class FactIndexPartyAblityCpcMonthlyServiceImpl extends BaseServiceImpl<FactIndexPartyAblityCpcMonthlyDao, FactIndexPartyAblityCpcMonthlyEntity> implements FactIndexPartyAblityCpcMonthlyService {
/**
* @param customerId
* @param monthId
* @param indexPartyAblityCpcList
* @return void
* @author yinzuomei
* @description 删除这个客户这个月 党员相关-党建能力的数据
* @Date 2020/9/18 10:20
* @description 先删后增
* @Date 2020/9/22 16:30
**/
@Override
@Transactional(rollbackFor = Exception.class)
@DataSource(value = DataSourceConstant.EVALUATION_INDEX)
public void deleteFactIndexPartyAblityCpcMonthly(String customerId, String monthId) {
@Override
public void delAndSavePartyAblityCpcMonthly(String customerId, String monthId, List<FactIndexPartyAblityCpcMonthlyEntity> indexPartyAblityCpcList) {
int deleteNum;
do {
deleteNum = baseDao.deleteFactIndexPartyAblityCpcMonthly(customerId, monthId);
} while (deleteNum > NumConstant.ZERO);
}
/**
* @param list
* @return void
* @author yinzuomei
* @description 批量插入党员相关党建能力表
* @Date 2020/9/18 10:27
**/
@Override
@DataSource(value = DataSourceConstant.EVALUATION_INDEX)
public void saveFactIndexPartyAblityCpcMonthlyEntity(List<FactIndexPartyAblityCpcMonthlyEntity> list) {
baseDao.insertBatchEntity(list);
List<List<FactIndexPartyAblityCpcMonthlyEntity>> partition = ListUtils.partition(indexPartyAblityCpcList, IndexCalConstant.INSERT_SIZE);
partition.forEach(list -> {
baseDao.insertBatchEntity(list);
});
}
}

40
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexServiceAblityGridMonthlyServiceImpl.java

@ -21,10 +21,13 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity;
import com.epmet.service.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyService;
import org.apache.commons.collections4.ListUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@ -37,23 +40,6 @@ import java.util.List;
@Service
public class FactIndexServiceAblityGridMonthlyServiceImpl extends BaseServiceImpl<FactIndexServiceAblityGridMonthlyDao, FactIndexServiceAblityGridMonthlyEntity> implements FactIndexServiceAblityGridMonthlyService {
/**
* @return void
* @param customerId
* @param monthId
* @author yinzuomei
* @description 批量删除网格相关-服务能力指标表
* @Date 2020/9/21 10:16
**/
@Override
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public void deleteBatchIndexServiceAblityGridMonthly(String customerId, String monthId) {
int deleteNum;
do {
deleteNum = baseDao.deleteFactIndexServiceAblityGridMonthly(customerId, monthId);
} while (deleteNum > NumConstant.ZERO);
}
/**
* @param customerId
* @return java.util.List<com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity>
@ -67,16 +53,18 @@ public class FactIndexServiceAblityGridMonthlyServiceImpl extends BaseServiceImp
return baseDao.initAllGridList(customerId);
}
/**
* @param list
* @return void
* @author yinzuomei
* @description 批量插入网格相关-服务能力指标表
* @Date 2020/9/21 10:05
**/
@Transactional(rollbackFor = Exception.class)
@Override
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public void insertBatchEntity(List<FactIndexServiceAblityGridMonthlyEntity> list) {
baseDao.insertBatchEntity(list);
public void delAndSaveServiceAbilityGridMonthly(String customerId, String monthId, List<FactIndexServiceAblityGridMonthlyEntity> entityList) {
int deleteNum;
do {
deleteNum = baseDao.deleteFactIndexServiceAblityGridMonthly(customerId, monthId);
} while (deleteNum > NumConstant.ZERO);
List<List<FactIndexServiceAblityGridMonthlyEntity>> partition = ListUtils.partition(entityList, IndexCalConstant.INSERT_SIZE);
partition.forEach(list -> {
baseDao.insertBatchEntity(list);
});
}
}

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenPioneerDataService.java

@ -40,4 +40,17 @@ public interface ScreenPioneerDataService extends BaseService<ScreenPioneerDataE
* @Date 2020/9/22 14:41
**/
List<ScreenPioneerDataEntity> initPioneerDataList(String customerId, String orgType,String agencyLevel);
/**
* @return void
* @param customerId
* @param orgType grid, agency
* @param dataEndTime
* @param deleteSize
* @param entityList 待插入的数据
* @author yinzuomei
* @description 保存抽取结果
* @Date 2020/9/22 15:54
**/
void delAndSavePioneerData(String customerId, String orgType, String dataEndTime, Integer deleteSize, List<ScreenPioneerDataEntity> entityList);
}

42
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenPioneerDataServiceImpl.java

@ -20,12 +20,16 @@ package com.epmet.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.dao.evaluationindex.screen.ScreenPioneerDataDao;
import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity;
import com.epmet.service.evaluationindex.screen.ScreenPioneerDataService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.ListUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
@ -53,12 +57,40 @@ public class ScreenPioneerDataServiceImpl extends BaseServiceImpl<ScreenPioneerD
@DataSource(DataSourceConstant.EVALUATION_INDEX)
@Override
public List<ScreenPioneerDataEntity> initPioneerDataList(String customerId, String orgType, String agencyLevel) {
List<ScreenPioneerDataEntity> list=new ArrayList<>();
if("grid".equals(orgType)){
list=baseDao.initGridPioneerDataList(customerId);
}else if("agency".equals(orgType)){
list=baseDao.initAgencyPioneerDataList(customerId,agencyLevel);
List<ScreenPioneerDataEntity> list = new ArrayList<>();
if ("grid".equals(orgType)) {
list = baseDao.initGridPioneerDataList(customerId);
} else if ("agency".equals(orgType)) {
list = baseDao.initAgencyPioneerDataList(customerId, agencyLevel);
}
return list;
}
/**
* @param customerId
* @param orgType grid, agency
* @param dataEndTime
* @param deleteSize
* @param entityList 待插入的数据
* @return void
* @author yinzuomei
* @description 保存抽取结果
* @Date 2020/9/22 15:54
**/
@Transactional(rollbackFor = Exception.class)
@DataSource(DataSourceConstant.EVALUATION_INDEX)
@Override
public void delAndSavePioneerData(String customerId, String orgType, String dataEndTime, Integer deleteSize, List<ScreenPioneerDataEntity> entityList) {
int deleteNum;
do {
deleteNum = baseDao.deletePioneerData(customerId, orgType, dataEndTime, deleteSize);
} while (deleteNum != NumConstant.ZERO);
List<List<ScreenPioneerDataEntity>> partition = ListUtils.partition(entityList, IndexCalConstant.INSERT_SIZE);
partition.forEach(list -> {
baseDao.insertBatchEntity(list);
});
}
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java

@ -22,6 +22,7 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.CompareConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.dao.evaluationindex.screen.*;
import com.epmet.dto.screencoll.form.*;
import com.epmet.entity.evaluationindex.screen.ScreenEventImgDataEntity;
@ -447,7 +448,7 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService {
if (formDTO.getIsFirst()) {
int deleteNum;
do {
deleteNum = screenPioneerDataDao.deletePioneerData(customerId);
deleteNum = screenPioneerDataDao.deletePioneerData(customerId,null,null, IndexCalConstant.DELETE_SIZE);
} while (deleteNum != NumConstant.ZERO);
}
if (!CollectionUtils.isEmpty(formDTO.getDataList())) {

66
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPioneerDataDao.xml

@ -3,10 +3,16 @@
<mapper namespace="com.epmet.dao.evaluationindex.screen.ScreenPioneerDataDao">
<delete id="deletePioneerData">
<delete id="deletePioneerData" parameterType="map">
delete from screen_pioneer_data
where CUSTOMER_ID = #{customerId}
limit 1000;
<if test='null != orgType and "" != orgType'>
and ORG_TYPE=#{orgType}
</if>
<if test='null != dataEndTime and "" != dataEndTime'>
and DATA_END_TIME=#{dataEndTime}
</if>
limit #{deleteSize}
</delete>
<insert id="batchInsertPioneerData" parameterType="map">
@ -117,4 +123,60 @@
and sca.`LEVEL`=#{agencyLevel}
AND sca.CUSTOMER_ID = #{customerId}
</select>
<insert id="insertBatchEntity" parameterType="map">
insert into screen_pioneer_data
(
ID,
CUSTOMER_ID,
ORG_TYPE,
ORG_ID,
PARENT_ID,
ORG_NAME,
PUBLISH_ISSUE_TOTAL,
ISSUE_TOTAL,
TOPIC_TOTAL,
SHIFT_PROJECT_TOTAL,
RESOLVED_PROJECT_TOTAL,
PUBLISH_ISSUE_RATIO,
ISSUE_RATIO,
TOPIC_RATIO,
SHIFT_PROJECT_RATIO,
RESOLVED_PROJECT_RATIO,
DEL_FLAG,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME,
DATA_END_TIME
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{item.orgType},
#{item.orgId},
#{item.parentId},
#{item.orgName},
#{item.publishIssueTotal},
#{item.issueTotal},
#{item.topicTotal},
#{item.shiftProjectTotal},
#{item.resolvedProjectTotal},
#{item.publishIssueRatio},
#{item.issueRatio},
#{item.topicRatio},
#{item.shiftProjectRatio},
#{item.resolvedProjectRatio},
0,
0,
'APP_USER',
now(),
'APP_USER',
now(),
#{item.dataEndTime}
)
</foreach>
</insert>
</mapper>

Loading…
Cancel
Save