| | |
| | | String threeCode = param.getBarcode(); |
| | | param.setBarcode(barcode); |
| | | //实际称重数量 |
| | | Double m = param.getWeight() -2.45; |
| | | Double m = param.getWeight() -2.4; |
| | | |
| | | |
| | | WrkMast wrkMast1 = wrkMastService.selectByBarcode(barcode); |
| | |
| | | String s = Utils.WMSLocToWCSLoc(wrkMast1.getLocNo()); |
| | | dto1.setLocNo(s); |
| | | dto1.setCrnNo(wrkMast1.getCrnNo()); |
| | | dto1.setWorkNo(wrkMast1.getWrkNo()); |
| | | dto1.setTaskNo(wrkMast1.getWrkNo()); |
| | | dto1.setTaskPri((int) Math.round(wrkMast1.getIoPri())); |
| | | return R.ok(dto1); |
| | | } |
| | |
| | | |
| | | } |
| | | m=m*mat.getVolume(); |
| | | //Double val = Math.round((m - matnr.getSafeQty()) * 10000) / 10000.0; |
| | | Config config = configService.selectConfigByCode("SimulationInbound"); |
| | | if (config != null && config.getValue().equals("Y")) { |
| | | WaitPakin waitPakin1 = waitPakinService.selectOne(new EntityWrapper<WaitPakin>().eq("zpallet", param.getBarcode())); |
| | | if (Cools.isEmpty(waitPakin1)) { |
| | | WaitPakin waitPakin = waitPakinService.selectOne(new EntityWrapper<WaitPakin>().eq("io_status", "N")); |
| | | if (waitPakin != null) { |
| | | waitPakinService.updateForSet("zpallet = '" + param.getBarcode() + "'", new EntityWrapper<WaitPakin>().eq("zpallet", waitPakin.getZpallet())); |
| | | } |
| | | } |
| | | Double currentStock = locDetlService.getSumAnfme(matnr); |
| | | if (currentStock == null) { |
| | | currentStock = 0D; |
| | | } |
| | | if (mat.getStoreMax() != null && currentStock + m > mat.getStoreMax()) { |
| | | log.info("WCS入库拦截: 物料超过库存上限, matnr={}, currentStock={}, inboundQty={}, storeMax={}", |
| | | matnr, currentStock, m, mat.getStoreMax()); |
| | | return R.error("物料已到达上限禁止入库"); |
| | | } |
| | | //Double val = Math.round((m - matnr.getSafeQty()) * 10000) / 10000.0; |
| | | // Config config = configService.selectConfigByCode("SimulationInbound"); |
| | | // if (config != null && config.getValue().equals("Y")) { |
| | | // WaitPakin waitPakin1 = waitPakinService.selectOne(new EntityWrapper<WaitPakin>().eq("zpallet", param.getBarcode())); |
| | | // if (Cools.isEmpty(waitPakin1)) { |
| | | // WaitPakin waitPakin = waitPakinService.selectOne(new EntityWrapper<WaitPakin>().eq("io_status", "N")); |
| | | // if (waitPakin != null) { |
| | | // waitPakinService.updateForSet("zpallet = '" + param.getBarcode() + "'", new EntityWrapper<WaitPakin>().eq("zpallet", waitPakin.getZpallet())); |
| | | // } |
| | | // } |
| | | // } |
| | | waitPakins = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", param.getBarcode())); |
| | | if (Cools.isEmpty(waitPakins)) { |
| | | WrkMast wrkMast = wrkMastService.selectByBarcode(param.getBarcode()); |