| | |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.common.service.erp.ErpService; |
| | | import com.zy.common.service.erp.entity.OutStockBillEntry; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private WaitPakinLogService waitPakinLogService; |
| | | @Autowired |
| | | private ErpService erpService; |
| | | @Autowired |
| | | private OutStockService outStockService; |
| | | |
| | | @GetMapping("/test1") |
| | | public String test1(String barcode){ |
| | |
| | | waitPakinService.delete(wrapper); |
| | | } |
| | | |
| | | // erp关联出库订单处理 |
| | | if (wrkMast.getIoType() == 101) { |
| | | EntityWrapper<WrkDetl> wrapper = new EntityWrapper<>(); |
| | | // 获取工作档内物料清单 |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectList(wrapper.eq("wrk_no", wrkMast.getWrkNo()).and().isNotNull("supplier")); |
| | | for (WrkDetl wrkDetl: wrkDetls) { |
| | | if (!Cools.isEmpty(wrkDetl.getMemo())) { |
| | | if (wrkDetl.getMemo().equals("原材料")) { |
| | | // 待实现 |
| | | } else if (wrkDetl.getMemo().equals("成品")) { |
| | | Integer FInterI = outStockService.queryOutStockFInterID(wrkDetl.getSupplier()); // 获取出库单主表主键 |
| | | if (!erpService.incrementCPakOut(FInterI, wrkDetl.getMatnr(), wrkDetl.getAnfme(), wrkDetl.getSupplier())) { |
| | | exceptionHandle("更新ERP成品出库数据[matnr={0}]失败", wrkDetl.getMatnr()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 保存工作主档历史档 |
| | | if (!wrkMastLogService.save(wrkMast.getWrkNo())) { |
| | | exceptionHandle("保存工作历史档[workNo={0}]失败", wrkMast.getWrkNo()); |