| | |
| | | throw new CoolException("该模具已经组托,商品模具名称:" + matBarcode.getMatnr()); |
| | | } |
| | | //对于已经有库存的模具 不允许再次组托 |
| | | List<LocDetl> locDetlList = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr", mat.getMatnr())); |
| | | List<LocDetl> locDetlList = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr", matBarcode.getMatnr())); |
| | | if (!Cools.isEmpty(locDetlList)) { |
| | | throw new CoolException("该模具已经入库,商品模具名称:" + matBarcode.getMatnr()); |
| | | } |
| | | //对于已经有工作档的模具 不允许再次组托 |
| | | List<WrkDetl> wrkDetlList = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("matnr", mat.getMatnr())); |
| | | if (!Cools.isEmpty(wrkDetlList)) { |
| | | throw new CoolException("该模具已经存在工作档,商品模具名称:" + matBarcode.getMatnr()); |
| | | List<WrkDetl> wrkDetlList = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("matnr", matBarcode.getMatnr())); |
| | | WrkDetl wrkDetl = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>().eq("matnr", matBarcode.getMatnr())); |
| | | if (wrkDetl != null){ |
| | | WrkMast wrkMast1 = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", wrkDetl.getWrkNo())); |
| | | if (!Cools.isEmpty(wrkDetlList) && wrkMast1.getWrkSts() != 15) { |
| | | throw new CoolException("该模具已经存在工作档,商品模具名称:" + matBarcode.getMatnr()); |
| | | } |
| | | } |
| | | WaitPakin waitPakin1 = new WaitPakin(); |
| | | waitPakin1.sync(mat); |