| | |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.entity.MatBarcode; |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.service.*; |
| | |
| | | private WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | |
| | | /* |
| | | * 物料托盘绑定分页查询 |
| | |
| | | /*组托 |
| | | * |
| | | * */ |
| | | @RequestMapping(value = "/barcodeMatnr/comb/auth") |
| | | // @RequestMapping(value = "/barcodeMatnr/comb/auth") |
| | | @ManagerAuth |
| | | public R comb(WaitPakin waitPakin) { |
| | | Mat mat = matService.selectById(waitPakin.getModiUser()); |
| | |
| | | if (wrkMast.getWrkSts() != 14){ |
| | | return R.error("托盘对应工作档未完成"); |
| | | } |
| | | //对于已经组托过的 模具 不允许再次并板 |
| | | Integer waitPakinCount = waitPakinService.selectByBarcodeAndMatnr(matBarcode.getMatnr()); |
| | | if (waitPakinCount >= 1){ |
| | | throw new CoolException("该模具已经组托,商品模具名称:" + matBarcode.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", matBarcode.getMatnr())); |
| | | if (!Cools.isEmpty(wrkDetlList)) { |
| | | throw new CoolException("该模具已经存在工作档,商品模具名称:" + matBarcode.getMatnr()); |
| | | } |
| | | MobileAdjustParam combParam = new MobileAdjustParam(); |
| | | ArrayList<CombParam.CombMat> combMats = new ArrayList<>(); |
| | | CombParam.CombMat combMat = new CombParam.CombMat(); |