|
@@ -2,6 +2,7 @@ package org.jeecg.modules.saleCode.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import org.jeecg.common.util.DateUtils;
|
|
|
import org.jeecg.modules.baseCode.entity.BaseShipArchive;
|
|
|
import org.jeecg.modules.baseCode.mapper.BaseShipArchiveMapper;
|
|
|
import org.jeecg.modules.saleCode.entity.SaleDelivery;
|
|
@@ -47,7 +48,7 @@ public class SaleOrderServiceImpl extends ServiceImpl<SaleOrderMapper, SaleOrder
|
|
|
|
|
|
if(saleOrderShipList!=null && saleOrderShipList.size()>0) {
|
|
|
|
|
|
- List<String> shipIds = saleOrderShipList.stream().map(SaleOrderShip::getId).collect(Collectors.toList());
|
|
|
+ List<String> shipIds = saleOrderShipList.stream().map(SaleOrderShip::getShipId).collect(Collectors.toList());
|
|
|
QueryWrapper<BaseShipArchive> queryShip = new QueryWrapper<>();
|
|
|
queryShip.eq("id",shipIds);
|
|
|
queryShip.eq("del_flag",0);
|
|
@@ -84,10 +85,14 @@ public class SaleOrderServiceImpl extends ServiceImpl<SaleOrderMapper, SaleOrder
|
|
|
}
|
|
|
}
|
|
|
if(saleOrderProductList!=null && saleOrderProductList.size()>0) {
|
|
|
+ int i = 0;
|
|
|
for(SaleOrderProduct entity:saleOrderProductList) {
|
|
|
+ i ++ ;
|
|
|
//外键设置
|
|
|
entity.setId(null);
|
|
|
entity.setHeadId(saleOrder.getId());
|
|
|
+ entity.setCreateTime(DateUtils.getNextTime(i));
|
|
|
+
|
|
|
saleOrderProductMapper.insert(entity);
|
|
|
}
|
|
|
}
|
|
@@ -100,7 +105,7 @@ public class SaleOrderServiceImpl extends ServiceImpl<SaleOrderMapper, SaleOrder
|
|
|
|
|
|
if(saleOrderShipList!=null && saleOrderShipList.size()>0) {
|
|
|
|
|
|
- List<String> shipIds = saleOrderShipList.stream().map(SaleOrderShip::getId).collect(Collectors.toList());
|
|
|
+ List<String> shipIds = saleOrderShipList.stream().map(SaleOrderShip::getShipId).collect(Collectors.toList());
|
|
|
QueryWrapper<BaseShipArchive> queryShip = new QueryWrapper<>();
|
|
|
queryShip.eq("id",shipIds);
|
|
|
queryShip.eq("del_flag",0);
|
|
@@ -161,7 +166,7 @@ public class SaleOrderServiceImpl extends ServiceImpl<SaleOrderMapper, SaleOrder
|
|
|
|
|
|
if(saleOrderShipList!=null && saleOrderShipList.size()>0) {
|
|
|
|
|
|
- List<String> shipIds = saleOrderShipList.stream().map(SaleOrderShip::getId).collect(Collectors.toList());
|
|
|
+ List<String> shipIds = saleOrderShipList.stream().map(SaleOrderShip::getShipId).collect(Collectors.toList());
|
|
|
QueryWrapper<BaseShipArchive> queryShip = new QueryWrapper<>();
|
|
|
queryShip.eq("id",shipIds);
|
|
|
queryShip.eq("del_flag",0);
|