Browse Source

#工作任务单修改

zhongwei
yang_shj 10 months ago
parent
commit
a449c6ca81
  1. 3
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java
  2. 6
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/vo/WorkTaskPreviewVO.java
  3. 2
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/vo/CensParamVo.java
  4. 3
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/AlarmScheduledTask.java
  5. 20
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java
  6. 7
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java
  7. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java
  8. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java
  9. 4
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java
  10. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java
  11. 29
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java
  12. 24
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/CensServiceImpl.java
  13. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/PdfUtils.java
  14. BIN
      hzims-service/ticket/src/main/resources/template/work/work_task_template.docx

3
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 START_STOP_ALARM = "startStopAlarm";
// 数据通讯中断
String INTERRUPT_ALARM = "interruptAlarm";
// realId获取 // realId获取
String REAL_ID_DATA = "realIdData"; String REAL_ID_DATA = "realIdData";

6
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 org.springframework.format.annotation.DateTimeFormat;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* @author ysj * @author ysj
@ -38,10 +39,7 @@ public class WorkTaskPreviewVO extends WorkTaskEntity {
private Integer groupCount; private Integer groupCount;
@ApiModelProperty(value = "工作地点") @ApiModelProperty(value = "工作地点")
private String location; private List<WorkTaskContentVO> contents;
@ApiModelProperty(value = "工作内容")
private String content;
@ApiModelProperty(value = "计划工作时间") @ApiModelProperty(value = "计划工作时间")
private String planTimeInterval; private String planTimeInterval;

2
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") @ApiModelProperty("结束时间: yyyy-MM-dd HH:mm:ss")
private String endTime; private String endTime;
@ApiModelProperty("状态 : 0-全部 1-完成") @ApiModelProperty("状态 : 0-未完成 1-完成")
private Integer state; private Integer state;
@ApiModelProperty("结束") @ApiModelProperty("结束")

3
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 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; import static com.hnac.hzims.operational.main.constant.MainConstants.START_STOP_ALARM;
@ -40,7 +41,7 @@ public class AlarmScheduledTask {
return new ReturnT<>("SUCCESS"); return new ReturnT<>("SUCCESS");
} }
@XxlJob(START_STOP_ALARM) @XxlJob(INTERRUPT_ALARM)
//@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> interruptAlarm(String param) { public ReturnT<String> interruptAlarm(String param) {
if (Func.isBlank(param)) { if (Func.isBlank(param)) {

20
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java

@ -29,8 +29,10 @@ public class MonitorScheduledTask {
/** /**
* realId刷新 * realId刷新
*/ */
@XxlJob(REAL_ID_DATA) //@XxlJob(REAL_ID_DATA)
public ReturnT<String> loadRealId(String param) { @Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadRealId() {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -42,9 +44,10 @@ public class MonitorScheduledTask {
* 实时数据刷新 * 实时数据刷新
* @return ReturnT<String> * @return ReturnT<String>
*/ */
@XxlJob(REAL_TIME_DATA) //@XxlJob(REAL_TIME_DATA)
//@Scheduled(cron = "0/40 * * * * ? ") @Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadRealData( String param) { public ReturnT<String> loadRealData() {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -56,9 +59,10 @@ public class MonitorScheduledTask {
* 集中监控数据处理 * 集中监控数据处理
* @return ReturnT<String> * @return ReturnT<String>
*/ */
@XxlJob(CENTRALIZED_MONITORING) //@XxlJob(CENTRALIZED_MONITORING)
//@Scheduled(cron = "0/40 * * * * ? ") @Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadMonitoring(String param) { public ReturnT<String> loadMonitoring() {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }

7
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java

@ -33,9 +33,10 @@ public class RealTargetScheduledTask {
* @return * @return
* @throws Exception * @throws Exception
*/ */
@XxlJob(LOAD_EM_INFO) //@XxlJob(LOAD_EM_INFO)
//@Scheduled(cron = "0/40 * * * * ? ") @Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadEmInfo(String param) { public ReturnT<String> loadEmInfo() {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }

7
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.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType; 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.entity.OperConstructionEntity;
import com.hnac.hzims.operational.access.service.AccessPlanV4Service;
import com.hnac.hzims.operational.access.service.ConstructionService; import com.hnac.hzims.operational.access.service.ConstructionService;
import com.hnac.hzims.operational.access.vo.ConstructionVo; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController; 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.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;

1
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java

@ -55,6 +55,7 @@ public class ConstructionServiceImpl extends BaseServiceImpl<ConstructionMapper,
@Override @Override
public IPage<ConstructionVo> pageCondition(IPage<OperConstructionEntity> page, ConstructionVo construction) { public IPage<ConstructionVo> pageCondition(IPage<OperConstructionEntity> page, ConstructionVo construction) {
QueryWrapper wrapper = Condition.getQueryWrapper(construction); QueryWrapper wrapper = Condition.getQueryWrapper(construction);
wrapper.orderByDesc("CREATE_TIME");
if(StringUtil.isNotBlank(construction.getStartTime())){ if(StringUtil.isNotBlank(construction.getStartTime())){
wrapper.ge("CREATE_TIME",construction.getStartTime()); wrapper.ge("CREATE_TIME",construction.getStartTime());
} }

4
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") @GetMapping("/list")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "分页") @ApiOperation(value = "分页")
public R<IPage<WorkTaskEntity>> list(WorkTaskVO workTask, Query query) { public R<IPage<WorkTaskEntity>> pageCondition(WorkTaskVO workTask, Query query) {
return R.data(workTaskService.workTaskService(Condition.getPage(query), workTask)); return R.data(workTaskService.pageCondition(Condition.getPage(query), workTask));
} }
@GetMapping("/detail") @GetMapping("/detail")

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/IWorkTaskService.java

@ -19,7 +19,7 @@ public interface IWorkTaskService extends BaseService<WorkTaskEntity> {
boolean listener(ProcessWorkFlowResponse processWorkFlowResponse); boolean listener(ProcessWorkFlowResponse processWorkFlowResponse);
IPage<WorkTaskEntity> workTaskService(IPage<WorkTaskEntity> page, WorkTaskVO workTask); IPage<WorkTaskEntity> pageCondition(IPage<WorkTaskEntity> page, WorkTaskVO workTask);
void preview(Long id); void preview(Long id);

29
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.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @author ysj * @author ysj
@ -165,22 +166,26 @@ public class WorkTaskServiceImpl extends BaseServiceImpl<WorkTaskMapper, WorkTas
* @return * @return
*/ */
@Override @Override
public IPage<WorkTaskEntity> workTaskService(IPage<WorkTaskEntity> page, WorkTaskVO workTask) { public IPage<WorkTaskEntity> pageCondition(IPage<WorkTaskEntity> page, WorkTaskVO workTask) {
QueryWrapper wrapper = Condition.getQueryWrapper(workTask); QueryWrapper<WorkTaskEntity> wrapper = new QueryWrapper();
wrapper.lambda().orderByDesc(WorkTaskEntity::getCreateTime);
if(StringUtil.isNotBlank(workTask.getStartTime())){ if(StringUtil.isNotBlank(workTask.getStartTime())){
wrapper.ge("CREATE_TIME",workTask.getStartTime()); wrapper.lambda().ge(WorkTaskEntity::getCreateTime,workTask.getStartTime());
} }
if(StringUtil.isNotBlank(workTask.getEndTime())){ if(StringUtil.isNotBlank(workTask.getEndTime())){
wrapper.le("CREATE_TIME",workTask.getEndTime()); wrapper.lambda().le(WorkTaskEntity::getCreateTime,workTask.getEndTime());
} }
if(ObjectUtil.isNotEmpty(workTask.getGroupId())){ if(ObjectUtil.isNotEmpty(workTask.getGroupId())){
wrapper.eq("GROUP_ID",workTask.getGroupId()); wrapper.lambda().eq(WorkTaskEntity::getGroupId,workTask.getGroupId());
} }
if(ObjectUtil.isNotEmpty(workTask.getGroupId())){ if(ObjectUtil.isNotEmpty(workTask.getGroupName())){
wrapper.eq("CREATE_DEPT",workTask.getDeptId()); wrapper.lambda().like(WorkTaskEntity::getGroupName,workTask.getGroupName());
}
if(ObjectUtil.isNotEmpty(workTask.getDeptId())){
wrapper.lambda().eq(WorkTaskEntity::getCreateDept,workTask.getDeptId());
} }
if(ObjectUtil.isNotEmpty(workTask.getTaskName())){ if(ObjectUtil.isNotEmpty(workTask.getTaskName())){
wrapper.eq("TASK_NAME",workTask.getTaskName()); wrapper.lambda().eq(WorkTaskEntity::getTaskName,workTask.getTaskName());
} }
return super.page(page, wrapper); return super.page(page, wrapper);
} }
@ -246,13 +251,7 @@ public class WorkTaskServiceImpl extends BaseServiceImpl<WorkTaskMapper, WorkTas
if(StringUtil.isNotBlank(preview.getWorkTask())){ if(StringUtil.isNotBlank(preview.getWorkTask())){
List<WorkTaskContentVO> contents = JSONObject.parseObject(preview.getWorkTask(), new TypeReference<List<WorkTaskContentVO>>() {}); List<WorkTaskContentVO> contents = JSONObject.parseObject(preview.getWorkTask(), new TypeReference<List<WorkTaskContentVO>>() {});
if(CollectionUtil.isNotEmpty(contents)){ if(CollectionUtil.isNotEmpty(contents)){
StringBuilder location = new StringBuilder(),content = new StringBuilder(); preview.setContents(contents);
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));
} }
} }
// 计划工作时间 // 计划工作时间

24
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())){ if(StringUtil.isEmpty(param.getEndTime())){
param.setStartTime(DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME)); param.setStartTime(DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME));
} }
if(!StringUtil.isEmpty(param.getState()) && param.getState().equals(1)){
param.setFlowTaskName("结束");
}
// 获取权限区域机构 // 获取权限区域机构
List<Dept> depts; List<Dept> depts;
@ -87,8 +84,12 @@ public class CensServiceImpl implements CensService {
// 操作票查询 // 操作票查询
QueryWrapper wrapper = new QueryWrapper(); QueryWrapper wrapper = new QueryWrapper();
if(!StringUtil.isEmpty(param.getFlowTaskName())){ if(!StringUtil.isEmpty(param.getState())){
wrapper.eq("FLOW_TASK_NAME",param.getFlowTaskName()); if(param.getState().equals(1)){
wrapper.eq("FLOW_TASK_NAME","结束");
}else{
wrapper.ne("FLOW_TASK_NAME","结束");
}
} }
if(!StringUtil.isEmpty(param.getStartTime())){ if(!StringUtil.isEmpty(param.getStartTime())){
wrapper.ge("CREATE_TIME",param.getStartTime()); wrapper.ge("CREATE_TIME",param.getStartTime());
@ -104,7 +105,6 @@ public class CensServiceImpl implements CensService {
List<StandardTicketInfoEntity> operates = operateTicketService.list(wrapper); List<StandardTicketInfoEntity> operates = operateTicketService.list(wrapper);
// 工作票查询 // 工作票查询
List<WorkTicketInfoEntity> works = workTicketInfoService.list(wrapper); List<WorkTicketInfoEntity> works = workTicketInfoService.list(wrapper);
// 工作任务单
return depts.stream().map(dept->{ return depts.stream().map(dept->{
CensVo cens = new CensVo(); CensVo cens = new CensVo();
cens.setDeptId(dept.getId()); cens.setDeptId(dept.getId());
@ -119,7 +119,6 @@ public class CensServiceImpl implements CensService {
}else{ }else{
cens.setWorkCount(works.stream().filter(work->work.getCreateDept().equals(dept.getId())).count()); cens.setWorkCount(works.stream().filter(work->work.getCreateDept().equals(dept.getId())).count());
} }
cens.setWorkTaskCount((long)new Random().nextInt(10));
return cens; return cens;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
@ -153,9 +152,6 @@ public class CensServiceImpl implements CensService {
param.setEndTime(param.getYear() + "-12-31 23:59:59"); param.setEndTime(param.getYear() + "-12-31 23:59:59");
} }
if(!StringUtil.isEmpty(param.getState()) && param.getState().equals(1)){
param.setFlowTaskName("结束");
}
List<Dept> depts; List<Dept> depts;
if(ObjectUtil.isEmpty(param.getDeptId())){ if(ObjectUtil.isEmpty(param.getDeptId())){
// 获取权限区域机构 // 获取权限区域机构
@ -173,8 +169,12 @@ public class CensServiceImpl implements CensService {
// 操作票查询 // 操作票查询
QueryWrapper wrapper = new QueryWrapper(); QueryWrapper wrapper = new QueryWrapper();
if(!StringUtil.isEmpty(param.getFlowTaskName())){ if(!StringUtil.isEmpty(param.getState())){
wrapper.eq("FLOW_TASK_NAME",param.getFlowTaskName()); if(param.getState().equals(1)){
wrapper.eq("FLOW_TASK_NAME","结束");
}else{
wrapper.ne("FLOW_TASK_NAME","结束");
}
} }
if(!StringUtil.isEmpty(param.getStartTime())){ if(!StringUtil.isEmpty(param.getStartTime())){
wrapper.ge("CREATE_TIME",param.getStartTime()); wrapper.ge("CREATE_TIME",param.getStartTime());

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/PdfUtils.java

@ -122,7 +122,7 @@ public class PdfUtils {
} }
//若为list则不处理 //若为list则不处理
if (value instanceof List) { if (value instanceof List) {
return; value = ((List<?>) value).stream().map(PdfUtils::objectToMap).collect(Collectors.toList());
} }
//若为时间格式则进行格式化 //若为时间格式则进行格式化
if (value instanceof LocalDateTime) { if (value instanceof LocalDateTime) {

BIN
hzims-service/ticket/src/main/resources/template/work/work_task_template.docx

Binary file not shown.
Loading…
Cancel
Save