| | |
| | | waitPakin.setZpallet(param.getBarcode()); // 托盘码 |
| | | waitPakin.setThreeCode(detlDto.getThreeCode()); |
| | | waitPakin.setSuppCode(detlDto.getStandby1()); |
| | | waitPakin.setStandby1(detlDto.getStandby1()); |
| | | waitPakin.setIoStatus("N"); // 入出状态 |
| | | waitPakin.setAnfme(detlDto.getAnfme()); // 数量 |
| | | waitPakin.setStatus("Y"); // 状态 |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R OutCallAgv(AgvCallParams params, Long userId) { |
| | | BasAreas basAreas = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("whs_type_id", LocAreaType.LOC_AREA_TYPE_IN_CACHE.type)); |
| | | |
| | | if (Objects.isNull(basAreas)) { |
| | | throw new CoolException("库区不存在!!"); |
| | | } |
| | | /**获取入库最早的一条数据**/ |
| | | List<LocCache> locCaches = locCacheService.selectList(new EntityWrapper<LocCache>() |
| | | .eq("loc_sts", LocStsType.LOC_STS_TYPE_F.type) |
| | |
| | | for (LocCache locCache : locCaches) { |
| | | //获取缓存区信息 |
| | | // BasAreas basAreas = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("whs_type_id", LocAreaType.LOC_AREA_TYPE_IN_CACHE.type)); |
| | | if (Objects.isNull(basAreas)) { |
| | | throw new CoolException("库区不存在!!"); |
| | | } |
| | | |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>() |
| | | .eq("area_id", basAreas.getId()) |
| | | .eq("loc_no", locCache.getLocNo())); |
| | |
| | | throw new CoolException("明细内容不存在!!"); |
| | | } |
| | | |
| | | Double v = stationDetl.getAnfme() - stationDetl.getWorkQty(); |
| | | Double v = Math.round((stationDetl.getAnfme() - stationDetl.getWorkQty()) * 10000) / 10000.0; |
| | | if (detlDto.getAnfme().compareTo(v) > 0) { |
| | | throw new CoolException("组托上限为:" + stationDetl.getAnfme() + ", 已组托:" + stationDetl.getWorkQty() + ", 还可组托:" + v); |
| | | } |
| | |
| | | throw new CoolException("保存入库通知档失败"); |
| | | } |
| | | |
| | | Double v1 = stationDetl.getWorkQty() + detlDto.getAnfme(); |
| | | Double v1 = Math.round((stationDetl.getWorkQty() + detlDto.getAnfme()) * 10000) / 10000.0; |
| | | stationDetl.setWorkQty(v1); |
| | | |
| | | if (!basStationDetlService.updateById(stationDetl)) { |
| | | throw new CoolException("站点明细修改失败"); |
| | | } |
| | | |
| | | if (v1.compareTo(stationDetl.getWorkQty()) >= 0) { |
| | | if (v1.compareTo(stationDetl.getAnfme()) >= 0) { |
| | | if (!basStationDetlService.deleteById(stationDetl)) { |
| | | throw new CoolException("原始数据移除失败!"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | .setBarcode(params.getTarBarcode()) |
| | | .setZpallet(params.getTarBarcode()) |
| | | .setBatch(combMat.getBatch()) |
| | | .setSuppCode(combMat.getStandby1()) |
| | | .setStandby1(combMat.getStandby1()) |
| | | .setAnfme(combMat.getWorkQty().doubleValue()); |
| | | if (!basStationDetlService.insert(basStationDetl)) { |
| | |
| | | if (!basStationDetlService.updateById(basStationDetl)) { |
| | | throw new CoolException("更新明细数据失败"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (basStation.getLocSts().equals(LocStsType.LOC_STS_TYPE_D.type) |
| | |
| | | wrkMast.setSourceStaNo(dto.getSourceStaNo() + ""); |
| | | wrkMast.setStaNo(dto.getStaNo() + ""); |
| | | wrkMast.setLocNo(dto.getLocNo()); |
| | | wrkMast.setBarcode(pakin.getBarcode()); // 托盘码 |
| | | wrkMast.setBarcode(pakin.getZpallet()); // 托盘码 |
| | | wrkMast.setFullPlt("Y"); // 满板:Y |
| | | wrkMast.setPicking("N"); // 拣料 |
| | | wrkMast.setExitMk("N"); // 退出 |