|
|
@ -33,6 +33,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.google.common.util.concurrent.ThreadFactoryBuilder; |
|
|
|
import com.yxt.wms.biz.inventory.wmsinventoryprofitout.WmsInventoryProfitout; |
|
|
|
import com.yxt.wms.biz.inventory.wmsinventoryprofitout.flowable.*; |
|
|
|
import com.yxt.wms.biz.inventory.wmsinventoryrecord.InventoryRecordDto; |
|
|
|
import com.yxt.wms.biz.inventory.wmsinventoryrecord.WmsInventoryRecordService; |
|
|
|
import com.yxt.wms.biz.inventory.wmsotheroutapply.flowable.*; |
|
|
|
import com.yxt.wms.biz.inventory.wmsotheroutdetail.WmsOtheroutDetailDetailsVo; |
|
|
|
import com.yxt.wms.biz.inventory.wmsotheroutdetail.WmsOtheroutDetailDto; |
|
|
@ -92,6 +94,8 @@ public class WmsOtheroutApplyService extends MybatisBaseService<WmsOtheroutApply |
|
|
|
private WmsOtheroutDetailService wmsOtheroutDetailService; |
|
|
|
@Autowired |
|
|
|
private SysUserRoleFeign sysUserRoleFeign; |
|
|
|
@Autowired |
|
|
|
private WmsInventoryRecordService wmsInventoryRecordService; |
|
|
|
|
|
|
|
public PagerVo<WmsOtheroutApplyVo> listPageVo(PagerQuery<WmsOtheroutApplyQuery> pq) { |
|
|
|
WmsOtheroutApplyQuery query = pq.getParams(); |
|
|
@ -274,7 +278,7 @@ public class WmsOtheroutApplyService extends MybatisBaseService<WmsOtheroutApply |
|
|
|
bv.setFormVariables(variables); |
|
|
|
if (r == 1) { |
|
|
|
//ToDo:流程定义id
|
|
|
|
bv.setModelId(ProcDefEnum.WMSINVENTORYPROFITOUT.getProDefId()); |
|
|
|
bv.setModelId(ProcDefEnum.WMSOTHEROUTAPPLY.getProDefId()); |
|
|
|
ResultBean<UpdateFlowFieldVo> voResultBean = flowFeign.startProcess(bv); |
|
|
|
if (!voResultBean.getSuccess()) { |
|
|
|
return rb.setMsg(voResultBean.getMsg()); |
|
|
@ -375,7 +379,44 @@ public class WmsOtheroutApplyService extends MybatisBaseService<WmsOtheroutApply |
|
|
|
UpdateFlowFieldVo ufVo = resultBean.getData(); |
|
|
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|
|
|
if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { |
|
|
|
|
|
|
|
List<WmsOtheroutDetailDetailsVo> wmsOtheroutDetailDetailsVos = wmsOtheroutDetailService.selByMainSid(businessSid); |
|
|
|
for (WmsOtheroutDetailDetailsVo wmsOtheroutDetailDetailsVo : wmsOtheroutDetailDetailsVos) { |
|
|
|
InventoryRecordDto inventoryRecordDto = new InventoryRecordDto(); |
|
|
|
inventoryRecordDto.setCreateBySid(wmsOtheroutApply.getCreateBySid()); |
|
|
|
inventoryRecordDto.setGoodsID(wmsOtheroutDetailDetailsVo.getGoodsID()); |
|
|
|
inventoryRecordDto.setSourceBillSid(businessSid); |
|
|
|
inventoryRecordDto.setBillNo(wmsOtheroutApply.getBillNo()); |
|
|
|
inventoryRecordDto.setBillType("0"); |
|
|
|
inventoryRecordDto.setBusTypeKey("19"); |
|
|
|
inventoryRecordDto.setBusTypeValue("其他出库"); |
|
|
|
inventoryRecordDto.setGoodsSpuSid(wmsOtheroutDetailDetailsVo.getGoodsSpuSid()); |
|
|
|
inventoryRecordDto.setGoodsSpuName(wmsOtheroutDetailDetailsVo.getGoodsSpuName()); |
|
|
|
inventoryRecordDto.setGoodsSkuSid(wmsOtheroutDetailDetailsVo.getGoodsSkuSid()); |
|
|
|
inventoryRecordDto.setGoodsSkuTitle(wmsOtheroutDetailDetailsVo.getGoodsSkuTitle()); |
|
|
|
inventoryRecordDto.setGoodsSkuCode(wmsOtheroutDetailDetailsVo.getGoodsSkuCode()); |
|
|
|
inventoryRecordDto.setGoodsSkuOwnSpec(wmsOtheroutDetailDetailsVo.getGoodsSkuOwnSpec()); |
|
|
|
inventoryRecordDto.setUnit(wmsOtheroutDetailDetailsVo.getUnit()); |
|
|
|
inventoryRecordDto.setCount(wmsOtheroutDetailDetailsVo.getOutCount().toString()); |
|
|
|
inventoryRecordDto.setWarehouseSid(wmsOtheroutDetailDetailsVo.getWarehouseSid()); |
|
|
|
inventoryRecordDto.setWarehouseName(wmsOtheroutDetailDetailsVo.getWarehouseName()); |
|
|
|
inventoryRecordDto.setWarehouseRackSid(wmsOtheroutDetailDetailsVo.getWarehouseRackSid()); |
|
|
|
inventoryRecordDto.setWarehouseRackCode(wmsOtheroutDetailDetailsVo.getWarehouseRackCode()); |
|
|
|
inventoryRecordDto.setCost(wmsOtheroutDetailDetailsVo.getInCost().toString()); |
|
|
|
inventoryRecordDto.setTaxRate(""); |
|
|
|
inventoryRecordDto.setAmount(wmsOtheroutDetailDetailsVo.getOutCount().multiply(wmsOtheroutDetailDetailsVo.getInCost()).toString()); |
|
|
|
inventoryRecordDto.setHandlerSid(wmsOtheroutApply.getCreateBySid()); |
|
|
|
inventoryRecordDto.setHandlerName(wmsOtheroutApply.getCreateByName()); |
|
|
|
inventoryRecordDto.setCreateOrgSid(wmsOtheroutApply.getCreateOrgSid()); |
|
|
|
inventoryRecordDto.setUseOrgSid(wmsOtheroutApply.getDeptSid()); |
|
|
|
inventoryRecordDto.setManufactorBillNo(""); |
|
|
|
inventoryRecordDto.setSupplierSid(""); |
|
|
|
inventoryRecordDto.setSupplierName(""); |
|
|
|
inventoryRecordDto.setManufacturerName(wmsOtheroutDetailDetailsVo.getManufacturerName()); |
|
|
|
inventoryRecordDto.setManufacturerSid(wmsOtheroutDetailDetailsVo.getManufacturerSid()); |
|
|
|
inventoryRecordDto.setPreBillSid(wmsOtheroutDetailDetailsVo.getSid()); |
|
|
|
inventoryRecordDto.setPreBillNo(wmsOtheroutApply.getBillNo()); |
|
|
|
wmsInventoryRecordService.saveInventoryRecord(inventoryRecordDto); |
|
|
|
} |
|
|
|
} else { |
|
|
|
//极光推送
|
|
|
|
wmsOtheroutApply = fetchBySid(businessSid); |
|
|
|