| | |
| | | throw new CoolException("明细内容不存在!!"); |
| | | } |
| | | |
| | | Double v = Math.round((stationDetl.getAnfme() - stationDetl.getWorkQty()) * 10000) / 10000.0; |
| | | |
| | | Double v = stationDetl.getAnfme() - stationDetl.getWorkQty(); |
| | | if (detlDto.getAnfme().compareTo(v) > 0) { |
| | | throw new CoolException("组托上限为:" + stationDetl.getAnfme() + ", 已组托:" + stationDetl.getWorkQty() + ", 还可组托:" + v); |
| | | } |
| | |
| | | throw new CoolException("保存入库通知档失败"); |
| | | } |
| | | |
| | | Double v1 = Math.round((stationDetl.getWorkQty() + detlDto.getAnfme()) * 10000) / 10000.0 ; |
| | | Double v1 = stationDetl.getWorkQty() + detlDto.getAnfme(); |
| | | stationDetl.setWorkQty(v1); |
| | | |
| | | if (!basStationDetlService.updateById(stationDetl)) { |
| | |
| | | if (v1.compareTo(stationDetl.getWorkQty()) >= 0) { |
| | | if (!basStationDetlService.deleteById(stationDetl)) { |
| | | throw new CoolException("原始数据移除失败!"); |
| | | } |
| | | } |
| | | |
| | | List<BasStationDetl> devNo = basStationDetlService.selectList(new EntityWrapper<BasStationDetl>().eq("dev_no", stationDetl.getDevNo())); |
| | | if (Objects.isNull(devNo) || devNo.isEmpty()) { |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>() |
| | | .eq("loc_sts", LocStsType.LOC_STS_TYPE_F.type) |
| | | .eq("dev_no", stationDetl.getDevNo())); |
| | | if (!Objects.isNull(station)) { |
| | | station.setLocSts(LocStsType.LOC_STS_TYPE_D.type); |
| | | if (!basStationService.updateById(station)) { |
| | | throw new CoolException("站点状态修改失败~!!"); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | throw new CoolException("站点不存在!!"); |
| | | } |
| | | |
| | | // station.setLocSts(LocStsType.LOC_STS_TYPE_O.type); |
| | | // if (!basStationService.updateById(station)) { |
| | | // throw new CoolException("站点状态修改失败!"); |
| | | // } |
| | | // basStationDetlService.delete(new EntityWrapper<BasStationDetl>().eq("dev_no", station.getDevNo())); |
| | | station.setLocSts(LocStsType.LOC_STS_TYPE_O.type); |
| | | if (!basStationService.updateById(station)) { |
| | | throw new CoolException("站点状态修改失败!"); |
| | | } |
| | | basStationDetlService.delete(new EntityWrapper<BasStationDetl>().eq("dev_no", station.getDevNo())); |
| | | |
| | | // // 任务完成 |
| | | // task.setWrkSts(15L); |
| | |
| | | waitPakins.forEach(waitPakin -> { |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetl.sync(waitPakin); |
| | | wrkDetl.setSuppCode(waitPakin.getSuppCode()); |
| | | wrkDetl.setWrkNo(wrkMast.getWrkNo()); |
| | | wrkDetl.setIoTime(wrkMast.getIoTime()); |
| | | wrkDetl.setAppeTime(now); |