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

更新

上级 b5a1b709
......@@ -103,10 +103,13 @@ public class AllotBillSelectController {
List<Object> list = new ArrayList<>();
//set账单用户名称并添加
AllotBackBill allotBillEntity = allotBackBillService.getOne(id);
allotBillEntity.setSendUsera(userService.getOne(allotBillEntity.getSendUseraId()).getName());
allotBillEntity.setSendUserb(allotBillEntity.getAgent());
allotBillEntity.setSenderUserA(userService.getOne(allotBillEntity.getSendUseraId()).getName());
allotBillEntity.setSenderUserB(allotBillEntity.getAgent());
if (allotBillEntity.getReceiveUseraId() != null) {
allotBillEntity.setReceiveUsera(userService.getOne(allotBillEntity.getReceiveUseraId()).getName());
allotBillEntity.setReceiveUserA(userService.getOne(allotBillEntity.getReceiveUseraId()).getName());
}
if (allotBillEntity.getReceiveUserbId() !=null){
allotBillEntity.setReceiveUserB(userService.getOne(allotBillEntity.getReceiveUserbId()).getName());
}
allotBillEntity.setSendFileList(FilesUtil.stringFileToList(allotBillEntity.getSendFiles()));
allotBillEntity.setReplyFileList(FilesUtil.stringFileToList(allotBillEntity.getReplyFiles()));
......
......@@ -99,8 +99,8 @@ public class AllotBackBillServiceImpl implements AllotBackBillService {
public Page<AllotBackBill> getPage(AllotBillSelectVo allotBillSelectVo, Pageable pageable) {
Page<AllotBackBill> page = allotBackBillDao.findAll(getSelectSpecification(allotBillSelectVo), pageable);
for (AllotBackBill a : page.getContent()) {
a.setSendUsera(userPublicService.getOne(a.getSendUseraId()).getName());
a.setReceiveUsera(userPublicService.getOne(a.getReceiveUseraId()).getName());
a.setSenderUserA(userPublicService.getOne(a.getSendUseraId()).getName());
a.setReceiveUserA(userPublicService.getOne(a.getReceiveUseraId()).getName());
}
return page;
}
......
......@@ -139,21 +139,21 @@ public class AllotBackBill {
@ApiModelProperty(value = "删除标记(0:未删除,1:已删除)")
private Integer deleteTag = 0;
@ApiModelProperty(value = "发件经办人(A岗位)")
@ApiModelProperty(value = "发件经办人")
@Transient
private String sendUsera;
private String senderUserA;
@ApiModelProperty(value = "发件经办人(B岗位)")
@ApiModelProperty(value = "收件经办人")
@Transient
private String sendUserb;
private String receiveUserA;
@ApiModelProperty(value = "收件经办人(A岗位)")
@ApiModelProperty(value = "收件方审核人")
@Transient
private String receiveUsera;
private String receiveUserB;
@ApiModelProperty(value = "收件方审核人(B岗位)")
@ApiModelProperty(value = "发件方审核人")
@Transient
private String receiveUserb;
private String senderUserB;
@ApiModelProperty(value = "退回单号")
private String num;
......
......@@ -130,6 +130,9 @@ public class AllotBillSaveVo {
allotBillEntity.setBackCheckResult(this.allotCheckResult);
allotBillEntity.setBackCount(this.allotCount);
allotBillEntity.setBackedCount(this.allotedCount);
if (this.scriptSaveVos!=null){
allotBillEntity.setScriptJson(JacksonUtil.toJSon(scriptSaveVos));
}
return allotBillEntity;
}
}
......@@ -31,10 +31,7 @@ import com.tykj.dev.misc.base.BusinessEnum;
import com.tykj.dev.misc.base.ResultObj;
import com.tykj.dev.misc.base.StatusEnum;
import com.tykj.dev.misc.exception.ApiException;
import com.tykj.dev.misc.utils.ResultUtil;
import com.tykj.dev.misc.utils.Snowflake;
import com.tykj.dev.misc.utils.StringSplitUtil;
import com.tykj.dev.misc.utils.TaskDisposeUtil;
import com.tykj.dev.misc.utils.*;
import com.tykj.dev.rfid.service.InputOutputDeviceService;
import com.tykj.dev.socket.MyWebSocket;
import io.swagger.annotations.Api;
......@@ -233,6 +230,9 @@ public class DeviceApplyController {
allotBillEntity.setSendTime(new Date());
allotBillEntity.setAllotType(2);
allotBillEntity.setAllotStatus(2);
if(deviceApplyAllotSaveVo.getScriptSaveVos()!=null) {
allotBillEntity.setScriptJson(JacksonUtil.toJSon(deviceApplyAllotSaveVo.getScriptSaveVos()));
}
if (deviceApplyAllotSaveVo.getSendUserbId()!=null) {
allotBillEntity.setAgent(userPublicService.getOne(deviceApplyAllotSaveVo.getSendUserbId()).getName());
}
......
package com.tykj.dev.device.apply.subject.vo;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
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
......@@ -50,4 +52,6 @@ public class DeviceApplyAllotSaveVo {
@ApiModelProperty(value = "左签章Id")
private String leftSignatureId;
private List<ScriptSaveVo> scriptSaveVos;
}
package com.tykj.dev.device.repair.controller;
import com.fasterxml.jackson.core.type.TypeReference;
import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.file.service.FilesUtil;
import com.tykj.dev.device.library.repository.DeviceLibraryDao;
import com.tykj.dev.device.library.service.DeviceLibraryService;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import com.tykj.dev.device.repair.repository.RepairDetailDao;
import com.tykj.dev.device.repair.repository.RepairSendBillDao;
import com.tykj.dev.device.repair.service.RepairBackBillService;
......@@ -24,6 +26,7 @@ import com.tykj.dev.device.task.subject.vo.TaskUserVo;
import com.tykj.dev.device.task.utils.TaskUtils;
import com.tykj.dev.device.user.subject.service.UserPublicService;
import com.tykj.dev.misc.base.RepairStatusEnum;
import com.tykj.dev.misc.utils.JacksonUtil;
import com.tykj.dev.misc.utils.PageUtil;
import com.tykj.dev.misc.utils.ResultUtil;
import io.swagger.annotations.Api;
......@@ -134,8 +137,11 @@ public class RepairBillSelectController {
list.add(repairBill);
//获取装备列表
RepairSendBill repairSendBill = repairSendBillDao.findByDeviceRepairBillId(repairBill.getId());
list.add(repairSendBill);
repairSendBill.setSendFileList(FilesUtil.stringFileToList(repairSendBill.getSendFiles()));
if (repairSendBill.getScriptJson()!=null){
repairSendBill.setScripts(JacksonUtil.readValue(repairSendBill.getScriptJson(),new TypeReference<List<ScriptSaveVo>>() {}));
}
list.add(repairSendBill);
List<DeviceLibrary> deviceLibraries = new ArrayList<>();
if (repairSendBill.getRepairDeviceCheckDetail() != null) {
String[] strings1 = repairSendBill.getRepairDeviceCheckDetail().split("x");
......@@ -184,6 +190,9 @@ public class RepairBillSelectController {
if (repairBackBill.getReceiveUserbId() != null) {
repairBackBill.setReceiveUserB(userPublicService.getOne(repairBackBill.getReceiveUserbId()).getName());
}
if (repairBackBill.getScriptJson()!=null){
repairBackBill.setScripts(JacksonUtil.readValue(repairBackBill.getScriptJson(),new TypeReference<List<ScriptSaveVo>>() {}));
}
list.add(repairBackBill);
repairBackBill.setSendFileList(FilesUtil.stringFileToList(repairBackBill.getSendFiles()));
List<DeviceLibrary> deviceLibraries = new ArrayList<>();
......
package com.tykj.dev.device.repair.controller;
import com.fasterxml.jackson.core.type.TypeReference;
import com.tykj.dev.config.GlobalMap;
import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.file.service.FilesUtil;
......@@ -13,6 +14,7 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.vo.DeviceEditVo;
import com.tykj.dev.device.library.subject.vo.DeviceLibraryUpdateVo;
import com.tykj.dev.device.library.subject.vo.FileVo;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import com.tykj.dev.device.repair.repository.RepairBackBillDao;
import com.tykj.dev.device.repair.repository.RepairDetailDao;
import com.tykj.dev.device.repair.repository.RepairSendBillDao;
......@@ -40,10 +42,7 @@ import com.tykj.dev.misc.base.BusinessEnum;
import com.tykj.dev.misc.base.RepairStatusEnum;
import com.tykj.dev.misc.base.StatusEnum;
import com.tykj.dev.misc.exception.ApiException;
import com.tykj.dev.misc.utils.ResultUtil;
import com.tykj.dev.misc.utils.Snowflake;
import com.tykj.dev.misc.utils.StringSplitUtil;
import com.tykj.dev.misc.utils.TaskDisposeUtil;
import com.tykj.dev.misc.utils.*;
import com.tykj.dev.rfid.service.InputOutputDeviceService;
import com.tykj.dev.socket.MyWebSocket;
import io.swagger.annotations.Api;
......@@ -172,7 +171,7 @@ public class RepairController {
if (detailIds.size()>0){
detailIds.forEach(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()+"的装备已被其他专管员操作"));
}
});
......@@ -184,6 +183,9 @@ public class RepairController {
Integer userId = userUtils.getCurrentUserId();
BeanUtils.copyProperties(repairBillSaveVo, repairBill);
BeanUtils.copyProperties(repairBillSaveVo, deviceRepairSendBillEntity);
if (repairBillSaveVo.getScriptSaveVos()!=null){
deviceRepairSendBillEntity.setScriptJson(JacksonUtil.toJSon(repairBillSaveVo.getScriptSaveVos()));
}
// repairBill.setRepairStatus(0);
//更新维修单和送修单状态
//如果当前为省向国家发起的
......@@ -238,6 +240,7 @@ public class RepairController {
if (oldRepairDetail.getDeviceRepairBillId()==0) {
oldRepairDetail.setRemark(d.getRemark());
oldRepairDetail.setDeviceRepairBillId(repairBill1.getId());
oldRepairDetail.setRepairStatus(0);
deviceRepairDetailService.update(oldRepairDetail);
}
else {
......@@ -749,6 +752,9 @@ public class RepairController {
repairBackBill.setLeftSignatureId(repairBackBillSaveVo.getLeftSignatureId());
}
repairBackBill.setRightSignatureId(signId2.toString());
if (repairBackBillSaveVo.getScriptSaveVos()!=null){
repairBackBill.setScriptJson(JacksonUtil.toJSon(repairBackBillSaveVo.getScriptSaveVos()));
}
RepairBackBill deviceRepairBackBillEntity1 = deviceRepairBackBillService.save(repairBackBill);
Calendar calendar = Calendar.getInstance();
String s1 = "NO:第" + calendar.get(Calendar.YEAR) + "LQ" + repairBackBill.getId() + "号";
......@@ -1248,8 +1254,13 @@ public class RepairController {
else {
//获取旧状态
Integer oldStatus = repairDetail1.getRepairStatus();
//修改当前任务维修详情单该装备状态
repairDetail1.setRepairStatus(repairStatusChangeVo.getNewStatus());
if (repairStatusChangeVo.getNewStatus()==2&&repairDetail1.getOwnUnit().equals(userUtils.getCurrentUserUnitName())){
repairDetail1.setRepairStatus(5);
}
else {
//修改当前任务维修详情单该装备状态
repairDetail1.setRepairStatus(repairStatusChangeVo.getNewStatus());
}
//如果修改为已报废,更改新装备详情id为0,,更新装备状态
if (repairStatusChangeVo.getNewStatus() == 4) {
repairDetail1.setNewDeviceDetailId(0);
......@@ -1285,9 +1296,9 @@ public class RepairController {
DeviceLogDto deviceLogDto = new DeviceLogDto(repairDetail1.getDeviceId(), remark, fileVos);
deviceLogService.addLog(deviceLogDto);
if (repairStatusChangeVo.getNewStatus() == 2) {
Integer unitId = userPublicService.getOne(repairDetail1.getCreateUserId()).getUnitsId();
if (repairDetail1.getPid() != null) {
RepairDetail repairDetail = deviceRepairDetailService.getOne(repairDetail1.getPid());
Integer unitId = userPublicService.getOne(repairDetail.getCreateUserId()).getUnitsId();
if (messageMap.get(unitId) == null) {
messageMap.put(unitId, Collections.singletonList(repairDetail.getId()));
} else {
......@@ -1296,7 +1307,6 @@ public class RepairController {
messageMap.put(unitId, ids);
}
} else {
Integer unitId = userPublicService.getOne(repairDetail1.getCreateUserId()).getUnitsId();
if (messageMap.get(unitId) == null) {
messageMap.put(unitId, Collections.singletonList(repairDetail1.getId()));
} else {
......@@ -1421,6 +1431,9 @@ public class RepairController {
//获取装备列表
RepairSendBill repairSendBill = deviceRepairSendBillDao.findByDeviceRepairBillId(repairBill.getId());
repairSendBill.setSendFileList(FilesUtil.stringFileToList(repairSendBill.getSendFiles()));
if (repairSendBill.getScriptJson()!=null){
repairSendBill.setScripts(JacksonUtil.readValue(repairSendBill.getScriptJson(),new TypeReference<List<ScriptSaveVo>>() {}));
}
repairBillDetailVo.setRepairSendBill(repairSendBill);
List<DeviceLibrary> deviceLibraries = new ArrayList<>();
if (repairSendBill.getRepairDeviceCheckDetail() != null) {
......@@ -1475,6 +1488,9 @@ public class RepairController {
//获取维修退回单
RepairBackBill repairBackBill = deviceRepairBackBillService.getOne(taskBto.getBillId());
repairBackBill.setSendFileList(FilesUtil.stringFileToList(repairBackBill.getSendFiles()));
if (repairBackBill.getScriptJson()!=null){
repairBackBill.setScripts(JacksonUtil.readValue(repairBackBill.getScriptJson(),new TypeReference<List<ScriptSaveVo>>() {}));
}
repairBillDetailVo.setRepairBackBill(repairBackBill);
//获取送修单
// RepairBill repairBill1 = deviceRepairBillService.getOne(taskService.get(taskBto.getParentTaskId()).getBillId());
......
package com.tykj.dev.device.repair.subject.domin;
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.ApiModelProperty;
import lombok.Data;
......@@ -240,6 +241,12 @@ public class RepairBackBill {
@Column(name = "send_files",columnDefinition = "TEXT")
private String sendFiles;
@Column(name = "script_json",columnDefinition = "TEXT")
private String scriptJson;
@Transient
private List<ScriptSaveVo> scripts = new ArrayList<>();
@Transient
private List<FileRet> sendFileList = new ArrayList<>();
}
package com.tykj.dev.device.repair.subject.domin;
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.ApiModelProperty;
import lombok.Data;
......@@ -232,6 +233,12 @@ public class RepairSendBill {
@Column(name = "send_files",columnDefinition = "TEXT")
private String sendFiles;
@Column(name = "script_json",columnDefinition = "TEXT")
private String scriptJson;
@Transient
private List<ScriptSaveVo> scripts = new ArrayList<>();
@Transient
private List<FileRet> sendFileList = new ArrayList<>();
}
package com.tykj.dev.device.repair.subject.vo;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -89,4 +90,6 @@ public class RepairBackBillSaveVo {
@ApiModelProperty(value = "左签章Id")
private String leftSignatureId;
private List<ScriptSaveVo> scriptSaveVos;
}
package com.tykj.dev.device.repair.subject.vo;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -89,4 +90,6 @@ public class RepairBillSaveVo {
@ApiModelProperty(value = "左签章Id")
private String leftSignatureId;
private List<ScriptSaveVo> scriptSaveVos;
}
......@@ -250,14 +250,14 @@ public class TaskSelectController {
}
AllotBackBill allotBackBill = allotBackBillService.getOne(billId);
if (allotBackBill.getSendUseraId() != null) {
allotBackBill.setSendUsera(userPublicService.getOne(allotBackBill.getSendUseraId()).getName());
allotBackBill.setSenderUserA(userPublicService.getOne(allotBackBill.getSendUseraId()).getName());
}
allotBackBill.setSendUserb(allotBackBill.getAgent());
allotBackBill.setSenderUserB(allotBackBill.getAgent());
if (allotBackBill.getReceiveUseraId() != null) {
allotBackBill.setReceiveUsera(userPublicService.getOne(allotBackBill.getReceiveUseraId()).getName());
allotBackBill.setReceiveUserA(userPublicService.getOne(allotBackBill.getReceiveUseraId()).getName());
}
if (allotBackBill.getReceiveUserbId() != null) {
allotBackBill.setReceiveUserb(userPublicService.getOne(allotBackBill.getReceiveUserbId()).getName());
allotBackBill.setReceiveUserB(userPublicService.getOne(allotBackBill.getReceiveUserbId()).getName());
}
allotBackBill.setSendFileList(FilesUtil.stringFileToList(allotBackBill.getSendFiles()));
allotBackBill.setReplyFileList(FilesUtil.stringFileToList(allotBackBill.getReplyFiles()));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论