From 3fd27876360bf5789ed516bbdecab0433a2e4917 Mon Sep 17 00:00:00 2001
From: PigBaoBei <2739175034@qq.com>
Date: Fri, 8 Dec 2023 16:34:23 +0800
Subject: [PATCH 01/15] =?UTF-8?q?PDA=E4=BF=9D=E5=AD=98=E5=B7=A5=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../AftersalesAbnormalPackageEntity.java | 41 ++++
.../vo/AftersalesAbnormalPackageVO.java | 10 +
.../logpm-distribution-api/pom.xml | 8 +
.../IDistributionDeliveryListClient.java | 11 +
blade-service/logpm-aftersales/pom.xml | 11 +
.../AftersalesWorkOrderAppController.java | 41 +++-
.../java/com/logpm/aftersales/bean/Res.java | 30 +++
.../java/com/logpm/aftersales/bean/Resp.java | 36 +++
.../dto/AftersalesPackageScanDTO.java | 46 ++++
.../dto/AftersalesWorkOrderDTO.java | 18 ++
.../service/IAftersalesWorkOrderService.java | 22 ++
.../impl/AftersalesWorkOrderServiceImpl.java | 53 ++++-
.../feign/DistributionDeliveryListClient.java | 7 +
.../mapper/DistributionDeliveryListMapper.xml | 4 +-
.../IDistributionDeliveryListService.java | 16 ++
.../DistributionDeliveryListServiceImpl.java | 212 ++++++++++++++----
16 files changed, 515 insertions(+), 51 deletions(-)
create mode 100644 blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/bean/Res.java
create mode 100644 blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/bean/Resp.java
create mode 100644 blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesPackageScanDTO.java
diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAbnormalPackageEntity.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAbnormalPackageEntity.java
index 115fc13ea..59ba0c25c 100644
--- a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAbnormalPackageEntity.java
+++ b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAbnormalPackageEntity.java
@@ -92,4 +92,45 @@ public class AftersalesAbnormalPackageEntity extends TenantEntity {
@ApiModelProperty(value = "类型;窜货,少货")
private String typesOf;
+ /**
+ * 运单号
+ */
+ @ApiModelProperty(value = "运单号")
+ private String waybillNumber;
+
+ /**
+ * 运单ID
+ */
+ @ApiModelProperty(value = "运单ID")
+ private Long waybillId;
+
+ /**
+ * 订单自编码
+ */
+ @ApiModelProperty(value = "订单自编码")
+ private String orderCode;
+
+ /**
+ * 订单ID
+ */
+ @ApiModelProperty(value = "订单ID")
+ private Long orderId;
+
+ /**
+ * 订单自编码
+ */
+ @ApiModelProperty(value = "订单自编码")
+ private Integer conditions;
+
+ /**
+ * 物料编码(库存品)
+ */
+ @ApiModelProperty(value = "物料编码(库存品)")
+ private String cargoNumber;
+ /**
+ * 入库批次号(库存品)
+ */
+ @ApiModelProperty(value = "入库批次号(库存品)")
+ private String incomingBatch;
+
}
diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesAbnormalPackageVO.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesAbnormalPackageVO.java
index c53b6dacf..3d4fc6db7 100644
--- a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesAbnormalPackageVO.java
+++ b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesAbnormalPackageVO.java
@@ -32,4 +32,14 @@ import lombok.EqualsAndHashCode;
public class AftersalesAbnormalPackageVO extends AftersalesAbnormalPackageEntity {
private static final long serialVersionUID = 1L;
+ private Integer maxQuantity;
+
+
+ private Integer isAbnormalLoading;
+
+
+ private Integer isAbnormalSinging;
+
+
+
}
diff --git a/blade-service-api/logpm-distribution-api/pom.xml b/blade-service-api/logpm-distribution-api/pom.xml
index a217852eb..86ba95620 100644
--- a/blade-service-api/logpm-distribution-api/pom.xml
+++ b/blade-service-api/logpm-distribution-api/pom.xml
@@ -13,6 +13,14 @@
org.springblade
logpm-distribution-api
3.2.0.RELEASE
+
+
+ org.springblade
+ logpm-aftersales-api
+ 3.2.0.RELEASE
+ compile
+
+
diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java
index 786cd9dde..9c911fe4e 100644
--- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java
+++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java
@@ -16,6 +16,7 @@
*/
package com.logpm.distribution.feign;
+import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO;
import com.logpm.distribution.entity.DistributionDeliveryDetailsEntity;
import com.logpm.distribution.entity.DistributionDeliveryListEntity;
import com.logpm.distribution.vo.DistributionDeliveryListVO;
@@ -100,6 +101,16 @@ public interface IDistributionDeliveryListClient {
@GetMapping(TOP+"/getRetentionDelivery")
DistributionDeliveryListVO getRetentionDelivery(@RequestParam("deliveryId")Long deliveryId);
+ /**
+ * 查询配送任务下的包件信息
+ * @param deliveryId
+ * @param scanBarCode
+ * @return
+ */
+ @GetMapping(TOP+"/aftersalesPackageScan")
+ List aftersalesPackageScan(@RequestParam("deliveryId")Long deliveryId,@RequestParam("scanBarCode")String scanBarCode);
+
+
// /**
// * 根据配送任务ID查询配送司机信息
diff --git a/blade-service/logpm-aftersales/pom.xml b/blade-service/logpm-aftersales/pom.xml
index 9a3ffa1da..5fa0bb176 100644
--- a/blade-service/logpm-aftersales/pom.xml
+++ b/blade-service/logpm-aftersales/pom.xml
@@ -62,6 +62,17 @@
3.2.0.RELEASE
compile
+
+ org.springblade
+ logpm-distribution-api
+ ${bladex.project.version}
+ compile
+
+
+ org.springblade
+ blade-biz-common
+ ${bladex.project.version}
+
diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/apicontroller/AftersalesWorkOrderAppController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/apicontroller/AftersalesWorkOrderAppController.java
index ab712a86c..bbee62746 100644
--- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/apicontroller/AftersalesWorkOrderAppController.java
+++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/apicontroller/AftersalesWorkOrderAppController.java
@@ -1,15 +1,18 @@
package com.logpm.aftersales.apicontroller;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.logpm.aftersales.dto.AftersalesPackageScanDTO;
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO;
import com.logpm.aftersales.service.IAftersalesWorkOrderService;
+import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO;
import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
import org.springblade.core.tool.api.R;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
@RestController
@AllArgsConstructor
@@ -18,6 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
public class AftersalesWorkOrderAppController {
private final IAftersalesWorkOrderService aftersalesWorkOrderService;
+
@PostMapping("/addWorkOrder")
public R addWorkOrder(@RequestBody AftersalesWorkOrderDTO aftersalesWorkOrderDTO){
aftersalesWorkOrderDTO.setInitiationIdentification("PDA");
@@ -25,4 +29,33 @@ public class AftersalesWorkOrderAppController {
}
+ @PostMapping("/aftersalesPackageScan")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "工单包件扫描", notes = "传入aftersalesAppeal")
+ public R> aftersalesPackageScan(@RequestBody AftersalesPackageScanDTO aftersalesPackageScanDTO){
+ return R.data(aftersalesWorkOrderService.aftersalesPackageScan(aftersalesPackageScanDTO));
+ }
+
+
+ @PostMapping("/saveAfterSalesOrder")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "PDA保存异常工单", notes = "传入aftersalesAppeal")
+ public R saveAfterSalesOrder(@RequestBody AftersalesWorkOrderDTO aftersalesWorkOrderDTO){
+ return aftersalesWorkOrderService.saveAfterSalesOrder(aftersalesWorkOrderDTO);
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
}
diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/bean/Res.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/bean/Res.java
new file mode 100644
index 000000000..c8a4ced81
--- /dev/null
+++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/bean/Res.java
@@ -0,0 +1,30 @@
+package com.logpm.aftersales.bean;
+
+import lombok.Data;
+import org.springblade.core.tool.api.R;
+
+@Data
+public class Res extends R {
+
+ private String audio;
+
+ private Object obj;
+
+ public static Res scanSuccess(String msg, String audio,Object obj){
+ Res resp = new Res();
+ resp.setCode(200);
+ resp.setMsg(msg);
+ resp.setAudio(audio);
+ resp.setObj(obj);
+ return resp;
+ }
+
+// public static Res scanFail(String msg, String audio){
+// Res resp = new Res();
+// resp.setCode(3001);
+// resp.setMsg(msg);
+// resp.setAudio(audio);
+// return resp;
+// }
+
+}
diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/bean/Resp.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/bean/Resp.java
new file mode 100644
index 000000000..8d58552e4
--- /dev/null
+++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/bean/Resp.java
@@ -0,0 +1,36 @@
+package com.logpm.aftersales.bean;
+
+import lombok.Data;
+import org.springblade.core.tool.api.R;
+
+@Data
+public class Resp extends R {
+
+ private String audio;
+
+ public static Resp scanSuccess(String msg,String audio){
+ Resp resp = new Resp();
+ resp.setCode(200);
+ resp.setMsg(msg);
+ resp.setAudio(audio);
+ return resp;
+ }
+
+ public static Resp scanFail(String msg,String audio){
+ Resp resp = new Resp();
+ resp.setCode(3001);
+ resp.setMsg(msg);
+ resp.setAudio(audio);
+ return resp;
+ }
+
+ public static Resp scanFail(int code,String msg,String audio,Object data){
+ Resp resp = new Resp();
+ resp.setCode(code);
+ resp.setMsg(msg);
+ resp.setData(data);
+ resp.setAudio(audio);
+ return resp;
+ }
+
+}
diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesPackageScanDTO.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesPackageScanDTO.java
new file mode 100644
index 000000000..d669a2c4a
--- /dev/null
+++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesPackageScanDTO.java
@@ -0,0 +1,46 @@
+package com.logpm.aftersales.dto;
+
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 配送装车签收发起工单包件扫描DTO
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class AftersalesPackageScanDTO {
+
+ /**
+ * 配送任务ID
+ */
+ private Long deliveryId;
+
+ /**
+ * 预约客户ID
+ */
+ private Long reservationId;
+
+// /**
+// * 司机名称
+// */
+// private String driverName;
+//
+// /**
+// * 车牌号
+// */
+// private String vehicleNub;
+//
+// /**
+// * 配送任务ID
+// */
+// private String vehicleNub;
+
+
+ /**
+ * 扫描码值
+ */
+ private String scanBarCode;
+
+
+}
diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java
index 8e11918dc..7946ded35 100644
--- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java
+++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java
@@ -17,6 +17,7 @@
package com.logpm.aftersales.dto;
import com.logpm.aftersales.entity.*;
+import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -74,4 +75,21 @@ public class AftersalesWorkOrderDTO extends AftersalesWorkOrderEntity {
+ /**
+ * 工单指派 ID
+ */
+ private List packageList;
+
+ /**
+ * 配送任务Id
+ */
+ private Long deliveryId;
+
+
+
+
+
+
+
+
}
diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java
index ed85367ea..786045669 100644
--- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java
+++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java
@@ -16,8 +16,10 @@
*/
package com.logpm.aftersales.service;
+import com.logpm.aftersales.dto.AftersalesPackageScanDTO;
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
+import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import com.logpm.aftersales.excel.AftersalesWorkOrderExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -131,6 +133,26 @@ public interface IAftersalesWorkOrderService extends BaseService data, Boolean isCovered);
+ /**
+ * PDA扫描工单关联包件
+ * @param aftersalesPackageScanDTO
+ * @return
+ */
+ List aftersalesPackageScan(AftersalesPackageScanDTO aftersalesPackageScanDTO);
+
+ /**
+ * PDA工单签收包件扫描
+ * @param aftersalesPackageScanDTO
+ * @return
+ */
+
+ /**
+ * PDA保存异常工单
+ * @param aftersalesWorkOrderDTO
+ * @return
+ */
+ R saveAfterSalesOrder(AftersalesWorkOrderDTO aftersalesWorkOrderDTO);
+
/**
* 查询客服信息
* @return
diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
index 1d7b8e383..e0388a562 100644
--- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
+++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
@@ -22,6 +22,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.logpm.aftersales.bean.Resp;
+import com.logpm.aftersales.dto.AftersalesPackageScanDTO;
+import com.logpm.aftersales.dto.AftersalesProcessingResultsDTO;
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO;
import com.logpm.aftersales.entity.*;
import com.logpm.aftersales.service.*;
@@ -30,6 +33,8 @@ import com.logpm.aftersales.excel.AftersalesWorkOrderExcel;
import com.logpm.aftersales.mapper.AftersalesWorkOrderMapper;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
+import com.logpm.distribution.feign.IDistributionDeliveryListClient;
+import com.logpm.distribution.vo.DistributionDeliveryListVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
@@ -41,6 +46,7 @@ import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.Func;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.DictBiz;
import org.springblade.system.entity.User;
@@ -84,6 +90,8 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl aftersalesPackageScan(AftersalesPackageScanDTO aftersalesPackageScanDTO) {
+ List abnormalPackageVO = distributionDeliveryListClient.aftersalesPackageScan(aftersalesPackageScanDTO.getDeliveryId(),aftersalesPackageScanDTO.getScanBarCode());
+ if (Func.isEmpty(abnormalPackageVO)){
+ //查询此配送送任务下无此包件信息
+
+ }
+ return abnormalPackageVO;
+ }
+
+
+ @Override
+ @Transactional
+ public R saveAfterSalesOrder(AftersalesWorkOrderDTO aftersalesWorkOrderDTO) {
+ DistributionDeliveryListVO deliveryDriverInfo = distributionDeliveryListClient.getDeliveryDriverInfo(aftersalesWorkOrderDTO.getDeliveryId());
+ if (Func.isEmpty(deliveryDriverInfo)){
+ log.info("#############查询配送任务错误,ID:{}",aftersalesWorkOrderDTO.getDeliveryId());
+ return Resp.scanFail("配送任务有误","配送任务有误");
+ }
+ AftersalesWorkOrderDTO saveAftersalesWorkOrderDTO = new AftersalesWorkOrderDTO();
+ List packageList = aftersalesWorkOrderDTO.getPackageList();
+ if (Func.isEmpty(packageList)){
+ return Resp.scanFail("请扫描包件信息","请扫描包件信息");
+ }
+ List aftersalesAbnormalPackageEntities = new ArrayList<>();
+ for (AftersalesAbnormalPackageVO abnormalPackageVO : packageList) {
+ AftersalesAbnormalPackageEntity aftersalesAbnormalPackageEntity = Func.copy(abnormalPackageVO, AftersalesAbnormalPackageEntity.class);
+ aftersalesAbnormalPackageEntities.add(aftersalesAbnormalPackageEntity);
+ }
+ //工单关联包件信息
+ saveAftersalesWorkOrderDTO.setPackageEntityList(aftersalesAbnormalPackageEntities);
+ //保存工单所需责任人
+ saveAftersalesWorkOrderDTO.setProcessorEntityList(aftersalesWorkOrderDTO.getProcessorEntityList());
+ //工单图片
+ saveAftersalesWorkOrderDTO.setDecreaseImageEntityList(aftersalesWorkOrderDTO.getDecreaseImageEntityList());
+ //设置工单提交标识
+ saveAftersalesWorkOrderDTO.setInitiationIdentification("PDA");
+ //保存工单
+ boolean b = saveOrUpdateOwn(saveAftersalesWorkOrderDTO);
+
+ return Resp.scanSuccess("提交成功","提交成功");
+ }
+
/**
* 查询客服信息
* @return
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java
index 8786de4fd..78f897f10 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java
@@ -17,6 +17,7 @@
package com.logpm.distribution.feign;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO;
import com.logpm.distribution.entity.DistributionDeliveryListEntity;
import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.vo.DistributionDeliveryListVO;
@@ -82,5 +83,11 @@ public class DistributionDeliveryListClient implements IDistributionDeliveryList
return distributionDeliveryListService.getRetentionDelivery(deliveryId);
}
+ @Override
+ public List aftersalesPackageScan(Long deliveryId, String scanBarCode) {
+
+ return distributionDeliveryListService.aftersalesPackageScan(deliveryId,scanBarCode);
+ }
+
}
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
index 83174df74..0563fd8eb 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
@@ -1579,12 +1579,14 @@
@@ -66,6 +67,7 @@
where ltco.load_id = #{loadId}
and ltco.final_node_id = #{warehouseId}
and ltcls.tray_code = #{trayCode}
+ and ltcls.scan_status = '1'
+
+
+
+ delete from logpm_trunkline_cars_load_scan
+ where id = #{carsLoadScanId}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.java
new file mode 100644
index 000000000..6b24a49aa
--- /dev/null
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.java
@@ -0,0 +1,12 @@
+package com.logpm.trunkline.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.logpm.trunkline.entity.TrunklineCarsLoadingLogEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface TrunklineCarsLoadingLogMapper extends BaseMapper {
+
+
+
+}
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml
new file mode 100644
index 000000000..00715c3a6
--- /dev/null
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java
index 4be62d33b..4e5e4ddf3 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java
@@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.entity.TrunklineCarsOrderEntity;
-import com.logpm.trunkline.vo.CarsLoadAllOrderVO;
-import com.logpm.trunkline.vo.LoadZeroListVO;
-import com.logpm.trunkline.vo.NodeNumDataVO;
-import com.logpm.trunkline.vo.UnloadZeroVO;
+import com.logpm.trunkline.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -25,4 +22,7 @@ public interface TrunklineCarsOrderMapper extends BaseMapper findUnloadZeroList(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
+ List findLoadScanPackageWithOrder(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
+
+ void deleteByCarsOrderId(@Param("carsOrderId") Long carsOrderId);
}
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
index d4ef6aaa2..eae6331d7 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
@@ -49,7 +49,8 @@
+
+
+
+ delete from logpm_trunkline_cars_order
+ where id = #{carsOrderId}
+
+
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadScanMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.java
similarity index 75%
rename from blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadScanMapper.java
rename to blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.java
index c44cb0b7e..deaac99c8 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadScanMapper.java
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.java
@@ -1,12 +1,15 @@
package com.logpm.trunkline.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.logpm.trunkline.entity.TrunklineCarsUnloadScanEntity;
+import com.logpm.trunkline.entity.TrunklineCarsUnloadLogEntity;
+import com.logpm.trunkline.vo.UnloadScanOrderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
+import java.util.List;
+
@Mapper
-public interface TrunklineCarsUnloadScanMapper extends BaseMapper {
+public interface TrunklineCarsUnloadLogMapper extends BaseMapper {
Integer findNumByLoadId(@Param("loadId") Long loadId);
Integer findAbnormalNumByLoadId(@Param("loadId") Long loadId);
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadScanMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml
similarity index 91%
rename from blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadScanMapper.xml
rename to blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml
index bf9bae47b..c0504682b 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadScanMapper.xml
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml
@@ -1,6 +1,6 @@
-
+
+
+
+
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
index 2a87b61d2..70a4d128c 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
@@ -4,10 +4,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.dto.ProductInfoDTO;
import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity;
+import com.logpm.trunkline.vo.OrderScanDetailVO;
import com.logpm.trunkline.vo.ProductUnloadInfoVO;
+import com.logpm.trunkline.vo.UnloadPackageVO;
+import com.logpm.trunkline.vo.UnloadScanOrderVO;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
+import java.util.Map;
public interface ITrunklineCarsLoadScanService extends BaseService {
Integer findNumByLoadId(Long loadId);
@@ -30,4 +34,21 @@ public interface ITrunklineCarsLoadScanService extends BaseService findProductInfoList(Long loadId, String trayCode, String waybillNo);
IPage loadingDetail(IPage
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java
index 4b1d19ba8..ac7a33ed4 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java
@@ -16,7 +16,6 @@
*/
package com.logpm.distribution.service;
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionStockListDTO;
import com.logpm.distribution.entity.DistributionStockListEntity;
@@ -175,6 +174,8 @@ public interface IDistributionStockListService extends BaseService
select scan_code orderPackageCode,
num num,
+ unload_num unloadNum,
tray_code trayCode,
tray_name trayName,
scan_status scanStatus
from logpm_trunkline_cars_load_scan
where load_id = #{loadId}
- and warehouse_id = #{warehouseId}
+ and final_node_id = #{warehouseId}
and waybill_no = #{waybillNo}
and order_code = #{orderCode}
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml
index 00715c3a6..4f5b202a5 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
index eae6331d7..c63a931d8 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
@@ -53,10 +53,9 @@
ltco.order_code orderCode,
ltco.plan_num planNum,
sum(ltcls.num) loadingNum,
- sum(ltcus.num) unloadingNum
+ sum(ltcls.unload_num) unloadingNum
from logpm_trunkline_cars_order ltco
- left join logpm_trunkline_cars_load_scan ltcls on ltcls.waybill_no = ltco.waybill_no
- left join logpm_trunkline_cars_unload_scan ltcus on ltcus.waybill_no = ltco.waybill_no
+ left join logpm_trunkline_cars_load_scan ltcls on ltcls.waybill_no = ltco.waybill_no and ltco.order_code = ltcls.order_code and ltco.load_id = ltcls.load_id
where ltco.load_id = #{loadId}
and ltco.node_id = #{nodeId}
and ltco.type = 2
@@ -71,7 +70,7 @@
real_num loadingNum,
unload_num unloadNum
from logpm_trunkline_cars_order
- where is_deleted = 0,
+ where is_deleted = 0
and load_id = #{loadId}
and final_node_id = #{warehouseId}
and `type` = 2
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml
index c0504682b..29752c060 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml
@@ -39,8 +39,4 @@
and waybill_no = #{waybillNo}
-
-
-
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
index 411382555..ef327d5be 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
@@ -1,6 +1,5 @@
package com.logpm.trunkline.service.impl;
-import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -14,8 +13,12 @@ import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.feign.IDistributionParcelListClient;
import com.logpm.distribution.feign.IDistributionStockArticleClient;
+import com.logpm.trunkline.bean.Resp;
import com.logpm.trunkline.dto.*;
-import com.logpm.trunkline.entity.*;
+import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
+import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity;
+import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity;
+import com.logpm.trunkline.entity.TrunklineCarsOrderEntity;
import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper;
import com.logpm.trunkline.service.*;
import com.logpm.trunkline.vo.*;
@@ -1487,6 +1490,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl plList = distributionParcelListClient.findEntityListByOrderCode(orderCode, warehouseId);
- for (DistributionParcelListEntity parcelListEntity : plList) {
- Integer quantity = parcelListEntity.getQuantity();
- String firsts = parcelListEntity.getFirsts();
- JSONObject detail = new JSONObject();
- detail.put("productName",firsts);
- detail.put("stockNum",quantity);
- plDetail.add(detail);
+// JSONArray plDetail = new JSONArray();
+// List plList = distributionParcelListClient.findEntityListByOrderCode(orderCode, warehouseId);
+// for (DistributionParcelListEntity parcelListEntity : plList) {
+// Integer quantity = parcelListEntity.getQuantity();
+// String firsts = parcelListEntity.getFirsts();
+// JSONObject detail = new JSONObject();
+// detail.put("productName",firsts);
+// detail.put("stockNum",quantity);
+// plDetail.add(detail);
+// }
+// jsonObject.put("details",plDetail);
+ DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId);
+ if(!Objects.isNull(stockArticleEntity)){
+ jsonObject.put("waybillNo",stockArticleEntity.getWaybillNumber());
+ }else{
+ jsonObject.put("waybillNo","");
}
- jsonObject.put("details",plDetail);
zeroList.add(jsonObject);
}
if("3".equals(associationType)){
@@ -1878,6 +1897,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl updownGoodsByStock = warehouseUpdownGoodsService.getUpdownGoodsByStock(marketId, materialCode, incomingBatch,warehouseId);