提交 b5a1b709 authored 作者: 邓砥奕's avatar 邓砥奕

更新

上级 39ff888c
...@@ -613,12 +613,12 @@ public class AllotBillController { ...@@ -613,12 +613,12 @@ public class AllotBillController {
} }
@ApiOperation(value = "上传发送方签发人", notes = "上传发送方签发人") @ApiOperation(value = "上传发送方签发人", notes = "上传发送方签发人")
@PostMapping(value = "/updateAgent/{id}/{name}") @PostMapping(value = "/updateAgent")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity updateAgent(@PathVariable("id") int taskId,@PathVariable("name") String name){ public ResponseEntity updateAgent(@RequestBody AgentVo agentVo){
TaskBto taskBto = taskService.get(taskId); TaskBto taskBto = taskService.get(agentVo.getId());
AllotBill allotBill = allotBillService.getOne(taskBto.getBillId()); AllotBill allotBill = allotBillService.getOne(taskBto.getBillId());
allotBill.setAgent(name); allotBill.setAgent(agentVo.getName());
return ResponseEntity.ok(allotBillService.update(allotBill)); return ResponseEntity.ok(allotBillService.update(allotBill));
} }
} }
package com.tykj.dev.device.allot.controller; package com.tykj.dev.device.allot.controller;
import com.fasterxml.jackson.core.type.TypeReference;
import com.tykj.dev.config.swagger.AutoDocument; import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.allot.service.AllotBackBillService; import com.tykj.dev.device.allot.service.AllotBackBillService;
import com.tykj.dev.device.allot.service.AllotBillService; import com.tykj.dev.device.allot.service.AllotBillService;
...@@ -10,7 +11,9 @@ import com.tykj.dev.device.file.service.FilesUtil; ...@@ -10,7 +11,9 @@ import com.tykj.dev.device.file.service.FilesUtil;
import com.tykj.dev.device.library.repository.DeviceLibraryDao; import com.tykj.dev.device.library.repository.DeviceLibraryDao;
import com.tykj.dev.device.library.service.DeviceLibraryService; import com.tykj.dev.device.library.service.DeviceLibraryService;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary; import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import com.tykj.dev.device.user.subject.service.UserPublicService; import com.tykj.dev.device.user.subject.service.UserPublicService;
import com.tykj.dev.misc.utils.JacksonUtil;
import com.tykj.dev.misc.utils.StringSplitUtil; import com.tykj.dev.misc.utils.StringSplitUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -78,6 +81,9 @@ public class AllotBillSelectController { ...@@ -78,6 +81,9 @@ public class AllotBillSelectController {
} }
allotBillEntity.setSendFileList(FilesUtil.stringFileToList(allotBillEntity.getSendFiles())); allotBillEntity.setSendFileList(FilesUtil.stringFileToList(allotBillEntity.getSendFiles()));
allotBillEntity.setReplyFileList(FilesUtil.stringFileToList(allotBillEntity.getReplyFiles())); allotBillEntity.setReplyFileList(FilesUtil.stringFileToList(allotBillEntity.getReplyFiles()));
if (allotBillEntity.getScriptJson()!=null){
allotBillEntity.setScripts(JacksonUtil.readValue(allotBillEntity.getScriptJson(),new TypeReference<List<ScriptSaveVo>>() {}));
}
list.add(allotBillEntity); list.add(allotBillEntity);
List<DeviceLibrary> libraryEntities = new ArrayList<>(); List<DeviceLibrary> libraryEntities = new ArrayList<>();
//如果接收装备详情不为空,分隔装备id并添加 //如果接收装备详情不为空,分隔装备id并添加
...@@ -104,6 +110,9 @@ public class AllotBillSelectController { ...@@ -104,6 +110,9 @@ public class AllotBillSelectController {
} }
allotBillEntity.setSendFileList(FilesUtil.stringFileToList(allotBillEntity.getSendFiles())); allotBillEntity.setSendFileList(FilesUtil.stringFileToList(allotBillEntity.getSendFiles()));
allotBillEntity.setReplyFileList(FilesUtil.stringFileToList(allotBillEntity.getReplyFiles())); allotBillEntity.setReplyFileList(FilesUtil.stringFileToList(allotBillEntity.getReplyFiles()));
if (allotBillEntity.getScriptJson()!=null){
allotBillEntity.setScripts(JacksonUtil.readValue(allotBillEntity.getScriptJson(),new TypeReference<List<ScriptSaveVo>>() {}));
}
list.add(allotBillEntity); list.add(allotBillEntity);
List<DeviceLibrary> libraryEntities = new ArrayList<>(); List<DeviceLibrary> libraryEntities = new ArrayList<>();
//如果接收装备详情不为空,分隔装备id并添加 //如果接收装备详情不为空,分隔装备id并添加
......
...@@ -3,6 +3,7 @@ package com.tykj.dev.device.allot.controller; ...@@ -3,6 +3,7 @@ package com.tykj.dev.device.allot.controller;
import com.tykj.dev.config.swagger.AutoDocument; import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.allot.service.AllotBackBillService; import com.tykj.dev.device.allot.service.AllotBackBillService;
import com.tykj.dev.device.allot.subject.domin.AllotBackBill; import com.tykj.dev.device.allot.subject.domin.AllotBackBill;
import com.tykj.dev.device.allot.subject.vo.AgentVo;
import com.tykj.dev.device.allot.subject.vo.AllotBackReceiveVo; import com.tykj.dev.device.allot.subject.vo.AllotBackReceiveVo;
import com.tykj.dev.device.allot.subject.vo.AllotBillSaveVo; import com.tykj.dev.device.allot.subject.vo.AllotBillSaveVo;
import com.tykj.dev.device.allot.subject.vo.FileUploadVo; import com.tykj.dev.device.allot.subject.vo.FileUploadVo;
...@@ -287,12 +288,12 @@ public class BackController { ...@@ -287,12 +288,12 @@ public class BackController {
} }
@ApiOperation(value = "上传发送方签发人", notes = "上传发送方签发人") @ApiOperation(value = "上传发送方签发人", notes = "上传发送方签发人")
@PostMapping(value = "/updateAgent/{id}/{name}") @PostMapping(value = "/updateAgent")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity updateAgent(@PathVariable("id") int taskId, @PathVariable("name") String name){ public ResponseEntity updateAgent(@RequestBody AgentVo agentVo){
TaskBto taskBto = taskService.get(taskId); TaskBto taskBto = taskService.get(agentVo.getId());
AllotBackBill allotBackBill = allotBackBillService.getOne(taskBto.getBillId()); AllotBackBill allotBackBill = allotBackBillService.getOne(taskBto.getBillId());
allotBackBill.setAgent(name); allotBackBill.setAgent(agentVo.getName());
return ResponseEntity.ok(allotBackBillService.update(allotBackBill)); return ResponseEntity.ok(allotBackBillService.update(allotBackBill));
} }
} }
package com.tykj.dev.device.allot.subject.domin; package com.tykj.dev.device.allot.subject.domin;
import com.tykj.dev.device.file.entity.FileRet; import com.tykj.dev.device.file.entity.FileRet;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -175,6 +176,12 @@ public class AllotBackBill { ...@@ -175,6 +176,12 @@ public class AllotBackBill {
@Column(name = "apply_files",columnDefinition = "TEXT") @Column(name = "apply_files",columnDefinition = "TEXT")
private String applyFiles; private String applyFiles;
@Column(name = "script_json",columnDefinition = "TEXT")
private String scriptJson;
@Transient
private List<ScriptSaveVo> scripts = new ArrayList<>();
@Transient @Transient
private List<FileRet> replyFileList = new ArrayList<>(); private List<FileRet> replyFileList = new ArrayList<>();
......
...@@ -2,6 +2,7 @@ package com.tykj.dev.device.allot.subject.domin; ...@@ -2,6 +2,7 @@ package com.tykj.dev.device.allot.subject.domin;
import com.tykj.dev.device.file.entity.FileRet; import com.tykj.dev.device.file.entity.FileRet;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary; import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -252,6 +253,13 @@ public class AllotBill { ...@@ -252,6 +253,13 @@ public class AllotBill {
@Column(name = "send_files",columnDefinition = "TEXT") @Column(name = "send_files",columnDefinition = "TEXT")
private String sendFiles; private String sendFiles;
@Column(name = "script_json",columnDefinition = "TEXT")
private String scriptJson;
@Transient
private List<ScriptSaveVo> scripts = new ArrayList<>();
@Transient @Transient
private List<FileRet> replyFileList = new ArrayList<>(); private List<FileRet> replyFileList = new ArrayList<>();
......
package com.tykj.dev.device.allot.subject.vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@Data
@ApiModel("配发审核类")
public class AgentVo {
private Integer id;
private String name;
}
package com.tykj.dev.device.allot.subject.vo; package com.tykj.dev.device.allot.subject.vo;
import com.tykj.dev.device.allot.subject.domin.AllotBackBill; import com.tykj.dev.device.allot.subject.domin.AllotBackBill;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import com.tykj.dev.misc.utils.JacksonUtil;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -9,6 +11,7 @@ import org.springframework.beans.BeanUtils; ...@@ -9,6 +11,7 @@ import org.springframework.beans.BeanUtils;
import javax.validation.constraints.Min; import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.List;
/** /**
* @author dengdiyi * @author dengdiyi
...@@ -70,10 +73,15 @@ public class AllotBackBillSaveVo { ...@@ -70,10 +73,15 @@ public class AllotBackBillSaveVo {
@ApiModelProperty(value = "签发人") @ApiModelProperty(value = "签发人")
private String agent; private String agent;
private List<ScriptSaveVo> scriptSaveVos;
public AllotBackBill toDo() { public AllotBackBill toDo() {
AllotBackBill allotBackBill = new AllotBackBill(); AllotBackBill allotBackBill = new AllotBackBill();
BeanUtils.copyProperties(this, allotBackBill); BeanUtils.copyProperties(this, allotBackBill);
allotBackBill.setBackStatus(0); allotBackBill.setBackStatus(0);
if (this.scriptSaveVos!=null){
allotBackBill.setScriptJson(JacksonUtil.toJSon(scriptSaveVos));
}
return allotBackBill; return allotBackBill;
} }
} }
...@@ -4,6 +4,8 @@ import com.tykj.dev.device.allot.subject.domin.AllotBackBill; ...@@ -4,6 +4,8 @@ import com.tykj.dev.device.allot.subject.domin.AllotBackBill;
import com.tykj.dev.device.allot.subject.domin.AllotBill; import com.tykj.dev.device.allot.subject.domin.AllotBill;
import com.tykj.dev.device.file.entity.FileRet; import com.tykj.dev.device.file.entity.FileRet;
import com.tykj.dev.device.file.service.FilesUtil; import com.tykj.dev.device.file.service.FilesUtil;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import com.tykj.dev.misc.utils.JacksonUtil;
import com.tykj.dev.misc.utils.TimestampUtil; import com.tykj.dev.misc.utils.TimestampUtil;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -94,6 +96,8 @@ public class AllotBillSaveVo { ...@@ -94,6 +96,8 @@ public class AllotBillSaveVo {
@ApiModelProperty(value = "左签章Id") @ApiModelProperty(value = "左签章Id")
private String leftSignatureId; private String leftSignatureId;
private List<ScriptSaveVo> scriptSaveVos;
public AllotBill toDo() { public AllotBill toDo() {
AllotBill allotBillEntity = new AllotBill(); AllotBill allotBillEntity = new AllotBill();
BeanUtils.copyProperties(this, allotBillEntity); BeanUtils.copyProperties(this, allotBillEntity);
...@@ -105,6 +109,9 @@ public class AllotBillSaveVo { ...@@ -105,6 +109,9 @@ public class AllotBillSaveVo {
} }
allotBillEntity.setAllotStatus(2); allotBillEntity.setAllotStatus(2);
allotBillEntity.setSendTime(TimestampUtil.getCurrentTimestamp()); allotBillEntity.setSendTime(TimestampUtil.getCurrentTimestamp());
if (this.scriptSaveVos!=null){
allotBillEntity.setScriptJson(JacksonUtil.toJSon(scriptSaveVos));
}
return allotBillEntity; return allotBillEntity;
} }
......
...@@ -5,10 +5,8 @@ import com.tykj.dev.device.allot.service.AllotBillService; ...@@ -5,10 +5,8 @@ import com.tykj.dev.device.allot.service.AllotBillService;
import com.tykj.dev.device.allot.subject.domin.AllotBill; import com.tykj.dev.device.allot.subject.domin.AllotBill;
import com.tykj.dev.device.apply.service.DeviceApplyBillService; import com.tykj.dev.device.apply.service.DeviceApplyBillService;
import com.tykj.dev.device.apply.subject.domin.DeviceApplyBill; import com.tykj.dev.device.apply.subject.domin.DeviceApplyBill;
import com.tykj.dev.device.apply.subject.vo.ApplyDetailVo; import com.tykj.dev.device.apply.subject.vo.*;
import com.tykj.dev.device.apply.subject.vo.DeviceApplyAllotSaveVo; import com.tykj.dev.device.file.service.FilesUtil;
import com.tykj.dev.device.apply.subject.vo.DeviceApplyConfirmVo;
import com.tykj.dev.device.apply.subject.vo.DeviceApplySaveVo;
import com.tykj.dev.device.library.service.DeviceLibraryService; import com.tykj.dev.device.library.service.DeviceLibraryService;
import com.tykj.dev.device.library.service.DeviceLogService; import com.tykj.dev.device.library.service.DeviceLogService;
import com.tykj.dev.device.library.subject.Dto.DeviceLogDto; import com.tykj.dev.device.library.subject.Dto.DeviceLogDto;
...@@ -118,9 +116,12 @@ public class DeviceApplyController { ...@@ -118,9 +116,12 @@ public class DeviceApplyController {
//发起任务 //发起任务
TaskBto taskBto; TaskBto taskBto;
if (userUtils.getCurrentUnitLevel()==1){ if (userUtils.getCurrentUnitLevel()==1){
deviceApplyBillEntity.setApplyStatus(3);
deviceApplyBillService.update(deviceApplyBillEntity);
List<Integer> userIds = new ArrayList<>(); List<Integer> userIds = new ArrayList<>();
userIds.add(userId); userIds.add(userId);
taskBto = new TaskBto(StatusEnum.END.id, "申请业务", null, ".", deviceApplyBillEntity.getId(), 9,userUtils.getCurrentUnitId(), 0, null, userIds); userIds.add(0);
taskBto = new TaskBto(StatusEnum.WAIT_APPLY_FILE.id, "申请业务", null, ".", deviceApplyBillEntity.getId(), 9,userUtils.getCurrentUnitId(), 1, null, userIds);
} }
else { else {
//指定批复人 //指定批复人
...@@ -250,7 +251,7 @@ public class DeviceApplyController { ...@@ -250,7 +251,7 @@ public class DeviceApplyController {
allotBill.setLeftSignatureId(deviceApplyAllotSaveVo.getLeftSignatureId()); allotBill.setLeftSignatureId(deviceApplyAllotSaveVo.getLeftSignatureId());
} }
allotBill.setRightSignatureId(signId2.toString()); allotBill.setRightSignatureId(signId2.toString());
allotBillService.update(allotBill); AllotBill allotBill1 = allotBillService.update(allotBill);
taskBto.setBillId(allotBill.getId()); taskBto.setBillId(allotBill.getId());
//配发业务移动到下一阶段 //配发业务移动到下一阶段
TaskBto taskBto1 = taskService.moveToSpecial(taskBto,StatusEnum.ALLOTING); TaskBto taskBto1 = taskService.moveToSpecial(taskBto,StatusEnum.ALLOTING);
...@@ -291,7 +292,7 @@ public class DeviceApplyController { ...@@ -291,7 +292,7 @@ public class DeviceApplyController {
messageService.add(messageBto); messageService.add(messageBto);
log.info("[申请模块]:装备申请后发起配发"); log.info("[申请模块]:装备申请后发起配发");
myWebSocket.sendMessage1(); myWebSocket.sendMessage1();
return ResponseEntity.ok(new ResultObj(saveEntity, "发起配发成功")); return ResponseEntity.ok(new ResultObj(allotBill1, "发起成功"));
} }
@ApiOperation(value = "查询申请任务详情", notes = "可以通过这个接口查询申请任务详情") @ApiOperation(value = "查询申请任务详情", notes = "可以通过这个接口查询申请任务详情")
...@@ -350,4 +351,31 @@ public class DeviceApplyController { ...@@ -350,4 +351,31 @@ public class DeviceApplyController {
applyDetailVo.setTaskLogUserVos(allLogUserVos); applyDetailVo.setTaskLogUserVos(allLogUserVos);
return ResponseEntity.ok(applyDetailVo); return ResponseEntity.ok(applyDetailVo);
} }
@ApiOperation(value = "上传回执单", notes = "上传回执单")
@PostMapping("/uploadFile")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity uploadFile(@RequestBody @Validated UploadApplyFile uploadApplyFile) {
TaskBto taskBto = taskService.get(uploadApplyFile.getTaskId());
taskService.addInvolveUser(taskBto,userUtils.getCurrentUserId());
taskService.moveToNext(taskBto);
DeviceApplyBill deviceApplyBill = deviceApplyBillService.getOne(taskBto.getBillId());
deviceApplyBill.setApplyStatus(4);
deviceApplyBill.setBackFiles(FilesUtil.stringFileToList(uploadApplyFile.getBackFiles()));
deviceApplyBillService.update(deviceApplyBill);
return ResponseEntity.ok("上传成功");
}
@ApiOperation(value = "确认接收申请装备", notes = "确认接收申请装备")
@PostMapping("/confirm/{id}")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity confirm(@PathVariable("id") int taskId) {
TaskBto taskBto = taskService.get(taskId);
taskService.addInvolveUser(taskBto,userUtils.getCurrentUserId());
taskService.moveToEnd(taskBto);
DeviceApplyBill deviceApplyBill = deviceApplyBillService.getOne(taskBto.getBillId());
deviceApplyBill.setApplyStatus(2);
deviceApplyBillService.update(deviceApplyBill);
return ResponseEntity.ok("确认成功");
}
} }
...@@ -80,7 +80,7 @@ public class DeviceApplyBill { ...@@ -80,7 +80,7 @@ public class DeviceApplyBill {
/** /**
* 申请状态(0:申请待审核,1:申请审核失败,2:申请中,3:已批复待审核,4:批复审核失败,5:申请成功) * 申请状态(0:申请待审核,1:申请审核失败,2:申请中,3:已批复待审核,4:批复审核失败,5:申请成功)
*/ */
@ApiModelProperty(value = "申请状态(0:申请待审核,1:申请审核失败,2:申请中,3:驳回,4:申请成功)") @ApiModelProperty(value = "申请状态(0:申请待审核,1:申请审核失败,2:申请完结,3:等待中办回执单,4:等待确认接收中办装备)")
private Integer applyStatus; private Integer applyStatus;
/** /**
* 列装库主键idx数量(,作为分隔符),例如1x2,2x3,意为列装库id为1的申请2件,id为2的申请3件 * 列装库主键idx数量(,作为分隔符),例如1x2,2x3,意为列装库id为1的申请2件,id为2的申请3件
...@@ -128,6 +128,10 @@ public class DeviceApplyBill { ...@@ -128,6 +128,10 @@ public class DeviceApplyBill {
@Column(name = "apply_files",columnDefinition = "TEXT") @Column(name = "apply_files",columnDefinition = "TEXT")
private String applyFiles; private String applyFiles;
@Column(name = "back_files",columnDefinition = "TEXT")
private String backFiles;
@Column(name = "apply_num_files",columnDefinition = "TEXT") @Column(name = "apply_num_files",columnDefinition = "TEXT")
private String applyNumFiles; private String applyNumFiles;
...@@ -140,6 +144,9 @@ public class DeviceApplyBill { ...@@ -140,6 +144,9 @@ public class DeviceApplyBill {
@Transient @Transient
private List<FileRet> applyFileList = new ArrayList<>(); private List<FileRet> applyFileList = new ArrayList<>();
@Transient
private List<FileRet> backFileList = new ArrayList<>();
@Transient @Transient
private List<FileRet> applyNumFileList = new ArrayList<>(); private List<FileRet> applyNumFileList = new ArrayList<>();
} }
package com.tykj.dev.device.apply.subject.vo;
import com.tykj.dev.device.file.entity.FileRet;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author dengdiyi
*/
@Data
@ApiModel("申请上传回执单类")
public class UploadApplyFile {
@NotNull(message = "taskId不能为空")
@Min(value = 1,message = "taskId不能小于1")
@ApiModelProperty(value = "对应任务ID", example = "1")
private Integer taskId;
@ApiModelProperty(value = "申请回执单附件")
private List<FileRet> backFiles;
}
...@@ -229,7 +229,7 @@ public enum LogType { ...@@ -229,7 +229,7 @@ public enum LogType {
SCRAP_2(91,SCRAP.id, WAIT_UPLOAD_SCRAP_FILE.id, END.id, "上传报废单据"), SCRAP_2(91,SCRAP.id, WAIT_UPLOAD_SCRAP_FILE.id, END.id, "上传报废单据"),
SELF_CHECK_5(92,SELF_CHECK.id, ORIGIN_STATUS.id, END.id, "终端自查"), SELF_CHECK_5(92,SELF_CHECK.id, ORIGIN_STATUS.id, END.id, "终端自查"),
SELF_CHECK_6(93,SELF_CHECK.id, WAIT_SELF_CHECK.id, END.id, "周期自查"), SELF_CHECK_6(93,SELF_CHECK.id, WAIT_SELF_CHECK.id, END.id, "周期自查"),
APPLY_4(94,APPLY.id, ORIGIN_STATUS.id, END.id, "发起装备申请"), APPLY_4(94,APPLY.id, ORIGIN_STATUS.id, WAIT_APPLY_FILE.id, "发起装备申请"),
REPAIR_BACK_8(95,REPAIR_BACK.id, WAIT_UPLOAD_BACK_SEND_FILE.id, END.id, "上传领取单"), REPAIR_BACK_8(95,REPAIR_BACK.id, WAIT_UPLOAD_BACK_SEND_FILE.id, END.id, "上传领取单"),
REPAIR_SEND_11(96, REPAIR.id, WAIT_UPLOAD_SEND_FILE.id, END.id, "上传送修单"), REPAIR_SEND_11(96, REPAIR.id, WAIT_UPLOAD_SEND_FILE.id, END.id, "上传送修单"),
REPAIR_SEND_12(97, REPAIR.id, WAIT_UPLOAD_SEND_FILE.id, ARCHIVE.id, "取消上传送修单"), REPAIR_SEND_12(97, REPAIR.id, WAIT_UPLOAD_SEND_FILE.id, ARCHIVE.id, "取消上传送修单"),
...@@ -240,6 +240,8 @@ public enum LogType { ...@@ -240,6 +240,8 @@ public enum LogType {
ALLOT_BACK_7(103, ALLOT_BACK.id, WAIT_UPLOAD_ALLOT_BACK_FILE.id, ARCHIVE.id, "取消上传退回单"), ALLOT_BACK_7(103, ALLOT_BACK.id, WAIT_UPLOAD_ALLOT_BACK_FILE.id, ARCHIVE.id, "取消上传退回单"),
REPAIR_SEND_13(104, REPAIR.id, WAIT_UPLOAD_FILE.id, ARCHIVE.id, "取消上传送修单"), REPAIR_SEND_13(104, REPAIR.id, WAIT_UPLOAD_FILE.id, ARCHIVE.id, "取消上传送修单"),
REPAIR_BACK_9(105,REPAIR_BACK.id, WAIT_UPLOAD_BACK_FILE.id, ARCHIVE.id, "取消上传领取单"), REPAIR_BACK_9(105,REPAIR_BACK.id, WAIT_UPLOAD_BACK_FILE.id, ARCHIVE.id, "取消上传领取单"),
APPLY_5(106,APPLY.id, WAIT_APPLY_FILE.id, WAIT_CONFIRM_APPLY_DEVICE.id, "上传申请回执单"),
APPLY_6(107,APPLY.id, WAIT_CONFIRM_APPLY_DEVICE.id, END.id, "确认接收申请装备"),
; ;
public Integer id; public Integer id;
......
...@@ -223,6 +223,15 @@ public class DeviceDestroyController { ...@@ -223,6 +223,15 @@ public class DeviceDestroyController {
if (uploadDestroyFileVo.getDestroyFileName() != null) { if (uploadDestroyFileVo.getDestroyFileName() != null) {
deviceDestroyBill.setDestroyFileName(uploadDestroyFileVo.getDestroyFileName()); deviceDestroyBill.setDestroyFileName(uploadDestroyFileVo.getDestroyFileName());
} }
if (uploadDestroyFileVo.getUndertaker() != null) {
deviceDestroyBill.setUndertaker(uploadDestroyFileVo.getUndertaker());
}
if (uploadDestroyFileVo.getLeader() != null) {
deviceDestroyBill.setLeader(uploadDestroyFileVo.getLeader());
}
if (uploadDestroyFileVo.getSupervisor() != null) {
deviceDestroyBill.setSupervisor(uploadDestroyFileVo.getSupervisor());
}
deviceDestroyBillService.updateEntity(deviceDestroyBill); deviceDestroyBillService.updateEntity(deviceDestroyBill);
//任务完结 //任务完结
taskService.moveToEnd(taskBto); taskService.moveToEnd(taskBto);
......
...@@ -26,4 +26,13 @@ public class UploadDestroyFileVo { ...@@ -26,4 +26,13 @@ public class UploadDestroyFileVo {
@NotNull(message = "destroyFileUrl不能为空") @NotNull(message = "destroyFileUrl不能为空")
@ApiModelProperty(value = "销毁附件文件地址URL") @ApiModelProperty(value = "销毁附件文件地址URL")
private String destroyFileUrl; private String destroyFileUrl;
@ApiModelProperty(value = "承办人")
private String undertaker;
@ApiModelProperty(value = "主管领导")
private String leader;
@ApiModelProperty(value = "监销人")
private String supervisor;
} }
...@@ -4,6 +4,9 @@ import io.swagger.annotations.ApiModel; ...@@ -4,6 +4,9 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/** /**
* @author dengdiyi * @author dengdiyi
*/ */
...@@ -15,7 +18,7 @@ public class Script { ...@@ -15,7 +18,7 @@ public class Script {
private String model; private String model;
@ApiModelProperty(value = "类型") @ApiModelProperty(value = "类型")
private Integer type; private String type;
@ApiModelProperty(value = "装备名称") @ApiModelProperty(value = "装备名称")
private String name; private String name;
...@@ -24,12 +27,26 @@ public class Script { ...@@ -24,12 +27,26 @@ public class Script {
private String seqNumber; private String seqNumber;
@ApiModelProperty(value = "密级") @ApiModelProperty(value = "密级")
private Integer secretLevel; private String secretLevel;
@ApiModelProperty(value = "可见范围") @ApiModelProperty(value = "可见范围")
private Integer invisibleRange; private String invisibleRange;
@ApiModelProperty(value = "数量") @ApiModelProperty(value = "数量")
private Integer num; private Integer num;
@ApiModelProperty(value = "列装Id")
private Integer id;
@ApiModelProperty(value = "父列装Id")
private Integer partParentId;
@ApiModelProperty(value = "备注")
private String remark;
List<Script> childs = new ArrayList<>();
public void addChildNode(Script script) {
childs.add(script);
}
} }
package com.tykj.dev.device.library.subject.vo;
import com.tykj.dev.misc.utils.JacksonUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author dengdiyi
*/
@Data
@ApiModel("单据存储类")
public class ScriptSaveVo {
@ApiModelProperty(value = "型号")
private String model;
@ApiModelProperty(value = "类型")
private String type;
@ApiModelProperty(value = "装备名称")
private String name;
@ApiModelProperty(value = "装备序列号")
private String seqNumber;
@ApiModelProperty(value = "密级")
private String secretLevel;
@ApiModelProperty(value = "可见范围")
private String invisibleRange;
@ApiModelProperty(value = "数量")
private Integer num;
@ApiModelProperty(value = "列装Id")
private Integer id;
@ApiModelProperty(value = "备注")
private String remark;
public String toJson(){
return JacksonUtil.toJSon(this);
}
}
...@@ -44,7 +44,11 @@ public enum RepairStatusEnum { ...@@ -44,7 +44,11 @@ public enum RepairStatusEnum {
/** /**
* 等待上级维修装备送回 * 等待上级维修装备送回
*/ */
WAIT_BACK(8, "等待上级维修装备送回"); WAIT_BACK(8, "等待上级维修装备送回"),
/**
* 等待送修
*/
WAIT_SEND(9, "等待送修");
public Integer id; public Integer id;
......
...@@ -199,6 +199,15 @@ public enum StatusEnum { ...@@ -199,6 +199,15 @@ public enum StatusEnum {
* 装备申请待批复 * 装备申请待批复
*/ */
DEVICE_APPLY_CONFIRM(500, "装备申请待批复"), DEVICE_APPLY_CONFIRM(500, "装备申请待批复"),
/**
* 等待上传申请回执单
*/
WAIT_APPLY_FILE(510, "待上传申请回执单"),
/**
* 等待上传申请回执单
*/
WAIT_CONFIRM_APPLY_DEVICE(511, "待确认接收申请装备"),
/** /**
* 新增配套设备待审核 * 新增配套设备待审核
*/ */
......
...@@ -18,15 +18,15 @@ public class DeviceSeqUtil { ...@@ -18,15 +18,15 @@ public class DeviceSeqUtil {
public static void main(String[] args) { public static void main(String[] args) {
List<String> list=new ArrayList<>(); List<String> list=new ArrayList<>();
list.add(null); // list.add(null);
list.add("30338343767"); list.add("30338343767");
list.add("30338343768"); list.add("30338343768");
list.add("30338343769"); list.add("30338343769");
list.add("30338343770"); list.add("30338343770");
list.add("30338343771"); list.add("30338343771");
list.add("30338343772"); list.add("30338343772");
list.add("30338343773"); list.add("生成1");
list.add("30338343775"); list.add("");
System.out.println(getContinuousSeqs(list)); System.out.println(getContinuousSeqs(list));
} }
...@@ -330,33 +330,60 @@ public class DeviceSeqUtil { ...@@ -330,33 +330,60 @@ public class DeviceSeqUtil {
/** /**
* 将连续的序列号组合成一个字符串 * 将连续的序列号组合成一个字符串 为空的没有做判断
* @param strings 序列号区间 * @param strings 序列号区间
* @return 序列号连续组合的区间 * @return 序列号连续组合的区间
*/ */
public static List<String> getContinuousSeqs(List<String> strings){ public static List<String> getContinuousSeqs(List<String> strings){
List<String> results = new ArrayList<>(); List<String> results = new ArrayList<>();
if (strings.size()==1){ if (strings.size()==1) {
results.add(strings.get(0)); if (strings.get(0) != null && !"".equals(strings.get(0))){
results.add(strings.get(0));
}
} }
else { else {
List<String> sortedString = strings.stream().sorted().collect(Collectors.toList()); List<String> numSeqs = new ArrayList<>();
String lastSeq = sortedString.get(0); List<String> strSeqs = new ArrayList<>();
String first = null; strings.forEach(s -> {
for (int i = 1; i < sortedString.size(); i++) { if (s!=null&&!"".equals(s)) {
String index = sortedString.get(i); if (Character.isDigit(s.charAt(s.length() - 1))) {
if (getFirstString(lastSeq).equals(getFirstString(index))) { numSeqs.add(s);
Long num1 = getLastNum(lastSeq); } else {
Long num2 = getLastNum(index); strSeqs.add(s);
if (num2 == num1 + 1) { }
if (first == null) { }
first = lastSeq; });
} if (numSeqs.size()>0) {
if (i == sortedString.size()-1) { List<String> sortedString = numSeqs.stream().sorted(Comparator.nullsLast(String::compareTo)).collect(Collectors.toList());
StringBuffer stringBuffer = new StringBuffer(); String lastSeq = sortedString.get(0);
stringBuffer.append(first).append("-").append(index); String first = null;
results.add(stringBuffer.toString()); for (int i = 1; i < sortedString.size(); i++) {
first = null; String index = sortedString.get(i);
if (getFirstString(lastSeq).equals(getFirstString(index))) {
Long num1 = getLastNum(lastSeq);
Long num2 = getLastNum(index);
if (num2 == num1 + 1) {
if (first == null) {
first = lastSeq;
}
if (i == sortedString.size() - 1) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(first).append("-").append(index);
results.add(stringBuffer.toString());
first = null;
}
} else {
if (first == null) {
results.add(lastSeq);
} else {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(first).append("-").append(lastSeq);
results.add(stringBuffer.toString());
first = null;
}
if (i == sortedString.size() - 1) {
results.add(index);
}
} }
} else { } else {
if (first == null) { if (first == null) {
...@@ -371,20 +398,11 @@ public class DeviceSeqUtil { ...@@ -371,20 +398,11 @@ public class DeviceSeqUtil {
results.add(index); results.add(index);
} }
} }
} else { lastSeq = index;
if (first == null) {
results.add(lastSeq);
} else {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(first).append("-").append(lastSeq);
results.add(stringBuffer.toString());
first = null;
}
if (i == sortedString.size() - 1) {
results.add(index);
}
} }
lastSeq = index; }
if (strSeqs.size()>0){
results.addAll(strSeqs);
} }
} }
......
...@@ -293,24 +293,46 @@ public class PackingLibraryServiceImpl implements PackingLibraryService { ...@@ -293,24 +293,46 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
@Override @Override
public List<Script> getDevcieScript(List<Integer> ids) { public List<Script> getDevcieScript(List<Integer> ids) {
Map<Integer,DeviceLibrary> deviceLibraryMap = deviceLibraryService.getAllDeviceMap();
List<Script> scripts = new ArrayList<>(); List<Script> scripts = new ArrayList<>();
List<DeviceLibrary> deviceLibraries = new ArrayList<>(); List<DeviceLibrary> deviceLibraries = new ArrayList<>();
ids.forEach(integer -> deviceLibraries.add(deviceLibraryService.getOne(integer))); ids.forEach(integer -> deviceLibraries.add(deviceLibraryMap.get(integer)));
Map<Integer, List<DeviceLibrary>> map = deviceLibraries.stream().collect(groupingBy(DeviceLibrary::getPackingId)); Map<Integer, List<DeviceLibrary>> map = deviceLibraries.stream().collect(groupingBy(DeviceLibrary::getPackingId));
for (Integer packingId:map.keySet()){ for (Integer packingId:map.keySet()){
List<DeviceLibrary> deviceLibraryList = map.get(packingId); List<DeviceLibrary> deviceLibraryList = map.get(packingId);
PackingLibrary packingLibrary = getOne(packingId); PackingLibrary packingLibrary = getOne(packingId);
Script script = new Script(); Script script = new Script();
script.setInvisibleRange(packingLibrary.getInvisibleRange()); script.setId(packingId);
script.setPartParentId(packingLibrary.getPartParentId());
script.setInvisibleRange(packingLibrary.getInvisibleRangeName());
script.setModel(packingLibrary.getModel()); script.setModel(packingLibrary.getModel());
script.setName(packingLibrary.getName()); script.setName(packingLibrary.getName());
script.setSecretLevel(packingLibrary.getSecretLevel()); script.setSecretLevel(packingLibrary.getSecretLevelName());
script.setType(packingLibrary.getType()); script.setType(packingLibrary.getTypeName());
script.setNum(deviceLibraryList.size()); script.setNum(deviceLibraryList.size());
script.setSeqNumber(StringSplitUtil.stringListToString(DeviceSeqUtil.getContinuousSeqs(deviceLibraryList.stream().map(DeviceLibrary::getSeqNumber).collect(Collectors.toList())))); script.setSeqNumber(StringSplitUtil.stringListToString(DeviceSeqUtil.getContinuousSeqs(deviceLibraryList.stream().map(DeviceLibrary::getSeqNumber).collect(Collectors.toList()))));
scripts.add(script); scripts.add(script);
} }
return scripts; Map<Integer, Script> nodeCollect =
scripts.stream().collect(Collectors.toMap(Script::getId, script -> script));
List<Script> scriptList = new ArrayList<>();
List<Script> conList = GetTreeUtils.parseTreeFromDown(
scripts,
Script::getId,
script -> Optional.ofNullable(nodeCollect.get(script.getPartParentId())),
Script::addChildNode
);
for (Script s:conList) {
addScript(scriptList,s);
}
return scriptList;
}
private void addScript(List<Script> scripts,Script script){
scripts.add(script);
if (script.getChilds()!=null&&script.getChilds().size()>0){
script.getChilds().forEach(s -> addScript(scripts,s));
}
} }
/** /**
......
...@@ -145,7 +145,7 @@ public class RepairController { ...@@ -145,7 +145,7 @@ public class RepairController {
repairDetail.setModel(deviceLibraryEntity.getModel()); repairDetail.setModel(deviceLibraryEntity.getModel());
repairDetail.setName(deviceLibraryEntity.getName()); repairDetail.setName(deviceLibraryEntity.getName());
repairDetail.setOwnUnit(deviceLibraryEntity.getOwnUnit()); repairDetail.setOwnUnit(deviceLibraryEntity.getOwnUnit());
repairDetail.setRepairStatus(1); repairDetail.setRepairStatus(9);
repairDetail.setRfidSurfaceId(deviceLibraryEntity.getRfidSurfaceId()); repairDetail.setRfidSurfaceId(deviceLibraryEntity.getRfidSurfaceId());
repairDetail.setSeqNumber(deviceLibraryEntity.getSeqNumber()); repairDetail.setSeqNumber(deviceLibraryEntity.getSeqNumber());
repairDetail.setType(deviceLibraryEntity.getType()); repairDetail.setType(deviceLibraryEntity.getType());
...@@ -1223,7 +1223,7 @@ public class RepairController { ...@@ -1223,7 +1223,7 @@ public class RepairController {
public ResponseEntity changeRepairDeviceStatus(@RequestBody @Validated RepairStatusChangeVo repairStatusChangeVo) { public ResponseEntity changeRepairDeviceStatus(@RequestBody @Validated RepairStatusChangeVo repairStatusChangeVo) {
repairStatusChangeVo.getId().forEach(integer -> { repairStatusChangeVo.getId().forEach(integer -> {
RepairDetail repairDetail = deviceRepairDetailService.getOne(integer); RepairDetail repairDetail = deviceRepairDetailService.getOne(integer);
if (repairDetail.getRepairStatus()!=1){ if (repairDetail.getRepairStatus()!=1&&repairDetail.getRepairStatus()!=9){
throw new ApiException(ResponseEntity.status(303).body("序列号"+repairDetail.getSeqNumber()+"的装备已被其他专管员操作")); throw new ApiException(ResponseEntity.status(303).body("序列号"+repairDetail.getSeqNumber()+"的装备已被其他专管员操作"));
} }
}); });
...@@ -1572,6 +1572,7 @@ public class RepairController { ...@@ -1572,6 +1572,7 @@ public class RepairController {
//待维修装备 //待维修装备
if (type==1){ if (type==1){
List<RepairDetail> repairDetails = repairDetailDao.findAllByRepairStatus(1); List<RepairDetail> repairDetails = repairDetailDao.findAllByRepairStatus(1);
repairDetails.addAll(repairDetailDao.findAllByRepairStatus(9));
repairDetails.forEach(repairDetail -> { repairDetails.forEach(repairDetail -> {
repairDetail.setLocationUnit(deviceLibraryService.getOne(repairDetail.getDeviceId()).getLocationUnit()); repairDetail.setLocationUnit(deviceLibraryService.getOne(repairDetail.getDeviceId()).getLocationUnit());
repairDetail.setConfigName(); repairDetail.setConfigName();
...@@ -1581,6 +1582,7 @@ public class RepairController { ...@@ -1581,6 +1582,7 @@ public class RepairController {
//送修装备 //送修装备
else if(type==2){ else if(type==2){
List<RepairDetail> repairDetails = repairDetailDao.findAllByRepairStatus(5); List<RepairDetail> repairDetails = repairDetailDao.findAllByRepairStatus(5);
repairDetails.addAll(repairDetailDao.findAllByRepairStatus(9));
// repairDetails.addAll(repairDetailDao.findAllByRepairStatus(5)); // repairDetails.addAll(repairDetailDao.findAllByRepairStatus(5));
List<RepairDetail> repairDetails1 = repairDetailDao.findAll(); List<RepairDetail> repairDetails1 = repairDetailDao.findAll();
repairDetails1.removeAll(repairDetails); repairDetails1.removeAll(repairDetails);
...@@ -1765,22 +1767,22 @@ public class RepairController { ...@@ -1765,22 +1767,22 @@ public class RepairController {
} }
@ApiOperation(value = "上传送修发送方签发人", notes = "上传发送方签发人") @ApiOperation(value = "上传送修发送方签发人", notes = "上传发送方签发人")
@PostMapping(value = "/updateSendAgent/{id}/{name}") @PostMapping(value = "/updateSendAgent")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity updateSendAgent(@PathVariable("id") int taskId,@PathVariable("name") String name){ public ResponseEntity updateSendAgent(@RequestBody AgentBackVo agentBackVo){
TaskBto taskBto = taskService.get(taskId); TaskBto taskBto = taskService.get(agentBackVo.getId());
RepairBill repairBill = deviceRepairBillService.getOne(taskBto.getBillId()); RepairBill repairBill = deviceRepairBillService.getOne(taskBto.getBillId());
repairBill.setStartUserB(name); repairBill.setStartUserB(agentBackVo.getName());
return ResponseEntity.ok(deviceRepairBillService.update(repairBill)); return ResponseEntity.ok(deviceRepairBillService.update(repairBill));
} }
@ApiOperation(value = "上传领取发送方签发人", notes = "上传发送方签发人") @ApiOperation(value = "上传领取发送方签发人", notes = "上传发送方签发人")
@PostMapping(value = "/updateBackAgent/{id}/{name}") @PostMapping(value = "/updateBackAgent")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity updateBackAgent(@PathVariable("id") int taskId,@PathVariable("name") String name){ public ResponseEntity updateBackAgent(@RequestBody AgentBackVo agentBackVo){
TaskBto taskBto = taskService.get(taskId); TaskBto taskBto = taskService.get(agentBackVo.getId());
RepairBackBill repairBackBill = deviceRepairBackBillService.getOne(taskBto.getBillId()); RepairBackBill repairBackBill = deviceRepairBackBillService.getOne(taskBto.getBillId());
repairBackBill.setAgent(name); repairBackBill.setAgent(agentBackVo.getName());
return ResponseEntity.ok(deviceRepairBackBillService.update(repairBackBill)); return ResponseEntity.ok(deviceRepairBackBillService.update(repairBackBill));
} }
} }
package com.tykj.dev.device.repair.subject.vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@Data
@ApiModel("配发审核类")
public class AgentBackVo {
private Integer id;
private String name;
}
...@@ -170,6 +170,7 @@ public class SelfCheckController { ...@@ -170,6 +170,7 @@ public class SelfCheckController {
@ApiOperation(value = "装备比较", notes = "可以通过这个接口发起比较装备") @ApiOperation(value = "装备比较", notes = "可以通过这个接口发起比较装备")
@PostMapping(value = "/compare") @PostMapping(value = "/compare")
public ResponseEntity compare(@RequestBody CompareVo compareVo) { public ResponseEntity compare(@RequestBody CompareVo compareVo) {
Map<Integer,DeviceLibrary> deviceLibraryMap = deviceLibraryService.getAllDeviceMap();
CompareResultVo compareResultVo = new CompareResultVo(); CompareResultVo compareResultVo = new CompareResultVo();
List<Integer> list = compareVo.getDeivceIdList(); List<Integer> list = compareVo.getDeivceIdList();
List<String> list1 = new ArrayList<>(); List<String> list1 = new ArrayList<>();
...@@ -178,7 +179,7 @@ public class SelfCheckController { ...@@ -178,7 +179,7 @@ public class SelfCheckController {
List<DeviceLibrary> resultList = new ArrayList<>(); List<DeviceLibrary> resultList = new ArrayList<>();
List<Integer> detailIds = compareVo.getDetailIdList(); List<Integer> detailIds = compareVo.getDetailIdList();
for (int i = 0;i<list.size();i++) { for (int i = 0;i<list.size();i++) {
DeviceLibrary d = deviceLibraryService.getOne(list.get(i)); DeviceLibrary d = deviceLibraryMap.get(list.get(i));
if (detailIds.size()>i){ if (detailIds.size()>i){
d.setDetailId(detailIds.get(i)); d.setDetailId(detailIds.get(i));
} }
......
package com.tykj.dev.device.taskselect.controller; package com.tykj.dev.device.taskselect.controller;
import com.fasterxml.jackson.core.type.TypeReference;
import com.tykj.dev.config.swagger.AutoDocument; import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.allot.service.AllotBackBillService; import com.tykj.dev.device.allot.service.AllotBackBillService;
import com.tykj.dev.device.allot.service.AllotBillService; import com.tykj.dev.device.allot.service.AllotBillService;
...@@ -12,6 +13,7 @@ import com.tykj.dev.device.library.repository.DeviceLibraryDao; ...@@ -12,6 +13,7 @@ import com.tykj.dev.device.library.repository.DeviceLibraryDao;
import com.tykj.dev.device.library.service.DeviceLibraryService; import com.tykj.dev.device.library.service.DeviceLibraryService;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary; import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.vo.DeviceLibrarySelectVo; import com.tykj.dev.device.library.subject.vo.DeviceLibrarySelectVo;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import com.tykj.dev.device.matching.service.MatchingDeviceBillService; import com.tykj.dev.device.matching.service.MatchingDeviceBillService;
import com.tykj.dev.device.matching.service.MatchingDeviceLibraryService; import com.tykj.dev.device.matching.service.MatchingDeviceLibraryService;
import com.tykj.dev.device.matching.subject.domin.MatchingDeviceBill; import com.tykj.dev.device.matching.subject.domin.MatchingDeviceBill;
...@@ -38,6 +40,7 @@ import com.tykj.dev.device.taskselect.vo.SignatureSaveVo; ...@@ -38,6 +40,7 @@ import com.tykj.dev.device.taskselect.vo.SignatureSaveVo;
import com.tykj.dev.device.user.subject.service.UserPublicService; import com.tykj.dev.device.user.subject.service.UserPublicService;
import com.tykj.dev.misc.base.ResultObj; import com.tykj.dev.misc.base.ResultObj;
import com.tykj.dev.misc.exception.ApiException; import com.tykj.dev.misc.exception.ApiException;
import com.tykj.dev.misc.utils.JacksonUtil;
import com.tykj.dev.misc.utils.ResultUtil; import com.tykj.dev.misc.utils.ResultUtil;
import com.tykj.dev.misc.utils.Snowflake; import com.tykj.dev.misc.utils.Snowflake;
import com.tykj.dev.misc.utils.StringSplitUtil; import com.tykj.dev.misc.utils.StringSplitUtil;
...@@ -203,6 +206,9 @@ public class TaskSelectController { ...@@ -203,6 +206,9 @@ public class TaskSelectController {
if (allotBillEntity.getReceiveUserbId() != null) { if (allotBillEntity.getReceiveUserbId() != null) {
allotBillEntity.setReceiveUserB(userPublicService.getOne(allotBillEntity.getReceiveUserbId()).getName()); allotBillEntity.setReceiveUserB(userPublicService.getOne(allotBillEntity.getReceiveUserbId()).getName());
} }
if (allotBillEntity.getScriptJson()!=null){
allotBillEntity.setScripts(JacksonUtil.readValue(allotBillEntity.getScriptJson(),new TypeReference<List<ScriptSaveVo>>() {}));
}
list.add(allotBillEntity); list.add(allotBillEntity);
String str2 = allotBillEntity.getAllotCheckDetail(); String str2 = allotBillEntity.getAllotCheckDetail();
List<DeviceLibrary> deviceLibraryEntities = new ArrayList<>(); List<DeviceLibrary> deviceLibraryEntities = new ArrayList<>();
...@@ -256,6 +262,9 @@ public class TaskSelectController { ...@@ -256,6 +262,9 @@ public class TaskSelectController {
allotBackBill.setSendFileList(FilesUtil.stringFileToList(allotBackBill.getSendFiles())); allotBackBill.setSendFileList(FilesUtil.stringFileToList(allotBackBill.getSendFiles()));
allotBackBill.setReplyFileList(FilesUtil.stringFileToList(allotBackBill.getReplyFiles())); allotBackBill.setReplyFileList(FilesUtil.stringFileToList(allotBackBill.getReplyFiles()));
allotBackBill.setApplyFileList(FilesUtil.stringFileToList(allotBackBill.getApplyFiles())); allotBackBill.setApplyFileList(FilesUtil.stringFileToList(allotBackBill.getApplyFiles()));
if (allotBackBill.getScriptJson()!=null){
allotBackBill.setScripts(JacksonUtil.readValue(allotBackBill.getScriptJson(),new TypeReference<List<ScriptSaveVo>>() {}));
}
list.add(allotBackBill); list.add(allotBackBill);
String detail = allotBackBill.getBackCheckDetail(); String detail = allotBackBill.getBackCheckDetail();
List<DeviceLibrary> libraryArrayList = new ArrayList<>(); List<DeviceLibrary> libraryArrayList = new ArrayList<>();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论