diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.26__alter_dict.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.26__alter_dict.sql index f01ae19551..10b2bf3ea5 100644 --- a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.26__alter_dict.sql +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.26__alter_dict.sql @@ -12,7 +12,6 @@ INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, ` -- 字典表新增数据【自己的】 INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2100000000000000001', 'traffic_type', '交通方式', '交通方式【行程上报】', '36', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2100000000000000002', 'sojourn_history', '7天内旅居史情况', '7天内旅居史情况【行程上报】', '37', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); -INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2100000000000000003', 'isolate_type', '隔离状态', '隔离状态【行程上报】', '38', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2100000000000000004', 'trip_data_type', '行程记录类型', '行程记录类型【行程上报】', '39', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); @@ -25,10 +24,6 @@ INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, ` INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000002', '2100000000000000002', '中风险', '1', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000003', '2100000000000000002', '低风险', '0', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000004', '2100000000000000002', '无风险', '3', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5300000000000000001', '2100000000000000003', '集中隔离', '1', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5300000000000000002', '2100000000000000003', '居家隔离', '2', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5300000000000000003', '2100000000000000003', '居家健康检测', '3', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5300000000000000004', '2100000000000000003', '不需要隔离', '4', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000001', '2100000000000000004', '省内', '1', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000002', '2100000000000000004', '省外', '2', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000003', '2100000000000000004', '市内', '3', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java index d38442798e..a07838684d 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java @@ -33,7 +33,6 @@ public enum DictTypeEnum { DANGER_AREA_LEVEL_TYPE("dangerAreaLevel", "风险地区等级", 34), TRAFFIC_TYPE("traffic_type", "交通方式", 36), SOJOURN_HISTORY("sojourn_history", "7天内旅居史情况", 37), - ISOLATE_TYPE("isolate_type", "隔离状态", 38), TRIP_DATA_TYPE("trip_data_type", "行程记录类型", 39), ; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java index 5db0b44648..a5e811f000 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java @@ -130,9 +130,9 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl> sojournHistoryMap = adminOpenFeignClient.dictMap(DictTypeEnum.SOJOURN_HISTORY.getCode()); //Map sMap = sojournHistoryMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); - //隔离状态 - Result> isolateTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.ISOLATE_TYPE.getCode()); - //Map iMap = isolateTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); + //隔离状态【磐石的跟之前字典表值不一样】 + Map isolateTypeMap = new HashMap<>(); + isolateTypeMap.put("0", "集中隔离");isolateTypeMap.put("1", "居家隔离");isolateTypeMap.put("2", "居家健康监测");isolateTypeMap.put("3", "已出隔离期");isolateTypeMap.put("4", "不需要隔离"); //行程记录类型 Result> tripDataTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRIP_DATA_TYPE.getCode()); //Map tdMap = tripDataTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); @@ -166,7 +166,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl> sojournHistoryMap = adminOpenFeignClient.dictMap(DictTypeEnum.SOJOURN_HISTORY.getCode()); //Map sMap = sojournHistoryMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); - //隔离状态 - Result> isolateTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.ISOLATE_TYPE.getCode()); - //Map iMap = isolateTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); + //隔离状态【磐石的跟之前字典表值不一样】 + Map isolateTypeMap = new HashMap<>(); + isolateTypeMap.put("0", "集中隔离");isolateTypeMap.put("1", "居家隔离");isolateTypeMap.put("2", "居家健康监测");isolateTypeMap.put("3", "已出隔离期");isolateTypeMap.put("4", "不需要隔离"); //行程记录类型 Result> tripDataTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRIP_DATA_TYPE.getCode()); //Map tdMap = tripDataTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); @@ -433,7 +433,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl> trafficTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRAFFIC_TYPE.getCode()); //7天内旅居史情况 Result> sojournHistoryMap = adminOpenFeignClient.dictMap(DictTypeEnum.SOJOURN_HISTORY.getCode()); - //隔离状态 - Result> isolateTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.ISOLATE_TYPE.getCode()); + //隔离状态【磐石的跟之前字典表值不一样】 + Map isolateTypeMap = new HashMap<>(); + isolateTypeMap.put("0", "集中隔离");isolateTypeMap.put("1", "居家隔离");isolateTypeMap.put("2", "居家健康监测");isolateTypeMap.put("3", "已出隔离期");isolateTypeMap.put("4", "不需要隔离"); //行程记录类型 Result> tripDataTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRIP_DATA_TYPE.getCode()); @@ -614,7 +615,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl> sojournHistoryMap = adminOpenFeignClient.dictMap(DictTypeEnum.SOJOURN_HISTORY.getCode()); Map sMap = sojournHistoryMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); - //隔离状态 - Result> isolateTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.ISOLATE_TYPE.getCode()); - Map iMap = isolateTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); + //隔离状态【磐石的跟之前字典表值不一样】 + Map iMap = new HashMap<>(); + iMap.put("集中隔离", "0");iMap.put("居家隔离", "1");iMap.put("居家健康监测", "2");iMap.put("已出隔离期", "3");iMap.put("不需要隔离", "4"); //行程记录类型 Result> tripDataTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRIP_DATA_TYPE.getCode()); Map tdMap = tripDataTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); @@ -760,8 +761,9 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl sojournMap = sojournMapRes.success() && CollectionUtils.isNotEmpty(sojournMapRes.getData()) ? sojournMapRes.getData().stream().collect(Collectors.toMap(SysDictDataDTO::getDictValue, SysDictDataDTO::getDictLabel)) : new HashMap<>(); // 隔离状态字典 - Result> isolateMapRes = adminOpenFeignClient.dictDataList(DictTypeEnum.ISOLATE_TYPE.getCode()); - Map isolateMap = isolateMapRes.success() && CollectionUtils.isNotEmpty(isolateMapRes.getData()) ? isolateMapRes.getData().stream().collect(Collectors.toMap(SysDictDataDTO::getDictValue, SysDictDataDTO::getDictLabel)) : new HashMap<>(); + Map isolateMap = new HashMap<>(); + isolateMap.put("0", "集中隔离");isolateMap.put("1", "居家隔离");isolateMap.put("2", "居家健康监测");isolateMap.put("3", "已出隔离期");isolateMap.put("4", "不需要隔离"); + if (CollectionUtils.isNotEmpty(result.getList())){ result.getList().forEach(l -> { l.setIsolateTypeName(isolateMap.get(l.getIsolateType())); diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/ps_trip_report_import_template.xlsx b/epmet-user/epmet-user-server/src/main/resources/excel/ps_trip_report_import_template.xlsx index 186dee0bf7..88ee9650a4 100644 Binary files a/epmet-user/epmet-user-server/src/main/resources/excel/ps_trip_report_import_template.xlsx and b/epmet-user/epmet-user-server/src/main/resources/excel/ps_trip_report_import_template.xlsx differ