| | |
| | | log.info("[comb] cache: {}", param == null ? "null" : JSON.toJSONString(param)); |
| | | request.setAttribute("cache", param); |
| | | } |
| | | |
| | | if (Cools.isEmpty(param)) { |
| | | return R.error("没有入库数据"); |
| | | } |
| | | boolean boo =false; |
| | | for (MesToCombParam mesToCombParam : param) { |
| | | if (mesToCombParam.getOperateType()==2){ |
| | | int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet", mesToCombParam.getPalletId())); |
| | | int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet", mesToCombParam.getPalletId())); |
| | | int countwait = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet",mesToCombParam.getPalletId()).eq("io_status", "Y")); |
| | | if (countLoc > 0 || countWrk > 0 || countwait > 0) { |
| | | return R.error(mesToCombParam.getPalletId()+"-工作档/库存条码数据已存在,无法删除"); |
| | | } |
| | | waitPakinService.delete(new EntityWrapper<WaitPakin>().eq("zpallet",mesToCombParam.getPalletId())); |
| | | boo = true; |
| | | } |
| | | } |
| | | if (boo){ |
| | | return R.ok(); |
| | | } |
| | | List<MesToCombParam> errorComb = Lists.newArrayList(); |
| | | List<MesToCombParam> validComb = Lists.newArrayList(); |
| | | for (MesToCombParam mesToCombParam : param) { |
| | |
| | | } |
| | | |
| | | // 总库位数 |
| | | Integer total = (int) Arith.add(0, locUseRate.getFqty(), locUseRate.getOqty(), locUseRate.getUqty(), locUseRate.getXqty()); |
| | | Integer total1 = (int) Arith.add(0, locUseRate.getFqty(), locUseRate.getOqty(), locUseRate.getUqty(), locUseRate.getXqty()); |
| | | Integer total = total1>40000?40000:total1; |
| | | // 使用中 |
| | | Integer used = locUseRate.getFqty() + locUseRate.getUqty(); |
| | | // 库位使用率 |