diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java index ac7dd89..6fbd377 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java @@ -73,6 +73,9 @@ public interface MainConstants { // 开停机告警 String START_STOP_ALARM = "startStopAlarm"; + // 数据通讯中断 + String INTERRUPT_ALARM = "interruptAlarm"; + // realId获取 String REAL_ID_DATA = "realIdData"; diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/vo/WorkTaskPreviewVO.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/vo/WorkTaskPreviewVO.java index 88110e8..f2c503f 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/vo/WorkTaskPreviewVO.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/vo/WorkTaskPreviewVO.java @@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode; import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; +import java.util.List; /** * @author ysj @@ -38,10 +39,7 @@ public class WorkTaskPreviewVO extends WorkTaskEntity { private Integer groupCount; @ApiModelProperty(value = "工作地点") - private String location; - - @ApiModelProperty(value = "工作内容") - private String content; + private List contents; @ApiModelProperty(value = "计划工作时间") private String planTimeInterval; diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/vo/CensParamVo.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/vo/CensParamVo.java index ebc35d5..2056c78 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/vo/CensParamVo.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/vo/CensParamVo.java @@ -18,7 +18,7 @@ public class CensParamVo { @ApiModelProperty("结束时间: yyyy-MM-dd HH:mm:ss") private String endTime; - @ApiModelProperty("状态 : 0-全部 1-完成") + @ApiModelProperty("状态 : 0-未完成 1-完成") private Integer state; @ApiModelProperty("结束") diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/AlarmScheduledTask.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/AlarmScheduledTask.java index f6b7552..dc3f1ea 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/AlarmScheduledTask.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/AlarmScheduledTask.java @@ -12,6 +12,7 @@ import org.springframework.stereotype.Component; import java.util.Date; +import static com.hnac.hzims.operational.main.constant.MainConstants.INTERRUPT_ALARM; import static com.hnac.hzims.operational.main.constant.MainConstants.START_STOP_ALARM; @@ -40,7 +41,7 @@ public class AlarmScheduledTask { return new ReturnT<>("SUCCESS"); } - @XxlJob(START_STOP_ALARM) + @XxlJob(INTERRUPT_ALARM) //@Scheduled(cron = "0/40 * * * * ? ") public ReturnT interruptAlarm(String param) { if (Func.isBlank(param)) { diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java index ba64a08..c092e7b 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java @@ -29,8 +29,10 @@ public class MonitorScheduledTask { /** * realId刷新 */ - @XxlJob(REAL_ID_DATA) - public ReturnT loadRealId(String param) { + //@XxlJob(REAL_ID_DATA) + @Scheduled(cron = "0/40 * * * * ? ") + public ReturnT loadRealId() { + String param = ""; if (Func.isBlank(param)) { param = DateUtil.format(new Date(), "yyyy-MM"); } @@ -42,9 +44,10 @@ public class MonitorScheduledTask { * 实时数据刷新 * @return ReturnT */ - @XxlJob(REAL_TIME_DATA) - //@Scheduled(cron = "0/40 * * * * ? ") - public ReturnT loadRealData( String param) { + //@XxlJob(REAL_TIME_DATA) + @Scheduled(cron = "0/40 * * * * ? ") + public ReturnT loadRealData() { + String param = ""; if (Func.isBlank(param)) { param = DateUtil.format(new Date(), "yyyy-MM"); } @@ -56,9 +59,10 @@ public class MonitorScheduledTask { * 集中监控数据处理 * @return ReturnT */ - @XxlJob(CENTRALIZED_MONITORING) - //@Scheduled(cron = "0/40 * * * * ? ") - public ReturnT loadMonitoring(String param) { + //@XxlJob(CENTRALIZED_MONITORING) + @Scheduled(cron = "0/40 * * * * ? ") + public ReturnT loadMonitoring() { + String param = ""; if (Func.isBlank(param)) { param = DateUtil.format(new Date(), "yyyy-MM"); } diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java index 342847e..ed2e703 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java @@ -33,9 +33,10 @@ public class RealTargetScheduledTask { * @return * @throws Exception */ - @XxlJob(LOAD_EM_INFO) - //@Scheduled(cron = "0/40 * * * * ? ") - public ReturnT loadEmInfo(String param) { + //@XxlJob(LOAD_EM_INFO) + @Scheduled(cron = "0/40 * * * * ? ") + public ReturnT loadEmInfo() { + String param = ""; if (Func.isBlank(param)) { param = DateUtil.format(new Date(), "yyyy-MM"); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java index 1653362..4829bc6 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java @@ -5,21 +5,14 @@ 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.access.dto.AccessPlanV4DTO; -import com.hnac.hzims.operational.access.dto.OperAccessPlanDTO; -import com.hnac.hzims.operational.access.dto.OperAccessPlanFlowDTO; -import com.hnac.hzims.operational.access.dto.OperAccessPlanListDTO; import com.hnac.hzims.operational.access.entity.OperConstructionEntity; -import com.hnac.hzims.operational.access.service.AccessPlanV4Service; import com.hnac.hzims.operational.access.service.ConstructionService; import com.hnac.hzims.operational.access.vo.ConstructionVo; -import com.hnac.hzims.operational.access.vo.OperAccessPlanVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; -import org.springblade.core.log.annotation.ApiLog; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java index 33ed9c8..d9a0fed 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java @@ -55,6 +55,7 @@ public class ConstructionServiceImpl extends BaseServiceImpl pageCondition(IPage page, ConstructionVo construction) { QueryWrapper wrapper = Condition.getQueryWrapper(construction); + wrapper.orderByDesc("CREATE_TIME"); if(StringUtil.isNotBlank(construction.getStartTime())){ wrapper.ge("CREATE_TIME",construction.getStartTime()); } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java index 90f1657..898d46f 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java @@ -36,8 +36,8 @@ public class WorkTaskController extends BladeController { @GetMapping("/list") @ApiOperationSupport(order = 1) @ApiOperation(value = "分页") - public R> list(WorkTaskVO workTask, Query query) { - return R.data(workTaskService.workTaskService(Condition.getPage(query), workTask)); + public R> pageCondition(WorkTaskVO workTask, Query query) { + return R.data(workTaskService.pageCondition(Condition.getPage(query), workTask)); } @GetMapping("/detail") diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java index 119bdf0..6db49f1 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java @@ -19,7 +19,7 @@ public interface IWorkTaskService extends BaseService { boolean listener(ProcessWorkFlowResponse processWorkFlowResponse); - IPage workTaskService(IPage page, WorkTaskVO workTask); + IPage pageCondition(IPage page, WorkTaskVO workTask); void preview(Long id); diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java index 9fb5eb9..d6ef6df 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java @@ -48,6 +48,7 @@ import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.*; +import java.util.stream.Collectors; /** * @author ysj @@ -165,22 +166,26 @@ public class WorkTaskServiceImpl extends BaseServiceImpl workTaskService(IPage page, WorkTaskVO workTask) { - QueryWrapper wrapper = Condition.getQueryWrapper(workTask); + public IPage pageCondition(IPage page, WorkTaskVO workTask) { + QueryWrapper wrapper = new QueryWrapper(); + wrapper.lambda().orderByDesc(WorkTaskEntity::getCreateTime); if(StringUtil.isNotBlank(workTask.getStartTime())){ - wrapper.ge("CREATE_TIME",workTask.getStartTime()); + wrapper.lambda().ge(WorkTaskEntity::getCreateTime,workTask.getStartTime()); } if(StringUtil.isNotBlank(workTask.getEndTime())){ - wrapper.le("CREATE_TIME",workTask.getEndTime()); + wrapper.lambda().le(WorkTaskEntity::getCreateTime,workTask.getEndTime()); } if(ObjectUtil.isNotEmpty(workTask.getGroupId())){ - wrapper.eq("GROUP_ID",workTask.getGroupId()); + wrapper.lambda().eq(WorkTaskEntity::getGroupId,workTask.getGroupId()); } - if(ObjectUtil.isNotEmpty(workTask.getGroupId())){ - wrapper.eq("CREATE_DEPT",workTask.getDeptId()); + if(ObjectUtil.isNotEmpty(workTask.getGroupName())){ + wrapper.lambda().like(WorkTaskEntity::getGroupName,workTask.getGroupName()); + } + if(ObjectUtil.isNotEmpty(workTask.getDeptId())){ + wrapper.lambda().eq(WorkTaskEntity::getCreateDept,workTask.getDeptId()); } if(ObjectUtil.isNotEmpty(workTask.getTaskName())){ - wrapper.eq("TASK_NAME",workTask.getTaskName()); + wrapper.lambda().eq(WorkTaskEntity::getTaskName,workTask.getTaskName()); } return super.page(page, wrapper); } @@ -246,13 +251,7 @@ public class WorkTaskServiceImpl extends BaseServiceImpl contents = JSONObject.parseObject(preview.getWorkTask(), new TypeReference>() {}); if(CollectionUtil.isNotEmpty(contents)){ - StringBuilder location = new StringBuilder(),content = new StringBuilder(); - for(WorkTaskContentVO item : contents){ - location.append(item.getLocation()).append("\n"); - content.append(item.getContent()).append("\n"); - } - preview.setLocation(location.substring(0,location.toString().length() - 1)); - preview.setContent(content.substring(0,location.toString().length() - 1)); + preview.setContents(contents); } } // 计划工作时间 diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/CensServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/CensServiceImpl.java index b83958b..6dfc999 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/CensServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/CensServiceImpl.java @@ -65,9 +65,6 @@ public class CensServiceImpl implements CensService { if(StringUtil.isEmpty(param.getEndTime())){ param.setStartTime(DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME)); } - if(!StringUtil.isEmpty(param.getState()) && param.getState().equals(1)){ - param.setFlowTaskName("结束"); - } // 获取权限区域机构 List depts; @@ -87,8 +84,12 @@ public class CensServiceImpl implements CensService { // 操作票查询 QueryWrapper wrapper = new QueryWrapper(); - if(!StringUtil.isEmpty(param.getFlowTaskName())){ - wrapper.eq("FLOW_TASK_NAME",param.getFlowTaskName()); + if(!StringUtil.isEmpty(param.getState())){ + if(param.getState().equals(1)){ + wrapper.eq("FLOW_TASK_NAME","结束"); + }else{ + wrapper.ne("FLOW_TASK_NAME","结束"); + } } if(!StringUtil.isEmpty(param.getStartTime())){ wrapper.ge("CREATE_TIME",param.getStartTime()); @@ -104,7 +105,6 @@ public class CensServiceImpl implements CensService { List operates = operateTicketService.list(wrapper); // 工作票查询 List works = workTicketInfoService.list(wrapper); - // 工作任务单 return depts.stream().map(dept->{ CensVo cens = new CensVo(); cens.setDeptId(dept.getId()); @@ -119,7 +119,6 @@ public class CensServiceImpl implements CensService { }else{ cens.setWorkCount(works.stream().filter(work->work.getCreateDept().equals(dept.getId())).count()); } - cens.setWorkTaskCount((long)new Random().nextInt(10)); return cens; }).collect(Collectors.toList()); } @@ -153,9 +152,6 @@ public class CensServiceImpl implements CensService { param.setEndTime(param.getYear() + "-12-31 23:59:59"); } - if(!StringUtil.isEmpty(param.getState()) && param.getState().equals(1)){ - param.setFlowTaskName("结束"); - } List depts; if(ObjectUtil.isEmpty(param.getDeptId())){ // 获取权限区域机构 @@ -173,8 +169,12 @@ public class CensServiceImpl implements CensService { // 操作票查询 QueryWrapper wrapper = new QueryWrapper(); - if(!StringUtil.isEmpty(param.getFlowTaskName())){ - wrapper.eq("FLOW_TASK_NAME",param.getFlowTaskName()); + if(!StringUtil.isEmpty(param.getState())){ + if(param.getState().equals(1)){ + wrapper.eq("FLOW_TASK_NAME","结束"); + }else{ + wrapper.ne("FLOW_TASK_NAME","结束"); + } } if(!StringUtil.isEmpty(param.getStartTime())){ wrapper.ge("CREATE_TIME",param.getStartTime()); diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/PdfUtils.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/PdfUtils.java index 61267e1..490b280 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/PdfUtils.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/PdfUtils.java @@ -122,7 +122,7 @@ public class PdfUtils { } //若为list则不处理 if (value instanceof List) { - return; + value = ((List) value).stream().map(PdfUtils::objectToMap).collect(Collectors.toList()); } //若为时间格式则进行格式化 if (value instanceof LocalDateTime) { diff --git a/hzims-service/ticket/src/main/resources/template/work/work_task_template.docx b/hzims-service/ticket/src/main/resources/template/work/work_task_template.docx index 94a3714..c79f0f5 100644 Binary files a/hzims-service/ticket/src/main/resources/template/work/work_task_template.docx and b/hzims-service/ticket/src/main/resources/template/work/work_task_template.docx differ