diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java index 6e18cb5867..59c0d906c8 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java @@ -84,6 +84,11 @@ public class AgencyScoreDTO implements Serializable { */ private String indexCode; + /** + * 数据类型 district :全区;street:街道 + */ + private String dataType; + /** * */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java index b7a05696c3..5051aa3d82 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java @@ -84,6 +84,11 @@ public class DeptScoreDTO implements Serializable { */ private String indexCode; + /** + * + */ + private Integer delFlag; + /** * 乐观锁 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/AgencyScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/AgencyScoreDao.java similarity index 60% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/AgencyScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/AgencyScoreDao.java index 6a076c057c..245d72e3fd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/AgencyScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/AgencyScoreDao.java @@ -15,11 +15,15 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.indexscore; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; import com.epmet.entity.indexcoll.AgencyScoreEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 区/街道相关分数表 @@ -29,5 +33,24 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface AgencyScoreDao extends BaseDao { - + + /** + * @Description 【街道】中间表插入 + * @param lists + * @author zxc + * @date 2020/8/27 5:05 下午 + */ + void insertStreetRecord(@Param("lists") List lists); + + /** + * @Description 删除旧记录 + * @param customerId + * @param monthId + * @param indexCode + * @author zxc + * @date 2020/9/2 15:47 + */ + void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); + + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/DeptScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/DeptScoreDao.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/DeptScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/DeptScoreDao.java index 101dc3b759..6a3d15d529 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/DeptScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/DeptScoreDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.indexscore; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.indexcoll.DeptScoreEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java index 607132ea18..0ae188f0c9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java @@ -35,7 +35,7 @@ import java.util.List; public interface FactIndexCommunityScoreDao extends BaseDao { /** - * @Description 党建能力【社区】中间表插入 + * @Description 【社区】中间表插入 * @param lists * @author zxc * @date 2020/8/27 5:05 下午 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/AgencyScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/AgencyScoreEntity.java index 02b9bf0fd1..4b6182e30f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/AgencyScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/AgencyScoreEntity.java @@ -84,4 +84,9 @@ public class AgencyScoreEntity extends BaseEpmetEntity { */ private String indexCode; + /** + * 数据类型 district :全区;street:街道 + */ + private String dataType; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/AgencyScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/AgencyScoreServiceImpl.java index 62be1fc75b..2d84d1326d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/AgencyScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/AgencyScoreServiceImpl.java @@ -23,7 +23,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.dao.indexcoll.AgencyScoreDao; +import com.epmet.dao.indexscore.AgencyScoreDao; import com.epmet.dto.indexcal.AgencyScoreDTO; import com.epmet.entity.indexcoll.AgencyScoreEntity; import com.epmet.service.indexcal.AgencyScoreService; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptScoreServiceImpl.java index 611ebfee84..da1f056c19 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptScoreServiceImpl.java @@ -23,7 +23,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.dao.indexcoll.DeptScoreDao; +import com.epmet.dao.indexscore.DeptScoreDao; import com.epmet.dto.indexcal.DeptScoreDTO; import com.epmet.entity.indexcoll.DeptScoreEntity; import com.epmet.service.indexcal.DeptScoreService; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/AgencyScoreDao.xml index 8fc48a372d..d19bf16699 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/AgencyScoreDao.xml @@ -1,6 +1,45 @@ - + + + + INSERT INTO fact_index_agency_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, IS_TOTAL, SCORE, INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) + VALUES + + ( + REPLACE ( UUID(), '-', '' ), + #{item.customerId}, + #{item.agencyId}, + #{item.parentAgencyId}, + #{item.yearId}, + #{item.quarterId}, + #{item.monthId}, + #{item.dataType}, + #{item.isTotal}, + #{item.score}, + #{item.indexCode}, + #{item.delFlag}, + #{item.revision}, + #{item.createdBy}, + NOW(), + #{item.updatedBy}, + NOW() + ) + + + + + + DELETE + FROM + fact_index_agency_score + WHERE + del_flag = '0' + AND customer_id = #{customerId} + AND month_id = #{monthId} + AND index_code = #{indexCode} + AND data_type = #{dateType} + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/DeptScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/DeptScoreDao.xml index 176c542927..380d746009 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/DeptScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/DeptScoreDao.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file