Browse Source

日常维护流程及操作日志修改

zhongwei
段飞宇 1 year ago
parent
commit
baefe25e39
  1. 42
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceTaskEntity.java
  2. 30
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/feign/MaintenanceFeignClient.java
  3. 19
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/feign/fallback/MaintenanceFeignClientFallback.java
  4. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/vo/ProcessWorkFlowResponse.java
  5. 2
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/controller/SysLogController.java
  6. 3
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java
  7. 2
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/SysLogService.java
  8. 3
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java
  9. 66
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/MaintenanceController.java
  10. 29
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/MaintenanceService.java
  11. 343
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/MaintenanceServiceImpl.java
  12. 222
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/vo/OperMaintenanceTaskEntityVo.java
  13. 23
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/util/StringObjUtils.java
  14. 4
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/constant/TicketProcessConstant.java
  15. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/consumer/StandardWorkTicketConsumer.java
  16. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/controller/ProcessTypeController.java
  17. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/service/ProcessService.java
  18. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/MachineryTicketProcessServiceImpl.java
  19. 65
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/MaintenanceProcessServiceImpl.java
  20. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/OneTicketProcessServiceImpl.java
  21. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/OperationTicketProcessServiceImpl.java
  22. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/redisConsume/WorkTicketMsgConsume.java
  23. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardWorkTicketController.java
  24. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/OperationTicketService.java
  25. 4
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java
  26. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/TicketProcessService.java
  27. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java
  28. 41
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/operation/StandardTicketInfoVo.java

42
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceTaskEntity.java

@ -149,4 +149,46 @@ public class OperMaintenanceTaskEntity extends TenantEntity {
@ApiModelProperty(value = "消息推送模板ID") @ApiModelProperty(value = "消息推送模板ID")
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Long messageTemplateId; private Long messageTemplateId;
/**
* 流程状态'
*/
@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;
} }

30
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/feign/MaintenanceFeignClient.java

@ -0,0 +1,30 @@
package com.hnac.hzims.operational.maintenance.feign;
import com.hnac.hzims.operational.OperationalConstants;
import com.hnac.hzims.operational.maintenance.feign.fallback.MaintenanceFeignClientFallback;
import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/14 15:12
*/
@FeignClient(
value = OperationalConstants.APP_NAME,
fallback = MaintenanceFeignClientFallback.class
)
@Repository
public interface MaintenanceFeignClient {
@PostMapping("/maintenance/findPending")
@ApiOperation(value = "日常维护待处理")
public Boolean findPending(@RequestBody ProcessWorkFlowResponse response);
}

19
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/feign/fallback/MaintenanceFeignClientFallback.java

@ -0,0 +1,19 @@
package com.hnac.hzims.operational.maintenance.feign.fallback;
import com.hnac.hzims.operational.maintenance.feign.MaintenanceFeignClient;
import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import org.springframework.stereotype.Component;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/14 15:13
*/
@Component
public class MaintenanceFeignClientFallback implements MaintenanceFeignClient {
@Override
public Boolean findPending(ProcessWorkFlowResponse response) {
throw new IllegalArgumentException("日常维护流程出现异常呢");
}
}

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

@ -1,4 +1,4 @@
package com.hnac.hzims.ticket.response; package com.hnac.hzims.operational.maintenance.vo;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

2
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/controller/SysLogController.java

@ -115,7 +115,7 @@ public class SysLogController {
@PathVariable Long size, @PathVariable Long size,
StatisticsVo statisticsVo){ StatisticsVo statisticsVo){
Page<StatisticsTitleResponseVo> page1 = new Page(page, size); Page<StatisticsTitleResponseVo> page1 = new Page(page, size);
List<StatisticsTitleResponseVo> responseVos = sysLogService.statisticsTitleByModuleName(page1, IPage<StatisticsTitleResponseVo> responseVos = sysLogService.statisticsTitleByModuleName(page1,
statisticsVo); statisticsVo);
return R.data(responseVos); return R.data(responseVos);
} }

3
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java

@ -1,5 +1,6 @@
package com.hnac.hzims.middle.systemlog.mapper; package com.hnac.hzims.middle.systemlog.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.middle.systemlog.entity.SysLog; import com.hnac.hzims.middle.systemlog.entity.SysLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -35,5 +36,5 @@ public interface SysLogMapper extends BaseMapper<SysLog> {
* @param statisticsVo * @param statisticsVo
* @return * @return
*/ */
List<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> moduleName, @Param("statisticsVo") StatisticsVo statisticsVo); IPage<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> moduleName, @Param("statisticsVo") StatisticsVo statisticsVo);
} }

2
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/SysLogService.java

@ -44,6 +44,6 @@ public interface SysLogService extends IService<SysLog> {
* @param statisticsVo * @param statisticsVo
* @return * @return
*/ */
List<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> statisticsTitleResponseVoPage, IPage<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> statisticsTitleResponseVoPage,
StatisticsVo statisticsVo); StatisticsVo statisticsVo);
} }

3
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java

@ -61,7 +61,8 @@ public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> impleme
* @return * @return
*/ */
@Override @Override
public List<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> statisticsTitleResponseVoPage, StatisticsVo statisticsVo) { public IPage<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> statisticsTitleResponseVoPage, StatisticsVo statisticsVo) {
return baseMapper.statisticsTitleByModuleName(statisticsTitleResponseVoPage, statisticsVo); return baseMapper.statisticsTitleByModuleName(statisticsTitleResponseVoPage, statisticsVo);
} }

66
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/MaintenanceController.java

@ -0,0 +1,66 @@
package com.hnac.hzims.operational.maintenance.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.operational.maintenance.service.MaintenanceService;
import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 日常维护控制层
*
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/14 8:08
*/
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/maintenance")
public class MaintenanceController {
private final MaintenanceService maintenanceService;
/**
* 日常维护生成任务
* @param ids
* @return
*/
@PostMapping("/createTask")
@ApiOperationSupport(order = 60)
@ApiOperation(value = "根据计划ID生成任务")
public R generateTask(@ApiParam(value = "计划ID", required = true) @RequestBody List<String> ids) {
maintenanceService.createTask(ids);
return R.success("日常维护生成任务成功");
}
/**
* 日常维护待处理
* @param response
*/
@PostMapping("/findPending")
@ApiOperation(value = "日常维护待处理")
public Boolean findPending(@RequestBody ProcessWorkFlowResponse response){
try {
maintenanceService.findPending(response);
return true;
} catch (Exception e) {
throw new ServiceException("日常维护待处理:" + e.getMessage());
}
}
}

29
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/MaintenanceService.java

@ -0,0 +1,29 @@
package com.hnac.hzims.operational.maintenance.service;
import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import java.util.List;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/14 8:24
*/
public interface MaintenanceService {
/**
* 日常维护生成任务
* @param ids
*/
void createTask(List<String> ids);
/**
* 日常维护待处理
* @param response
*/
void findPending(ProcessWorkFlowResponse response);
}

343
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/MaintenanceServiceImpl.java

@ -0,0 +1,343 @@
package com.hnac.hzims.operational.maintenance.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.hnac.hzims.common.utils.DateUtil;
import com.hnac.hzims.message.MessageConstants;
import com.hnac.hzims.message.dto.MessagePushRecordDto;
import com.hnac.hzims.message.dto.PlanMsgRecordDto;
import com.hnac.hzims.message.entity.config.MessageTemplateEntity;
import com.hnac.hzims.message.fegin.IMessageClient;
import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity;
import com.hnac.hzims.operational.duty.service.IImsDutyMainService;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenancePlanEntity;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceTaskEntity;
import com.hnac.hzims.operational.maintenance.service.IOperMaintenancePlanService;
import com.hnac.hzims.operational.maintenance.service.IOperMaintenanceTaskService;
import com.hnac.hzims.operational.maintenance.service.MaintenanceService;
import com.hnac.hzims.operational.maintenance.template.service.TemplateService;
import com.hnac.hzims.operational.maintenance.vo.OperMaintenanceTaskEntityVo;
import com.hnac.hzims.operational.util.StringObjUtils;
import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.*;
import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.system.feign.ISysClient;
import org.springblade.system.user.cache.UserCache;
import org.springblade.system.user.entity.User;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static org.springblade.core.tool.utils.DateUtil.PATTERN_DATE;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/14 8:24
*/
@Slf4j
@Service
@RequiredArgsConstructor
public class MaintenanceServiceImpl implements MaintenanceService {
private final IOperMaintenancePlanService maintenancePlanService;
private final IImsDutyMainService mainService;
private final IOperMaintenanceTaskService taskService;
private final IMessageClient messageClient;
private final List<TemplateService> templateService;
private final IFlowClient flowClient;
private final ISysClient sysClient;
/**
* 日常维护生成任务
*
* @param ids
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void createTask(List<String> ids) {
//获取日常维护计划
LambdaQueryWrapper<OperMaintenancePlanEntity> planEntityLambdaQueryWrapper = new LambdaQueryWrapper<>();
planEntityLambdaQueryWrapper.in(BaseEntity::getId, ids);
List<OperMaintenancePlanEntity> planEntities = maintenancePlanService
.list(planEntityLambdaQueryWrapper);
//筛选当月没生成任务的计划
List<OperMaintenancePlanEntity> finalPlanEntities = planEntities.stream().filter(planEntity ->
ObjectUtil.isEmpty(planEntity.getCreateTaskTime())
|| !DateUtil.judgeSameDay(
DateUtil.DateToLocalDateTime(planEntity.getCreateTaskTime()), LocalDate.now())
).collect(Collectors.toList());
if (CollectionUtil.isEmpty(finalPlanEntities)) {
throw new ServiceException("所选计划当天已生成任务");
}
for (OperMaintenancePlanEntity finalPlanEntity : finalPlanEntities) {
// 通过计划生成任务
this.createTaskByPlan(finalPlanEntity);
//更新任务派发时间
LambdaUpdateWrapper<OperMaintenancePlanEntity> planEntityLambdaUpdateWrapper =
new LambdaUpdateWrapper<>();
planEntityLambdaUpdateWrapper.set(OperMaintenancePlanEntity::getCreateTaskTime, new Date());
planEntityLambdaUpdateWrapper.eq(OperMaintenancePlanEntity::getId, finalPlanEntity.getId());
boolean update = maintenancePlanService.update(planEntityLambdaUpdateWrapper);
if (!update) {
log.error("maintenance:generateTask 更新任务派发失败");
throw new ServiceException("更新任务派发失败");
}
}
}
/**
* 日常维护待处理
*
* @param response
*/
@Override
public void findPending(ProcessWorkFlowResponse response) {
log.info("获取businessKey: {}", response.getBusinessKey());
log.info("获取taskId: {} ", response.getTaskId());
log.info("获取下一个审批人是: {} ", response.getNextStepOperator());
log.info("获取下一个用户Id是: {} ", response.getUserId());
log.info("获取当前任务名称是: {} ", response.getTaskName());
log.info("获取根据handleType区分是用户还是候选组角色: {}", response.getHandleType());
//json转换表单
String formData = JSON.toJSONString(response.getVariables());
log.info("获取表单的数据:{}", formData);
OperMaintenanceTaskEntityVo standardTicketInfoVo = null;
try {
JSONObject jsonObject = JSONObject.parseObject(formData);
standardTicketInfoVo = JSONObject.toJavaObject(jsonObject, OperMaintenanceTaskEntityVo.class);
} catch (Exception e) {
log.error("获取表单出现异常了~~~~");
throw new IllegalArgumentException(e.getMessage());
}
//1.查询日常维护信息
Long id = NumberUtils.toLong(response.getBusinessKey());
OperMaintenanceTaskEntity dbOperMaintenanceTaskEntity = taskService.getById(id);
if (ObjectUtils.isEmpty(dbOperMaintenanceTaskEntity)) {
log.error("获取日常维护数据不存在");
return;
}
OperMaintenanceTaskEntity entity = new OperMaintenanceTaskEntity();
BeanUtils.copyProperties(standardTicketInfoVo,entity);
entity.setId(id);
//填充日常维护信息
saveOperMaintenanceTaskEntity(entity, response);
entity.setProcessInstanceId(response.getProcessInstanceId());
taskService.updateById(entity);
//推送消息
if (response.getTaskId() != null) {
MessagePushRecordDto message = new MessagePushRecordDto();
message.setBusinessClassify("business");
message.setBusinessKey(MessageConstants.BusinessClassifyEnum.OPERATIONTICKETMESSAGE.getKey());
message.setSubject(MessageConstants.BusinessClassifyEnum.OPERATIONTICKETMESSAGE.getDescription());
message.setTaskId(entity.getId());
message.setTenantId("200000");
message.setTypes(Arrays.asList(MessageConstants.APP_PUSH, MessageConstants.WS_PUSH));
message.setPushType(MessageConstants.IMMEDIATELY);
//您有一张工作票待审批,工作内容:*****,审批环节:*****;
String countent =
"您有一条日常维护任务待审批,工作内容:".concat(entity.getTitle())
.concat(",审批环节:")
.concat(response.getTaskName());
message.setContent(countent);
message.setDeptId(entity.getCreateDept());
R<String> deptName = sysClient.getDeptName(entity.getCreateDept());
if (deptName.isSuccess()) {
message.setDeptName(deptName.getData());
}
String userIds = response.getUserId();
if (com.hnac.hzims.common.logs.utils.StringUtils.isBlank(userIds)) {
log.error("推送的消息不能为空哦,{}", userIds);
return;
}
String[] split = userIds.split(",");
for (String userId : split) {
message.setPusher(userId);
User user = UserCache.getUser(NumberUtils.toLong(userId));
if (ObjectUtils.isNotEmpty(user)) {
message.setPusherName(user.getName());
}
message.setAccount(userId);
message.setCreateUser(NumberUtils.toLong(userId));
messageClient.sendMessage(message);
}
}
}
/**
* 填充日常维护信息
* @param entity
* @param response
*/
private void saveOperMaintenanceTaskEntity(OperMaintenanceTaskEntity entity, ProcessWorkFlowResponse response) {
String flowDescription = "";
//如果response.getHandleType() 是0使用户
entity.setFlowUserId(response.getUserId());
entity.setNextStepOperator(response.getNextStepOperator());
flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(response.getNextStepOperator()).concat("审批");
//如果taskId为空
String taskId = response.getTaskId();
if (StringUtils.isEmpty(taskId)) {
entity.setFlowDescription("结束");
entity.setFlowTaskId(" ");
entity.setFlowTaskName("结束");
entity.setNextStepOperator(" ");
entity.setFlowStatus(999);
} else {
entity.setFlowTaskId(taskId);
entity.setFlowTaskName(response.getTaskName());
entity.setFlowDescription(flowDescription);
}
}
/**
* 通过计划生成任务
*
* @param finalPlanEntity
*/
private void createTaskByPlan(OperMaintenancePlanEntity finalPlanEntity) {
OperMaintenanceTaskEntity taskEntity = BeanUtil.copy(finalPlanEntity, OperMaintenanceTaskEntity.class);
//拆分设备 每个设备生成一条任务
if (StringUtil.isNotBlank(finalPlanEntity.getEmCode())) {
log.info("finalPlanEntity.getEmCode() : {}", finalPlanEntity.getEmCode());
List<String> emCodeList = Arrays.asList(finalPlanEntity.getEmCode().split(","));
for (String emCode : emCodeList) {
taskEntity.setEmCode(emCode);
this.fillTask(taskEntity, finalPlanEntity);
}
} else {
this.fillTask(taskEntity, finalPlanEntity);
}
}
/**
* 补充日常维护任务内容
*
* @param taskEntity
* @param finalPlanEntity
*/
private void fillTask(OperMaintenanceTaskEntity taskEntity, OperMaintenancePlanEntity finalPlanEntity) {
taskEntity.setId(null);
taskEntity.setCreateTime(new Date());
taskEntity.setUpdateTime(new Date());
taskEntity.setPlanId(finalPlanEntity.getId());
taskEntity.setTaskCode(UUID.randomUUID().toString());
if (taskEntity.getRefLibraryId() != 0) {
taskEntity.setCreateTime(org.springblade.core.tool.utils.DateUtil.now());
}
taskEntity.setDisposer(StringObjUtils.toString(finalPlanEntity.getDisposer()));
//补充计划结束时间
Instant instant = taskEntity.getDisposeTime().toInstant();
ZoneId zoneId = ZoneId.systemDefault();
LocalDateTime disposeTime = instant.atZone(zoneId).toLocalDateTime();
taskEntity.setPlanEndTime(disposeTime.plusHours(taskEntity.getHours()));
//获取值班人员
if (ObjectUtil.isNotEmpty(finalPlanEntity.getMaintenanceModel()) && finalPlanEntity.getMaintenanceModel() == 2) {
//查询值班信息
LambdaQueryWrapper<ImsDutyMainEntity> entityLambdaQueryWrapper = new LambdaQueryWrapper<>();
entityLambdaQueryWrapper.eq(ImsDutyMainEntity::getDutyDate,
DateTimeFormatter.ofPattern(PATTERN_DATE).format(disposeTime));
entityLambdaQueryWrapper.eq(ImsDutyMainEntity::getClassId, finalPlanEntity.getImsDutyClassId());
ImsDutyMainEntity entity = mainService.getOne(entityLambdaQueryWrapper);
if (ObjectUtil.isNotEmpty(entity) && StringUtils.isNotEmpty(entity.getDutyPersonIds())) {
String userId = entity.getDutyPersonIds();
taskEntity.setDisposer(userId.replaceAll("\\^", ","));
} else {
log.info("计划ID为:{}未查询到排班记录", finalPlanEntity.getId());
return;
}
}
taskService.save(taskEntity);
//生成工作流实例
String processInstanceId = this.startProcess(finalPlanEntity.getProcDefId(), taskEntity);
taskEntity.setProcessInstanceId(processInstanceId);
taskService.updateById(taskEntity);
finalPlanEntity.setCreateTaskTime(new Date());
maintenancePlanService.updateById(finalPlanEntity);
taskEntity = taskService.getById(taskEntity.getId());
//推送消息
this.pushTaskMessage(taskEntity);
}
/**
* 开启一个流程实例
*
* @author xiashandong
**/
private String startProcess(String processDefinitionKey, OperMaintenanceTaskEntity taskEntity) {
OperMaintenanceTaskEntityVo operMaintenanceTaskEntityVo = new OperMaintenanceTaskEntityVo();
BeanUtils.copyProperties(taskEntity,operMaintenanceTaskEntityVo);
Map<String,Object> params = new HashMap<>();
params.put("taskId", taskEntity.getId());
List<String> userIdList = Stream.of(taskEntity.getDisposer().split(",")).collect(Collectors.toList());
String taskUsers = userIdList.stream().filter(o -> StringUtils.isNotBlank(o)).map(s -> {
return "taskUser_".concat(s);
}).collect(Collectors.joining(","));
params.put("initUserIds", taskUsers);
params.put("operMaintenanceTaskEntityVo", operMaintenanceTaskEntityVo);
return flowClient.startProcessInstanceContainNameByKey(processDefinitionKey,
String.valueOf(taskEntity.getId()),taskEntity.getTitle(), params)
.getData()
.getProcessInstanceId();
}
/**
* 推送日常维护任务消息
* @return void
* @Param taskEntity 日常维护任务
**/
private void pushTaskMessage(OperMaintenanceTaskEntity taskEntity) {
log.info("开始保存{}的日常维护消息推送记录", taskEntity.getDisposer());
R<MessageTemplateEntity> templateR = messageClient.getMsgTemplateById(taskEntity.getMessageTemplateId());
if (templateR.isSuccess() && ObjectUtil.isNotEmpty(templateR.getData())) {
Func.toLongList(",", taskEntity.getDisposer()).forEach(userId -> {
//推送消息
ZoneId zoneId = ZoneId.systemDefault();
PlanMsgRecordDto planMsgRecordDto = new PlanMsgRecordDto();
planMsgRecordDto.setTemplateId(taskEntity.getMessageTemplateId());
planMsgRecordDto.setCreateUser(taskEntity.getCreateUser());
planMsgRecordDto.setPlanTime(LocalDateTime.ofInstant(taskEntity.getDisposeTime().toInstant(), zoneId));
planMsgRecordDto.setTaskId(taskEntity.getId());
planMsgRecordDto.setDeptId(taskEntity.getCreateDept());
planMsgRecordDto.setReceiver(userId);
TemplateService templateService1 = templateService.stream().filter(item -> item.isTemplateStatus(1)).findFirst().orElse(null);
templateService1.execute(planMsgRecordDto);
log.info("推送内容体为:{}", JSON.toJSONString(taskEntity.getDisposer()));
});
}
}
}

222
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/vo/OperMaintenanceTaskEntityVo.java

@ -0,0 +1,222 @@
package com.hnac.hzims.operational.maintenance.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 日常维护对象
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/13 17:20
*/
@Data
public class OperMaintenanceTaskEntityVo {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@ApiModelProperty(value = "主键id")
private Long id;
/**
* 创建人
*/
private Long createUser;
/**
* 创建部门
*/
@ApiModelProperty(value = "创建部门")
private Long createDept;
/**
* 创建时间
*/
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 更新人
*/
private Long updateUser;
/**
* 更新时间
*/
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
@ApiModelProperty(value = "更新时间")
private Date updateTime;
/**
* 状态[1:正常]
*/
@ApiModelProperty(value = "业务状态")
private Integer status;
/**
* 设备编码
*/
@ApiModelProperty(value = "设备编码")
private String emCode;
/**
* 维护类型 01=定期试验 02=定期保养 03=定期操作 04=其他
*/
@ApiModelProperty(value = "维护类型 01=定期试验 02=定期保养 03=定期操作 04=其他")
private String typeCode;
/**
* 任务编码
*/
@ApiModelProperty(value = "任务编码,后台自动生成")
private String taskCode;
/**
* 维护项目
*/
@ApiModelProperty(value = "维护项目")
private Long refLibraryId;
/**
* 维护标题
*/
@ApiModelProperty(value = "维护标题")
private String title;
/**
* 工作流实例ID
*/
@ApiModelProperty(value = "工作流实例ID")
private String processInstanceId;
/**
* 执行人
*/
@ApiModelProperty(value = "执行人")
private String disposer;
/**
* 执行日期
*/
@ApiModelProperty(value = "任务按周期生成计划时间")
private Date disposeTime;
@ApiModelProperty(value = "执行时间")
private LocalDateTime executeTime;
/**
* 标准工时
*/
@ApiModelProperty(value = "标准工时")
private Integer hours;
/**
* 实际工时
*/
@ApiModelProperty(value = "实际工时")
private Integer actHours;
/**
* 维护内容
*/
@ApiModelProperty(value = "维护内容")
private String content;
/**
* 操作规范
*/
@ApiModelProperty(value = "操作规范")
private String workStandards;
/**
* 安全警告
*/
@ApiModelProperty(value = "安全警告")
private String safo;
/**
* 是否异常 0= 1=
*/
@ApiModelProperty(value = "是否异常 0=否 1=是")
private Integer isAnomaly;
/**
* 遗留问题
*/
@ApiModelProperty(value = "遗留问题")
private String legacy;
/**
* 问题描述
*/
@ApiModelProperty(value = "问题描述")
private String description;
@ApiModelProperty(value = "任务类型")
private String taskType;
@ApiModelProperty(value = "票据ID")
private Long ticketId;
@ApiModelProperty(value = "延期状态")
private Integer delayStatus;
@ApiModelProperty(value = "延期时间")
private LocalDateTime delayDate;
@ApiModelProperty(value = "计划结束时间")
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
private LocalDateTime planEndTime;
@ApiModelProperty("计划ID")
private Long planId;
@ApiModelProperty(value = "消息推送模板ID")
private Long messageTemplateId;
/**
* 流程状态'
*/
@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;
}

23
hzims-service/operational/src/main/java/com/hnac/hzims/operational/util/StringObjUtils.java

@ -0,0 +1,23 @@
package com.hnac.hzims.operational.util;
import org.apache.commons.lang3.StringUtils;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/14 9:24
*/
public class StringObjUtils extends StringUtils {
/**
* object转Str
*
* @param obj
* @return
*/
public static String toString(Object obj) {
return obj == null ? (String) obj : obj.toString();
}
}

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/constant/TicketProcessConstant.java

@ -25,4 +25,8 @@ public class TicketProcessConstant {
* 水力机械工作票 * 水力机械工作票
*/ */
public static final String MACHINERY_TICKET_KEY = "machinery"; public static final String MACHINERY_TICKET_KEY = "machinery";
/**
* 日常维护
*/
public static final String MAINTENANCE_KEY = "maintenance";
} }

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/consumer/StandardWorkTicketConsumer.java

@ -6,7 +6,7 @@ import com.hnac.hzims.ticket.processflow.entity.WorkflowOperationLog;
import com.hnac.hzims.ticket.processflow.service.WorkflowOperationLogService; import com.hnac.hzims.ticket.processflow.service.WorkflowOperationLogService;
import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue; import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.ticket.processflow.strategy.service.ProcessService; import com.hnac.hzims.ticket.processflow.strategy.service.ProcessService;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse; import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.queue.annotation.RedisQueue; import org.springblade.queue.annotation.RedisQueue;
import org.springblade.queue.consume.IQueueConsume; import org.springblade.queue.consume.IQueueConsume;

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/controller/ProcessTypeController.java

@ -11,7 +11,7 @@ import com.hnac.hzims.ticket.processflow.properties.WorkTicketProperties;
import com.hnac.hzims.ticket.processflow.service.ProcessTypeService; import com.hnac.hzims.ticket.processflow.service.ProcessTypeService;
import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue; import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.ticket.processflow.strategy.service.ProcessService; import com.hnac.hzims.ticket.processflow.strategy.service.ProcessService;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse; import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.jackson.JsonUtil; import org.springblade.core.tool.jackson.JsonUtil;

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/service/ProcessService.java

@ -1,6 +1,6 @@
package com.hnac.hzims.ticket.processflow.strategy.service; package com.hnac.hzims.ticket.processflow.strategy.service;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse; import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue; import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue;
/** /**

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/MachineryTicketProcessServiceImpl.java

@ -3,13 +3,12 @@ package com.hnac.hzims.ticket.processflow.strategy.serviceimpl;
import com.hnac.hzims.ticket.processflow.service.ProcessDictService; import com.hnac.hzims.ticket.processflow.service.ProcessDictService;
import com.hnac.hzims.ticket.processflow.strategy.abstracts.ProcessAbstractService; import com.hnac.hzims.ticket.processflow.strategy.abstracts.ProcessAbstractService;
import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue; import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService; import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService;
import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import static com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant.FIRST_TICKET_KEY;
import static com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant.MACHINERY_TICKET_KEY; import static com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant.MACHINERY_TICKET_KEY;
/** /**

65
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/MaintenanceProcessServiceImpl.java

@ -0,0 +1,65 @@
package com.hnac.hzims.ticket.processflow.strategy.serviceimpl;
import com.hnac.hzims.operational.maintenance.feign.MaintenanceFeignClient;
import com.hnac.hzims.ticket.processflow.service.ProcessDictService;
import com.hnac.hzims.ticket.processflow.strategy.abstracts.ProcessAbstractService;
import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
import org.springframework.stereotype.Service;
import static com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant.MAINTENANCE_KEY;
/**
* 日常维护实现类
*
* @Author dfy
* @Version v1.0
* @Serial 1.0
* @Date 2023/3/28 8:47
*/
@Slf4j
@Service
@RequiredArgsConstructor
public class MaintenanceProcessServiceImpl extends ProcessAbstractService {
private final MaintenanceFeignClient maintenanceFeignClient;
private final ProcessDictService processDictService;
/**
* 设置执行那种实现类
*
* @param flowQueue
* @return
*/
@Override
public Boolean isWorkflowProcess(WorkflowQueue flowQueue) {
log.info("是否执日常维护流程环节操作~~~~,流程ticket: {}", flowQueue);
String dictValue = processDictService.selectDictValueByKey(MAINTENANCE_KEY);
if (dictValue.equals(flowQueue.getProcessDefinitionKey())) {
log.info("已执行日常维护流程环节操作~~~~");
return true;
}
log.error("未是否执行日常维护流程环节操作,请联系管理员~~~~");
return false;
}
/**
* 日常维护业务方法
*
* @param response
*/
@Override
public void calculate(ProcessWorkFlowResponse response) {
Boolean pending = maintenanceFeignClient.findPending(response);
if (!pending) {
throw new ServiceException("日常维护业务流程出错呢");
}
}
}

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/OneTicketProcessServiceImpl.java

@ -1,8 +1,7 @@
package com.hnac.hzims.ticket.processflow.strategy.serviceimpl; package com.hnac.hzims.ticket.processflow.strategy.serviceimpl;
import com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant;
import com.hnac.hzims.ticket.processflow.service.ProcessDictService; import com.hnac.hzims.ticket.processflow.service.ProcessDictService;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse; import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.processflow.strategy.abstracts.ProcessAbstractService; import com.hnac.hzims.ticket.processflow.strategy.abstracts.ProcessAbstractService;
import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue; import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService; import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService;

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/OperationTicketProcessServiceImpl.java

@ -3,9 +3,8 @@ package com.hnac.hzims.ticket.processflow.strategy.serviceimpl;
import com.hnac.hzims.ticket.processflow.service.ProcessDictService; import com.hnac.hzims.ticket.processflow.service.ProcessDictService;
import com.hnac.hzims.ticket.processflow.strategy.abstracts.ProcessAbstractService; import com.hnac.hzims.ticket.processflow.strategy.abstracts.ProcessAbstractService;
import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue; import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse; import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.standardTicket.service.OperationTicketService; import com.hnac.hzims.ticket.standardTicket.service.OperationTicketService;
import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/redisConsume/WorkTicketMsgConsume.java

@ -3,7 +3,7 @@ package com.hnac.hzims.ticket.redisConsume;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.hnac.hzims.common.config.RedisMessageListener; import com.hnac.hzims.common.config.RedisMessageListener;
import com.hnac.hzims.ticket.constants.TicketConstants; import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse; import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.service.IFirstWorkTicketService; import com.hnac.hzims.ticket.twoTicket.service.IFirstWorkTicketService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardWorkTicketController.java

@ -2,7 +2,7 @@ package com.hnac.hzims.ticket.standardTicket.controller;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse; import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.standardTicket.service.StandardWorkTicketService; import com.hnac.hzims.ticket.standardTicket.service.StandardWorkTicketService;
import com.hnac.hzims.ticket.processflow.properties.TicketProperties; import com.hnac.hzims.ticket.processflow.properties.TicketProperties;
import com.hnac.hzims.ticket.processflow.properties.WorkTicketProperties; import com.hnac.hzims.ticket.processflow.properties.WorkTicketProperties;

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

@ -1,8 +1,7 @@
package com.hnac.hzims.ticket.standardTicket.service; package com.hnac.hzims.ticket.standardTicket.service;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse; import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo; import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java

@ -14,7 +14,7 @@ import com.hnac.hzims.operational.station.feign.IStationClient;
import com.hnac.hzims.ticket.constants.TicketConstants; import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.processflow.service.ProcessDictService; import com.hnac.hzims.ticket.processflow.service.ProcessDictService;
import com.hnac.hzims.ticket.processflow.strategy.core.ProcessIdWorker; import com.hnac.hzims.ticket.processflow.strategy.core.ProcessIdWorker;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse; import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity; import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity;
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketMeasureEntity; import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketMeasureEntity;
import com.hnac.hzims.ticket.standardTicket.service.IStandardTicketInfoService; import com.hnac.hzims.ticket.standardTicket.service.IStandardTicketInfoService;
@ -22,11 +22,9 @@ import com.hnac.hzims.ticket.standardTicket.service.IStandardTicketMeasureServic
import com.hnac.hzims.ticket.standardTicket.service.OperationTicketService; import com.hnac.hzims.ticket.standardTicket.service.OperationTicketService;
import com.hnac.hzims.ticket.standardTicket.utils.OperationWordHelper; import com.hnac.hzims.ticket.standardTicket.utils.OperationWordHelper;
import com.hnac.hzims.ticket.twoTicket.constant.TicketConstant; import com.hnac.hzims.ticket.twoTicket.constant.TicketConstant;
import com.hnac.hzims.ticket.twoTicket.utils.WordHelper;
import com.hnac.hzims.ticket.twoTicket.utils.WordMapUtils; import com.hnac.hzims.ticket.twoTicket.utils.WordMapUtils;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo; import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketMeasureVo; import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketMeasureVo;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.ticket.utils.PdfUtils; import com.hnac.hzims.ticket.utils.PdfUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows; import lombok.SneakyThrows;

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/TicketProcessService.java

@ -1,6 +1,6 @@
package com.hnac.hzims.ticket.twoTicket.service; package com.hnac.hzims.ticket.twoTicket.service;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse; import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo; import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

@ -7,7 +7,6 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.google.common.collect.Lists;
import com.hnac.hzims.common.logs.utils.StringUtils; import com.hnac.hzims.common.logs.utils.StringUtils;
import com.hnac.hzims.message.MessageConstants; import com.hnac.hzims.message.MessageConstants;
import com.hnac.hzims.message.dto.MessagePushRecordDto; import com.hnac.hzims.message.dto.MessagePushRecordDto;
@ -23,7 +22,7 @@ import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.constants.WorkTicketConstants; import com.hnac.hzims.ticket.constants.WorkTicketConstants;
import com.hnac.hzims.ticket.processflow.service.ProcessDictService; import com.hnac.hzims.ticket.processflow.service.ProcessDictService;
import com.hnac.hzims.ticket.processflow.strategy.core.ProcessIdWorker; import com.hnac.hzims.ticket.processflow.strategy.core.ProcessIdWorker;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse; import com.hnac.hzims.operational.maintenance.vo.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.constant.TicketConstant; import com.hnac.hzims.ticket.twoTicket.constant.TicketConstant;
import com.hnac.hzims.ticket.twoTicket.entity.TicketInfoDanger; import com.hnac.hzims.ticket.twoTicket.entity.TicketInfoDanger;
import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish; import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish;

41
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/operation/StandardTicketInfoVo.java

@ -126,6 +126,47 @@ public class StandardTicketInfoVo extends TenantEntity {
@ApiModelProperty("编号(原站点ID)") @ApiModelProperty("编号(原站点ID)")
private String signageCode; 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("创建人名称") @ApiModelProperty("创建人名称")

Loading…
Cancel
Save