Browse Source

Merge remote-tracking branch 'origin/fix_bug_20240104' into fix_bug_20240104

single_db
汤建军 1 year ago
parent
commit
ef6d645ecf
  1. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java
  2. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java
  3. 53
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineWaybillPackageEntity.java
  4. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java
  5. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  6. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java
  7. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  8. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  9. 23
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  10. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java
  11. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  12. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java
  13. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  14. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  15. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  16. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  17. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  18. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  19. 49
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java
  20. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  21. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  22. 8
      blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/feign/MtOrderMainClinet.java
  23. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java
  24. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml
  25. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillPacakgeMapper.xml
  26. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillPackageMapper.java
  27. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineWaybillPackageService.java
  28. 22
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  29. 11
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java
  30. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java
  31. 19
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingWaybillServiceImpl.java
  32. 42
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillPackageServiceImpl.java

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java

@ -372,6 +372,8 @@ public class DistributionParcelListEntity extends TenantEntity {
@ApiModelProperty(value = "体积")
private BigDecimal volume;//体积
@ApiModelProperty(value = "是否中转")
private Integer isTransfer;//是否中转
// /**
// * 配送状态

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java

@ -129,4 +129,6 @@ public interface IDistributionParcelListClient {
@GetMapping(API_PREFIX+"/findByOrderInfoByOrderPackageCodeAndWarehouseId")
Map<String,Object> findByOrderInfoByOrderPackageCodeAndWarehouseId(@RequestParam String orderPackCode,@RequestParam Long warehouseId);
@GetMapping(API_PREFIX+"/updateTransferStatus")
void updateTransferStatus(@RequestParam String orderCode, @RequestParam Long warehouseId, @RequestParam Integer isTransfer);
}

53
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineWaybillPackageEntity.java

@ -0,0 +1,53 @@
package com.logpm.trunkline.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@Data
@TableName("logpm_trunkline_waybill_package")
@ApiModel(value = "TrunklineWaybillPackage对象", description = "运单包件关联表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineWaybillPackageEntity extends TenantEntity {
/** 预留1 */
@ApiModelProperty(name = "预留1",notes = "")
private String reserve1 ;
/** 预留2 */
@ApiModelProperty(name = "预留2",notes = "")
private String reserve2 ;
/** 预留3 */
@ApiModelProperty(name = "预留3",notes = "")
private String reserve3 ;
/** 预留4 */
@ApiModelProperty(name = "预留4",notes = "")
private String reserve4 ;
/** 预留5 */
@ApiModelProperty(name = "预留5",notes = "")
private String reserve5 ;
/** 运单id */
@ApiModelProperty(name = "运单id",notes = "")
private Long waybillId;
/** 运单号 */
@ApiModelProperty(name = "运单号",notes = "")
private String waybillNo;
/** 暂存单包件id */
@ApiModelProperty(name = "暂存单包件id",notes = "")
private Long advanceDetailId;
/** 包件码 */
@ApiModelProperty(name = "包件码",notes = "")
private String orderPackageCode;
/** 是否签收 */
@ApiModelProperty(name = "是否签收",notes = "")
private Integer isSignfor;
/** 暂存单id */
@ApiModelProperty(name = "暂存单id",notes = "")
private Long advanceId;
/** 订单自编号 */
@ApiModelProperty(name = "订单自编号",notes = "")
private String orderCode;
}

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java

@ -173,7 +173,7 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
}
return warehouseCode+"TH"+dateShort+CommonUtil.geFourNumber(incr,5);
return warehouseCode+"TH"+CommonUtil.geFourNumber(incr,5);
}
private String generateExOrderCode(Integer type, String warehouseCode, String orderCode) {

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

@ -1425,7 +1425,7 @@ public class DistributionStockupAppController extends BladeController {
entity.setOutboundType(stockupEntity.getTypeService());
distributionStockService.save(entity);
// //修改备货时间
// distributionAsyncService.updateStockupDate(stockupDTO);
distributionAsyncService.updateStockupStockListDate(stockupDTO);
// dataSourceTransactionManager.commit(transactionStatus);//提交
Map<String, Object> map = new HashMap<>();

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java

@ -259,4 +259,11 @@ public class DistributionParcelListClient implements IDistributionParcelListClie
}
@Override
public void updateTransferStatus(String orderCode, Long warehouseId,Integer isTransfer) {
distributionParcelListService.updateTransferStatus(orderCode,warehouseId,isTransfer);
}
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -757,7 +757,7 @@
logpm_distribution_delivery_list lddl
left join logpm_distribution_delivery_self ldds on lddl.id =ldds.delivery_id
<where>
lddl.is_deleted =0 and lddl.warehourse_id =#{warehouseId}
lddl.is_deleted =0 and lddl.warehouse_id =#{warehouseId}
<if test=" param.type != null and param.type != ''">and lddl.type = #{param.type}</if>
<if test="array != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(array)">
and lddl.id in

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java

@ -165,4 +165,6 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
* @return
*/
int updateOrderPackageInceptionStatus(@Param("packageIds") List<Long> packageIds);
void updateTransferStatus(@Param("orderCode") String orderCode, @Param("warehouseId") Long warehouseId, @Param("isTransfer") Integer isTransfer);
}

23
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -250,6 +250,9 @@
<if test="param.orderPackageStatus !='' and param.orderPackageStatus != null">
and ldpl.order_package_status = #{param.orderPackageStatus}
</if>
<if test="param.waybillNumber != '' and param.waybillNumber != null ">
and ldpl.waybill_number = #{param.waybillNumber}
</if>
</where>
@ -319,18 +322,17 @@
<select id="selectOrderInfoSelfList" resultType="com.logpm.distribution.vo.PackageStockupVO">
select DISTINCT ldpl.order_code orderCode,ldpl.order_package_code packageBarCode,ldpl.conditions
goodsType,ldpl.material_name materialName,
CASE WHEN lds.id IS NULL THEN 0 ELSE 1 END AS isScan,ldpl.id parceListId,(
select GROUP_CONCAT( DISTINCT position_code)
from logpm_warehouse_updown_goods
where association_id = ldpl.id
) positionCode,lds.allocation_id allocationId
CASE WHEN lds.id IS NULL THEN 0 ELSE 1 END AS isScan,ldpl.id parceListId,
lwug.position_code positionCode,
lwug.allocation_id allocationId
from logpm_distrilbution_bill_package ldbp
LEFT JOIN logpm_distribution_parcel_list ldpl on ldbp.parce_list_id = ldpl.id and ldbp.packet_bar_status in (1,3) and ldbp.packet_bar_code is not null
LEFT JOIN logpm_distribution_stock lds on lds.parcel_list_id = ldpl.id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id
LEFT JOIN logpm_distribution_stock lds ON lds.parcel_list_id = lwug.association_id
<where>
ldpl.conditions = '1'
<if test="param.allocationId != null and param.allocationId != ''">and lds.allocation_id =
<if test="param.allocationId != null and param.allocationId != ''">and lwug.allocation_id =
#{param.allocationId}
</if>
<if test="param.stockArticleId != null and param.stockArticleId != ''">and ldpl.stock_article_id =
@ -1049,4 +1051,11 @@
and warehouse_id = #{warehouseId}
</update>
<update id="updateTransferStatus">
update logpm_distribution_parcel_list
set is_transfer = #{isTransfer}
where order_code = #{orderCode}
and warehouse_id = #{warehouseId}
</update>
</mapper>

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java

@ -51,6 +51,12 @@ public interface DistributionStockupMapper extends BaseMapper<DistributionStocku
*/
List<DistributionStockupVO> selectDistributionStockupPage(IPage page, DistributionStockupVO distributionStockup);
/**
* 查询备货数据
* @param page
* @param distributionStockupEntity
* @return
*/
IPage<DistributionStockupEntity> pageList(IPage<Object> page,@Param("param") DistributionStockupEntity distributionStockupEntity);
IPage<DistributionStockupListVO> selectStockupPage(IPage<Object> page, @Param("param") StockupDTO stockupDTO);

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -927,7 +927,7 @@
from logpm_warehouse_updown_goods
where association_id = ldsii.material_id and association_type = 4 and market_id =ldsii.market_id and
incoming_batch = ldsii.incoming_batch
) goodsAllocation,ldrsi.stock_status stockStatus,ldsii.start_time_stocking startTimeStocking,ldsii.end_time_stocking endTimeStocking
) goodsAllocation,ldrsi.stock_status stockStatus,ldrsi.start_time_stocking startTimeStocking,ldrsi.end_time_stocking endTimeStocking
from logpm_distribution_stockup_info ldsi
LEFT JOIN logpm_distribution_reservation_stocklist ldrsi on ldrsi.reservation_id = ldsi.reservation_id
LEFT JOIN logpm_distribution_stock_list ldsii on ldsii.id = ldrsi.stocklist_id

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java

@ -62,7 +62,7 @@ public interface DistrilbutionBillLadingMapper extends BaseMapper<DistrilbutionB
DistrilbutionBillLadingAppVO selectDataByBillLadingId(@Param("billLadingId") Long billLadingId);
List<DistrilbutionAppBillLadingDetailVO> selectDetailList(@Param("stockArticleId") Long stockArticleId, @Param("scanStatus") Integer scanStatus,@Param("orderCode") String orderSelfNumbering);
List<DistrilbutionAppBillLadingDetailVO> selectDetailList(@Param("stockArticleId") Long stockArticleId, @Param("scanStatus") Integer scanStatus,@Param("orderCode") String orderSelfNumbering,@Param("billLadingId") Long billLadingId);
DistrilbutionBillLadingVO getOneOwn(@Param("id") Long id);

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml

@ -278,10 +278,11 @@
else 2
end scanStatus,
0 errorStatus
from logpm_distribution_parcel_list ldpl
from logpm_distrilbution_bill_package ldbp
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.id = ldbp.parce_list_id
left join logpm_distribution_bill_lading_scan ldbls on ldbls.parcel_list_id = ldpl.id and ldbls.is_deleted = 0
<where>
ldpl.is_deleted = 0 and ldpl.order_package_code is not null
ldpl.is_deleted = 0 and ldpl.order_package_code is not null and ldbp.packet_bar_status in (1,3)
and ldpl.stock_article_id = #{stockArticleId}
<if test="orderCode != null and orderCode !=''">
and ldpl.order_code = ${orderCode}
@ -292,6 +293,9 @@
<if test="scanStatus != null and scanStatus==2">
and ldbls.id is not null
</if>
<if test="billLadingId != null and billLadingId != ''">
and ldbp.bill_lading_id = #{ billLadingId }
</if>
</where>
</select>
<select id="getOneOwn" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingVO">

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java

@ -164,9 +164,11 @@ public interface IDistributionParcelListService extends BaseService<Distribution
/**
* 根据二维码查询包件
* @param barcode
* @param id
* @param orderPackageCode
* @param warehouseId
* @return
*/
DistributionParcelListEntity selectByOrderPackageCode(String orderPackageCode, Long warehouseId);
void updateTransferStatus(String orderCode, Long warehouseId,Integer isTransfer);
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -1722,7 +1722,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
case 2:
//库存品
billLadingEntity1.setReserveQuantity(billLadingEntity1.getReserveQuantity() + 1);
updateStockupStockListDate(stockupDTO);
// updateStockupStockListDate(stockupDTO);
break;
}
distrilbutionBillLadingMapper.updateById(billLadingEntity1);
@ -1745,7 +1745,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
case 2:
//库存品
reservationEntity.setReserveQuantity(distributionReservationEntity.getReserveQuantity() + 1);
updateStockupStockListDate(stockupDTO);
// updateStockupStockListDate(stockupDTO);
break;
}
//计算是否完成
@ -1768,6 +1768,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
* 备货库存品备货时间回显
*/
@Override
@Async
public void updateStockupStockListDate(StockupDTO stockupDTO) {
Integer scanType = stockupDTO.getScanType();//扫码类型 1 包件 2库存品
Long reservationId = stockupDTO.getReservationId();//预约ID
@ -1813,7 +1814,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
distributionDeliveryDetailsService.updateById(entity);
} else {
//预约的库存品
//预约的库存品 商 市
DistributionReservationStocklistEntity one1 = distributionReservationStocklistMapper.selectOne(Wrappers.<DistributionReservationStocklistEntity>query().lambda()
.eq(DistributionReservationStocklistEntity::getReservationId, stockupDTO.getReservationId())
.eq(DistributionReservationStocklistEntity::getStocklistId, stockupDTO.getStockListId())
@ -1857,6 +1858,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
for (DistributionStockArticleEntity distributionStockArticleEntity : v) {
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationId, distributionStockArticleEntity.getId(), warehouseId);
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) {
// 这个时候事物还没提交
if (distributionParcelListEntity.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())) {
String signingTime = distributionLoadscanMapper.selectPackageSigningTime(distributionParcelListEntity.getId());
MtReceiveContentDTO mtReceiveContentDTO = new MtReceiveContentDTO();

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -52,7 +52,6 @@ import com.logpm.warehouse.feign.IWarehouseTrayTypeClient;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import com.logpm.warehouse.vo.TrayTypeDataVO;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang.StringUtils;
import org.jetbrains.annotations.NotNull;
@ -66,7 +65,6 @@ import org.springblade.common.constant.loading.LoadScanSigningStatusConstant;
import org.springblade.common.constant.loading.LoadingAbnormalAuditingStatusConstant;
import org.springblade.common.constant.loading.LoadingIsInsertConstant;
import org.springblade.common.constant.loading.LoadingStatusConstant;
import org.springblade.common.constant.order.OrderReservationStatusConstant;
import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.constant.orderpackage.*;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
@ -6068,6 +6066,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
map.put("出库时间", taskTime);
map.put("送货司机", dirverName + "/" + dirverPhone);
map.put("车牌号", carNumber);
map.put("备注", reservationEntity.getRemarks());
Long reservationId = reservationEntity.getId();//预约id
//通过预约id查询所有包件并按三级品类分组

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

@ -44,7 +44,6 @@ import com.logpm.warehouse.feign.IWarehouseUpdownGoodsClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.RabbitConstant;
import org.springblade.common.constant.order.OrderStockupStatusConstant;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.log.exception.ServiceException;
@ -636,6 +635,11 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
return baseMapper.selectByOrderPackageCode(orderPackageCode, warehouseId);
}
@Override
public void updateTransferStatus(String orderCode, Long warehouseId,Integer isTransfer) {
baseMapper.updateTransferStatus(orderCode,warehouseId,isTransfer);
}
/**
* @param distributionParcelList 包件信息
* @return

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -2633,7 +2633,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
} else if (distributionLoadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.weiqianshou.getValue())) {
if (distributionLoadscanEntity.getLoadedNub() == parcelNumberEntity.getReservationNum()) {
if (distributionLoadscanEntity.getLoadedNub() .equals(parcelNumberEntity.getReservationNum()) ) {
//装车数量和计划数量一致,这里进行签收数量的维护
//修改这里装车数量已经维护好了,只需要维护签收数量
distributionParcelNumberEntity.setSigninQuantity(signinQuantity.add(reservationNum).intValue());

49
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java

@ -42,10 +42,7 @@ import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.*;
/**
* 库存品详情信息 服务实现类
@ -206,6 +203,7 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
// DistributionStockDTO distributionStock1 = JSONObject.parseObject(JSONObject.toJSONString(distributionStocks), DistributionStockDTO.class);
List<String> ids = distributionStocks.getIds();
List<DistributionStockEntity> list = new ArrayList<>();
for (int ii = 0; ii < ids.size(); ii++) {
String i = ids.get(ii);
DistributionStockEntity stockEntity = new DistributionStockEntity();
@ -258,6 +256,38 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
parcelListEntity.setOrderPackageStockupStatus(OrderPackageStockupStatusConstant.yibeihu.getValue());
distributionParcelListService.updateById(parcelListEntity);
// distributionStockService.list(Wrappers.<S>query().lambda().eq());
//添加备货数据
if(ObjectUtils.isNotNull(distributionStocks.getStockupType()) && distributionStocks.getStockupType().equals("ZT")){
//自提
DistrilbutionBillLadingEntity billLadingEntity = distrilbutionBillLadingMapper.selectById(stockEntity.getBillLadingId());
if(ObjectUtils.isNotNull(billLadingEntity)){
DistrilbutionBillLadingEntity billLading = new DistrilbutionBillLadingEntity();
billLading.setId(billLadingEntity.getId());
billLading.setStockOrderQuantity(billLadingEntity.getStockOrderQuantity()+1);
distrilbutionBillLadingMapper.updateById(billLading);
}
}else{
//商 市
DistributionReservationEntity byId2 = distributionReservationService.getById(stockEntity.getReservationId());
if(ObjectUtils.isNotNull(byId2)){
DistributionReservationEntity reservationEntity = new DistributionReservationEntity();
reservationEntity.setId(byId2.getId());
int yu =byId2.getReservationNum() + byId2.getReservationStockListNum();
int bei = byId2.getStockOrderQuantity()+1 + byId2.getReserveQuantity();
if(bei >= yu){
reservationEntity.setStockOrderQuantity(byId2.getStockOrderQuantity()+1);
reservationEntity.setStockStatus("3");
reservationEntity.setEndTimeStocking(new Date());
}else{
reservationEntity.setStockOrderQuantity(byId2.getStockOrderQuantity()+1);
reservationEntity.setStockStatus("2");
if(ObjectUtils.isNull(reservationEntity.getStartTimeStocking())){
reservationEntity.setStartTimeStocking(new Date());
}
}
distributionReservationService.updateById(reservationEntity);
}
}
}
if(ObjectUtils.isNotNull(distributionStocks.getStockupType()) && distributionStocks.getStockupType().equals("ZT")){
//修改备货状态 自提
@ -279,6 +309,7 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
* @param type
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void getUpdateOrderState(Long pageId,int type,Integer num ) {
switch (type){
case 1: //修改订单备货状态
@ -298,7 +329,6 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
case 2: //备货 商 市
//查询还没有扫的数量
DistributionStockVO distributionStockVO1 = baseMapper.selectStockupInfo(pageId);
if(ObjectUtils.isNotNull(distributionStockVO1)){
//有订单
if(ObjectUtils.isNotNull(distributionStockVO1.getScanned()) && !distributionStockVO1.getScanned().equals(0)){
@ -324,6 +354,9 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
break;
case 3://自提
DistributionStockupInfoEntity one = distributionStockupInfoService.getOne(Wrappers.<DistributionStockupInfoEntity>query().lambda()
.eq(DistributionStockupInfoEntity::getStockupId, pageId)
);
DistributionStockVO distributionStockSelf = baseMapper.selectStockupInfoSelf(pageId);
//查询库存品
DistributionDeliveryDetailsVO distributionSelf = distributionDeliveryDetailsService.selectCount(pageId);
@ -349,6 +382,12 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
if(ys + num >= qb){
//修改备货任务
getUpdateStockup(pageId,2);
DistrilbutionBillLadingEntity billLadingEntity = distrilbutionBillLadingMapper.selectById(one.getReservationId());
DistrilbutionBillLadingEntity billLading = new DistrilbutionBillLadingEntity();
billLading.setId(billLadingEntity.getId());
billLading.setStockStatus("3");
billLading.setEndTimeStocking(new Date());
distrilbutionBillLadingMapper.updateById(billLading);
}else{
//没有完成
getUpdateStockup(pageId,1);

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -1322,6 +1322,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
*/
@Override
public DistributionStockupOrderInfoVO selectOrderInfoSelf(StockupDTO stockupDTO) {
Long allocationId = stockupDTO.getAllocationId();
DistributionStockArticleEntity byId = distributionStockArticleService.getById(stockupDTO.getStockArticleId());
if (stockupDTO.getStatus().equals(1)) {
//已备货
@ -1330,7 +1331,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
DistributionStockupSelfVO distributionStockupSelfVO = new DistributionStockupSelfVO();
AtomicReference<Integer> j = new AtomicReference<>(0);
AtomicReference<Integer> y = new AtomicReference<>(0);
if (ObjectUtils.isNotNull(stockupDTO.getAllocationId())) {
if (ObjectUtils.isNotNull(allocationId)) {
distributionStockupSelf.forEach(i -> {
if (ObjectUtils.isNotNull(i.getLwugId())) {
j.updateAndGet(v -> v + i.getPlanNum());
@ -1387,10 +1388,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
List<PackageStockupVO> list = distributionParcelListService.selectOrderInfoSelfAllocationList(stockupDTO);
Iterator<PackageStockupVO> iterator = list.iterator();
List<PackageStockupVO> listPack = new ArrayList<>();
if (ObjectUtils.isNotNull(stockupDTO.getAllocationId())) {
if (ObjectUtils.isNotNull(allocationId)) {
while (iterator.hasNext()) {
PackageStockupVO next = iterator.next();
if (stockupDTO.getAllocationId().equals(next.getAllocationId())) {
if (allocationId.equals(next.getAllocationId())) {
next.setIsScanStr("已备货");
next.setIsScan(2);
listPack.add(next);
@ -1425,7 +1426,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
} else {
DistributionStockupSelfVO distributionStockupSelfVO = new DistributionStockupSelfVO();
if (ObjectUtils.isNotNull(stockupDTO.getAllocationId())) {
if (ObjectUtils.isNotNull(allocationId)) {
//查询订单数量 有库位
List<DistributionStockupSelfVO> distributionStockupSelfVOS = distrilbutionBillStockService.selectDistrilbutionBillPackSelf(stockupDTO);
List<DistributionStockupSelfVO> collect = distributionStockupSelfVOS.stream().filter(i -> ObjectUtils.isNotNull(i.getWarehouseArea())).collect(Collectors.toList());
@ -1504,10 +1505,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
List<PackageStockupVO> list = distributionParcelListService.selectOrderInfoSelfList(stockupDTO);
Iterator<PackageStockupVO> iterator = list.iterator();
AtomicReference<Integer> j = new AtomicReference<>(0);
if (Objects.isNull(stockupDTO.getAllocationId())) {
if (Objects.isNull(allocationId)) {
while (iterator.hasNext()) {
j.updateAndGet(v -> v + 1);
PackageStockupVO next = iterator.next();
if (ObjectUtils.isNotNull(next.getAllocationId())) {
iterator.remove();
@ -1520,10 +1520,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
next.setIsScanStr("未备货");
next.setIsScan(1);
}
j.updateAndGet(v -> v + 1);
}
} else {
while (iterator.hasNext()) {
j.updateAndGet(v -> v + 1);
PackageStockupVO next = iterator.next();
if (ObjectUtils.isNull(next.getPositionCode())) {
iterator.remove();
@ -1536,6 +1537,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
next.setIsScanStr("未备货");
next.setIsScan(1);
}
j.updateAndGet(v -> v + 1);
}
}
distributionStockupSelfVO.setPlanNum(j.get());

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -900,7 +900,11 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
queryWrapper.eq("stock_article_id", Long.parseLong(s))
.eq("is_deleted", 0);
queryWrapper.isNotNull("order_package_code");
List<DistributionParcelListEntity> list = distributionParcelListService.list(queryWrapper);
// List<DistributionParcelListEntity> list = distributionParcelListService.list(queryWrapper);
List<DistrilbutionBillPackageEntity> list = distrilbutionBillPackageService.list(Wrappers.<DistrilbutionBillPackageEntity>query().lambda()
.eq(DistrilbutionBillPackageEntity::getBillLadingId,vo.getBillLadingId())
.apply("packet_bar_status in (1,3)")
);
int pn = list.size(); //包件数量
planNum = planNum + pn;
//通过订单id查询扫描表中有多少数据
@ -1104,7 +1108,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
}
//查询所有的包件列表并且附带状态
List<DistrilbutionAppBillLadingDetailVO> details = baseMapper.selectDetailList(Long.parseLong(s), scanStatus, orderSelfNumbering);
List<DistrilbutionAppBillLadingDetailVO> details = baseMapper.selectDetailList(Long.parseLong(s), scanStatus, orderSelfNumbering,billLadingId);
for (DistrilbutionAppBillLadingDetailVO detailVO : details) {
Integer ss = detailVO.getScanStatus();
Integer errorStatus = detailVO.getErrorStatus();
@ -1126,7 +1130,11 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
queryWrapper.eq("stock_article_id", Long.parseLong(s))
.eq("is_deleted", 0);
queryWrapper.isNotNull("order_package_code");
List<DistributionParcelListEntity> list = distributionParcelListService.list(queryWrapper);
// List<DistributionParcelListEntity> list = distributionParcelListService.list(queryWrapper);
List<DistrilbutionBillPackageEntity> list = distrilbutionBillPackageService.list(Wrappers.<DistrilbutionBillPackageEntity>query().lambda()
.eq(DistrilbutionBillPackageEntity::getBillLadingId,billLadingId)
.apply("packet_bar_status in (1,3)")
);
int pn = list.size();
planNum = planNum + pn;
//通过订单id查询扫描表中有多少数据

8
blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/feign/MtOrderMainClinet.java

@ -56,11 +56,11 @@ public class MtOrderMainClinet implements IMtOrderMainClinet {
log.info(">>>>>>>>>>>>>>>>> 司机扫描 {}", DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss.SSS"));
rabbitTemplate.convertAndSend(RabbitConstant.MT_BUSINESS_DATA_2_FACTORY_EXCHANGE,RabbitConstant.MT_BUSINESS_DATA_2_FACTORY_ROUTING, map,message -> {
/* rabbitTemplate.convertAndSend(RabbitConstant.MT_BUSINESS_DATA_2_FACTORY_EXCHANGE,RabbitConstant.MT_BUSINESS_DATA_2_FACTORY_ROUTING, map,message -> {
message.getMessageProperties()
.setHeader("x-delay", 5000);
return message;
});
});*/
log.info(">>>>>>>>>>>>>>>>> 司机扫描 {}", DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss.SSS"));
@ -77,11 +77,11 @@ public class MtOrderMainClinet implements IMtOrderMainClinet {
map.put("messageData",mes);
log.info(">>>>>>>>>>>>>>>>> 文员复核 {}", DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss.SSS"));
rabbitTemplate.convertAndSend(RabbitConstant.MT_BUSINESS_DATA_CLERK_CHECK_2_FACTORY_EXCHANGE,RabbitConstant.MT_BUSINESS_DATA_CLERK_CHECK_2_FACTORY_ROUTING, map,message -> {
/* rabbitTemplate.convertAndSend(RabbitConstant.MT_BUSINESS_DATA_CLERK_CHECK_2_FACTORY_EXCHANGE,RabbitConstant.MT_BUSINESS_DATA_CLERK_CHECK_2_FACTORY_ROUTING, map,message -> {
message.getMessageProperties()
.setHeader("x-delay", 5000);
return message;
});
});*/
return R.success("");

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/BillladingController.java

@ -151,7 +151,7 @@ public class BillladingController {
return R.fail(405,"预计体积不能为空");
}
trunklineBillladingService.saveNew(billladingDTO,myCurrentWarehouse.getCode());
trunklineBillladingService.saveNew(billladingDTO,myCurrentWarehouse.getWarehouseCode());
return R.success("新增成功");
}catch (CustomerException e){
log.error(e.message,e);

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceMapper.xml

@ -15,6 +15,7 @@
select *
from logpm_trunkline_advance lta
where lta.is_deleted = 0
and lta.waybill_status = 0
and lta.freeze_status = #{param.freezeStatus}
<if test="param.warehouseId != null">
and lta.warehouse_id = #{param.warehouseId}

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillPacakgeMapper.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.trunkline.mapper.TrunklineWaybillPackageMapper">
</mapper>

12
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillPackageMapper.java

@ -0,0 +1,12 @@
package com.logpm.trunkline.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.trunkline.entity.TrunklineWaybillPackageEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TrunklineWaybillPackageMapper extends BaseMapper<TrunklineWaybillPackageEntity> {
}

12
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineWaybillPackageService.java

@ -0,0 +1,12 @@
package com.logpm.trunkline.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.logpm.trunkline.entity.TrunklineWaybillPackageEntity;
import com.logpm.trunkline.vo.TrunklineAdvanceDetailVO;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import java.util.List;
public interface ITrunklineWaybillPackageService extends IService<TrunklineWaybillPackageEntity> {
void saveList(List<TrunklineAdvanceDetailVO> list, WarehouseWaybillEntity waybillEntity);
}

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

@ -64,6 +64,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
private final IDistributionParcelListClient distributionParcelListClient;
private final IDistributionParcelNumberClient distributionParcelNumberClient;
private final IRegionFeign regionFeign;
private final ITrunklineWaybillPackageService trunklineWaybillPackageService;
@Override
public IPage<TrunklineAdvanceVO> advancePageList(AdvanceDTO advanceDTO) {
@ -239,14 +240,16 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
if(StringUtil.isBlank(waybillNo)){
waybillNo = basicdataCodeClient.getCodeByType(CodeNumConstant.WAYBILL, warehouseCode, "");
}
Long departureWarehouseId = openOrderDTO.getDepartureWarehouseId();
Long destinationWarehouseId = openOrderDTO.getDestinationWarehouseId();
WarehouseWaybillEntity waybillEntity = new WarehouseWaybillEntity();
waybillEntity.setWaybillNo(waybillNo);
waybillEntity.setBrand(openOrderDTO.getBrand());
waybillEntity.setOrderNo(openOrderDTO.getOrderCode());
waybillEntity.setDepartureWarehouseId(openOrderDTO.getDepartureWarehouseId());
waybillEntity.setDepartureWarehouseId(departureWarehouseId);
waybillEntity.setDepartureWarehouseName(openOrderDTO.getDepartureWarehouseName());
waybillEntity.setDestinationWarehouseId(openOrderDTO.getDestinationWarehouseId());
waybillEntity.setDestinationWarehouseId(destinationWarehouseId);
waybillEntity.setDestinationWarehouseName(openOrderDTO.getDestinationWarehouseName());
waybillEntity.setDocumentMakingTime(CommonUtil.StringToDate(openOrderDTO.getOpenOrderDate()));
waybillEntity.setReceiptNum(openOrderDTO.getReceiptNum());
@ -355,6 +358,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//绑定订单和运单的关系
List<TrunklineAdvanceEntity> advanceEntityList = advanceService.findListByIds(advanceIds);
List<TrunklineWaybillOrderEntity> waybillOrderEntities = new ArrayList<>();
Set<String> orderCodes = new TreeSet<>();
for (TrunklineAdvanceEntity advanceEntity:advanceEntityList){
TrunklineWaybillOrderEntity waybillOrderEntity = new TrunklineWaybillOrderEntity();
waybillOrderEntity.setWarehouseId(warehouseId);
@ -367,6 +371,10 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillOrderEntity.setHandleNumber(0);
waybillOrderEntities.add(waybillOrderEntity);
List<TrunklineAdvanceDetailVO> list = advanceDetailService.findList(advanceEntity.getId());
trunklineWaybillPackageService.saveList(list,waybillEntity);
orderCodes.add(advanceEntity.getOrderCode());
advanceEntity.setWaybillStatus("1");
advanceEntity.setWaybillNo(waybillEntity.getWaybillNo());
}
@ -374,6 +382,16 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//修改暂存单的状态为已开单
advanceService.updateBatchById(advanceEntityList);
Integer isTransfer = 1;
if(departureWarehouseId.equals(destinationWarehouseId)){
isTransfer = 0;
}
for (String orderCode : orderCodes) {
distributionParcelListClient.updateTransferStatus(orderCode,warehouseId,isTransfer);
}
//计算扫码入库的包件是否需要把运单和提货单挂上
List<BillladingPackageVO> billladingPackageList = advanceDetailService.findBillladingPackageByAdvanceIdsAnd(advanceIds);
List<TrunklineBillladingWaybillEntity> billladingWaybillEntities = new ArrayList<>();

11
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java

@ -66,6 +66,12 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
throw new CustomerException(405,"包件信息已存在");
}
TrunklineAdvanceEntity advanceEntity = getById(advanceId);
if(Objects.isNull(advanceEntity)){
log.warn("############saveOrderAndPackage: 暂存单信息不存在 advanceId={} warehouseId={}",advanceId,warehouseId);
throw new CustomerException(405,"暂存单信息不存在");
}
//2.查询订单信息
int total = baseMapper.getAllTotalNum(orderCode);
@ -74,7 +80,7 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
if(Objects.isNull(stockArticleEntity)){
log.info("#############saveOrderAndPackage: 订单信息为空,同步订单信息");
//订单信息为空
TrunklineAdvanceEntity advanceEntity = getById(advanceId);
stockArticleEntity = new DistributionStockArticleEntity();
stockArticleEntity.setOrderCode(orderCode);
stockArticleEntity.setServiceNumber(advanceEntity.getServiceNum());
@ -164,6 +170,7 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
DistributionParcelListEntity parcelList = new DistributionParcelListEntity();
parcelList.setWarehouse(warehouseEntity.getName());
parcelList.setWarehouseId(warehouseId);
parcelList.setWaybillNumber(advanceEntity.getWaybillNo());
parcelList.setConditions(1);
parcelList.setOrderPackageCode(advanceDetailEntity.getOrderPackageCode());
parcelList.setFirsts(advanceDetailEntity.getFirstPackName());
@ -196,7 +203,7 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
}
parcelList.setBrandName(advanceDetailEntity.getBrand());
parcelList.setOrderPackageStatus("20");
parcelList.setOrderPackageStatus("30");
parcelList.setOrderPackageFreezeStatus("10");
parcelList.setOrderPackageGroundingStatus("10");
parcelList.setOrderPackageStockupStatus("10");

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java

@ -74,13 +74,15 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
Long warehouseId = billladingDTO.getWarehouseId();
String warehouseName = billladingDTO.getWarehouseName();
String billladingCode = basicdataCodeClient.getCodeByType(11, warehouseCode, null);
String billladingCode = basicdataCodeClient.getCodeByType(11, warehouseCode, "");
TrunklineBillladingEntity trunklineBillladingEntity = new TrunklineBillladingEntity();
BeanUtil.copy(billladingDTO,trunklineBillladingEntity);
trunklineBillladingEntity.setBillladingStatus("1");
trunklineBillladingEntity.setCreateUserName(AuthUtil.getUserName());
trunklineBillladingEntity.setBillladingCode(billladingCode);
trunklineBillladingEntity.setRealVolume(BigDecimal.ZERO);
trunklineBillladingEntity.setRealWeight(BigDecimal.ZERO);
save(trunklineBillladingEntity);
Long billladingId = trunklineBillladingEntity.getId();
//保存线路节点

19
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingWaybillServiceImpl.java

@ -74,11 +74,24 @@ public class TrunklineBillladingWaybillServiceImpl extends BaseServiceImpl<Trunk
BigDecimal price = BigDecimal.ZERO;
if("1".equals(chargeType)){
price = totalFee.divide(new BigDecimal(realNum),2,BigDecimal.ROUND_UP);
if(realVolume.compareTo(BigDecimal.ZERO) > 0){
price = totalFee.divide(new BigDecimal(realNum),2,BigDecimal.ROUND_UP);
}else{
price = BigDecimal.ZERO;
}
}else if ("2".equals(chargeType)){
price = totalFee.divide(realWeight,4,BigDecimal.ROUND_UP);
if(realVolume.compareTo(BigDecimal.ZERO) > 0){
price = totalFee.divide(realWeight,4,BigDecimal.ROUND_UP);
}else{
price = BigDecimal.ZERO;
}
}else if("3".equals(chargeType)){
price = totalFee.divide(realVolume,4,BigDecimal.ROUND_UP);
if(realVolume.compareTo(BigDecimal.ZERO) > 0){
price = totalFee.divide(realVolume,4,BigDecimal.ROUND_UP);
}else{
price = BigDecimal.ZERO;
}
}
QueryWrapper<TrunklineBillladingWaybillEntity> queryWrapper = new QueryWrapper<>();

42
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillPackageServiceImpl.java

@ -0,0 +1,42 @@
package com.logpm.trunkline.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.logpm.trunkline.entity.TrunklineWaybillPackageEntity;
import com.logpm.trunkline.mapper.TrunklineWaybillPackageMapper;
import com.logpm.trunkline.service.ITrunklineWaybillPackageService;
import com.logpm.trunkline.vo.TrunklineAdvanceDetailVO;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Slf4j
@Service
@AllArgsConstructor
public class TrunklineWaybillPackageServiceImpl extends ServiceImpl<TrunklineWaybillPackageMapper,TrunklineWaybillPackageEntity> implements ITrunklineWaybillPackageService {
@Override
public void saveList(List<TrunklineAdvanceDetailVO> list, WarehouseWaybillEntity waybillEntity) {
List<TrunklineWaybillPackageEntity> ls = new ArrayList<>();
for (TrunklineAdvanceDetailVO trunklineAdvanceDetailVO : list) {
Long advanceDetailId = trunklineAdvanceDetailVO.getId();
Long advanceId = trunklineAdvanceDetailVO.getAdvanceId();
String orderCode = trunklineAdvanceDetailVO.getOrderCode();
String orderPackageCode = trunklineAdvanceDetailVO.getOrderPackageCode();
Long waybillId = waybillEntity.getId();
String waybillNo = waybillEntity.getWaybillNo();
TrunklineWaybillPackageEntity waybillPackageEntity = new TrunklineWaybillPackageEntity();
waybillPackageEntity.setWaybillId(waybillId);
waybillPackageEntity.setWaybillNo(waybillNo);
waybillPackageEntity.setOrderCode(orderCode);
waybillPackageEntity.setAdvanceId(advanceId);
waybillPackageEntity.setAdvanceDetailId(advanceDetailId);
waybillPackageEntity.setOrderPackageCode(orderPackageCode);
waybillPackageEntity.setIsSignfor(0);
ls.add(waybillPackageEntity);
}
saveBatch(ls);
}
}
Loading…
Cancel
Save