Browse Source

修改水力机械工作票

zhongwei
段飞宇 1 year ago
parent
commit
61a5e40708
  1. 19
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

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

@ -195,7 +195,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
workTicketVo.getWorkTicket().setSignage(station.getSignage());
workTicketVo.getWorkTicket().setSignageCode(station.getCode());
//2. 获取编码
String code = processIdWorker.getTicketByCode(workTicketVo.getWorkTicket().getSignage(), this.getTicketWichCode(workTicketVo.getWorkTicket().getType()),
String code = processIdWorker.getTicketByCode(signage, this.getTicketWichCode(workTicketVo.getWorkTicket().getType()),
LocalDateTime.now());
workTicketVo.getWorkTicket().setCode(code);
//3 .保存工作对象
@ -220,10 +220,17 @@ public class TicketProcessServiceImpl implements TicketProcessService {
* @return
*/
private String getDictValue(WorkTicketVo workTicketVo) {
//获取当前登录人
Long userId = AuthUtil.getUserId();
//负责人
Long principal = workTicketVo.getWorkTicket().getPrincipal();
String key = FIRST_TICKET_KEY;
if ("6".equals(workTicketVo.getWorkTicket().getType()) || "7".equals(workTicketVo.getWorkTicket().getType())) {
if ("6".equals(workTicketVo.getWorkTicket().getType()) ||
"7".equals(workTicketVo.getWorkTicket().getType()) ||
("8".equals(workTicketVo.getWorkTicket().getType()) && userId.longValue() == principal.longValue())) {
key = FIRST_TICKET_KEY;
} else if ("8".equals(workTicketVo.getWorkTicket().getType())) {
} else if ("8".equals(workTicketVo.getWorkTicket().getType()) && userId.longValue() != principal.longValue()) {
key = MACHINERY_TICKET_KEY;
}
String dictValue = processDictService.selectDictValueByKey(key);
@ -631,7 +638,11 @@ public class TicketProcessServiceImpl implements TicketProcessService {
// }
Map<String, Object> params = new HashMap<>(4);
params.put("workTicketVo", workTicketVo);
if ("8".equals(workTicketVo.getWorkTicket().getType())) {
//获取当前登录人
Long userId = AuthUtil.getUserId();
//负责人
Long principal = workTicketVo.getWorkTicket().getPrincipal();
if ("8".equals(workTicketVo.getWorkTicket().getType()) && principal.longValue() != userId.longValue()) {
params.put("principal", "taskUser_" + workTicketVo.getWorkTicket().getPrincipal());
}
//已开启流程

Loading…
Cancel
Save