Browse Source

Merge branch 'dev' into pre-production

newStockUp
zhenghaoyu 1 year ago
parent
commit
22bf6122aa
  1. 5
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataStockArticleVO.java
  2. 32
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java
  3. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java
  4. 35
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml
  5. 7
      blade-service/logpm-distribution/pom.xml
  6. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionAddvalueAppController.java
  7. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  8. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java
  9. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  10. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java
  11. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  12. 95
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  13. 104
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  14. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java
  15. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  16. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseGoodsAllocationController.java
  17. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

5
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataStockArticleVO.java

@ -145,7 +145,10 @@ public class BasicdataStockArticleVO extends BasicdataStockArticleEntity {
@ApiModelProperty(value = "完整货位")
private String positionCode;
@ApiModelProperty(name = "数量",notes = "")
private Integer num;
@ApiModelProperty(name = "运单号",notes = "")
private String waybillNo;
/**
* 是否齐套名称
*/

32
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java

@ -106,6 +106,38 @@ public class DistributionSignforVO extends DistributionSignforEntity {
@ApiModelProperty(value = "仓库ids")
private List<Long> warehouseIdList;
/**
* 配送车次
*/
@ApiModelProperty(value = "配送车次")
private String trainNumber;
/**
* 配送车牌号
*/
@ApiModelProperty(value = "配送车牌号")
private String vehicleName;
/**
* 配送司机
*/
@ApiModelProperty(value = "配送司机")
private String driverName;
/**
* 装车班组
*/
@ApiModelProperty(value = "装车班组")
private String loadingTeamName;
/**
* 卸车班组
*/
@ApiModelProperty(value = "卸车班组")
private String unLoadingTeamName;
/**
* 客户订单列表
*/

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java

@ -75,7 +75,7 @@ public class BasicdataClientClient implements IBasicdataClientClient {
public BasicdataClientEntity getCustomer(String customerName, String customerCode) {
return basicdataClientService.getOne(Wrappers.<BasicdataClientEntity>query().lambda()
.eq(StringUtils.isNotEmpty(customerName),BasicdataClientEntity::getClientName,customerName)
.eq(StringUtils.isNotEmpty(customerCode),BasicdataClientEntity::getReserve1,customerCode)
.eq(StringUtils.isNotEmpty(customerCode),BasicdataClientEntity::getClientCode,customerCode)
);
}

35
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml

@ -206,20 +206,23 @@
</select>
<select id="selectlclList" resultType="com.logpm.basicdata.vo.BasicdataStockArticleVO">
SELECT
ldsa.dealer_name dealerName,
ldsa.waybill_number waybillNumber,
ldsa.dealer_code dealerCode,
ldsa.consignee_person consigneePerson,
ldsa.consignee_address consigneeAddress,
lww.consignee dealerName,
lww.waybill_no waybillNo,
ldsa.dealer_code dealerCode,
lww.consignee_name consigneePerson,
lww.consignee_address consigneeAddress,
lww.consignee_mobile consigneeMobile,
lwug.position_code positionCode,
lwga.column_num columnNum,
lwga.layer_num layerNum,
lwga.column_num columnNum,
lwga.layer_num layerNum,
lwtg.num num,
lwtg.create_time operateTime,
lwtg.create_user operateUser
FROM
logpm_warehouse_tray_goods lwtg
JOIN logpm_distribution_stock_article ldsa ON lwtg.association_id = ldsa.id
left join (logpm_warehouse_updown_goods lwug join logpm_warehouse_goods_allocation lwga on lwug.allocation_id =lwga.id) on lwug.association_id = ldsa.id
logpm_warehouse_tray_goods lwtg
JOIN logpm_distribution_stock_article ldsa ON lwtg.association_id = ldsa.id
LEFT join logpm_warehouse_waybill lww on lww.waybill_no = ldsa.waybill_number
LEFT JOIN ( logpm_warehouse_updown_goods lwug JOIN logpm_warehouse_goods_allocation lwga ON lwug.allocation_id = lwga.id ) ON lwug.association_id = ldsa.id
<where>
ldsa.is_deleted = 0 and lwtg.is_deleted = 0 and lwtg.association_type = 1 and lwtg.tray_id = #{param.id}
<if test="param.dealerName !=null and param.dealerName != ''">
@ -356,11 +359,12 @@
</select>
<select id="selectlclListhistory" resultType="com.logpm.basicdata.vo.BasicdataStockArticleVO">
SELECT
ldsa.dealer_name dealerName,
ldsa.waybill_number waybillNumber,
ldsa.dealer_code dealerCode,
ldsa.consignee_person consigneePerson,
ldsa.consignee_address consigneeAddress,
lww.consignee dealerName,
lww.waybill_no waybillNo,
ldsa.dealer_code dealerCode,
lww.consignee_name consigneePerson,
lww.consignee_address consigneeAddress,
lww.consignee_mobile consigneeMobile,
lwug.position_code positionCode,
lwga.column_num columnNum,
lwga.layer_num layerNum,
@ -375,6 +379,7 @@
FROM
logpm_warehouse_tray_goods_log lwtgl
JOIN logpm_distribution_stock_article ldsa ON lwtgl.association_id = ldsa.id
LEFT join logpm_warehouse_waybill lww on lww.waybill_no = ldsa.waybill_number
left join (logpm_warehouse_updown_goods lwug join logpm_warehouse_goods_allocation lwga on lwug.allocation_id =lwga.id) on lwug.association_id = ldsa.id
<where>
ldsa.is_deleted = 0 and lwtgl.is_deleted = 0 and lwtgl.association_type = 1 and lwtgl.tray_id = #{param.id}

7
blade-service/logpm-distribution/pom.xml

@ -98,6 +98,13 @@
<version>${bladex.project.version}</version>
</dependency>
<!-- 2023/09/21-->
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-old-project-api</artifactId>
<version>${bladex.project.version}</version>
</dependency>

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionAddvalueAppController.java

@ -80,7 +80,6 @@ public class DistributionAddvalueAppController {
@ApiOperation(value = "查询该客户下的所有配送包件信息", notes = "DistributionAppDeliveryListDTO")
public R getAllPackageList(@Valid @RequestBody DistributionAppAddvalueDTO distributionAppAddvalueDTO) {
List<DistributionAddvaluePackageEntity> allPackageList = distributionAddvalueService.getAllPackageList(distributionAppAddvalueDTO);
return R.data(200,allPackageList,"成功");
}

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -485,15 +485,13 @@
<select id="selectOneCustom" resultType="com.logpm.distribution.vo.DistributionSignforVO">
SELECT
CASE
WHEN
lds.driver_signing = '2' THEN
'司机签收'
WHEN lds.signing_status = '2' THEN
'文员签收' ELSE '待签收'
'文员审核' ELSE '待签收'
END signingStatusAll,
CASE
WHEN
ldr.is_urgent = '1' THEN '否'
WHEN ldr.is_urgent = '2' THEN '是'
@ -511,6 +509,12 @@
lds.delivery_sign_pictures deliverySignPictures,
ldr.reservation_date reservationDate,
lds.positioning_adr positioningAdr,
lddl.train_number trainNumber,
lddl.vehicle_name vehicleName,
lddl.driver_name driverName,
lddl.driver_name driverName,
lddl.loading_team_name loadingTeamName,
lddl.unloading_team_name unLoadingTeamName,
CASE
WHEN ldr.delivery_type = '1' THEN
'商配'

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

@ -81,7 +81,7 @@ public interface DistributionStockListMapper extends BaseMapper<DistributionStoc
List<DistributionStockListEntity> getEntityByMarketIdAndMaterialName(@Param("marketId") Long marketId, @Param("materialName") String materialName, @Param("warehouseId") Long warehouseId);
DistributionStockupStockListInfoVO selectStockListInfoSelf(@Param("reservationId") Long reservationId,@Param("stockListId") Long stockListId);
DistributionStockupStockListInfoVO selectStockListInfoSelf(@Param("reservationId") Long reservationId,@Param("stockListId") Long stockListId,@Param("allocationId") Long allocationId);
List<DistributionStockListEntity> getListByMarketIdAndMaterialName(@Param("marketId") Long marketId, @Param("materialName") String materialName, @Param("warehouseId") Long warehouseId);

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml

@ -285,7 +285,9 @@
<select id="selectStockListInfoSelf" resultType="com.logpm.distribution.vo.DistributionStockupStockListInfoVO">
select lddd.bill_lading_id reservationId,
lddd.stock_list_id stockListId,
ldsl.storage_location warehouseArea,
(select DISTINCT allocation_title
from logpm_warehouse_updown_goods
where allocation_id = #{allocationId}) warehouseArea,
ldsl.tray_name trays,
ldsl.sku sku,
ldsl.cargo_unit unit,

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java

@ -124,11 +124,13 @@ public interface IDistributionStockListService extends BaseService<DistributionS
/**
* 自提查询库存品数据
*
* @param reservationId
* @param stockListId
* @param allocationId
* @return
*/
DistributionStockupStockListInfoVO selectStockListInfoSelf(Long reservationId, Long stockListId);
DistributionStockupStockListInfoVO selectStockListInfoSelf(Long reservationId, Long stockListId,Long allocationId);
List<DistributionStockListEntity> getListByMarketIdAndMaterialName(Long marketId, String materialName, Long warehouseId);

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

@ -740,8 +740,8 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
@Override
@Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class)
public void checkStockArticleSignStatus(DistributionParcelListEntity parcelListEntity) {
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
distributionParcelListService.updateById(parcelListEntity);
// parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
// distributionParcelListService.updateById(parcelListEntity);
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListService.getBaseMapper().selectList(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, parcelListEntity.getStockArticleId()));
boolean flag = parcelListEntityList.stream().allMatch(p -> p.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue()));
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId());

95
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -35,6 +35,8 @@ import com.logpm.distribution.wrapper.DistributionParcelListWrapper;
import com.logpm.distribution.wrapper.DistributionReservationWrapper;
import com.logpm.distribution.wrapper.DistributionStockArticleWrapper;
import com.logpm.distribution.wrapper.DistributionStockListWrapper;
import com.logpm.oldproject.entity.WayBillEntity;
import com.logpm.oldproject.feign.IWayBillClient;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import lombok.extern.slf4j.Slf4j;
@ -175,6 +177,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
@Autowired
private DistributionStockupInfoMapper distributionStockupInfoMapper;
@Autowired
private IWayBillClient wayBillClient;
@ -281,6 +286,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
HashSet<String> storeName = new HashSet<>();
HashSet<String> mallName = new HashSet<>();
HashSet<String> receivingUnit = new HashSet<>();
HashSet<String> waybillNo = new HashSet<>();
HashSet<String> waybillId = new HashSet<>();
HashSet<String> marketPhone = new HashSet<>();
AtomicReference<BigDecimal> initTotal = new AtomicReference<>(BigDecimal.ZERO);
//存在订单构建预约订单关联信息
if (!Func.isEmpty(stockArticleList)) {
@ -293,6 +301,17 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//存在订单的情况下才会对预约和包件的关系进行维护
//选择了订单但是未进行包件的选择,默认选择了订单下的所有在库包件
stockArticleList.forEach(s -> {
// WarehouseWaybillEntity byWaybillNo = warehouseWaybillClient.findByWaybillNo(s.getWaybillNumber());
WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(s.getWaybillNumber());
if (Func.isNotEmpty(wayBillEntity)){
waybillId.add(wayBillEntity.getId().toString());
}
if (Func.isNotEmpty(wayBillEntity.getTakePhone())){
marketPhone.add(wayBillEntity.getTakePhone());
}
if (Func.isNotEmpty(s.getWaybillNumber())){
waybillNo.add(s.getWaybillNumber());
}
if (Func.isNotBlank(s.getServiceNumber())) {
serviceNumber.add(s.getServiceNumber());
}
@ -458,6 +477,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
reservationEntity.setWarehouseName(myCurrentWarehouse.getName());
reservationEntity.setMallName(String.join(",", mallName));
reservationEntity.setStoreName(String.join(",", storeName));
reservationEntity.setWaybillNo(String.join(",", waybillNo));
reservationEntity.setWaybillId(String.join(",", waybillId));
reservationEntity.setMailPhone(String.join(",", marketPhone));
reservationEntity.setReceivingUnit(String.join(",",receivingUnit));
//统计数量
BigDecimal fee = initTotal.get().add(reservationEntity.getOtherFee());
@ -1426,7 +1448,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
clientTotal.getAndIncrement();
// AtomicInteger receivingUnit = new AtomicInteger();
//这里查询有问题
WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(k);
DistributionReservationDTO reservation = allocationDTO.getReservation();
DistributionReservationEntity reservationEntity = Func.copy(reservation, DistributionReservationEntity.class);
reservationEntity.setWaybillNo(k);
@ -1441,6 +1463,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
// HashSet<String> waybillNo = new HashSet<>();
//运单ID -------这里运单Id后续可能变更为运单号
HashSet<String> waybillId = new HashSet<>();
HashSet<String> waybillNo = new HashSet<>();
//订单服务号
HashSet<String> serviceNumber = new HashSet<>();
//仓库名称
@ -1449,6 +1473,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
HashSet<String> mallName = new HashSet<>();
//门店名称
HashSet<String> storeName = new HashSet<>();
//门店名称
HashSet<String> marketPhone = new HashSet<>();
//包件总数量
AtomicInteger packageTotal = new AtomicInteger();
// ------------------收货信息构建-------------------
@ -1461,6 +1488,25 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//运单客户收货单位
HashSet<String> consignee = new HashSet<>();
v.forEach(s->{
// WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(s.getWaybillNumber());
// if (Func.isNotEmpty(warehouseWaybillEntity.getConsigneeMobile())){
// marketPhone.add(warehouseWaybillEntity.getConsigneeMobile());
// }
// if (Func.isNotEmpty(warehouseWaybillEntity.getConsigneeAddress())){
// consigneeAddress.add(warehouseWaybillEntity.getConsigneeMobile());
// }
WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(s.getWaybillNumber());
if (Func.isNotEmpty(wayBillEntity)){
waybillId.add(wayBillEntity.getId().toString());
if (Func.isNotEmpty(wayBillEntity.getTakePhone())){
marketPhone.add(wayBillEntity.getTakePhone());
}
if (Func.isNotEmpty(wayBillEntity.getTakeAddress())){
consigneeAddress.add(wayBillEntity.getTakeAddress());
}
}
//预约单数据填充
if (Func.isNotEmpty(s.getMallName())){
mallName.add(s.getMallName());
@ -1477,8 +1523,11 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.isNotEmpty(s.getWarehouse())){
warehouseName.add(s.getWarehouse());
}
if (Func.isNotEmpty(s.getWaybillId())){
waybillId.add(s.getWaybillId().toString());
// if (Func.isNotEmpty(s.getWaybillId())){
// waybillId.add(s.getWaybillId().toString());
// }
if (Func.isNotEmpty(s.getWaybillNumber())){
waybillNo.add(s.getWaybillNumber());
}
if (Func.isNotEmpty(s.getConsigneeUnit())){
consignee.add(s.getConsigneeUnit());
@ -1489,9 +1538,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.isNotEmpty(s.getConsigneeMobile())){
consigneeMobile.add(s.getConsigneeMobile());
}
if (Func.isNotEmpty(s.getConsigneeAddress())){
consigneeAddress.add(s.getConsigneeAddress());
}
// if (Func.isNotEmpty(s.getConsigneeAddress())){
// consigneeAddress.add(s.getConsigneeAddress());
// }
if (Func.isNotEmpty(s.getServiceNumber())){
serviceNumber.add(s.getServiceNumber());
}
@ -1540,11 +1589,16 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
reservationEntity.setConsignee(String.join(",", consigneeName));
reservationEntity.setDeliveryPhone(String.join(",", consigneeMobile));
reservationEntity.setDeliveryAddress(String.join(",", consigneeAddress));
reservationEntity.setReceivingUnit(String.join(",", consignee));
reservationEntity.setReceivingUnit(k);
// reservationEntity.setWaybillId(String.join(",", waybillId));
reservationEntity.setReservationDate(date);
// -----------------------预约信息完善----------------------------
reservationEntity.setReservationCode(reservationMa());
reservationEntity.setReplaceFee(BigDecimal.ZERO);
reservationEntity.setFee(BigDecimal.ZERO);
reservationEntity.setCollectFee(BigDecimal.ZERO);
reservationEntity.setOrderSource(ReservationOrderSourceConstant.zijian.getValue());
// reservationEntity.setDeliveryWay();
reservationEntity.setDeliveryType(DistributionTypeConstant.shangpei.getValue());
reservationEntity.setStockupStatus(ReservationStockupStatusConstant.daibeihuo.getValue());
@ -1552,6 +1606,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
reservationEntity.setStockArticleId(String.join(",", orderNumber));
reservationEntity.setServiceNumber(String.join(",", serviceNumber));
reservationEntity.setWarehouseName(String.join(",", warehouseName));
reservationEntity.setWaybillNo(String.join(",", waybillNo));
reservationEntity.setWaybillId(String.join(",", waybillId));
reservationEntity.setMailPhone(String.join(",", marketPhone));
reservationEntity.setMallName(String.join(",", mallName));
reservationEntity.setStoreName(String.join(",", storeName));
reservationEntity.setLoadingStatus(ReservationLoadingStatusConstant.daizhuangche.getValue());
@ -2098,6 +2155,12 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
HashSet<String> receivingUnit = new HashSet<>();
HashSet<String> waybillNo = new HashSet<>();
HashSet<String> waybillId = new HashSet<>();
HashSet<String> marketPhone = new HashSet<>();
AtomicReference<BigDecimal> initTotal = new AtomicReference<>(BigDecimal.ZERO);
//存在订单构建预约订单关联信息
@ -2111,6 +2174,17 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
return R.fail("订单已预约!!!");
}
stockArticleList.forEach(s -> {
// WarehouseWaybillEntity byWaybillNo = warehouseWaybillClient.findByWaybillNo();
// String consigneeMobile = byWaybillNo.getConsigneeMobile();
WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(s.getWaybillNumber());
if (Func.isNotEmpty(wayBillEntity)) {
waybillId.add(wayBillEntity.getId().toString());
}
if (Func.isNotEmpty(wayBillEntity.getTakePhone())){
marketPhone.add(wayBillEntity.getTakePhone());
}
// storeName.add(s.getStoreName());
// mallName.add(s.getMallName());
// warehouseNames.add(s.getWarehouse());
@ -2133,6 +2207,10 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.isNotBlank(s.getConsigneeUnit())) {
receivingUnit.add(s.getConsigneeUnit());
}
if (Func.isNotBlank(s.getWaybillNumber())) {
waybillNo.add(s.getWaybillNumber());
}
// DistributionStockArticleEntity stockArticleEntity = Func.copy(s, DistributionStockArticleEntity.class);
DistributionReservationStockarticleEntity distributionReservationStockarticleEntity = new DistributionReservationStockarticleEntity();
//预约订单数量
@ -2276,6 +2354,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
reservationEntity.setWarehouseName(String.join(",", warehouseNames));
reservationEntity.setMallName(String.join(",", mallName));
reservationEntity.setStoreName(String.join(",", storeName));
reservationEntity.setWaybillNo(String.join(",",waybillNo));
reservationEntity.setWaybillId(String.join(",",waybillId));
reservationEntity.setMailPhone(String.join(",",marketPhone));
reservationEntity.setReceivingUnit(String.join(",",receivingUnit));
//统计数量
BigDecimal fee = initTotal.get().add(reservationEntity.getOtherFee());

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

@ -18,6 +18,7 @@ package com.logpm.distribution.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@ -262,7 +263,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//进行签收数量的修改
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//修改签收数量
Integer j = distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
// Integer j = distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
//更新装车包件数和签收包件数
Integer j = distributionSignforMapper.updateSignforByReservationId(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
//TODO 这里就需要一个异步的包件状态维护方法
}else if (Func.isEmpty(collect)){
@ -400,6 +403,58 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override
public R signforcontinue(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
// ——————————————————————————————————————2023-09-21 异常签收调整————————————————————————————————————————————————————————————————————————
// 思路:查看该该包件是否处于可被签收的状态
// 确定该包件不存在配送计划中
// 查看是否进行了装车操作 -----这一步会筛选该包件是否属于该客户。 只有属于该客户才能被签收
// 如果不是这里则需要对该包件信息进行录入然后标识该包件需要进行回库操作
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()));
if (Func.isNotEmpty(parcelListEntityList) && parcelListEntityList.size() == 1 ){
DistributionParcelListEntity parcelListEntity = parcelListEntityList.get(0);
if (parcelListEntity.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())){
return Resp.scanFail("操作失败","包件信息有误");
}
//确认该包件确实不属于该配送任务
List<DistributionParcelListEntity> parcelListEntities = distributionDeliveryListMapper.selectPackageListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
boolean flag = parcelListEntities.stream().anyMatch(p -> p.getOrderPackageStatus().equals(distrilbutionloadingscanDTO.getBarcode()));
if (flag){
log.error("##############包件存在该配送计划中:{}",distrilbutionloadingscanDTO.getBarcode());
return Resp.scanFail("操作失败","包件信息有误");
}
//查询这个包件是否满足该客户的要求
DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(distrilbutionloadingscanDTO.getReservationId());
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId());
switch (reservationEntity.getDeliveryType()){
case "1":
//商配
if (reservationEntity.getConsignee().equals(stockArticleEntity.getConsigneePerson()) && reservationEntity.getReceivingUnit().equals(stockArticleEntity.getConsigneeAddress())){
//这里的订单才满足被异常签收
}else {
return Resp.scanFail("操作失败","不属于该客户");
}
break;
case "2":
//市配
if (reservationEntity.getConsignee().equals(stockArticleEntity.getCustomerName())
&& reservationEntity.getDeliveryPhone().equals(stockArticleEntity.getCustomerTelephone())
&& reservationEntity.getDeliveryAddress().equals(stockArticleEntity.getCustomerAddress())){
//这里的订单才满足被异常签收
}else {
return Resp.scanFail("操作失败","不属于该客户");
}
break;
}
}else {
log.error("############出现相同的包件码:{}",distrilbutionloadingscanDTO.getBarcode());
return Resp.scanFail("操作失败","包件信息有误");
}
//获取当前用户司机
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfEntity();
@ -868,8 +923,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.error("#############reservationEntity参数错误:{}",reservationEntity);
return R.fail("服务器正忙~~");
}
//查询数据
DistributionSignforEntity distributionSignforEntity = baseMapper.selectOne(new QueryWrapper<DistributionSignforEntity>().lambda()
.eq(DistributionSignforEntity::getDeliveryId, distributionSignfor.getDeliveryId())
@ -954,7 +1007,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscaninvnEntity.setSigningUser(user.getUserName());
loadscaninvnEntity.setSigningUserId(user.getUserId());
loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
loadscaninvnEntity.setMsg("一键签收数据补录");
if (distributionSignfor.getIsClerk()){
loadscaninvnEntity.setMsg("文员一键签收数据补录");
}else {
loadscaninvnEntity.setMsg("司机一键签收数据补录");
}
distributionLoadscaninvnService.save(loadscaninvnEntity);
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
//更新签收表的签收数量和装车数量
@ -984,7 +1042,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (list.size()==1){
//正常进行扫描记录签收修改
DistributionLoadscaninvnEntity loadscaninvnEntity = list.get(0);
loadscaninvnEntity.setMsg("一键签收数据补录");
if (distributionSignfor.getIsClerk()){
loadscaninvnEntity.setMsg("文员一键签收数据补录");
}else {
loadscaninvnEntity.setMsg("司机一键签收数据补录");
}
loadscaninvnEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
loadscaninvnEntity.setOneClick(1);
@ -1013,10 +1075,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.selectPackageListByReservationId(distributionSignforEntity.getReservationId());
//包件不需要考虑备货、装车直接可进行签收 过滤已装车的包件
List<DistributionParcelListEntity> noLoadingPackage = parcelListEntityList.stream().filter(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())).collect(Collectors.toList());
for (DistributionParcelListEntity parcelListEntity : parcelListEntityList) {
if (Func.equals(parcelListEntity.getOrderPackageStockupStatus(), OrderPackageStatusConstant.yiqianshou.getValue())) {
if (Func.equals(parcelListEntity.getOrderPackageStatus(), OrderPackageStatusConstant.yiqianshou.getValue())) {
continue;
} else if (Func.equals(parcelListEntity.getOrderPackageLoadingStatus(), OrderPackageLoadingStatusConstant.yizhuangche.getValue())) {
//修改包件的状态为出库状态
@ -1030,7 +1090,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
if (list.size() == 1) {
DistributionLoadscanEntity loadscanEntity = list.get(0);
loadscanEntity.setMsg("一键签收数据补录");
if (distributionSignfor.getIsClerk()){
loadscanEntity.setMsg("文员一键签收数据补录");
}else {
loadscanEntity.setMsg("司机一键签收数据补录");
}
loadscanEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
loadscanEntity.setReceivedQuantity(parcelListEntity.getQuantity());
loadscanEntity.setOneClick(1);
@ -1097,7 +1161,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setOneClick(2);
loadscanEntity.setOneQclick(2);
loadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
loadscanEntity.setMsg("一键签收数据补录");
if (distributionSignfor.getIsClerk()){
loadscanEntity.setMsg("文员一键签收数据补录");
}else {
loadscanEntity.setMsg("司机一键签收数据补录");
}
distributionLoadscanService.save(loadscanEntity);
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
//更新签收表的签收数量和装车数量
@ -1116,21 +1184,21 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionReservationMapper.updateById(reservationEntity);
//维护配送任务
distributionAsyncService.checkDeliverySignStatusByReservation(distributionSignforEntity.getDeliveryId());
boolean update = this.update(new UpdateWrapper<DistributionSignforEntity>().lambda()
LambdaUpdateWrapper<DistributionSignforEntity> set = new UpdateWrapper<DistributionSignforEntity>().lambda()
.eq(DistributionSignforEntity::getId, distributionSignforEntity.getId())
.set(StringUtils.isNotBlank(distributionSignfor.getDeliverySignPictures()), DistributionSignforEntity::getDeliverySignPictures, distributionSignfor.getDeliverySignPictures())
.set(StringUtils.isNotBlank(distributionSignfor.getSigningType()), DistributionSignforEntity::getSigningType, distributionSignfor.getSigningType())
.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningStatus, 1)
.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getDriverSigning, 2)
.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningStatus, 2)
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getDriverSigning, 2)
.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningTime, simpleDateFormat.format(new Date()))
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningTime, simpleDateFormat.format(new Date()))
.set(distributionSignfor.getIsClerk() && StringUtils.isNotBlank(distributionSignfor.getClerkSignRemarks()), DistributionSignforEntity::getClerkSignRemarks, distributionSignfor.getClerkSignRemarks())
.set(!distributionSignfor.getIsClerk() && StringUtils.isNotBlank(distributionSignfor.getDriverRemarks()), DistributionSignforEntity::getDriverRemarks, distributionSignfor.getDriverRemarks())
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getDriverSigning, 2)
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSjsigningTime, simpleDateFormat.format(new Date()))
);
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSjsigningTime, simpleDateFormat.format(new Date()));
boolean update = this.update(set);
return R.status(true);
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

@ -379,8 +379,8 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
}
@Override
public DistributionStockupStockListInfoVO selectStockListInfoSelf(Long reservationId, Long stockListId) {
return baseMapper.selectStockListInfoSelf(reservationId,stockListId);
public DistributionStockupStockListInfoVO selectStockListInfoSelf(Long reservationId, Long stockListId, Long allocationId) {
return baseMapper.selectStockListInfoSelf(reservationId,stockListId,allocationId);
}
@Override

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

@ -1289,7 +1289,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
@Override
public DistributionStockupStockListInfoVO selectStockListInfoSelf(Long reservationId, Long stockListId, Long allocationId) {
DistributionStockupStockListInfoVO entity = distributionStockListService.selectStockListInfoSelf(reservationId, stockListId);
DistributionStockupStockListInfoVO entity = distributionStockListService.selectStockListInfoSelf(reservationId, stockListId,allocationId);
List<StockListInfoListVO> list = distributionStockListService.selectStockListInfoSelfList(reservationId, stockListId);
entity.setStockList(list);
return entity;

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseGoodsAllocationController.java

@ -55,6 +55,7 @@ import javax.validation.Valid;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
/**
@ -523,7 +524,8 @@ public class WarehouseGoodsAllocationController extends BladeController {
return R.fail(e.code, e.message);
} catch (Exception e) {
log.error("/downStock系统异常,联系管理员", e);
return R.fail(500, "系统异常,联系管理员");
return R.fail(500, "系统异常," +
"联系管理员");
}
}

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

@ -400,6 +400,11 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
R<List<DictBiz>> distriType = dictBizClient.getList("distribution_type");
if(ObjectUtils.isNotNull(distriType)){
List<DictBiz> data1 = distriType.getData();
// data1.forEach( a ->{
// if(o.getServiceType().equals(a.getDictValue())){
// entryEntity.setServiceType(a.getDictKey()); //仓库名称
// }
// });
DictBiz dictBiz = data1.stream().filter(da -> {
return o.getServiceType().equals(da.getDictValue());
}).findAny().get();

Loading…
Cancel
Save