diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/StatsStaffPatrolRecordDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/StatsStaffPatrolRecordDailyDTO.java index 4062043799..64d3eb84e4 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/StatsStaffPatrolRecordDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/StatsStaffPatrolRecordDailyDTO.java @@ -49,8 +49,8 @@ public class StatsStaffPatrolRecordDailyDTO implements Serializable { */ private String customerId; - /** - * 数据来源客户Id + /** + * 来源客户Id */ private String sourceCustomerId; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/StatsStaffPatrolRecordDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/StatsStaffPatrolRecordDailyDao.java index 1a25f9cfdf..42233f31d6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/StatsStaffPatrolRecordDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/StatsStaffPatrolRecordDailyDao.java @@ -35,7 +35,23 @@ import java.util.List; @Mapper public interface StatsStaffPatrolRecordDailyDao extends BaseDao { + /** + * desc: 请描述类的业务用途 + * + * @param insertList + * @return java.lang.Integer + * @author LiuJanJun + * @date 2021/7/9 1:57 下午 + */ Integer insertBatch(@Param("list") List insertList); - int delete(StaffPatrolStatsFormDTO formDTO); + /** + * desc: 删除内部数据 + * + * @param formDTO + * @return int + * @author LiuJanJun + * @date 2021/7/9 2:03 下午 + */ + int deleteInternal(StaffPatrolStatsFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/biz/impl/BizDataStatsServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/biz/impl/BizDataStatsServiceImpl.java index 29cca916f7..fbeb7a391f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/biz/impl/BizDataStatsServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/biz/impl/BizDataStatsServiceImpl.java @@ -227,6 +227,9 @@ public class BizDataStatsServiceImpl implements BizDataStatsService { record.setPatrolTotal(NumConstant.ZERO); record.setLatestPatrolStatus("end"); record.setReportProjectCount(NumConstant.ZERO); + + record.setSourceType("internal"); + record.setSourceCustomerId(record.getCustomerId()); //最后巡查时间 record.setLatestPatrolTime(null); if (recordDailyDTO != null) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/StatsStaffPatrolServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/StatsStaffPatrolServiceImpl.java index 0da9e3eea6..b07253b001 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/StatsStaffPatrolServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/StatsStaffPatrolServiceImpl.java @@ -32,7 +32,7 @@ public class StatsStaffPatrolServiceImpl implements StatsStaffPatrolService { @Override public Integer delAndInsertBatch(StaffPatrolStatsFormDTO formDTO, List insertList) { - int delete = statsStaffPatrolRecordDailyDao.delete(formDTO); + int delete = statsStaffPatrolRecordDailyDao.deleteInternal(formDTO); log.debug("delAndInsertBatch delete:{},param:{}", delete, JSON.toJSONString(formDTO)); return statsStaffPatrolRecordDailyDao.insertBatch(insertList); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/StatsStaffPatrolRecordDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/StatsStaffPatrolRecordDailyDao.xml index d3ea3d3f9a..3f6cda5d85 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/StatsStaffPatrolRecordDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/StatsStaffPatrolRecordDailyDao.xml @@ -6,7 +6,9 @@ insert into stats_staff_patrol_record_daily ( ID, + SOURCE_TYPE, CUSTOMER_ID, + SOURCE_CUSTOMER_ID, DATE_ID, WEEK_ID, MONTH_ID, @@ -31,7 +33,9 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.sourceType}, #{item.customerId}, + #{item.sourceCustomerId}, #{item.dateId}, #{item.weekId}, #{item.monthId}, @@ -54,11 +58,16 @@ now() ) + ON DUPLICATE KEY UPDATE + PATROL_TOTAL = values(PATROL_TOTAL), + TOTAL_TIME = values(TOTAL_TIME), + UPDATED_BY = VALUES(UPDATED_BY) - + DELETE FROM stats_staff_patrol_record_daily WHERE CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} + AND SOURCE_TYPE = 'internal' AND GRID_ID = #{gridId} diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/RoleOperationDefaultDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/RoleOperationDefaultDao.xml index 98cd9f675b..6d45ab19f7 100755 --- a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/RoleOperationDefaultDao.xml +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/RoleOperationDefaultDao.xml @@ -48,6 +48,6 @@ LEFT JOIN role_operation_default d ON (o.OPERATION_KEY = d.OPERATION_KEY AND d.DEL_FLAG = '0' AND d.ROLE_KEY = #{roleKey}) WHERE o.DEL_FLAG = '0' - ORDER BY o.OPERATION_KEY ASC + ORDER BY o.OPERATION_NAME ASC \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.13__alter_gov_staff_role.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.13__alter_gov_staff_role.sql deleted file mode 100644 index 40aed783d8..0000000000 --- a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.13__alter_gov_staff_role.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE `gov_staff_role_template` -ADD COLUMN `DESCRIPTION` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色对应的职责说明' AFTER `FULL_TIME_ONLY`, -ADD COLUMN `SORT` int(11) NULL DEFAULT NULL COMMENT '排序' AFTER `DESCRIPTION`; - - -ALTER TABLE `gov_staff_role` -MODIFY COLUMN `FULL_TIME_ONLY` tinyint(1) NULL DEFAULT 1 COMMENT '是否只有全职 1对应true 0对应false' AFTER `ORG_TYPE`, -MODIFY COLUMN `SORT` int(11) NULL DEFAULT NULL COMMENT '排序' AFTER `FULL_TIME_ONLY`, -ADD COLUMN `DESCRIPTION` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色对应的职责说明' AFTER `FULL_TIME_ONLY`;