From 5f8a72c2d9699af967e55f343f335f0976d02c41 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Fri, 1 Sep 2023 21:52:47 +0800 Subject: [PATCH] =?UTF-8?q?#=E9=9C=8D=E5=B1=B1=E7=94=9F=E4=BA=A7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alert/constants/AbnormalAlarmConstant.java | 2 +- .../operational/census/vo/AreaAssetDeviceVo.java | 7 +- .../hzims/operational/census/vo/AreaTimelyVo.java | 4 +- .../com/hnac/hzims/spare/feign/SpareClient.java | 12 +-- .../fdp/service/impl/FdpMonitorServiceImpl.java | 2 +- .../mapper/inspect/InspectContentMapper.java | 12 --- .../mapper/inspect/InspectObjectMapper.java | 13 --- .../scheduled/mapper/inspect/ObjectUserMapper.java | 13 --- .../mapper/inspect/PlanObjectTemplateMapper.java | 13 --- .../scheduled/mapper/inspect/PlanOrgMapper.java | 13 --- .../mapper/inspect/PlanPositionMapper.java | 14 --- .../scheduled/mapper/inspect/PlanUserMapper.java | 13 --- .../mapper/inspect/ProjectContentMapper.java | 15 ---- .../scheduled/mapper/inspect/ProjectMapper.java | 13 --- .../scheduled/mapper/inspect/TaskObjectMapper.java | 13 --- .../inspect/TaskObjectProjectContentMapper.java | 16 ---- .../mapper/inspect/TaskObjectProjectMapper.java | 13 --- .../scheduled/mapper/inspect/TaskPlanMapper.java | 12 --- .../scheduled/mapper/inspect/TaskResultMapper.java | 13 --- .../scheduled/mapper/inspect/TaskUserMapper.java | 13 --- .../scheduled/mapper/inspect/TemplateMapper.java | 15 ---- .../mapper/inspect/TemplateProjectMapper.java | 13 --- .../resources/mapper/inspect/DutyMainMapper.xml | 21 ----- .../mapper/inspect/InspectContentMapper.xml | 5 -- .../mapper/inspect/InspectObjectMapper.xml | 5 -- .../resources/mapper/inspect/ObjectUserMapper.xml | 5 -- .../mapper/inspect/PlanObjectTemplateMapper.xml | 5 -- .../resources/mapper/inspect/PlanOrgMapper.xml | 5 -- .../mapper/inspect/PlanPositionMapper.xml | 5 -- .../resources/mapper/inspect/PlanUserMapper.xml | 5 -- .../mapper/inspect/ProjectContentMapper.xml | 5 -- .../resources/mapper/inspect/ProjectMapper.xml | 5 -- .../resources/mapper/inspect/TaskObjectMapper.xml | 5 -- .../inspect/TaskObjectProjectContentMapper.xml | 5 -- .../mapper/inspect/TaskObjectProjectMapper.xml | 6 -- .../resources/mapper/inspect/TaskPlanMapper.xml | 5 -- .../resources/mapper/inspect/TaskResultMapper.xml | 5 -- .../resources/mapper/inspect/TaskUserMapper.xml | 5 -- .../resources/mapper/inspect/TemplateMapper.xml | 5 -- .../mapper/inspect/TemplateProjectMapper.xml | 5 -- .../census/controller/AreaDutyController.java | 5 +- .../census/service/AreaDutyService.java | 2 +- .../census/service/impl/AreaDutyServiceImpl.java | 99 +++++++++++++--------- 43 files changed, 72 insertions(+), 395 deletions(-) delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/InspectContentMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/InspectObjectMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ObjectUserMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanObjectTemplateMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanOrgMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanPositionMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanUserMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ProjectContentMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ProjectMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectProjectContentMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectProjectMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskPlanMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskResultMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskUserMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TemplateMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TemplateProjectMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/DutyMainMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/InspectContentMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/InspectObjectMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ObjectUserMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanObjectTemplateMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanOrgMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanPositionMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanUserMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ProjectContentMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ProjectMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectProjectContentMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectProjectMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskPlanMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskResultMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskUserMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TemplateMapper.xml delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TemplateProjectMapper.xml diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/constants/AbnormalAlarmConstant.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/constants/AbnormalAlarmConstant.java index 72f7643..9ece78b 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/constants/AbnormalAlarmConstant.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/constants/AbnormalAlarmConstant.java @@ -23,7 +23,7 @@ public interface AbnormalAlarmConstant { /**故障**/ String FAULT = "3"; - + /**预警**/ Long EARLY_WARNING = 20L; diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaAssetDeviceVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaAssetDeviceVo.java index fa6f71d..56ce3a8 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaAssetDeviceVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaAssetDeviceVo.java @@ -16,8 +16,11 @@ public class AreaAssetDeviceVo { @ApiModelProperty(value = "机构Id") private Long deptId; - @ApiModelProperty(value = "机构名称") - private String deptName; + @ApiModelProperty(value = "设备名称") + private String deviceCode; + + @ApiModelProperty(value = "设备名称") + private String deviceName; @ApiModelProperty(value = "状态") private Integer status; diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaTimelyVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaTimelyVo.java index d50cd69..29ec5c1 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaTimelyVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaTimelyVo.java @@ -24,8 +24,8 @@ public class AreaTimelyVo { private String time; @ApiModelProperty(value = "提醒数量") - private Integer sum; + private String type; - @ApiModelProperty(value = "字体颜色:1-红色 0-黄色") + @ApiModelProperty(value = "字体颜色:0-红色 1-黄色 2-绿色") private Integer colour; } diff --git a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/feign/SpareClient.java b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/feign/SpareClient.java index aef9c2b..4711db9 100644 --- a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/feign/SpareClient.java +++ b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/feign/SpareClient.java @@ -110,26 +110,18 @@ public class SpareClient implements ISpareClient{ WtSpWarehouseEntity warehouse = warehouses.stream().filter(o->o.getId().equals(total.getWarehouseId())).min(Comparator.comparing(WtSpWarehouseEntity::getId)).get(); timely.setDeptName(warehouse.getName()); timely.setEventId(String.valueOf(total.getId())); + timely.setType("固定资产"); + timely.setColour(1); if(total.getStock() > basic.getUpperLimit()){ timely.setContent(String.format("(%s)已达到上限,目前仓库内的库存为:%s,上限值为:%s。", basic.getName(), total.getStock(), basic.getUpperLimit())); - timely.setSum((int) (total.getStock() - basic.getUpperLimit())); - timely.setColour(0); - if((double) (total.getStock() - basic.getUpperLimit()) / basic.getUpperLimit() > 0.3){ - timely.setColour(1); - } }else{ timely.setContent(String.format("(%s)已达到下限,目前仓库内的库存为:%s,下限值为:%s。", basic.getName(), total.getStock(), basic.getUpperLimit())); - timely.setSum((int) (total.getStock() - basic.getLowerLimit())); - timely.setColour(0); - if((double)(basic.getLowerLimit() - total.getStock()) / basic.getLowerLimit() > 0.3){ - timely.setColour(1); - } } timely.setTime(DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME)); exceeds.add(timely); diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java index ccf9ee1..ba577d3 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java @@ -638,7 +638,7 @@ public class FdpMonitorServiceImpl extends BaseServiceImpl{ -} diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/InspectObjectMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/InspectObjectMapper.java deleted file mode 100644 index 2785f87..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/InspectObjectMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.obj.entity.ObjectEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * @author ysj - */ -@Mapper -public interface InspectObjectMapper extends BaseMapper { - -} diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ObjectUserMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ObjectUserMapper.java deleted file mode 100644 index bf7bd6b..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ObjectUserMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.obj.entity.ObjectUserEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * @author ysj - */ -@Mapper -public interface ObjectUserMapper extends BaseMapper{ - -} diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanObjectTemplateMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanObjectTemplateMapper.java deleted file mode 100644 index cffeb83..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanObjectTemplateMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.plan.entity.PlanObjectTemplateEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * @author ysj - */ -@Mapper -public interface PlanObjectTemplateMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanOrgMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanOrgMapper.java deleted file mode 100644 index 7a9b54f..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanOrgMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.plan.entity.PlanOrgEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * @author ysj - */ -@Mapper -public interface PlanOrgMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanPositionMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanPositionMapper.java deleted file mode 100644 index 31ee860..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanPositionMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.plan.entity.PlanPositionEntity; -import org.apache.ibatis.annotations.Mapper; - - -/** - * @author ysj - */ -@Mapper -public interface PlanPositionMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanUserMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanUserMapper.java deleted file mode 100644 index 6d4d19e..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanUserMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.plan.entity.PlanUserEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * @author ysj - */ -@Mapper -public interface PlanUserMapper extends BaseMapper { - -} diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ProjectContentMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ProjectContentMapper.java deleted file mode 100644 index 8e9ae3e..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ProjectContentMapper.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.obj.entity.ProjectContentEntity; -import org.apache.ibatis.annotations.Mapper; - -import java.util.List; - -/** - * @author ysj - */ -@Mapper -public interface ProjectContentMapper extends BaseMapper{ - -} \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ProjectMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ProjectMapper.java deleted file mode 100644 index c237f71..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ProjectMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.obj.entity.ProjectEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * @author ysj - */ -@Mapper -public interface ProjectMapper extends BaseMapper{ - -} diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectMapper.java deleted file mode 100644 index 0c0869c..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.task.entity.TaskObjectEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * @author ysj - */ -@Mapper -public interface TaskObjectMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectProjectContentMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectProjectContentMapper.java deleted file mode 100644 index 4bdca02..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectProjectContentMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.task.entity.TaskObjectProjectContentEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * @author ysj - */ -@Mapper -public interface TaskObjectProjectContentMapper extends BaseMapper { - -} diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectProjectMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectProjectMapper.java deleted file mode 100644 index fdef106..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectProjectMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.task.entity.TaskObjectProjectEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * @author ysj - */ -@Mapper -public interface TaskObjectProjectMapper extends BaseMapper { - -} diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskPlanMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskPlanMapper.java deleted file mode 100644 index 6faf295..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskPlanMapper.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.plan.entity.PlanEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * @author ysj - */ -@Mapper -public interface TaskPlanMapper extends BaseMapper { -} diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskResultMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskResultMapper.java deleted file mode 100644 index ee0f34b..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskResultMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.task.entity.TaskResultEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * @author ysj - */ -@Mapper -public interface TaskResultMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskUserMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskUserMapper.java deleted file mode 100644 index 83c6db3..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskUserMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.task.entity.TaskUserEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * @author ysj - */ -@Mapper -public interface TaskUserMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TemplateMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TemplateMapper.java deleted file mode 100644 index 0b82110..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TemplateMapper.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.obj.entity.TemplateEntity; -import org.apache.ibatis.annotations.Mapper; - -import java.util.List; - -/** - * @author ysj - */ -@Mapper -public interface TemplateMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TemplateProjectMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TemplateProjectMapper.java deleted file mode 100644 index 6d42089..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TemplateProjectMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.inspect; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hnac.hzinfo.inspect.obj.entity.TemplateProjectEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * @author ysj - */ -@Mapper -public interface TemplateProjectMapper extends BaseMapper{ - -} diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/DutyMainMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/DutyMainMapper.xml deleted file mode 100644 index 3ce9fcd..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/DutyMainMapper.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/InspectContentMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/InspectContentMapper.xml deleted file mode 100644 index f7e3e04..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/InspectContentMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/InspectObjectMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/InspectObjectMapper.xml deleted file mode 100644 index 1963f43..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/InspectObjectMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ObjectUserMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ObjectUserMapper.xml deleted file mode 100644 index 66a295e..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ObjectUserMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanObjectTemplateMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanObjectTemplateMapper.xml deleted file mode 100644 index 1d0d4b3..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanObjectTemplateMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanOrgMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanOrgMapper.xml deleted file mode 100644 index 667ee81..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanOrgMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanPositionMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanPositionMapper.xml deleted file mode 100644 index 7d8f0e9..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanPositionMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanUserMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanUserMapper.xml deleted file mode 100644 index 3e8602b..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanUserMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ProjectContentMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ProjectContentMapper.xml deleted file mode 100644 index 56170b0..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ProjectContentMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ProjectMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ProjectMapper.xml deleted file mode 100644 index 88668db..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ProjectMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectMapper.xml deleted file mode 100644 index 6d89084..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectProjectContentMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectProjectContentMapper.xml deleted file mode 100644 index ad59b3e..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectProjectContentMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectProjectMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectProjectMapper.xml deleted file mode 100644 index eb355f8..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectProjectMapper.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskPlanMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskPlanMapper.xml deleted file mode 100644 index adb3d05..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskPlanMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskResultMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskResultMapper.xml deleted file mode 100644 index e2986ad..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskResultMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskUserMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskUserMapper.xml deleted file mode 100644 index ca9da30..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskUserMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TemplateMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TemplateMapper.xml deleted file mode 100644 index 7096dd1..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TemplateMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TemplateProjectMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TemplateProjectMapper.xml deleted file mode 100644 index b4ab0b8..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TemplateProjectMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/controller/AreaDutyController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/controller/AreaDutyController.java index 8add3fa..8cda40d 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/controller/AreaDutyController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/controller/AreaDutyController.java @@ -50,9 +50,8 @@ public class AreaDutyController { @ApiOperation("及时提醒消息") @GetMapping("/timely") @ApiOperationSupport(order = 3) - public R> timely(@ApiParam(value = "机构Id", required = true) @RequestParam Long deptId, - @ApiParam(value = "类型", required = true) @RequestParam Integer type) { - return R.data(service.timely(deptId,type)); + public R> timely(@ApiParam(value = "机构Id", required = true) @RequestParam Long deptId) { + return R.data(service.timely(deptId)); } @ApiLog diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/AreaDutyService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/AreaDutyService.java index 83d8ce1..2b03344 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/AreaDutyService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/AreaDutyService.java @@ -14,7 +14,7 @@ public interface AreaDutyService { AreaDutyVo duty(Long deptId); - List timely(Long deptId,Integer type); + List timely(Long deptId); List asset(Long deptId); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/AreaDutyServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/AreaDutyServiceImpl.java index f67fa82..3aad703 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/AreaDutyServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/AreaDutyServiceImpl.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.hnac.hzims.equipment.vo.EminfoAndEmParamVo; import com.hnac.hzims.fdp.feign.IFdpMonitorClient; import com.hnac.hzims.operational.access.dto.AccessTaskV4DTO; @@ -42,6 +43,7 @@ import java.time.Duration; import java.time.LocalDateTime; import java.time.ZoneId; import java.util.*; +import java.util.concurrent.*; import java.util.stream.Collectors; /** @@ -78,6 +80,8 @@ public class AreaDutyServiceImpl implements AreaDutyService { private final RedisTemplate redisTemplate; + private static ScheduledExecutorService pool = new ScheduledThreadPoolExecutor(5, new ThreadFactoryBuilder().setNameFormat("area-duty-pool-%d").build(), new ThreadPoolExecutor.AbortPolicy()); + /** * 区域值班数据 * @param deptId @@ -98,25 +102,44 @@ public class AreaDutyServiceImpl implements AreaDutyService { * @return */ @Override - public List timely(Long deptId,Integer type) { + public List timely(Long deptId) { Calendar calendar = Calendar.getInstance(); String start = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); + calendar.add(Calendar.HOUR_OF_DAY,-calendar.get(Calendar.HOUR_OF_DAY)); + calendar.add(Calendar.MINUTE,-calendar.get(Calendar.MINUTE)); + calendar.add(Calendar.SECOND,-calendar.get(Calendar.SECOND)); calendar.add(Calendar.DAY_OF_MONTH,1); String end = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); - switch (type){ - case 1: - return this.early(deptId); - case 2: - return this.inspection(start,end,deptId); - case 3: - return this.overhaul(start,end,deptId); - case 4: - return this.maintenance(start,end,deptId); - case 5: - return this.regular(deptId); - default: - return new ArrayList<>(); + List timelys = new ArrayList<>(); + CountDownLatch countDownLatch = new CountDownLatch(5); + pool.execute(()->{ + timelys.addAll(this.early(deptId)); + countDownLatch.countDown(); + }); + pool.execute(()->{ + timelys.addAll(this.inspection(start,end,deptId)); + countDownLatch.countDown(); + }); + pool.execute(()->{ + timelys.addAll(this.overhaul(start,end,deptId)); + countDownLatch.countDown(); + }); + pool.execute(()->{ + timelys.addAll(this.maintenance(start,end,deptId)); + countDownLatch.countDown(); + }); + pool.execute(()->{ + timelys.addAll(this.regular(deptId)); + countDownLatch.countDown(); + }); + // 等待所有线程执行完成 + try { + countDownLatch.await(); + } catch (InterruptedException e) { + e.printStackTrace(); + Thread.currentThread().interrupt(); } + return timelys.stream().sorted(Comparator.comparing(AreaTimelyVo::getColour).thenComparing(AreaTimelyVo::getTime).reversed()).collect(Collectors.toList()); } @@ -151,14 +174,17 @@ public class AreaDutyServiceImpl implements AreaDutyService { AreaTimelyVo timely = new AreaTimelyVo(); timely.setEventId(early.getFaultId()); timely.setContent(early.getFinfo()); - timely.setDeptName(early.getStation()); + timely.setDeptName("未知"); + if(!StringUtil.isEmpty(early.getStation())){ + List names = stations.stream().filter(o->o.getCode().equals(early.getStation())).map(StationEntity::getName).collect(Collectors.toList()); + if(CollectionUtil.isNotEmpty(names)){ + timely.setDeptName(names.get(0)); + } + } timely.setTime(early.getCreateTime()); - int sum = this.eventToHours(LocalDateTime.parse(early.getCreateTime(),DateUtil.DATETIME_FORMATTER)); - timely.setSum(sum); + //int sum = this.eventToHours(LocalDateTime.parse(early.getCreateTime(),DateUtil.DATETIME_FORMATTER)); + timely.setType("智能预警"); timely.setColour(0); - if(sum > 12){ - timely.setColour(1); - } return timely; }).collect(Collectors.toList()); } @@ -182,12 +208,9 @@ public class AreaDutyServiceImpl implements AreaDutyService { timely.setDeptName(result.getData().getDeptName()); } timely.setTime(expire.getPlanEndTime().format(DateUtil.DATETIME_FORMATTER)); - int sum = this.eventToHours(expire.getPlanEndTime()); - timely.setSum(sum); - timely.setColour(0); - if(sum < 12){ - timely.setColour(1); - } + //int sum = this.eventToHours(expire.getPlanEndTime()); + timely.setType("巡检任务"); + timely.setColour(2); return timely; }).collect(Collectors.toList()); } @@ -216,12 +239,9 @@ public class AreaDutyServiceImpl implements AreaDutyService { timely.setDeptName(result.getData().getDeptName()); } timely.setTime(DateUtil.format(overhaul.getPlanEndTime(),DateUtil.PATTERN_DATETIME)); - int sum = this.eventToHours(LocalDateTime.ofInstant(overhaul.getPlanEndTime().toInstant(), ZoneId.systemDefault())); - timely.setSum(sum); - timely.setColour(0); - if(sum < 12){ - timely.setColour(1); - } + //int sum = this.eventToHours(LocalDateTime.ofInstant(overhaul.getPlanEndTime().toInstant(), ZoneId.systemDefault())); + timely.setType("检修任务"); + timely.setColour(2); return timely; }).collect(Collectors.toList()); } @@ -251,11 +271,8 @@ public class AreaDutyServiceImpl implements AreaDutyService { } timely.setTime(DateUtil.format(maintenance.getPlanEndTime(),DateUtil.PATTERN_DATETIME)); int sum = this.eventToHours(maintenance.getPlanEndTime()); - timely.setSum(sum); - timely.setColour(0); - if(sum < 12){ - timely.setColour(1); - } + timely.setType("日常维护"); + timely.setColour(2); return timely; }).collect(Collectors.toList()); } @@ -301,12 +318,12 @@ public class AreaDutyServiceImpl implements AreaDutyService { asset.setDevices(entry.getValue().stream().map(value->{ AreaAssetDeviceVo item = new AreaAssetDeviceVo(); item.setDeptId(entry.getKey()); - item.setDeptName(asset.getDeptName()); + item.setDeviceCode(value.getEmCode()); + item.setDeviceName(value.getName()); // 状态 HydropowerUnitRealVo real = reals.stream().filter(o->o.getDeviceCode().equals(value.getEmCode())).min(Comparator.comparing(HydropowerUnitRealVo::getDeviceCode)).get(); - if(ObjectUtil.isEmpty(real)){ - item.setStatus(2); - }else if(Math.abs(real.getActivePower()) > 0){ + item.setStatus(2); + if(ObjectUtil.isNotEmpty(real) && Math.abs(real.getActivePower()) > 0){ item.setStatus(1); } return item;