Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
tyty 1 year ago
parent
commit
e049c1be30
  1. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java
  2. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/RegularWorkVO.java
  3. 310
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/entity/StandardTicketInfoEntity.java
  4. 67
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/entity/StandardTicketMeasureEntity.java
  5. 3
      hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpAllocationController.java
  6. 2
      hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpReceiveController.java
  7. 2
      hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpReceivesController.java
  8. 3
      hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpWarehouseInController.java
  9. 3
      hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpWarehouseOutController.java
  10. 5
      hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/WtSpTotalController.java
  11. 6
      hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpDeviceController.java
  12. 2
      hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpMonitorController.java
  13. 27
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/operation/DutyGroupMapper.java
  14. 20
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/operation/DutyMapper.java
  15. 11
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/operation/DutyPersonMapper.java
  16. 16
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/ticket/WorkDelayMapper.java
  17. 11
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/ticket/WorkPrincipalMapper.java
  18. 26
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/ShowScheduledTask.java
  19. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/equipment/impl/WorkshopInfoServiceImpl.java
  20. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/inspect/impl/TaskServiceImpl.java
  21. 15
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/DutyService.java
  22. 6
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/MaintenanceService.java
  23. 3
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/PhenomenonService.java
  24. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/ShowService.java
  25. 176
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/DutyServiceImpl.java
  26. 36
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/MaintenanceServiceImpl.java
  27. 39
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/PhenomenonServiceImpl.java
  28. 805
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/ShowServiceImpl.java
  29. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/safeproduct/impl/CompanyServiceImpl.java
  30. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/safeproduct/impl/InstanceServiceImpl.java
  31. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/safeproduct/impl/MonthServiceImpl.java
  32. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/safeproduct/impl/TrialServiceImpl.java
  33. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/TicketService.java
  34. 12
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/WorkDelayService.java
  35. 11
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/WorkPrincipalService.java
  36. 5
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/WorkTicketService.java
  37. 20
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/impl/TicketServiceImpl.java
  38. 21
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/impl/WorkDelayServiceImpl.java
  39. 22
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/impl/WorkPrincipalServiceImpl.java
  40. 65
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/impl/WorkTicketServiceImpl.java
  41. 4
      hzims-service/hzims-scheduled/src/main/resources/mapper/operation/DutyGroupMapper.xml
  42. 34
      hzims-service/hzims-scheduled/src/main/resources/mapper/operation/DutyMapper.xml
  43. 4
      hzims-service/hzims-scheduled/src/main/resources/mapper/operation/DutyPersonMapper.xml
  44. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/ticket/WorkDelayMapper.xml
  45. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/ticket/WorkPrincipalMapper.xml
  46. 7
      hzims-service/inspect/pom.xml
  47. 7
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/ClockController.java
  48. 7
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/ClockTypeController.java
  49. 7
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/RobotController.java
  50. 6
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ContentController.java
  51. 6
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ObjectController.java
  52. 7
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ObjectUserController.java
  53. 6
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java
  54. 6
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/TemplateController.java
  55. 6
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java
  56. 175
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/RouteController.java
  57. 6
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/report/controller/InspectReportController.java
  58. 13
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java
  59. 6
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskRecordController.java
  60. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryController.java
  61. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessStatisticsController.java
  62. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessTaskController.java
  63. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AlarmHandleController.java
  64. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectController.java
  65. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperFaultController.java
  66. 91
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IOperDefectService.java
  67. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassController.java
  68. 145
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassTypeController.java
  69. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyGroupController.java
  70. 303
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyMainController.java
  71. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecController.java
  72. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/GenerateController.java
  73. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/OtherController.java
  74. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/OverConfigController.java
  75. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/OverController.java
  76. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/PowerController.java
  77. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/RainfallController.java
  78. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/SolveController.java
  79. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/StorageController.java
  80. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/UseController.java
  81. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/OtherMapper.java
  82. 25
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/OtherMapper.xml
  83. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/HomePageController.java
  84. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/MainSystemMonitoringController.java
  85. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/scheduled/ScheduledCreateTask.java
  86. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/SideHustleServiceImpl.java
  87. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/OperMaintenanceLibraryController.java
  88. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/IOperMaintenanceTaskService.java
  89. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java
  90. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CheckMonthController.java
  91. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/DangerSourceController.java
  92. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/EmergencyPlanController.java
  93. 7
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ImsMonCameraInfoController.java
  94. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafeEquipmentTrialController.java
  95. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SystemFileController.java
  96. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/OperRepairController.java
  97. 22
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/OperationTicketController.java
  98. 8
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketInfoService.java
  99. 7
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketMeasureService.java
  100. 11
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/OperationTicketService.java
  101. Some files were not shown because too many files have changed in this diff Show More

2
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java

@ -53,7 +53,7 @@ public interface MainConstants {
String REGIONAL_DUTY_INFO = "regionalDutyInfo";
// 区域设备分类统计
String DEVICE_CLASSIFY = "deviceClassify";
String LOAD_DEVICE_CLASSIFY = "deviceClassify";
// 区域月报
String AREA_MONTH_REPORT = "areaMonthReport";

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/vo/RegularWorkVO.java → hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/RegularWorkVO.java

@ -1,4 +1,4 @@
package com.hnac.hzims.operational.maintenance.vo;
package com.hnac.hzims.operational.main.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

310
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/entity/StandardTicketInfoEntity.java

@ -20,167 +20,161 @@ import java.time.LocalDateTime;
@EqualsAndHashCode
@Data
@TableName("hzims_standard_ticket_info")
@ApiModel(value = "标准票对象",description = "标准票对象")
@ApiModel(value = "标准票对象", description = "标准票对象")
public class StandardTicketInfoEntity extends TenantEntity implements Serializable {
private static final long serialVersionUID = 8278603728783507684L;
@ApiModelProperty("票据类型")
@QueryField(condition = SqlCondition.EQUAL)
private String ticketType;
@ApiModelProperty("单位")
@QueryField(condition = SqlCondition.EQUAL)
private String company;
@ApiModelProperty("工作流ID")
@QueryField(condition = SqlCondition.EQUAL)
private String processInstanceId;
@ApiModelProperty("编号")
@QueryField(condition = SqlCondition.EQUAL)
private String code;
@ApiModelProperty("发令人")
@QueryField(condition = SqlCondition.EQUAL)
private Long issueOrderPerson;
@ApiModelProperty("受令人")
@QueryField(condition = SqlCondition.EQUAL)
private Long accessOrderPerson;
@ApiModelProperty("发令时间")
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
private LocalDateTime issueOrderTime;
@ApiModelProperty("操作开始时间")
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
private LocalDateTime startTime;
@ApiModelProperty("操作结束时间")
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
private LocalDateTime endTime;
@ApiModelProperty("操作任务")
@QueryField(condition = SqlCondition.EQUAL)
private String title;
@ApiModelProperty("任务类型")
@QueryField(condition = SqlCondition.EQUAL)
private String taskType;
@ApiModelProperty("关联业务任务ID")
private Long taskId;
@ApiModelProperty("关联业务名称")
@QueryField(condition = SqlCondition.LIKE)
private String taskName;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("监护人")
private Long guardian;
@ApiModelProperty("操作人")
private Long operator;
@ApiModelProperty("操作时间")
private LocalDateTime operateTime;
@ApiModelProperty("负责人确认时间")
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
private LocalDateTime guardianshipTime;
@ApiModelProperty("值班负责人")
private Long principal;
@ApiModelProperty("值班负责人确认时间")
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
private LocalDateTime principalTime;
@ApiModelProperty("是否评价")
private Integer isEvaluate;
/**
* AA/AAA/AAAA由建站时建站人填写必须系统验证唯一性
* 站点标识-两票编码
*/
@ApiModelProperty("站点标识-两票编码")
private String signage;
/**
* 编号原站点ID
*/
@ApiModelProperty("编号(原站点ID)")
private String signageCode;
/**
* 流程状态'
*/
@ApiModelProperty("流程状态")
private Integer flowStatus;
/**
* 流程描述
*/
@ApiModelProperty("流程描述")
private String flowDescription;
/**
* 下一个审批人
*/
@ApiModelProperty("下一个审批人")
private String nextStepOperator;
/**
* 用户Id
*/
@ApiModelProperty("用户Id")
private String flowUserId;
/**
* 当前任务名
*/
@ApiModelProperty("当前任务名")
private String flowTaskName;
private static final long serialVersionUID = 8278603728783507684L;
@ApiModelProperty("票据类型")
@QueryField(condition = SqlCondition.EQUAL)
private String ticketType;
/**
* 当前任务名
*/
@ApiModelProperty("当前任务名")
private String flowTaskId;
@ApiModelProperty("单位")
@QueryField(condition = SqlCondition.EQUAL)
private String company;
@ApiModelProperty("工作流ID")
@QueryField(condition = SqlCondition.EQUAL)
private String processInstanceId;
@ApiModelProperty("编号")
@QueryField(condition = SqlCondition.EQUAL)
private String code;
@ApiModelProperty("发令人")
@QueryField(condition = SqlCondition.EQUAL)
private Long issueOrderPerson;
@ApiModelProperty("受令人")
@QueryField(condition = SqlCondition.EQUAL)
private Long accessOrderPerson;
@ApiModelProperty("发令时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime issueOrderTime;
@ApiModelProperty("操作开始时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime startTime;
@ApiModelProperty("操作结束时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endTime;
@ApiModelProperty("操作任务")
@QueryField(condition = SqlCondition.EQUAL)
private String title;
@ApiModelProperty("任务类型")
@QueryField(condition = SqlCondition.EQUAL)
private String taskType;
@ApiModelProperty("关联业务任务ID")
private Long taskId;
@ApiModelProperty("关联业务名称")
@QueryField(condition = SqlCondition.LIKE)
private String taskName;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("监护人")
private Long guardian;
@ApiModelProperty("操作人")
private Long operator;
@ApiModelProperty("操作时间")
private LocalDateTime operateTime;
@ApiModelProperty("负责人确认时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime guardianshipTime;
@ApiModelProperty("值班负责人")
private Long principal;
@ApiModelProperty("值班负责人确认时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime principalTime;
@ApiModelProperty("是否评价")
private Integer isEvaluate;
/**
* AA/AAA/AAAA由建站时建站人填写必须系统验证唯一性
* 站点标识-两票编码
*/
@ApiModelProperty("站点标识-两票编码")
private String signage;
/**
* 编号原站点ID
*/
@ApiModelProperty("编号(原站点ID)")
private String signageCode;
/**
* 流程状态'
*/
@ApiModelProperty("流程状态")
private Integer flowStatus;
/**
* 流程描述
*/
@ApiModelProperty("流程描述")
private String flowDescription;
/**
* 下一个审批人
*/
@ApiModelProperty("下一个审批人")
private String nextStepOperator;
/**
* 用户Id
*/
@ApiModelProperty("用户Id")
private String flowUserId;
/**
* 当前任务名
*/
@ApiModelProperty("当前任务名")
private String flowTaskName;
/**
* 当前任务名
*/
@ApiModelProperty("当前任务名")
private String flowTaskId;
/**
* 项目
*/
@ApiModelProperty("项目")
private String projectName;
/**
*
*/
@ApiModelProperty("分组")
private String classGroupName;
}

67
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/entity/StandardTicketMeasureEntity.java

@ -22,49 +22,50 @@ import java.time.LocalDateTime;
* @author hx
*/
@Data
@ApiModel(value = "标准票安全措施明细",description = "标准票安全措施明细")
@ApiModel(value = "标准票安全措施明细", description = "标准票安全措施明细")
@EqualsAndHashCode
@TableName("hzims_standard_ticket_measure")
public class StandardTicketMeasureEntity extends TenantEntity implements Serializable {
private static final long serialVersionUID = 8503146008417850183L;
private static final long serialVersionUID = 8503146008417850183L;
@ApiModelProperty("标准票ID")
@QueryField(condition = SqlCondition.EQUAL)
private Long ticketId;
@ApiModelProperty("标准票ID")
@QueryField(condition = SqlCondition.EQUAL)
private Long ticketId;
@ApiModelProperty("分组")
private Long matterGroup;
@ApiModelProperty("分组")
private Long matterGroup;
@ApiModelProperty("安全措施ID")
@QueryField(condition = SqlCondition.EQUAL)
private Long measureId;
@ApiModelProperty("安全措施ID")
@QueryField(condition = SqlCondition.EQUAL)
private Long measureId;
@ApiModelProperty("安全措施")
@QueryField(condition = SqlCondition.LIKE)
private String measure;
@ApiModelProperty("安全措施")
@QueryField(condition = SqlCondition.LIKE)
private String measure;
@ApiModelProperty("执行人")
@TableField(updateStrategy = FieldStrategy.IGNORED)
@QueryField(condition = SqlCondition.EQUAL)
private Long executor;
@ApiModelProperty("执行人")
@TableField(updateStrategy = FieldStrategy.IGNORED)
@QueryField(condition = SqlCondition.EQUAL)
private Long executor;
@ApiModelProperty("执行时间")
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime executeTime;
@ApiModelProperty("执行时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime executeTime;
@ApiModelProperty("执行图片")
private String executeImgUrl;
@ApiModelProperty("执行图片")
private String executeImgUrl;
@ApiModelProperty("执行备注")
private String remark;
@ApiModelProperty("执行备注")
private String remark;
@ApiModelProperty("操作事项排序")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Integer sort;
@ApiModelProperty("操作事项排序")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Integer sort;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime operationTime;
}

3
hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpAllocationController.java

@ -67,7 +67,8 @@ public class SpAllocationController extends BladeController {
@GetMapping("/pageList")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入sp_allocation")
@OperationAnnotation(title = "调泼单",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "资产管理",
title = "调泼单",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询")
public R<IPage<SpAllocationVO>> pageList(SpAllocationVO allocationVO, Query query) {
IPage<SpAllocationVO> pages = sp_allocationService.selectPageList(Condition.getPage(query),allocationVO);

2
hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpReceiveController.java

@ -54,7 +54,7 @@ public class SpReceiveController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入sp_receive")
@OperationAnnotation(title = "工具领用",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "资产管理",title = "工具领用",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询")
public R<IPage<SpReceiveVO>> list(SpReceiveVO receiveVO, Query query) {
IPage<SpReceiveVO> pages = sp_receiveService.selectPageList(Condition.getPage(query), receiveVO);

2
hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpReceivesController.java

@ -57,7 +57,7 @@ public class SpReceivesController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入sp_receives")
@OperationAnnotation(title = "工具回退",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "资产管理",title = "工具回退",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询")
public R<IPage<SpReceivesVO>> list(SpReceivesVO sp_receives, Query query) {
IPage<SpReceivesVO> pages = sp_receivesService.selectPageList(Condition.getPage(query), sp_receives);

3
hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpWarehouseInController.java

@ -66,7 +66,8 @@ public class SpWarehouseInController extends BladeController {
@GetMapping("/pageList")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入sp_warehouse_in")
@OperationAnnotation(title = "入库单",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "资产管理",title = "入库单",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页条件")
public R<IPage<SpWarehouseInVO>> pageList(SpWarehouseInVO warehouseInVO, Query query) {
IPage<SpWarehouseInVO> pages = sp_warehouse_inService.selectPageList(Condition.getPage(query),warehouseInVO);

3
hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/SpWarehouseOutController.java

@ -54,7 +54,8 @@ public class SpWarehouseOutController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入sp_warehouse_out")
@OperationAnnotation(title = "出库单",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "资产管理",title = "出库单",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页查询")
public R<IPage<SpWarehouseOutVO>> list(SpWarehouseOutVO warehouseOutVO, Query query) {
IPage<SpWarehouseOutVO> pages = sp_warehouse_outService.selectPageList(Condition.getPage(query),warehouseOutVO);

5
hzims-service/assets/src/main/java/com/hnac/hzims/spare/controller/WtSpTotalController.java

@ -69,7 +69,8 @@ public class WtSpTotalController extends BladeController {
@GetMapping("/pageList")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入spToolVO")
@OperationAnnotation(title = "库存清单",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "资产管理",title = "库存清单",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页条件")
public R<IPage<WtSpToolVO>> pageList(WtSpToolVO spToolVO, Query query) {
IPage<WtSpToolVO> pages = SP_TOTALService.selectSpToolList(Condition.getPage(query),spToolVO);
@ -81,7 +82,7 @@ public class WtSpTotalController extends BladeController {
@GetMapping("/warnPageList")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "库存预警列表", notes = "传入spToolVO")
@OperationAnnotation(title = "库存预警",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "资产管理",title = "库存预警",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询")
public R<IPage<WtSpToolVO>> warnPageList(WtSpToolVO spToolVO, Query query) {
IPage<WtSpToolVO> pages = SP_TOTALService.warnPageList(Condition.getPage(query),spToolVO);

6
hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpDeviceController.java

@ -2,6 +2,9 @@ package com.hnac.hzims.fdp.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.equipment.entity.EmTreeNode;
import com.hnac.hzims.fdp.dto.FdpDeviceDTO;
import com.hnac.hzims.fdp.entity.FdpDeviceEntity;
@ -79,6 +82,9 @@ public class FdpDeviceController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 100)
@ApiOperation(value = "自定义分页 FDP设备列表")
@OperationAnnotation(moduleName = "智能诊断",title = "智能诊断配置",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页条件")
public R<IPage<FdpDeviceVO>> list(FdpDeviceDTO entity, Query query) {
return service.doList(Condition.getPage(query), entity);
}

2
hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpMonitorController.java

@ -151,7 +151,7 @@ public class FdpMonitorController extends BladeController {
@GetMapping("/listPage")
@ApiOperationSupport(order = 110)
@ApiOperation(value = "查询监测点列表")
@OperationAnnotation(moduleName = "智能诊断",title = "监测点绑定",operatorType = OperatorType.MOBILE,businessType =
@OperationAnnotation(moduleName = "智能诊断",title = "智能诊断配置",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页查询")
public R<IPage<FdpMonitorEntity>> listPage(FdpMonitorEntity entity, Query query) {

27
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/operation/DutyGroupMapper.java

@ -0,0 +1,27 @@
package com.hnac.hzims.scheduled.mapper.operation;
import com.hnac.hzims.operational.duty.entity.ImsDutyGroupEntity;
import org.apache.ibatis.annotations.Param;
import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List;
/**
* Mapper 接口
*
* @author Chill
*/
public interface DutyGroupMapper extends UserDataScopeBaseMapper<ImsDutyGroupEntity> {
/**
* 根据班组ID修改负责人为null
* @param id
* @return
*/
int updateManagerIdById(Long id);
@UserDataAuth
List<ImsDutyGroupEntity> selectDutyGroupJoinDutyMain(@Param("startDate") String startDate, @Param("endDate") String endDate);
}

20
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/operation/DutyMapper.java

@ -0,0 +1,20 @@
package com.hnac.hzims.scheduled.mapper.operation;
import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity;
import com.hnac.hzims.operational.duty.vo.DutyInfoVo;
import com.hnac.hzims.operational.duty.vo.DutyMainInfoVo;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List;
/**
* @author ysj
*/
public interface DutyMapper extends UserDataScopeBaseMapper<ImsDutyMainEntity> {
List<DutyInfoVo> dutyData(List<Long> collect);
DutyMainInfoVo queryDuty(Long preDutyId);
DutyMainInfoVo selectDuty(Long preDutyId);
}

11
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/operation/DutyPersonMapper.java

@ -0,0 +1,11 @@
package com.hnac.hzims.scheduled.mapper.operation;
import com.hnac.hzims.operational.duty.entity.ImsDutyMainPersonEntity;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
/**
* @author ysj
*/
public interface DutyPersonMapper extends UserDataScopeBaseMapper<ImsDutyMainPersonEntity> {
}

16
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/ticket/WorkDelayMapper.java

@ -0,0 +1,16 @@
package com.hnac.hzims.scheduled.mapper.ticket;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketDelayEntity;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
/**
* <p>
* 工作票延期 Mapper 接口
* </p>
*
* @author hx
* @since 2021-10-22
*/
public interface WorkDelayMapper extends UserDataScopeBaseMapper<WorkTicketDelayEntity> {
}

11
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/ticket/WorkPrincipalMapper.java

@ -0,0 +1,11 @@
package com.hnac.hzims.scheduled.mapper.ticket;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketPrincipalChangeEntity;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
/**
* @author ysj
*/
public interface WorkPrincipalMapper extends UserDataScopeBaseMapper<WorkTicketPrincipalChangeEntity> {
}

26
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/ShowScheduledTask.java

@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
import java.util.Date;
import static com.hnac.hzims.operational.main.constant.MainConstants.LOAD_HOME_TARGET;
import static com.hnac.hzims.operational.main.constant.MainConstants.*;
/**
@ -35,4 +35,28 @@ public class ShowScheduledTask {
service.loadHomeTarget(param);
return new ReturnT<>("SUCCESS");
}
/**
* 首页-区域班组数据
*/
@XxlJob(REGIONAL_DUTY_INFO)
public ReturnT<String> loadRegionalDuty(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss");
}
service.loadRegionalDuty(param);
return new ReturnT<>("SUCCESS");
}
/**
* 首页-区域设备分类统计
*/
@XxlJob(LOAD_DEVICE_CLASSIFY)
public ReturnT<String> loaddDeviceClassify(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss");
}
service.loaddDeviceClassify(param);
return new ReturnT<>("SUCCESS");
}
}

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/equipment/impl/WorkshopInfoServiceImpl.java

@ -18,4 +18,4 @@ import org.springframework.stereotype.Service;
@DS("equipment")
public class WorkshopInfoServiceImpl extends BaseServiceImpl<WorkshopInfoMapper, WorkshopInfoEntity> implements WorkshopInfoService {
}
}

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/inspect/impl/TaskServiceImpl.java

@ -1,5 +1,6 @@
package com.hnac.hzims.scheduled.service.inspect.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.scheduled.mapper.inspect.TaskMapper;
import com.hnac.hzims.scheduled.service.inspect.TaskService;
@ -21,6 +22,7 @@ import java.util.stream.Collectors;
@Service
@Slf4j
@AllArgsConstructor
@DS("inspect")
public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, TaskEntity> implements TaskService {
/**

15
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/DutyService.java

@ -0,0 +1,15 @@
package com.hnac.hzims.scheduled.service.operation;
import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity;
import com.hnac.hzims.operational.duty.vo.DutyInfoVo;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
* @author ysj
*/
public interface DutyService extends BaseService<ImsDutyMainEntity> {
List<DutyInfoVo> dutyData(List<Long> collect);
}

6
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/MaintenanceService.java

@ -1,9 +1,11 @@
package com.hnac.hzims.scheduled.service.operation;
import com.hnac.hzims.operational.main.vo.MaintainVo;
import com.hnac.hzims.operational.main.vo.RegularWorkVO;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceTaskEntity;
import org.springblade.core.mp.base.BaseService;
import java.util.Date;
import java.util.List;
/**
@ -12,7 +14,9 @@ import java.util.List;
public interface MaintenanceService extends BaseService<OperMaintenanceTaskEntity> {
// 查询当年日常维护数量
Integer maintenanceCount(List<Long> departList);
Integer maintenanceCount(List<Long> areas);
MaintainVo maintain(String start, String end, List<Long> areas);
RegularWorkVO regularWork(Date start, Date end, List<Long> areas);
}

3
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/PhenomenonService.java

@ -1,6 +1,7 @@
package com.hnac.hzims.scheduled.service.operation;
import com.hnac.hzims.operational.defect.entity.OperPhenomenonEntity;
import com.hnac.hzims.operational.main.vo.ShortagesVo;
import com.hnac.hzims.operational.report.vo.DutyDefectVO;
import org.springblade.core.mp.base.BaseService;
@ -12,4 +13,6 @@ import java.util.List;
public interface PhenomenonService extends BaseService<OperPhenomenonEntity> {
DutyDefectVO defect(String start, String end, List<Long> areas);
ShortagesVo defectMonth(String start, String end, List<Long> list);
}

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/ShowService.java

@ -6,4 +6,8 @@ package com.hnac.hzims.scheduled.service.operation;
public interface ShowService {
void loadHomeTarget(String param);
void loadRegionalDuty(String param);
void loaddDeviceClassify(String param);
}

176
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/DutyServiceImpl.java

@ -0,0 +1,176 @@
package com.hnac.hzims.scheduled.service.operation.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.operational.duty.entity.ImsDutyGroupEntity;
import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity;
import com.hnac.hzims.operational.duty.entity.ImsDutyMainPersonEntity;
import com.hnac.hzims.operational.duty.vo.DutyInfoVo;
import com.hnac.hzims.operational.duty.vo.DutyMainInfoVo;
import com.hnac.hzims.operational.duty.vo.NextDutyInfoVo;
import com.hnac.hzims.scheduled.mapper.operation.DutyGroupMapper;
import com.hnac.hzims.scheduled.mapper.operation.DutyMapper;
import com.hnac.hzims.scheduled.mapper.operation.DutyPersonMapper;
import com.hnac.hzims.scheduled.service.operation.DutyService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.user.cache.UserCache;
import org.springblade.system.user.entity.User;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author ysj
*/
@Service
@AllArgsConstructor
@Slf4j
public class DutyServiceImpl extends BaseServiceImpl<DutyMapper, ImsDutyMainEntity> implements DutyService {
private final DutyPersonMapper dutyPersonMapper;
private final DutyGroupMapper dutyGroupMapper;
@Override
public List<DutyInfoVo> dutyData(List<Long> collect) {
if (CollectionUtil.isEmpty(collect)) {
return null;
}
// 查询区域当前值班
List<DutyInfoVo> dutyInfoVoList = this.baseMapper.dutyData(collect);
if (CollectionUtil.isEmpty(dutyInfoVoList)) {
return null;
}
//修改数据结构后:分灵活排班和班组排班拿负责人
dutyInfoVoList = dutyInfoVoList.stream().peek(s -> {
if (null == s.getGroupId()) {
ImsDutyMainPersonEntity imsDutyMainPersonEntity = dutyPersonMapper.selectOne(new LambdaQueryWrapper<ImsDutyMainPersonEntity>() {{
eq(ImsDutyMainPersonEntity::getDutyMainId, s.getId());
last(" limit 1");
}});
s.setManagerId(imsDutyMainPersonEntity.getDutyChargePerson().toString());
} else {
ImsDutyGroupEntity imsDutyGroupEntity = dutyGroupMapper.selectById(s.getGroupId());
s.setGroupName(imsDutyGroupEntity.getGroupName());
s.setManagerId(imsDutyGroupEntity.getManagerId().toString());
}
}).collect(Collectors.toList());
dutyInfoVoList.forEach(item -> {
// 负责人
User user = UserCache.getUser(Long.valueOf(item.getManagerId()));
if (ObjectUtil.isNotEmpty(user)) {
item.setManagerName(user.getName());
item.setManagerPhone(user.getPhone());
}
// FIXME 上网
item.setOnlineCapacity(0.0);
// 发电量
item.setGeneratingCapacity(0);
// 上一班组
NextDutyInfoVo upDutyInfoVo = this.getUpDutyInfo(item);
item.setUpDutyInfoVo(upDutyInfoVo);
// 下一班组
NextDutyInfoVo nextDutyInfoVo = this.getNextDutyInfo(item);
item.setNextDutyInfoVo(nextDutyInfoVo);
});
return dutyInfoVoList;
}
/**
* 获取上一班组
*
* @param item
* @return
*/
private NextDutyInfoVo getUpDutyInfo(DutyInfoVo item) {
if(ObjectUtil.isEmpty(item.getPreDutyId())){
return null;
}
DutyMainInfoVo dutyMainInfoVo = this.baseMapper.queryDuty(item.getPreDutyId());
if (null == dutyMainInfoVo.getDutyGroupId()) {
ImsDutyMainPersonEntity imsDutyMainPersonEntity = dutyPersonMapper.selectOne(new LambdaQueryWrapper<ImsDutyMainPersonEntity>() {{
eq(ImsDutyMainPersonEntity::getDutyMainId, dutyMainInfoVo.getId());
last(" LIMIT 1");
}});
dutyMainInfoVo.setManagerId(imsDutyMainPersonEntity.getDutyChargePerson().toString());
} else {
ImsDutyGroupEntity imsDutyGroupEntity = dutyGroupMapper.selectById(dutyMainInfoVo.getDutyGroupId());
dutyMainInfoVo.setGroupName(imsDutyGroupEntity.getGroupName());
dutyMainInfoVo.setDutyGroupId(imsDutyGroupEntity.getId());
dutyMainInfoVo.setManagerId(imsDutyGroupEntity.getManagerId().toString());
}
if (ObjectUtil.isEmpty(dutyMainInfoVo)) {
return null;
}
// 赋值
NextDutyInfoVo dutyInfoVo = new NextDutyInfoVo();
dutyInfoVo.setGroupName(dutyMainInfoVo.getGroupName());
dutyInfoVo.setClassName(dutyMainInfoVo.getClassName());
dutyInfoVo.setDateTime(dutyMainInfoVo.getDateTime());
dutyInfoVo.setStartTime(dutyMainInfoVo.getStartTime());
dutyInfoVo.setEndTime(dutyMainInfoVo.getEndTime());
// 负责人
User user = UserCache.getUser(Long.valueOf(dutyMainInfoVo.getManagerId()));
if (ObjectUtil.isNotEmpty(user)) {
dutyInfoVo.setManagerName(user.getName());
dutyInfoVo.setManagerPhone(user.getPhone());
}
// 发电量
dutyInfoVo.setGeneratingCapacity(0);
return dutyInfoVo;
}
/**
* 获取下一班组
*
* @param item
* @return
*/
private NextDutyInfoVo getNextDutyInfo(DutyInfoVo item) {
DutyMainInfoVo dutyMainInfoVo = this.nextDuty(item.getId());
if (ObjectUtil.isEmpty(dutyMainInfoVo)) {
return null;
}
// 赋值
NextDutyInfoVo dutyInfoVo = new NextDutyInfoVo();
dutyInfoVo.setGroupName(dutyMainInfoVo.getGroupName());
dutyInfoVo.setClassName(dutyMainInfoVo.getClassName());
// 负责人
User user = UserCache.getUser(Long.valueOf(dutyMainInfoVo.getManagerId()));
if (ObjectUtil.isNotEmpty(user)) {
dutyInfoVo.setManagerName(user.getName());
dutyInfoVo.setManagerPhone(user.getPhone());
}
dutyInfoVo.setGeneratingCapacity(0);
return dutyInfoVo;
}
/**
* 下一班组
* @param parentId
* @return
*/
public DutyMainInfoVo nextDuty(Long parentId) {
DutyMainInfoVo dutyMainInfoVo = this.baseMapper.selectDuty(parentId);
if(ObjectUtil.isEmpty(dutyMainInfoVo)){
return new DutyMainInfoVo();
}
if (null == dutyMainInfoVo.getDutyGroupId()) {
ImsDutyMainPersonEntity imsDutyMainPersonEntity = dutyPersonMapper.selectOne(new LambdaQueryWrapper<ImsDutyMainPersonEntity>() {{
eq(ImsDutyMainPersonEntity::getDutyMainId, dutyMainInfoVo.getId());
last("limit 1");
}});
dutyMainInfoVo.setManagerId(imsDutyMainPersonEntity.getDutyChargePerson().toString());
} else {
ImsDutyGroupEntity imsDutyGroupEntity = dutyGroupMapper.selectById(dutyMainInfoVo.getDutyGroupId());
dutyMainInfoVo.setGroupName(imsDutyGroupEntity.getGroupName());
dutyMainInfoVo.setDutyGroupId(imsDutyGroupEntity.getId());
dutyMainInfoVo.setManagerId(imsDutyGroupEntity.getManagerId().toString());
}
return dutyMainInfoVo;
}
}

36
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/MaintenanceServiceImpl.java

@ -2,6 +2,7 @@ package com.hnac.hzims.scheduled.service.operation.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.operational.main.vo.MaintainVo;
import com.hnac.hzims.operational.main.vo.RegularWorkVO;
import com.hnac.hzims.operational.maintenance.constants.MaintenanceConstant;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceTaskEntity;
import com.hnac.hzims.scheduled.mapper.operation.MaintenanceMapper;
@ -16,6 +17,7 @@ import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@ -84,5 +86,39 @@ public class MaintenanceServiceImpl extends BaseServiceImpl<MaintenanceMapper, O
return maintainVo;
}
/**
* 查询日常维护-定期工作类型数据
* @param start
* @param end
* @param areas
* @return
*/
@Override
public RegularWorkVO regularWork(Date start, Date end, List<Long> areas) {
RegularWorkVO regularWorkVO = new RegularWorkVO();
// 查询定期工作任务
List<OperMaintenanceTaskEntity> regularWorkList = this.list(new LambdaQueryWrapper<OperMaintenanceTaskEntity>() {{
ge(OperMaintenanceTaskEntity::getDisposeTime, start)
.le(OperMaintenanceTaskEntity::getDisposeTime, end)
.eq(OperMaintenanceTaskEntity::getTypeCode, "05")
.in(OperMaintenanceTaskEntity::getCreateDept, areas);
}});
if (CollectionUtil.isEmpty(regularWorkList)) {
regularWorkVO.setRegularWorkSum(0);
regularWorkVO.setRegularWork(0);
return regularWorkVO;
}
regularWorkVO.setMainTaskIds(regularWorkList.stream().map(OperMaintenanceTaskEntity::getId).map(id -> id.toString()).collect(Collectors.joining(",")));
regularWorkVO.setRegularWorkSum(regularWorkList.size());
// 定期工作任务完成数量
List<OperMaintenanceTaskEntity> regularWorkFinishList = regularWorkList.stream().filter(o -> MaintenanceConstant.TASK_STATUS_5 == o.getStatus()).collect(Collectors.toList());
if (CollectionUtil.isEmpty(regularWorkFinishList)) {
regularWorkVO.setRegularWork(0);
return regularWorkVO;
}
regularWorkVO.setRegularWork(regularWorkFinishList.size());
return regularWorkVO;
}
}

39
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/PhenomenonServiceImpl.java

@ -2,6 +2,7 @@ package com.hnac.hzims.scheduled.service.operation.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.operational.defect.entity.OperPhenomenonEntity;
import com.hnac.hzims.operational.main.vo.ShortagesVo;
import com.hnac.hzims.operational.report.vo.DutyDefectVO;
import com.hnac.hzims.scheduled.mapper.operation.PhenomenonMapper;
import com.hnac.hzims.scheduled.service.operation.PhenomenonService;
@ -12,6 +13,9 @@ import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List;
import java.util.stream.Collectors;
@ -57,4 +61,39 @@ public class PhenomenonServiceImpl extends BaseServiceImpl<PhenomenonMapper, Ope
defectVO.setDefect(defectList.size());
return defectVO;
}
/**
* 查询当月机构缺陷数据
* @param start
* @param end
* @param list
* @return
*/
@Override
public ShortagesVo defectMonth(String start, String end, List<Long> list) {
ShortagesVo shortagesVo = new ShortagesVo();
LocalDate firstDay = LocalDate.now().withDayOfMonth(1);
LocalDateTime firstDateTime = LocalDateTime.of(firstDay, LocalTime.MIN);
LocalDateTime now = LocalDateTime.now();
// 消缺总数
List<OperPhenomenonEntity> defects = this.list(new LambdaQueryWrapper<OperPhenomenonEntity>(){{
ge(OperPhenomenonEntity::getCreateTime,firstDateTime);
le(OperPhenomenonEntity::getCreateTime,now);
in(OperPhenomenonEntity::getCreateDept,list);
}});
if(CollectionUtil.isEmpty(defects)){
shortagesVo.setShortagesSum(0);
shortagesVo.setShortages(0);
return shortagesVo;
}
// 消缺数
shortagesVo.setShortagesSum(defects.size());
List<Long> shortagesList = defects.stream().filter(o -> (Func.isNotEmpty(o.getIsDefect()) && o.getIsDefect() == 0) || "1".equals(o.getConclusionStatus())).
map(OperPhenomenonEntity::getId).collect(Collectors.toList());
if(CollectionUtil.isEmpty(shortagesList)){
shortagesVo.setShortages(0);
}
shortagesVo.setShortages(shortagesList.size());
return shortagesVo;
}
}

805
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/ShowServiceImpl.java

@ -1,26 +1,41 @@
package com.hnac.hzims.scheduled.service.operation.impl;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.hnac.hzims.EquipmentConstants;
import com.hnac.hzims.equipment.entity.PlanGenerationEntity;
import com.hnac.hzims.equipment.vo.EminfoAndEmParamVo;
import com.hnac.hzims.operational.access.constants.AccessConstants;
import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity;
import com.hnac.hzims.operational.defect.constants.DefectConstant;
import com.hnac.hzims.operational.defect.entity.OperPhenomenonEntity;
import com.hnac.hzims.operational.duty.vo.DutyInfoVo;
import com.hnac.hzims.operational.duty.vo.DutyTaskVo;
import com.hnac.hzims.operational.duty.vo.NextDutyInfoVo;
import com.hnac.hzims.operational.fill.entity.*;
import com.hnac.hzims.operational.main.constant.HomePageConstant;
import com.hnac.hzims.operational.main.vo.*;
import com.hnac.hzims.operational.report.vo.DutyDefectVO;
import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.scheduled.service.equipment.PlanService;
import com.hnac.hzims.scheduled.service.inspect.TaskService;
import com.hnac.hzims.scheduled.service.operation.*;
import com.hnac.hzims.scheduled.service.ticket.TicketService;
import com.hnac.hzims.scheduled.service.ticket.WorkTicketService;
import com.hnac.hzims.ticket.allTicket.vo.DoublePassRateVO;
import com.hnac.hzims.ticket.workTicket.vo.TicketMonthVO;
import com.hnac.hzims.ticket.workTicket.vo.WorkTicketStatisticVO;
import com.hnac.hzinfo.datasearch.analyse.IAnalyseInstanceClient;
import com.hnac.hzinfo.inspect.task.vo.DutyInspectTaskVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.MapUtils;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.core.tool.utils.*;
import org.springblade.system.cache.DictCache;
import org.springblade.system.entity.Dept;
import org.springblade.system.feign.ISysClient;
@ -36,11 +51,11 @@ import java.math.BigDecimal;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.sql.Time;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Date;
import java.util.List;
import java.util.*;
import java.util.concurrent.*;
import java.util.stream.Collectors;
@ -52,6 +67,7 @@ import java.util.stream.Collectors;
@Slf4j
public class ShowServiceImpl implements ShowService {
private final TaskService taskService;
private final OverService overService;
private final PlanService planService;
private final PowerService powerService;
@ -60,12 +76,16 @@ public class ShowServiceImpl implements ShowService {
private final AccessService accessService;
private final TicketService ticketService;
private final DefectService defectService;
private final DutyService dutyService;
private final StationService stationService;
private final OverDetailsService detailsService;
private final WorkTicketService workTicketService;
private final PhenomenonService phenomenonService;
private final AnalyseDataService analyseDataService;
private final MaintenanceService maintenanceService;
private final RedisTemplate redisTemplate;
private final ISysClient sysClient;
private final IAnalyseInstanceClient deviceInstanceClient;
private final static String charge = "hzims:operation:key:charge";
private final static String home_target_cache_final = "load:operation:home:target:key";
@ -77,6 +97,18 @@ public class ShowServiceImpl implements ShowService {
@Value("${hzims.operation.homePage.charge.url}")
public String charge_url;
@Value("${hzims.equipment.emInfo.emInfoList}")
public String device_cache_cofig_final;
@Value("${hzims.operation.region.areaDutyInfoKey}")
private String area_duty_cache_final;
@Value("${hzims.operation.region.deviceClassifyKey}")
private String device_classify_cache_final;
@Value("${hzims.operation.realIdKey}")
public String real_cache_final;
/**
* 集团总指标-首页数据
*/
@ -112,6 +144,64 @@ public class ShowServiceImpl implements ShowService {
redisTemplate.opsForValue().set(home_target_cache_final,targets.stream().filter(( target -> ObjectUtil.isNotEmpty(target.getType()))).collect(Collectors.toList()));
}
/**
* 智能生产-值班数据
* @param param
*/
@Override
public void loadRegionalDuty(String param) {
R<List<Dept>> R = sysClient.getDeptList();
if (!R.isSuccess() || CollectionUtil.isEmpty(R.getData())) {
return;
}
Map<Dept,List<StationEntity>> map = this.area(R.getData(),null, Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE);
if (MapUtils.isEmpty(map)) {
return;
}
// 查询所有区域值班/接班数据
List<DutyInfoVo> dutyInfoVoList = dutyService.dutyData(map.keySet().stream().map(Dept::getId).collect(Collectors.toList()));
if(CollectionUtil.isEmpty(dutyInfoVoList)){
return;
}
// 所有设备
List<EminfoAndEmParamVo> devices = JSONObject.parseObject(redisTemplate.opsForValue().get(device_cache_cofig_final).toString(), new TypeReference<List<EminfoAndEmParamVo>>() {});
List<AreaDutyVo> areaDutyVoList = new ArrayList<>();
map.forEach((key,value) -> {
List<Long> singlet = Collections.singletonList(key.getId());
AreaDutyVo areaDutyVo = new AreaDutyVo();
areaDutyVo.setDepartId(key.getId());
areaDutyVo.setDepartName(key.getDeptName());
areaDutyVo.setSort(key.getSort());
// 值班情况
this.dutySituation(dutyInfoVoList, key, areaDutyVo);
// 厂站运行情况
this.factoryStationRun(devices, value, areaDutyVo);
// 当月任务执行情况
this.executeTaskMonth(singlet, areaDutyVo);
// 获取区域当班时间
List<DutyInfoVo> dutyList = dutyInfoVoList.stream().filter(o -> key.getId().equals(o.getCreateDept())).collect(Collectors.toList());
if (CollectionUtil.isEmpty(dutyList)) {
areaDutyVoList.add(areaDutyVo);
return;
}
Date startDate = this.dutyStartTime(dutyList.get(0).getDateTime(),dutyList.get(0).getStartTime());
Date endDate = this.dutyEndTime(dutyList.get(0).getDateTime(),dutyList.get(0).getStartTime(),dutyList.get(0).getEndTime());
areaDutyVo.setStartTimeDuty(DateUtil.format(startDate,DateUtil.PATTERN_DATETIME));
areaDutyVo.setEndTimeDuty(DateUtil.format(endDate,DateUtil.PATTERN_DATETIME));
// 上一班组发电量
this.upDutyPower(dutyList,devices,key.getId(),value,areaDutyVo);
// 班组实时发电量
this.dutyPower(startDate,endDate,devices,value,areaDutyVo,false);
// 当班双票
this.dutyDoubleTicket(startDate,endDate,singlet,areaDutyVo);
// 当班运行数据
this.dutyRunCondition(startDate,endDate,singlet,areaDutyVo);
areaDutyVoList.add(areaDutyVo);
});
redisTemplate.opsForValue().set(area_duty_cache_final, areaDutyVoList);
}
/**
* 水电站指标
* @return
@ -160,6 +250,55 @@ public class ShowServiceImpl implements ShowService {
return target;
}
/**
* 设备分类
*
* @param param
*/
@Override
public void loaddDeviceClassify(String param) {
// 获取所有设备
List<EminfoAndEmParamVo> devices = JSONObject.parseObject(redisTemplate.opsForValue().get(device_cache_cofig_final).toString(), new TypeReference<List<EminfoAndEmParamVo>>() {});
// 实时数据
String json = (String) redisTemplate.opsForValue().get(real_cache_final);
Map<String, String> realMap = null;
if (StringUtil.isNotBlank(json)) {
realMap = JSONObject.parseObject(json, new TypeReference<Map<String, String>>() {});
}
Map<String,List<String>> deviceClassifyMap = new HashMap<>();
List<String> deviceCodeList = devices.stream().map(EminfoAndEmParamVo::getEmCode).collect(Collectors.toList());
// 故障
List<OperPhenomenonEntity> operPhenomenonEntityList = phenomenonService.list(new QueryWrapper<OperPhenomenonEntity>() {{
in("EM_CODE", deviceCodeList);
ne("IS_DEFECT", DefectConstant.IsDefectStatusEnum.IS_DEFECT.getStatus());
ne("CONCLUSION_STATUS", DefectConstant.HandlerStatusEnum.FINISH_STATUS.getStatus());
}});
List<String> faultList = operPhenomenonEntityList.stream().map(OperPhenomenonEntity::getEmCode).distinct().collect(Collectors.toList());
deviceClassifyMap.put(HomePageConstant.FAULT,faultList);
// 检修
List<OperAccessTaskEntity> operAccessTaskEntityList = accessService.list(new QueryWrapper<OperAccessTaskEntity>() {{
in("EM_CODE", deviceCodeList);
ne("STATUS", AccessConstants.ACCESS_TASK_STATUS_4);
}});
List<String> overhaulList = operAccessTaskEntityList.stream().map(OperAccessTaskEntity::getEmCode).distinct().collect(Collectors.toList());
List<String> overhaulOldList = devices.stream().filter(o-> !faultList.contains(o.getEmCode()) && !overhaulList.contains(o.getEmCode()) && (Func.isNotEmpty(o.getRunStatus()) && EquipmentConstants.RunStatus.access.getStatus().equals(o.getRunStatus())))
.map(EminfoAndEmParamVo::getEmCode).collect(Collectors.toList());
overhaulList.addAll(overhaulOldList);
deviceClassifyMap.put(HomePageConstant.OVERHAUL,overhaulList);
// 运行
List<EminfoAndEmParamVo> runDeviceList = devices.stream().filter(o-> !faultList.contains(o.getEmCode()) && !overhaulList.contains(o.getEmCode())).distinct().collect(Collectors.toList());
List<String> runList = this.runDevice(runDeviceList,realMap);
deviceClassifyMap.put(HomePageConstant.RUN,runList);
// 备用
List<String> spareList = devices.stream().filter(o-> !faultList.contains(o.getEmCode()) && !overhaulList.contains(o.getEmCode()) && !runList.contains(o.getEmCode()) && Func.isNotEmpty(o.getRunStatus())
&& EquipmentConstants.RunStatus.spare.getStatus().equals(o.getRunStatus()))
.map(EminfoAndEmParamVo::getEmCode).distinct().collect(Collectors.toList());
deviceClassifyMap.put(HomePageConstant.SPARE,spareList);
redisTemplate.opsForValue().set(device_classify_cache_final, deviceClassifyMap);
}
/**
* 风电指标
* @return
@ -477,4 +616,656 @@ public class ShowServiceImpl implements ShowService {
}
return stringBuilder.toString();
}
/**
* 获取权限区域
* @param list : 机构列表
* @param deptId : 起始过滤权限机构
* @param typeList : 查询站点类型-水电水利光伏....
* @param serveType : 站点服务类型
* @return Map<Dept, List<StationEntity>>
*/
private Map<Dept, List<StationEntity>> area(List<Dept> list,Long deptId, List<Integer> typeList, Integer serveType) {
// 未传入机构列表,使用用户权限机构过滤
if(CollectionUtil.isEmpty(list)){
R<List<Dept>> R = sysClient.getDeptByCurrentUser();
if(!R.isSuccess() || CollectionUtil.isEmpty(R.getData())){
return null;
}
list = R.getData();
}
// 根据参数查询有效站点
List<StationEntity> stationList = this.stationByParams(list,deptId,typeList,serveType);
if(CollectionUtil.isEmpty(stationList)){
return null;
}
// 有效站点归属机构Id集合
List<Long> refDeptList = stationList.stream().map(StationEntity::getRefDept).collect(Collectors.toList());
if(CollectionUtil.isEmpty(refDeptList)){
return null;
}
// 有效站点归属机构集合
List<Dept> vaildDeptList = list.stream().filter(o->refDeptList.contains(o.getId())).collect(Collectors.toList());
if(CollectionUtil.isEmpty(vaildDeptList)){
return null;
}
// 根据有效站点归属机构向上区域Id
List<Long> areaIdList = vaildDeptList.stream().map(Dept::getParentId).distinct().collect(Collectors.toList());
if(CollectionUtil.isEmpty(areaIdList)){
return null;
}
// 根据区域Id查询区域机构
List<Dept> areaList = list.stream().filter(o->o.getDeptCategory().equals(HomePageConstant.AREA) && areaIdList.contains(o.getId())).collect(Collectors.toList());
if(CollectionUtil.isEmpty(areaList)){
return null;
}
// 返回结构
Map<Dept, List<StationEntity>> result = new HashMap<>();
for(Dept area : areaList){
List<Long> childDeptIdList = list.stream().filter(o->o.getParentId().equals(area.getId())).map(Dept::getId).collect(Collectors.toList());
if(CollectionUtil.isEmpty(childDeptIdList)){
continue;
}
List<StationEntity> resultList = stationList.stream().filter(o->childDeptIdList.contains(o.getRefDept())).collect(Collectors.toList());
result.put(area,resultList);
}
return result;
}
/**
* 获取站点集合
* @param authList
* @param deptId
* @param types
* @param servrType
* @return
*/
private List<StationEntity> stationByParams(List<Dept> authList, Long deptId, List<Integer> types, Integer servrType) {
Dept dept;
if (null == deptId) {
// 最小类型机构
Optional<Dept> min = authList.stream().min(Comparator.comparing(Dept::getDeptCategory));
dept = min.orElse(null);
if (ObjectUtil.isEmpty(dept)) {
return null;
}
} else {
// 检查是否存在传入机构
List<Dept> list = authList.stream().filter(o -> deptId.equals(o.getId())).collect(Collectors.toList());
if (CollectionUtil.isEmpty(list)) {
return null;
}
// 传入机构为站点
dept = list.get(0);
}
List<Long> depts;
if (dept.getDeptCategory().equals(4)) {
depts = Collections.singletonList(dept.getId());
// 传入机构为区域、省子公司、集团
} else {
// 递归权限机构获取站点级机构
depts = this.stationDept(authList, dept.getId(), new ArrayList<>());
}
// 获取水利站点(过滤其他站点类型)
return stationService.list(new LambdaQueryWrapper<StationEntity>() {{
eq(StationEntity::getIsDeleted, 0);
if (ObjectUtil.isNotEmpty(servrType)) {
eq(StationEntity::getServeType, servrType);
}
if (CollectionUtil.isNotEmpty(types)) {
in(StationEntity::getType, types);
}
if (CollectionUtil.isNotEmpty(depts)) {
in(StationEntity::getRefDept, depts);
}
}});
}
/**
* 递归权限机构获取站点级机构
*
* @param departList
* @param deptId
* @param list
* @return
*/
private List<Long> stationDept(List<Dept> departList, Long deptId, List<Long> list) {
if (null == deptId || CollectionUtil.isEmpty(departList)) {
return null;
}
departList.forEach(dept -> {
if (dept.getParentId().equals(deptId)) {
if (dept.getDeptCategory().equals(4)) {
list.add(dept.getId());
}
stationDept(departList, dept.getId(), list);
}
});
return list;
}
/**
* 获取开始时间
* @param date
* @param time
* @return
*/
private Date dutyStartTime(Date date, Time time){
Calendar dateCal = Calendar.getInstance();
dateCal.setTime(date);
Calendar timeCal = Calendar.getInstance();
timeCal.setTime(time);
dateCal.set(Calendar.HOUR_OF_DAY, timeCal.get(Calendar.HOUR_OF_DAY));
dateCal.set(Calendar.MINUTE, timeCal.get(Calendar.MINUTE));
dateCal.set(Calendar.SECOND, timeCal.get(Calendar.SECOND));
return dateCal.getTime();
}
/**
* 获取结束时间
* @param date
* @param time
* @return
*/
private Date dutyEndTime(Date date, Time time,Time endTime){
Calendar dateCal = Calendar.getInstance();
dateCal.setTime(date);
Calendar timeCal = Calendar.getInstance();
timeCal.setTime(time);
Calendar endCal = Calendar.getInstance();
endCal.setTime(endTime);
// 结束时间 < 开始时间
if(timeCal.after(endCal)){
dateCal.set(Calendar.DAY_OF_MONTH, dateCal.get(Calendar.DAY_OF_MONTH) + 1 );
}
dateCal.set(Calendar.HOUR_OF_DAY, endCal.get(Calendar.HOUR_OF_DAY));
dateCal.set(Calendar.MINUTE, endCal.get(Calendar.MINUTE));
dateCal.set(Calendar.SECOND, endCal.get(Calendar.SECOND));
return dateCal.getTime();
}
/**
* 值班情况
*
* @param dutyInfoVoList
* @param dept
* @param areaDutyVo
*/
private void dutySituation(List<DutyInfoVo> dutyInfoVoList, Dept dept, AreaDutyVo areaDutyVo) {
if (CollectionUtil.isEmpty(dutyInfoVoList) || ObjectUtil.isEmpty(dept)) {
return;
}
Long deptId = dept.getId();
List<DutyInfoVo> filterList = dutyInfoVoList.stream().filter(o -> o.getCreateDept().equals(deptId)).collect(Collectors.toList());
if (CollectionUtil.isEmpty(filterList)) {
return;
}
DutyInfoVo dutyInfoVo = filterList.get(0);
areaDutyVo.setGeneratingCapacity(dutyInfoVo.getGeneratingCapacity());
areaDutyVo.setOnlineCapacity(dutyInfoVo.getOnlineCapacity());
areaDutyVo.setClassName(dutyInfoVo.getClassName());
areaDutyVo.setGroupName(dutyInfoVo.getGroupName());
areaDutyVo.setManagerName(dutyInfoVo.getManagerName());
areaDutyVo.setManagerPhone(dutyInfoVo.getManagerPhone());
areaDutyVo.setNextDutyInfoVo(dutyInfoVo.getNextDutyInfoVo());
// 当班任务
String taskCount = this.taskCount(dutyInfoVo.getDateTime(),dutyInfoVo.getStartTime(),dutyInfoVo.getEndTime(),dutyInfoVo.getCreateDept());
String[] task = taskCount.split("\\|");
areaDutyVo.setTaskCount(Integer.valueOf(task[0]));
areaDutyVo.setFinishTaskCount(Integer.valueOf(task[1]));
NextDutyInfoVo upDutyInfoVo = dutyInfoVo.getUpDutyInfoVo();
if(ObjectUtil.isEmpty(upDutyInfoVo)){
return;
}
// 上一班组当班任务
String upTaskCount = this.taskCount(upDutyInfoVo.getDateTime(),upDutyInfoVo.getStartTime(),upDutyInfoVo.getEndTime(),dutyInfoVo.getCreateDept());
String[] upTask = upTaskCount.split("\\|");
upDutyInfoVo.setTaskCount(Integer.valueOf(upTask[0]));
upDutyInfoVo.setFinishTaskCount(Integer.valueOf(upTask[1]));
areaDutyVo.setUpDutyInfoVo(upDutyInfoVo);
}
/**
* 获取当班任务
* @param dateTime
* @param startTime
* @param endTime
* @param createDept
* @return
*/
private String taskCount(Date dateTime, Time startTime, Time endTime, Long createDept) {
DutyTaskVo task = new DutyTaskVo();
//通过线程池异步获取月报各模块内容 主要分为五块内容
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat("duty-task-count-pool-%d").build();
ExecutorService exe = new ThreadPoolExecutor(4, 4, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy());
//监控线程执行完后返回结果
CountDownLatch countDownLatch = new CountDownLatch(4);
List<Long> list = Collections.singletonList(createDept);
String start = DateUtil.format(this.dutyStartTime(dateTime,startTime),DateUtil.PATTERN_DATETIME);
String end = DateUtil.format(this.dutyEndTime(dateTime,startTime,endTime),DateUtil.PATTERN_DATETIME);
// 日常维护
exe.execute(()->{
MaintainVo maintainVo = maintenanceService.maintain(start,end,list);
int maintainSum = maintainVo.getMaintain();
int maintainFinish = maintainVo.getMaintainFinish();
task.setMaintainSum(maintainSum);
task.setMaintainFinish(maintainFinish);
countDownLatch.countDown();
});
// 消缺
exe.execute(()->{
ShortagesVo shortagesVo = phenomenonService.defectMonth(start,end,list);
int shortagesSum = shortagesVo.getShortagesSum();
int shortages = shortagesVo.getShortages();
task.setShortagesSum(shortagesSum);
task.setShortages(shortages);
countDownLatch.countDown();
});
// 检修
exe.execute(()->{
OverhaulVo overhaulVo = accessService.overhaul(start,end,list);
int overhaul = overhaulVo.getOverhaul();
int overhaulFinish = overhaulVo.getOverhaulFinish();
task.setOverhaul(overhaul);
task.setOverhaulFinish(overhaulFinish);
countDownLatch.countDown();
});
// 巡检
exe.execute(()->{
// 巡检任务
DutyInspectTaskVO inspectTask = taskService.task(start,end,list);
if(ObjectUtil.isEmpty(inspectTask)){
task.setInspect(0);
task.setInspectFinish(0);
}else{
int inspect = inspectTask.getInspectTaskSum();
int inspectFinish = inspectTask.getInspectTaskFinish();
task.setInspect(inspect);
task.setInspectFinish(inspectFinish);
}
countDownLatch.countDown();
});
// 等待所有线程执行完成
try {
countDownLatch.await();
} catch (InterruptedException e) {
e.printStackTrace();
Thread.currentThread().interrupt();
}
exe.shutdown();
return (task.getMaintainSum() + task.getShortagesSum() + task.getOverhaul() + task.getInspect()) + "|" +
(task.getMaintainFinish() + task.getShortages() + task.getOverhaulFinish() + task.getInspectFinish());
}
/**
* 厂站运行情况
*
* @param list
* @param areaDutyVo
*/
private void factoryStationRun(List<EminfoAndEmParamVo> deviceList,List<StationEntity> list, AreaDutyVo areaDutyVo) {
areaDutyVo.setStationSum(0);
areaDutyVo.setStationRun(0);
if (CollectionUtil.isEmpty(list) || CollectionUtil.isEmpty(deviceList)) {
return;
}
areaDutyVo.setStationSum(list.size());
List<Long> deptList = list.stream().map(StationEntity::getRefDept).collect(Collectors.toList());
if(CollectionUtil.isEmpty(deptList)){
log.info("run_station_dept_list_null : {}",areaDutyVo.getDepartName());
return;
}
// 过滤未绑定设备
List<String> codes = deviceList.stream().filter(o->deptList.contains(o.getCreateDept())).map(EminfoAndEmParamVo::getEmCode).collect(Collectors.toList());
R<List<String>> R = deviceInstanceClient.getListAnalyseCode(codes);
if (!R.isSuccess() || CollectionUtil.isEmpty(R.getData())) {
log.info("run_station_valid_device_null : {}",areaDutyVo.getDepartName());
return;
}
// 根据机构分组
Map<Long, List<EminfoAndEmParamVo>> map = deviceList.stream().filter(o->R.getData().contains(o.getEmCode())).collect(Collectors.groupingBy(EminfoAndEmParamVo::getCreateDept));
if(CollectionUtil.isEmpty(map)){
log.info("run_station_group_by_valid_null : {}",areaDutyVo.getDepartName());
return;
}
int runCount = 0;
// 遍历分组设备
for(Map.Entry<Long, List<EminfoAndEmParamVo>> entry : map.entrySet()){
// 运行设备code集合
List<String> runCodes = entry.getValue().stream().filter(o -> (Func.isEmpty(o.getRunStatus()) || "1".equals(o.getRunStatus()))).map(EminfoAndEmParamVo::getEmCode).collect(Collectors.toList());
if(CollectionUtil.isEmpty(runCodes)){
return;
}
runCount++;
}
areaDutyVo.setStationRun(runCount);
areaDutyVo.setStationSum(list.size());
}
/**
* 当月任务执行情况
*
* @param list
* @param areaDutyVo
*/
private void executeTaskMonth(List<Long> list, AreaDutyVo areaDutyVo) {
if (CollectionUtil.isEmpty(list)) {
areaDutyVo.setMaintainSumMoth(0);
areaDutyVo.setMaintainFinishSumMoth(0);
areaDutyVo.setMaintainRateMoth("0");
areaDutyVo.setShortagesSumMoth(0);
areaDutyVo.setShortagesMoth(0);
areaDutyVo.setShortagesRateMoth("0");
areaDutyVo.setOverhaulSumMoth(0);
areaDutyVo.setOverhaulFinishSumMoth(0);
areaDutyVo.setOverhaulRateMoth("0");
areaDutyVo.setOperateSumMoth(0);
areaDutyVo.setOperateQualifySumMoth(0);
areaDutyVo.setOperateRateMoth("0");
areaDutyVo.setWorkSumMoth(0);
areaDutyVo.setWorkQualifySumMoth(0);
areaDutyVo.setWorkRateMoth("0");
return;
}
LocalDate firstDay = LocalDate.now().withDayOfMonth(1);
String start = DateUtil.format(new Date(),"yyyy-MM") + "-01 00:00:00";
String end = DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME);
//通过线程池异步获取月报各模块内容 主要分为五块内容
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat("month-task-pool-%d").build();
ScheduledExecutorService exe = new ScheduledThreadPoolExecutor(4, namedThreadFactory, new ThreadPoolExecutor.AbortPolicy());
//监控线程执行完后返回结果
CountDownLatch countDownLatch = new CountDownLatch(4);
// 日常维护
exe.execute(()->{
MaintainVo maintainVo = maintenanceService.maintain(start,end,list);
int maintainSum = maintainVo.getMaintain();
int maintainFinish = maintainVo.getMaintainFinish();
areaDutyVo.setMaintainSumMoth(maintainSum);
areaDutyVo.setMaintainFinishSumMoth(maintainFinish);
if (maintainFinish == 0) {
areaDutyVo.setMaintainRateMoth("0");
} else {
double maintainRate = BigDecimal.valueOf(maintainFinish / (double)maintainSum * 100L).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
areaDutyVo.setMaintainRateMoth(String.valueOf(maintainRate));
}
countDownLatch.countDown();
});
// 消缺
exe.execute(()->{
ShortagesVo shortagesVo = phenomenonService.defectMonth(start,end,list);
int shortagesSum = shortagesVo.getShortagesSum();
int shortages = shortagesVo.getShortages();
areaDutyVo.setShortagesSumMoth(shortagesSum);
areaDutyVo.setShortagesMoth(shortages);
if (Math.abs(shortagesSum) <= 0) {
areaDutyVo.setShortagesRateMoth("0");
} else {
double shortagesRate = BigDecimal.valueOf(shortages / (double)shortagesSum * 100L).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
areaDutyVo.setShortagesRateMoth(String.valueOf(shortagesRate));
}
countDownLatch.countDown();
});
// 检修
exe.execute(()->{
OverhaulVo overhaulVo = accessService.overhaul(start,end,list);
int overhaul = overhaulVo.getOverhaul();
int overhaulFinish = overhaulVo.getOverhaulFinish();
areaDutyVo.setOverhaulSumMoth(overhaul);
areaDutyVo.setOverhaulFinishSumMoth(overhaulFinish);
if (overhaulFinish == 0) {
areaDutyVo.setOverhaulRateMoth("0");
} else {
double overhaulRate = BigDecimal.valueOf(overhaulFinish / (double)overhaul * 100L).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
areaDutyVo.setOverhaulRateMoth(String.valueOf(overhaulRate));
}
countDownLatch.countDown();
});
// 操作票&工作票
exe.execute(()->{
TicketMonthVO ticket = ticketService.operateWork(start,end,list);
if (ObjectUtil.isEmpty(ticket)) {
areaDutyVo.setOperateSumMoth(0);
areaDutyVo.setOperateQualifySumMoth(0);
areaDutyVo.setOperateRateMoth("0");
areaDutyVo.setWorkSumMoth(0);
areaDutyVo.setWorkQualifySumMoth(0);
areaDutyVo.setWorkRateMoth("0");
countDownLatch.countDown();
return;
}
int operate = ticket.getOperate();
int operateQualify = ticket.getOperateQualify();
areaDutyVo.setOperateSumMoth(operate);
areaDutyVo.setOperateQualifySumMoth(operateQualify);
if (operateQualify == 0) {
areaDutyVo.setOperateRateMoth("0");
} else {
double operateRate = BigDecimal.valueOf(operateQualify / (double)operate * 100L).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
areaDutyVo.setOperateRateMoth(String.valueOf(operateRate));
}
// 工作票
int work = ticket.getWork();
int workQualify = ticket.getWorkQualify();
areaDutyVo.setWorkSumMoth(work);
areaDutyVo.setWorkQualifySumMoth(workQualify);
if (workQualify == 0) {
areaDutyVo.setWorkRateMoth("0");
} else {
double workRate = BigDecimal.valueOf(workQualify / (double)work * 100L).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
areaDutyVo.setWorkRateMoth(String.valueOf(workRate));
}
countDownLatch.countDown();
});
// 等待所有线程执行完成
try {
countDownLatch.await();
} catch (InterruptedException e) {
e.printStackTrace();
Thread.currentThread().interrupt();
}
exe.shutdown();
}
/**
* 上一班组发电量
* @param dutyList
* @param deviceList
* @param value
* @param areaDutyVo
*/
private void upDutyPower(List<DutyInfoVo> dutyList, List<EminfoAndEmParamVo> deviceList,Long deptId, List<StationEntity> value, AreaDutyVo areaDutyVo) {
List<DutyInfoVo> list = dutyList.stream().filter(o -> deptId.equals(o.getCreateDept())).collect(Collectors.toList());
if (CollectionUtil.isEmpty(list)) {
return;
}
NextDutyInfoVo upDutyInfoVo = dutyList.get(0).getUpDutyInfoVo();
if(ObjectUtil.isEmpty(upDutyInfoVo)){
return;
}
// 上一班组开始时间、结束时间
Date startDate = this.dutyStartTime(upDutyInfoVo.getDateTime(),upDutyInfoVo.getStartTime());
Date endDate = this.dutyEndTime(upDutyInfoVo.getDateTime(),upDutyInfoVo.getStartTime(),upDutyInfoVo.getEndTime());
// 获取时间断内发电量
this.dutyPower(startDate,endDate,deviceList,value,areaDutyVo,true);
}
/**
* 班组实时发电量
* @param startDate
* @param endDate
* @param deviceList
* @param list
* @param areaDutyVo
*/
private void dutyPower(Date startDate, Date endDate, List<EminfoAndEmParamVo> deviceList,List<StationEntity> list,AreaDutyVo areaDutyVo,boolean flag) {
areaDutyVo.setGeneratingCapacity(0);
List<Long> deptList = list.stream().map(StationEntity::getRefDept).collect(Collectors.toList());
if(CollectionUtil.isEmpty(deptList)){
return;
}
// 区域站点下设备
List<EminfoAndEmParamVo> devices = deviceList.stream().filter(o->deptList.contains(o.getCreateDept())).collect(Collectors.toList());
if(CollectionUtil.isEmpty(devices)){
return;
}
// 获取当班时间内发电量
float generatingCapacity = this.generateByDuty(devices,startDate,endDate);
// 是否为查询上一班组发电量
if(flag){
NextDutyInfoVo upDutyInfoVo = areaDutyVo.getUpDutyInfoVo();
upDutyInfoVo.setGeneratingCapacity(generatingCapacity);
areaDutyVo.setUpDutyInfoVo(upDutyInfoVo);
return;
}
areaDutyVo.setGeneratingCapacity(generatingCapacity);
}
/***
* 根据当班时间查询发电量
* @param devices
* @param start
* @param end
* @return
*/
private float generateByDuty(List<EminfoAndEmParamVo> devices, Date start, Date end) {
float generate = 0f;
if(CollectionUtil.isEmpty(devices)){
return generate;
}
for(EminfoAndEmParamVo device : devices ){
generate += analyseDataService.periodTargetFloat(DateUtil.format(start,DateUtil.PATTERN_DATETIME),DateUtil.format(end,DateUtil.PATTERN_DATETIME),5,3,device.getEmCode(),device.getRideCount(),HomePageConstant.HYDROPOWER_GENERATE_POWER);
}
return generate;
}
/**
* 当班双票
* @param startDate
* @param endDate
* @param list
* @param areaDutyVo
*/
private void dutyDoubleTicket(Date startDate,Date endDate, List<Long> list,AreaDutyVo areaDutyVo) {
String start = DateUtil.format(startDate,"yyyy-MM") + "-01 00:00:00";
String end = DateUtil.format(endDate,DateUtil.PATTERN_DATETIME);
if (CollectionUtil.isEmpty(list)) {
areaDutyVo.setWorkTicketCount(0);
areaDutyVo.setHandoverTicketCount(0);
areaDutyVo.setVoidTicketCount(0);
areaDutyVo.setDeferredTicketCount(0);
areaDutyVo.setCloseTicketCount(0);
areaDutyVo.setOperationTicketCount(0);
return;
}
WorkTicketStatisticVO work = workTicketService.work(start,end,list);
if (ObjectUtil.isEmpty(work)) {
areaDutyVo.setWorkTicketCount(0);
areaDutyVo.setHandoverTicketCount(0);
areaDutyVo.setVoidTicketCount(0);
areaDutyVo.setDeferredTicketCount(0);
areaDutyVo.setCloseTicketCount(0);
}else{
areaDutyVo.setWorkTicketCount(work.getTotal());
areaDutyVo.setHandoverTicketCount(work.getTransfer());
areaDutyVo.setVoidTicketCount(work.getInvalid());
areaDutyVo.setDeferredTicketCount(work.getDelay());
areaDutyVo.setCloseTicketCount(work.getComplete());
}
// 查询操作票
Integer operater = ticketService.operate(start,end,list);
areaDutyVo.setOperationTicketCount(operater);
}
/**
* 当班运行数据
* @param startTime
* @param endTime
* @param areas
* @param areaDutyVo
*/
private void dutyRunCondition(Date startTime, Date endTime, List<Long> areas,AreaDutyVo areaDutyVo) {
String start = DateUtil.format(startTime,DateUtil.PATTERN_DATETIME);
String end = DateUtil.format(endTime,DateUtil.PATTERN_DATETIME);
// 巡检任务
DutyInspectTaskVO task = taskService.task(start,end,areas);
areaDutyVo.setInspectionSum(0);
areaDutyVo.setInspectionFinish(0);
if(ObjectUtil.isNotEmpty(task)){
areaDutyVo.setInspectionSum(task.getInspectTaskSum());
areaDutyVo.setInspectionFinish(task.getInspectTaskFinish());
if(Math.abs(task.getInspectTaskSum()) <= 0){
areaDutyVo.setInspectionFinishRate(0.0);
}else{
double inspectionFinishRate = BigDecimal.valueOf(task.getInspectTaskFinish() / (double)task.getInspectTaskSum() * 100).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
areaDutyVo.setInspectionFinishRate(inspectionFinishRate);
}
areaDutyVo.setInspectTaskIds(task.getInspectTaskIds());
}
// 消缺
DutyDefectVO defect = phenomenonService.defect(start,end,areas);
areaDutyVo.setShortagesSum(0);
areaDutyVo.setShortages(0);
if(ObjectUtil.isNotEmpty(defect)){
areaDutyVo.setShortagesSum(defect.getDefectSum());
areaDutyVo.setShortages(defect.getDefect());
areaDutyVo.setPhenomenonIds(defect.getTotalIds());
if(Math.abs(defect.getDefectSum()) <= 0){
areaDutyVo.setShortagesRate(0.0);
}else{
double shortagesRate = BigDecimal.valueOf(defect.getDefect() / (double)defect.getDefectSum() * 100).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
areaDutyVo.setShortagesRate(shortagesRate);
}
}
// 定期工作
RegularWorkVO regular = maintenanceService.regularWork(startTime,endTime,areas);
areaDutyVo.setWorkRegularlySum(0);
areaDutyVo.setWorkRegularly(0);
if(ObjectUtil.isNotEmpty(regular)){
areaDutyVo.setWorkRegularlySum(regular.getRegularWorkSum());
areaDutyVo.setWorkRegularly(regular.getRegularWork());
areaDutyVo.setMainTaskIds(regular.getMainTaskIds());
if(Math.abs(areaDutyVo.getWorkRegularlySum()) <= 0){
areaDutyVo.setWorkRegularlyRate(0.0);
}else{
double workRegularlyRate = BigDecimal.valueOf(areaDutyVo.getWorkRegularly() / (double)areaDutyVo.getWorkRegularlySum() * 100).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
areaDutyVo.setWorkRegularlyRate(workRegularlyRate);
}
}
}
/**
* 获取运行设备列表
* @param runDeviceList
* @param realMap
* @return
*/
private List<String> runDevice(List<EminfoAndEmParamVo> runDeviceList, Map<String, String> realMap) {
return runDeviceList.stream().map(o ->{
Map<String,String> points = o.getPoint();
if(CollectionUtil.isEmpty(points)){
return "0";
}
String realId = points.get(HomePageConstant.JOINT_RELAY);
if(StringUtil.isEmpty(realId)){
return "0";
}
if(MapUtils.isEmpty(realMap)){
return "0";
}
String value = realMap.get(realId);
if(StringUtil.isEmpty(value)){
return "0";
}
if (value.contains("1") || "1.0".equals(value)) {
return o.getEmCode();
}
return "0";
}).distinct().collect(Collectors.toList());
}
}

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/safeproduct/impl/CompanyServiceImpl.java

@ -1,5 +1,6 @@
package com.hnac.hzims.scheduled.service.safeproduct.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hnac.hzims.safeproduct.entity.CheckCompanyEntity;
import com.hnac.hzims.scheduled.mapper.safeproduct.CompanyMapper;
import com.hnac.hzims.scheduled.service.safeproduct.CompanyService;
@ -14,6 +15,7 @@ import org.springframework.stereotype.Service;
@Service
@AllArgsConstructor
@Slf4j
@DS("safeproduct")
public class CompanyServiceImpl extends BaseServiceImpl<CompanyMapper, CheckCompanyEntity> implements CompanyService {
}

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/safeproduct/impl/InstanceServiceImpl.java

@ -1,5 +1,6 @@
package com.hnac.hzims.scheduled.service.safeproduct.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hnac.hzims.safeproduct.entity.CheckItemInstanceEntity;
import com.hnac.hzims.scheduled.mapper.safeproduct.InstanceMapper;
import com.hnac.hzims.scheduled.service.safeproduct.InstanceService;
@ -14,6 +15,7 @@ import org.springframework.stereotype.Service;
@Service
@AllArgsConstructor
@Slf4j
@DS("safeproduct")
public class InstanceServiceImpl extends BaseServiceImpl<InstanceMapper, CheckItemInstanceEntity> implements InstanceService {
}

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/safeproduct/impl/MonthServiceImpl.java

@ -1,5 +1,6 @@
package com.hnac.hzims.scheduled.service.safeproduct.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.safeproduct.entity.CheckCompanyEntity;
@ -29,6 +30,7 @@ import java.util.concurrent.atomic.AtomicInteger;
@Service
@AllArgsConstructor
@Slf4j
@DS("safeproduct")
public class MonthServiceImpl extends BaseServiceImpl<MonthMapper, CheckMonthEntity> implements MonthService {
private final CompanyService companyService;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/safeproduct/impl/TrialServiceImpl.java

@ -1,11 +1,13 @@
package com.hnac.hzims.scheduled.service.safeproduct.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hnac.hzims.safeproduct.dto.SafeEquipmentTrialDTO;
import com.hnac.hzims.safeproduct.entity.SafeEquipmentTrialEntity;
import com.hnac.hzims.scheduled.mapper.safeproduct.TrialMapper;
import com.hnac.hzims.scheduled.service.safeproduct.TrialService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.ObjectUtil;
@ -17,7 +19,9 @@ import java.util.Optional;
* @author ysj
*/
@Service
@Slf4j
@RequiredArgsConstructor
@DS("safeproduct")
public class TrialServiceImpl extends BaseServiceImpl<TrialMapper, SafeEquipmentTrialEntity> implements TrialService {
/**

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/TicketService.java

@ -16,5 +16,7 @@ public interface TicketService extends BaseService<StandardTicketInfoEntity> {
DoublePassRateVO doublePassRate(List<Long> areas, LocalDateTime firstDateTime, LocalDateTime now);
TicketMonthVO operateWork(String start, String end, List<Long> list);
TicketMonthVO operateWork(String start, String end, List<Long> areas);
Integer operate(String start, String end, List<Long> areas);
}

12
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/WorkDelayService.java

@ -0,0 +1,12 @@
package com.hnac.hzims.scheduled.service.ticket;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketDelayEntity;
import org.springblade.core.mp.base.BaseService;
/**
* @author ysj
*/
public interface WorkDelayService extends BaseService<WorkTicketDelayEntity> {
}

11
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/WorkPrincipalService.java

@ -0,0 +1,11 @@
package com.hnac.hzims.scheduled.service.ticket;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketPrincipalChangeEntity;
import org.springblade.core.mp.base.BaseService;
/**
* @author ysj
*/
public interface WorkPrincipalService extends BaseService<WorkTicketPrincipalChangeEntity> {
}

5
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/WorkTicketService.java

@ -1,10 +1,15 @@
package com.hnac.hzims.scheduled.service.ticket;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.ticket.workTicket.vo.WorkTicketStatisticVO;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
import java.util.Map;
/**
* @author ysj
*/
public interface WorkTicketService extends BaseService<WorkTicketInfoEntity> {
WorkTicketStatisticVO work(String start, String end, List<Long> areas);
}

20
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/impl/TicketServiceImpl.java

@ -147,4 +147,24 @@ public class TicketServiceImpl extends BaseServiceImpl<TicketMapper, StandardTic
return ticket;
}
/**
* 操作票查询
* @param start
* @param end
* @param areas
* @return
*/
@Override
public Integer operate(String start, String end, List<Long> areas) {
List<StandardTicketInfoEntity> operates = this.list(new LambdaQueryWrapper<StandardTicketInfoEntity>() {{
ge(StandardTicketInfoEntity::getStartTime, start);
le(StandardTicketInfoEntity::getStartTime, end);
in(StandardTicketInfoEntity::getCreateDept, areas);
}});
if (CollectionUtil.isEmpty(operates)) {
return 0;
}
return operates.size();
}
}

21
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/impl/WorkDelayServiceImpl.java

@ -0,0 +1,21 @@
package com.hnac.hzims.scheduled.service.ticket.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hnac.hzims.scheduled.mapper.ticket.WorkDelayMapper;
import com.hnac.hzims.scheduled.service.ticket.WorkDelayService;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketDelayEntity;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* @author ysj
*/
@Service
@AllArgsConstructor
@Slf4j
@DS("ticket")
public class WorkDelayServiceImpl extends BaseServiceImpl<WorkDelayMapper, WorkTicketDelayEntity> implements WorkDelayService {
}

22
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/impl/WorkPrincipalServiceImpl.java

@ -0,0 +1,22 @@
package com.hnac.hzims.scheduled.service.ticket.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hnac.hzims.scheduled.mapper.ticket.WorkPrincipalMapper;
import com.hnac.hzims.scheduled.service.ticket.WorkPrincipalService;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketPrincipalChangeEntity;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* @author ysj
*/
@Service
@AllArgsConstructor
@Slf4j
@DS("ticket")
public class WorkPrincipalServiceImpl extends BaseServiceImpl<WorkPrincipalMapper, WorkTicketPrincipalChangeEntity> implements WorkPrincipalService {
}

65
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/ticket/impl/WorkTicketServiceImpl.java

@ -1,14 +1,28 @@
package com.hnac.hzims.scheduled.service.ticket.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.scheduled.mapper.ticket.WorkTicketMapper;
import com.hnac.hzims.scheduled.service.ticket.WorkDelayService;
import com.hnac.hzims.scheduled.service.ticket.WorkPrincipalService;
import com.hnac.hzims.scheduled.service.ticket.WorkTicketService;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketDelayEntity;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketPrincipalChangeEntity;
import com.hnac.hzims.ticket.workTicket.vo.WorkTicketStatisticVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;
import java.util.stream.Collectors;
/**
* @author ysj
@ -18,4 +32,55 @@ import org.springframework.stereotype.Service;
@RequiredArgsConstructor
@DS("ticket")
public class WorkTicketServiceImpl extends BaseServiceImpl<WorkTicketMapper, WorkTicketInfoEntity> implements WorkTicketService {
private WorkPrincipalService workPrincipalService;
private WorkDelayService workDelayService;
@Override
public WorkTicketStatisticVO work(String start, String end, List<Long> areas) {
WorkTicketStatisticVO work = new WorkTicketStatisticVO();
List<WorkTicketInfoEntity> infoList = this.list(new LambdaQueryWrapper<WorkTicketInfoEntity>() {{
ge(WorkTicketInfoEntity::getPlanStartTime, start);
le(WorkTicketInfoEntity::getPlanStartTime, end);
in(WorkTicketInfoEntity::getCreateDept, areas);
}});
if (CollectionUtil.isNotEmpty(infoList)) {
List<Long> infoIdList = infoList.stream().map(WorkTicketInfoEntity::getId).collect(Collectors.toList());
work.setTotal(infoList.size());
//工作票作废
List<WorkTicketInfoEntity> invalidList = infoList.stream().filter(w -> TicketConstants.FirstWorkTicketFlowStatusEnum.INVALID.getStatus().equals(w.getStatus()))
.collect(Collectors.toList());
work.setInvalid(CollectionUtil.isNotEmpty(invalidList) ? invalidList.size() : 0);
// 工作票完成数
List<WorkTicketInfoEntity> completeList = infoList.stream().filter(w -> TicketConstants.FirstWorkTicketFlowStatusEnum.FINISH.getStatus().equals(w.getStatus()))
.collect(Collectors.toList());
work.setComplete(CollectionUtil.isNotEmpty(completeList) ? completeList.size() : 0);
//工作票移交
FutureTask transferTask = new FutureTask(() -> {
List<WorkTicketPrincipalChangeEntity> moveList = workPrincipalService.list(new LambdaQueryWrapper<WorkTicketPrincipalChangeEntity>() {{
in(WorkTicketPrincipalChangeEntity::getTicketId, infoIdList);
}});
return CollectionUtil.isNotEmpty(moveList) ? moveList.size() : 0;
});
new Thread(transferTask, "工作票移交Thread").start();
//工作票延期
FutureTask delayTask = new FutureTask(() -> {
log.info("开始工作票延期");
List<WorkTicketDelayEntity> delayEntityList = workDelayService.list(Wrappers.<WorkTicketDelayEntity>lambdaQuery()
.in(WorkTicketDelayEntity::getTicketId, infoIdList)
);
return CollectionUtil.isNotEmpty(delayEntityList) ? delayEntityList.size() : 0;
});
new Thread(delayTask, "工作票延期Thread").start();
try {
work.setDelay((Integer) delayTask.get());
work.setTransfer((Integer) transferTask.get());
} catch (InterruptedException | ExecutionException e) {
e.printStackTrace();
Thread.currentThread().interrupt();
}
}
return work;
}
}

4
hzims-service/hzims-scheduled/src/main/resources/mapper/operation/DutyGroupMapper.xml

@ -0,0 +1,4 @@
<?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.DutyGroupMapper">
</mapper>

34
hzims-service/hzims-scheduled/src/main/resources/mapper/operation/DutyMapper.xml

@ -0,0 +1,34 @@
<?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.DutyMapper">
<select id="dutyData" resultType="com.hnac.hzims.operational.duty.vo.DutyInfoVo">
SELECT DM.DUTY_GROUP_ID AS groupId ,DC.CLASS_NAME, DC.START_TIME, DC.END_TIME,
DM.DUTY_DATE DATE_TIME,DM.ID,DM.PRE_DUTY_ID,DM.CREATE_DEPT
FROM hz_ims_duty_main DM
JOIN hz_ims_duty_class DC
ON DM.CLASS_ID = DC.ID
WHERE DM.STATUS = '1'
AND DM.CREATE_DEPT IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
<select id="queryDuty" resultType="com.hnac.hzims.operational.duty.vo.DutyMainInfoVo">
SELECT DM.ID,DM.DUTY_GROUP_ID AS dutyGroupId,DM.DUTY_DATE DATE_TIME, DC.`CLASS_NAME`,DC.`START_TIME`, DC.`END_TIME`
FROM hz_ims_duty_main DM JOIN hz_ims_duty_class DC
ON DM.`CLASS_ID` = DC.`ID`
AND DM.ID = #{dutyId}
order by DM.duty_date desc
limit 1;
</select>
<select id="selectDuty" resultType="com.hnac.hzims.operational.duty.vo.DutyMainInfoVo">
SELECT DM.*, DC.`CLASS_NAME` as managerId, DC.`START_TIME`, DC.`END_TIME`
FROM hz_ims_duty_main DM
JOIN hz_ims_duty_class DC
ON DM.`CLASS_ID` = DC.`ID`
WHERE DM.PRE_DUTY_ID = #{preDutyId}
order by DM.duty_date desc
limit 1;
</select>
</mapper>

4
hzims-service/hzims-scheduled/src/main/resources/mapper/operation/DutyPersonMapper.xml

@ -0,0 +1,4 @@
<?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.DutyPersonMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/ticket/WorkDelayMapper.xml

@ -0,0 +1,5 @@
<?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.ticket.workTicket.mapper.WorkTicketDelayMapper">
</mapper>

5
hzims-service/hzims-scheduled/src/main/resources/mapper/ticket/WorkPrincipalMapper.xml

@ -0,0 +1,5 @@
<?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.ticket.WorkPrincipalMapper">
</mapper>

7
hzims-service/inspect/pom.xml

@ -216,6 +216,13 @@
<!-- 用于创建multipartfile对象 end-->
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>hzims-biz-common</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>

7
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/ClockController.java

@ -2,6 +2,9 @@ package com.hnac.hzinfo.inspect.ai.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzinfo.inspect.ai.vo.ClockVO;
import io.swagger.annotations.*;
import lombok.AllArgsConstructor;
@ -53,6 +56,10 @@ public class ClockController extends BladeController {
@ApiOperation(value = "分页", notes = "传入st_clock")
@ApiImplicitParams({
})
@OperationAnnotation(moduleName = "巡检管理", title = "智能巡检配置",
operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,
action = "分页")
public R<IPage<ClockEntity>> list(@ApiIgnore @RequestParam Map<String,Object> st_clock, Query query) {
QueryWrapper<ClockEntity> queryWrapper = Condition.getQueryWrapper( st_clock, ClockEntity.class);
IPage<ClockEntity> pages = st_clockService.page(Condition.getPage(query), queryWrapper);

7
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/ClockTypeController.java

@ -2,6 +2,9 @@ package com.hnac.hzinfo.inspect.ai.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import io.swagger.annotations.*;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
@ -51,6 +54,10 @@ public class ClockTypeController extends BladeController {
@ApiOperation(value = "分页", notes = "传入st_clock_type")
@ApiImplicitParams({
})
@OperationAnnotation(moduleName = "巡检管理", title = "智能巡检配置",
operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,
action = "分页")
public R<IPage<ClockTypeEntity>> list(@ApiIgnore @RequestParam Map<String,Object> st_clock_type, Query query) {
QueryWrapper<ClockTypeEntity> queryWrapper = Condition.getQueryWrapper( st_clock_type, ClockTypeEntity.class);
IPage<ClockTypeEntity> pages = st_clock_typeService.page(Condition.getPage(query), queryWrapper);

7
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/RobotController.java

@ -4,6 +4,9 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzinfo.inspect.ai.vo.robot.RobotAiReturnData;
import com.hnac.hzinfo.inspect.ai.vo.robot.RobotServerTaskParam;
import io.swagger.annotations.*;
@ -60,6 +63,10 @@ public class RobotController extends BladeController {
@ApiOperation(value = "分页", notes = "传入st_robot")
@ApiImplicitParams({
})
@OperationAnnotation(moduleName = "巡检管理", title = "机器人管理",
operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,
action = "分页")
public R<IPage<RobotEntity>> list(@ApiIgnore @RequestParam Map<String,Object> st_robot, Query query) {
QueryWrapper<RobotEntity> queryWrapper = Condition.getQueryWrapper( st_robot, RobotEntity.class);
IPage<RobotEntity> pages = st_robotService.page(Condition.getPage(query), queryWrapper);

6
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ContentController.java

@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzinfo.inspect.obj.entity.ContentEntity;
import com.hnac.hzinfo.inspect.obj.entity.ProjectContentEntity;
import com.hnac.hzinfo.inspect.obj.services.ProjectContentService;
@ -47,6 +50,9 @@ public class ContentController {
*/
@GetMapping("/list")
@ApiOperation(value = "巡检内容列表", notes = "巡检内容列表")
@OperationAnnotation(moduleName = "巡检管理",title = "巡检配置",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "巡检对象列表")
public R<IPage<ContentEntity>> list(ContentListQueryVO content, Query query, BladeUser bladeUser) {
LambdaQueryWrapper<ContentEntity> queryWrapper = Condition.getQueryWrapper(new ContentEntity(),content);
queryWrapper.orderByDesc(ContentEntity::getUpdateTime);

6
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ObjectController.java

@ -7,6 +7,9 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzinfo.inspect.obj.entity.ObjectDangerEntity;
import com.hnac.hzinfo.inspect.obj.entity.ObjectEntity;
import com.hnac.hzinfo.inspect.obj.entity.ObjectTemplateEntity;
@ -86,6 +89,9 @@ public class ObjectController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "巡检对象列表", notes = "巡检对象列表")
@OperationAnnotation(moduleName = "巡检管理",title = "巡检配置",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "巡检对象列表")
public R<IPage<ObjectEntity>> list(ObjectListQueryVO object, Query query, BladeUser bladeUser) {
IPage<ObjectEntity> pages = Condition.getPage(query);
ObjectEntity entity = new ObjectEntity();

7
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ObjectUserController.java

@ -5,6 +5,9 @@ package com.hnac.hzinfo.inspect.obj.web;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.common.collect.Lists;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzinfo.inspect.obj.entity.ObjectUserEntity;
import com.hnac.hzinfo.inspect.obj.services.ObjectUserService;
import com.hnac.hzinfo.inspect.obj.vo.ObjectUserAddVO;
@ -55,6 +58,10 @@ public class ObjectUserController {
* 巡检对象用户列表
*/
@GetMapping("/list")
@OperationAnnotation(moduleName = "巡检管理", title = "巡检配置",
operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,
action = "巡检对象用户列表")
@ApiOperation(value = "巡检对象用户列表", notes = "巡检对象用户列表(跨服务查询)")
public R<IPage<ObjectUserListVO>> list(ObjectUserListQuery content, Query query, BladeUser bladeUser) {
if(!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)){

6
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java

@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzinfo.inspect.obj.entity.ProjectContentEntity;
import com.hnac.hzinfo.inspect.obj.entity.ProjectEntity;
import com.hnac.hzinfo.inspect.obj.entity.TemplateProjectEntity;
@ -52,6 +55,9 @@ public class ProjectController {
*/
@GetMapping("/list")
@ApiOperation(value = "巡检项目列表", notes = "巡检项目列表")
@OperationAnnotation(moduleName = "巡检管理",title = "巡检配置",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "巡检对象列表")
public R<IPage<ProjectEntity>> list(ProjectListQueryVO project, Query query, BladeUser bladeUser) {
LambdaQueryWrapper<ProjectEntity> queryWrapper = Condition.getQueryWrapper(new ProjectEntity(),project);
queryWrapper.orderByDesc(ProjectEntity::getUpdateTime);

6
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/TemplateController.java

@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzinfo.inspect.obj.entity.ObjectTemplateEntity;
import com.hnac.hzinfo.inspect.obj.entity.TemplateEntity;
import com.hnac.hzinfo.inspect.obj.entity.TemplateProjectEntity;
@ -66,6 +69,9 @@ public class TemplateController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "巡检模板列表分页", notes = "传入巡检模板")
@OperationAnnotation(moduleName = "巡检管理",title = "巡检配置",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "巡检对象列表")
public R<IPage<TemplateEntity>> list(TemplateListQueryVO inspectionTemplate, Query query, BladeUser bladeUser) {
LambdaQueryWrapper<TemplateEntity> queryWrapper = Condition.getQueryWrapper(new TemplateEntity(),inspectionTemplate);
queryWrapper.orderByDesc(TemplateEntity::getUpdateTime);

6
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java

@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzinfo.inspect.Constants;
import com.hnac.hzinfo.inspect.invalid.DictInvalid;
import com.hnac.hzinfo.inspect.obj.utils.CodeUtils;
@ -69,6 +72,9 @@ public class PlanController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页显示计划列表", notes = "传入plan")
@OperationAnnotation(moduleName = "巡检管理",title = "巡检计划",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页显示计划列表")
public R<IPage<PlanEntity>> list(PlanListQueryVO plan, Query query, BladeUser bladeUser) {
LambdaQueryWrapper<PlanEntity> queryWrapper = Condition.getQueryWrapper(new PlanEntity(),plan);
if(plan.getStartTime()!=null){

175
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/RouteController.java

@ -2,9 +2,14 @@ package com.hnac.hzinfo.inspect.plan.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import io.swagger.annotations.*;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
@ -22,7 +27,7 @@ import java.util.List;
import java.util.Map;
/**
* 控制器
* 控制器
*
* @author py
*/
@ -32,86 +37,90 @@ import java.util.Map;
@Api(value = "hld-巡检路径", tags = "hld-巡检路径")
public class RouteController extends BladeController {
private final IRouteService st_re_routeService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入st_re_route")
public R<RouteEntity> detail(RouteEntity st_re_route) {
RouteEntity detail = st_re_routeService.getOne(Condition.getQueryWrapper(st_re_route));
return R.data(detail);
}
/**
* 分页 代码自定义代号
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入st_re_route")
@ApiImplicitParams({
})
public R<IPage<RouteEntity>> list(@ApiIgnore @RequestParam Map<String,Object> st_re_route, Query query) {
QueryWrapper<RouteEntity> queryWrapper = Condition.getQueryWrapper( st_re_route, RouteEntity.class);
queryWrapper.orderByDesc("create_time","update_time");
IPage<RouteEntity> pages = st_re_routeService.page(Condition.getPage(query), queryWrapper);
return R.data(pages);
}
/**
* 新增 代码自定义代号
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入st_re_route")
public R save(@Valid @RequestBody RouteEntity st_re_route) {
return R.status(st_re_routeService.save(st_re_route));
}
/**
* 修改 代码自定义代号
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入st_re_route")
public R update(@Valid @RequestBody RouteEntity st_re_route) {
return R.status(st_re_routeService.updateById(st_re_route));
}
/**
* 新增或修改 代码自定义代号
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入st_re_route")
public R submit(@Valid @RequestBody RouteEntity st_re_route) {
return R.status(st_re_routeService.saveOrUpdate(st_re_route));
}
/**
* 删除 代码自定义代号
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(st_re_routeService.deleteLogic(Func.toLongList(ids)));
}
@GetMapping("/getRouteByObjectId")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "获取使用到相关对象ID的所有路径", notes = "传入对象id")
public R<List<RouteEntity>> getRouteByObjectId(@RequestParam Long objectId) {
return R.data(st_re_routeService.getRouteByObjectId(objectId));
}
@GetMapping("/getRouteByTemplateId")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "获取使用到相关模板ID的所有路径", notes = "传入模板id")
public R<List<RouteEntity>> getRouteByTemplateId(@RequestParam Long templateId) {
return R.data(st_re_routeService.getRouteByTemplateId(templateId));
}
private final IRouteService st_re_routeService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入st_re_route")
public R<RouteEntity> detail(RouteEntity st_re_route) {
RouteEntity detail = st_re_routeService.getOne(Condition.getQueryWrapper(st_re_route));
return R.data(detail);
}
/**
* 分页 代码自定义代号
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入st_re_route")
@ApiImplicitParams({
})
@OperationAnnotation(moduleName = "巡检管理", title = "巡检配置",
operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,
action = "列表(不分页)")
public R<IPage<RouteEntity>> list(@ApiIgnore @RequestParam Map<String, Object> st_re_route, Query query) {
QueryWrapper<RouteEntity> queryWrapper = Condition.getQueryWrapper(st_re_route, RouteEntity.class);
queryWrapper.orderByDesc("create_time", "update_time");
IPage<RouteEntity> pages = st_re_routeService.page(Condition.getPage(query), queryWrapper);
return R.data(pages);
}
/**
* 新增 代码自定义代号
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入st_re_route")
public R save(@Valid @RequestBody RouteEntity st_re_route) {
return R.status(st_re_routeService.save(st_re_route));
}
/**
* 修改 代码自定义代号
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入st_re_route")
public R update(@Valid @RequestBody RouteEntity st_re_route) {
return R.status(st_re_routeService.updateById(st_re_route));
}
/**
* 新增或修改 代码自定义代号
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入st_re_route")
public R submit(@Valid @RequestBody RouteEntity st_re_route) {
return R.status(st_re_routeService.saveOrUpdate(st_re_route));
}
/**
* 删除 代码自定义代号
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(st_re_routeService.deleteLogic(Func.toLongList(ids)));
}
@GetMapping("/getRouteByObjectId")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "获取使用到相关对象ID的所有路径", notes = "传入对象id")
public R<List<RouteEntity>> getRouteByObjectId(@RequestParam Long objectId) {
return R.data(st_re_routeService.getRouteByObjectId(objectId));
}
@GetMapping("/getRouteByTemplateId")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "获取使用到相关模板ID的所有路径", notes = "传入模板id")
public R<List<RouteEntity>> getRouteByTemplateId(@RequestParam Long templateId) {
return R.data(st_re_routeService.getRouteByTemplateId(templateId));
}
}

6
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/report/controller/InspectReportController.java

@ -2,6 +2,9 @@ package com.hnac.hzinfo.inspect.report.controller;
import com.alibaba.druid.support.json.JSONUtils;
import com.alibaba.excel.EasyExcel;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzinfo.inspect.gather.vo.TaskGatherQueryVO;
import com.hnac.hzinfo.inspect.report.entity.InspectMonthReportExcel;
import com.hnac.hzinfo.inspect.report.entity.MonthRoutReport;
@ -37,6 +40,9 @@ public class InspectReportController {
@RequestMapping(value = "/getInspectMonthReport", method = { RequestMethod.POST,RequestMethod.GET })
@ApiOperation(notes = "子站-巡检月报表接口-按路径", value = "针对巡检月报表页")
@OperationAnnotation(moduleName = "生产月报", title = "巡检报表", operatorType = OperatorType.MOBILE, businessType =
BusinessType.GENCODE,
action = "子站-巡检月报表接口-按路径")
public R<Map<String,MonthRoutReport>> getInspectMonthReport(
@ApiParam(value = "年月 2019-02") @RequestParam(required = true) String month,
@ApiParam(value = "巡检路径id") @RequestParam(required = true) Long routId,

13
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java

@ -7,6 +7,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.annotation.JsonRawValue;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.google.common.collect.Lists;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzinfo.core.push.enums.PushAudienceType;
import com.hnac.hzinfo.core.push.model.PushAudience;
import com.hnac.hzinfo.core.push.model.PushInfo;
@ -103,6 +106,9 @@ public class TaskController extends BladeController {
*/
@GetMapping("/list")
@ApiOperation(value = "分页显示任务列表", notes = "传入task")
@OperationAnnotation(moduleName = "巡检管理",title = "我的巡检任务",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页显示任务列表")
public R<BladePage<TaskVo>> list(TaskListQuery task, Query query) {
//CacheUtil.put("test#2","inspect","test","12");
// LambdaQueryWrapper<TaskEntity> queryWrapper = Condition.getQueryWrapper(new TaskEntity(),task);
@ -154,6 +160,9 @@ public class TaskController extends BladeController {
*/
@GetMapping("/robotList")
@ApiOperation(value = "机器人任务列表", notes = "传入task")
@OperationAnnotation(moduleName = "巡检管理",title = "机器人巡检",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "机器人任务列表")
public R<IPage<TaskVo>> robotList(TaskListQuery task, Query query) {
IPage<TaskVo> pages = Condition.getPage(query);
task.setAutoVideo(PlanContants.InspectTypeEnum.ROBOT.getVal());
@ -167,6 +176,10 @@ public class TaskController extends BladeController {
* 视频任务列表
*/
@GetMapping("/videoList")
@OperationAnnotation(moduleName = "巡检管理", title = "视频巡检任务",
operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,
action = "视频任务列表")
@ApiOperation(value = "视频任务列表", notes = "传入task")
public R<IPage<TaskVo>> videoList(TaskListQuery task, Query query) {
IPage<TaskVo> pages = Condition.getPage(query);

6
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskRecordController.java

@ -5,6 +5,9 @@ package com.hnac.hzinfo.inspect.task.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzinfo.inspect.task.entity.TaskRecordEntity;
import com.hnac.hzinfo.inspect.task.service.ITaskRecordService;
import com.hnac.hzinfo.inspect.task.service.ITaskService;
@ -41,6 +44,9 @@ public class TaskRecordController {
@GetMapping("/list")
@ApiOperation(value = "巡检报备列表", notes = "巡检报备列表(只显示未开始)")
@OperationAnnotation(moduleName = "巡检管理",title = "巡检设备",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "巡检报备列表")
public R<IPage<TaskVo>> getListTaskRecord(TaskListQuery task, Query query) {
IPage<TaskVo> pages = Condition.getPage(query);
if(!AuthUtil.isAdministrator()){

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryController.java

@ -85,7 +85,8 @@ public class OperAccessLibraryController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "分页 查询参数:emCode,gradeCode")
@OperationAnnotation(title = "检修库",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "检修管理",title = "检修库",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页 查询参数:emCode,gradeCode")
public R<IPage<OperAccessLibraryVO>> list(OperAccessLibraryListDTO req, Query query) {
return service.list(req, query);

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessStatisticsController.java

@ -84,7 +84,8 @@ public class OperAccessStatisticsController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "分页 查询参数:pid,taskId,manager")
@OperationAnnotation(title = "检修记录",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "检修管理",title = "检修记录",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页 查询参数:pid,taskId,manager")
public R<IPage<OperAccessStatisticsVO>> list(OperAccessStatisticsDTO req, Query query) {
return service.list(req, Condition.getPage(query));

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessTaskController.java

@ -83,7 +83,8 @@ public class OperAccessTaskController extends BladeController {
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 50)
@OperationAnnotation(title = "我的检修任务",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "检修管理",title = "我的检修任务",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页 查询参数:name,code,handler,status,planId,planCode")
@ApiOperation(value = "分页 查询参数:name,code,handler,status,planId,planCode")
public R<IPage<OperAccessTaskVO>> list(OperAccessTaskDTO req, Query query) {

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AlarmHandleController.java

@ -3,6 +3,9 @@ package com.hnac.hzims.operational.alert.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.alert.service.AlarmHandleService;
import com.hnac.hzims.operational.alert.vo.AlarmHandleVo;
import com.hnac.hzims.operational.alert.vo.HandleQueryVo;
@ -49,6 +52,9 @@ public class AlarmHandleController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入AlarmHandleEntity")
@OperationAnnotation(moduleName = "告警配置", title = "告警配置记录", operatorType = OperatorType.MOBILE, businessType =
BusinessType.GENCODE,
action = "分页")
public R<IPage<AlarmHandleVo>> list(HandleQueryVo param, Query query) {
IPage<AlarmHandleVo> pages = service.pageCondition(query, param);
return R.data(pages);

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectController.java

@ -162,7 +162,8 @@ public class OperDefectController extends BladeController {
@GetMapping("/getDefectStatistics")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "获取缺陷的统计月报", notes = " month 格式:2021-01")
@OperationAnnotation(moduleName = "缺陷管理", title = "缺陷月报表", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "生产月报", title = "缺陷月报表", operatorType = OperatorType.MOBILE, businessType =
BusinessType.GENCODE,
action = "获取缺陷的统计月报")
public R<Map<String, Object>> getDefectStatistics(@ApiParam(value = "month 格式:2021-01", required = true) @RequestParam String month) {
Map<String, Object> defectStatistics = defectService.getDefectStatistics(month);

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperFaultController.java

@ -60,7 +60,8 @@ public class OperFaultController extends BladeController {
@ApiOperation(value = "分页", notes = "传入fault")
@ApiImplicitParams({
})
@OperationAnnotation(title = "故障库",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "智能诊断",title = "故障库",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页查询")
public R<IPage<OperFaultVO>> list(OperFaultEntity entity, Query query) {
LambdaQueryWrapper<OperFaultEntity> queryWrapper = Condition.getQueryWrapper(new OperFaultEntity(),entity);

91
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IOperDefectService.java

@ -1,13 +1,102 @@
package com.hnac.hzims.operational.defect.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.operational.defect.entity.OperDefectEntity;
import com.hnac.hzims.operational.defect.entity.OperPhenomenonEntity;
import com.hnac.hzims.operational.defect.vo.OperDefectVO;
import com.hnac.hzims.operational.report.vo.DefectReportsVO;
import com.hnac.hzims.vo.SafeCheckStatisticVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
import org.springblade.flow.core.entity.BladeFlow;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;
/**
* @author ysj
* 服务类
*
* @author Chill
*/
public interface IOperDefectService extends BaseService<OperDefectEntity> {
/**
* 开始问题处理流程
* 问题处理流程的第一个处理节点人key 必须是 problemUser
* @param
*/
void startFlow(OperPhenomenonEntity entity, OperDefectEntity defectEntity);
/**
* 处理问题
* @param flow
* @return
*/
boolean handleProcess(BladeFlow flow);
/**
* 获取缺陷的统计月报
* @param month 格式"2021-01"
*/
Map<String, Object> getDefectStatistics(String month);
/**
* 导出缺陷统计月报报表
* @param response
* @param month 格式 "2021-01"
* @throws IOException
*/
void exportFualtMonthExcel(HttpServletResponse response, String month) throws IOException;
List<OperDefectEntity> getDefectList(String emCode,List<String> list);
List<OperDefectEntity> getDefectByEmCodeList(String emCode);
/**
* 站点月报统计 - 消缺
* @param startDate
* @param endDate
* @param deptIdList
* @return
*/
List<DefectReportsVO> getFaultByFaultCode(LocalDate startDate,LocalDate endDate,List<Long> deptIdList);
List<DefectReportsVO> getFaultByFaultCode(Map<String,Object> params);
List<Map<String,Object>> getDefectConclusion(Map<String,Object> params);
/**
* 缺陷详情
* @param defect
* @return
*/
R<OperDefectVO> detail(OperDefectEntity defect);
/**
* 获取安全检查消缺项统计
* @param startDate 开始时间
* @param endDate 结束时间
* @param dept 机构ID
* @param defectType 缺陷类型;1 重大缺陷 2一般缺陷
* @return SafeCheckStatisticVO 对象
*/
SafeCheckStatisticVO getDefectCheck(String startDate,String endDate,Long dept,String defectType);
boolean updateDefectInfo(OperDefectEntity entity);
boolean updateDefectHanderState(OperDefectEntity entity);
/**
* 分页查询
* @param operDefectEntityPage
* @param defect
* @return
*/
IPage<OperDefectEntity> selectPage(Page<OperDefectEntity> operDefectEntityPage, OperDefectEntity defect);
}

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassController.java

@ -54,6 +54,9 @@ public class ImsDutyClassController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入imsDutyClass")
@OperationAnnotation(moduleName = "值班管理",title = "值班配置",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,action
= "列表(不分页)")
public R<IPage<ImsDutyClassEntity>> list(ImsDutyClassEntity imsDutyClass, Query query) {
LambdaQueryWrapper<ImsDutyClassEntity> queryWrapper = Condition.getQueryWrapper(new ImsDutyClassEntity(),imsDutyClass);
if(null != imsDutyClass.getCreateDept()){
@ -68,7 +71,7 @@ public class ImsDutyClassController extends BladeController {
*/
@GetMapping("/getlist")
@ApiOperationSupport(order = 2)
@OperationAnnotation(moduleName = "值班管理",title = "班次设置",operatorType = OperatorType.MOBILE,businessType =
@OperationAnnotation(moduleName = "值班管理",title = "值班配置",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,action
= "列表(不分页)")
@ApiOperation(value = "列表(不分页)", notes = "传入imsDutyClass")

145
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassTypeController.java

@ -34,82 +34,87 @@ import java.util.List;
@Api(value = "班次类型controller", tags = "班次类型相关操作")
public class ImsDutyClassTypeController extends BladeController {
private final IImsDutyClassTypeService imsDutyClassTypeService;
private final IImsDutyClassTypeService imsDutyClassTypeService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入imsDutyClassType")
public R<ImsDutyClassTypeEntity> detail(ImsDutyClassTypeEntity imsDutyClassType) {
ImsDutyClassTypeEntity detail = imsDutyClassTypeService.getOne(Condition.getQueryWrapper(imsDutyClassType));
return R.data(detail);
}
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入imsDutyClassType")
public R<ImsDutyClassTypeEntity> detail(ImsDutyClassTypeEntity imsDutyClassType) {
ImsDutyClassTypeEntity detail = imsDutyClassTypeService.getOne(Condition.getQueryWrapper(imsDutyClassType));
return R.data(detail);
}
/**
* 分页 代码自定义代号
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入imsDutyClassType")
public R<IPage<ImsDutyClassTypeEntity>> list(ImsDutyClassTypeEntity imsDutyClassType, Query query) {
LambdaQueryWrapper<ImsDutyClassTypeEntity> queryWrapper = Condition.getQueryWrapper(new ImsDutyClassTypeEntity(), imsDutyClassType);
if (null != imsDutyClassType.getCreateDept()) {
queryWrapper.eq(ImsDutyClassTypeEntity::getCreateDept, imsDutyClassType.getCreateDept());
}
queryWrapper.orderByDesc(ImsDutyClassTypeEntity::getCreateTime);
IPage<ImsDutyClassTypeEntity> pages = imsDutyClassTypeService.page(Condition.getPage(query), queryWrapper);
return R.data(pages);
}
/**
* 分页 代码自定义代号
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@OperationAnnotation(moduleName = "值班管理",
title = "值班配置",
operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,
action = "分页")
@ApiOperation(value = "分页", notes = "传入imsDutyClassType")
public R<IPage<ImsDutyClassTypeEntity>> list(ImsDutyClassTypeEntity imsDutyClassType, Query query) {
LambdaQueryWrapper<ImsDutyClassTypeEntity> queryWrapper = Condition.getQueryWrapper(new ImsDutyClassTypeEntity(), imsDutyClassType);
if (null != imsDutyClassType.getCreateDept()) {
queryWrapper.eq(ImsDutyClassTypeEntity::getCreateDept, imsDutyClassType.getCreateDept());
}
queryWrapper.orderByDesc(ImsDutyClassTypeEntity::getCreateTime);
IPage<ImsDutyClassTypeEntity> pages = imsDutyClassTypeService.page(Condition.getPage(query), queryWrapper);
return R.data(pages);
}
/**
* 获取所有班次类型 代码自定义代号
*/
@GetMapping("/listClassType")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "获取所有班次类型")
public R<List<ImsDutyClassTypeEntity>> listClassType(@RequestParam(required = false) Long createDept) {
List<ImsDutyClassTypeEntity> list = imsDutyClassTypeService.list(new LambdaQueryWrapper<ImsDutyClassTypeEntity>() {{
if (null != createDept) {
eq(ImsDutyClassTypeEntity::getCreateDept, createDept);
}
}});
return R.data(list);
}
/**
* 获取所有班次类型 代码自定义代号
*/
@GetMapping("/listClassType")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "获取所有班次类型")
public R<List<ImsDutyClassTypeEntity>> listClassType(@RequestParam(required = false) Long createDept) {
List<ImsDutyClassTypeEntity> list = imsDutyClassTypeService.list(new LambdaQueryWrapper<ImsDutyClassTypeEntity>() {{
if (null != createDept) {
eq(ImsDutyClassTypeEntity::getCreateDept, createDept);
}
}});
return R.data(list);
}
/**
* 新增或修改 代码自定义代号
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入imsDutyClassType")
public R submit(@Valid @RequestBody ImsDutyClassTypeEntity imsDutyClassType) {
return imsDutyClassTypeService.saveOrUpdateImsDutyClassType(imsDutyClassType);
}
/**
* 新增或修改 代码自定义代号
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入imsDutyClassType")
public R submit(@Valid @RequestBody ImsDutyClassTypeEntity imsDutyClassType) {
return imsDutyClassTypeService.saveOrUpdateImsDutyClassType(imsDutyClassType);
}
/**
* 删除 代码自定义代号
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return imsDutyClassTypeService.doDeleteLogic(Func.toLongList(ids));
}
/**
* 删除 代码自定义代号
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return imsDutyClassTypeService.doDeleteLogic(Func.toLongList(ids));
}
/**
* 获取不存在班次中的班次类型
*/
@GetMapping("/classTypeList")
@ApiOperationSupport(order = 9)
@OperationAnnotation(moduleName = "值班管理",title = "班次类型设置",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,action
= "获取不存在班次中的班次类型")
@ApiOperation(value = "获取不存在班次中的班次类型", notes = "传入ids")
public R<List<ImsDutyClassTypeEntity>> classTypeList(@ApiParam(value = "机构ID", required = true) @RequestParam Long createDept,@ApiParam(value = "班次类型ID", required = true) @RequestParam(required = false) Long classTypeId) {
return R.data(imsDutyClassTypeService.getClassTypeList(createDept,classTypeId));
}
/**
* 获取不存在班次中的班次类型
*/
@GetMapping("/classTypeList")
@ApiOperationSupport(order = 9)
@OperationAnnotation(moduleName = "值班管理", title = "班次类型设置", operatorType = OperatorType.MOBILE, businessType =
BusinessType.GENCODE, action
= "获取不存在班次中的班次类型")
@ApiOperation(value = "获取不存在班次中的班次类型", notes = "传入ids")
public R<List<ImsDutyClassTypeEntity>> classTypeList(@ApiParam(value = "机构ID", required = true) @RequestParam Long createDept, @ApiParam(value = "班次类型ID", required = true) @RequestParam(required = false) Long classTypeId) {
return R.data(imsDutyClassTypeService.getClassTypeList(createDept, classTypeId));
}
}

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyGroupController.java

@ -54,8 +54,10 @@ public class ImsDutyGroupController extends BladeController {
/**
* 分页 代码自定义代号
*/
@OperationAnnotation(moduleName = "值班管理",title = "班组管理",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,action
= "分页")
@OperationAnnotation(moduleName = "值班管理",title = "签到记录",
operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,
action = "分页")
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入imsDutyGroup")

303
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyMainController.java

@ -2,6 +2,9 @@ package com.hnac.hzims.operational.duty.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity;
import com.hnac.hzims.operational.duty.service.IImsDutyMainService;
import com.hnac.hzims.operational.duty.vo.ChangeDutyMainVo;
@ -34,75 +37,75 @@ import java.util.List;
@Api(value = "值班信息主表controller", tags = "值班信息主表相关操作")
public class ImsDutyMainController extends BladeController {
private final IImsDutyMainService imsDutyMainService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入imsDutyMainEntity")
public R<ImsDutyMainEntity> detail(ImsDutyMainEntity imsDutyMain) {
ImsDutyMainEntity detail = imsDutyMainService.getOne(Condition.getQueryWrapper(imsDutyMain));
return R.data(detail);
}
/**
* 分页 代码自定义代号
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入imsDutyMain")
public R<IPage<ImsDutyMainEntity>> list(ImsDutyMainEntity imsDutyMain, Query query) {
IPage<ImsDutyMainEntity> pages = imsDutyMainService.page(Condition.getPage(query), Condition.getQueryWrapper(imsDutyMain));
return R.data(pages);
}
/**
* 根据时间查询所有值班信息列表(不分页)
*/
@GetMapping("/getList")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "列表(不分页)", notes = "传入imsDutyMain")
public R getlists(@ApiParam(value = "值班时间") @Valid @RequestParam("dutyDate") String dutyDate, @ApiParam(value = "申请人ID") Long personId) {
return imsDutyMainService.getByDateListAll(dutyDate, personId);
}
/**
* 新增或修改 代码自定义代号
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入imsDutyMain")
public R submit(@Valid @RequestBody ImsDutyMainEntity imsDutyMain) {
return imsDutyMainService.saveOrUpdateImsDutyMain(imsDutyMain);
}
/**
* 删除 代码自定义代号
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return imsDutyMainService.deleteV2(Func.toLongList(ids));
}
/**
* 排班管理
*/
@PostMapping("/scheduling")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "排班管理", notes = "")
public R scheduling(@Valid @RequestBody ImsSchedulingVo imsSchedulingVo) {
if (null == imsSchedulingVo.getCreateDept()) {
imsSchedulingVo.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
}
return imsDutyMainService.getSchedulingV2(imsSchedulingVo);
}
private final IImsDutyMainService imsDutyMainService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入imsDutyMainEntity")
public R<ImsDutyMainEntity> detail(ImsDutyMainEntity imsDutyMain) {
ImsDutyMainEntity detail = imsDutyMainService.getOne(Condition.getQueryWrapper(imsDutyMain));
return R.data(detail);
}
/**
* 分页 代码自定义代号
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入imsDutyMain")
public R<IPage<ImsDutyMainEntity>> list(ImsDutyMainEntity imsDutyMain, Query query) {
IPage<ImsDutyMainEntity> pages = imsDutyMainService.page(Condition.getPage(query), Condition.getQueryWrapper(imsDutyMain));
return R.data(pages);
}
/**
* 根据时间查询所有值班信息列表(不分页)
*/
@GetMapping("/getList")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "列表(不分页)", notes = "传入imsDutyMain")
public R getlists(@ApiParam(value = "值班时间") @Valid @RequestParam("dutyDate") String dutyDate, @ApiParam(value = "申请人ID") Long personId) {
return imsDutyMainService.getByDateListAll(dutyDate, personId);
}
/**
* 新增或修改 代码自定义代号
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入imsDutyMain")
public R submit(@Valid @RequestBody ImsDutyMainEntity imsDutyMain) {
return imsDutyMainService.saveOrUpdateImsDutyMain(imsDutyMain);
}
/**
* 删除 代码自定义代号
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return imsDutyMainService.deleteV2(Func.toLongList(ids));
}
/**
* 排班管理
*/
@PostMapping("/scheduling")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "排班管理", notes = "")
public R scheduling(@Valid @RequestBody ImsSchedulingVo imsSchedulingVo) {
if (null == imsSchedulingVo.getCreateDept()) {
imsSchedulingVo.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
}
return imsDutyMainService.getSchedulingV2(imsSchedulingVo);
}
// /**
// * 排班管理
@ -116,81 +119,89 @@ public class ImsDutyMainController extends BladeController {
// }
// return imsDutyMainService.getScheduling(imsSchedulingVo);
// }
/**
* 查询排班
*/
@PostMapping("/scheduling/list")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "查询排班", notes = "传年份和月份 year month")
public R schedulingList(@Valid @ApiParam(value = "年份", required = true) @RequestParam int year,
@ApiParam(value = "月份", required = true) @RequestParam int month,
@ApiParam(value = "机构Id", required = true) Long deptId) {
if (null == deptId) {
deptId = Long.valueOf(AuthUtil.getDeptId());
}
return imsDutyMainService.getSchedulingListV2(year, month, deptId);
}
/**
* 根据值班id查询值班人员
*/
@PostMapping("/person")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "根据值班id查询人员", notes = "传id")
public R person(@ApiParam(value = "值班Id", required = true) @RequestParam Long id) {
return imsDutyMainService.getMainIdByPersonV2(id);
}
/**
* 数据清理
*/
@PostMapping("/dataDelete")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "数据清理", notes = "传id")
public R dataDelete(@ApiParam(value = "机构ID", required = true) @RequestParam Long deptId,
@ApiParam(value = "开始时间", required = true) @RequestParam String startDate,
@ApiParam(value = "结束时间", required = true) @RequestParam String endDate) {
return imsDutyMainService.dataDelete(deptId, startDate, endDate);
}
/**
* 根据值班id查询值班人员
*/
@GetMapping("/getHomePageDutyInfo")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "获取首页值班数据", notes = "传id")
public R<List<HomePageDutyMainInfoVo>> getHomePageDutyInfo(Long deptId) {
return R.data(imsDutyMainService.getHomePageDutyInfo(deptId));
}
/**
* 返回对应部门所有人员
*/
@GetMapping("/getAllPersonInfo")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "返回对应部门所有人员", notes = "")
public R getAllPersonInfo(Long deptId) {
return R.data(imsDutyMainService.getAllPersonInfo(deptId));
}
/**
* 值班人员ID对应班次信息
*/
@GetMapping("/getDutyMainInfoVoById")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "值班人员ID对应班次信息", notes = "")
public R getDutyMainInfoVoById(@ApiParam(value = "机构ID") Long deptId,@ApiParam(value = "申请人ID") Long personId) {
return imsDutyMainService.getDutyEmergencyEntityById(deptId,personId);
}
/**
*灵活调入调出
*/
@PostMapping("/updateDutyMainInfoVoById")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "灵活调入,调出", notes = "")
public R updateDutyMainInfoVoById(@RequestBody ChangeDutyMainVo changeDutyMainVo) {
return imsDutyMainService.updateDutyMainInfoVoById(changeDutyMainVo);
}
/**
* 查询排班
*/
@PostMapping("/scheduling/list")
@ApiOperationSupport(order = 8)
@OperationAnnotation(moduleName = "值班管理", title = "排班计划",
operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE, action = "查询排班")
@ApiOperation(value = "查询排班", notes = "传年份和月份 year month")
public R schedulingList(@Valid @ApiParam(value = "年份", required = true) @RequestParam int year,
@ApiParam(value = "月份", required = true) @RequestParam int month,
@ApiParam(value = "机构Id", required = true) Long deptId) {
if (null == deptId) {
deptId = Long.valueOf(AuthUtil.getDeptId());
}
return imsDutyMainService.getSchedulingListV2(year, month, deptId);
}
/**
* 根据值班id查询值班人员
*/
@PostMapping("/person")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "根据值班id查询人员", notes = "传id")
public R person(@ApiParam(value = "值班Id", required = true) @RequestParam Long id) {
return imsDutyMainService.getMainIdByPersonV2(id);
}
/**
* 数据清理
*/
@PostMapping("/dataDelete")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "数据清理", notes = "传id")
public R dataDelete(@ApiParam(value = "机构ID", required = true) @RequestParam Long deptId,
@ApiParam(value = "开始时间", required = true) @RequestParam String startDate,
@ApiParam(value = "结束时间", required = true) @RequestParam String endDate) {
return imsDutyMainService.dataDelete(deptId, startDate, endDate);
}
/**
* 根据值班id查询值班人员
*/
@GetMapping("/getHomePageDutyInfo")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "获取首页值班数据", notes = "传id")
public R<List<HomePageDutyMainInfoVo>> getHomePageDutyInfo(Long deptId) {
return R.data(imsDutyMainService.getHomePageDutyInfo(deptId));
}
/**
* 返回对应部门所有人员
*/
@GetMapping("/getAllPersonInfo")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "返回对应部门所有人员", notes = "")
@OperationAnnotation(moduleName = "值班管理", title = "调班管理",
operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,
action = "返回对应部门所有人员")
public R getAllPersonInfo(Long deptId) {
return R.data(imsDutyMainService.getAllPersonInfo(deptId));
}
/**
* 值班人员ID对应班次信息
*/
@GetMapping("/getDutyMainInfoVoById")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "值班人员ID对应班次信息", notes = "")
public R getDutyMainInfoVoById(@ApiParam(value = "机构ID") Long deptId, @ApiParam(value = "申请人ID") Long personId) {
return imsDutyMainService.getDutyEmergencyEntityById(deptId, personId);
}
/**
* 灵活调入调出
*/
@PostMapping("/updateDutyMainInfoVoById")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "灵活调入,调出", notes = "")
public R updateDutyMainInfoVoById(@RequestBody ChangeDutyMainVo changeDutyMainVo) {
return imsDutyMainService.updateDutyMainInfoVoById(changeDutyMainVo);
}
}

10
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecController.java

@ -79,7 +79,8 @@ public class ImsDutyRecController extends BladeController {
/**
* 自定义分页 附件表
*/
@OperationAnnotation(title = "交接班记录",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "值班管理",title = "交接班记录",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页--交接班记录")
@GetMapping("/pageList")
@ApiOperationSupport(order = 3)
@ -254,6 +255,9 @@ public class ImsDutyRecController extends BladeController {
*/
@PostMapping("/queryEmergency")
@ApiOperationSupport(order = 6)
@OperationAnnotation(moduleName = "值班管理",title = "值班突发事件登记",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,action
= "列表(不分页)")
@ApiOperation(value = "查询突发事件记录", notes = "传入imsDutyEmergencyEntity")
public R queryEmergency( @Valid @RequestBody ImsDutyEmergencyVo imsDutyEmergencyVo,Query query) {
return iImsDutyEmergencyService.queryEntity(imsDutyEmergencyVo,query);
@ -286,6 +290,10 @@ public class ImsDutyRecController extends BladeController {
@PostMapping("/queryAnalyseExample")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "查询分析实例模板", notes = "传入analyseExample")
@OperationAnnotation(moduleName = "值班管理", title = "值班日志配置",
operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,
action = "查询分析实例模板")
public R queryAnalyseExample( AnalyseExample analyseExample,Query query) {
return iImsAnalyseExampleService.queryAnalyseExample(analyseExample,query);
}

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/GenerateController.java

@ -2,6 +2,9 @@ package com.hnac.hzims.operational.fill.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.fill.entity.GenerateEntity;
import com.hnac.hzims.operational.fill.service.GenerateService;
import com.hnac.hzims.operational.fill.vo.GenerateVo;
@ -57,6 +60,9 @@ public class GenerateController extends BladeController {
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 4)
@OperationAnnotation(moduleName = "数据填报",
title = "水电站发电量填报",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页")
@ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode")
public R<IPage<GenerateVo>> list(QueryVo filter, Query query) {
return service.pageCondition(filter, query);

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/OtherController.java

@ -66,8 +66,9 @@ public class OtherController extends BladeController {
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 4)
@OperationAnnotation(title = "其他填报",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页条件")
@OperationAnnotation(moduleName = "数据填报",
title = "配置数据填报",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页")
@ApiOperation(value = "分页", notes = "查询条件:createDept,fileName,startTime,endTime")
public R<IPage<OtherVo>> list(OtherVo vo, Query query) {
return service.pageCondition(vo, query);

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/OverConfigController.java

@ -66,7 +66,8 @@ public class OverConfigController extends BladeController {
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 4)
@OperationAnnotation(title = "检修卡配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "数据填报",
title = "配置数据填报",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "查询条件")
@ApiOperation(value = "分页", notes = "查询条件:over_name")
public R<IPage<OverConfigVo>> list(OverConfigVo vo, Query query) {

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/OverController.java

@ -67,8 +67,9 @@ public class OverController extends BladeController {
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 4)
@OperationAnnotation(title = "检修卡填报",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页条件")
@OperationAnnotation(moduleName = "数据填报",
title = "配置数据填报",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页")
@ApiOperation(value = "分页", notes = "查询条件:createDept,fileName,startTime,endTime")
public R<IPage<OverVo>> list(OverVo vo, Query query) {
return service.pageCondition(vo, query);

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/PowerController.java

@ -66,8 +66,9 @@ public class PowerController extends BladeController {
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 4)
@OperationAnnotation(title = "(风电 光扶)数据填报",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页条件")
@OperationAnnotation(moduleName = "数据填报",
title = "风电数据填报",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页")
@ApiOperation(value = "分页", notes = "查询条件:createDept,fileName,startTime,endTime")
public R<IPage<PowerVo>> list(PowerVo vo, Query query) {
return service.pageCondition(vo, query);

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/RainfallController.java

@ -1,6 +1,9 @@
package com.hnac.hzims.operational.fill.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.fill.vo.RainfallVo;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.mp.support.Query;
@ -58,6 +61,9 @@ public class RainfallController extends BladeController {
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 4)
@OperationAnnotation(moduleName = "数据填报",
title = "降雨量填报",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页")
@ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode")
public R<IPage<RainfallVo>> list(QueryVo filter, Query query) {
return service.pageCondition(filter, query);

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/SolveController.java

@ -66,8 +66,9 @@ public class SolveController extends BladeController {
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 4)
@OperationAnnotation(title = "消缺填报",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页条件")
@OperationAnnotation(moduleName = "数据填报",
title = "配置数据填报",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页")
@ApiOperation(value = "分页", notes = "查询条件:startDate,endDate,createDept")
public R<IPage<SolveVo>> list(SolveVo vo, Query query) {
return service.pageCondition(vo, query);

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/StorageController.java

@ -2,6 +2,9 @@ package com.hnac.hzims.operational.fill.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.fill.entity.StorageEntity;
import com.hnac.hzims.operational.fill.service.StorageService;
import com.hnac.hzims.operational.fill.vo.QueryVo;
@ -55,6 +58,9 @@ public class StorageController extends BladeController {
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 4)
@OperationAnnotation(moduleName = "数据填报",
title = "储能站发电量填报",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页")
@ApiOperation(value = "分页", notes = "查询条件:startTime,endTime,stationCode")
public R<IPage<StorageEntity>> list(QueryVo vo, Query query) {
return service.pageCondition(vo, query);

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/UseController.java

@ -2,6 +2,9 @@ package com.hnac.hzims.operational.fill.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.fill.entity.UseEntity;
import com.hnac.hzims.operational.fill.service.UseService;
import com.hnac.hzims.operational.fill.vo.QueryVo;
@ -56,6 +59,9 @@ public class UseController extends BladeController {
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 4)
@OperationAnnotation(moduleName = "数据填报",
title = "磊站用电填报",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页")
@ApiOperation(value = "分页", notes = "查询条件::startTime,endTime,stationCode")
public R<IPage<UseVo>> list(QueryVo filter, Query query) {
return service.pageCondition(filter, query);

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/OtherMapper.java

@ -0,0 +1,8 @@
package com.hnac.hzims.operational.fill.mapper;
import com.hnac.hzims.operational.fill.entity.OtherEntity;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
public interface OtherMapper extends UserDataScopeBaseMapper<OtherEntity> {
}

25
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/mapper/OtherMapper.xml

@ -0,0 +1,25 @@
<?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.operational.fill.mapper.OtherMapper">
<resultMap id="BaseResultMap" type="com.hnac.hzims.operational.fill.entity.OtherEntity">
<id column="ID" property="id" jdbcType="BIGINT"/>
<result column="START_DATE" property="startDate" jdbcType="DATE"/>
<result column="END_DATE" property="endDate" jdbcType="DATE"/>
<result column="FA_QUANTITY" property="faQuantity" jdbcType="BIGINT"/>
<result column="ONLINE_RATE" property="onlineRate" jdbcType="VARCHAR"/>
<result column="TENANT_ID" property="tenantId" jdbcType="VARCHAR"/>
<result column="STATUS" property="status" jdbcType="TINYINT"/>
<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>
<sql id="Base_Column_List">
ID, START_DATE, END_DATE , FA_QUANTITY , ONLINE_RATE ,TENANT_ID, STATUS, CREATE_TIME,
UPDATE_TIME, CREATE_USER, UPDATE_USER, IS_DELETED, CREATE_DEPT
</sql>
</mapper>

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/HomePageController.java

@ -82,8 +82,8 @@ public class HomePageController extends BladeController {
@ApiLog
@ApiOperation("年计划发电完成趋势")
@GetMapping("/planAactualTrend")
@OperationAnnotation(moduleName = "演示大屏",title = "演示大屏", operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,action = "年计划发电完成趋势")
// @OperationAnnotation(moduleName = "演示大屏",title = "演示大屏", operatorType = OperatorType.MOBILE,
// businessType = BusinessType.GENCODE,action = "年计划发电完成趋势")
@ApiOperationSupport(order = 6)
public R<List<PowerMonthVo>> planActualTrend(@ApiParam(value = "区域机构ID") Long deptId) {
return R.data(homePageService.planActualTrend(deptId));

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/MainSystemMonitoringController.java

@ -128,7 +128,7 @@ public class MainSystemMonitoringController {
@GetMapping("/listByAuthDept")
@OperationAnnotation(moduleName = "值班管理",
title = "排班计划",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,action
title = "值班配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,action
= "根据用户权限查询站点及部门")
@ApiOperationSupport(order = 100)
@ApiOperation(value = "根据用户权限查询站点及部门", notes = "")

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/scheduled/ScheduledCreateTask.java

@ -195,7 +195,7 @@ public class ScheduledCreateTask {
* 首页-区域设备分类统计
* @return ReturnT<String>
*/
@XxlJob(DEVICE_CLASSIFY)
@XxlJob(LOAD_DEVICE_CLASSIFY)
//@Scheduled(cron = "0/10 * * * * ? ")
public ReturnT<String> deviceClassify(String param) throws Exception {
if (Func.isBlank(param)) {

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/SideHustleServiceImpl.java

@ -29,7 +29,7 @@ import com.hnac.hzims.operational.main.vo.*;
import com.hnac.hzims.operational.maintenance.constants.MaintenanceConstant;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceTaskEntity;
import com.hnac.hzims.operational.maintenance.service.IOperMaintenanceTaskService;
import com.hnac.hzims.operational.maintenance.vo.RegularWorkVO;
import com.hnac.hzims.operational.main.vo.RegularWorkVO;
import com.hnac.hzims.operational.report.vo.DutyDefectVO;
import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.service.IStationService;

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/OperMaintenanceLibraryController.java

@ -87,7 +87,7 @@ public class OperMaintenanceLibraryController extends BladeController {
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 50)
@OperationAnnotation(moduleName = "设备管理",title = "设备维护库",operatorType = OperatorType.MOBILE,businessType =
@OperationAnnotation(moduleName = "日常维护",title = "设备维护库",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页 查询参数:libraryCode,emCode,typeCode,procDefId,disposers(仅支持一人)")
@ApiOperation(value = "分页 查询参数:libraryCode,emCode,typeCode,procDefId,disposers(仅支持一人)")

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/IOperMaintenanceTaskService.java

@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceTaskDTO;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceTaskEntity;
import com.hnac.hzims.operational.maintenance.vo.OperMaintenanceTaskVO;
import com.hnac.hzims.operational.maintenance.vo.RegularWorkVO;
import com.hnac.hzims.operational.main.vo.RegularWorkVO;
import com.hnac.hzims.operational.report.vo.MaintenanceReportVO;
import com.hnac.hzims.ticket.areamonthly.vo.MaintenanceTaskVo;
import com.hnac.hzims.ticket.areamonthly.vo.MaintenanceTaskWithAreaVo;

10
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java

@ -10,21 +10,18 @@ import com.google.common.collect.Lists;
import com.hnac.hzims.operational.defect.constants.DefectConstant;
import com.hnac.hzims.operational.defect.entity.OperPhenomenonEntity;
import com.hnac.hzims.operational.defect.mapper.OperPhenomenonMapper;
import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity;
import com.hnac.hzims.operational.duty.service.IImsDutyClassService;
import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceTaskDTO;
import com.hnac.hzims.operational.maintenance.vo.RegularWorkVO;
import com.hnac.hzims.operational.report.vo.MaintenanceReportVO;
import com.hnac.hzims.operational.main.vo.RegularWorkVO;
import com.hnac.hzims.operational.maintenance.constants.DictConstant;
import com.hnac.hzims.operational.maintenance.constants.MaintenanceConstant;
import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceTaskDTO;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceTaskEntity;
import com.hnac.hzims.operational.maintenance.mapper.OperMaintenanceTaskMapper;
import com.hnac.hzims.operational.maintenance.service.IOperMaintenanceTaskService;
import com.hnac.hzims.operational.maintenance.vo.OperMaintenanceTaskVO;
import com.hnac.hzims.operational.maintenance.wrapper.OperMaintenanceTaskWrapper;
import com.hnac.hzims.operational.report.vo.MaintenanceReportVO;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.feign.IDangerSourceClient;
import com.hnac.hzims.ticket.areamonthly.vo.AreaMonthlyVo;
import com.hnac.hzims.ticket.areamonthly.vo.MaintenanceTaskVo;
import com.hnac.hzims.ticket.areamonthly.vo.MaintenanceTaskWithAreaVo;
import com.hnac.hzims.vo.SafeCheckStatisticVO;
@ -53,7 +50,6 @@ import org.springframework.util.CollectionUtils;
import java.text.DecimalFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;

6
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CheckMonthController.java

@ -3,6 +3,9 @@ package com.hnac.hzims.safeproduct.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.safeproduct.dto.CheckMonthDTO;
import com.hnac.hzims.safeproduct.entity.CheckMonthEntity;
import com.hnac.hzims.safeproduct.service.ICheckMonthService;
@ -98,6 +101,9 @@ public class CheckMonthController extends BladeController {
@GetMapping("/listNotDataScope")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:month,status,createDept")
@OperationAnnotation(moduleName = "安全管理",
title = "月度自查核查",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页")
public R<IPage<CheckMonthVo>> listNotDataScope(CheckMonthEntity req, Query query) {
R<IPage<CheckMonthVo>> pageR = checkMonthlyService.pageNotDataScope(req, query);
IPage<CheckMonthVo> page = pageR.getData();

6
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/DangerSourceController.java

@ -2,6 +2,9 @@ package com.hnac.hzims.safeproduct.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.safeproduct.dto.DangerSourceDTO;
import com.hnac.hzims.safeproduct.entity.DangerSourceEntity;
import com.hnac.hzims.safeproduct.service.IDangerSourceService;
@ -78,6 +81,9 @@ public class DangerSourceController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:eqId,level,`dangerEle,applyType,type")
@OperationAnnotation(moduleName = "安全管理",title = "危险点列表",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页")
public R<IPage<DangerSourceVO>> list(DangerSourceEntity req, Query query) {
return dangerSourceService.pageCondition(req, query);
}

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/EmergencyPlanController.java

@ -79,7 +79,8 @@ public class EmergencyPlanController extends BladeController {
@ApiLog
@GetMapping("/list")
@ApiOperationSupport(order = 50)
@OperationAnnotation(title = "应急预案文件",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "安全管理",title = "应急预案文件",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页条件")
@ApiOperation(value = "分页", notes = "查询条件:typeId,fileStatus,fileName")
public R<IPage<EmergencyPlanVO>> list(EmergencyPlanListDTO req, Query query) {

7
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ImsMonCameraInfoController.java

@ -3,6 +3,9 @@ package com.hnac.hzims.safeproduct.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.safeproduct.entity.ImsMonCameraInfoEntity;
import com.hnac.hzims.safeproduct.service.IImsMonCameraInfoService;
import io.swagger.annotations.*;
@ -76,6 +79,10 @@ public class ImsMonCameraInfoController extends BladeController {
@ApiImplicitParam(name = "isControl", value = "是否云台控制", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "isHikvideo", value = "是否平台接入", paramType = "query", dataType = "Integer"),
})
@OperationAnnotation(moduleName = "巡检管理", title = "智能巡检配置",
operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,
action = "分页")
public R<IPage<ImsMonCameraInfoEntity>> list(@ApiIgnore @RequestParam Map<String,Object> cameraInfo, Query query) {
QueryWrapper<ImsMonCameraInfoEntity> queryWrapper = new QueryWrapper<>();
if (!Func.isEmpty(cameraInfo.get("tenantId"))) {

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafeEquipmentTrialController.java

@ -57,7 +57,8 @@ public class SafeEquipmentTrialController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:createDept,fileName,startTime,endTime")
@OperationAnnotation(title = "设备试验",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "设备管理",title = "设备试验",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页条件")
public R<BladePage<SafeEquipmentTrialVO>> list(SafeEquipmentTrialDTO safeEquipmentTrialDTO, Query query) {
return service.pageCondition(safeEquipmentTrialDTO, query);

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SystemFileController.java

@ -85,7 +85,8 @@ public class SystemFileController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:fTypeId,fileStatus,fileName")
@OperationAnnotation(title = "体系文件",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "安全管理",title = "体系文件",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页条件")
public R<IPage<SystemFileVO>> list(SystemFileListDTO req, Query query) {
return systemFileService.pageCondition(req, query);

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/OperRepairController.java

@ -56,7 +56,8 @@ public class OperRepairController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "确认抢修单", notes = "流程对象")
@OperationAnnotation(title = "两票管理(应急单)",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
@OperationAnnotation(moduleName = "两票管理",title = "应急单",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "确认抢修单")
public R<IPage<RepairVO>> list(RepairEntity entity, Query query) {
return R.data(service.pages(entity,query));

22
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/OperationTicketController.java

@ -1,16 +1,15 @@
package com.hnac.hzims.ticket.standardTicket.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.ticket.standardTicket.service.OperationTicketService;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
/**
* 操作票
@ -44,4 +43,17 @@ public class OperationTicketController {
/**
* 新预览
*/
@GetMapping("/newPreview")
@ApiOperation(value = "新预览")
@ApiOperationSupport(order = 11)
public void preview(@RequestParam(value = "ticketId", required = true) Long ticketId,
@RequestParam(value = "status", required = true) Integer status,
HttpServletResponse response) {
operationTicketService.newPreview(ticketId, status, response);
}
}

8
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketInfoService.java

@ -10,6 +10,7 @@ import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo;
import com.hnac.hzims.ticket.standardTicket.dto.StandardTicketInfoDto;
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity;
import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketInfoVO;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo;
import com.hnac.hzims.ticket.workTicket.vo.TicketMonthVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.mp.support.BladePage;
@ -109,4 +110,11 @@ public interface IStandardTicketInfoService extends BaseService<StandardTicketIn
*/
BladePage<StandardTicketVo> areaMonthlyWithOperation(StandardTicketWithAreaVo areaMonthly, Page<StandardTicketInfoEntity> searchPage);
/**
* 根据Id获取操作票详细信息
* @param ticketId
* @return
*/
StandardTicketInfoVo selectDetailsById(Long ticketId);
}

7
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketMeasureService.java

@ -61,4 +61,11 @@ public interface IStandardTicketMeasureService extends BaseService<StandardTicke
* @return
*/
boolean update(StandardTicketMeasureDto dto);
/**
* 根据ticketId获取安全措施信息
* @param ticketId
* @return
*/
List<StandardTicketMeasureEntity> listStandardByTicketId(Long ticketId);
}

11
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/OperationTicketService.java

@ -4,6 +4,8 @@ import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import javax.servlet.http.HttpServletResponse;
/**
* @Author WL
* @Version v1.0
@ -25,4 +27,13 @@ public interface OperationTicketService {
* @param response
*/
void findPending(ProcessWorkFlowResponse response);
/**
* 新预览
* @param ticketId 操作票id
* @param status 状态
* @param response 扩展 ServletResponse 接口以在发送响应时提供特定于 HTTP 的功能例如它具有访问HTTP标头和cookie的方法
*/
void newPreview(Long ticketId, Integer status, HttpServletResponse response);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save