| | |
| | | package com.consum.base.service; |
| | | |
| | | import com.consum.base.Constants; |
| | | import com.consum.base.core.param.BaseWarehouseParam1; |
| | | import com.consum.base.pojo.LWhFormOutputParam; |
| | | import com.consum.base.pojo.LWhFormProcureParam; |
| | | import com.consum.base.util.IdUtil; |
| | | import com.consum.model.po.*; |
| | | import com.iplatform.model.po.S_user_core; |
| | |
| | | int flag5 = 0; |
| | | for (LWhGoodsRecord record : recordList) { |
| | | //根据物品型号查询物品库存 |
| | | int goodsNum = this.lWhGoodsService.queryGoodsModelNum(warehouseId, record.getBaseGoodsModelsId(), (short) 1, null); |
| | | int goodsNum = this.lWhGoodsService.queryGoodsModelNum(0,warehouseId, record.getBaseGoodsModelsId(), (short) 1, null); |
| | | |
| | | //5.新增L_WH_PROCURE_MODEL记录 |
| | | LWhProcureModel lWhProcureModel = new LWhProcureModel(); |
| | |
| | | Long lWarehouseFlowId = this.lWhFormOutputCoreService.outFormByTransId(lWhFormOutput.getId(), currentUser, dateTimeNumber); |
| | | //3.向出库单 插入 进出库流水总表ID |
| | | int flag3 = 0; |
| | | if (flag1 > 0) { |
| | | LWhFormOutput lWhFormOutput1 = new LWhFormOutput(lWhFormOutputId); |
| | | lWhFormOutput1.setWarehouseFlowId(lWarehouseFlowId); |
| | | flag3 = this.update(lWhFormOutput1); |
| | | } |
| | | // lWhFormOutputCoreService.outFormByTransId 中已经更新了 |
| | | // if (flag1 > 0) { |
| | | // LWhFormOutput lWhFormOutput1 = new LWhFormOutput(lWhFormOutputId); |
| | | // lWhFormOutput1.setWarehouseFlowId(lWarehouseFlowId); |
| | | // flag3 = this.update(lWhFormOutput1); |
| | | // } |
| | | |
| | | //如果有一条记录新增失败,则回滚 |
| | | if (flag1 == 0 || flag3 == 0 || flag5 != recordList.size()) { |