Browse Source

#霍山生产管理修改

zhongwei
yang_shj 1 year ago
parent
commit
5f8a72c2d9
  1. 7
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaAssetDeviceVo.java
  2. 4
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaTimelyVo.java
  3. 12
      hzims-service/assets/src/main/java/com/hnac/hzims/spare/feign/SpareClient.java
  4. 2
      hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java
  5. 12
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/InspectContentMapper.java
  6. 13
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/InspectObjectMapper.java
  7. 13
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ObjectUserMapper.java
  8. 13
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanObjectTemplateMapper.java
  9. 13
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanOrgMapper.java
  10. 14
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanPositionMapper.java
  11. 13
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanUserMapper.java
  12. 15
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ProjectContentMapper.java
  13. 13
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ProjectMapper.java
  14. 13
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectMapper.java
  15. 16
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectProjectContentMapper.java
  16. 13
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectProjectMapper.java
  17. 12
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskPlanMapper.java
  18. 13
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskResultMapper.java
  19. 13
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskUserMapper.java
  20. 15
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TemplateMapper.java
  21. 13
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TemplateProjectMapper.java
  22. 21
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/DutyMainMapper.xml
  23. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/InspectContentMapper.xml
  24. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/InspectObjectMapper.xml
  25. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ObjectUserMapper.xml
  26. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanObjectTemplateMapper.xml
  27. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanOrgMapper.xml
  28. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanPositionMapper.xml
  29. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanUserMapper.xml
  30. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ProjectContentMapper.xml
  31. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ProjectMapper.xml
  32. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectMapper.xml
  33. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectProjectContentMapper.xml
  34. 6
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectProjectMapper.xml
  35. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskPlanMapper.xml
  36. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskResultMapper.xml
  37. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskUserMapper.xml
  38. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TemplateMapper.xml
  39. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TemplateProjectMapper.xml
  40. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/controller/AreaDutyController.java
  41. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/AreaDutyService.java
  42. 99
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/AreaDutyServiceImpl.java

7
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;

4
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;
}

12
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);

2
hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java

@ -638,7 +638,7 @@ public class FdpMonitorServiceImpl extends BaseServiceImpl<FdpMonitorMapper, Fdp
}
paramMap.put("stationIds", list.toArray(new String[0]));
}else{
paramMap.put("stationIds", stations);
paramMap.put("stationIds", stations);
}
String result = HttpRequestUtil.postCall(paramMap, autoFaultPath, "POST");
if (StringUtil.isBlank(result)) {

12
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/InspectContentMapper.java

@ -1,12 +0,0 @@
package com.hnac.hzims.scheduled.mapper.inspect;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzinfo.inspect.obj.entity.ContentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* @author ysj
*/
@Mapper
public interface InspectContentMapper extends BaseMapper<ContentEntity>{
}

13
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/InspectObjectMapper.java

@ -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<ObjectEntity> {
}

13
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ObjectUserMapper.java

@ -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<ObjectUserEntity>{
}

13
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanObjectTemplateMapper.java

@ -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<PlanObjectTemplateEntity> {
}

13
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanOrgMapper.java

@ -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<PlanOrgEntity> {
}

14
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanPositionMapper.java

@ -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<PlanPositionEntity> {
}

13
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/PlanUserMapper.java

@ -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<PlanUserEntity> {
}

15
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ProjectContentMapper.java

@ -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<ProjectContentEntity>{
}

13
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/ProjectMapper.java

@ -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<ProjectEntity>{
}

13
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectMapper.java

@ -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<TaskObjectEntity> {
}

16
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectProjectContentMapper.java

@ -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<TaskObjectProjectContentEntity> {
}

13
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskObjectProjectMapper.java

@ -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<TaskObjectProjectEntity> {
}

12
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskPlanMapper.java

@ -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<PlanEntity> {
}

13
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskResultMapper.java

@ -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<TaskResultEntity> {
}

13
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TaskUserMapper.java

@ -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<TaskUserEntity> {
}

15
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TemplateMapper.java

@ -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<TemplateEntity> {
}

13
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/inspect/TemplateProjectMapper.java

@ -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<TemplateProjectEntity>{
}

21
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/DutyMainMapper.xml

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.scheduled.mapper.operation.DutyMainMapper">
<resultMap id="BaseResultMap" type="com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity">
<id column="ID" property="id" jdbcType="BIGINT"/>
<result column="TENANT_ID" property="tenantId" jdbcType="VARCHAR"/>
<result column="DUTY_PERSON_IDS" property="dutyPersonIds" jdbcType="LONGVARCHAR"/>
<result column="DUTY_DATE" property="dutyDate" jdbcType="DATE"/>
<result column="CLASS_ID" property="classId" jdbcType="BIGINT"/>
<result column="DUTY_GROUP_ID" property="dutyGroupId" jdbcType="BIGINT"/>
<result column="CLASS_NAME" property="className" jdbcType="VARCHAR"/>
<result column="STATUS" property="status" jdbcType="TINYINT"/>
<result column="REMARK" property="remark" jdbcType="LONGVARCHAR"/>
<result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP"/>
<result column="UPDATE_TIME" property="updateTime" jdbcType="TIMESTAMP"/>
<result column="CREATE_USER" property="createUser" jdbcType="BIGINT"/>
<result column="UPDATE_USER" property="updateUser" jdbcType="BIGINT"/>
<result column="IS_DELETED" property="isDeleted" jdbcType="TINYINT"/>
<result column="CREATE_DEPT" property="createDept" jdbcType="BIGINT"/>
</resultMap>
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/InspectContentMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.InspectContentMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/InspectObjectMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.InspectObjectMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ObjectUserMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.ObjectUserMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanObjectTemplateMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.PlanObjectTemplateMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanOrgMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.PlanOrgMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanPositionMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.PlanPositionMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/PlanUserMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.PlanUserMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ProjectContentMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.ProjectContentMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/ProjectMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.ProjectMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.TaskObjectMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectProjectContentMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.TaskObjectProjectContentMapper">
</mapper>

6
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskObjectProjectMapper.xml

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.TaskObjectProjectMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskPlanMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.TaskPlanMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskResultMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.TaskResultMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TaskUserMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.TaskUserMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TemplateMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.TemplateMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/inspect/TemplateProjectMapper.xml

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.scheduled.mapper.inspect.TemplateProjectMapper">
</mapper>

5
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<List<AreaTimelyVo>> 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<List<AreaTimelyVo>> timely(@ApiParam(value = "机构Id", required = true) @RequestParam Long deptId) {
return R.data(service.timely(deptId));
}
@ApiLog

2
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<AreaTimelyVo> timely(Long deptId,Integer type);
List<AreaTimelyVo> timely(Long deptId);
List<AreaAssetVo> asset(Long deptId);

99
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<AreaTimelyVo> timely(Long deptId,Integer type) {
public List<AreaTimelyVo> 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<AreaTimelyVo> 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<String> 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;

Loading…
Cancel
Save