From 793cf72f282145bec7e16d007b1d77fe2f11ae4d Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Wed, 17 Apr 2024 11:52:36 +0800 Subject: [PATCH 1/3] =?UTF-8?q?operation=E8=84=9A=E6=9C=AC=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=20middle=E5=AD=97=E5=85=B8=E6=9B=B4=E6=8D=A2=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hzims-service/hzims-middle/src/main/resources/db/2.0.0.sql | 8 ++++---- hzims-service/operational/src/main/resources/db/2.0.1.sql | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hzims-service/hzims-middle/src/main/resources/db/2.0.0.sql b/hzims-service/hzims-middle/src/main/resources/db/2.0.0.sql index a008eb2..a2c5667 100644 --- a/hzims-service/hzims-middle/src/main/resources/db/2.0.0.sql +++ b/hzims-service/hzims-middle/src/main/resources/db/2.0.0.sql @@ -1,12 +1,12 @@ -- 线下工作票流程 INSERT INTO `process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (13, 13, 'offlineWorkTicket', 'offlineWorkTicket', '线下工作票', '线下工作票', 'Y', 0, NULL, '2023-12-28 16:35:10', '2023-12-28 16:35:14', '线下工作票流程'); -- 工作任务单流程 -INSERT INTO `PROCESS_DICT` (`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (14, 14, 'WORK_TASK', 'WORK_TASK', '工作任务单V4', '工作任务单', 'Y', 0, NULL, '2023-07-25 18:35:01', '2024-01-09 14:48:18', '工作任务单流程'); +insert into `process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) values (14, 14, 'work_task', 'work_task', '工作任务单v4', '工作任务单', 'y', 0, null, '2023-07-25 18:35:01', '2024-01-09 14:48:18', '工作任务单流程'); -- 风险排查流程 -INSERT INTO `PROCESS_DICT`(`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (10, 10, 'HAZARD_RISK', 'HAZARD_RISK', '风险排查', '风险排查', 'Y', 0, NULL, '2023-07-25 18:35:01', '2023-09-19 22:35:40', '风险排查流程'); +insert into `process_dict`(`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) values (10, 10, 'hazard_risk', 'hazard_risk', '风险排查', '风险排查', 'y', 0, null, '2023-07-25 18:35:01', '2023-09-19 22:35:40', '风险排查流程'); -- 告警处理流程 -INSERT INTO `PROCESS_DICT`(`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (11, 11, 'DEALALARM', 'DEALALARM', '告警处理流程', '告警处理流程', 'Y', 0, NULL, '2024-02-19 16:56:10', '2024-02-19 16:56:34', '告警处理流程'); +insert into `process_dict`(`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) values (11, 11, 'dealalarm', 'dealalarm', '告警处理流程', '告警处理流程', 'y', 0, null, '2024-02-19 16:56:10', '2024-02-19 16:56:34', '告警处理流程'); -- 隐患排查流程 -INSERT INTO `PROCESS_DICT`(`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (12, 12, 'HIDDENDANGERCHECK', 'HIDDENDANGERCHECK', '隐患排查', '隐患排查', 'Y', 0, NULL, '2023-07-25 18:35:01', '2023-07-25 18:35:01', '隐患排查流程'); +insert into `process_dict`(`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) values (12, 12, 'hiddendangercheck', 'hiddendangercheck', '隐患排查', '隐患排查', 'y', 0, null, '2023-07-25 18:35:01', '2023-07-25 18:35:01', '隐患排查流程'); -- 日志记录表添加错误日志字段 alter table `hzims_workflow_operation_log` add column `fault_log` varchar(255) default null comment '错误日志'; \ No newline at end of file diff --git a/hzims-service/operational/src/main/resources/db/2.0.1.sql b/hzims-service/operational/src/main/resources/db/2.0.1.sql index 4344ceb..dca8ae5 100644 --- a/hzims-service/operational/src/main/resources/db/2.0.1.sql +++ b/hzims-service/operational/src/main/resources/db/2.0.1.sql @@ -104,3 +104,5 @@ ALTER TABLE `hzims_oper_phenomenon` ADD COLUMN `PRINCIPAL_NAME` varchar(255) CHA ALTER TABLE `hzims_oper_phenomenon` ADD COLUMN `PLAN_HANDLER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消缺处理人'; +ALTER TABLE `hz_ims_duty_analyse_example` ADD COLUMN `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配置名称'; + From d2a6a4d9f28407bb32ae87b403b9c129a72737c8 Mon Sep 17 00:00:00 2001 From: liwen Date: Wed, 17 Apr 2024 15:20:40 +0800 Subject: [PATCH 2/3] =?UTF-8?q?update:=20=E7=89=B9=E7=A7=8D=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=A8=A1=E5=9D=97=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SpecialDeviceInspectionServiceImpl.java | 54 +++++++++++++++++----- 1 file changed, 43 insertions(+), 11 deletions(-) diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/SpecialDeviceInspectionServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/SpecialDeviceInspectionServiceImpl.java index 7bfd8c2..88509db 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/SpecialDeviceInspectionServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/SpecialDeviceInspectionServiceImpl.java @@ -10,11 +10,15 @@ import com.hnac.hzims.safeproduct.enums.DeviceStatusEnum; import com.hnac.hzims.safeproduct.mapper.SpecialDeviceInspectionMapper; import com.hnac.hzims.safeproduct.service.ISpecialDeviceInspectionService; import com.hnac.hzims.safeproduct.service.ISpecialDeviceService; +import com.xxl.job.core.util.DateUtil; import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.utils.CollectionUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.Date; +import java.util.List; import java.util.Map; /** @@ -35,16 +39,31 @@ public class SpecialDeviceInspectionServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(SpecialDeviceInspectionEntity::getDeviceId, deviceId) + .orderByDesc(SpecialDeviceInspectionEntity::getInspectionTime); + List list = this.list(queryWrapper); + if (CollectionUtil.isNotEmpty(list)) { + SpecialDeviceInspectionEntity lastDeviceInspection = list.get(0); + Date lastInspectionTime = lastDeviceInspection.getInspectionTime(); + specialDeviceInspectionEntity.setLastInspectionTime(lastInspectionTime); + specialDeviceEntity.setInspectionLastTime(lastInspectionTime); + } + // 本次检验时间 + specialDeviceEntity.setInspectionCurrentTime(specialDeviceInspectionEntity.getInspectionTime()); boolean save = this.save(specialDeviceInspectionEntity); if (save) { - SpecialDeviceEntity specialDeviceEntity = deviceService.getById(specialDeviceInspectionEntity.getDeviceId()); - if (specialDeviceEntity != null) { - specialDeviceEntity.setInspectionLastTime(specialDeviceInspectionEntity.getLastInspectionTime()); - specialDeviceEntity.setInspectionCurrentTime(specialDeviceInspectionEntity.getInspectionTime()); - specialDeviceEntity.setInspectionNextTime(specialDeviceInspectionEntity.getNextInspectionTime()); - specialDeviceEntity.setDeviceStatus(DeviceStatusEnum.NORMAL.getValue()); - return deviceService.updateById(specialDeviceEntity); - } + specialDeviceEntity.setDeviceStatus(DeviceStatusEnum.NORMAL.getValue()); + return deviceService.updateById(specialDeviceEntity); } return false; } @@ -55,10 +74,23 @@ public class SpecialDeviceInspectionServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(SpecialDeviceInspectionEntity::getDeviceId, deviceId) + .orderByDesc(SpecialDeviceInspectionEntity::getInspectionTime); + List list = this.list(queryWrapper); + if (CollectionUtil.isNotEmpty(list)) { + // 仅最新的检验记录对特种设备的检验时间造成影响 + if (specialDeviceInspectionEntity.getId().equals(list.get(0).getId()) && update) { specialDeviceEntity.setInspectionLastTime(specialDeviceInspectionEntity.getLastInspectionTime()); specialDeviceEntity.setInspectionCurrentTime(specialDeviceInspectionEntity.getInspectionTime()); specialDeviceEntity.setInspectionNextTime(specialDeviceInspectionEntity.getNextInspectionTime()); From 69600ccce63fad1bf5163ea5baa8bc0c13a89c20 Mon Sep 17 00:00:00 2001 From: liwen Date: Wed, 17 Apr 2024 15:21:11 +0800 Subject: [PATCH 3/3] =?UTF-8?q?update:=20=E6=BC=94=E7=BB=83=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E5=AF=BC=E5=87=BA=E6=95=B0=E6=8D=AE=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hnac/hzims/safeproduct/dto/RehearsalExportDTO.java | 12 ++++++++---- .../hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.xml | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/RehearsalExportDTO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/RehearsalExportDTO.java index f79db79..d7a3e1d 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/RehearsalExportDTO.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/dto/RehearsalExportDTO.java @@ -32,18 +32,22 @@ public class RehearsalExportDTO { private Date scheduledEndTime; @ApiModelProperty("演练地点") - @ExcelProperty(value = "演练地点", index = 4) + @ExcelProperty(value = "演练地点", index = 2) private String location; @ApiModelProperty("演练状态") - @ExcelProperty(value = "演练状态", index = 5) + @ExcelProperty(value = "演练状态", index = 6) private String rehearsalStatus; @ApiModelProperty("计划开始时间") - @ExcelProperty(value = "计划开始时间", index = 2) + @ExcelProperty(value = "计划开始时间", index = 3) private String startTime; @ApiModelProperty("计划结束时间") - @ExcelProperty(value = "计划结束时间", index = 3) + @ExcelProperty(value = "计划结束时间", index = 4) private String endTime; + + @ApiModelProperty("总指挥") + @ExcelProperty(value = "总指挥", index = 5) + private String commander; } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.xml index 8ff4810..f855e8d 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.xml +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.xml @@ -73,7 +73,7 @@