| | |
| | | public void inStockExecute(){ |
| | | List<InStockDto> readyInStock = erpService.getReadyInStock(); |
| | | for (InStockDto dto : readyInStock) { |
| | | |
| | | //同一单号存在相同物料编码数据,该单号不予处理 |
| | | Number fnumberCount = erpService.QueryFnumberInCount(dto.getInStockBill().getFInterID()); |
| | | if(fnumberCount.intValue() > 1){ |
| | | if (!erpService.haveReadInStock(dto.getInStockBill().getFBillNo(),-1)) { |
| | | log.error("标记原材料入库通知单已读InStockBill为-1失败[FBillNo={},FInterID={}]", dto.getInStockBill().getFBillNo(),dto.getInStockBill().getFInterID()); |
| | | } |
| | | continue; |
| | | } |
| | | |
| | | for (InStockBillEntry entry : dto.getInStockBillEntries()) { |
| | | MatCode matCode = matCodeService.selectById(entry.getFnumber()); |
| | | if (null != matCode) { |
| | |
| | | } |
| | | } |
| | | } |
| | | if (!erpService.haveReadInStock(dto.getInStockBill().getFBillNo())) { |
| | | if (!erpService.haveReadInStock(dto.getInStockBill().getFBillNo(),1)) { |
| | | log.error("标记原材料入库通知单已读InStockBill失败[FBillNo={}]", dto.getInStockBill().getFBillNo()); |
| | | } |
| | | } |
| | |
| | | public void inCPICMOExecute(){ |
| | | List<CPICMO> cpicmos = erpService.getReadyCPICMO(); |
| | | for (CPICMO cpicmo : cpicmos) { |
| | | |
| | | //同一单号存在相同物料编码数据,该单号不予处理 |
| | | Number fnumberCount = erpService.QueryFnumberCPICMOCount(cpicmo.getFInterID()); |
| | | if(fnumberCount.intValue() > 1){ |
| | | if (!erpService.haveReadCPICMO(cpicmo.getFInterID(),-1)) { |
| | | log.error("标记成品入库通知单已读CPICMO为-1失败[Fnumber={},FInterID={}]", cpicmo.getFnumber(),cpicmo.getFInterID()); |
| | | } |
| | | continue; |
| | | } |
| | | |
| | | MatCode matCode = matCodeService.selectById(cpicmo.getFnumber()); |
| | | if (null != matCode) { |
| | | // 生成入库通知单 |
| | |
| | | log.info("同步更新成品入库通知单CPICMO失败[FBillNo={},Fnumber={}]", waitPakin.getSupplier(), waitPakin.getMatnr()); |
| | | } |
| | | } |
| | | if (!erpService.haveReadCPICMO(cpicmo.getFBillNo())) { |
| | | if (!erpService.haveReadCPICMO(cpicmo.getFInterID(),1)) { |
| | | log.error("标记成品入库通知单已读CPICMO失败[FBillNo={}]", cpicmo.getFBillNo()); |
| | | } |
| | | } |
| | |
| | | List<OutStockBill> outStockBills = erpService.syncOutStock(); |
| | | for (Integer i = 0; i < outStockBills.size(); i++) { |
| | | OutStockBill outStockBill = outStockBills.get(i); |
| | | |
| | | //同一单号存在相同物料编码数据,该单号不予处理 |
| | | Number fnumberCount = erpService.QueryFnumberOutCount(outStockBill.getFInterID()); |
| | | if(fnumberCount.intValue() > 1){ |
| | | if (!erpService.haveReadOutBill(outStockBill.getFBillNo(),outStockBill.getFInterID(),-1)) { |
| | | log.error("更新出库通知单读取状态为-1失败[FBrNo={},FInterID={}]", outStockBill.getFBrNo(),outStockBill.getFInterID()); |
| | | } |
| | | continue; |
| | | } |
| | | |
| | | OutStockBill main = outStockMainService.selectOne(new EntityWrapper<OutStockBill>().eq("FBillNo",outStockBill.getFBillNo()).and().eq("FInterID", outStockBill.getFInterID())); |
| | | if (null == main) { |
| | | outStockBill.setFflag_rw(1); |
| | |
| | | |
| | | } |
| | | |
| | | if (!erpService.haveReadOutBill(outStockBill.getFBillNo(),outStockBill.getFInterID())) { |
| | | if (!erpService.haveReadOutBill(outStockBill.getFBillNo(),outStockBill.getFInterID(),1)) { |
| | | log.error("更新出库通知单读取状态失败[FBrNo={},FInterID={}]", outStockBill.getFBrNo(),outStockBill.getFInterID()); |
| | | } |
| | | } |