Browse Source

Merge branch 'dev' into pre-production

master
pref_mail@163.com 11 months ago
parent
commit
5baa400ce1
  1. 1
      blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java
  2. 5
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java
  3. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml
  4. 18
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  5. 21
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  6. 71
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java
  7. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java
  8. 11
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml
  9. 3
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java
  10. 142
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

1
blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java

@ -24,6 +24,7 @@ public class OldSystemDataPushConfig {
warehourseIds.add("33");
warehourseIds.add("131");
warehourseIds.add("74");
warehourseIds.add("77");
}

5
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java

@ -28,4 +28,9 @@ public class TrunklineBillladingWaybillVO extends TrunklineBillladingWaybillEnti
private String remark;//备注
private BigDecimal collectPay;//运费
private Integer totalCount;
private Integer stockCount;
private Long billladingWaybillId;
}

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml

@ -14,7 +14,7 @@
</select>
<select id="getFinishNumByWaybillId" resultType="int">
select sum(ltbw.real_num)
select IFNULL(sum(ltbw.real_num),0)
from logpm_trunkline_billlading_waybill ltbw
where ltbw.is_deleted = 0
and ltbw.waybill_id = #{waybillId}
@ -24,6 +24,7 @@
select ltb.billlading_code billadingCode,
ltbw.waybill_id waybillId,
ltbw.waybill_no waybillNo,
ltbw.id billladingWaybillId,
lww.create_time openOrderTime,
lww.goods_name goodsName,
ltbw.real_num realNum,
@ -39,6 +40,8 @@
lww.consignee_mobile consigneeMobile,
lww.consignee_address consigneeAddress,
lww.remark remark,
lww.total_count totalCount,
lww.stock_count stockCount,
ltbw.billlading_fee billladingFee,
lww.collect_pay collectPay
from logpm_trunkline_billlading_waybill ltbw
@ -57,7 +60,7 @@
<select id="getFinishNumByWaybillIdNotBillladingWaybillId" resultType="int">
select sum(ltbw.real_num)
select IFNULL(sum(ltbw.real_num),0)
from logpm_trunkline_billlading_waybill ltbw
where ltbw.is_deleted = 0
and ltbw.waybill_id = #{waybillId}

18
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -698,13 +698,14 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
return R.fail(405,"运单保存失败");
}
List<TrunklineAdvanceEntity> advanceEntityList = advanceService.findListByIds(advanceIds);
for (TrunklineAdvanceEntity advanceEntity : advanceEntityList) {
advanceEntity.setWaybillNo(waybillNo);
advanceEntity.setWaybillStatus("1");
if(advanceIds != null && advanceIds.size() > 0){
List<TrunklineAdvanceEntity> advanceEntityList = advanceService.findListByIds(advanceIds);
for (TrunklineAdvanceEntity advanceEntity : advanceEntityList) {
advanceEntity.setWaybillNo(waybillNo);
advanceEntity.setWaybillStatus("1");
}
advanceService.updateBatchById(advanceEntityList);
}
advanceService.updateBatchById(advanceEntityList);
//异步存入日志
String nickName = AuthUtil.getNickName();
@ -2746,8 +2747,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
distributionStockArticleEntity.setWarehouseEntryTime(date);
distributionStockArticleEntity.setTotalNumber(warehouseWaybill.getTotalCount());
distributionStockArticleEntity.setHandQuantity(warehouseWaybill.getStockCount());
distributionStockArticleEntity.setIncomingNum(warehouseWaybill.getStockCount());
//零担订单默认齐套
distributionStockArticleEntity.setCompleteSet(1);
distributionStockArticleEntity.setCompleteSet(2);
distributionStockArticleEntity.setBrand(warehouseWaybill.getBrand());
distributionStockArticleEntity.setResource("零担");
@ -2833,7 +2835,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
parcelNumberEntity.setStockArticleId(orderId);
parcelNumberEntity.setWarehouseId(entity.getWarehouseId());
parcelNumberEntity.setParcelListId(aLong);
parcelNumberEntity.setHandQuantity(entity.getQuantity());
parcelNumberEntity.setHandQuantity(0);
parcelNumberEntity.setQuantity(entity.getQuantity());
parcelNumberEntity.setDeliveryQuantity(0);
parcelNumberEntity.setSigninQuantity(0);

21
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -11,8 +11,10 @@ import com.logpm.basicdata.feign.IBasicdataDriverArteryClient;
import com.logpm.basicdata.feign.IBasicdataTrayClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.feign.IDistributionParcelListClient;
import com.logpm.distribution.feign.IDistributionParcelNumberClient;
import com.logpm.distribution.feign.IDistributionStockArticleClient;
import com.logpm.trunkline.bean.Resp;
import com.logpm.trunkline.dto.*;
@ -82,6 +84,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
private final ICarsLoadAsyncService carsLoadAsyncService;
private final IOpenOrderAsyncService openOrderAsyncService;
private final IDistributionParcelNumberClient distributionParcelNumberClient;
@Override
public IPage<TrunklineCarsLoadVO> loadCarsPageList(LoadCarsDTO loadCarsDTO) {
@ -4397,12 +4400,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newStockArticleEntity.setOrderReceiveStatus("20");
newStockArticleEntity.setOrderStatus("10");
newStockArticleEntity.setHandQuantity(enterNun);
newStockArticleEntity.setIncomingNum(stockArticleEntity.getIncomingNum());
newStockArticleEntity.setIncomingNum(enterNun);
newStockArticleEntity.setWarehouse(basicdataWarehouseEntity.getName());
newStockArticleEntity.setWarehouseId(basicdataWarehouseEntity.getId());
newStockArticleEntity.setCarsLoadNum(0);
Long orderId = distributionStockArticleClient.addData(newStockArticleEntity);
if(orderId != 0){
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findEntityListByOrderCode(orderCode, fromWarehouseId);
List<DistributionParcelNumberEntity> ls = new ArrayList<>();
for (DistributionParcelListEntity parcelListEntity : parcelListEntityList) {
DistributionParcelListEntity newParcelListEntity = new DistributionParcelListEntity();
BeanUtil.copy(parcelListEntity,newParcelListEntity);
@ -4410,8 +4415,20 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newParcelListEntity.setWarehouseId(warehouseId);
newParcelListEntity.setWarehouse(warehouseName);
newParcelListEntity.setStockArticleId(orderId);
distributionParcelListClient.add(newParcelListEntity);
Long orderPackageId = distributionParcelListClient.addReturnId(newParcelListEntity);
DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity();
parcelNumberEntity.setStockArticleId(orderId);
parcelNumberEntity.setParcelListId(orderPackageId);
parcelNumberEntity.setQuantity(newParcelListEntity.getQuantity());
parcelNumberEntity.setHandQuantity(0);
parcelNumberEntity.setDeliveryQuantity(0);
parcelNumberEntity.setSigninQuantity(0);
parcelNumberEntity.setOutboundQuantity(0);
parcelNumberEntity.setWarehouseId(warehouseId);
ls.add(parcelNumberEntity);
}
distributionParcelNumberClient.addBatch(ls);
}
}else{
Integer handQuantity = newStockArticleEntity.getHandQuantity()+enterNun;

71
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java

@ -22,7 +22,6 @@ import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.feign.IDistributionStockArticleClient;
import com.logpm.warehouse.dto.ProductDTO;
import com.logpm.warehouse.dto.SplitOrderDTO;
import com.logpm.warehouse.dto.WarehouseWaybillDTO;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
@ -202,33 +201,33 @@ public class WarehouseWaybillController extends BladeController {
}
Integer state = Integer.parseInt(distributionStockArticleEntity.getOrderStatus());//订单状态
Long orderId = distributionStockArticleEntity.getId();//订单id
if (state > 30) {
log.warn("################splitOrder: 当前在库订单已进入配送流程,不能拆单 waybillNo={}", waybillNo);
return R.fail(405, "当前在库订单已进入配送流程");
}
// Integer state = Integer.parseInt(distributionStockArticleEntity.getOrderStatus());//订单状态
// Long orderId = distributionStockArticleEntity.getId();//订单id
// if (state > 30) {
// log.warn("################splitOrder: 当前在库订单已进入配送流程,不能拆单 waybillNo={}", waybillNo);
// return R.fail(405, "当前在库订单已进入配送流程");
// }
//判断拆单后的数值是否等于总数量
Integer total = new Integer("0");
for (SplitOrderDTO splitOrderDTO : splitOrderDTOList) {
List<ProductDTO> products = splitOrderDTO.getProducts();
for (ProductDTO productDTO : products) {
Integer splitNum = productDTO.getSplitNum();
if (!Objects.isNull(splitNum)) {
total = total + splitNum;
}
}
}
if (stockCount < total) {
log.warn("################splitOrder: 拆单数量不能小于在库数量 waybillNo={}", waybillNo);
return R.fail(405, "拆单数量不能小于在库数量");
}
// Integer total = new Integer("0");
// for (SplitOrderDTO splitOrderDTO : splitOrderDTOList) {
// List<ProductDTO> products = splitOrderDTO.getProducts();
// for (ProductDTO productDTO : products) {
// Integer splitNum = productDTO.getSplitNum();
// if (!Objects.isNull(splitNum)) {
// total = total + splitNum;
// }
// }
// }
// if (stockCount < total) {
// log.warn("################splitOrder: 拆单数量不能小于在库数量 waybillNo={}", waybillNo);
// return R.fail(405, "拆单数量不能小于在库数量");
// }
try {
//拆单操作
warehouseWaybillService.splitOrder(splitOrderDTOList, distributionStockArticleEntity);
//拆单完成去把以前的订单逻辑删除
distributionStockArticleClient.deleteById(orderId);
// distributionStockArticleClient.deleteById(orderId);
return R.success("拆单成功");
} catch (CustomerException e) {
@ -313,4 +312,32 @@ public class WarehouseWaybillController extends BladeController {
}
}
@ResponseBody
@PostMapping("/findWaybillBillladingList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查询运单信息", notes = "传入waybillDTO")
public R findWaybillBillladingList(@RequestBody WarehouseWaybillDTO waybillDTO) {
String method = "############findWaybillBillladingList: ";
log.info(method + "请求参数{}", waybillDTO);
String waybillNo = waybillDTO.getWaybillNo();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(403,"仓库信息为空");
}
return warehouseWaybillService.findWaybillBillladingList(waybillNo,myCurrentWarehouse.getId());
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
}

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java

@ -54,4 +54,6 @@ public interface WarehouseWaybillMapper extends BaseMapper<WarehouseWaybillEntit
List<String> findMoreWaybillNo();
Long findLastData(@Param("waybillNo") String waybillNo);
List<WarehouseWaybillEntity> findWaybillBillladingList(@Param("waybillNo") String waybillNo,@Param("warehouseId") Long warehouseId);
}

11
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

@ -171,4 +171,15 @@
</select>
<select id="findWaybillBillladingList" resultType="com.logpm.warehouse.entity.WarehouseWaybillEntity">
select *
from logpm_warehouse_waybill
where 1=1
and (departure_warehouse_id = #{warehouseId} or destination_warehouse_id = #{warehouseId})
<if test="waybillNo != null and waybillNo != '' ">
and Locate(#{waybillNo},waybill_no)
</if>
limit 10
</select>
</mapper>

3
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java

@ -56,4 +56,7 @@ public interface IWarehouseWaybillService extends BaseService<WarehouseWaybillEn
List<String> findMoreWaybillNo();
Long findLastData(String waybillNo);
R findWaybillBillladingList(String waybillNo,Long warehouseId);
}

142
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -154,21 +154,6 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
warehouseWayBillDetailService.addList(ls);
//createStockArticle(warehouseWaybill);
} else {
Integer totalCount = warehouseWaybill.getTotalCount();
Integer stockCount = warehouseWaybill.getStockCount();
if (totalCount.compareTo(stockCount + allNum) < 0) {
log.warn("##############waybillDataHandler: 运单的总数量异常 totalCount={} stockCount={} allNum={}", totalCount, stockCount, allNum);
throw new CustomerException("运单的总数量异常");
}
warehouseWaybill.setStockCount(stockCount + allNum);
warehouseWaybill.setUpdateTime(date);
warehouseWaybillMapper.updateById(warehouseWaybill);
// //修改在库订单的在库数量
// DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findByOrderSelfNum(waybillNo);
// distributionStockArticleClient.addHandQuantity(stockArticleEntity.getId(), allNum);
// waybillId = warehouseWaybill.getId();
//判断是否需要创建在库订单
}
//创建在库订单
createStockArticle(warehouseWaybill,allNum);
@ -207,7 +192,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
distributionStockArticleEntity.setWarehouse(basicdataWarehouseEntity.getName());
distributionStockArticleEntity.setWarehouseEntryTime(date);
distributionStockArticleEntity.setTotalNumber(totalCount);
distributionStockArticleEntity.setHandQuantity(stockCount);
distributionStockArticleEntity.setHandQuantity(allNum);
//零担订单默认齐套
distributionStockArticleEntity.setCompleteSet(1);
@ -310,11 +295,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
parcelNumberEntity.setCreateUser(distributionStockArticleEntity.getCreateUser());
parcelNumberEntity.setUpdateUser(distributionStockArticleEntity.getCreateUser());
parcelNumberEntity.setCreateDept(distributionStockArticleEntity.getCreateDept());
if(totalCount.equals(stockCount)){
parcelNumberEntity.setHandQuantity(entity.getQuantity());
}else{
parcelNumberEntity.setHandQuantity(0);
}
parcelNumberEntity.setHandQuantity(0);
parcelNumberEntity.setQuantity(entity.getQuantity());
parcelNumberEntity.setDeliveryQuantity(0);
parcelNumberEntity.setSigninQuantity(0);
@ -328,9 +309,9 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
} else {
id = distributionStockArticleEntity.getId();
Integer handQuantity = distributionStockArticleEntity.getHandQuantity();
distributionStockArticleEntity.setTotalNumber(totalCount);
distributionStockArticleEntity.setHandQuantity(stockCount);
distributionStockArticleEntity.setHandQuantity(handQuantity+allNum);
distributionStockArticleEntity.setWarehouseEntryTimeEnd(date);
log.info(">>>> 更新订单");
checkStatus(distributionStockArticleEntity);
@ -425,14 +406,12 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
}
String orderCode = distributionStockArticleEntity.getOrderCode();
Long orderId = distributionStockArticleEntity.getId();
Long warehouseId = distributionStockArticleEntity.getWarehouseId();
List<ProductDTO> submitList = new ArrayList<>();
List<DistributionStockArticleEntity> articleList = distributionStockArticleClient.findListByOrderCodeLike(orderCode);
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findEntityListByOrderCode(orderCode, warehouseId);
int size = articleList.size();
Integer subNum = 0;
for (int i = 0; i < splitOrderDTOList.size(); i++) {
List<DistributionStockArticleEntity> articleList = distributionStockArticleClient.findListByOrderCodeLike(orderCode);
int size = articleList.size();
SplitOrderDTO splitOrderDTO = splitOrderDTOList.get(i);
DistributionStockArticleEntity entity = new DistributionStockArticleEntity();
BeanUtil.copyProperties(distributionStockArticleEntity, entity);
@ -444,36 +423,31 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
List<ProductDTO> products = splitOrderDTO.getProducts();
StringBuffer stringBuffer = new StringBuffer();
Integer allNum = 0;
List<DistributionParcelListEntity> list = new ArrayList<>();
for (ProductDTO productDTO : products) {
Integer splitNum = productDTO.getSplitNum();
if (Objects.isNull(splitNum) || splitNum <= 0) {
log.info("#########splitOrder: 该条物料数量值不正确");
continue;
}
if (StringUtil.isBlank(stringBuffer.toString())) {
stringBuffer.append(productDTO.getProductName());
} else {
stringBuffer.append(",").append(productDTO.getProductName());
}
allNum = allNum + productDTO.getSplitNum();
DistributionParcelListEntity distributionParcelListEntity = new DistributionParcelListEntity();
DistributionParcelListEntity distributionParcelListEntity1 = parcelListEntityList.get(0);
BeanUtil.copyProperties(distributionParcelListEntity1, distributionParcelListEntity);
distributionParcelListEntity.setId(null);
distributionParcelListEntity.setFirsts(productDTO.getProductName());
distributionParcelListEntity.setQuantity(productDTO.getSplitNum());
list.add(distributionParcelListEntity);
submitList.add(productDTO);
Integer splitNum = productDTO.getSplitNum();
if(Objects.isNull(splitNum)){
splitNum = 0;
}
allNum = allNum + splitNum;
}
subNum = subNum + allNum;
entity.setDescriptionGoods(stringBuffer.toString());
entity.setTotalNumber(allNum);
entity.setHandQuantity(allNum);
entity.setIncomingNum(allNum);
//处理-1的值
entity.setNotification(2);
entity.setFee(BigDecimal.ZERO);
entity.setRate(BigDecimal.ZERO);
entity.setAdvanceId(null);
entity.setGroundingStatus("10");
entity.setFreezeStatus("10");
entity.setOrderStatus("20");
entity.setReservationNum(0);
entity.setCollectFee(BigDecimal.ZERO);
entity.setStorageFee(BigDecimal.ZERO);
@ -494,55 +468,37 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
if (aLong == 0) {
log.warn("###########splitOrder: 保存新订单数据失败");
throw new CustomerException(405, "保存新订单数据失败");
}
for (DistributionParcelListEntity distributionParcelListEntity : list) {
distributionParcelListEntity.setStockArticleId(aLong);
}
boolean b = distributionParcelListClient.addBatch(list);
if (!b) {
log.warn("###########splitOrder: 保存包件数据失败");
throw new CustomerException(405, "保存包件数据失败");
}
List<DistributionParcelNumberEntity> parcelNumberList = new ArrayList<>();
for (DistributionParcelListEntity distributionParcelListEntity : list) {
DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity();
parcelNumberEntity.setStockArticleId(distributionParcelListEntity.getStockArticleId());
parcelNumberEntity.setParcelListId(distributionParcelListEntity.getId());
parcelNumberEntity.setHandQuantity(distributionParcelListEntity.getQuantity());
parcelNumberEntity.setQuantity(distributionParcelListEntity.getQuantity());
parcelNumberEntity.setDeliveryQuantity(0);
parcelNumberEntity.setSigninQuantity(0);
parcelNumberEntity.setOutboundQuantity(0);
parcelNumberList.add(parcelNumberEntity);
}
//存入零担订单包件数量
distributionParcelNumberClient.addBatch(parcelNumberList);
//减少主订单上在库数量
if (handQuantity - allNum < 0) {
log.warn("###########splitOrder: 拆单数量大于在库数量");
throw new CustomerException(405, "拆单数量大于在库数量");
}
distributionStockArticleEntity.setHandQuantity(handQuantity - allNum);
distributionStockArticleClient.submitHandQuantity(allNum, articleId);
// String orderSelfNumbering = distributionStockArticleEntity.getOrderCode();
// warehouseWaybillMapper.submitStockCount(orderSelfNumbering, allNum);
//删除主订单包件对应数据
for (ProductDTO productDTO : submitList) {
String productName = productDTO.getProductName();
Integer num = productDTO.getSplitNum();
boolean submitFlag = distributionParcelListClient.submitNumByOrderIdAndName(articleId, productName, num);
if (!submitFlag) {
log.warn("###########splitOrder: 减掉包件数量失败 articleId={},productName={},num={}", articleId, productName, num);
throw new CustomerException(405, "减掉包件数量失败");
}else{
List<DistributionParcelNumberEntity> parcelNumberList = new ArrayList<>();
for (ProductDTO productDTO : products) {
Integer splitNum = productDTO.getSplitNum();
if(Objects.isNull(splitNum)){
splitNum = 0;
}
DistributionParcelListEntity distributionParcelListEntity = new DistributionParcelListEntity();
DistributionParcelListEntity distributionParcelListEntity1 = parcelListEntityList.get(0);
BeanUtil.copyProperties(distributionParcelListEntity1, distributionParcelListEntity);
distributionParcelListEntity.setId(null);
distributionParcelListEntity.setStockArticleId(aLong);
distributionParcelListEntity.setFirsts(productDTO.getProductName());
distributionParcelListEntity.setQuantity(splitNum);
Long orderPackageId = distributionParcelListClient.addReturnId(distributionParcelListEntity);
DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity();
parcelNumberEntity.setStockArticleId(aLong);
parcelNumberEntity.setParcelListId(orderPackageId);
parcelNumberEntity.setHandQuantity(0);
parcelNumberEntity.setQuantity(distributionParcelListEntity.getQuantity());
parcelNumberEntity.setDeliveryQuantity(0);
parcelNumberEntity.setSigninQuantity(0);
parcelNumberEntity.setOutboundQuantity(0);
parcelNumberList.add(parcelNumberEntity);
}
subNum = subNum + num;
//存入零担订单包件数量
distributionParcelNumberClient.addBatch(parcelNumberList);
}
size++;
}
//减去零担零担上的在库件数
// distributionStockArticleClient.submitHandleNumByOrderId(subNum,articleId);
distributionStockArticleClient.submitHandleNumByOrderId(subNum,articleId);
}
@ -602,7 +558,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
warehouseWaybill.setDestination(wayBillEntity.getArriveSite());
warehouseWaybill.setGoodsName(packname);
warehouseWaybill.setTotalCount(number);
warehouseWaybill.setStockCount(allNum);
warehouseWaybill.setStockCount(number);
warehouseWaybill.setTotalWeight(wayBillEntity.getWeight());
warehouseWaybill.setTotalVolume(wayBillEntity.getVolume());
warehouseWaybill.setDeliveryMethod(wayBillEntity.getSendType());
@ -786,4 +742,12 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
public Long findLastData(String waybillNo) {
return baseMapper.findLastData(waybillNo);
}
@Override
public R findWaybillBillladingList(String waybillNo,Long warehouseId) {
List<WarehouseWaybillEntity> list = baseMapper.findWaybillBillladingList(waybillNo,warehouseId);
return R.data(list);
}
}

Loading…
Cancel
Save