|
@@ -3,6 +3,7 @@ package com.steerinfo.dil.service.impl;
|
|
import com.steerinfo.dil.feign.TmstruckFeign;
|
|
import com.steerinfo.dil.feign.TmstruckFeign;
|
|
import com.steerinfo.dil.mapper.WmspOutboundResultMapper;
|
|
import com.steerinfo.dil.mapper.WmspOutboundResultMapper;
|
|
import com.steerinfo.dil.mapper.WmspOutboundScanResultMapper;
|
|
import com.steerinfo.dil.mapper.WmspOutboundScanResultMapper;
|
|
|
|
+import com.steerinfo.dil.model.WmspInboundResult;
|
|
import com.steerinfo.dil.model.WmspOutboundResult;
|
|
import com.steerinfo.dil.model.WmspOutboundResult;
|
|
import com.steerinfo.dil.model.WmspOutboundScanResult;
|
|
import com.steerinfo.dil.model.WmspOutboundScanResult;
|
|
import com.steerinfo.dil.service.IWmspOutboundResultService;
|
|
import com.steerinfo.dil.service.IWmspOutboundResultService;
|
|
@@ -36,6 +37,8 @@ public class WmspOutboundResultServiceImpl implements IWmspOutboundResultServic
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private WmspOutboundScanResultMapper wmspOutboundScanResultMapper;
|
|
private WmspOutboundScanResultMapper wmspOutboundScanResultMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WmsInboundResultServiceImpl wmsInboundResultService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private TmstruckFeign tmstruckFeign;
|
|
private TmstruckFeign tmstruckFeign;
|
|
@@ -179,13 +182,17 @@ public class WmspOutboundResultServiceImpl implements IWmspOutboundResultServic
|
|
// 设置出库实绩为成功、将出库实绩改完已经出库
|
|
// 设置出库实绩为成功、将出库实绩改完已经出库
|
|
WmspOutboundResult wmspOutboundResult = wmspOutboundResultMapper.selectByPrimaryKey(new BigDecimal(resultId));
|
|
WmspOutboundResult wmspOutboundResult = wmspOutboundResultMapper.selectByPrimaryKey(new BigDecimal(resultId));
|
|
wmspOutboundResult.setResultStatus(new BigDecimal(1));
|
|
wmspOutboundResult.setResultStatus(new BigDecimal(1));
|
|
- result += wmspOutboundResultMapper.updateByPrimaryKeySelective(wmspOutboundResult);
|
|
|
|
|
|
+
|
|
// 调用装货
|
|
// 调用装货
|
|
BigDecimal orderId = wmspOutboundResult.getBillLadingId();
|
|
BigDecimal orderId = wmspOutboundResult.getBillLadingId();
|
|
//result += tmstruckFeign.addSaleLoadResult(orderId.intValue());
|
|
//result += tmstruckFeign.addSaleLoadResult(orderId.intValue());
|
|
// 修改实时库存(逻辑删除) grid
|
|
// 修改实时库存(逻辑删除) grid
|
|
BigDecimal materialId = wmspOutboundResult.getMaterialId();
|
|
BigDecimal materialId = wmspOutboundResult.getMaterialId();
|
|
- result += wmspOutboundResultMapper.updateGrid(materialId);
|
|
|
|
|
|
+// 创建一个方法用来修改入库实绩id的状态和仓储网格的状态,当且仅当返回值为2的时候是成功的
|
|
|
|
+ if (wmsInboundResultService.updateInboundGridStatus(resultId)%2 == 0){
|
|
|
|
+ result += wmspOutboundResultMapper.updateByPrimaryKeySelective(wmspOutboundResult);
|
|
|
|
+ result += wmspOutboundResultMapper.updateGrid(materialId);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|