|
@@ -29,7 +29,6 @@ import com.fjhx.wms.service.stock.StockService;
|
|
|
import com.google.common.collect.ImmutableTable;
|
|
|
import com.google.common.collect.Table;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -59,6 +58,8 @@ public class JdOrderDetailsServiceImpl extends ServiceImpl<JdOrderDetailsMapper,
|
|
|
private ProductInfoService productInfoService;
|
|
|
@Resource
|
|
|
private JdOrderMapper jdOrderMapper;
|
|
|
+ @Resource
|
|
|
+ private JdOrderService jdOrderService;
|
|
|
|
|
|
@Override
|
|
|
public List<JdOrderDetailsVo> findListByJdOrderId(Long jdOrderId) {
|
|
@@ -87,6 +88,12 @@ public class JdOrderDetailsServiceImpl extends ServiceImpl<JdOrderDetailsMapper,
|
|
|
|
|
|
List<JdOrderDetails> records = page.getRecords();
|
|
|
List<JdOrderDetailsVo> voList = BeanUtil.copyToList(records, JdOrderDetailsVo.class);
|
|
|
+
|
|
|
+ //赋值源订单信息
|
|
|
+ jdOrderService.attributeAssign(voList, JdOrderDetails::getSourceOrderId, (item, order) -> {
|
|
|
+ item.setSourceOrderCode(order.getOrderId());
|
|
|
+ });
|
|
|
+
|
|
|
Page<JdOrderDetailsVo> voPage = BeanUtil.copyProperties(page, Page.class);
|
|
|
|
|
|
productInfoService.attributeAssign(voList, JdOrderDetails::getProductId, (item, product) -> {
|
|
@@ -114,6 +121,10 @@ public class JdOrderDetailsServiceImpl extends ServiceImpl<JdOrderDetailsMapper,
|
|
|
byId.setHandleTime(new Date());
|
|
|
Long userId = SecurityUtils.getUserId();
|
|
|
byId.setHandleUser(userId);
|
|
|
+
|
|
|
+ //保存源订单id信息(异常处理:仓库已发,补单(不扣库存) 时选择)
|
|
|
+ byId.setSourceOrderId(vo.getSourceOrderId());
|
|
|
+
|
|
|
//对应处理异常详细方法
|
|
|
switch (vo.getExHandle()){
|
|
|
case RunParamConstant.MULTI_CARGO_REDUCE_STOCK:
|