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

更新

上级 05dd52f3
...@@ -14,6 +14,7 @@ import com.tykj.dev.device.library.service.DeviceLogService; ...@@ -14,6 +14,7 @@ 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;
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.FileVo; import com.tykj.dev.device.library.subject.vo.FileVo;
import com.tykj.dev.device.task.repository.TaskDao;
import com.tykj.dev.device.task.service.TaskLogService; import com.tykj.dev.device.task.service.TaskLogService;
import com.tykj.dev.device.task.service.TaskService; import com.tykj.dev.device.task.service.TaskService;
import com.tykj.dev.device.task.subject.bto.TaskBto; import com.tykj.dev.device.task.subject.bto.TaskBto;
...@@ -109,6 +110,9 @@ public class AllotBillController { ...@@ -109,6 +110,9 @@ public class AllotBillController {
@Autowired @Autowired
private ConfigCache configCache; private ConfigCache configCache;
@Autowired
private TaskDao taskDao;
@ApiOperation(value = "导入二维码获取配发装备", notes = "可以通过这个接口导入二维码获取配发装备") @ApiOperation(value = "导入二维码获取配发装备", notes = "可以通过这个接口导入二维码获取配发装备")
@PostMapping(value = "/load") @PostMapping(value = "/load")
public ResponseEntity loadDevice(@RequestBody RfidVo rfidVo) { public ResponseEntity loadDevice(@RequestBody RfidVo rfidVo) {
...@@ -182,9 +186,11 @@ public class AllotBillController { ...@@ -182,9 +186,11 @@ public class AllotBillController {
taskBto.setOwnUnit(userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit())); taskBto.setOwnUnit(userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit()));
saveEntity = taskService.moveToSpecial(taskBto, StatusEnum.ALLOTING, 0); saveEntity = taskService.moveToSpecial(taskBto, StatusEnum.ALLOTING, 0);
} }
if (allotBillSaveVo.getIsSigned()==null||allotBillSaveVo.getIsSigned()!=1) {
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_ALLOT_FILE.id, "配发业务", saveEntity.getId(), saveEntity.getNodeIdDetail() + saveEntity.getId() + ".", saveEntity.getBillId(), 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 0, null, Collections.singletonList(0)); TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_ALLOT_FILE.id, "配发业务", saveEntity.getId(), saveEntity.getNodeIdDetail() + saveEntity.getId() + ".", saveEntity.getBillId(), 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 0, null, Collections.singletonList(0));
taskService.start(taskBto2); taskService.start(taskBto2);
} }
}
else { else {
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_CROSS_FILE.id, "配发业务", null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 1, null, userIds); TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_CROSS_FILE.id, "配发业务", null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 1, null, userIds);
saveEntity = taskService.start(taskBto2); saveEntity = taskService.start(taskBto2);
...@@ -340,6 +346,10 @@ public class AllotBillController { ...@@ -340,6 +346,10 @@ public class AllotBillController {
BeanUtils.copyProperties(allotReceiveVo, allotBillEntity); BeanUtils.copyProperties(allotReceiveVo, allotBillEntity);
allotBillEntity.setReceiveTime(TimestampUtil.getCurrentTimestamp()); allotBillEntity.setReceiveTime(TimestampUtil.getCurrentTimestamp());
allotBillEntity.setReceiveUseraId(userId); allotBillEntity.setReceiveUseraId(userId);
if (allotReceiveVo.getSendUserbId()!=null){
allotBillEntity.setSendUserbId(allotReceiveVo.getSendUserbId());
allotBillEntity.setAgent(userPublicService.getOne(allotReceiveVo.getSendUserbId()).getName());
}
allotBillEntity.setBillFileName(allotReceiveVo.getBillFileName()); allotBillEntity.setBillFileName(allotReceiveVo.getBillFileName());
allotBillEntity.setBillFileUrl(allotReceiveVo.getBillFileUrl()); allotBillEntity.setBillFileUrl(allotReceiveVo.getBillFileUrl());
allotBillService.update(allotBillEntity); allotBillService.update(allotBillEntity);
...@@ -348,6 +358,8 @@ public class AllotBillController { ...@@ -348,6 +358,8 @@ public class AllotBillController {
// taskService.update(taskService.moveToNext(taskBto, allotReceiveVo.getReceiveUserbId())); // taskService.update(taskService.moveToNext(taskBto, allotReceiveVo.getReceiveUserbId()));
if (allotReceiveVo.getStatus()==0) { if (allotReceiveVo.getStatus()==0) {
taskService.moveToEnd(taskBto); taskService.moveToEnd(taskBto);
//子任务完结
taskService.moveAllSonNodeToEnd(taskBto.getId());
} }
else { else {
taskService.moveToNext(taskBto); taskService.moveToNext(taskBto);
...@@ -405,6 +417,12 @@ public class AllotBillController { ...@@ -405,6 +417,12 @@ public class AllotBillController {
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为经办人", idList1, 1); MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为经办人", idList1, 1);
messageService.add(messageBto); messageService.add(messageBto);
} }
if (allotReceiveVo.getSendUserbId()!=null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(allotReceiveVo.getSendUserbId());
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
MessageBto messageBto = new MessageBto(taskBto.getId(),taskBto.getBusinessType(),"接收配发装备",ids,1); MessageBto messageBto = new MessageBto(taskBto.getId(),taskBto.getBusinessType(),"接收配发装备",ids,1);
messageService.add(messageBto); messageService.add(messageBto);
log.info("[配发模块]:接收并发起入库"); log.info("[配发模块]:接收并发起入库");
...@@ -587,9 +605,14 @@ public class AllotBillController { ...@@ -587,9 +605,14 @@ public class AllotBillController {
} }
else { else {
taskService.moveToEnd(taskBto); taskService.moveToEnd(taskBto);
taskService.moveAllSonNodeToEnd(taskBto.getId());
AllotBill allotBill = allotBillService.getOne(taskBto.getBillId()); AllotBill allotBill = allotBillService.getOne(taskBto.getBillId());
allotBill.setBillFileName(fileUploadVo.getBillFileName()); allotBill.setBillFileName(fileUploadVo.getBillFileName());
allotBill.setBillFileUrl(fileUploadVo.getBillFileUrl()); allotBill.setBillFileUrl(fileUploadVo.getBillFileUrl());
if (fileUploadVo.getSendUserbId()!=null){
allotBill.setSendUserbId(fileUploadVo.getSendUserbId());
allotBill.setAgent(userPublicService.getOne(fileUploadVo.getSendUserbId()).getName());
}
allotBillService.update(allotBill); allotBillService.update(allotBill);
List<FileVo> fileVoList = new ArrayList<>(); List<FileVo> fileVoList = new ArrayList<>();
fileVoList.add(new FileVo("配发单", allotBill.getBillFileName(), allotBill.getBillFileUrl())); fileVoList.add(new FileVo("配发单", allotBill.getBillFileName(), allotBill.getBillFileUrl()));
...@@ -600,6 +623,12 @@ public class AllotBillController { ...@@ -600,6 +623,12 @@ public class AllotBillController {
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传配发单据", fileVoList); DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传配发单据", fileVoList);
deviceLogService.addLog(deviceLogDto); deviceLogService.addLog(deviceLogDto);
}); });
if (fileUploadVo.getSendUserbId()!=null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(fileUploadVo.getSendUserbId());
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
} }
return ResponseEntity.ok("上传成功"); return ResponseEntity.ok("上传成功");
} }
...@@ -616,24 +645,47 @@ public class AllotBillController { ...@@ -616,24 +645,47 @@ public class AllotBillController {
statusEnums.add(StatusEnum.WAIT_UPLOAD_ALLOT_FILE); statusEnums.add(StatusEnum.WAIT_UPLOAD_ALLOT_FILE);
TaskDisposeUtil.isNotSubmit(taskBto.getBillStatus(),statusEnums); TaskDisposeUtil.isNotSubmit(taskBto.getBillStatus(),statusEnums);
//不上传单据 //不上传单据
if (fileVo.getStatus()==0){ // if (fileVo.getStatus()==0){
taskService.moveToArchive(taskBto); // taskService.moveToArchive(taskBto);
} // }
else { // else {
AllotBill allotBill = allotBillService.getOne(taskBto.getBillId()); AllotBill allotBill = allotBillService.getOne(taskBto.getBillId());
List<Integer> idList = new ArrayList<>();
if (fileVo.getReceiveUseraId()!=null) {
allotBill.setReceiveUseraId(fileVo.getReceiveUseraId());
idList.add(fileVo.getReceiveUseraId());
}
if (fileVo.getReceiveUserbId()!=null) {
allotBill.setReceiveUserbId(fileVo.getReceiveUserbId());
idList.add(fileVo.getReceiveUserbId());
}
//保存账单 //保存账单
allotBill.setSendFiles(FilesUtil.stringFileToList(fileVo.getAllotFiles())); allotBill.setSendFiles(FilesUtil.stringFileToList(fileVo.getAllotFiles()));
allotBill.setAllotStatus(5);
allotBill.setReceiveTime(TimestampUtil.getCurrentTimestamp());
allotBillService.update(allotBill); allotBillService.update(allotBill);
List<Integer> ids = StringSplitUtil.split(allotBill.getAllotCheckDetail()); List<Integer> ids = StringSplitUtil.split(allotBill.getAllotCheckDetail());
//业务完结 //业务完结
taskService.moveToEnd(taskBto); taskService.moveToEnd(taskBto);
//主业务完结
taskService.moveToEnd(taskService.get(taskBto.getParentTaskId()));
//装备日志 //装备日志
List<FileVo> fileVoList = new ArrayList<>(); List<FileVo> fileVoList = new ArrayList<>();
fileVo.getAllotFiles().forEach(fileRet -> fileVoList.add(new FileVo("配发单", fileRet.getName(), fileRet.getPreviewPath()))); fileVo.getAllotFiles().forEach(fileRet -> fileVoList.add(new FileVo("配发单", fileRet.getName(), fileRet.getPreviewPath())));
ids.forEach(integer -> { ids.forEach(integer -> {
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传配发单", fileVoList); DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传配发单", fileVoList);
deviceLogService.addLog(deviceLogDto); deviceLogService.addLog(deviceLogDto);
DeviceLibrary deviceLibrary = deviceLibraryService.getOne(integer);
deviceLibrary.setLocationUnit(allotBill.getReceiveUnit());
deviceLibrary.setLifeStatus(2);
deviceLibrary.setOwnUnit(allotBill.getReceiveUnit());
deviceLibrary.setManageStatus(1);
deviceLibraryService.update(deviceLibrary);
}); });
// }
if (idList.size()>0) {
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为经办人", idList, 1);
messageService.add(messageBto);
} }
return ResponseEntity.ok("OK"); return ResponseEntity.ok("OK");
} }
......
...@@ -174,12 +174,17 @@ public class BackController { ...@@ -174,12 +174,17 @@ public class BackController {
BeanUtils.copyProperties(allotBackReceiveVo, allotBackBill); BeanUtils.copyProperties(allotBackReceiveVo, allotBackBill);
allotBackBill.setReceiveTime(TimestampUtil.getCurrentTimestamp()); allotBackBill.setReceiveTime(TimestampUtil.getCurrentTimestamp());
allotBackBill.setReceiveUseraId(userId); allotBackBill.setReceiveUseraId(userId);
if (allotBackReceiveVo.getSendUserbId()!=null){
allotBackBill.setSendUserbId(allotBackReceiveVo.getSendUserbId());
allotBackBill.setAgent(userPublicService.getOne(allotBackReceiveVo.getSendUserbId()).getName());
}
allotBackBillService.update(allotBackBill); allotBackBillService.update(allotBackBill);
taskService.addInvolveUser(taskBto, userId); taskService.addInvolveUser(taskBto, userId);
// //推至下一阶段 // //推至下一阶段
// taskService.update(taskService.moveToNext(taskBto, allotReceiveVo.getReceiveUserbId())); // taskService.update(taskService.moveToNext(taskBto, allotReceiveVo.getReceiveUserbId()));
if (allotBackReceiveVo.getStatus()==0) { if (allotBackReceiveVo.getStatus()==0) {
taskService.moveToEnd(taskBto); taskService.moveToEnd(taskBto);
taskService.moveAllSonNodeToEnd(taskBto.getId());
} }
else { else {
taskService.moveToNext(taskBto); taskService.moveToNext(taskBto);
...@@ -228,6 +233,12 @@ public class BackController { ...@@ -228,6 +233,12 @@ public class BackController {
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为经办人", idList1, 1); MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为经办人", idList1, 1);
messageService.add(messageBto); messageService.add(messageBto);
} }
if (allotBackReceiveVo.getSendUserbId()!=null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(allotBackReceiveVo.getSendUserbId());
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
MessageBto messageBto = new MessageBto(taskBto.getId(),taskBto.getBusinessType(),"接收退回装备",ids,1); MessageBto messageBto = new MessageBto(taskBto.getId(),taskBto.getBusinessType(),"接收退回装备",ids,1);
messageService.add(messageBto); messageService.add(messageBto);
log.info("[退回模块]:接收并发起入库"); log.info("[退回模块]:接收并发起入库");
...@@ -249,9 +260,14 @@ public class BackController { ...@@ -249,9 +260,14 @@ public class BackController {
} }
else { else {
taskService.moveToEnd(taskBto); taskService.moveToEnd(taskBto);
taskService.moveAllSonNodeToEnd(taskBto.getId());
AllotBackBill allotBackBill = allotBackBillService.getOne(taskBto.getBillId()); AllotBackBill allotBackBill = allotBackBillService.getOne(taskBto.getBillId());
allotBackBill.setBillFileName(fileUploadVo.getBillFileName()); allotBackBill.setBillFileName(fileUploadVo.getBillFileName());
allotBackBill.setBillFileUrl(fileUploadVo.getBillFileUrl()); allotBackBill.setBillFileUrl(fileUploadVo.getBillFileUrl());
if (fileUploadVo.getSendUserbId()!=null){
allotBackBill.setSendUserbId(fileUploadVo.getSendUserbId());
allotBackBill.setAgent(userPublicService.getOne(fileUploadVo.getSendUserbId()).getName());
}
allotBackBillService.update(allotBackBill); allotBackBillService.update(allotBackBill);
List<FileVo> fileVoList = new ArrayList<>(); List<FileVo> fileVoList = new ArrayList<>();
fileVoList.add(new FileVo("退回单", allotBackBill.getBillFileName(), allotBackBill.getBillFileUrl())); fileVoList.add(new FileVo("退回单", allotBackBill.getBillFileName(), allotBackBill.getBillFileUrl()));
...@@ -262,6 +278,12 @@ public class BackController { ...@@ -262,6 +278,12 @@ public class BackController {
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传退回单据", fileVoList); DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传退回单据", fileVoList);
deviceLogService.addLog(deviceLogDto); deviceLogService.addLog(deviceLogDto);
}); });
if (fileUploadVo.getSendUserbId()!=null) {
List<Integer> idList1 = new ArrayList<>();
idList1.add(fileUploadVo.getSendUserbId());
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为签发人", idList1, 1);
messageService.add(messageBto);
}
} }
return ResponseEntity.ok("上传成功"); return ResponseEntity.ok("上传成功");
} }
...@@ -277,17 +299,28 @@ public class BackController { ...@@ -277,17 +299,28 @@ public class BackController {
statusEnums.add(StatusEnum.WAIT_UPLOAD_BACK_FILE_2); statusEnums.add(StatusEnum.WAIT_UPLOAD_BACK_FILE_2);
TaskDisposeUtil.isNotSubmit(taskBto.getBillStatus(),statusEnums); TaskDisposeUtil.isNotSubmit(taskBto.getBillStatus(),statusEnums);
//不上传单据 //不上传单据
if (fileVo.getStatus()==0){ // if (fileVo.getStatus()==0){
taskService.moveToArchive(taskBto); // taskService.moveToArchive(taskBto);
} // }
else { // else {
AllotBackBill allotBackBill = allotBackBillService.getOne(taskBto.getBillId()); AllotBackBill allotBackBill = allotBackBillService.getOne(taskBto.getBillId());
List<Integer> idList = new ArrayList<>();
if (fileVo.getReceiveUseraId()!=null) {
allotBackBill.setReceiveUseraId(fileVo.getReceiveUseraId());
idList.add(fileVo.getReceiveUseraId());
}
if (fileVo.getReceiveUserbId()!=null) {
allotBackBill.setReceiveUserbId(fileVo.getReceiveUserbId());
idList.add(fileVo.getReceiveUserbId());
}
//保存账单 //保存账单
allotBackBill.setSendFiles(FilesUtil.stringFileToList(fileVo.getAllotFiles())); allotBackBill.setSendFiles(FilesUtil.stringFileToList(fileVo.getAllotFiles()));
allotBackBillService.update(allotBackBill); allotBackBillService.update(allotBackBill);
List<Integer> ids = StringSplitUtil.split(allotBackBill.getBackCheckDetail()); List<Integer> ids = StringSplitUtil.split(allotBackBill.getBackCheckDetail());
//业务完结 //业务完结
taskService.moveToEnd(taskBto); taskService.moveToEnd(taskBto);
//主业务完结
taskService.moveToEnd(taskService.get(taskBto.getParentTaskId()));
//装备日志 //装备日志
List<FileVo> fileVoList = new ArrayList<>(); List<FileVo> fileVoList = new ArrayList<>();
fileVo.getAllotFiles().forEach(fileRet -> fileVoList.add(new FileVo("退回单", fileRet.getName(), fileRet.getPreviewPath()))); fileVo.getAllotFiles().forEach(fileRet -> fileVoList.add(new FileVo("退回单", fileRet.getName(), fileRet.getPreviewPath())));
...@@ -295,7 +328,11 @@ public class BackController { ...@@ -295,7 +328,11 @@ public class BackController {
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传退回单", fileVoList); DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传退回单", fileVoList);
deviceLogService.addLog(deviceLogDto); deviceLogService.addLog(deviceLogDto);
}); });
if (idList.size()>0) {
MessageBto messageBto = new MessageBto(taskBto.getId(), taskBto.getBusinessType(), "被选为经办人", idList, 1);
messageService.add(messageBto);
} }
// }
return ResponseEntity.ok("OK"); return ResponseEntity.ok("OK");
} }
......
...@@ -14,6 +14,9 @@ import javax.validation.constraints.NotNull; ...@@ -14,6 +14,9 @@ import javax.validation.constraints.NotNull;
@ApiModel("配发接收类") @ApiModel("配发接收类")
public class AllotBackReceiveVo { public class AllotBackReceiveVo {
@ApiModelProperty(value = "接收单位B岗")
private Integer sendUserbId;
// @NotNull(message = "receiveUserbId不能为空") // @NotNull(message = "receiveUserbId不能为空")
// @Min(value = 1,message = "receiveUserbId不能小于1") // @Min(value = 1,message = "receiveUserbId不能小于1")
@ApiModelProperty(value = "接收单位B岗") @ApiModelProperty(value = "接收单位B岗")
......
...@@ -96,6 +96,9 @@ public class AllotBillSaveVo { ...@@ -96,6 +96,9 @@ public class AllotBillSaveVo {
@ApiModelProperty(value = "左签章Id") @ApiModelProperty(value = "左签章Id")
private String leftSignatureId; private String leftSignatureId;
@ApiModelProperty(value = "是否盖章(1:是,0:否)")
private Integer isSigned;
private List<ScriptSaveVo> scriptSaveVos; private List<ScriptSaveVo> scriptSaveVos;
public AllotBill toDo() { public AllotBill toDo() {
......
...@@ -16,6 +16,9 @@ import java.util.Map; ...@@ -16,6 +16,9 @@ import java.util.Map;
@ApiModel("配发接收类") @ApiModel("配发接收类")
public class AllotReceiveVo { public class AllotReceiveVo {
@ApiModelProperty(value = "接收单位B岗")
private Integer sendUserbId;
// @NotNull(message = "receiveUserbId不能为空") // @NotNull(message = "receiveUserbId不能为空")
// @Min(value = 1,message = "receiveUserbId不能小于1") // @Min(value = 1,message = "receiveUserbId不能小于1")
@ApiModelProperty(value = "接收单位B岗") @ApiModelProperty(value = "接收单位B岗")
......
...@@ -31,4 +31,6 @@ public class FileUploadVo { ...@@ -31,4 +31,6 @@ public class FileUploadVo {
@ApiModelProperty(value = "是否上传单据(0:否,1:是)") @ApiModelProperty(value = "是否上传单据(0:否,1:是)")
private Integer status; private Integer status;
@ApiModelProperty(value = "接收单位B岗")
private Integer sendUserbId;
} }
...@@ -27,4 +27,10 @@ public class FileVo { ...@@ -27,4 +27,10 @@ public class FileVo {
@NotNull(message = "status不能为空") @NotNull(message = "status不能为空")
@ApiModelProperty(value = "是否上传单据(0:否,1:是)") @ApiModelProperty(value = "是否上传单据(0:否,1:是)")
private Integer status; private Integer status;
@ApiModelProperty(value = "接收单位A岗")
private Integer receiveUseraId;
@ApiModelProperty(value = "接收单位B岗")
private Integer receiveUserbId;
} }
...@@ -225,6 +225,8 @@ public class DeviceApplyController { ...@@ -225,6 +225,8 @@ public class DeviceApplyController {
// allotBillEntity.setReceiveUseraId(applyTask.getCreateUserId()); // allotBillEntity.setReceiveUseraId(applyTask.getCreateUserId());
allotBillEntity.setApplyNumber(deviceApplyBillEntity.getApplyNumber()); allotBillEntity.setApplyNumber(deviceApplyBillEntity.getApplyNumber());
allotBillEntity.setReplayNumber(deviceApplyBillEntity.getReplayNumber()); allotBillEntity.setReplayNumber(deviceApplyBillEntity.getReplayNumber());
allotBillEntity.setApplyFiles(deviceApplyBillEntity.getApplyNumFiles());
allotBillEntity.setReplyFiles(deviceApplyBillEntity.getReplyFiles());
allotBillEntity.setSendUnit(deviceApplyBillEntity.getReplyUnit()); allotBillEntity.setSendUnit(deviceApplyBillEntity.getReplyUnit());
allotBillEntity.setReceiveUnit(deviceApplyBillEntity.getApplyUnit()); allotBillEntity.setReceiveUnit(deviceApplyBillEntity.getApplyUnit());
allotBillEntity.setSendTime(new Date()); allotBillEntity.setSendTime(new Date());
......
...@@ -261,6 +261,8 @@ public class DeviceLibraryController { ...@@ -261,6 +261,8 @@ public class DeviceLibraryController {
// } // }
map.put("models",resultList.stream().map(DeviceLibrary::getModel).collect(Collectors.toSet())); map.put("models",resultList.stream().map(DeviceLibrary::getModel).collect(Collectors.toSet()));
map.put("names",resultList.stream().map(DeviceLibrary::getName).collect(Collectors.toSet())); map.put("names",resultList.stream().map(DeviceLibrary::getName).collect(Collectors.toSet()));
map.put("ownUnits",resultList.stream().map(DeviceLibrary::getOwnUnit).collect(Collectors.toSet()));
map.put("locationUnits",resultList.stream().map(DeviceLibrary::getLocationUnit).collect(Collectors.toSet()));
Set<Integer> status = resultList.stream().map(DeviceLibrary::getLifeStatus).collect(Collectors.toSet()); Set<Integer> status = resultList.stream().map(DeviceLibrary::getLifeStatus).collect(Collectors.toSet());
Map<Integer,String> lifeStatusMap = configCache.getLifeStatusMap(); Map<Integer,String> lifeStatusMap = configCache.getLifeStatusMap();
map.put("lifeStatus",status.stream().map(integer -> new LifeStatusVo(integer,lifeStatusMap.get(integer))).collect(Collectors.toList())); map.put("lifeStatus",status.stream().map(integer -> new LifeStatusVo(integer,lifeStatusMap.get(integer))).collect(Collectors.toList()));
......
...@@ -542,9 +542,11 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService { ...@@ -542,9 +542,11 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
if (deviceLibrarySelectVo.getUnitId() == null) { if (deviceLibrarySelectVo.getUnitId() == null) {
String unit = userUtils.getCurrentUserUnitName(); String unit = userUtils.getCurrentUserUnitName();
predicateBuilder.eq("ownUnit", unit); predicateBuilder.eq("ownUnit", unit);
predicateBuilder.eq("locationUnit", unit);
} else { } else {
String unit = userPublicService.findByUnitsToname(deviceLibrarySelectVo.getUnitId()); String unit = userPublicService.findByUnitsToname(deviceLibrarySelectVo.getUnitId());
predicateBuilder.eq("ownUnit", unit); predicateBuilder.eq("ownUnit", unit);
predicateBuilder.eq("locationUnit", unit);
} }
return predicateBuilder.build(); return predicateBuilder.build();
} }
......
...@@ -70,9 +70,9 @@ public class PackingLibrary { ...@@ -70,9 +70,9 @@ public class PackingLibrary {
@ApiModelProperty(value = "配件对应装备列装id") @ApiModelProperty(value = "配件对应装备列装id")
private Integer partParentId; private Integer partParentId;
/** /**
* 列装状态(0:待审核,1:审核失败,2:审核成功待确认,3:已列装,4:已退装) * 列装状态(0:待审核,1:审核失败,2:已列装,3:已退装,4:退装待审核)
*/ */
@ApiModelProperty(value = "列装状态(0:待审核,1:审核失败,2:审核成功待确认,3:已列装,4:已退装)") @ApiModelProperty(value = "列装状态(0:待审核,1:审核失败,2:已列装,3:已退装,4:退装待审核)")
private Integer packingStatus; private Integer packingStatus;
/** /**
* 型号 * 型号
......
...@@ -18,6 +18,7 @@ import com.tykj.dev.device.repair.subject.domin.RepairDetail; ...@@ -18,6 +18,7 @@ import com.tykj.dev.device.repair.subject.domin.RepairDetail;
import com.tykj.dev.device.repair.subject.domin.RepairSendBill; import com.tykj.dev.device.repair.subject.domin.RepairSendBill;
import com.tykj.dev.device.repair.subject.vo.RepairBillSelectVo; import com.tykj.dev.device.repair.subject.vo.RepairBillSelectVo;
import com.tykj.dev.device.repair.subject.vo.RepairNum; import com.tykj.dev.device.repair.subject.vo.RepairNum;
import com.tykj.dev.device.repair.subject.vo.RepairTaskSelectVo;
import com.tykj.dev.device.repair.subject.vo.TaskRemark; import com.tykj.dev.device.repair.subject.vo.TaskRemark;
import com.tykj.dev.device.task.service.TaskService; import com.tykj.dev.device.task.service.TaskService;
import com.tykj.dev.device.task.subject.bto.TaskBto; import com.tykj.dev.device.task.subject.bto.TaskBto;
...@@ -84,9 +85,9 @@ public class RepairBillSelectController { ...@@ -84,9 +85,9 @@ public class RepairBillSelectController {
@GetMapping(value = "/repairNum") @GetMapping(value = "/repairNum")
public ResponseEntity getRepairNum(){ public ResponseEntity getRepairNum(){
RepairNum repairNum = new RepairNum(); RepairNum repairNum = new RepairNum();
List<RepairDetail> repairDetails = (ArrayList)repairController.getRepairList(1).getBody(); List<RepairDetail> repairDetails = (ArrayList)repairController.getRepairList(new RepairTaskSelectVo(1)).getBody();
List<RepairDetail> repairDetails2 = (ArrayList)repairController.getRepairList(2).getBody(); List<RepairDetail> repairDetails2 = (ArrayList)repairController.getRepairList(new RepairTaskSelectVo(2)).getBody();
List<RepairDetail> repairDetails3 = (ArrayList)repairController.getRepairList(3).getBody(); List<RepairDetail> repairDetails3 = (ArrayList)repairController.getRepairList(new RepairTaskSelectVo(3)).getBody();
repairNum.setNum1(repairDetails.size()); repairNum.setNum1(repairDetails.size());
repairNum.setNum2(repairDetails2.size()); repairNum.setNum2(repairDetails2.size());
repairNum.setNum3(repairDetails3.size()); repairNum.setNum3(repairDetails3.size());
...@@ -98,12 +99,12 @@ public class RepairBillSelectController { ...@@ -98,12 +99,12 @@ public class RepairBillSelectController {
public ResponseEntity selectRepairTasks(@RequestBody TaskSelectVo taskSelectVo){ public ResponseEntity selectRepairTasks(@RequestBody TaskSelectVo taskSelectVo){
List<TaskUserVo> taskUserVos; List<TaskUserVo> taskUserVos;
if (taskSelectVo.getSelectNum()==2){ if (taskSelectVo.getSelectNum()==2){
taskUserVos = taskService.getManageList(taskSelectVo).stream().filter(taskUserVo -> taskUserVo.getBillStatus()==704||taskUserVo.getBillStatus()==804).sorted(Comparator.comparing(TaskUserVo::getCreateTime,Comparator.nullsLast(Date::compareTo)).reversed()).collect(Collectors.toList()); taskUserVos = taskService.getManageList(taskSelectVo).stream().filter(taskUserVo -> taskUserVo.getBillStatus()==704||taskUserVo.getBillStatus()==804).collect(Collectors.toList());
} }
else { else {
taskUserVos = taskService.getManageList(taskSelectVo).stream().filter(taskUserVo -> taskUserVo.getBusinessType()==5||taskUserVo.getBusinessType()==10).sorted(Comparator.comparing(TaskUserVo::getCreateTime,Comparator.nullsLast(Date::compareTo)).reversed()).collect(Collectors.toList()); taskUserVos = taskService.getManageList(taskSelectVo).stream().filter(taskUserVo -> taskUserVo.getBusinessType()==5||taskUserVo.getBusinessType()==10).collect(Collectors.toList());
} }
return ResultUtil.success(PageUtil.getPerPage(taskSelectVo.getPage(), taskSelectVo.getSize(), taskUtils.orderByTopDesc(taskUserVos), taskSelectVo.getPageable())); return ResultUtil.success(PageUtil.getPerPage(taskSelectVo.getPage(), taskSelectVo.getSize(), taskUserVos, taskSelectVo.getPageable()));
} }
@ApiOperation(value = "上传任务备注", notes = "可以通过这个接口上传任务备注") @ApiOperation(value = "上传任务备注", notes = "可以通过这个接口上传任务备注")
......
...@@ -1606,41 +1606,47 @@ public class RepairController { ...@@ -1606,41 +1606,47 @@ public class RepairController {
} }
@ApiOperation(value = "查询维修管理列表", notes = "可以通过这个接口查询维修管理列表") @ApiOperation(value = "查询维修管理列表", notes = "可以通过这个接口查询维修管理列表")
@GetMapping(value = "/repairList/{type}") @PostMapping(value = "/repairList")
public ResponseEntity getRepairList(@PathVariable("type") int type) { public ResponseEntity getRepairList(@RequestBody RepairTaskSelectVo repairTaskSelectVo) {
Integer type = repairTaskSelectVo.getType();
Integer userId = userUtils.getCurrentUserId(); Integer userId = userUtils.getCurrentUserId();
String unitName = userUtils.getCurrentUserUnitName(); String unitName = userUtils.getCurrentUserUnitName();
//待维修装备 //待维修装备
if (type==1){ if (type==1){
List<RepairDetail> repairDetails = repairDetailDao.findAllByRepairStatus(1); List<Integer> integerList = new ArrayList<>();
repairDetails.addAll(repairDetailDao.findAllByRepairStatus(9)); integerList.add(1);
integerList.add(9);
List<RepairDetail> repairDetails = repairDetailDao.findAllByRepairStatusIn(integerList,repairTaskSelectVo.getPageable().getSort());
repairDetails.forEach(repairDetail -> { repairDetails.forEach(repairDetail -> {
repairDetail.setLocationUnit(deviceLibraryService.getOne(repairDetail.getDeviceId()).getLocationUnit()); repairDetail.setLocationUnit(deviceLibraryService.getOne(repairDetail.getDeviceId()).getLocationUnit());
repairDetail.setConfigName(); repairDetail.setConfigName();
}); });
return ResponseEntity.ok(repairDetails.stream().filter(repairDetail -> repairDetail.getLocationUnit().equals(unitName)).sorted(Comparator.comparing(RepairDetail::getOwnUnit,Comparator.nullsLast(String::compareTo))).collect(Collectors.toList())); return ResponseEntity.ok(repairDetails.stream().filter(repairDetail -> repairDetail.getLocationUnit().equals(unitName)).collect(Collectors.toList()));
} }
//送修装备 //送修装备
else if(type==2){ else if(type==2){
List<RepairDetail> repairDetails = repairDetailDao.findAllByRepairStatus(5); List<Integer> integerList = new ArrayList<>();
repairDetails.addAll(repairDetailDao.findAllByRepairStatus(9)); integerList.add(5);
integerList.add(9);
List<RepairDetail> repairDetails1 = repairDetailDao.findAllByRepairStatusNotIn(integerList,repairTaskSelectVo.getPageable().getSort());
// 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);
repairDetails1.forEach(repairDetail -> { repairDetails1.forEach(repairDetail -> {
repairDetail.setLocationUnit(deviceLibraryService.getOne(repairDetail.getDeviceId()).getLocationUnit()); repairDetail.setLocationUnit(deviceLibraryService.getOne(repairDetail.getDeviceId()).getLocationUnit());
repairDetail.setConfigName(); repairDetail.setConfigName();
}); });
return ResponseEntity.ok(repairDetails1.stream().filter(repairDetail -> userPublicService.findUnitsNameByUserId(repairDetail.getCreateUserId()).equals(unitName)).sorted(Comparator.comparing(RepairDetail::getOwnUnit,Comparator.nullsLast(String::compareTo))).collect(Collectors.toList())); return ResponseEntity.ok(repairDetails1.stream().filter(repairDetail -> userPublicService.findUnitsNameByUserId(repairDetail.getCreateUserId()).equals(unitName)).collect(Collectors.toList()));
} }
//待领取装备 //待领取装备
else if(type==3){ else if(type==3){
List<RepairDetail> repairDetails = repairDetailDao.findAllByRepairStatus(2); List<RepairDetail> repairDetails = repairDetailDao.findAllByRepairStatus(2,repairTaskSelectVo.getPageable().getSort());
repairDetails.forEach(repairDetail -> { repairDetails.forEach(repairDetail -> {
repairDetail.setLocationUnit(deviceLibraryService.getOne(repairDetail.getDeviceId()).getLocationUnit()); repairDetail.setLocationUnit(deviceLibraryService.getOne(repairDetail.getDeviceId()).getLocationUnit());
repairDetail.setConfigName(); repairDetail.setConfigName();
}); });
return ResponseEntity.ok(repairDetails.stream().filter(repairDetail -> repairDetail.getLocationUnit().equals(unitName)).sorted(Comparator.comparing(RepairDetail::getOwnUnit,Comparator.nullsLast(String::compareTo))).collect(Collectors.toList())); return ResponseEntity.ok(repairDetails.stream().filter(repairDetail -> repairDetail.getLocationUnit().equals(unitName)).collect(Collectors.toList()));
} }
else { else {
throw new ApiException("type只能为1,2,3"); throw new ApiException("type只能为1,2,3");
......
package com.tykj.dev.device.repair.repository; package com.tykj.dev.device.repair.repository;
import com.tykj.dev.device.repair.subject.domin.RepairDetail; import com.tykj.dev.device.repair.subject.domin.RepairDetail;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
...@@ -10,6 +11,9 @@ public interface RepairDetailDao extends JpaRepository<RepairDetail, Integer>, J ...@@ -10,6 +11,9 @@ public interface RepairDetailDao extends JpaRepository<RepairDetail, Integer>, J
List<RepairDetail> findByDeviceRepairBillId(Integer billId); List<RepairDetail> findByDeviceRepairBillId(Integer billId);
List<RepairDetail> findByRepairBackBillId(Integer billId); List<RepairDetail> findByRepairBackBillId(Integer billId);
List<RepairDetail> findAllByRepairStatusAndOwnUnit(Integer repairStatus,String ownUnit); List<RepairDetail> findAllByRepairStatusAndOwnUnit(Integer repairStatus,String ownUnit);
List<RepairDetail> findAllByRepairStatusIn(List<Integer> repairStatus, Sort s);
List<RepairDetail> findAllByRepairStatusNotIn(List<Integer> repairStatus, Sort s);
List<RepairDetail> findAllByRepairStatus(Integer repairStatus); List<RepairDetail> findAllByRepairStatus(Integer repairStatus);
List<RepairDetail> findAllByRepairStatus(Integer repairStatus, Sort s);
List<RepairDetail> findAllByDeviceId(Integer deviceId); List<RepairDetail> findAllByDeviceId(Integer deviceId);
} }
package com.tykj.dev.device.repair.subject.vo;
import com.tykj.dev.misc.base.CustomPage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author dengdiyi
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("维修选择类")
public class RepairTaskSelectVo extends CustomPage {
@ApiModelProperty(value = "查询类型", example = "1")
private Integer type;
}
...@@ -113,6 +113,12 @@ public class DeviceRetiredController { ...@@ -113,6 +113,12 @@ public class DeviceRetiredController {
User currentUserInfo = Objects.requireNonNull(AuthenticationUtils.getAuthentication()).getCurrentUserInfo(); User currentUserInfo = Objects.requireNonNull(AuthenticationUtils.getAuthentication()).getCurrentUserInfo();
DeviceRetiredBill retiredBill = DeviceRetiredBill.formVoToBill(formVo, currentUserInfo); DeviceRetiredBill retiredBill = DeviceRetiredBill.formVoToBill(formVo, currentUserInfo);
retiredBill = deviceRetiredBillService.addEntity(retiredBill); retiredBill = deviceRetiredBillService.addEntity(retiredBill);
//改变列装状态
formVo.getPackings().forEach(integer -> {
PackingLibrary packingLibrary = packingLibraryService.getOne(integer);
packingLibrary.setPackingStatus(4);
packingLibraryService.update(packingLibrary);
});
//生成Task //生成Task
TaskBto task = taskService.start(initTaskBto(retiredBill)); TaskBto task = taskService.start(initTaskBto(retiredBill));
myWebSocket.sendMessage1(); myWebSocket.sendMessage1();
......
...@@ -198,6 +198,7 @@ public class RfidController { ...@@ -198,6 +198,7 @@ public class RfidController {
@PostMapping(value = "/summary") @PostMapping(value = "/summary")
public ResponseEntity getTagSummary(@RequestBody DeviceLibrarySelectVo deviceLibrarySelectVo) { public ResponseEntity getTagSummary(@RequestBody DeviceLibrarySelectVo deviceLibrarySelectVo) {
Page<DeviceLibrary> deviceLibraryEntities = deviceLibraryService.getPage(deviceLibrarySelectVo, deviceLibrarySelectVo.getPageable()); Page<DeviceLibrary> deviceLibraryEntities = deviceLibraryService.getPage(deviceLibrarySelectVo, deviceLibrarySelectVo.getPageable());
deviceLibraryEntities.getContent().forEach(DeviceLibrary::setConfigName);
return ResultUtil.success(deviceLibraryEntities); return ResultUtil.success(deviceLibraryEntities);
} }
......
...@@ -27,12 +27,11 @@ public class ModelNameGroup { ...@@ -27,12 +27,11 @@ public class ModelNameGroup {
/** /**
* 类型 * 类型
*/ */
private Integer name; private String name;
/** /**
* 装备id集合 * 装备id集合
*/ */
private List<Integer> ids; private List<Integer> ids;
private String typeName;
} }
...@@ -138,10 +138,10 @@ public class RepelQueryServiceImpl implements RepelQueryService { ...@@ -138,10 +138,10 @@ public class RepelQueryServiceImpl implements RepelQueryService {
deviceLibraries.forEach( deviceLibraries.forEach(
deviceLibrary -> { deviceLibrary -> {
List<Integer> ids=new ArrayList<>(); List<Integer> ids=new ArrayList<>();
String key=deviceLibrary.getModel()+deviceLibrary.getType(); String key=deviceLibrary.getModel()+deviceLibrary.getName();
if (!modelNameGroupMap.containsKey(key)){ if (!modelNameGroupMap.containsKey(key)){
ids.add(deviceLibrary.getId()); ids.add(deviceLibrary.getId());
modelNameGroupMap.put(key,new ModelNameGroup(deviceLibrary.getModel(),deviceLibrary.getType(),ids,deviceLibrary.setConfigName().getTypeName())); modelNameGroupMap.put(key,new ModelNameGroup(deviceLibrary.getModel(),deviceLibrary.getName(),ids));
}else { }else {
ModelNameGroup modelNameGroup=modelNameGroupMap.get(key); ModelNameGroup modelNameGroup=modelNameGroupMap.get(key);
ids=modelNameGroupMap.get(key).getIds(); ids=modelNameGroupMap.get(key).getIds();
......
...@@ -187,21 +187,22 @@ public class StatisticalController { ...@@ -187,21 +187,22 @@ public class StatisticalController {
*/ */
private List<DeviceStatistics> getDeviceStatistics(List<DeviceLibrary> deviceLibraries) { private List<DeviceStatistics> getDeviceStatistics(List<DeviceLibrary> deviceLibraries) {
List<DeviceStatistics> deviceStatisticsList = new ArrayList<>(); List<DeviceStatistics> deviceStatisticsList = new ArrayList<>();
Map<String, List<DeviceLibrary>> map = deviceLibraries.stream().collect(groupingBy(deviceLibrary -> deviceLibrary.getModel()+"Ǵ"+deviceLibrary.getType())); Map<String, List<DeviceLibrary>> map = deviceLibraries.stream().collect(groupingBy(deviceLibrary -> deviceLibrary.getModel()+"Ǵ"+deviceLibrary.getName()));
for (String s:map.keySet()) { for (String s:map.keySet()) {
String[] strings = s.split("Ǵ"); String[] strings = s.split("Ǵ");
if (strings.length == 2) { if (strings.length == 2) {
DeviceStatistics deviceStatistics = new DeviceStatistics(); DeviceStatistics deviceStatistics = new DeviceStatistics();
deviceStatistics.setModel(strings[0]); deviceStatistics.setModel(strings[0]);
// deviceStatistics.setName(strings[1]); // deviceStatistics.setName(strings[1]);
if ("null".equals(strings[1])){ // if ("null".equals(strings[1])){
deviceStatistics.setType(null); // deviceStatistics.setType(null);
deviceStatistics.setTypeName("-"); // deviceStatistics.setTypeName("-");
} // }
else { // else {
deviceStatistics.setType(Integer.valueOf(strings[1])); // deviceStatistics.setType(Integer.valueOf(strings[1]));
deviceStatistics.setTypeName(map.get(s).get(0).setConfigName().getTypeName()); // deviceStatistics.setTypeName(map.get(s).get(0).setConfigName().getTypeName());
} // }
deviceStatistics.setName(strings[1]);
deviceStatistics.setNum(map.get(s).size()); deviceStatistics.setNum(map.get(s).size());
deviceStatistics.setDeviceIds(map.get(s).stream().map(DeviceLibrary::getId).collect(Collectors.toList())); deviceStatistics.setDeviceIds(map.get(s).stream().map(DeviceLibrary::getId).collect(Collectors.toList()));
deviceStatisticsList.add(deviceStatistics); deviceStatisticsList.add(deviceStatistics);
......
...@@ -181,4 +181,10 @@ public interface TaskService { ...@@ -181,4 +181,10 @@ public interface TaskService {
* 根据billType 查询task集合 * 根据billType 查询task集合
*/ */
List<TaskBto> findBillType(Integer billType); List<TaskBto> findBillType(Integer billType);
/**
* @param taaskId 父Task ID
* 将父Task所有子Task办结
*/
void moveAllSonNodeToEnd(Integer taaskId);
} }
...@@ -21,7 +21,6 @@ import com.tykj.dev.device.user.subject.entity.User; ...@@ -21,7 +21,6 @@ import com.tykj.dev.device.user.subject.entity.User;
import com.tykj.dev.device.user.subject.service.UserPublicService; import com.tykj.dev.device.user.subject.service.UserPublicService;
import com.tykj.dev.device.user.util.UserUtils; import com.tykj.dev.device.user.util.UserUtils;
import com.tykj.dev.misc.base.CustomOrder; import com.tykj.dev.misc.base.CustomOrder;
import com.tykj.dev.misc.base.BusinessEnum;
import com.tykj.dev.misc.base.StatusEnum; import com.tykj.dev.misc.base.StatusEnum;
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.JacksonUtil;
...@@ -550,7 +549,7 @@ public class TaskServiceImpl implements TaskService { ...@@ -550,7 +549,7 @@ public class TaskServiceImpl implements TaskService {
//省能看到所有业务 //省能看到所有业务
if (level == 1) { if (level == 1) {
taskUserVos = taskDao.findAll(getSelectSpecification(taskSelectVo)).stream() taskUserVos = taskDao.findAll(getSelectSpecification(taskSelectVo)).stream()
.filter(taskBto -> taskSelectVo.getType()==1?(taskBto.getCustomInfo()==null|| !"country".equals(taskBto.getCustomInfo())):(taskBto.getCustomInfo()!=null&& "country".equals(taskBto.getCustomInfo()))) .filter(taskBto -> taskSelectVo.getType() == null || taskSelectVo.getType()==1?(taskBto.getCustomInfo()==null|| !"country".equals(taskBto.getCustomInfo())):(taskBto.getCustomInfo()!=null&& "country".equals(taskBto.getCustomInfo())))
.map(Task::parse2Bto) .map(Task::parse2Bto)
.map(TaskBto::toVo) .map(TaskBto::toVo)
.collect(Collectors.toList()); .collect(Collectors.toList());
...@@ -790,6 +789,17 @@ public class TaskServiceImpl implements TaskService { ...@@ -790,6 +789,17 @@ public class TaskServiceImpl implements TaskService {
return taskDao.findAllByBusinessType(billType).stream().map(Task::parse2Bto).collect(Collectors.toList()); return taskDao.findAllByBusinessType(billType).stream().map(Task::parse2Bto).collect(Collectors.toList());
} }
@Override
public void moveAllSonNodeToEnd(Integer taaskId) {
List<Task> tasks = taskDao.findAllByParentTaskId(taaskId);
if (tasks.size()>0){
tasks.forEach(task -> {
moveToEnd(task.parse2Bto());
moveAllSonNodeToEnd(task.getId());
});
}
}
/** /**
* @param taskSelectVo 查询vo * @param taskSelectVo 查询vo
* 查询跟踪和待办列表 * 查询跟踪和待办列表
......
...@@ -30,10 +30,6 @@ import com.tykj.dev.device.scrap.service.ScrapBillService; ...@@ -30,10 +30,6 @@ import com.tykj.dev.device.scrap.service.ScrapBillService;
import com.tykj.dev.device.scrap.subject.domin.ScrapBill; import com.tykj.dev.device.scrap.subject.domin.ScrapBill;
import com.tykj.dev.device.selfcheck.service.SelfCheckBillService; import com.tykj.dev.device.selfcheck.service.SelfCheckBillService;
import com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill; import com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill;
import com.tykj.dev.device.sendback.entity.domain.SendBackBill;
import com.tykj.dev.device.sendback.entity.domain.SendBackBillDetail;
import com.tykj.dev.device.sendback.repository.SendBackBillDao;
import com.tykj.dev.device.sendback.repository.SendBackBillDetailDao;
import com.tykj.dev.device.storage.service.StorageBillService; import com.tykj.dev.device.storage.service.StorageBillService;
import com.tykj.dev.device.storage.subject.domin.StorageBill; import com.tykj.dev.device.storage.subject.domin.StorageBill;
import com.tykj.dev.device.task.service.TaskLogService; import com.tykj.dev.device.task.service.TaskLogService;
...@@ -466,21 +462,21 @@ public class LogAspect { ...@@ -466,21 +462,21 @@ public class LogAspect {
} }
break; break;
case 16: case 16:
SendBackBillDao sendBackBillDao = SpringUtils.getBean("sendBackBillDao"); // SendBackBillDao sendBackBillDao = SpringUtils.getBean("sendBackBillDao");
SendBackBillDetailDao sendBackBillDetailDao = SpringUtils.getBean("sendBackBillDetailDao"); // SendBackBillDetailDao sendBackBillDetailDao = SpringUtils.getBean("sendBackBillDetailDao");
if (sendBackBillDao != null && sendBackBillDetailDao != null) { // if (sendBackBillDao != null && sendBackBillDetailDao != null) {
SendBackBill sendBackBill = sendBackBillDao.getOne(outPutTask.getBillId()); // SendBackBill sendBackBill = sendBackBillDao.getOne(outPutTask.getBillId());
SendBackBillDetail sendBackBillDetail = sendBackBillDetailDao.findSendBackBillDetailById(sendBackBill.getFormId()); // SendBackBillDetail sendBackBillDetail = sendBackBillDetailDao.findSendBackBillDetailById(sendBackBill.getFormId());
getFieldsParam(sendBackBillDetail); // getFieldsParam(sendBackBillDetail);
// if ((this.oldStatus.equals(StatusEnum.SEND_BACK_1203.id) && this.newStatus.equals(StatusEnum.SEND_BACK_1206.id))) { //// if ((this.oldStatus.equals(StatusEnum.SEND_BACK_1203.id) && this.newStatus.equals(StatusEnum.SEND_BACK_1206.id))) {
// this.fileVos.add(new FileVo("出库确认单", sendBackBillDetail.getFileName(), sendBackBillDetail.getFileUrl())); //// this.fileVos.add(new FileVo("出库确认单", sendBackBillDetail.getFileName(), sendBackBillDetail.getFileUrl()));
//// }
// if ((this.oldStatus.equals(StatusEnum.SEND_BACK_1206.id) && this.newStatus.equals(StatusEnum.END.id))) {
// if (sendBackBillDetail.getBillFileName()!=null&&sendBackBillDetail.getBillFileUrl()!=null) {
// this.fileVos.add(new FileVo("清退单", sendBackBillDetail.getBillFileName(), sendBackBillDetail.getBillFileUrl()));
// }
// }
// } // }
if ((this.oldStatus.equals(StatusEnum.SEND_BACK_1206.id) && this.newStatus.equals(StatusEnum.END.id))) {
if (sendBackBillDetail.getBillFileName()!=null&&sendBackBillDetail.getBillFileUrl()!=null) {
this.fileVos.add(new FileVo("清退单", sendBackBillDetail.getBillFileName(), sendBackBillDetail.getBillFileUrl()));
}
}
}
break; break;
case 19: case 19:
MatchingDeviceBillService matchingDeviceBillService = SpringUtils.getBean("matchingDeviceBillServiceImpl"); MatchingDeviceBillService matchingDeviceBillService = SpringUtils.getBean("matchingDeviceBillServiceImpl");
......
...@@ -9,13 +9,10 @@ import com.tykj.dev.device.user.config.url.ApiResult; ...@@ -9,13 +9,10 @@ import com.tykj.dev.device.user.config.url.ApiResult;
import com.tykj.dev.device.user.config.url.UrlAccessDecisionManager; import com.tykj.dev.device.user.config.url.UrlAccessDecisionManager;
import com.tykj.dev.device.user.config.url.UrlAccessDeniedHandler; import com.tykj.dev.device.user.config.url.UrlAccessDeniedHandler;
import com.tykj.dev.device.user.config.url.UrlFilterInvocationSecurityMetadataSource; import com.tykj.dev.device.user.config.url.UrlFilterInvocationSecurityMetadataSource;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity; import org.springframework.security.config.annotation.web.builders.WebSecurity;
...@@ -23,7 +20,6 @@ import org.springframework.security.config.annotation.web.configuration.EnableWe ...@@ -23,7 +20,6 @@ import org.springframework.security.config.annotation.web.configuration.EnableWe
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.session.SessionRegistryImpl; import org.springframework.security.core.session.SessionRegistryImpl;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.web.authentication.session.ConcurrentSessionControlAuthenticationStrategy; import org.springframework.security.web.authentication.session.ConcurrentSessionControlAuthenticationStrategy;
import org.springframework.security.web.session.ConcurrentSessionFilter; import org.springframework.security.web.session.ConcurrentSessionFilter;
...@@ -150,7 +146,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -150,7 +146,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override @Override
public void configure(WebSecurity web) { public void configure(WebSecurity web) {
//swagger静态资源访问 //swagger静态资源访问
web.ignoring().antMatchers("/v2/api-docs", "/v2/api-docs-ext", "/configuration/ui", "/swagger-resources/**", "/configuration/security", "/swagger-ui/", "/swagger-ui/**", "/swagger-ui.html", "/doc.html", "/webjars/**", "/swagger-resources/configuration/ui", "**/swagge‌​r-ui.html", "/static/**", "/**/index.html", "**/index.html", "/index.html", "/js/**", "/css/**", "/fonds/**", "/img/**","/access/send","/user/s","/equip/file/llq/**"); web.ignoring().antMatchers("/v2/api-docs", "/v2/api-docs-ext", "/configuration/ui", "/swagger-resources/**", "/configuration/security", "/swagger-ui/", "/swagger-ui/**", "/swagger-ui.html", "/doc.html", "/webjars/**", "/swagger-resources/configuration/ui", "**/swagge‌​r-ui.html", "/static/**", "**/**/index.html", "**/index.html", "/**/index.html", "/js/**", "/css/**", "/fonds/**", "/img/**","/access/send","/user/s","/equip/file/llq/**");
} }
@Bean @Bean
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论