| src/main/java/com/zy/asrs/controller/BarcodeMatnrController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/zy/asrs/utils/MatExcelListener.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/asrs/controller/BarcodeMatnrController.java
@@ -11,12 +11,10 @@ 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.param.CombParam; import com.zy.asrs.entity.param.MobileAdjustParam; import com.zy.asrs.service.MatBarcodeService; import com.zy.asrs.service.MatService; import com.zy.asrs.service.MobileService; import com.zy.asrs.service.WaitPakinService; import com.zy.asrs.service.*; import com.zy.common.web.BaseController; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -41,6 +39,8 @@ private MatService matService; @Autowired private WaitPakinService waitPakinService; @Autowired private WrkMastService wrkMastService; /* * 物料托盘绑定分页查询 @@ -185,6 +185,16 @@ return R.error(BaseRes.PARAM); } for (MatBarcode matBarcode : list) { WrkMast wrkMast = wrkMastService.selectByBarcode(matBarcode.getZpallet()); if (wrkMast == null){ return R.error("托盘没有对应工作档"); } if (wrkMast.getIoType() != 104){ return R.error("托盘对应工作档不是并板出库"); } if (wrkMast.getWrkSts() != 14){ return R.error("托盘对应工作档未完成"); } MobileAdjustParam combParam = new MobileAdjustParam(); ArrayList<CombParam.CombMat> combMats = new ArrayList<>(); CombParam.CombMat combMat = new CombParam.CombMat(); src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java
@@ -41,13 +41,14 @@ public void deleteMatBarcode(List<MatBarcode> list) { for (MatBarcode matBarcode : list) { //对于已经有库存 组托档 工作档的数据 不允许解绑 Integer locCount = locDetlService.selectCountByMatNr(matBarcode.getMatnr()); Integer waitCount = waitPakinService.selectCountByMatNr(matBarcode.getMatnr()); // Integer locCount = locDetlService.selectCountByMatNr(matBarcode.getMatnr()); // Integer waitCount = waitPakinService.selectCountByMatNr(matBarcode.getMatnr()); //Integer wrkCount = wrkDetlService.selectCountByMatNr(matBarcode.getMatnr()); if (locCount > 0 || waitCount > 0){ throw new CoolException("库存/组托档存在该模具,不能解绑,商品模具名称:" + matBarcode.getMatnr() + "托盘码:" + matBarcode.getZpallet()); } // if (locCount > 0 || waitCount > 0){ // throw new CoolException("库存/组托档存在该模具,不能解绑,商品模具名称:" + matBarcode.getMatnr() + "托盘码:" + matBarcode.getZpallet()); // } Integer wrkNo = wrkDetlService.selectWrkNoByMatnr(matBarcode.getMatnr()); if (wrkNo != null){ WrkMast wrkMast = wrkMastService.selectById(wrkNo); if (wrkMast == null){ throw new CoolException("工作档异常,有工作明细档无工作档"); @@ -58,6 +59,13 @@ if (wrkMast.getWrkSts() != 14 && wrkMast.getWrkSts() != 15){ throw new CoolException("工作档未完成"); } } //对于已经有库存 组托档 工作档的数据 不允许解绑 Integer locCount = locDetlService.selectCountByMatNr(matBarcode.getMatnr()); Integer waitCount = waitPakinService.selectCountByMatNr(matBarcode.getMatnr()); if (locCount > 0 || waitCount > 0){ throw new CoolException("库存/组托档存在该模具,不能解绑,商品模具名称:" + matBarcode.getMatnr() + "托盘码:" + matBarcode.getZpallet()); } //对模具的规格做处理得到厚度 Integer thickness = 0; if (!Cools.isEmpty(matBarcode.getSpecs())){ @@ -65,11 +73,13 @@ thickness = Integer.parseInt(split[1]); } HalfBarcode halfBarcode = halfBarcodeService.selectByZpallet(matBarcode.getZpallet()); if (halfBarcode != null){ halfBarcode.setAnfme(halfBarcode.getAnfme() - 1); halfBarcode.setPrice(halfBarcode.getPrice() + thickness); if (!halfBarcodeService.half(halfBarcode)){ throw new CoolException("更新半托信息失败"); } } matBarcodeMapper.deleteByMatnr(matBarcode.getMatnr()); } } src/main/java/com/zy/asrs/utils/MatExcelListener.java
@@ -145,6 +145,7 @@ inOut.setMaktx(mat.getMaktx()); inOut.setColor(mat.getColor()); inOut.setSpecs(mat.getSpecs()); inOut.setName(excel.getName()); inOut.setTemp1(""); if (!matService.insert(mat)) { throw new CoolException("保存商品档案失败,商品编码:" + excel.getMatnr());