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

更新

上级 36791f47
......@@ -480,7 +480,7 @@ public class DeviceLibraryController {
d.setPartParentId(deviceEditVo.getDeviceId());
deviceLibraryService.update(d);
//添加装备日志
String remark = "将序列号为" + d.getSeqNumber() + "的配件与表面号为" + deviceLibraryEntity.getSeqNumber() + "的装备绑定";
String remark = "将序列号为" + d.getSeqNumber() + "的配件与序列号为" + deviceLibraryEntity.getSeqNumber() + "的装备绑定";
DeviceLogDto deviceLogDto = new DeviceLogDto(deviceEditVo.getDeviceId(), remark, null);
DeviceLogDto deviceLogDto2 = new DeviceLogDto(id, remark, null);
deviceLogService.addLog(deviceLogDto);
......@@ -508,7 +508,7 @@ public class DeviceLibraryController {
d.setPartParentId(null);
deviceLibraryService.update(d);
//添加装备日志
String remark = "将表面号为" + d.getRfidSurfaceId() + "的配件与表面号为" + deviceLibraryEntity.getRfidSurfaceId() + "的装备解绑";
String remark = "将序列号为" + d.getRfidSurfaceId() + "的配件与序列号为" + deviceLibraryEntity.getRfidSurfaceId() + "的装备解绑";
DeviceLogDto deviceLogDto = new DeviceLogDto(deviceEditVo.getDeviceId(), remark, null);
DeviceLogDto deviceLogDto2 = new DeviceLogDto(id, remark, null);
deviceLogService.addLog(deviceLogDto);
......@@ -518,7 +518,7 @@ public class DeviceLibraryController {
deviceLibraryEntity.setPartParentId(null);
deviceLibraryService.update(deviceLibraryEntity);
//添加装备日志
String remark = "将表面号为" + deviceLibraryEntity.getRfidSurfaceId() + "的配件与表面号为" + d.getRfidSurfaceId() + "的装备解绑";
String remark = "将序列号为" + deviceLibraryEntity.getRfidSurfaceId() + "的配件与序列号为" + d.getRfidSurfaceId() + "的装备解绑";
DeviceLogDto deviceLogDto = new DeviceLogDto(deviceEditVo.getDeviceId(), remark, null);
DeviceLogDto deviceLogDto2 = new DeviceLogDto(id, remark, null);
deviceLogService.addLog(deviceLogDto);
......
......@@ -240,6 +240,7 @@ public enum StatusEnum {
WAIT_UPLOAD_FILE(704, "等待上传送修单"),
WAIT_UPLOAD_SEND_FILE(722, "等待上传送修单"),
COUNTRY_REPAIRING(777, "等待接收维修退回装备"),
REPAIR_SEND_DRAFT(788,"草稿"),
/**
* 维修完成退回状态
*/
......
......@@ -153,7 +153,7 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
@Override
public List<String> getModelList() {
List<PackingLibrary> list = packingLibraryDao.findAll();
List<PackingLibrary> list = packingLibraryDao.findAllByIsRootAndPackingStatus(1,2);
Set<String> s = new HashSet<>();
for (PackingLibrary d : list) {
s.add(d.getModel());
......
......@@ -129,6 +129,40 @@ public class RepairController {
@Autowired
private DeviceLibraryDao deviceLibraryDao;
// @ApiOperation(value = "保存维修操作", notes = "可以通过这个接口保存维修操作")
// @PostMapping(value = "/saveRepairBill")
// @Transactional(rollbackFor = Exception.class)
// public ResponseEntity saveAllotBill(@RequestBody RepairBillSaveVo repairBillSaveVo) {
// //第一次保存
// if (repairBillSaveVo.getTaskId()==null){
// Integer userId = userUtils.getCurrentUserId();
// //保存入库单
// List<Integer> userIds = new ArrayList<>();
// userIds.add(userId);
// AllotBill allotBill1 = allotBillSaveVo.toDo();
// allotBill1.setAllotStatus(0);
// allotBill1.setSendUseraId(userId);
// AllotBill allotBill = allotBillService.addEntity(allotBill1);
// //发起任务
// TaskBto taskBto = new TaskBto(StatusEnum.ALLOT_DRAFT.id, "配发业务", null, ".", allotBill.getId(), 3, userUtils.getCurrentUnitId(), 0, null, userIds);
// TaskBto taskBto1 = taskService.start(taskBto);
// Integer id = taskBto1.getId();
// myWebSocket.sendMessage1();
// return ResponseEntity.ok("保存成功"+id);
// }
// else {
// //更新账单
// TaskBto taskBto = taskService.get(allotBillSaveVo.getTaskId());
// AllotBill allotBill = allotBillService.getOne(taskBto.getBillId());
// AllotBill allotBill1 = allotBillSaveVo.toDo();
// allotBill1.setAllotStatus(0);
// MapperUtils.copyNoNullProperties(allotBill1,allotBill);
// allotBillService.update(allotBill);
// //改变装备状态为待配发
// return ResponseEntity.ok("更新成功"+taskBto.getId());
// }
// }
@ApiOperation(value = "添加维修装备", notes = "可以通过这个接口发起维修")
@PostMapping(value = "/add")
@Transactional(rollbackFor = Exception.class)
......
......@@ -873,16 +873,17 @@ public class TaskServiceImpl implements TaskService {
//查询跟踪
if (taskSelectVo.getSelectNum() == 3) {
//所有涉及人员所在单位包含当前用户所在单位且指针对应UserId不是当前用户
List<Integer> status = Arrays.asList(201,333,810,322,722,788,1250,2223,8110);
List<TaskBto> taskBtoList = taskBtos.stream()
.filter(taskBto -> {
boolean unitExists = getUnitsByUsers(taskBto.getInvolveUserIdList()).contains(unitId);
// boolean unitExists = getUnitsByUsers(taskBto.getInvolveUserIdList()).contains(unitId);
boolean userConfirm2 = taskBto.getInvolveUserIdList().get(taskBto.getCurrentPoint()) == -1;
boolean pointExists = taskBto.getCurrentPoint() < taskBto.getInvolveUserIdList().size();
boolean userConfirm = userId.equals(taskBto.getInvolveUserIdList().get(taskBto.getCurrentPoint())) || (taskBto.getInvolveUserIdList().get(taskBto.getCurrentPoint())==0 && taskBto.getOwnUnit().equals(userUtils.getCurrentUnitId()));
boolean isDraft = taskBto.getBillStatus() == 201 || taskBto.getBillStatus() == 333 || taskBto.getBillStatus() == 810 || taskBto.getBillStatus() == 322 || taskBto.getBillStatus() == 722;
boolean isDraft = status.contains(taskBto.getBillStatus());
// boolean isCreateUser = userId.equals(taskBto.getCreateUserId());
boolean isCreateUnit = taskBto.getCreateUserId()!=null&&unitId.equals(userCache.findById(taskBto.getCreateUserId()).getUnitsId());
return unitExists && pointExists && !userConfirm && !userConfirm2 && !isDraft && isCreateUnit;
return pointExists && !userConfirm && !userConfirm2 && !isDraft && isCreateUnit;
})
.collect(Collectors.toList());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论