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

更新

上级 20689ec3
...@@ -178,6 +178,10 @@ public class AllotBillController { ...@@ -178,6 +178,10 @@ public class AllotBillController {
allotBillEntity.setLeftSignatureId(allotBillSaveVo.getLeftSignatureId()); allotBillEntity.setLeftSignatureId(allotBillSaveVo.getLeftSignatureId());
} }
allotBillEntity.setRightSignatureId(signId2.toString()); allotBillEntity.setRightSignatureId(signId2.toString());
if (allotBillSaveVo.getSendUserbId()!=null){
allotBillEntity.setSendUserbId(allotBillSaveVo.getSendUserbId());
allotBillEntity.setAgent(userPublicService.getOne(allotBillSaveVo.getSendUserbId()).getName());
}
AllotBill allotBill = allotBillService.update(allotBillEntity); AllotBill allotBill = allotBillService.update(allotBillEntity);
Integer billId = allotBillEntity.getId(); Integer billId = allotBillEntity.getId();
Integer userId = userUtils.getCurrentUserId(); Integer userId = userUtils.getCurrentUserId();
...@@ -577,6 +581,9 @@ public class AllotBillController { ...@@ -577,6 +581,9 @@ public class AllotBillController {
@PostMapping(value = "/saveAllotBill") @PostMapping(value = "/saveAllotBill")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity saveAllotBill(@RequestBody AllotBillSaveVo allotBillSaveVo) { public ResponseEntity saveAllotBill(@RequestBody AllotBillSaveVo allotBillSaveVo) {
if (allotBillSaveVo.getAllotCheckDetail()!=null&&allotBillSaveVo.getAllotCheckDetail().length()>0) {
deviceLibraryService.isInStockOrWaitRetired(StringSplitUtil.split(allotBillSaveVo.getAllotCheckDetail()));
}
//第一次保存 //第一次保存
if (allotBillSaveVo.getTaskId()==null){ if (allotBillSaveVo.getTaskId()==null){
Integer userId = userUtils.getCurrentUserId(); Integer userId = userUtils.getCurrentUserId();
...@@ -648,6 +655,11 @@ public class AllotBillController { ...@@ -648,6 +655,11 @@ public class AllotBillController {
public ResponseEntity applySign(@PathVariable("taskId") int taskId,@PathVariable("userId") int userId) { public ResponseEntity applySign(@PathVariable("taskId") int taskId,@PathVariable("userId") int userId) {
//推动任务 //推动任务
TaskBto taskBto = taskService.get(taskId); TaskBto taskBto = taskService.get(taskId);
AllotBill allotBill = allotBillService.getOne(taskBto.getBillId());
if (allotBill.getAllotStatus()!=0){
allotBill.setReceiveUseraId(userUtils.getCurrentUserId());
allotBillService.update(allotBill);
}
taskService.moveToSpecial(taskBto,StatusEnum.SIGN_WAIT_CONFIRM,userId); taskService.moveToSpecial(taskBto,StatusEnum.SIGN_WAIT_CONFIRM,userId);
myWebSocket.sendMessage1(); myWebSocket.sendMessage1();
return ResponseEntity.ok("申请成功"); return ResponseEntity.ok("申请成功");
......
...@@ -379,6 +379,9 @@ public class BackController { ...@@ -379,6 +379,9 @@ public class BackController {
@PostMapping(value = "/saveBackBill") @PostMapping(value = "/saveBackBill")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity saveBackBill(@RequestBody AllotBillSaveVo allotBillSaveVo) { public ResponseEntity saveBackBill(@RequestBody AllotBillSaveVo allotBillSaveVo) {
if (allotBillSaveVo.getAllotCheckDetail()!=null&&allotBillSaveVo.getAllotCheckDetail().length()>0) {
deviceLibraryService.isInStockOrWaitRetired(StringSplitUtil.split(allotBillSaveVo.getAllotCheckDetail()));
}
//第一次保存 //第一次保存
if (allotBillSaveVo.getTaskId()==null){ if (allotBillSaveVo.getTaskId()==null){
Integer userId = userUtils.getCurrentUserId(); Integer userId = userUtils.getCurrentUserId();
...@@ -449,6 +452,11 @@ public class BackController { ...@@ -449,6 +452,11 @@ public class BackController {
public ResponseEntity applySign(@PathVariable("taskId") int taskId,@PathVariable("userId") int userId) { public ResponseEntity applySign(@PathVariable("taskId") int taskId,@PathVariable("userId") int userId) {
//推动任务 //推动任务
TaskBto taskBto = taskService.get(taskId); TaskBto taskBto = taskService.get(taskId);
AllotBackBill allotBill = allotBackBillService.getOne(taskBto.getBillId());
if (allotBill.getBackStatus()!=1){
allotBill.setReceiveUseraId(userUtils.getCurrentUserId());
allotBackBillService.update(allotBill);
}
taskService.moveToSpecial(taskBto,StatusEnum.BACK_SIGN_WAIT_CONFIRM,userId); taskService.moveToSpecial(taskBto,StatusEnum.BACK_SIGN_WAIT_CONFIRM,userId);
myWebSocket.sendMessage1(); myWebSocket.sendMessage1();
return ResponseEntity.ok("申请成功"); return ResponseEntity.ok("申请成功");
......
...@@ -416,7 +416,7 @@ public class DeviceApplyController { ...@@ -416,7 +416,7 @@ public class DeviceApplyController {
} }
if (uploadApplyFile.getApplyBillDetailVos()!=null&&uploadApplyFile.getApplyBillDetailVos().size()>0) { if (uploadApplyFile.getApplyBillDetailVos()!=null&&uploadApplyFile.getApplyBillDetailVos().size()>0) {
for (ApplyBillDetailVo a : uploadApplyFile.getApplyBillDetailVos()) { for (ApplyBillDetailVo a : uploadApplyFile.getApplyBillDetailVos()) {
ResponseEntity responseEntity = packingController.seqsExist(a.getPackingId(), a.getStorageCount(), a.getSeqInterval()); ResponseEntity responseEntity = packingController.seqsNotExist(a.getPackingId(), a.getStorageCount(), a.getSeqInterval());
if (!"ok".equals(responseEntity.getBody())) { if (!"ok".equals(responseEntity.getBody())) {
return responseEntity; return responseEntity;
} }
......
...@@ -293,6 +293,21 @@ public enum LogType { ...@@ -293,6 +293,21 @@ public enum LogType {
ALLOT_21(121,ALLOT.id, WAIT_SIGN.id, WAIT_UPLOAD_ALLOT_RECEIVE_FILE.id, "盖电子签章并入库"), ALLOT_21(121,ALLOT.id, WAIT_SIGN.id, WAIT_UPLOAD_ALLOT_RECEIVE_FILE.id, "盖电子签章并入库"),
ALLOT_22(122,ALLOT.id, SIGN_WAIT_CONFIRM.id, ALLOTING.id, "拒绝电子签章申请"), ALLOT_22(122,ALLOT.id, SIGN_WAIT_CONFIRM.id, ALLOTING.id, "拒绝电子签章申请"),
ALLOT_BACK_15(123,ALLOT_BACK.id, BACK_SIGN_WAIT_CONFIRM.id, ALLOT_BACKING.id, "拒绝电子签章申请"), ALLOT_BACK_15(123,ALLOT_BACK.id, BACK_SIGN_WAIT_CONFIRM.id, ALLOT_BACKING.id, "拒绝电子签章申请"),
REPAIR_SEND_14(124, REPAIR.id, ORIGIN_STATUS.id, REPAIR_SEND_SIGN_WAIT_CONFIRM.id, "申请电子签章"),
REPAIR_SEND_15(125,REPAIR.id, REPAIR_SEND_DRAFT.id, REPAIR_SEND_SIGN_WAIT_CONFIRM.id, "申请电子签章"),
REPAIR_SEND_16(126,REPAIR.id, REPAIR_SEND_SIGN_WAIT_CONFIRM.id, REPAIR_SEND_DRAFT.id, "拒绝电子签章申请"),
REPAIR_SEND_17(127,REPAIR.id, REPAIR_SEND_SIGN_WAIT_CONFIRM.id, REPAIR_SEND_WAIT_SIGN.id, "同意电子签章申请"),
REPAIR_SEND_18(128,REPAIR.id, REPAIR_SEND_WAIT_SIGN.id, WAIT_RECEIVE.id, "盖电子签章并出库"),
REPAIR_SEND_19(129,REPAIR.id, REPAIR_SEND_WAIT_SIGN.id, END.id, "盖电子签章并入库"),
REPAIR_SEND_20(130,REPAIR.id, REPAIR_SEND_WAIT_SIGN.id, WAIT_UPLOAD_FILE.id, "盖电子签章并入库"),
REPAIR_SEND_21(131,REPAIR.id, REPAIR_SEND_SIGN_WAIT_CONFIRM.id, WAIT_RECEIVE.id, "拒绝电子签章申请"),
REPAIR_BACK_14(132, REPAIR.id, ORIGIN_STATUS.id, REPAIR_BACK_SIGN_WAIT_CONFIRM.id, "申请电子签章"),
REPAIR_BACK_16(134,REPAIR.id, REPAIR_BACK_SIGN_WAIT_CONFIRM.id, REPAIR_BACK_DRAFT.id, "拒绝电子签章申请"),
REPAIR_BACK_17(135,REPAIR.id, REPAIR_BACK_SIGN_WAIT_CONFIRM.id, REPAIR_BACK_WAIT_SIGN.id, "同意电子签章申请"),
REPAIR_BACK_18(136,REPAIR.id, REPAIR_BACK_WAIT_SIGN.id, WAIT_BACK_RECEIVE.id, "盖电子签章并出库"),
REPAIR_BACK_19(137,REPAIR.id, REPAIR_BACK_WAIT_SIGN.id, END.id, "盖电子签章并入库"),
REPAIR_BACK_20(138,REPAIR.id, REPAIR_BACK_WAIT_SIGN.id, WAIT_UPLOAD_BACK_FILE.id, "盖电子签章并入库"),
REPAIR_BACK_21(139,REPAIR.id, REPAIR_BACK_SIGN_WAIT_CONFIRM.id, WAIT_BACK_RECEIVE.id, "拒绝电子签章申请"),
; ;
public Integer id; public Integer id;
......
...@@ -100,6 +100,7 @@ public class DeviceLibraryController { ...@@ -100,6 +100,7 @@ public class DeviceLibraryController {
ids.forEach(detail -> { ids.forEach(detail -> {
DeviceLibrary d = deviceLibraryService.getOne(detail.getDeviceId()); DeviceLibrary d = deviceLibraryService.getOne(detail.getDeviceId());
d.setDetailId(detail.getId()); d.setDetailId(detail.getId());
d.setRemark(detail.getRemark());
d.setConfigName(); d.setConfigName();
deviceLibraries.add(d); deviceLibraries.add(d);
}); });
......
...@@ -2,7 +2,6 @@ package com.tykj.dev.device.library.subject.domin; ...@@ -2,7 +2,6 @@ package com.tykj.dev.device.library.subject.domin;
import com.tykj.dev.config.cache.ConfigCache; import com.tykj.dev.config.cache.ConfigCache;
import com.tykj.dev.device.library.subject.vo.DeviceVo; import com.tykj.dev.device.library.subject.vo.DeviceVo;
import com.tykj.dev.device.library.subject.vo.LifeStatusVo;
import com.tykj.dev.misc.base.BeanHelper; import com.tykj.dev.misc.base.BeanHelper;
import com.tykj.dev.misc.utils.SpringUtils; import com.tykj.dev.misc.utils.SpringUtils;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
...@@ -287,9 +286,9 @@ public class DeviceLibrary { ...@@ -287,9 +286,9 @@ public class DeviceLibrary {
return this; return this;
} }
public LifeStatusVo getLifeStatusVo(){ // public LifeStatusVo getLifeStatusVo(){
return new LifeStatusVo(this.lifeStatus,this.lifeStatusName); // return new LifeStatusVo(this.lifeStatus,this.lifeStatusName);
} // }
// public String getKeyWords(){ // public String getKeyWords(){
// StringBuffer stringBuffer = new StringBuffer(); // StringBuffer stringBuffer = new StringBuffer();
// stringBuffer.append(this.model); // stringBuffer.append(this.model);
......
...@@ -15,4 +15,6 @@ public class Detail { ...@@ -15,4 +15,6 @@ public class Detail {
private Integer id; private Integer id;
private Integer deviceId; private Integer deviceId;
private String remark;
} }
...@@ -241,6 +241,8 @@ public enum StatusEnum { ...@@ -241,6 +241,8 @@ public enum StatusEnum {
WAIT_UPLOAD_SEND_FILE(722, "等待上传送修单"), WAIT_UPLOAD_SEND_FILE(722, "等待上传送修单"),
COUNTRY_REPAIRING(777, "等待接收维修退回装备"), COUNTRY_REPAIRING(777, "等待接收维修退回装备"),
REPAIR_SEND_DRAFT(788,"草稿"), REPAIR_SEND_DRAFT(788,"草稿"),
REPAIR_SEND_SIGN_WAIT_CONFIRM(790,"申请签章待审核"),
REPAIR_SEND_WAIT_SIGN(791,"待盖章出库"),
/** /**
* 维修完成退回状态 * 维修完成退回状态
*/ */
...@@ -249,6 +251,9 @@ public enum StatusEnum { ...@@ -249,6 +251,9 @@ public enum StatusEnum {
REPAIR_BACK_RECEIVE_CONFIRM(802, "接收维修退回装备待审核"), REPAIR_BACK_RECEIVE_CONFIRM(802, "接收维修退回装备待审核"),
WAIT_UPLOAD_BACK_FILE(804, "等待上传回执单"), WAIT_UPLOAD_BACK_FILE(804, "等待上传回执单"),
WAIT_UPLOAD_BACK_SEND_FILE(810, "等待上传领取单"), WAIT_UPLOAD_BACK_SEND_FILE(810, "等待上传领取单"),
REPAIR_BACK_SIGN_WAIT_CONFIRM(820,"申请签章待审核"),
REPAIR_BACK_WAIT_SIGN(821,"待盖章出库"),
REPAIR_BACK_DRAFT(888,"草稿"),
/** /**
* 配发退回状态 * 配发退回状态
......
...@@ -2,6 +2,7 @@ package com.tykj.dev.device.packing.controller; ...@@ -2,6 +2,7 @@ package com.tykj.dev.device.packing.controller;
import com.tykj.dev.config.cache.ConfigCache; import com.tykj.dev.config.cache.ConfigCache;
import com.tykj.dev.config.swagger.AutoDocument; import com.tykj.dev.config.swagger.AutoDocument;
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.DeviceLogUserVo; import com.tykj.dev.device.library.subject.vo.DeviceLogUserVo;
...@@ -31,6 +32,7 @@ import io.swagger.annotations.Api; ...@@ -31,6 +32,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -82,6 +84,9 @@ public class PackingController { ...@@ -82,6 +84,9 @@ public class PackingController {
@Autowired @Autowired
ConfigCache configCache; ConfigCache configCache;
@Autowired
DeviceLibraryDao deviceLibraryDao;
@ApiOperation(value = "查询列装详情", notes = "可以通过这个接口查询列装详情") @ApiOperation(value = "查询列装详情", notes = "可以通过这个接口查询列装详情")
@GetMapping(value = "/detail/{billId}") @GetMapping(value = "/detail/{billId}")
public ResponseEntity selectDetail(@PathVariable("billId") @Min(value = 1,message = "billId不能小于1") int billId) { public ResponseEntity selectDetail(@PathVariable("billId") @Min(value = 1,message = "billId不能小于1") int billId) {
...@@ -150,7 +155,8 @@ public class PackingController { ...@@ -150,7 +155,8 @@ public class PackingController {
MessageBto messageBto = new MessageBto(0,1,message,userIds,0); MessageBto messageBto = new MessageBto(0,1,message,userIds,0);
messageBto.setRecord(packingLibrary1.getId().toString()); messageBto.setRecord(packingLibrary1.getId().toString());
messageService.add(messageBto); messageService.add(messageBto);
return ResponseEntity.ok(packingLibrary1); packingLibraryService.setOrder(packingLibraryService.getInsertList(new SelectPack()));
return ResponseEntity.ok(packingLibraryService.getOne(packingLibrary1.getId()));
} }
@ApiOperation(value = "添加列装装备") @ApiOperation(value = "添加列装装备")
...@@ -210,7 +216,7 @@ public class PackingController { ...@@ -210,7 +216,7 @@ public class PackingController {
packingLog.setRemark("添加列装"); packingLog.setRemark("添加列装");
packingLog.setPackingId(packingLibrary2.getId()); packingLog.setPackingId(packingLibrary2.getId());
packingLogService.add(packingLog); packingLogService.add(packingLog);
return ResponseEntity.ok("添加成功"); return ResponseEntity.ok(packingLibrary2);
} }
@ApiOperation(value = "删除列装") @ApiOperation(value = "删除列装")
...@@ -237,12 +243,19 @@ public class PackingController { ...@@ -237,12 +243,19 @@ public class PackingController {
@ApiOperation(value = "查询父子结构列装") @ApiOperation(value = "查询父子结构列装")
@PostMapping("/select") @PostMapping("/select")
public ResponseEntity selectPack(@RequestBody SelectPack selectPack){ public ResponseEntity selectPack(@RequestBody SelectPack selectPack){
List<PackingLibrary> resultList;
if (selectPack.getContent()==null&&selectPack.getModel()==null&&selectPack.getName()==null&&selectPack.getSecretLevel()==null&&selectPack.getStatus()==null){ if (selectPack.getContent()==null&&selectPack.getModel()==null&&selectPack.getName()==null&&selectPack.getSecretLevel()==null&&selectPack.getStatus()==null){
return ResultUtil.success(PageUtil.getPerPage(selectPack.getPage(), selectPack.getSize(), packingLibraryService.setOrder(packingLibraryService.getInsertList(selectPack)), selectPack.getPageable())); resultList = packingLibraryService.setOrder(packingLibraryService.getInsertList(selectPack));
} }
else { else {
return ResultUtil.success(PageUtil.getPerPage(selectPack.getPage(), selectPack.getSize(), packingLibraryService.getInsertList(selectPack), selectPack.getPageable())); resultList = packingLibraryService.getInsertList(selectPack);
} }
Page<PackingLibrary> packingLibraries = PageUtil.getPerPage(selectPack.getPage(), selectPack.getSize(), resultList, selectPack.getPageable());
Map<String,Object> map = new HashMap<>();
map.put("pages",packingLibraries);
map.put("models",resultList.stream().map(PackingLibrary::getModel).collect(Collectors.toSet()));
map.put("names",resultList.stream().map(PackingLibrary::getName).collect(Collectors.toSet()));
return ResultUtil.success(map);
} }
@ApiOperation(value = "根据型号查询所有装备附件") @ApiOperation(value = "根据型号查询所有装备附件")
...@@ -324,14 +337,14 @@ public class PackingController { ...@@ -324,14 +337,14 @@ public class PackingController {
@ApiOperation(value = "判断序列号区间不存在") @ApiOperation(value = "判断序列号区间不存在")
@PostMapping("/seqsNotExist/{id}/{num}/{seq}") @PostMapping("/seqsNotExist/{id}/{num}/{seq}")
public ResponseEntity seqsNotExist(@PathVariable("id") int id,@PathVariable("num") int num,@PathVariable("seq") String seq){ public ResponseEntity seqsNotExist(@PathVariable("id") int id,@PathVariable("num") int num,@PathVariable("seq") String seq){
List<DeviceLibrary> deviceLibraries = packingLibraryService.getAllDevSeqs(id); List<DeviceLibrary> deviceLibraries = deviceLibraryDao.findAll();
List<String> existSeqs = deviceLibraries.stream().map(DeviceLibrary::getSeqNumber).collect(Collectors.toList()); List<String> existSeqs = deviceLibraries.stream().map(DeviceLibrary::getSeqNumber).collect(Collectors.toList());
List<String> inputSeqs = DeviceSeqUtil.selectDeviceSeqs(seq); List<String> inputSeqs = DeviceSeqUtil.selectDeviceSeqs(seq);
if (inputSeqs.size()!=num){ if (inputSeqs.size()>0&&inputSeqs.size()!=num){
return ResponseEntity.ok("序列号区间总数为"+inputSeqs.size()+",与装备数量不匹配"); return ResponseEntity.ok("序列号区间总数为"+inputSeqs.size()+",与装备数量不匹配");
} }
else { else {
if (!existSeqs.containsAll(inputSeqs)){ if (inputSeqs.isEmpty()||!existSeqs.containsAll(inputSeqs)){
return ResponseEntity.ok("ok"); return ResponseEntity.ok("ok");
} }
else { else {
...@@ -386,7 +399,8 @@ public class PackingController { ...@@ -386,7 +399,8 @@ public class PackingController {
return ResponseEntity.ok(map); return ResponseEntity.ok(map);
} }
BeanUtils.copyProperties(packingModelEdit,packingLibrary); BeanUtils.copyProperties(packingModelEdit,packingLibrary);
if (packingModelEdit.getModel()!=null){ if (packingModelEdit.getModel()!=null&&!packingModelEdit.getModel().equals(packingLibrary.getModel())){
packingLibrary.setModel(packingModelEdit.getModel());
packingLibrary.setName(packingModelEdit.getModel()); packingLibrary.setName(packingModelEdit.getModel());
packingLibraryService.changeAllModel(packingLibrary.getId(),packingModelEdit.getModel()); packingLibraryService.changeAllModel(packingLibrary.getId(),packingModelEdit.getModel());
} }
...@@ -455,6 +469,14 @@ public class PackingController { ...@@ -455,6 +469,14 @@ public class PackingController {
packingLogService.add(packingLog); packingLogService.add(packingLog);
packingLibrary.setType(packingLibraryUpdateVo.getType()); packingLibrary.setType(packingLibraryUpdateVo.getType());
} }
if (packingLibraryUpdateVo.getNature()!=null&&!packingLibraryUpdateVo.getNature().equals(packingLibrary.getNature())){
//添加列装日志
PackingLog packingLog = new PackingLog();
packingLog.setRemark("将列装性质从"+configCache.getNatureMap().get(packingLibrary.getNature())+"改为"+configCache.getNatureMap().get(packingLibraryUpdateVo.getNature()));
packingLog.setPackingId(packingLibrary.getId());
packingLogService.add(packingLog);
packingLibrary.setNature(packingLibraryUpdateVo.getNature());
}
if (packingLibraryUpdateVo.getStyle()!=null&&!packingLibraryUpdateVo.getStyle().equals(packingLibrary.getStyle())){ if (packingLibraryUpdateVo.getStyle()!=null&&!packingLibraryUpdateVo.getStyle().equals(packingLibrary.getStyle())){
//添加列装日志 //添加列装日志
PackingLog packingLog = new PackingLog(); PackingLog packingLog = new PackingLog();
......
...@@ -22,7 +22,10 @@ import org.springframework.web.bind.annotation.*; ...@@ -22,7 +22,10 @@ import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.Min; import javax.validation.constraints.Min;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/** /**
* @author dengdiyi * @author dengdiyi
...@@ -70,8 +73,13 @@ public class PackingLibraryController { ...@@ -70,8 +73,13 @@ public class PackingLibraryController {
@ApiOperation(value = "列装库退装分页查询", notes = "可以通过这个接口进行列装查询") @ApiOperation(value = "列装库退装分页查询", notes = "可以通过这个接口进行列装查询")
@PostMapping("/retired/summary") @PostMapping("/retired/summary")
public ResponseEntity getInvalidPage(@RequestBody PackingLibrarySelectVo packingLibrarySelectVo) { public ResponseEntity getInvalidPage(@RequestBody PackingLibrarySelectVo packingLibrarySelectVo) {
Page<PackingLibrary> packingLibraryEntityPage = PageUtil.getPerPage(packingLibrarySelectVo.getPage(),packingLibrarySelectVo.getSize(),packingLibraryService.getInvalidPage(packingLibrarySelectVo, packingLibrarySelectVo.getPageable()),packingLibrarySelectVo.getPageable()); List<PackingLibrary> resultList = packingLibraryService.getInvalidPage(packingLibrarySelectVo, packingLibrarySelectVo.getPageable());
return ResultUtil.success(packingLibraryEntityPage); Page<PackingLibrary> packingLibraries = PageUtil.getPerPage(packingLibrarySelectVo.getPage(),packingLibrarySelectVo.getSize(),resultList,packingLibrarySelectVo.getPageable());
Map<String,Object> map = new HashMap<>();
map.put("pages",packingLibraries);
map.put("models",resultList.stream().map(PackingLibrary::getModel).collect(Collectors.toSet()));
map.put("names",resultList.stream().map(PackingLibrary::getName).collect(Collectors.toSet()));
return ResultUtil.success(map);
} }
@ApiOperation(value = "列装库列表查询", notes = "可以通过这个接口进行列装查询") @ApiOperation(value = "列装库列表查询", notes = "可以通过这个接口进行列装查询")
......
...@@ -133,7 +133,7 @@ public class RepairBillSelectController { ...@@ -133,7 +133,7 @@ public class RepairBillSelectController {
@ApiOperation(value = "查询领取单", notes = "可以通过这个接口查询领取单") @ApiOperation(value = "查询领取单", notes = "可以通过这个接口查询领取单")
@PostMapping(value = "/archives/repairBack/summary") @PostMapping(value = "/archives/repairBack/summary")
public ResponseEntity selectRepairBackBill(@RequestBody RepairBillSelectVo repairBillSelectVo) { public ResponseEntity selectRepairBackBill(@RequestBody RepairBillSelectVo repairBillSelectVo) {
Page<RepairBackBill> page = repairBackBillService.getPage(repairBillSelectVo, repairBillSelectVo.getPageable()); // Page<RepairBackBill> page = repairBackBillService.getPage(repairBillSelectVo, repairBillSelectVo.getPageable());
return ResultUtil.success(repairBackBillService.getPage(repairBillSelectVo, repairBillSelectVo.getPageable())); return ResultUtil.success(repairBackBillService.getPage(repairBillSelectVo, repairBillSelectVo.getPageable()));
} }
......
...@@ -149,7 +149,7 @@ public class RepairBackBill { ...@@ -149,7 +149,7 @@ public class RepairBackBill {
/** /**
* 退回状态(1:维修成功出库待审核,2:维修成功出库审核失败,3:重新配发出库待审核,4:重新配发出库审核失败,5:退回中,5:送修方接收待审核,6:送修方接收审核失败,7:维修退回完成) * 退回状态(1:维修成功出库待审核,2:维修成功出库审核失败,3:重新配发出库待审核,4:重新配发出库审核失败,5:退回中,5:送修方接收待审核,6:送修方接收审核失败,7:维修退回完成)
*/ */
@ApiModelProperty(value = "退回状态(1:维修成功出库待审核,2:维修成功出库审核失败,3:重新配发出库待审核,4:重新配发出库审核失败,5:退回中,5:送修方接收待审核,6:送修方接收审核失败,7:维修退回完成)") @ApiModelProperty(value = "退回状态(0:草稿,2:维修成功出库审核失败,3:重新配发出库待审核,4:重新配发出库审核失败,5:退回中,5:送修方接收待审核,6:送修方接收审核失败,7:维修退回完成)")
private Integer backStatus; private Integer backStatus;
/** /**
* 维修完成出库详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的不匹配 * 维修完成出库详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的不匹配
......
package com.tykj.dev.device.selfcheck.controller; package com.tykj.dev.device.selfcheck.controller;
import com.fasterxml.jackson.core.type.TypeReference;
import com.tykj.dev.config.service.SystemVariableService; import com.tykj.dev.config.service.SystemVariableService;
import com.tykj.dev.config.swagger.AutoDocument; import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.file.service.FilesUtil; import com.tykj.dev.device.file.service.FilesUtil;
...@@ -23,6 +24,7 @@ import com.tykj.dev.device.user.util.UserUtils; ...@@ -23,6 +24,7 @@ import com.tykj.dev.device.user.util.UserUtils;
import com.tykj.dev.misc.base.BusinessEnum; 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.ResultUtil; import com.tykj.dev.misc.utils.ResultUtil;
import com.tykj.dev.misc.utils.TaskDisposeUtil; import com.tykj.dev.misc.utils.TaskDisposeUtil;
import com.tykj.dev.socket.MyWebSocket; import com.tykj.dev.socket.MyWebSocket;
...@@ -301,6 +303,9 @@ public class SelfCheckController { ...@@ -301,6 +303,9 @@ public class SelfCheckController {
selfExaminationBillEntity.setCheckedCount(selfCheckSaveVo.getCheckedCount()); selfExaminationBillEntity.setCheckedCount(selfCheckSaveVo.getCheckedCount());
selfExaminationBillEntity.setCheckingCount(selfCheckSaveVo.getCheckingCount()); selfExaminationBillEntity.setCheckingCount(selfCheckSaveVo.getCheckingCount());
selfExaminationBillEntity.setUserbId(selfCheckSaveVo.getUserbId()); selfExaminationBillEntity.setUserbId(selfCheckSaveVo.getUserbId());
if (selfCheckSaveVo.getUnStockDevices()!=null&&selfCheckSaveVo.getUnStockDevices().size()>0){
selfExaminationBillEntity.setUnStockDetail(JacksonUtil.toJSon(selfCheckSaveVo.getUnStockDevices()));
}
} }
else { else {
selfExaminationBillEntity = selfCheckSaveVo.toDo(); selfExaminationBillEntity = selfCheckSaveVo.toDo();
...@@ -548,6 +553,10 @@ public class SelfCheckController { ...@@ -548,6 +553,10 @@ public class SelfCheckController {
list.add(libraryEntities1); list.add(libraryEntities1);
//添加业务日志 //添加业务日志
list.add(taskLogService.getByTaskId(taskBto.getId())); list.add(taskLogService.getByTaskId(taskBto.getId()));
if (selfExaminationBillEntity.getUnStockDetail()!=null){
list.add(JacksonUtil.readValue(selfExaminationBillEntity.getUnStockDetail(), new TypeReference<List<DeviceLibrary>>() {
}));
}
return ResultUtil.success(list); return ResultUtil.success(list);
} }
} }
...@@ -88,6 +88,9 @@ public class SelfCheckBill { ...@@ -88,6 +88,9 @@ public class SelfCheckBill {
@Column(name = "check_detail",columnDefinition = "TEXT") @Column(name = "check_detail",columnDefinition = "TEXT")
@ApiModelProperty(value = "自查详情(装备主键id+核对结果(0缺失1无误2新增,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的新增") @ApiModelProperty(value = "自查详情(装备主键id+核对结果(0缺失1无误2新增,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的新增")
private String checkDetail; private String checkDetail;
@Column(name = "un_stock_detail",columnDefinition = "TEXT")
@ApiModelProperty(value = "非在库装备转JSon")
private String unStockDetail;
/** /**
* 自查状态(0:待审核,1:审核失败,2:自查完成,3:未检) * 自查状态(0:待审核,1:审核失败,2:自查完成,3:未检)
*/ */
......
...@@ -2,7 +2,9 @@ package com.tykj.dev.device.selfcheck.subject.vo; ...@@ -2,7 +2,9 @@ package com.tykj.dev.device.selfcheck.subject.vo;
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.domin.DeviceLibrary;
import com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill; import com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill;
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;
...@@ -59,6 +61,9 @@ public class SelfCheckSaveVo { ...@@ -59,6 +61,9 @@ public class SelfCheckSaveVo {
@ApiModelProperty(value = "检查附件名") @ApiModelProperty(value = "检查附件名")
private List<FileRet> checkFiles; private List<FileRet> checkFiles;
@ApiModelProperty(value = "非在库装备集合")
private List<DeviceLibrary> unStockDevices;
public SelfCheckBill toDo() { public SelfCheckBill toDo() {
SelfCheckBill selfExaminationBillEntity = new SelfCheckBill(); SelfCheckBill selfExaminationBillEntity = new SelfCheckBill();
BeanUtils.copyProperties(this, selfExaminationBillEntity); BeanUtils.copyProperties(this, selfExaminationBillEntity);
...@@ -67,6 +72,9 @@ public class SelfCheckSaveVo { ...@@ -67,6 +72,9 @@ public class SelfCheckSaveVo {
if(this.checkFiles!=null&&this.checkFiles.size()>0){ if(this.checkFiles!=null&&this.checkFiles.size()>0){
selfExaminationBillEntity.setCheckFiles(FilesUtil.stringFileToList(this.checkFiles)); selfExaminationBillEntity.setCheckFiles(FilesUtil.stringFileToList(this.checkFiles));
} }
if (this.unStockDevices!=null&&this.unStockDevices.size()>0){
selfExaminationBillEntity.setUnStockDetail(JacksonUtil.toJSon(this.unStockDevices));
}
return selfExaminationBillEntity; return selfExaminationBillEntity;
} }
} }
...@@ -154,7 +154,9 @@ public class BigScreenServiceImpl implements BigScreenService { ...@@ -154,7 +154,9 @@ public class BigScreenServiceImpl implements BigScreenService {
.map(repairBill -> repairSendBillDao.findByDeviceRepairBillId(repairBill.getId())) .map(repairBill -> repairSendBillDao.findByDeviceRepairBillId(repairBill.getId()))
.collect(Collectors.toList()); .collect(Collectors.toList());
for (RepairSendBill r:repairSendBills) { for (RepairSendBill r:repairSendBills) {
repairDeviceIds.addAll(StringSplitUtil.split(r.getRepairDeviceCheckDetail())); if (r.getRepairDeviceCheckDetail()!=null&&r.getRepairStatus()>0) {
repairDeviceIds.addAll(StringSplitUtil.split(r.getRepairDeviceCheckDetail()));
}
} }
double num = repairDeviceIds.size(); double num = repairDeviceIds.size();
double faultPercent = num/centerNum.getDeviceCount()*100; double faultPercent = num/centerNum.getDeviceCount()*100;
......
...@@ -324,6 +324,10 @@ public class TaskSelectController { ...@@ -324,6 +324,10 @@ public class TaskSelectController {
} }
} }
list.add(libraryEntities1); list.add(libraryEntities1);
if (selfExaminationBillEntity.getUnStockDetail()!=null){
list.add(JacksonUtil.readValue(selfExaminationBillEntity.getUnStockDetail(), new TypeReference<List<DeviceLibrary>>() {
}));
}
return ResponseEntity.ok(new ResultObj(list, "查询成功")); return ResponseEntity.ok(new ResultObj(list, "查询成功"));
case 19: case 19:
MatchingDeviceBill matchingDeviceBillEntity = matchingDeviceBillService.getOne(billId); MatchingDeviceBill matchingDeviceBillEntity = matchingDeviceBillService.getOne(billId);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论