| | |
| | | import com.zy.asrs.service.WorkService; |
| | | import com.zy.asrs.utils.VersionUtils; |
| | | import com.zy.common.service.erp.ErpService; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.zy.common.service.erp.entity.OutStockBill; |
| | | import com.zy.common.service.erp.entity.OutStockBillEntry; |
| | | import com.zy.common.web.BaseController; |
| | |
| | | public R outStockQueryList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | return R.ok(outStockService.queryOutStock(toPage(curr, limit, param, OutStockBillEntry.class))); |
| | | Page<OutStockBillEntry> page = outStockService.queryOutStock(toPage(curr, limit, param, OutStockBillEntry.class)); |
| | | log.info("outStock/query/list 查询条件 FBillNo={}, FSourceBillNo={}, curr={}, limit={}, 结果 total={}, 本页条数={}(数据来源:WMS库xtyasrs,条件:Fflag_finish!=1 且 FQty>FAmount)", |
| | | param.get("FBillNo"), param.get("FSourceBillNo"), curr, limit, page.getTotal(), page.getRecords() != null ? page.getRecords().size() : 0); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RequestMapping(value = "/outStock/query/locNormalList") |
| | | @ManagerAuth |
| | | public R queryMatWithLocNormal(String fbillNo, String mnemonic) { |
| | | List<LocNormal> list = locNormalService.queryLocNorlMatnr(fbillNo, mnemonic); |
| | | public R queryMatWithLocNormal(String fbillNo, String mnemonic,String matnr) { |
| | | List<LocNormal> list = locNormalService.queryLocNorlMatnr(fbillNo, mnemonic,matnr); |
| | | return R.ok(list); |
| | | } |
| | | |
| | |
| | | Wrapper wrapper = new EntityWrapper<OutStockBillEntry>().eq("FInterID",FInterI).eq("Fnumber",locNormals.getMatnr()); |
| | | OutStockBillEntry outStockBillEntry = outStockService.selectOne(wrapper); |
| | | outStockBillEntry.setFAuxCommitQty(outStockBillEntry.getFAuxCommitQty().add(locNormals.getAnfme())); |
| | | outStockBillEntry.setFAmount(outStockBillEntry.getFAmount().add(locNormals.getAnfme())); //借用amount字段,控制下发出库任务数量 |
| | | outStockBillEntry.setFAmount(outStockBillEntry.getFAmount().add(locNormals.getAnfme())); //借用famount字段,控制下发出库任务数量 |
| | | outStockBillEntry.setFAuxQty(outStockBillEntry.getFAuxQty().subtract(locNormals.getAnfme())); |
| | | if(!outStockService.update(outStockBillEntry,wrapper)){ |
| | | throw new CoolException("更新出库通知档明细失败[FInterID="+FInterI+",Fnumber="+locNormals.getMatnr()+"]"); |
| | | } |
| | |
| | | // erp中间表更新数据 |
| | | if (!erpService.incrementCPakOut(FInterI, locNormals.getMatnr(), locNormals.getAnfme().doubleValue(), param.getSupplier())) { |
| | | log.error("更新ERP成品出库数据[matnr={},FBillNo={}]失败", locNormals.getMatnr(), param.getSupplier()); |
| | | throw new CoolException("更新ERP成品出库数据[matnr=" + locNormals.getMatnr() + ",FBillNo=" + param.getSupplier() + "]失败"); |
| | | } |
| | | |
| | | } |