Browse Source

修改水力机械工作票

zhongwei
段飞宇 1 year ago
parent
commit
d2e7412333
  1. 6
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketInfoEntity.java
  2. 152
      hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessagePushRecordController.java
  3. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StAlamRecordController.java
  4. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/TicketApplication.java
  5. 5
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/constant/TicketProcessConstant.java
  6. 69
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/MachineryTicketProcessServiceImpl.java
  7. 5
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/constant/TicketConstant.java
  8. 82
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java
  9. BIN
      hzims-service/ticket/src/main/resources/template/secondary/每日开工和收工时间附页.docx
  10. BIN
      hzims-service/ticket/src/main/resources/template/水力机械工作票模版.docx

6
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketInfoEntity.java

@ -480,6 +480,10 @@ public class WorkTicketInfoEntity extends TenantEntity implements Serializable {
*/ */
@ApiModelProperty("有限空间监测记录单 (true,展示附件,false,不展示附件)") @ApiModelProperty("有限空间监测记录单 (true,展示附件,false,不展示附件)")
private Boolean isLimited; private Boolean isLimited;
/**
*每日开工和收工时间附页
*/
@ApiModelProperty("每日开工和收工时间附页")
private Boolean isStart;
} }

152
hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessagePushRecordController.java

@ -27,91 +27,93 @@ import java.util.List;
@RestController @RestController
@RequestMapping("/message/record") @RequestMapping("/message/record")
@Api(value = "消息推送记录",tags = "消息推送记录") @Api(value = "消息推送记录", tags = "消息推送记录")
@AllArgsConstructor @AllArgsConstructor
public class MessagePushRecordController extends BladeController { public class MessagePushRecordController extends BladeController {
private final IMessagePushRecordService messagePushRecordService; private final IMessagePushRecordService messagePushRecordService;
@PostMapping("/save") @PostMapping("/save")
@ApiOperation("保存消息推送") @ApiOperation("保存消息推送")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
public R<Boolean> save(@RequestBody MessagePushRecordEntity request) { public R<Boolean> save(@RequestBody MessagePushRecordEntity request) {
return R.status(messagePushRecordService.save(request)); return R.status(messagePushRecordService.save(request));
} }
@PostMapping("/update") @PostMapping("/update")
@ApiOperation("更新消息推送记录") @ApiOperation("更新消息推送记录")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
public R<Boolean> update(@RequestBody MessagePushRecordEntity request) { public R<Boolean> update(@RequestBody MessagePushRecordEntity request) {
return R.status(messagePushRecordService.updateById(request)); return R.status(messagePushRecordService.updateById(request));
} }
@GetMapping("/list") @GetMapping("/list")
@ApiOperation("查询消息推送记录列表") @ApiOperation("查询消息推送记录列表")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
public R<List<MessagePushRecordEntity>> list(MessagePushRecordEntity request) { public R<List<MessagePushRecordEntity>> list(MessagePushRecordEntity request) {
return R.data(messagePushRecordService.list(request)); return R.data(messagePushRecordService.list(request));
} }
@GetMapping("/listPage") @GetMapping("/listPage")
@ApiOperation("分页查询消息推送记录列表") @ApiOperation("分页查询消息推送记录列表")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@OperationAnnotation( @OperationAnnotation(
moduleName = "消息管理", moduleName = "消息管理",
title = "消息管理",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, title = "消息管理", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE,
action = "分页查询消息推送记录列表") action = "分页查询消息推送记录列表")
public R<IPage<MessagePushRecordEntity>> listPage(MessagePushRecordEntity request, Query query) { public R<IPage<MessagePushRecordEntity>> listPage(MessagePushRecordEntity request, Query query) {
return R.data(messagePushRecordService.listPage(request,query)); return R.data(messagePushRecordService.listPage(request, query));
} }
@GetMapping("/send/{id}") @GetMapping("/send/{id}")
@ApiOperation("推送消息记录") @ApiOperation("推送消息记录")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
public R<Boolean> send(@PathVariable @ApiParam("消息记录ID") Long id) { public R<Boolean> send(@PathVariable @ApiParam("消息记录ID") Long id) {
return R.data(messagePushRecordService.send(id)); return R.data(messagePushRecordService.send(id));
} }
@GetMapping("/readMessage/{id}") @GetMapping("/readMessage/{id}")
@ApiOperation("读取消息") @ApiOperation("读取消息")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
public R<Boolean> readMessage(@PathVariable @ApiParam("消息记录ID") String id) { public R<Boolean> readMessage(@PathVariable @ApiParam("消息记录ID") String id) {
MessagePushRecordEntity record = messagePushRecordService.getById(id); MessagePushRecordEntity record = messagePushRecordService.getById(id);
if(!(Long.parseLong(record.getPusher()) == AuthUtil.getUserId())) { if (!(Long.parseLong(record.getPusher()) == AuthUtil.getUserId())) {
return R.fail("当前登录人不是消息推送人,修改状态失败"); return R.fail("当前登录人不是消息推送人,修改状态失败");
} }
LambdaUpdateWrapper<MessagePushRecordEntity> eq = Wrappers.<MessagePushRecordEntity>lambdaUpdate() LambdaUpdateWrapper<MessagePushRecordEntity> eq = Wrappers.<MessagePushRecordEntity>lambdaUpdate()
.set(MessagePushRecordEntity::getStatus, MessageConstants.CONFIRM) .set(MessagePushRecordEntity::getStatus, MessageConstants.CONFIRM)
.set(MessagePushRecordEntity::getRespondTime, LocalDateTime.now()) .set(MessagePushRecordEntity::getRespondTime, LocalDateTime.now())
.in(MessagePushRecordEntity::getId, Func.toLongList(",",id)); .in(MessagePushRecordEntity::getId, Func.toLongList(",", id));
return R.status(messagePushRecordService.update(eq)); return R.status(messagePushRecordService.update(eq));
} }
@GetMapping("/readMessageBatch") @GetMapping("/readMessageBatch")
@ApiOperation("批量处理消息") @ApiOperation("批量处理消息")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
public R<Boolean> readMessageBatch() { public R<Boolean> readMessageBatch() {
LambdaUpdateWrapper<MessagePushRecordEntity> eq = Wrappers.<MessagePushRecordEntity>lambdaUpdate() LambdaUpdateWrapper<MessagePushRecordEntity> eq = Wrappers.<MessagePushRecordEntity>lambdaUpdate()
.set(MessagePushRecordEntity::getStatus, MessageConstants.CONFIRM) .set(MessagePushRecordEntity::getStatus, MessageConstants.CONFIRM)
.set(MessagePushRecordEntity::getRespondTime, LocalDateTime.now()) .set(MessagePushRecordEntity::getRespondTime, LocalDateTime.now())
.eq(MessagePushRecordEntity::getPusher, AuthUtil.getUserId()) .eq(MessagePushRecordEntity::getPusher, AuthUtil.getUserId())
.eq(MessagePushRecordEntity::getStatus, MessageConstants.PUSH_SUCCESS); .eq(MessagePushRecordEntity::getStatus, MessageConstants.PUSH_SUCCESS);
return R.status(messagePushRecordService.update(eq)); return R.status(messagePushRecordService.update(eq));
} }
@GetMapping("/getPersonalUnreadMessage") @GetMapping("/getPersonalUnreadMessage")
@ApiOperation("获取当前登录人待办消息") @ApiOperation("获取当前登录人待办消息")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
public R<List<UnreadMessageVO>> getPersonalUnreadMessage() { @OperationAnnotation(moduleName = "视频集中监控", title = "视频集中监控", action = "获取当前登录人待办消息",
List<UnreadMessageVO> personalUnreadMessage = messagePushRecordService.getPersonalUnreadMessage(); operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE)
return R.data(personalUnreadMessage); public R<List<UnreadMessageVO>> getPersonalUnreadMessage() {
} List<UnreadMessageVO> personalUnreadMessage = messagePushRecordService.getPersonalUnreadMessage();
return R.data(personalUnreadMessage);
}
@GetMapping("/getPersonalAppUnreadMessage") @GetMapping("/getPersonalAppUnreadMessage")
@ApiOperation("获取当前登录人APP待办消息") @ApiOperation("获取当前登录人APP待办消息")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
public R<List<UnreadMessageVO>> getPersonalAppUnreadMessage() { public R<List<UnreadMessageVO>> getPersonalAppUnreadMessage() {
List<UnreadMessageVO> personalUnreadMessage = messagePushRecordService.getPersonalAppUnreadMessage(); List<UnreadMessageVO> personalUnreadMessage = messagePushRecordService.getPersonalAppUnreadMessage();
return R.data(personalUnreadMessage); return R.data(personalUnreadMessage);
} }
} }

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

@ -77,7 +77,7 @@ public class StAlamRecordController {
@GetMapping("/listPage") @GetMapping("/listPage")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入vo") @ApiOperation(value = "分页", notes = "传入vo")
@OperationAnnotation(title = "系统预警处理", operatorType = OperatorType.MOBILE, @OperationAnnotation(moduleName = "数据查询",title = "系统预警处理", operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,action = "分页查询") businessType = BusinessType.GENCODE,action = "分页查询")
public R<IPage<StAlarmRecordVo>> list(StAlarmRecordVo vo, Query query) { public R<IPage<StAlarmRecordVo>> list(StAlarmRecordVo vo, Query query) {
return R.data(stAlamRecordService.doPageList(Condition.getPage(query), vo)); return R.data(stAlamRecordService.doPageList(Condition.getPage(query), vo));

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

@ -4,6 +4,8 @@ import com.hnac.hzims.ticket.constants.TicketConstants;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.springblade.core.cloud.feign.EnableBladeFeign; import org.springblade.core.cloud.feign.EnableBladeFeign;
import org.springblade.core.launch.BladeApplication; import org.springblade.core.launch.BladeApplication;
import org.springblade.core.mp.plugins.SqlLogInterceptor;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.client.SpringCloudApplication; import org.springframework.cloud.client.SpringCloudApplication;

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

@ -20,4 +20,9 @@ public class TicketProcessConstant {
* 操作票 * 操作票
*/ */
public static final String OPERATION_TICKET_KEY = "moreActionBankDirect"; public static final String OPERATION_TICKET_KEY = "moreActionBankDirect";
/**
* 水力机械工作票
*/
public static final String MACHINERY_TICKET_KEY = "machinery";
} }

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

@ -0,0 +1,69 @@
package com.hnac.hzims.ticket.processflow.strategy.serviceimpl;
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.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
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;
/**
* 水力机械工作票实现类
*
* @Author dfy
* @Version v1.0
* @Serial 1.0
* @Date 2023/3/28 8:47
*/
@Slf4j
@Service
@RequiredArgsConstructor
public class MachineryTicketProcessServiceImpl extends ProcessAbstractService {
private final TicketProcessService ticketProcessService;
private final ProcessDictService processDictService;
/**
* 设置执行那种实现类
*
* @param flowQueue
* @return
*/
@Override
public Boolean isWorkflowProcess(WorkflowQueue flowQueue) {
log.info("是否执行水力机械工作票流程环节操作~~~~,流程ticket: {}", flowQueue);
String dictValue = processDictService.selectDictValueByKey(MACHINERY_TICKET_KEY);
if (dictValue.equals(flowQueue.getProcessDefinitionKey())) {
log.info("已执行水力机械工作票流程环节操作~~~~");
return true;
}
log.error("未是否执行水力机械工作票流程环节操作,请联系管理员~~~~");
return false;
}
/**
* 两票管理业务方法
*
* @param response
*/
@Override
public void calculate(ProcessWorkFlowResponse response) {
ticketProcessService.findPending(response);
}
}

5
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/constant/TicketConstant.java

@ -55,4 +55,9 @@ public class TicketConstant {
*/ */
public static final String SPACE_PAGE = "/secondary/有限空间监测记录单.docx"; public static final String SPACE_PAGE = "/secondary/有限空间监测记录单.docx";
/**
* 每日开工和收工时间附页
*/
public static final String START_PAGE = "/secondary/每日开工和收工时间附页.docx";
} }

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

@ -74,6 +74,7 @@ import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant.FIRST_TICKET_KEY; import static com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant.FIRST_TICKET_KEY;
import static com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant.MACHINERY_TICKET_KEY;
/** /**
@ -191,7 +192,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
} }
signage = signage.length() == 2 ? station.getSignage() : station.getSignage().substring(0, 2); signage = signage.length() == 2 ? station.getSignage() : station.getSignage().substring(0, 2);
workTicketVo.getWorkTicket().setSignage(signage); workTicketVo.getWorkTicket().setSignage(station.getSignage());
workTicketVo.getWorkTicket().setSignageCode(station.getCode()); workTicketVo.getWorkTicket().setSignageCode(station.getCode());
//2. 获取编码 //2. 获取编码
String code = processIdWorker.getTicketByCode(workTicketVo.getWorkTicket().getSignage(), this.getTicketWichCode(workTicketVo.getWorkTicket().getType()), String code = processIdWorker.getTicketByCode(workTicketVo.getWorkTicket().getSignage(), this.getTicketWichCode(workTicketVo.getWorkTicket().getType()),
@ -204,7 +205,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
//5. 保存工作任务 //5. 保存工作任务
this.saveWorkTicketContentDto(workTicketVo.getWorkTicketContentDtoList(), workTicketVo.getWorkTicket()); this.saveWorkTicketContentDto(workTicketVo.getWorkTicketContentDtoList(), workTicketVo.getWorkTicket());
//6. 查询第一种工作票值 //6. 查询第一种工作票值
String dictValue = processDictService.selectDictValueByKey(FIRST_TICKET_KEY); String dictValue = getDictValue(workTicketVo);
//7. 开启动作流 //7. 开启动作流
this.dealProcess(dictValue, workTicketVo); this.dealProcess(dictValue, workTicketVo);
//8. 处理任务 //8. 处理任务
@ -213,6 +214,23 @@ public class TicketProcessServiceImpl implements TicketProcessService {
} }
/** /**
* 验证是走那种工作票流程默认走第一种工作票
*
* @param workTicketVo
* @return
*/
private String getDictValue(WorkTicketVo workTicketVo) {
String key = FIRST_TICKET_KEY;
if ("6".equals(workTicketVo.getWorkTicket().getType()) || "7".equals(workTicketVo.getWorkTicket().getType())) {
key = FIRST_TICKET_KEY;
} else if ("8".equals(workTicketVo.getWorkTicket().getType())) {
key = MACHINERY_TICKET_KEY;
}
String dictValue = processDictService.selectDictValueByKey(key);
return dictValue;
}
/**
* 待处理 * 待处理
* *
* @param response * @param response
@ -339,7 +357,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
e.printStackTrace(); e.printStackTrace();
} }
//工作开始时间和结束时间 // 工作开始时间和结束时间
// List<WorkTicketOperateTimeEntity> workTicketOperateTimeEntities = workTicketVo.getWorkTicketOperateTimeEntities(); // List<WorkTicketOperateTimeEntity> workTicketOperateTimeEntities = workTicketVo.getWorkTicketOperateTimeEntities();
// if (CollectionUtils.isNotEmpty(workTicketOperateTimeEntities)) { // if (CollectionUtils.isNotEmpty(workTicketOperateTimeEntities)) {
// log.info("工作开始时间和结束时间:{}", workTicketFinish); // log.info("工作开始时间和结束时间:{}", workTicketFinish);
@ -438,7 +456,6 @@ public class TicketProcessServiceImpl implements TicketProcessService {
message.setPusherName(user.getName()); message.setPusherName(user.getName());
} }
message.setAccount(userId); message.setAccount(userId);
message.setCreateUser(NumberUtils.toLong(userId)); message.setCreateUser(NumberUtils.toLong(userId));
messageClient.sendMessage(message); messageClient.sendMessage(message);
log.info("推送消息成功,用户名称{},消息{}", user.getName(), message); log.info("推送消息成功,用户名称{},消息{}", user.getName(), message);
@ -476,18 +493,6 @@ public class TicketProcessServiceImpl implements TicketProcessService {
} }
//如果response.getHandleType() 是1使角色 //如果response.getHandleType() 是1使角色
if ("1".equals(response.getHandleType())) { if ("1".equals(response.getHandleType())) {
//根据角色别名获取用户信息
// try {
// R<List<User>> roleAlias = userClient.relationUserListByRoleAlias(workTicket.getTenantId(), workTicket.getCreateDept(), response.getNextStepOperator());
// String collect = roleAlias.getData().stream().map(item -> item.getName()).collect(Collectors.joining(","));
// flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(collect).concat("审批");
// workTicket.setNextStepOperator(collect);
// } catch (Exception e) {
// e.printStackTrace();
// log.error("R<List<User>> roleAlias = userClient.userListByRoleAlias(workTicket.getTenantId(), response.getNextStepOperator())");
// log.error("获取用户信息失败");
// workTicket.setNextStepOperator(null);
// }
workTicket.setFlowUserId(response.getUserId()); workTicket.setFlowUserId(response.getUserId());
workTicket.setNextStepOperator(response.getNextStepOperator()); workTicket.setNextStepOperator(response.getNextStepOperator());
flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(response.getNextStepOperator()).concat("审批"); flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(response.getNextStepOperator()).concat("审批");
@ -497,7 +502,6 @@ public class TicketProcessServiceImpl implements TicketProcessService {
String taskId = response.getTaskId(); String taskId = response.getTaskId();
if (StringUtils.isEmpty(taskId)) { if (StringUtils.isEmpty(taskId)) {
workTicket.setFlowDescription("结束"); workTicket.setFlowDescription("结束");
// workTicket.setFlowTaskId(" ");
workTicket.setFlowTaskName("结束"); workTicket.setFlowTaskName("结束");
workTicket.setNextStepOperator(" "); workTicket.setNextStepOperator(" ");
workTicket.setStepOperator(" "); workTicket.setStepOperator(" ");
@ -507,6 +511,27 @@ public class TicketProcessServiceImpl implements TicketProcessService {
workTicket.setFlowTaskName(response.getTaskName()); workTicket.setFlowTaskName(response.getTaskName());
workTicket.setFlowDescription(flowDescription); workTicket.setFlowDescription(flowDescription);
} }
//如果签发人为false
if (workTicket.getSignFlag() != null) {
if (!workTicket.getSignFlag()) {
workTicket.setFlowDescription("作废");
workTicket.setFlowTaskName("作废");
workTicket.setNextStepOperator(" ");
workTicket.setStepOperator(" ");
}
}
//运行人员false
if (workTicket.getRecieveFlag() != null) {
if (!workTicket.getRecieveFlag()) {
workTicket.setFlowDescription("作废");
workTicket.setFlowTaskName("作废");
workTicket.setNextStepOperator(" ");
workTicket.setStepOperator(" ");
}
}
} }
@ -606,6 +631,9 @@ public class TicketProcessServiceImpl implements TicketProcessService {
// } // }
Map<String, Object> params = new HashMap<>(4); Map<String, Object> params = new HashMap<>(4);
params.put("workTicketVo", workTicketVo); params.put("workTicketVo", workTicketVo);
if ("8".equals(workTicketVo.getWorkTicket().getType())) {
params.put("principal", "taskUser_" + workTicketVo.getWorkTicket().getPrincipal());
}
//已开启流程 //已开启流程
R<BladeFlow> processInstanceContainNameByKey = flowClient.startProcessInstanceContainNameByKey(newFirstWorkTicketFlowKey, String.valueOf(workTicketVo.getWorkTicket().getId()), workTicketVo.getWorkTicket().getWorkContent(), params); R<BladeFlow> processInstanceContainNameByKey = flowClient.startProcessInstanceContainNameByKey(newFirstWorkTicketFlowKey, String.valueOf(workTicketVo.getWorkTicket().getId()), workTicketVo.getWorkTicket().getWorkContent(), params);
log.info("processInstanceContainNameByKey.isSuccess() : {}", processInstanceContainNameByKey.isSuccess()); log.info("processInstanceContainNameByKey.isSuccess() : {}", processInstanceContainNameByKey.isSuccess());
@ -771,14 +799,14 @@ public class TicketProcessServiceImpl implements TicketProcessService {
} }
WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket(); WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket();
if ((workTicket.getIsSafety() == null && workTicket.getIsHazard() == null && workTicket.getIsLimited() == null && workTicket.getIsRailway() == null) if (workTicket.getIsSafety() == null && workTicket.getIsHazard() == null && workTicket.getIsLimited() == null && workTicket.getIsRailway() == null
|| (workTicket.getIsSafety() == null || workTicket.getIsHazard() == null || workTicket.getIsLimited() == null || workTicket.getIsRailway() == null)) { && workTicket.getIsStart() == null) {
extractedWithWord(response, resultMap, status); extractedWithWord(response, resultMap, status);
return; return;
} }
//如果4个多为false 或为空 附件不展示附件 //如果4个多为false 或为空 附件不展示附件
if (!workTicket.getIsSafety() && !workTicket.getIsHazard() && !workTicket.getIsLimited() && !workTicket.getIsRailway()) { if (!workTicket.getIsSafety() && !workTicket.getIsHazard() && !workTicket.getIsLimited() && !workTicket.getIsRailway() && !workTicket.getIsStart()) {
extractedWithWord(response, resultMap, status); extractedWithWord(response, resultMap, status);
return; return;
} }
@ -801,22 +829,22 @@ public class TicketProcessServiceImpl implements TicketProcessService {
//安全隔离措施附页 (true,展示附件,false,不展示附件) //安全隔离措施附页 (true,展示附件,false,不展示附件)
if (workTicket.getIsSafety()) { if (workTicket.getIsSafety()) {
addFile(prefix, TicketConstant.SECURE_PAGE, docFileList); addFile(prefix, TicketConstant.SECURE_PAGE, docFileList);
// setWorkTicketPrincipalChange(docFileList);
} }
//危险点分析与预控措施票 (true,展示附件,false,不展示附件) //危险点分析与预控措施票 (true,展示附件,false,不展示附件)
if (workTicket.getIsSafety()) { if (workTicket.getIsSafety()) {
addFile(prefix, TicketConstant.SAFETY_PAGE, docFileList); addFile(prefix, TicketConstant.SAFETY_PAGE, docFileList);
// setWorkTicketHazardPointChange(docFileList);
} }
//动火工作票 (true,展示附件,false,不展示附件) //动火工作票 (true,展示附件,false,不展示附件)
if (workTicket.getIsRailway()) { if (workTicket.getIsRailway()) {
addFile(prefix, TicketConstant.FLIGHT_PAGE, docFileList); addFile(prefix, TicketConstant.FLIGHT_PAGE, docFileList);
// setWorkTicketRailwayChange(docFileList);
} }
//有限空间监测记录单(true,展示附件,false,不展示附件) //有限空间监测记录单(true,展示附件,false,不展示附件)
if (workTicket.getIsLimited()) { if (workTicket.getIsLimited()) {
addFile(prefix, TicketConstant.SPACE_PAGE, docFileList); addFile(prefix, TicketConstant.SPACE_PAGE, docFileList);
// setWorkTicketLimitedChange(docFileList); }
//每日开工和收工时间附页
if (workTicket.getIsStart()) {
addFile(prefix, TicketConstant.START_PAGE, docFileList);
} }
String name = LocalDate.now() + "-" + UUID.randomUUID().toString().replaceAll("-", ""); String name = LocalDate.now() + "-" + UUID.randomUUID().toString().replaceAll("-", "");
@ -832,11 +860,11 @@ public class TicketProcessServiceImpl implements TicketProcessService {
log.info("输出word路径:{}", docPath); log.info("输出word路径:{}", docPath);
//第一种工作票 //第一种工作票
resultMap.put("one", status == 1 ? "☑":"□"); resultMap.put("one", status == 1 ? "☑" : "□");
//第二种工作票 //第二种工作票
resultMap.put("two", status == 2 ? "☑":"□"); resultMap.put("two", status == 2 ? "☑" : "□");
//水力机器工作票 //水力机器工作票
resultMap.put("three", status == 3 ? "☑":"□"); resultMap.put("three", status == 3 ? "☑" : "□");
//导入文档 //导入文档
File file = new File(docPath); File file = new File(docPath);
MergeDocUtils.mergeDoc(docFileList, file); MergeDocUtils.mergeDoc(docFileList, file);

BIN
hzims-service/ticket/src/main/resources/template/secondary/每日开工和收工时间附页.docx

Binary file not shown.

BIN
hzims-service/ticket/src/main/resources/template/水力机械工作票模版.docx

Binary file not shown.
Loading…
Cancel
Save