Browse Source

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

dist.1.3.0
pref_mail@163.com 9 months ago
parent
commit
72d71ff6da
  1. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/factorydata/FactoryDataConstants.java
  2. 4
      blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/entity/BasicTenantCodeEntity.java
  3. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java
  4. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java
  5. 8
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java
  6. 4
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseTrayTypeClient.java
  7. 4
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.xml
  8. 27
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java
  9. 7
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTrayServiceImpl.java
  10. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/PushInstallDTO.java
  11. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  12. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  13. 26
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  14. 79
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/entity/FactoryNodePushEntity.java
  15. 52
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/enums/FactoryNodeEnums.java
  16. 63
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/enums/NodeMappingEnums.java
  17. 34
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/enums/NodeNeedEnums.java
  18. 16
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mapper/FactoryNodePushMapper.java
  19. 5
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mapper/FactoryNodePushMapper.xml
  20. 261
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mq/NodeDataPushListener.java
  21. 65
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/pros/JinPaiProperties.java
  22. 14
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/service/FactoryNodePushService.java
  23. 22
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/service/impl/FactoryNodePushServiceImpl.java
  24. 5
      blade-service/logpm-factory/src/main/java/com/logpm/factory/aspect/JobAnnotationAspect.java
  25. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/bean/Resp.java
  26. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/dto/OrderDetailsDTO.java
  27. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml
  28. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml
  29. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.java
  30. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml
  31. 18
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml
  32. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  33. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml
  34. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingPackageServicie.java
  35. 26
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java
  36. 24
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java
  37. 18
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  38. 13
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java
  39. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java
  40. 79
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingPackageServiceImpl.java
  41. 99
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java
  42. 131
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  43. 10
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayTypeClient.java
  44. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java

2
blade-biz-common/src/main/java/org/springblade/common/constant/factorydata/FactoryDataConstants.java

@ -87,6 +87,7 @@ public abstract class FactoryDataConstants {
/**
* 金牌工厂订单
*/
String JP_NODE_DATA_PUSH = "factory.data.queue.jp.nodeDataPush" + DEVAUTH;
String JP_FACTORY_ORDER = "factory.data.queue.jp.factoryOrder" + DEVAUTH;
/**
* 皮阿诺作业节点数据推送
@ -137,6 +138,7 @@ public abstract class FactoryDataConstants {
/**
* 金牌工厂订单
*/
String JP_NODE_DATA_PUSH = "jp.nodeDataPush" + DEVAUTH;
String JP_FACTORY_ORDER = "jp.factoryOrder" + DEVAUTH;
/**
* 皮阿诺作业节点数据推送

4
blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/entity/BasicTenantCodeEntity.java

@ -65,6 +65,10 @@ public class BasicTenantCodeEntity extends TenantEntity implements Serializable
@ApiModelProperty(value = "编码")
private String code;
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "简称")
private String desName;
@ApiModelProperty(value = "预留1")
private String reserve1;
/**

3
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java

@ -30,6 +30,7 @@ public class LoadCarsDTO implements Serializable {
private Integer pageSize;
private String loadCarsNo;
private String loadStatus;
private Long warehouseId;
@ -150,4 +151,6 @@ public class LoadCarsDTO implements Serializable {
private Date unloadTimeStart;
private Date unloadTimeEnd;
private String carsNo;
}

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

@ -34,5 +34,6 @@ public class TrunklineBillladingWaybillVO extends TrunklineBillladingWaybillEnti
private Long billladingWaybillId;
private Integer totalPlanNum;
private Integer scanNum;
private Integer noBillladingNum;
}

8
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java

@ -241,6 +241,12 @@ public class WarehouseRetentionScanEntity extends TenantEntity {
@ApiModelProperty(value = "运单Id")
private Long waybillId;
/**
* 装车记录Id
*/
@ApiModelProperty(value = "运单Id")
private Long loadingId;
/**
* 仓库Id
*/
@ -251,6 +257,6 @@ public class WarehouseRetentionScanEntity extends TenantEntity {
* 仓库名称
*/
@ApiModelProperty(value = "运单Id")
private Long warehouseName;
private String warehouseName;
}

4
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseTrayTypeClient.java

@ -18,6 +18,7 @@ package com.logpm.warehouse.feign;
import com.alibaba.fastjson.JSONObject;
import com.logpm.warehouse.entity.WarehouseTrayTypeEntity;
import com.logpm.warehouse.vo.TrayTypeDataVO;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.tool.api.R;
@ -74,4 +75,7 @@ public interface IWarehouseTrayTypeClient {
@GetMapping(API_PREFIX+"/trayToNull")
void trayToNull(@RequestParam String trayCode,@RequestParam String remark);
@GetMapping(API_PREFIX+"/findTrayTypeEntity")
WarehouseTrayTypeEntity findTrayTypeEntity(@RequestParam String trayCode);
}

4
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.xml

@ -57,9 +57,7 @@
<if test="param.dealDateEnd !=null">
and deal_time &lt;= #{param.dealDateEnd}
</if>
order by up_time desc
order by create_time desc
</select>
<select id="findListByCarsNoAndUpWarehouseId" resultType="com.alibaba.fastjson.JSONObject">

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

@ -1,10 +1,9 @@
package com.logpm.basicdata.service.impl;
import com.logpm.basic.entity.BasicTenantCodeEntity;
import com.logpm.basic.feign.IBasicTenantCodeClient;
import com.logpm.basicdata.entity.BasicdataCodeRecordEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.basicdata.mapper.BasicdataTrayMapper;
import com.logpm.basicdata.service.IBasicdataCodeRecordService;
import com.logpm.basicdata.service.IBasicdataCodeService;
import com.logpm.basicdata.service.IBasicdataWarehouseService;
@ -29,14 +28,12 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
private final IBasicTenantCodeClient basicTenantCodeClient;
private final IBasicdataWarehouseClient basicdataWarehouseClient;
private final IBasicdataWarehouseService basicdataWarehouseService;
private final BasicdataTrayMapper basicdataTrayMapper;
private final IBasicdataCodeRecordService basicdataCodeRecordService;
private final IBasicTenantCodeClient tenantCodeClient;
/**
* 根据类型生成编号
* @param type
@ -409,6 +406,14 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
}
private String generateTraysCode(Integer type, String warehouseCode) {
BasicTenantCodeEntity basicTenantCode = tenantCodeClient.findBasicTenantCodeByCodeAndShowType("1", 6);
if(Objects.isNull(basicTenantCode)){
log.warn("############generateTraysCode: 租户信息不存在basicTenantCode={}",basicTenantCode);
return null;
}
String desName = basicTenantCode.getDesName();
String code = basicTenantCode.getCode();
if(!StringUtil.hasLength(warehouseCode)){
log.warn("############generateTraysCode: 仓库编码为空warehouseCode={}",warehouseCode);
return null;
@ -421,6 +426,9 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
return null;
}
String abbreviation = basicdataWarehouseEntity.getAbbreviation();
Calendar calendar = Calendar.getInstance();
//获取年份
Integer year = calendar.get(Calendar.YEAR);
@ -439,7 +447,7 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
basicdataCodeRecordEntity.setWarehouseCode(warehouseCode);
basicdataCodeRecordEntity.setYear(year+"");
basicdataCodeRecordEntity.setMonth(month+"");
basicdataCodeRecordEntity.setNum(0);
basicdataCodeRecordEntity.setNum(100000);
basicdataCodeRecordService.save(basicdataCodeRecordEntity);
}
Integer inrc = basicdataCodeRecordEntity.getNum() + 1;
@ -447,7 +455,10 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
basicdataCodeRecordEntity.setNum(inrc);
basicdataCodeRecordService.updateById(basicdataCodeRecordEntity);
return "HT"+warehouseCode+year+CommonUtil.geFourNumber(month.longValue(),2)+CommonUtil.geFourNumber(inrc.longValue(),5);
String trayCode = "T" + code + year + CommonUtil.geFourNumber(month.longValue(), 2) + inrc;
String trayName = desName + abbreviation + inrc;
return trayCode+"&&"+trayName;
}

7
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTrayServiceImpl.java

@ -120,7 +120,7 @@ public class BasicdataTrayServiceImpl extends BaseServiceImpl<BasicdataTrayMappe
basicdataTrayEntity = new BasicdataTrayEntity();
BeanUtils.copyProperties(basicdataTrayDTO,basicdataTrayEntity);
//String trayCode = tenantCodeClient.shelfCode(AuthUtil.getTenantId(), "6");
String trayCode = basicdataCodeClient.getCodeByType(CodeNumConstant.TRAYS,basicdataWarehouseEntity.getWarehouseCode(),"465897");
String trayInfo = basicdataCodeClient.getCodeByType(CodeNumConstant.TRAYS,basicdataWarehouseEntity.getWarehouseCode(),"465897");
// basicdataTrayEntity.setTrayStatus("1");
//String uuid = "1" + Func.random(18, RandomType.INT).trim();
//long id = Long.parseLong(uuid);
@ -132,8 +132,9 @@ public class BasicdataTrayServiceImpl extends BaseServiceImpl<BasicdataTrayMappe
// basicdataTrayEntity.setIsDeleted(0);
// basicdataTrayEntity.setStatus(1);
// basicdataTrayEntity.setId(id);
basicdataTrayEntity.setPalletCode(trayCode);
basicdataTrayEntity.setPalletName(trayCode);
String[] split = trayInfo.split("&&");
basicdataTrayEntity.setPalletCode(split[0]);
basicdataTrayEntity.setPalletName(split[1]);
basicdataTrayEntities.add(basicdataTrayEntity);
}
result = this.saveBatch(basicdataTrayEntities);

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/PushInstallDTO.java

@ -1,11 +1,9 @@
package com.logpm.distribution.dto;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
import java.util.function.Consumer;
@Data
public class PushInstallDTO implements Serializable {
@ -36,7 +34,7 @@ public class PushInstallDTO implements Serializable {
private List<OrderDetail> order_detail;
@Data
public static class Order implements Serializable{
public static class Order implements Serializable{
private static final long serialVersionUID = 1L;
private String waybill_no;
@ -49,7 +47,7 @@ public class PushInstallDTO implements Serializable {
@Data
public static class OrderDetail implements Serializable {
public static class OrderDetail implements Serializable {
private static final long serialVersionUID = 1L;
private String waybill_no;
@ -62,7 +60,7 @@ public class PushInstallDTO implements Serializable {
private String number;
}
}

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

@ -3053,6 +3053,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionSignforEntity.setDeliveryId(deliveryListEntityId);
distributionSignforEntity.setTrainNumber(deliveryListEntity.getTrainNumber());
distributionSignforEntity.setReservationId(reservationEntity.getId());
distributionSignforEntity.setWarehouseId(myCurrentWarehouse.getId());
distributionSignforEntity.setWarehouseName(myCurrentWarehouse.getName());
distributionSignforService.save(distributionSignforEntity);
//这里查看这个配送任务的备货任务是否已完成,如果已完成则需要开新的备货任务,否则将这个新的预约和原来的备货任务建立绑定关系
DistributionStockupInfoEntity stockupInfoEntity = new DistributionStockupInfoEntity();

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

@ -1233,6 +1233,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionSignforEntity.setDeliveryId(distributionDeliveryListEntity.getId());
distributionSignforEntity.setSigningStatus(SignforStatusConstant.daiqianshou.getValue());
distributionSignforEntity.setDriverSigning(SignforStatusConstant.daiqianshou.getValue());
distributionSignforEntity.setWarehouseId(myCurrentWarehouse.getId());
distributionSignforEntity.setWarehouseName(myCurrentWarehouse.getName());
distributionSignforService.save(distributionSignforEntity);
//修改预约信息为待配送
reservationEntity.setReservationStatus(ReservationStatusConstant.daipeisong.getValue());
@ -2353,6 +2355,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionSignforEntity.setReservationId(reservationEntity.getId());
distributionSignforEntity.setTrainNumber(trainNumberMa);
distributionSignforEntity.setDeliveryId(distributionDeliveryListEntity.getId());
distributionSignforEntity.setWarehouseId(myCurrentWarehouse.getId());
distributionSignforEntity.setWarehouseName(myCurrentWarehouse.getName());
distributionSignforService.save(distributionSignforEntity);
deliveryWarehouseName.add(reservationEntity.getWarehouseName());
});

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

@ -2584,19 +2584,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
String info = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(","));
log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}", deliveryListEntity.getTrainNumber(), info);
return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常");
} else {
//这里需要判定文员是否对该异常进行驳回操作
List<DistributionLoadscanAbnormalEntity> LoadscanAbnormalEntityList = abnormalEntities.stream().filter(f -> deliveryListEntity.getId().equals(f.getDeliveryListId()) && distrilbutionloadingscanDTO.getReservationId().equals(f.getReservationId())).collect(Collectors.toList());
if (!LoadscanAbnormalEntityList.isEmpty()) {
//存在异常操作
if (LoadscanAbnormalEntityList.size() == 1) {
//判断是否进行审核以及驳货操作
DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity = LoadscanAbnormalEntityList.get(0);
if (distributionLoadscanAbnormalEntity.getAuditingStatus().equals(3)) {
return Resp.scanFail("包件异常已驳回", "包件异常已驳回");
}
}
}
}
//判断具体的装车信息
}
@ -2773,6 +2760,19 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (parcelListEntity.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())) {
return Resp.scanFail("包件已签收", "包件已签收");
} else {
//查询是否存在异常驳回操作
DistributionLoadscanAbnormalEntity abnormalEntity = distributionLoadscanAbnormalService.getOne(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.eq(DistributionLoadscanAbnormalEntity::getDeliveryListId, distrilbutionloadingscanDTO.getDeliveryId())
.eq(DistributionLoadscanAbnormalEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId())
.eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode())
);
//查询是否存在驳回操作
if (!Func.isEmpty(abnormalEntity)){
if (abnormalEntity.getAuditingStatus().equals(3)) {
return Resp.scanFail("包件异常已驳回", "包件异常已驳回");
}
}
return R.fail(3006, null);
}
} else {

79
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/entity/FactoryNodePushEntity.java

@ -0,0 +1,79 @@
package com.logpm.factorydata.jinpai.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springblade.core.mp.base.BaseEntity;
/**
* 节点数据推送成功数据
*
* @Author zqb
* @Date 2024/3/26
**/
@Builder
@Data
@TableName("jinpai_factory_node_push")
@ApiModel(value = "节点数据推送成功数据", description = "节点数据推送成功数据")
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class FactoryNodePushEntity extends BaseEntity {
/**
* 预留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;
/**
* 订单号
*/
@ApiModelProperty(name = "订单号", notes = "")
private String orderCode;
/**
* 节点
*/
@ApiModelProperty(name = "节点", notes = "")
private String node;
/**
* 包件
*/
@ApiModelProperty(name = "包件", notes = "")
private String packageCode;
/**
* 内容
*/
@ApiModelProperty(name = "内容", notes = "")
private String content;
/**
* 返回值
*/
@ApiModelProperty(name = "返回值", notes = "")
private String resultContent;
}

52
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/enums/FactoryNodeEnums.java

@ -0,0 +1,52 @@
package com.logpm.factorydata.jinpai.enums;
import lombok.Getter;
import java.util.ArrayList;
import java.util.List;
/**
* 工厂节点枚举
*
* @author zhaoqiaobo
* @create 2024-03-20 15:19
*/
@Getter
public enum FactoryNodeEnums {
/**
* 到达目的站
*/
FINAL_NET_ARRIVE_CAR(1030100,"到达目的站", 1),
/**
* 包件入库
*/
UNLOAD_INCOMING_WAREHOUSE(105010,"包件入库", 1)
;
private Integer code;
private String text;
private Integer mustPush;
FactoryNodeEnums(Integer code, String text, Integer mustPush) {
this.code = code;
this.text = text;
this.mustPush = mustPush;
}
/**
* 获取所有必推节点的编码
*
* @return
*/
public static List<Integer> getMustPushCode() {
List<Integer> list = new ArrayList<>();
for (FactoryNodeEnums value : FactoryNodeEnums.values()) {
if (value.getMustPush() == 1) {
list.add(value.getCode());
}
}
return list;
}
}

63
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/enums/NodeMappingEnums.java

@ -0,0 +1,63 @@
package com.logpm.factorydata.jinpai.enums;
import cn.hutool.core.util.ObjectUtil;
import lombok.Getter;
import org.springblade.common.constant.WorkNodeEnums;
/**
* 系统和工厂节点映射枚举
*
* @author zhaoqiaobo
* @create 2024-03-20 15:19
*/
@Getter
public enum NodeMappingEnums {
/**
* 到达目的站
*/
FINAL_NET_ARRIVE_CAR(FactoryNodeEnums.FINAL_NET_ARRIVE_CAR, WorkNodeEnums.FINAL_NET_ARRIVE_CAR, 1),
/**
* 包件入库
*/
UNLOAD_INCOMING_WAREHOUSE(FactoryNodeEnums.UNLOAD_INCOMING_WAREHOUSE, WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE, 1),
;
/**
* 系统作业节点
*/
private WorkNodeEnums workNodeEnums;
/**
* 工厂作业节点
*/
private FactoryNodeEnums factoryNodeEnums;
/**
* 状态码
* 存在我们系统同一个作业节点对应工厂多个节点的情况通过状态码区分
*/
private Integer status;
NodeMappingEnums(FactoryNodeEnums factoryNodeEnums, WorkNodeEnums workNodeEnums, Integer status) {
this.workNodeEnums = workNodeEnums;
this.factoryNodeEnums = factoryNodeEnums;
this.status = status;
}
public static FactoryNodeEnums getFactoryByNodeAndStatus(WorkNodeEnums workNodeEnums) {
return getFactoryByNodeAndStatus(workNodeEnums, 1);
}
public static FactoryNodeEnums getFactoryByNodeAndStatus(WorkNodeEnums workNodeEnums, Integer status) {
NodeMappingEnums[] values = values();
for (NodeMappingEnums value : values) {
WorkNodeEnums workNodeEnums1 = value.getWorkNodeEnums();
Integer status1 = value.getStatus();
FactoryNodeEnums factoryNodeEnums = value.getFactoryNodeEnums();
if (ObjectUtil.equal(workNodeEnums1, workNodeEnums) && ObjectUtil.equal(status1, status)) {
return factoryNodeEnums;
}
}
return null;
}
}

34
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/enums/NodeNeedEnums.java

@ -0,0 +1,34 @@
package com.logpm.factorydata.jinpai.enums;
import lombok.Getter;
import java.io.Serializable;
/**
* 作业节点枚举
*
* @author zhaoqiaobo
* @create 2024-03-20 15:19
*/
@Getter
public enum NodeNeedEnums implements Serializable {
/**
* 到达目的站
*/
FINAL_NET_ARRIVE_CAR(1030100,"到达目的站"),
/**
* 包件入库
*/
UNLOAD_INCOMING_WAREHOUSE(105010,"包件入库")
;
private Integer code;
private String value;
NodeNeedEnums(Integer code, String value) {
this.code = code;
this.value = value;
}
}

16
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mapper/FactoryNodePushMapper.java

@ -0,0 +1,16 @@
package com.logpm.factorydata.jinpai.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.factorydata.jinpai.entity.FactoryNodePushEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 装箱包信息 mapper
*
* @author zqb
* @since 2024-03-26
*/
@Mapper
public interface FactoryNodePushMapper extends BaseMapper<FactoryNodePushEntity> {
}

5
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mapper/FactoryNodePushMapper.xml

@ -0,0 +1,5 @@
<?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.factorydata.jinpai.mapper.FactoryNodePushMapper">
</mapper>

261
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mq/NodeDataPushListener.java

@ -0,0 +1,261 @@
package com.logpm.factorydata.jinpai.mq;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.UUID;
import cn.hutool.core.util.EnumUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.factorydata.feign.IFactoryDataClient;
import com.logpm.factorydata.jinpai.entity.FactoryNodePushEntity;
import com.logpm.factorydata.jinpai.entity.PushOrderDetailEntity;
import com.logpm.factorydata.jinpai.entity.PushOrderEntity;
import com.logpm.factorydata.jinpai.enums.FactoryNodeEnums;
import com.logpm.factorydata.jinpai.enums.NodeNeedEnums;
import com.logpm.factorydata.jinpai.pros.JinPaiProperties;
import com.logpm.factorydata.jinpai.service.FactoryNodePushService;
import com.logpm.factorydata.jinpai.service.PushOrderDetailService;
import com.logpm.factorydata.jinpai.service.PushOrderService;
import com.logpm.factorydata.vo.PushData;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.WorkNodeEnums;
import org.springblade.common.constant.factorydata.FactoryDataConstants;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
/**
* 监听业务系统推送给工厂的节点数据
*
* @author zhaoqiaobo
* @create 2024-03-18 0:02
*/
@Slf4j
@Component
@AllArgsConstructor
public class NodeDataPushListener {
private final IFactoryDataClient factoryDataClient;
private final PushOrderDetailService pushOrderDetailService;
private final PushOrderService pushOrderService;
private final FactoryNodePushService factoryNodePushService;
private final JinPaiProperties jinPaiProperties;
@RabbitListener(bindings = @QueueBinding(
value = @Queue(name = FactoryDataConstants.Mq.Queues.JP_NODE_DATA_PUSH, durable = "true"),
exchange = @Exchange(name = FactoryDataConstants.Mq.Exchanges.NODE_DATA_PUSH_DELAYED, type = ExchangeTypes.TOPIC
, delayed = FactoryDataConstants.Mq.DELAYED),
key = FactoryDataConstants.Mq.RoutingKeys.JP_NODE_DATA_PUSH
))
public void nodeDataPushDelayed(String msg) {
// 直接调用nodeDataPush方法处理接收到的消息
nodeDataPush(msg);
}
@RabbitListener(bindings = @QueueBinding(
value = @Queue(name = FactoryDataConstants.Mq.Queues.JP_NODE_DATA_PUSH, durable = "true"),
exchange = @Exchange(name = FactoryDataConstants.Mq.Exchanges.NODE_DATA_PUSH, type = ExchangeTypes.TOPIC),
key = FactoryDataConstants.Mq.RoutingKeys.JP_NODE_DATA_PUSH
))
@Transactional(rollbackFor = Exception.class)
public void nodeDataPush(String msg) {
// {"brand":"ZBOM","node":"TRANSFER_WAREHOUSE_DEPART","operator":"","operatorTime":"","content":[{"packageCode":"1423090693445"}]}
log.info("接收到节点数据推送:{}", msg);
// 1 校验数据
if (checkData(msg)) {
return;
}
JSONObject entries = JSONUtil.parseObj(msg);
// 节点
String node = entries.getStr("node");
String main = entries.getStr("main");
WorkNodeEnums workNodeEnums = EnumUtil.fromString(WorkNodeEnums.class, node);
// 2 获取业务数据
List<PushData> content = entries.getBeanList("content", PushData.class);
// 数据按订单分组
// 3 拿到所有必推节点的code
List<Integer> mustPushCode = FactoryNodeEnums.getMustPushCode();
if (CollUtil.isNotEmpty(content)) {
// 查询出本次操作的所有订单
Set<String> orderCodes = content.stream().map(PushData::getOrderCode).collect(Collectors.toSet());
if (CollUtil.isEmpty(orderCodes)) {
log.info("订单数据为空,不处理:{}", JSONUtil.toJsonStr(content));
return;
}
List<PushOrderDetailEntity> orderDetailEntities = pushOrderDetailService.list(Wrappers.<PushOrderDetailEntity>lambdaQuery()
.in(PushOrderDetailEntity::getCustomItemNo, orderCodes)
);
if (CollUtil.isEmpty(orderDetailEntities)) {
log.info("未查到包件数据,不处理:{}", JSONUtil.toJsonStr(content));
return;
}
Map<Long, String> orderCodeMap = orderDetailEntities.stream().collect(Collectors.toMap(PushOrderDetailEntity::getId, PushOrderDetailEntity::getCustomItemNo));
Map<String, PushOrderDetailEntity> detailEntityMap = orderDetailEntities.stream().collect(Collectors.toMap(PushOrderDetailEntity::getCustomItemNo, v -> v));
List<String> orderIds = orderDetailEntities.stream().map(PushOrderDetailEntity::getOrderId).collect(Collectors.toList());
Map<String, PushOrderEntity> pushOrderEntityMap = new HashMap<>();
if (CollUtil.isNotEmpty(orderIds)) {
List<PushOrderEntity> pushOrderEntities = pushOrderService.listByIds(orderIds);
if (CollUtil.isNotEmpty(pushOrderEntities)) {
pushOrderEntities.forEach(pushOrderEntity -> {
pushOrderEntityMap.put(orderCodeMap.get(pushOrderEntity.getId()), pushOrderEntity);
});
}
}
List<FactoryNodePushEntity> pushEntities = factoryNodePushService.list(Wrappers.<FactoryNodePushEntity>lambdaQuery()
.in(FactoryNodePushEntity::getOrderCode, orderCodes)
);
// 到站还是入库
if (workNodeEnums.equals(WorkNodeEnums.FINAL_NET_ARRIVE_CAR)) {
Map<String, FactoryNodePushEntity> pushEntityMap = new HashMap<>();
if (CollUtil.isNotEmpty(pushEntities)) {
pushEntityMap = pushEntities.stream().filter(pushEntity -> {
return pushEntity.getNode().equals(FactoryNodeEnums.FINAL_NET_ARRIVE_CAR.getCode());
}).collect(Collectors.toMap(FactoryNodePushEntity::getOrderCode, v -> v));
}
JSONObject mainJson = JSONUtil.parseObj(main);
// 到站 一个订单只发送一次
for (String orderCode : orderCodes) {
if (pushEntityMap.containsKey(orderCode)) {
continue;
}
PushOrderDetailEntity pushOrderDetailEntity = detailEntityMap.get(orderCode);
String boxCodeList = pushOrderDetailEntity.getBoxCodeList();
JSONArray boxCodeListJson = JSONUtil.parseArray(boxCodeList);
JSONArray details = new JSONArray();
boxCodeListJson.forEach(item -> {
JSONObject jsonObject = new JSONObject();
jsonObject.set(item.toString(), 1);
details.add(jsonObject);
});
if (!CollUtil.contains(pushEntityMap.keySet(), orderCode)) {
JSONObject js = new JSONObject();
js.set("extOrderNo", orderCode);
js.set("extWaybillNO", mainJson.getStr("serviceNumber"));
js.set("detail", details);
js.set("shipNo", mainJson.getStr("waybillNumber"));
js.set("targetNo", pushOrderEntityMap.get(orderCode).getTransportNo());
js.set("targetType", "1");
js.set("doType", "32");
js.set("doLocation", "");
js.set("doTime", DateUtil.now());
js.set("sendSite", mainJson.getStr("sendWarehouseName"));
js.set("endSite", mainJson.getStr("warehouseName"));
js.set("passSite", mainJson.getStr("acceptWarehouseName"));
js.set("doRemark", "");
js.set("reqSn", pushOrderEntityMap.get(orderCode).getId());
js.set("syscode", "huitong");
js.set("carNo", mainJson.getStr("carNumber"));
js.set("carHangNo", "");
js.set("driverName", mainJson.getStr("driverName"));
js.set("driverPhone", mainJson.getStr("driverMobile"));
js.set("carType", "A");
js.set("carSize", "1");
// js.set("arriveFor", "");
log.info("推送工厂:{}", js);
String url = jinPaiProperties.getOldSystemHost() + jinPaiProperties.getOldSystemArrivedUrl();
try {
if (jinPaiProperties.getEnable()) {
String result = HttpUtil.post(url, JSONUtil.toJsonStr(js));
log.info("推送工厂结果:{}", result);
// 保存推送记录
factoryNodePushService.save(FactoryNodePushEntity.builder()
.orderCode(orderCode)
.node(FactoryNodeEnums.FINAL_NET_ARRIVE_CAR.getCode().toString())
.content(JSONUtil.toJsonStr(js))
.resultContent(result)
.build());
}
} catch (Exception e) {
log.error("推送工厂失败:{}", e);
}
}
}
} else {
// 入库一个包件一次
Map<String, FactoryNodePushEntity> pushEntityMap = new HashMap<>();
if (CollUtil.isNotEmpty(pushEntities)) {
pushEntityMap = pushEntities.stream().filter(pushEntity -> {
return pushEntity.getNode().equals(FactoryNodeEnums.UNLOAD_INCOMING_WAREHOUSE.getCode());
}).collect(Collectors.toMap(FactoryNodePushEntity::getPackageCode, v -> v));
}
for (PushData pushData : content) {
if (!CollUtil.contains(pushEntityMap.keySet(), pushData.getPackageCode())) {
JSONObject js = new JSONObject();
js.set("extOrderNo", pushData.getOrderCode());
js.set("extWaybillNO", detailEntityMap.get(pushData.getOrderCode()).getCustomOrderNo());
js.set("transportNo", pushOrderEntityMap.get(pushData.getOrderCode()).getTransportNo());
js.set("doTime", entries.getStr("operatorTime"));
js.set("syscode", "huitong");
js.set("reqSn", UUID.randomUUID());
// js.set("arriveFor", "");
JSONObject detailJson = new JSONObject();
detailJson.set(pushData.getPackageCode(), 1);
js.set("detail", detailJson.toString());
js.set("shipNo", pushData.getWaybillNumber());
log.info("推送工厂:{}", js);
String url = jinPaiProperties.getOldSystemHost() + jinPaiProperties.getOldSystemAlreadyStockedUrl();
try {
if (jinPaiProperties.getEnable()) {
String result = HttpUtil.post(url, JSONUtil.toJsonStr(js));
log.info("推送工厂结果:{}", result);
// 保存推送记录
factoryNodePushService.save(FactoryNodePushEntity.builder()
.orderCode(pushData.getOrderCode())
.node(FactoryNodeEnums.UNLOAD_INCOMING_WAREHOUSE.getCode().toString())
.content(JSONUtil.toJsonStr(js))
.resultContent(result)
.build());
}
} catch (Exception e) {
log.error("推送工厂失败:{}", e);
}
}
}
}
}
}
private boolean checkData(String msg) {
if (StrUtil.isEmpty(msg)) {
return true;
}
if (!msg.contains("brand") || !msg.contains("content") || !msg.contains("node")) {
return true;
}
JSONObject entries = JSONUtil.parseObj(msg);
String node = entries.getStr("node");
if (StrUtil.isEmpty(node)) {
return true;
}
// 不是志邦需要的节点数据直接不处理
if (!EnumUtil.contains(NodeNeedEnums.class, node)) {
return true;
}
WorkNodeEnums workNodeEnums = EnumUtil.fromString(WorkNodeEnums.class, node);
if (ObjectUtil.isEmpty(workNodeEnums)) {
return true;
}
List<JSONObject> content = entries.getBeanList("content", JSONObject.class);
if (CollUtil.isEmpty(content)) {
return true;
}
return false;
}
}

65
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/pros/JinPaiProperties.java

@ -0,0 +1,65 @@
package com.logpm.factorydata.jinpai.pros;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* FactoryProperties
*
* @author pref
*/
@Data
@ConfigurationProperties(prefix = "jinpai")
@Component
public class JinPaiProperties {
/**
* 金牌工厂推送节点数据url
*/
private String pushNodeUrl;
/**
* 是否推送工厂
*/
private Boolean enable = true;
/**
* 金牌工厂主机地址
*/
private String host;
/**
* 承运商编码
*/
private String carrierCode;
/**
* 补节点数据时的延时时间分钟
*/
private Integer delayedTime = 30;
/**
* 生成老系统暂存单
*/
private Boolean oldAdvance = false;
/**
* 生成新系统暂存单
*/
private Boolean newAdvance = false;
/**
* 老系统host
*/
private String oldSystemHost;
/**
* 老系统回传到达url
*/
private String oldSystemArrivedUrl;
/**
* 老系统回传入库url
*/
private String oldSystemAlreadyStockedUrl;
}

14
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/service/FactoryNodePushService.java

@ -0,0 +1,14 @@
package com.logpm.factorydata.jinpai.service;
import com.logpm.factorydata.jinpai.entity.FactoryNodePushEntity;
import org.springblade.core.mp.base.BaseService;
/**
* 推送工厂节点数据 服务类
*
* @Author zqb
* @Date 2024/4/26
**/
public interface FactoryNodePushService extends BaseService<FactoryNodePushEntity> {
}

22
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/service/impl/FactoryNodePushServiceImpl.java

@ -0,0 +1,22 @@
package com.logpm.factorydata.jinpai.service.impl;
import com.logpm.factorydata.jinpai.entity.FactoryNodePushEntity;
import com.logpm.factorydata.jinpai.mapper.FactoryNodePushMapper;
import com.logpm.factorydata.jinpai.service.FactoryNodePushService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* 装箱包信息 业务实现类
*
* @Author zqb
* @Date 2024/4/26
**/
@Slf4j
@Service
@AllArgsConstructor
public class FactoryNodePushServiceImpl extends BaseServiceImpl<FactoryNodePushMapper, FactoryNodePushEntity> implements FactoryNodePushService {
}

5
blade-service/logpm-factory/src/main/java/com/logpm/factory/aspect/JobAnnotationAspect.java

@ -1,7 +1,5 @@
package com.logpm.factory.aspect;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import lombok.AllArgsConstructor;
@ -10,7 +8,6 @@ import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springblade.common.cache.CacheNames;
import org.springblade.common.component.MockLoginService;
import org.springblade.common.constant.LauncherConstant;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.redis.lock.LockType;
import org.springblade.core.redis.lock.RedisLockClient;
@ -22,8 +19,6 @@ import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;

9
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/bean/Resp.java

@ -16,6 +16,15 @@ public class Resp extends R {
return resp;
}
public static Resp scanData(String msg,String audio,Object data){
Resp resp = new Resp();
resp.setCode(200);
resp.setMsg(msg);
resp.setData(data);
resp.setAudio(audio);
return resp;
}
public static Resp scanFail(String msg,String audio){
Resp resp = new Resp();
resp.setCode(3001);

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/dto/OrderDetailsDTO.java

@ -25,6 +25,7 @@ public class OrderDetailsDTO implements Serializable {
private String brand;
private String firsts;//一级品类
private String sencods;//二级品类
private String thirds;//三级品类
private String trainNumber;//客户号车次号
@ -35,7 +36,8 @@ public class OrderDetailsDTO implements Serializable {
private String sendDateStr;//发货时间
private String createUserName;//创建人
private Date createTimeStart;//创建时间
private String createTimeStr;//创建时间
private String createTimeStartStr;//创建时间
private String createTimeEndStr;//创建时间
private Date createTimeEnd;//创建时间
}

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

@ -294,6 +294,15 @@
<if test="param.deliveryTrainNumber != null and param.deliveryTrainNumber != '' ">
and lddl.train_number = #{param.deliveryTrainNumber}
</if>
<if test="param.firsts != null and param.firsts != '' ">
and LOCATE(#{param.firsts}, ltad.first_pack_name) > 0
</if>
<if test="param.sencods != null and param.sencods != '' ">
and LOCATE(#{param.sencods}, ltad.second_pack_name) > 0
</if>
<if test="param.thirds != null and param.thirds != '' ">
and LOCATE(#{param.thirds}, ltad.third_pack_name) > 0
</if>
<if test="param.nowWarehouseId != null ">
and ldpl.warehouse_id = #{param.nowWarehouseId}
</if>
@ -309,9 +318,6 @@
<if test="param.createTimeEnd != null ">
and ltad.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.createTimeEnd != null and param.createTimeEnd != '' ">
and ltad.create_time = #{param.sendDateStr}
</if>
</select>

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml

@ -80,8 +80,8 @@
carrier_name carrierName,
remark remark
from logpm_trunkline_billlading
where billlading_status = '2'
where billlading_status = #{param.billladingStatus}
AND warehouse_id = #{param.warehouseId}
</select>
<select id="findWaybillListNotBillladingId" resultType="com.logpm.warehouse.vo.WarehouseWaybillVO">

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.java

@ -18,4 +18,6 @@ public interface TrunklineBillladingPackageMapper extends BaseMapper<TrunklineBi
TrunklineBillladingPackageEntity findBillladingPackage(@Param("packageCode") String packageCode);
List<String> findBillladingPackages(@Param("orderPackageCodes") List<String> orderPackageCodes);
List<TrunklineBillladingPackageEntity> findListByBillladingAndWaybillId(@Param("billladingId") Long billladingId, @Param("waybillId") Long waybillId);
}

9
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml

@ -73,4 +73,13 @@
</foreach>
</select>
<select id="findListByBillladingAndWaybillId" resultType="com.logpm.trunkline.entity.TrunklineBillladingPackageEntity">
select ltbp.*
from logpm_trunkline_billlading_package ltbp
left join logpm_trunkline_advance_detail ltad on ltad.order_package_code = ltbp.order_package_code
where ltbp.billlading_id = #{billladingId}
and ltad.waybill_id = #{waybillId}
</select>
</mapper>

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

@ -22,8 +22,8 @@
<select id="findWaybillInfoListByBillladingId" resultType="com.logpm.trunkline.vo.TrunklineBillladingWaybillVO">
select ltb.billlading_code billadingCode,
ltad.waybill_id waybillId,
ltad.waybill_no waybillNo,
ltbw.waybill_id waybillId,
ltbw.waybill_no waybillNo,
ltbw.id billladingWaybillId,
lww.create_time openOrderTime,
lww.goods_name goodsName,
@ -45,17 +45,19 @@
ltbw.real_num realNum,
ltbw.billlading_fee billladingFee,
lww.collect_pay collectPay,
count(ltad.id) scanNum
t.num scanNum
from logpm_trunkline_billlading_waybill ltbw
left join logpm_trunkline_billlading_package ltbp on ltbw.billlading_id = ltbp.billlading_id
left join logpm_trunkline_advance_detail ltad on ltad.order_package_code = ltbp.order_package_code and ltad.waybill_id = ltbw.waybill_id
left join (select IFNULL(ltad.waybill_no,'————') waybillNo,
COUNT(ltbp.id) num
from logpm_trunkline_billlading_package ltbp
left join logpm_platform.logpm_trunkline_advance_detail ltad on ltbp.order_package_code = ltad.order_package_code
where ltbp.billlading_id=#{billladingId}
group by IFNULL(ltad.waybill_no,'————')) t on t.waybillNo = ltbw.waybill_no
left join logpm_trunkline_billlading ltb on ltb.id = ltbw.billlading_id
left join logpm_warehouse_waybill lww on lww.waybill_no = ltbw.waybill_no
where ltbw.billlading_id = #{billladingId}
and ltbw.is_deleted = 0
group by ltb.billlading_code,
ltbw.waybill_id,
ltbw.waybill_no
and ltbw.real_num > 0
</select>
<update id="updateDataByBillladingWaybillId" >

9
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -45,6 +45,12 @@
<if test="param.warehouseId != null" >
and ltcl.start_warehouse_id = #{param.warehouseId}
</if>
<if test="param.loadCarsNo != null and param.loadCarsNo != ''">
and ltcl.cars_no = #{param.loadCarsNo}
</if>
<if test="param.loadStatus != null and param.loadStatus != ''">
and ltcl.load_status = #{param.loadStatus}
</if>
group by ltcl.id,ltcl.cars_no,
ltcl.plan_loading_number,
ltcl.real_loading_number,
@ -387,6 +393,9 @@
<if test="param.endTime != null">
and ltcl.create_time &lt;= #{param.endTime}
</if>
<if test="param.loadCarsNo != null and param.loadCarsNo != ''">
and ltcl.cars_no &lt;= #{param.loadCarsNo}
</if>
group by ltcl.id
order by ltcl.create_time desc
</select>

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml

@ -97,6 +97,9 @@
<if test="param.loadId != null">
and ltlso.load_id = #{param.loadId}
</if>
<if test="param.loadCarsNo != null param.loadCarsNo != ''">
and ltcl.cars_no = #{param.loadCarsNo}
</if>
<if test="param.signStatus != null and param.signStatus == '20'">
and ltlso.sign_status = '20'
and ltlso.sign_time &gt;= #{param.enterTimeStart}

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingPackageServicie.java

@ -19,4 +19,7 @@ public interface ITrunklineBillladingPackageServicie extends BaseService<Trunkli
List<String> findBillladingPackages(List<String> orderPackageCodes);
void saveEntityBatch(List<String> noOrderPackageCodes, Long billladingId, Long warehouseId, Integer incomingType);
List<TrunklineBillladingPackageEntity> findListByBillladingAndWaybillId(Long billladingId, Long waybillId);
}

26
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java

@ -436,18 +436,30 @@ public class InComingServiceImpl implements IInComingService {
String packageCode = packageCodes.get(0);
TrunklineAdvanceDetailEntity advanceDetailEntity = advanceDetailService.findEntityByOrderPackageCode(packageCode);
Long advanceId = advanceDetailEntity.getAdvanceId();
Long waybillId = advanceDetailEntity.getWaybillId();
TrunklineAdvanceEntity advanceEntity = advanceService.getById(advanceId);
String dealerName = advanceEntity.getDealerName();
String dealerCode = advanceEntity.getDealerCode();
String brand = advanceEntity.getBrand();
BasicdataTripartiteMallEntity tripartiteMallEntity = tripartiteMallClient.findEntityByDealerNameAndDealerCodeAndBrand(dealerName,dealerCode,brand);
if(!Objects.isNull(tripartiteMallEntity)){
Long clientId = tripartiteMallEntity.getClientId();
BasicdataStorageServicesEntity storageServicesEntity = storageServicesClient.findEntityBySendWarehouseIdAndClientId(warehouseId, clientId);
if(!Objects.isNull(storageServicesEntity)){
String serveWarehouseName = storageServicesEntity.getServeWarehouseName();
return Resp.scanSuccess(dealerName+"的服务仓库为"+serveWarehouseName,dealerName+"的服务仓库为"+serveWarehouseName);
if(Objects.isNull(waybillId)){
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillId(waybillId);
if(!Objects.isNull(waybillEntity)){
String destinationWarehouseName = waybillEntity.getDestinationWarehouseName();
return Resp.scanSuccess(dealerName+"的目的仓库为"+destinationWarehouseName,dealerName+"的目的仓库为"+destinationWarehouseName);
}else{
return Resp.scanSuccess("商家为"+dealerName,"商家为"+dealerName);
}
}else{
BasicdataTripartiteMallEntity tripartiteMallEntity = tripartiteMallClient.findEntityByDealerNameAndDealerCodeAndBrand(dealerName,dealerCode,brand);
if(!Objects.isNull(tripartiteMallEntity)){
Long clientId = tripartiteMallEntity.getClientId();
BasicdataStorageServicesEntity storageServicesEntity = storageServicesClient.findEntityBySendWarehouseIdAndClientId(warehouseId, clientId);
if(!Objects.isNull(storageServicesEntity)){
String serveWarehouseName = storageServicesEntity.getServeWarehouseName();
return Resp.scanSuccess(dealerName+"的服务仓库为"+serveWarehouseName,dealerName+"的服务仓库为"+serveWarehouseName);
}
}
return Resp.scanSuccess("商家为"+dealerName,"商家为"+dealerName);
}
}
}

24
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java

@ -826,6 +826,7 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
@Override
public void dealwithBillladingInfo(List<Long> advanceIds,Long warehouseId,String warehouseName,Long waybillId,String waybillNo) {
//查询这些暂存单所有包件有在哪些提货单中有多少个
List<BillladingPackageVO> billladingPackageList = advanceDetailService.findBillladingPackageByAdvanceIdsAnd(advanceIds);
List<TrunklineBillladingWaybillEntity> addBillladingWaybillEntities = new ArrayList<>();
List<TrunklineBillladingWaybillEntity> updateBillladingWaybillEntities = new ArrayList<>();
@ -846,25 +847,26 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
//把billladingEntities转化成以id为key的Map
Map<Long, TrunklineBillladingEntity> billladingMap = billladingEntities.stream().collect(Collectors.toMap(TrunklineBillladingEntity::getId, Function.identity()));
List<TrunklineBillladingWaybillEntity> billladingWaybillEntities = trunklineBillladingWaybillService.getNoDataWaybillByBillladingIds(billladingIds);
//查询这些提货单下没有运单的数据
List<TrunklineBillladingWaybillEntity> billladingNoWaybillEntities = trunklineBillladingWaybillService.getNoDataWaybillByBillladingIds(billladingIds);
//把billladingWaybillEntities转化成以billladingId为key的Map
Map<Long, TrunklineBillladingWaybillEntity> billladingWaybillMap = billladingWaybillEntities.stream().collect(Collectors.toMap(TrunklineBillladingWaybillEntity::getId, Function.identity()));
Map<Long, TrunklineBillladingWaybillEntity> billladingNoWaybillMap = billladingNoWaybillEntities.stream().collect(Collectors.toMap(TrunklineBillladingWaybillEntity::getBillladingId, Function.identity()));
billladingPackageMap.keySet().forEach(billladingId -> {
BillladingPackageVO billladingPackageVO = billladingPackageMap.get(billladingId);
Integer num = billladingPackageVO.getNum();
TrunklineBillladingWaybillEntity billladingWaybillEntity = billladingWaybillMap.get(billladingId);
if(!Objects.isNull(billladingWaybillEntity)){
TrunklineBillladingWaybillEntity billladingNoWaybillEntity = billladingNoWaybillMap.get(billladingId);
if(!Objects.isNull(billladingNoWaybillEntity)){
TrunklineBillladingEntity billladingEntity = billladingMap.get(billladingId);
Integer realNum = billladingWaybillEntity.getRealNum();
Integer realNum = billladingNoWaybillEntity.getRealNum();
if (realNum > num) {
billladingWaybillEntity.setRealNum(realNum - num);
billladingNoWaybillEntity.setRealNum(realNum - num);
} else if (realNum.equals(num)) {
billladingWaybillEntity.setRealNum(0);
billladingWaybillEntity.setIsDeleted(1);
billladingNoWaybillEntity.setRealNum(0);
billladingNoWaybillEntity.setIsDeleted(1);
}
updateBillladingWaybillEntities.add(billladingWaybillEntity);
updateBillladingWaybillEntities.add(billladingNoWaybillEntity);
TrunklineBillladingWaybillEntity addbillladingWaybillEntity = new TrunklineBillladingWaybillEntity();
addbillladingWaybillEntity.setWarehouseId(warehouseId);
addbillladingWaybillEntity.setWarehouseName(warehouseName);
@ -887,6 +889,10 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
for (TrunklineBillladingEntity billladingEntity : updateFeeBilllading) {
trunklineBillladingWaybillService.updateBillladingFeeByBillladingId(billladingEntity);
}
}

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

@ -449,6 +449,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setStockCount(advanceDetailStockNumVO.getStockNum());
waybillEntity.setStockWeight(advanceDetailStockNumVO.getStockWeight());
waybillEntity.setStockVolume(advanceDetailStockNumVO.getStockVolume());
List<BillladingPackageVO> billladingPackageList = advanceDetailService.findBillladingPackageByAdvanceIdsAnd(advanceIds);
//把billladingPackageList中的所有num累加
waybillEntity.setBillladingNum(billladingPackageList.stream().mapToInt(BillladingPackageVO::getNum).sum());
waybillEntity.setTotalFreight(openOrderDTO.getTotalFreight());
waybillEntity.setDeliveryFee(openOrderDTO.getDeliveryFee());
@ -2292,7 +2295,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
List<TrunklineAdvanceEntity> list = new ArrayList<>();
importOrderNoPackageExcelDTOMap.keySet().forEach(key -> {
ImportOrderNoPackageExcelDTO importOrderNoPackageExcelDTO = importOrderNoPackageExcelDTOMap.get(key);
if(Objects.isNull(importOrderNoPackageExcelDTO)){
if(!Objects.isNull(importOrderNoPackageExcelDTO)){
String orderCode = importOrderNoPackageExcelDTO.getOrderCode();
TrunklineAdvanceEntity advanceEntity = new TrunklineAdvanceVO();
advanceEntity.setWarehouseId(warehouseId);
@ -2375,7 +2378,6 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
}else{
advanceDetailModel.setWeight(new BigDecimal(weight));
}
advanceDetailModel.setWeight(new BigDecimal(importOrderNoPackageExcelDTO.getWeight()));
advanceDetailModel.setPackageStatus("0");
List<String> orderPackageCodes = basicdataCodeClient.getBatchPackageCodeByType(warehouseCode, orderCode, totalNum);
@ -3249,6 +3251,18 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
StringBuilder stringBuilder = new StringBuilder();
List<EditOrderMsgVO> msgList = new ArrayList<>();
String newBrand = openOrderDTO.getBrand();
Long newBrandId = openOrderDTO.getBrandId();
String brand = waybillEntity.getBrand();
Long brandId = waybillEntity.getBrandId();
if(!ObjectUtil.equals(newBrandId,brandId)){
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO();
editOrderMsgVO.setItemName("品牌");
editOrderMsgVO.setOldValue(brand);
editOrderMsgVO.setNewValue(newBrand);
msgList.add(editOrderMsgVO);
}
String newDeparture = openOrderDTO.getDeparture();
String departure = waybillEntity.getDeparture();
if(!ObjectUtil.equals(newDeparture,departure)){

13
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java

@ -28,6 +28,7 @@ import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
import org.springblade.common.utils.CommonUtil;
import org.springblade.common.utils.QRCodeUtil;
import org.springblade.common.utils.TemplateUtil;
import org.springblade.core.log.exception.ServiceException;
@ -168,6 +169,14 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl<Trunkline
vo.setDepartureStation(StringUtil.isBlank(waybillEntity.getDepartureWarehouseName())?"":waybillEntity.getDepartureWarehouseName());
vo.setWaybillNumber(StringUtil.isBlank(waybillEntity.getWaybillNo())?"":waybillEntity.getWaybillNo());
}
}else{
vo.setShipperName("");
vo.setShipperAddress("");
vo.setMallName("");
vo.setWaybillsNum("");
vo.setObjective("");
vo.setDepartureStation("");
vo.setWaybillNumber("");
}
vo.setOrderCode(orderCode);
@ -293,6 +302,10 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl<Trunkline
page.setCurrent(orderDetailsDTO.getPageNum());
page.setSize(orderDetailsDTO.getPageSize());
orderDetailsDTO.setCreateTimeStart(CommonUtil.getStartByDateStr(orderDetailsDTO.getCreateTimeStartStr()));
orderDetailsDTO.setCreateTimeEnd(CommonUtil.getEndByDateStr(orderDetailsDTO.getCreateTimeEndStr()));
IPage<OrderDetailInfoVO> pageList = baseMapper.findOrderDetails(page,orderDetailsDTO);
return R.data(pageList);
}

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

@ -1014,6 +1014,7 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
}
updateWaybill.setId(waybillEntity.getId());
updateWaybill.setStockCount(waybillEntity.getStockCount() + size);
// updateWaybill.setBillladingNum(waybillEntity.getBillladingNum() + size);
updateWaybillList.add(updateWaybill);
}
});

79
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingPackageServiceImpl.java

@ -219,8 +219,7 @@ public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl<Trunk
}
QueryWrapper<TrunklineAdvanceDetailEntity> advanceDetailEntityQueryWrapper = new QueryWrapper<>();
advanceDetailEntityQueryWrapper.in("order_package_code",noOrderPackageCodes)
.eq("warehouse_id",warehouseId);
advanceDetailEntityQueryWrapper.in("order_package_code",noOrderPackageCodes);
List<TrunklineAdvanceDetailEntity> advanceDetailList = trunklineAdvanceDetailService.list(advanceDetailEntityQueryWrapper);
if(advanceDetailList.isEmpty()){
@ -244,13 +243,16 @@ public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl<Trunk
});
saveBatch(billladingPackageEntities);
//查出所有入库包件对应的暂存单
QueryWrapper<TrunklineAdvanceEntity> advanceEntityQueryWrapper = new QueryWrapper<>();
advanceEntityQueryWrapper.in("id",advanceIdsSet)
.eq("waybill_status","1");
advanceEntityQueryWrapper.in("id",advanceIdsSet);
List<TrunklineAdvanceEntity> advanceEntities = trunklineAdvanceService.list(advanceEntityQueryWrapper);
//把所有暂存单已开单的运单号提取出来
//把advanceEntities所有元素的waybillNo放入一个Set<String>
Set<String> waybillNoSet = advanceEntities.stream().map(TrunklineAdvanceEntity::getWaybillNo).collect(Collectors.toSet());
Set<String> waybillNoSet = advanceEntities.stream().filter(advanceEntity -> !StringUtil.isEmpty(advanceEntity.getWaybillNo())).map(TrunklineAdvanceEntity::getWaybillNo).collect(Collectors.toSet());
//所有已开单暂存单运单信息
Map<String, WarehouseWaybillEntity> waybillEntityMap = new HashMap<>();
if(!waybillNoSet.isEmpty()){
List<WarehouseWaybillEntity> waybillEntityList = warehouseWaybillClient.findWaybillBilllByWaybillNos(new ArrayList<>(waybillNoSet));
@ -259,21 +261,26 @@ public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl<Trunk
}
//所有暂存单信息
//把advanceEntities转成以id为key的Map
Map<Long, TrunklineAdvanceEntity> advanceEntityMap = advanceEntities.stream().collect(Collectors.toMap(TrunklineAdvanceEntity::getId, Function.identity()));
//把这次所有入库的包件根据暂存单id进行分组
//把advanceDetailList中的所有元素的advanceId分组
Map<Long, List<TrunklineAdvanceDetailEntity>> advanceIdGroupedEntities = advanceDetailList.stream()
.collect(Collectors.groupingBy(TrunklineAdvanceDetailEntity::getAdvanceId));
//把没开单的暂存单包件放在一起
List<TrunklineAdvanceDetailEntity> noWaybillList = new ArrayList<>();
Map<String,Integer> waybillNoMNumMap = new HashMap<>();
Map<String, WarehouseWaybillEntity> finalWaybillEntityMap = waybillEntityMap;
advanceEntityMap.keySet().forEach(advanceId -> {
TrunklineAdvanceEntity advanceEntity = advanceEntityMap.get(advanceId);
List<TrunklineAdvanceDetailEntity> advanceDetailEntities = advanceIdGroupedEntities.get(advanceId);
String waybillNo = advanceEntity.getWaybillNo();
if(StringUtil.isNotBlank(waybillNo)){
List<TrunklineAdvanceDetailEntity> advanceDetailEntities = advanceIdGroupedEntities.get(advanceId);
int size = advanceDetailEntities.size();
int size = advanceDetailEntities.size();//入库件数
WarehouseWaybillEntity waybillEntity = finalWaybillEntityMap.get(waybillNo);
if(!Objects.isNull(waybillEntity)){
Integer stockCount = waybillEntity.getStockCount();
@ -284,13 +291,9 @@ public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl<Trunk
}
int diff = 0;
int all = stockCount + size;
int allBillladingNum = billladingNum + size;
waybillEntity.setBillladingNum(allBillladingNum);
if(all > totalCount){
// waybillEntity.setStockCount(totalCount);
diff = totalCount - stockCount;
}else{
// waybillEntity.setStockCount(all);
diff = size;
}
Integer integer = waybillNoMNumMap.get(waybillNo);
@ -302,6 +305,8 @@ public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl<Trunk
finalWaybillEntityMap.put(waybillNo,waybillEntity);
}
}else{
noWaybillList.addAll(advanceDetailEntities);
}
});
@ -319,11 +324,29 @@ public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl<Trunk
}
List<TrunklineBillladingWaybillEntity> addList = new ArrayList<>();
List<TrunklineBillladingWaybillEntity> updateList = new ArrayList<>();
TrunklineBillladingWaybillEntity noWaybillNoData = trunklineBillladingWaybillService.findNoWaybillNoData(billladingId);
if(CollUtil.isNotEmpty(noWaybillList)){
int size = noWaybillList.size();
if(Objects.isNull(noWaybillNoData)){
noWaybillNoData = new TrunklineBillladingWaybillEntity();
noWaybillNoData.setWarehouseId(warehouseId);
noWaybillNoData.setWarehouseName(warehouseEntity.getName());
noWaybillNoData.setBillladingId(billladingId);
noWaybillNoData.setBilladingCode(trunklineBillladingEntity.getBillladingCode());
noWaybillNoData.setWaybillNo("————");
noWaybillNoData.setRealNum(size);
noWaybillNoData.setRealWeight(BigDecimal.ZERO);
noWaybillNoData.setRealVolume(BigDecimal.ZERO);
}else{
Integer realNum = noWaybillNoData.getRealNum();
noWaybillNoData.setRealNum(realNum+size);
}
}
for (String waybillNo : waybillNoSet) {
Integer integer = waybillNoMNumMap.get(waybillNo);
@ -340,33 +363,28 @@ public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl<Trunk
noWaybillNoData.setRealNum(integer);
noWaybillNoData.setRealWeight(BigDecimal.ZERO);
noWaybillNoData.setRealVolume(BigDecimal.ZERO);
addList.add(noWaybillNoData);
}else{
Integer realNum = noWaybillNoData.getRealNum();
noWaybillNoData.setRealNum(realNum+integer);
updateList.add(noWaybillNoData);
}
}else{
Integer realNum = billladingWaybillEntity.getRealNum();
billladingWaybillEntity.setRealNum(realNum + integer);
updateList.add(billladingWaybillEntity);
}
}
if(!addList.isEmpty()){
trunklineBillladingWaybillService.saveBatch(addList);
if(!Objects.isNull(noWaybillNoData)){
trunklineBillladingWaybillService.saveOrUpdate(noWaybillNoData);
}
trunklineBillladingWaybillService.updateBatchById(updateList);
// if(!updateList.isEmpty()){
// trunklineBillladingWaybillService.updateBatchById(updateList);
// }
TrunklineBillladingEntity billladingEntity = trunklineBillladingService.getById(billladingId);
if(!Objects.isNull(billladingEntity)){
int realNum = billladingEntity.getRealNum();
Integer all = 0;
if(CollUtil.isNotEmpty(waybillNoMNumMap)){
all = waybillNoMNumMap.values().stream().reduce(Integer::sum).get();
}
int all = advanceDetailList.size();
billladingEntity.setRealNum(realNum+all);
trunklineBillladingService.updateById(billladingEntity);
}
@ -401,7 +419,7 @@ public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl<Trunk
warehouseWaybillClient.updateList(warehouseWaybillEntities);
//根据提货单id重新计算每个运单的费用
// trunklineBillladingWaybillService.updateBillladingFeeByBillladingId(trunklineBillladingEntity);
// trunklineBillladingWaybillService.updateBillladingFeeByBillladingId(billladingEntity);
//--------------------------------------分割线------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@ -493,4 +511,9 @@ public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl<Trunk
}
@Override
public List<TrunklineBillladingPackageEntity> findListByBillladingAndWaybillId(Long billladingId, Long waybillId) {
return baseMapper.findListByBillladingAndWaybillId(billladingId,waybillId);
}
}

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

@ -107,41 +107,52 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
updateById(trunklineBillladingEntity);
List<TrunklineBillladingWaybillEntity> saveBillladingWaybillList = new ArrayList<>();
// Map<Long, Integer> waybillBillladingNumMap = new HashMap<>();
//保存提货运单
List<TrunklineBillladingWaybillVO> billladingWaybillList = billladingDTO.getBillladingWaybillList();
for (TrunklineBillladingWaybillVO billladingWaybillVO:billladingWaybillList){
TrunklineBillladingWaybillEntity billladingWaybillEntity = new TrunklineBillladingWaybillEntity();
BeanUtil.copy(billladingWaybillVO,billladingWaybillEntity);
billladingWaybillEntity.setBillladingId(billladingId);
billladingWaybillEntity.setBilladingCode(trunklineBillladingEntity.getBillladingCode());
billladingWaybillEntity.setRealNum(0);
billladingWaybillEntity.setRealWeight(BigDecimal.ZERO);
billladingWaybillEntity.setRealVolume(BigDecimal.ZERO);
billladingWaybillEntity.setBillladingFee(BigDecimal.ZERO);
// billladingWaybillEntity.setPlanNum(billladingWaybillVO.getPlanNum());
saveBillladingWaybillList.add(billladingWaybillEntity);
// waybillBillladingNumMap.put(billladingWaybillVO.getWaybillId(),billladingWaybillVO.getPlanNum());
if(CollUtil.isNotEmpty(billladingWaybillList)){
//把billladingWaybillList中所有元素的waybillId放到一个List
List<Long> waybillIdList = billladingWaybillList.stream()
.map(TrunklineBillladingWaybillVO::getWaybillId)
.collect(Collectors.toList());
//查询运单
Map<Long, WarehouseWaybillEntity> waybillEntityMap = new HashMap<>();
if(CollUtil.isNotEmpty(waybillIdList)){
List<WarehouseWaybillEntity> waybillEntityList = warehouseWaybillClient.findListByWaybillIds(waybillIdList);
//把waybillEntityList转化为waybillId为key的Map
waybillEntityMap = waybillEntityList.stream()
.collect(Collectors.toMap(WarehouseWaybillEntity::getId, waybillEntity -> waybillEntity));
}
List<WarehouseWaybillEntity> updateWaybillList = new ArrayList<>();
for (TrunklineBillladingWaybillVO billladingWaybillVO:billladingWaybillList){
Long waybillId = billladingWaybillVO.getWaybillId();
WarehouseWaybillEntity warehouseWaybillEntity = waybillEntityMap.get(waybillId);
if(!Objects.isNull(warehouseWaybillEntity)){
Integer noBillladingNum = billladingWaybillVO.getNoBillladingNum();
Integer billladingNum = warehouseWaybillEntity.getBillladingNum();
Integer totalCount = warehouseWaybillEntity.getTotalCount();
if(billladingNum+noBillladingNum > totalCount){
log.warn("########saveNew1: "+waybillId+"已大于运单总件数");
continue;
}
warehouseWaybillEntity.setBillladingNum(billladingNum+noBillladingNum);
updateWaybillList.add(warehouseWaybillEntity);
TrunklineBillladingWaybillEntity billladingWaybillEntity = new TrunklineBillladingWaybillEntity();
BeanUtil.copy(billladingWaybillVO,billladingWaybillEntity);
billladingWaybillEntity.setBillladingId(billladingId);
billladingWaybillEntity.setBilladingCode(trunklineBillladingEntity.getBillladingCode());
billladingWaybillEntity.setRealNum(billladingWaybillVO.getNoBillladingNum());
billladingWaybillEntity.setRealWeight(BigDecimal.ZERO);
billladingWaybillEntity.setRealVolume(BigDecimal.ZERO);
billladingWaybillEntity.setBillladingFee(BigDecimal.ZERO);
saveBillladingWaybillList.add(billladingWaybillEntity);
}
}
billladingWaybillService.saveBatch(saveBillladingWaybillList);
warehouseWaybillClient.updateList(updateWaybillList);
}
billladingWaybillService.saveBatch(saveBillladingWaybillList);
// Set<Long> waybillIds = waybillBillladingNumMap.keySet();
//
// List<WarehouseWaybillEntity> waybillEntityList = warehouseWaybillClient.findListByWaybillIds(new ArrayList<>(waybillIds));
// waybillEntityList.forEach(waybillEntity -> {
// Long waybillEntityId = waybillEntity.getId();
// Integer planNum = waybillBillladingNumMap.get(waybillEntityId);
// if(Objects.isNull(planNum)){
// planNum = 0;
// }
// Integer billladingNum = waybillEntity.getBillladingNum();
// if(Objects.isNull(billladingNum)){
// billladingNum = 0;
// }
// waybillEntity.setBillladingNum(billladingNum+planNum);
// });
//
// warehouseWaybillClient.updateList(waybillEntityList);
TrunklineBillladingLogEntity logEntity = new TrunklineBillladingLogEntity();
@ -654,6 +665,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
return R.data(ls);
}
@Transactional(rollbackFor = Exception.class)
@Override
public R addWaybillToBillladingId(BillladingDTO billladingDTO) {
log.info("##############addWaybillToBillladingId: 添加运单");
@ -691,11 +703,32 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
entity.setBilladingCode(trunklineBillladingEntity.getBillladingCode());
entity.setWaybillId(waybillId);
entity.setWaybillNo(waybillNo);
entity.setRealNum(enterNum);
entity.setRealNum(warehouseWaybillEntity.getTotalCount()-warehouseWaybillEntity.getBillladingNum());
entity.setRealWeight(BigDecimal.ZERO);
entity.setRealVolume(BigDecimal.ZERO);
entity.setBillladingFee(BigDecimal.ZERO);
billladingWaybillService.save(entity);
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillId(waybillId);
if (!Objects.isNull(waybillEntity)){
waybillEntity.setBillladingNum(waybillEntity.getBillladingNum()+enterNum);
}
warehouseWaybillClient.updateEntity(waybillEntity);
TrunklineBillladingWaybillEntity noWaybillNoBillladingWaybill = billladingWaybillService.findNoWaybillNoData(billladingId);
if(!Objects.isNull(noWaybillNoBillladingWaybill)){
Integer realNum = noWaybillNoBillladingWaybill.getRealNum();
//有没挂运单的数据
List<TrunklineBillladingPackageEntity> billladingPackageEntities = trunklineBillladingPackageServicie.findListByBillladingAndWaybillId(billladingId,waybillId);
if(CollUtil.isNotEmpty(billladingPackageEntities)){
int size = billladingPackageEntities.size();
noWaybillNoBillladingWaybill.setRealNum(realNum-size);
}
billladingWaybillService.updateById(noWaybillNoBillladingWaybill);
}
billladingWaybillService.updateBillladingFeeByBillladingId(trunklineBillladingEntity);
return R.success("添加成功");
}

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

@ -40,6 +40,7 @@ import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper;
import com.logpm.trunkline.service.*;
import com.logpm.trunkline.vo.*;
import com.logpm.warehouse.entity.WarehousePackageTrackLogEntity;
import com.logpm.warehouse.entity.WarehouseTrayTypeEntity;
import com.logpm.warehouse.entity.WarehouseWayBillDetail;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseTrayTypeClient;
@ -349,7 +350,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//更新关联订单数据的发车数量
trunklineCarsOrderService.updateStartNumByLoadIdAndWarehouseId(loadId, warehouseId);
//生成直发商家签收单
createCustomerSignOrder(loadId, warehouseId);
// createCustomerSignOrder(loadId, warehouseId);
//生成异常列表
carsLoadAsyncService.abnormalListStartCarByLoadIdAndWarehouseId(loadId, warehouseId, AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), AuthUtil.getTenantId(), loadCarsDTO.getWarehouseName());
} catch (Exception e) {
@ -541,17 +542,16 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
nextCarsLoadLineEntity.setArriveUserId(AuthUtil.getUserId());
nextCarsLoadLineEntity.setArriveUserName(AuthUtil.getNickName());
trunklineCarsLoadLineService.updateById(nextCarsLoadLineEntity);
Integer workNode = null;
WorkNodeEnums workNodeEnums = WorkNodeEnums.NET_ARRIVE_CAR;
if (!nodeId.equals(endNodeId)) {
carsLoadEntity.setLoadStatus("20");
carsLoadEntity.setArriveTime(date);
carsLoadEntity.setNowWarehouseId(warehouseId);
workNode = WorkNodeEnums.NET_ARRIVE_CAR.getCode();
} else {
carsLoadEntity.setLoadStatus("40");
carsLoadEntity.setArriveTime(date);
carsLoadEntity.setNowWarehouseId(warehouseId);
workNode = WorkNodeEnums.FINAL_NET_ARRIVE_CAR.getCode();
workNodeEnums = WorkNodeEnums.FINAL_NET_ARRIVE_CAR;
}
updateById(carsLoadEntity);
@ -568,12 +568,55 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
List<String> orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId);
String content = "包件在 " + warehouseEntity.getName() + "到车";
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseEntity.getName(), workNode, content);
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseEntity.getName(), workNodeEnums.getCode(), content);
try {
FindParamterDTO param = new FindParamterDTO();
param.setWarehouseId(warehouseId);
param.setOrderPackageCodeList(orderPackageCodes);
List<DistributionParcelListEntity> listByOrderPackageCodeList = distributionParcelListClient.findListByOrderPackageCodeList(param);
Map<Long, List<DistributionParcelListEntity>> map = listByOrderPackageCodeList.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getStockArticleId));
JSONObject js = new JSONObject();
js.put("carNumber", carsLoadEntity.getCarNumber());
js.put("driverName", carsLoadEntity.getDriverName());
js.put("driverMobile", carsLoadEntity.getDriverMobile());
for (Map.Entry<Long, List<DistributionParcelListEntity>> entry : map.entrySet()) {
List<DistributionParcelListEntity> value = entry.getValue();
DistributionParcelListEntity parcelListEntity = value.get(0);
js.put("orderCode", parcelListEntity.getOrderCode());
js.put("serviceNumber", parcelListEntity.getServiceNumber());
js.put("waybillNumber", parcelListEntity.getWaybillNumber());
js.put("sendWarehouseName", parcelListEntity.getSendWarehouseName());
js.put("acceptWarehouseName", parcelListEntity.getAcceptWarehouseName());
// 分割字符串得到仓库名称列表
List<String> warehouseNames = StrUtil.split(carsLoadEntity.getEndWarehouseNames(), ",");
// 获取最后一个仓库名称
String lastWarehouseName = CollUtil.isNotEmpty(warehouseNames) ? warehouseNames.get(warehouseNames.size() - 1): "";
// 将最后一个仓库名称放入js对象
js.put("warehouseName", lastWarehouseName);
NodePushMsg msg = new NodePushMsg();
msg.setNode(workNodeEnums);
msg.setBrand(BrandEnums.getByValue(parcelListEntity.getBrandName()));
msg.setOperator(AuthUtil.getNickName());
msg.setOperatorTime(new Date());
msg.setMain(js.toString());
msg.setContent(value.stream().map(item -> {
return PushData.builder()
.packageCode(item.getOrderPackageCode())
.orderCode(item.getOrderCode())
.warehouseName(warehouseEntity.getName())
.waybillNumber(item.getWaybillNumber()).build();
}).collect(Collectors.toList()));
log.info("推送工厂数据:{}", JSONUtil.toJsonStr(msg));
factoryDataMessageSender.sendNodeDataByBrand(msg);
}
} catch (Exception e){
log.warn("推送工厂失败:{}", e);
}
} catch (Exception e) {
log.warn("#############arriveCarByLoadId: 存入日志失败");
}
}
@Override
@ -686,10 +729,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//更新关联订单数据的发车数量
trunklineCarsOrderService.updateStartNumToPlanNumByLoadIdAndWarehouseId(loadId, warehouseId);
//取消节点的签收单
cancleCustomerSignOrder(loadId, warehouseId);
carsLoadEntity.setIsCustomer("2");
updateById(carsLoadEntity);
// //取消节点的签收单
// cancleCustomerSignOrder(loadId, warehouseId);
// carsLoadEntity.setIsCustomer("2");
// updateById(carsLoadEntity);
} catch (Exception e) {
log.error("#############cancelStartCarByLoadId: 处理取消节点签收单 和 发车数量失败", e);
}
@ -3396,6 +3439,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Map<String, Object> map = new HashMap<>();
map.put("orders", orders);
WarehouseTrayTypeEntity trayTypeEntity = trayTypeClient.findTrayTypeEntity(trayCode);
if(!Objects.isNull(trayTypeEntity)){
Integer totalNum = trayTypeEntity.getTotalNum();
return Resp.scanData("打托成功", totalNum+"件",map);
}
return R.data(map);
}
@ -3626,8 +3674,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
JSONObject jsonObject = trunklineCarsLoadScanService.findUnloadNumAudio(loadId, warehouseId);
Integer totalUnloadNum = jsonObject.getInteger("totalUnloadNum");
Integer abnormalUnloadNum = jsonObject.getInteger("abnormalUnloadNum");
StringBuilder audio = new StringBuilder();
audio.append("卸车").append(totalUnloadNum).append("件");
if(!Objects.isNull(abnormalUnloadNum) && !abnormalUnloadNum.equals(0)){
audio.append("异常卸车").append(abnormalUnloadNum).append("件");
}
return Resp.scanSuccess("卸车成功","卸车"+totalUnloadNum+"件,异常卸车"+abnormalUnloadNum+"件");
return Resp.scanSuccess("卸车成功",audio.toString());
}
@Override
@ -3708,7 +3761,16 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
updateNumByLoadId(loadId);
return R.success("卸车成功");
JSONObject jsonObject = trunklineCarsLoadScanService.findUnloadNumAudio(loadId, warehouseId);
Integer totalUnloadNum = jsonObject.getInteger("totalUnloadNum");
Integer abnormalUnloadNum = jsonObject.getInteger("abnormalUnloadNum");
StringBuilder audio = new StringBuilder();
audio.append("卸车").append(totalUnloadNum).append("件");
if(!Objects.isNull(abnormalUnloadNum) && !abnormalUnloadNum.equals(0)){
audio.append("异常卸车").append(abnormalUnloadNum).append("件");
}
return Resp.scanSuccess("卸车成功",audio.toString());
}
@Override
@ -3738,7 +3800,16 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//处理托盘的入库和货物的入库
trayTypeClient.changeTrayWarehouseInfo(trayCode, warehouseId);
return R.success("卸车成功");
JSONObject jsonObject = trunklineCarsLoadScanService.findUnloadNumAudio(loadId, warehouseId);
Integer totalUnloadNum = jsonObject.getInteger("totalUnloadNum");
Integer abnormalUnloadNum = jsonObject.getInteger("abnormalUnloadNum");
StringBuilder audio = new StringBuilder();
audio.append("卸车").append(totalUnloadNum).append("件");
if(!Objects.isNull(abnormalUnloadNum) && !abnormalUnloadNum.equals(0)){
audio.append("异常卸车").append(abnormalUnloadNum).append("件");
}
return Resp.scanSuccess("卸车成功",audio.toString());
}
@Transactional(rollbackFor = Exception.class)
@ -4143,6 +4214,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
.content(Collections.singletonList(PushData.builder()
.packageCode(entity.getOrderPackageCode())
.warehouseName(warehouseName)
.waybillNumber(entity.getWaybillNumber())
.orderCode(entity.getOrderCode())
.build()))
.build();
@ -4241,21 +4313,43 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.data(pageList);
}
@Transactional(rollbackFor = Exception.class)
@Override
public R updateWaybillOrderIsCustemer(LoadCarsDTO loadCarsDTO) {
String carsOrderIds = loadCarsDTO.getCarsOrderIds();
String isCustomer = loadCarsDTO.getIsCustomer();
Long loadId = loadCarsDTO.getLoadId();
Long warehouseId = loadCarsDTO.getWarehouseId();
String[] split = carsOrderIds.split(",");
List<Long> carsOrderIdList = new ArrayList<>();
for (String s : split) {
carsOrderIdList.add(Long.parseLong(s));
}
Long carsOrderId = carsOrderIdList.get(0);
TrunklineCarsOrderEntity carsOrder = trunklineCarsOrderService.getById(carsOrderId);
loadId = carsOrder.getLoadId();
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId);
if(Objects.isNull(carsLoadEntity)){
log.warn("###########updateWaybillOrderIsCustemer: 配载计划不存在 loadId={}",loadId);
return R.fail(405,"配载计划不存在");
}
baseMapper.updateWaybillOrderIsCustemer(carsOrderIdList, isCustomer);
//取消节点的签收单
cancleCustomerSignOrder(loadId, warehouseId);
carsLoadEntity.setIsCustomer("2");
updateById(carsLoadEntity);
//生成直发商家签收单
createCustomerSignOrder(loadId, warehouseId);
return R.success("更新成功");
}
@ -4605,6 +4699,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setScanStatus("3");
carsLoadScanEntity.setUnloadNum(enterNum);
carsLoadScanEntity.setUnloadAbnormal(0);
carsLoadScanEntity.setSignTime(date);
carsLoadScanEntity.setSignAbnormal(0);
carsLoadScanEntity.setSignUserName(AuthUtil.getNickName());
@ -4612,6 +4707,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
carsLoadScanEntity.setUnloadNodeId(warehouseId);
carsLoadScanEntity.setUnloadNodeName(warehouseEntity.getName());
carsLoadScanEntity.setUnloadCheck(0);
carsLoadScanEntity.setSignOrderId(signOrderId);
trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
//生成签收记录
@ -4622,7 +4719,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//重新计算签收单的数量
updateSignOrderNumBySignOrderId(signOrderId);
return R.success("签收成功");
return Resp.scanSuccess("签收成功",enterNum+"件");
}
@Override
@ -5050,6 +5147,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.fail(405, "车辆还未发车");
}
if(!"40".equals(loadStatus)){
log.warn("############signLoadScanByIds: 车辆还未到达 loadStatus={}", loadStatus);
return R.fail(405, "车辆还未到达");
}
Integer realLoadingNumber = carsLoadEntity.getRealLoadingNumber();
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId);

10
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayTypeClient.java

@ -1,7 +1,9 @@
package com.logpm.warehouse.feign;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.warehouse.dto.ZeroOrderVO;
import com.logpm.warehouse.entity.WarehouseTrayTypeEntity;
import com.logpm.warehouse.service.IWarehouseTrayTypeService;
import com.logpm.warehouse.vo.TrayTypeDataVO;
import lombok.AllArgsConstructor;
@ -140,5 +142,13 @@ public class WarehouseTrayTypeClient implements IWarehouseTrayTypeClient {
warehouseTrayTypeService.trayToNull(trayCode,remark);
}
@Override
public WarehouseTrayTypeEntity findTrayTypeEntity(String trayCode) {
QueryWrapper<WarehouseTrayTypeEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("tray_code",trayCode)
.eq("is_deleted",0);
return warehouseTrayTypeService.getOne(queryWrapper);
}
}

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java

@ -206,7 +206,6 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
r.setRetentionScanUsername(user.getNickName());
r.setRetentionQuantity(r.getRetentionQuantity());
retentionTotal.getAndAdd(r.getRetentionQuantity());
r.setDeliveryId(warehouseRetentionRecordDTO.getDeliveryId());
//进行滞留之后需要对包件进行取消配送的操作
warehouseRetentionScanService.save(Func.copy(r, WarehouseRetentionScanEntity.class));
}

Loading…
Cancel
Save