cl
2 天以前 b47369fbc73269f0661ba169c6387e04fb037e87
src/main/java/com/zy/asrs/controller/OutStockController.java
@@ -19,6 +19,7 @@
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;
@@ -66,7 +67,10 @@
    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);
    }
    /**
@@ -95,8 +99,8 @@
     */
    @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);
    }
@@ -174,7 +178,8 @@
            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()+"]");
            }