提交 ab745cca authored 作者: zhoushaopan's avatar zhoushaopan

添加一些构造,在装备日志中添加了一个taskId字段

上级 03cea1a8
......@@ -270,7 +270,7 @@ public class AllotBillController {
}
}
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "纵向配发将所属列装由" + deviceLibraryEntity.getMatchingRangeName() + "的列装改为"+configCache.getMatchingRangeMap().get(1)+"的列装", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "纵向配发将所属列装由" + deviceLibraryEntity.getMatchingRangeName() + "的列装改为"+configCache.getMatchingRangeMap().get(1)+"的列装", fileVoList,saveEntity.getId(),null);
deviceLogService.addLog(deviceLogDto);
}
//改变装备生命状态为配发
......@@ -304,7 +304,7 @@ public class AllotBillController {
}
}
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "横向配发将所属列装由" + deviceLibraryEntity.getMatchingRangeName() + "的列装改为" + configCache.getMatchingRangeMap().get(3) + "的列装", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "横向配发将所属列装由" + deviceLibraryEntity.getMatchingRangeName() + "的列装改为" + configCache.getMatchingRangeMap().get(3) + "的列装", fileVoList,saveEntity.getId(),null);
deviceLogService.addLog(deviceLogDto);
}
//横向直接改变装备所属所在
......@@ -313,7 +313,7 @@ public class AllotBillController {
}
deviceLibraryService.update(deviceLibraryEntity);
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "对" + allotBillEntity.getReceiveUnit() + "发起配发", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "对" + allotBillEntity.getReceiveUnit() + "发起配发", fileVoList,saveEntity.getId(),null);
deviceLogService.addLog(deviceLogDto);
}
}
......@@ -430,7 +430,7 @@ public class AllotBillController {
deviceLibraryEntity.setProdNumber(allotReceiveVo.getMap().get(id));
}
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收并发起入库", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收并发起入库", fileVoList,taskBto.getId(),null);
deviceLogService.addLog(deviceLogDto);
deviceLibraryService.update(deviceLibraryEntity);
}
......@@ -441,7 +441,7 @@ public class AllotBillController {
DeviceLibrary deviceLibraryEntity = deviceLibraryService.getOne(id);
deviceLibraryEntity.setLifeStatus(11);
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收入库丢失", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收入库丢失", fileVoList,taskBto.getId(),null);
deviceLogService.addLog(deviceLogDto);
deviceLibraryService.update(deviceLibraryEntity);
}
......@@ -664,7 +664,7 @@ public class AllotBillController {
List<Integer> deviceIds = StringSplitUtil.split(allotBill.getAllotCheckDetail());
deviceIds.forEach(integer -> {
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传配发单据", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传配发单据", fileVoList,taskBto.getId(),null);
deviceLogService.addLog(deviceLogDto);
});
//签发人阅知
......@@ -737,7 +737,7 @@ public class AllotBillController {
List<FileVo> fileVoList = new ArrayList<>();
fileVo.getAllotFiles().forEach(fileRet -> fileVoList.add(new FileVo("配发单", fileRet.getName(), fileRet.getPreviewPath())));
ids.forEach(integer -> {
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传配发单", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传配发单", fileVoList,taskBto.getId(),null);
deviceLogService.addLog(deviceLogDto);
DeviceLibrary deviceLibrary = deviceLibraryService.getOne(integer);
deviceLibrary.setLocationUnit(allotBill.getReceiveUnit());
......
......@@ -172,7 +172,7 @@ public class BackController {
deviceLibraryEntity.setManageStatus(0);
deviceLibraryService.update(deviceLibraryEntity);
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "对" + allotBackBill.getReceiveUnit() + "发起退回", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "对" + allotBackBill.getReceiveUnit() + "发起退回", fileVoList,saveEntity.getId(),null);
deviceLogService.addLog(deviceLogDto);
}
}
......@@ -267,7 +267,7 @@ public class BackController {
deviceLibraryEntity.setOwnUnit(userUtils.getCurrentUserUnitName());
deviceLibraryEntity.setManageStatus(1);
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收并发起入库", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收并发起入库", fileVoList,taskBto.getId(),null);
deviceLogService.addLog(deviceLogDto);
deviceLibraryService.update(deviceLibraryEntity);
}
......@@ -278,7 +278,7 @@ public class BackController {
DeviceLibrary deviceLibraryEntity = deviceLibraryService.getOne(id);
deviceLibraryEntity.setLifeStatus(11);
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收入库丢失", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收入库丢失", fileVoList,taskBto.getId(),null);
deviceLogService.addLog(deviceLogDto);
deviceLibraryService.update(deviceLibraryEntity);
}
......@@ -351,7 +351,7 @@ public class BackController {
List<Integer> deviceIds = StringSplitUtil.split(allotBackBill.getBackCheckDetail());
deviceIds.forEach(integer -> {
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传退回单据", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传退回单据", fileVoList,taskBto.getId(),null);
deviceLogService.addLog(deviceLogDto);
});
//签发人阅知
......@@ -421,7 +421,7 @@ public class BackController {
List<FileVo> fileVoList = new ArrayList<>();
fileVo.getAllotFiles().forEach(fileRet -> fileVoList.add(new FileVo("退回单", fileRet.getName(), fileRet.getPreviewPath())));
ids.forEach(integer -> {
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传退回单", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传退回单", fileVoList,taskBto.getId(),null);
deviceLogService.addLog(deviceLogDto);
DeviceLibrary deviceLibrary = deviceLibraryService.getOne(integer);
deviceLibrary.setLocationUnit(allotBackBill.getReceiveUnit());
......
......@@ -335,7 +335,7 @@ public class DeviceApplyController {
DeviceLibrary deviceLibraryEntity = deviceLibraryService.getOne(id);
deviceLibraryEntity.setLifeStatus(3);//配发状态
deviceLibraryEntity.setManageStatus(0);//不在属于单位
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "对" + allotBillEntity.getReceiveUnit() + "发起配发", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "对" + allotBillEntity.getReceiveUnit() + "发起配发", fileVoList,taskBto.getId(),null);
deviceLogService.addLog(deviceLogDto);
}
}
......
......@@ -46,6 +46,9 @@ public class DeviceLogDto {
@ApiModelProperty(value = "操作时间")
private Date createTime;
@ApiModelProperty(value = "任务id")
private Integer taskId;
public DeviceLogDto(Integer deviceId, String remark, List<FileVo> fileVoList, Integer createUserId) {
this.deviceId = deviceId;
this.remark = remark;
......@@ -59,6 +62,15 @@ public class DeviceLogDto {
this.fileVoList = fileVoList;
}
public DeviceLogDto(Integer deviceId, String remark, List<FileVo> fileVoList,Integer taskId,Integer createUserId) {
this.deviceId = deviceId;
this.remark = remark;
this.fileVoList = fileVoList;
this.taskId = taskId;
this.createUserId = createUserId;
}
public DeviceLogDto(Integer type, Integer deviceId, String remark, List<FileVo> fileVoList) {
this.type = type;
this.deviceId = deviceId;
......@@ -66,6 +78,14 @@ public class DeviceLogDto {
this.fileVoList = fileVoList;
}
public DeviceLogDto(Integer type, Integer deviceId, String remark, List<FileVo> fileVoList,Integer taskId) {
this.type = type;
this.deviceId = deviceId;
this.remark = remark;
this.fileVoList = fileVoList;
this.taskId = taskId;
}
/**
* dto类转化为do类
*/
......
......@@ -94,6 +94,9 @@ public class DeviceLog {
@ApiModelProperty(value = "区块链记录id")
private String recordId;
@ApiModelProperty(value = "任务id")
private Integer taskId;
/**
* do类转化为dto类
*/
......
......@@ -37,4 +37,5 @@ public class DeviceLogUserVo {
@ApiModelProperty(value = "操作时间")
private Date createTime;
}
......@@ -142,7 +142,7 @@ public class MatchingDeviceController {
stringBuffer.append(d.getId());
stringBuffer.append("x");
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(1, d.getId(), "发起新增配套", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(1, d.getId(), "发起新增配套", fileVoList,taskBto.getId());
deviceLogService.addLog(deviceLogDto);
}
rfidService.printString(printVos);
......@@ -175,7 +175,7 @@ public class MatchingDeviceController {
for (Integer d : list) {
MatchingDeviceLibrary deviceLibraryEntity = matchingDeviceLibraryService.getOne(d);
deviceLibraryEntity.setLifeStatus(2);
DeviceLogDto deviceLogDto = new DeviceLogDto(1, deviceLibraryEntity.getId(), "添加配套设备审核成功", null);
DeviceLogDto deviceLogDto = new DeviceLogDto(1, deviceLibraryEntity.getId(), "添加配套设备审核成功", null,taskBto.getId());
deviceLogService.addLog(deviceLogDto);
matchingDeviceLibraryService.update(deviceLibraryEntity);
}
......@@ -196,7 +196,7 @@ public class MatchingDeviceController {
for (Integer d : list) {
MatchingDeviceLibrary deviceLibraryEntity = matchingDeviceLibraryService.getOne(d);
deviceLibraryEntity.setLifeStatus(1);
DeviceLogDto deviceLogDto = new DeviceLogDto(1, deviceLibraryEntity.getId(), "添加配套设备审核失败", null);
DeviceLogDto deviceLogDto = new DeviceLogDto(1, deviceLibraryEntity.getId(), "添加配套设备审核失败", null,taskBto.getId());
deviceLogService.addLog(deviceLogDto);
matchingDeviceLibraryService.update(deviceLibraryEntity);
}
......@@ -253,14 +253,14 @@ public class MatchingDeviceController {
if (matchingDeviceEditVo.getCreateUnit() != null && !m.getCreateUnit().equals(matchingDeviceEditVo.getCreateUnit())) {
//添加设备日志
String remark = "将设备的创建单位由" + m.getCreateUnit() + "改为" + matchingDeviceEditVo.getCreateUnit();
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null);
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null,null);
deviceLogService.addLog(deviceLogDto);
m.setCreateUnit(matchingDeviceEditVo.getCreateUnit());
}
if (matchingDeviceEditVo.getLifeStatus() != null && !m.getLifeStatus().equals(matchingDeviceEditVo.getLifeStatus())) {
//添加设备日志
String remark = "将设备的生命状态由" + configCache.getLifeStatusMap().getOrDefault(m.getLifeStatus(),"空") + "改为" + configCache.getLifeStatusMap().get(matchingDeviceEditVo.getLifeStatus());
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null);
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null,null);
deviceLogService.addLog(deviceLogDto);
m.setLifeStatus(matchingDeviceEditVo.getLifeStatus());
}
......@@ -268,35 +268,35 @@ public class MatchingDeviceController {
//添加设备日志
DeviceLibrary deviceLibrary = deviceLibraryService.getOne(matchingDeviceEditVo.getDeviceId());
String remark = "将该设备与表面号为" + deviceLibrary.getRfidSurfaceId() + "的装备绑定";
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null);
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null,null);
deviceLogService.addLog(deviceLogDto);
m.setDeviceId(matchingDeviceEditVo.getDeviceId());
}
if (matchingDeviceEditVo.getModel() != null && !m.getModel().equals(matchingDeviceEditVo.getModel())) {
//添加设备日志
String remark = "将设备的型号由" + m.getModel() + "改为" + matchingDeviceEditVo.getModel();
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null);
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null,null);
deviceLogService.addLog(deviceLogDto);
m.setModel(matchingDeviceEditVo.getModel());
}
if (matchingDeviceEditVo.getName() != null && !m.getName().equals(matchingDeviceEditVo.getName())) {
//添加设备日志
String remark = "将设备的名称由" + m.getName() + "改为" + matchingDeviceEditVo.getName();
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null);
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null,null);
deviceLogService.addLog(deviceLogDto);
m.setName(matchingDeviceEditVo.getName());
}
if (matchingDeviceEditVo.getSeqNumber() != null && !m.getSeqNumber().equals(matchingDeviceEditVo.getSeqNumber())) {
//添加设备日志
String remark = "将设备的序列号由" + m.getSeqNumber() + "改为" + matchingDeviceEditVo.getSeqNumber();
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null);
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null,null);
deviceLogService.addLog(deviceLogDto);
m.setSeqNumber(matchingDeviceEditVo.getSeqNumber());
}
if (matchingDeviceEditVo.getType() != null && !m.getType().equals(matchingDeviceEditVo.getType())) {
//添加设备日志
String remark = "将设备类型由" + m.getType() + "改为" + matchingDeviceEditVo.getType();
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null);
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null,null);
deviceLogService.addLog(deviceLogDto);
m.setType(matchingDeviceEditVo.getType());
}
......
......@@ -250,7 +250,7 @@ public class RepairController {
RepairDetail repairDetail1 = deviceRepairDetailService.save(repairDetail);
detailIds.add(repairDetail1.getId());
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "将装备添加到待维修列表", null);
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "将装备添加到待维修列表", null,null);
deviceLogService.addLog(deviceLogDto);
}
//发送阅知信息
......@@ -395,7 +395,7 @@ public class RepairController {
deviceLibraryEntity.setManageStatus(0);
deviceLibraryService.update(deviceLibraryEntity);
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(d.getDeviceId(), "向" + repairBillSaveVo.getReceiveUnit() + "发起装备维修", null);
DeviceLogDto deviceLogDto = new DeviceLogDto(d.getDeviceId(), "向" + repairBillSaveVo.getReceiveUnit() + "发起装备维修", null,null);
deviceLogService.addLog(deviceLogDto);
}
//存送修单
......@@ -585,7 +585,7 @@ public class RepairController {
deviceLibraryEntity.setLocationUnit(repairBill.getReceiveUnit());
deviceLibraryEntity.setManageStatus(1);
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收并发起入库", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收并发起入库", fileVoList,taskBto.getId());
deviceLogService.addLog(deviceLogDto);
deviceLibraryService.update(deviceLibraryEntity);
}
......@@ -596,7 +596,7 @@ public class RepairController {
DeviceLibrary deviceLibraryEntity = deviceLibraryService.getOne(id);
deviceLibraryEntity.setLifeStatus(11);
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收入库丢失", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "接收入库丢失", fileVoList,taskBto.getId());
deviceLogService.addLog(deviceLogDto);
deviceLibraryService.update(deviceLibraryEntity);
}
......@@ -759,7 +759,7 @@ public class RepairController {
List<Integer> deviceIds = StringSplitUtil.split(repairSendBill.getRepairDeviceCheckDetail());
deviceIds.forEach(integer -> {
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传送修单据", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传送修单据", fileVoList,taskBto.getId());
deviceLogService.addLog(deviceLogDto);
});
return ResponseEntity.ok("上传成功");
......@@ -885,7 +885,7 @@ public class RepairController {
DeviceLibrary deviceLibraryEntity = deviceLibraryService.getOne(d.getDeviceId());
deviceLibraryEntity.setLifeStatus(4);
deviceLibraryEntity.setManageStatus(0);
DeviceLogDto deviceLogDto = new DeviceLogDto(d.getDeviceId(), "向" + repairBackBillSaveVo.getReceiveUnit() + "退还维修装备", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(d.getDeviceId(), "向" + repairBackBillSaveVo.getReceiveUnit() + "退还维修装备", fileVoList,taskBto2.getId());
deviceLogService.addLog(deviceLogDto);
}
String deviceIdDetail = repairBackBill.getBackCheckDetail();
......@@ -1082,7 +1082,7 @@ public class RepairController {
}
deviceLibraryEntity.setManageStatus(1);
//添加装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "维修退回装备接收并发起入库", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "维修退回装备接收并发起入库", fileVoList,taskBto2.getId());
deviceLogService.addLog(deviceLogDto);
deviceLibraryService.update(deviceLibraryEntity);
}
......@@ -1093,7 +1093,7 @@ public class RepairController {
DeviceLibrary deviceLibraryEntity = deviceLibraryService.getOne(id);
deviceLibraryEntity.setLifeStatus(11);
//添加装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "维修退回装备接收入库丢失", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "维修退回装备接收入库丢失", fileVoList,taskBto2.getId());
deviceLogService.addLog(deviceLogDto);
deviceLibraryService.update(deviceLibraryEntity);
}
......@@ -1245,7 +1245,7 @@ public class RepairController {
List<Integer> deviceIds = StringSplitUtil.split(repairBackBill.getBackReciveCheckDetail());
deviceIds.forEach(integer -> {
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传回执单据", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传回执单据", fileVoList,taskBto.getId());
deviceLogService.addLog(deviceLogDto);
});
return ResponseEntity.ok("上传成功");
......@@ -1274,7 +1274,7 @@ public class RepairController {
deviceLibrary.setLifeStatus(2);
deviceLibraryService.update(deviceLibrary);
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(deviceLibrary.getId(), "维修完成,装备状态改为在库", null);
DeviceLogDto deviceLogDto = new DeviceLogDto(deviceLibrary.getId(), "维修完成,装备状态改为在库", null,null);
deviceLogService.addLog(deviceLogDto);
}
else {
......@@ -1305,7 +1305,7 @@ public class RepairController {
}
String remark = "将装备" + deviceName + "状态由" + GlobalMap.getRepairStatusMap().get(oldStatus).name + "改为" + GlobalMap.getRepairStatusMap().get(repairStatusChangeVo.getNewStatus()).name;
//装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(repairDetail1.getDeviceId(), remark, fileVos);
DeviceLogDto deviceLogDto = new DeviceLogDto(repairDetail1.getDeviceId(), remark, fileVos,null);
deviceLogService.addLog(deviceLogDto);
//如果状态改为了待领取
if (repairStatusChangeVo.getNewStatus() == 2) {
......@@ -1705,7 +1705,7 @@ public class RepairController {
if (libraryUpdateVo.getProdNumber() != null && !libraryUpdateVo.getProdNumber().equals(deviceLibraryEntity.getProdNumber())) {
//添加装备日志
String remark = "装备换新:将装备生产序列号由" + deviceLibraryEntity.getProdNumber() + "换为" + libraryUpdateVo.getProdNumber();
DeviceLogDto deviceLogDto = new DeviceLogDto(deviceEditVo.getDeviceId(), remark, null);
DeviceLogDto deviceLogDto = new DeviceLogDto(deviceEditVo.getDeviceId(), remark, null,null);
deviceLogService.addLog(deviceLogDto);
deviceLibrary.setProdNumber(libraryUpdateVo.getProdNumber());
}
......@@ -1717,7 +1717,7 @@ public class RepairController {
else {
//添加装备日志
String remark = "装备换新:将装备序列号由" + deviceLibraryEntity.getSeqNumber() + "换为" + libraryUpdateVo.getSeqNumber();
DeviceLogDto deviceLogDto = new DeviceLogDto(deviceEditVo.getDeviceId(), remark, null);
DeviceLogDto deviceLogDto = new DeviceLogDto(deviceEditVo.getDeviceId(), remark, null,null);
deviceLogService.addLog(deviceLogDto);
deviceLibrary.setSeqNumber(libraryUpdateVo.getSeqNumber());
newRepairDetail.setSeqNumber(libraryUpdateVo.getSeqNumber());
......@@ -1813,7 +1813,7 @@ public class RepairController {
List<FileVo> fileVoList = new ArrayList<>();
fileVo.getSendFiles().forEach(fileRet -> fileVoList.add(new FileVo("领取单", fileRet.getName(), fileRet.getPreviewPath())));
ids.forEach(integer -> {
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传领取单", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传领取单", fileVoList,taskBto.getId());
deviceLogService.addLog(deviceLogDto);
DeviceLibrary deviceLibraryEntity = deviceLibraryService.getOne(integer);
deviceLibraryEntity.setLocationUnit(repairBackBill.getReceiveUnit());
......@@ -1932,7 +1932,7 @@ public class RepairController {
deviceLibraryEntity.setLocationUnit(repairBill.getReceiveUnit());
deviceLibraryEntity.setManageStatus(1);
deviceLibraryService.update(deviceLibraryEntity);
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传维修单", fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传维修单", fileVoList,taskBto.getId());
deviceLogService.addLog(deviceLogDto);
});
//改变维修详情装备所在单位为当前单位
......
......@@ -270,13 +270,13 @@ public class DeviceRetiredController {
list.forEach(d -> {
d.setLifeStatus(8);
deviceLibraryService.update(d);
deviceLogService.addLog(new DeviceLogDto(d.getId(), "装备退装", null));
deviceLogService.addLog(new DeviceLogDto(d.getId(), "装备退装", null,null,null));
//包括装备的配件也设置为退装
List<DeviceLibrary> deviceChildren = d.getChilds();
for (DeviceLibrary childDevice : deviceChildren) {
childDevice.setLifeStatus(8);
deviceLibraryService.update(childDevice);
deviceLogService.addLog(new DeviceLogDto(childDevice.getId(), "装备退装", null));
deviceLogService.addLog(new DeviceLogDto(childDevice.getId(), "装备退装", null,null,null));
}
});
}
......
......@@ -126,10 +126,10 @@ public class RfidController {
if ("".equals(deviceLibrary.getRfidCardId())) {
deviceLibrary.setRfidCardId(RfidServiceImpl.completeRfidStr(String.valueOf(deviceLibrary.getId())));
deviceLibraryService.update(deviceLibrary);
deviceLogDtos.add(new DeviceLogDto(deviceLibrary.getId(), "打印标签", null));
deviceLogDtos.add(new DeviceLogDto(deviceLibrary.getId(), "打印标签", null,null,null));
}
else {
deviceLogDtos.add(new DeviceLogDto(deviceLibrary.getId(), "更换标签", null));
deviceLogDtos.add(new DeviceLogDto(deviceLibrary.getId(), "更换标签", null,null,null));
}
}
rfidService.printString(printVos.stream().sorted(Comparator.comparing(PrintVo::getRfidContent)).collect(Collectors.toList()));
......@@ -155,7 +155,7 @@ public class RfidController {
//生成详情信息
rfidChangeLogService.addEntity(initRfidChangeLog(currentUserInfo, rfidChangeBillSaved, d));
//生成装备变更日志
deviceLogService.addLog(new DeviceLogDto(d.getDeviceId(), "发起标签替换", billList));
deviceLogService.addLog(new DeviceLogDto(d.getDeviceId(), "发起标签替换", billList,null,null));
});
//生成Task
TaskBto task = taskService.start(initTaskBto(currentUserInfo, rfidChangeBillSaved));
......@@ -421,7 +421,7 @@ public class RfidController {
taskService.update(taskService.moveToArchive(task));
}
//生成装备日志
deviceLogService.addLog(new DeviceLogDto(d.getDeviceId(), flag == 0 ? "标签替换成功" : "标签替换审核失败", billList));
deviceLogService.addLog(new DeviceLogDto(d.getDeviceId(), flag == 0 ? "标签替换成功" : "标签替换审核失败", billList,null,null));
});
}
}
......@@ -289,8 +289,9 @@ public class SelfCheckController {
//添加账单
SelfCheckBill selfExaminationBillEntity;
List<FileVo> fileVoList = new ArrayList<>();
TaskBto taskBto;
if (selfCheckSaveVo.getTaskId()!=null){
TaskBto taskBto = taskService.get(selfCheckSaveVo.getTaskId());
taskBto = taskService.get(selfCheckSaveVo.getTaskId());
TaskDisposeUtil.isNotSubmit(taskBto.getBillStatus(),StatusEnum.WAIT_SELF_CHECK);
selfExaminationBillEntity = selfExaminationBillService.getOne(taskBto.getBillId());
selfExaminationBillEntity.setCheckTime(new Date());
......@@ -333,7 +334,7 @@ public class SelfCheckController {
String[] strings = deviceIdDetail.split("x");
if (selfCheckSaveVo.getTaskId()!=null){
//获取任务
TaskBto taskBto = taskService.get(selfCheckSaveVo.getTaskId());
taskBto = taskService.get(selfCheckSaveVo.getTaskId());
if (selfCheckSaveVo.getType()==0){
taskBto.setCustomInfo("手动");
//添加涉及人员
......@@ -371,7 +372,7 @@ public class SelfCheckController {
// if (selfExaminationBillEntity1.getUserbId()!=null){
// userIds.add(selfExaminationBillEntity1.getUserbId());
// }
TaskBto taskBto = new TaskBto(StatusEnum.SELF_CHECK_CONFIRM.id, "自查业务", null, ".", selfExaminationBillEntity1.getId(), 4, userUtils.getCurrentUnitId(), 0, null, userIds);
taskBto = new TaskBto(StatusEnum.SELF_CHECK_CONFIRM.id, "自查业务", null, ".", selfExaminationBillEntity1.getId(), 4, userUtils.getCurrentUnitId(), 0, null, userIds);
if (selfCheckSaveVo.getType()==0){
taskBto.setCustomInfo("手动");
taskService.start(taskBto);
......@@ -399,7 +400,7 @@ public class SelfCheckController {
for (String s:strings) {
if (s.length()>=2) {
Integer id = Integer.parseInt(s.substring(0, s.length() - 1));
DeviceLogDto deviceLogDto = new DeviceLogDto(id,"发起自查",fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(id,"发起自查",fileVoList,taskBto.getId(),null);
deviceLogService.addLog(deviceLogDto);
}
}
......@@ -441,7 +442,7 @@ public class SelfCheckController {
for (String s:strings) {
if (s.length()>=2) {
Integer id = Integer.parseInt(s.substring(0, s.length() - 1));
DeviceLogDto deviceLogDto = new DeviceLogDto(id,"上传自查单",null);
DeviceLogDto deviceLogDto = new DeviceLogDto(id,"上传自查单",null,taskBto.getId(),null);
deviceLogService.addLog(deviceLogDto);
}
}
......@@ -457,7 +458,7 @@ public class SelfCheckController {
for (String s:strings) {
if (s.length()>=2) {
Integer id = Integer.parseInt(s.substring(0, s.length() - 1));
DeviceLogDto deviceLogDto = new DeviceLogDto(id,"自查审核失败",null);
DeviceLogDto deviceLogDto = new DeviceLogDto(id,"自查审核失败",null,taskBto.getId(),null);
deviceLogService.addLog(deviceLogDto);
}
}
......
......@@ -477,7 +477,7 @@ public class StorageBillController {
saveEntities.add(saveEntity);
stringBuffer.append(saveEntity.getId());
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(saveEntity.getId(), logMessage, fileVoList);
DeviceLogDto deviceLogDto = new DeviceLogDto(saveEntity.getId(), logMessage, fileVoList,null,null);
deviceLogDtos.add(deviceLogDto);
stringBuffer.append("x");
//申请业务列装入库数量+1
......@@ -589,7 +589,7 @@ public class StorageBillController {
}
@ApiOperation(value = "入库审核", notes = "可以通过这个接口入库审核")
@PostMapping(value = "/confirmStorageBill")
@PostMapping(value = "/confirmStorageBill")//不用了
@Transactional(rollbackFor = Exception.class)
public ResponseEntity confirmStorageBill(@RequestBody @Validated StorageBillConfirmVo storageBillConfirmVo) {
TaskBto taskBto = taskService.get(storageBillConfirmVo.getTaskId());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论