Browse Source

PDA保存工单

newStockUp
汤建军 1 year ago
parent
commit
3fd2787636
  1. 41
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAbnormalPackageEntity.java
  2. 10
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesAbnormalPackageVO.java
  3. 8
      blade-service-api/logpm-distribution-api/pom.xml
  4. 11
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java
  5. 11
      blade-service/logpm-aftersales/pom.xml
  6. 41
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/apicontroller/AftersalesWorkOrderAppController.java
  7. 30
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/bean/Res.java
  8. 36
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/bean/Resp.java
  9. 46
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesPackageScanDTO.java
  10. 18
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/dto/AftersalesWorkOrderDTO.java
  11. 22
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java
  12. 53
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  13. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java
  14. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  15. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  16. 212
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

41
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;
}

10
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;
}

8
blade-service-api/logpm-distribution-api/pom.xml

@ -13,6 +13,14 @@
<groupId>org.springblade</groupId>
<artifactId>logpm-distribution-api</artifactId>
<version>3.2.0.RELEASE</version>
<dependencies>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-aftersales-api</artifactId>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

11
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<AftersalesAbnormalPackageVO> aftersalesPackageScan(@RequestParam("deliveryId")Long deliveryId,@RequestParam("scanBarCode")String scanBarCode);
// /**
// * 根据配送任务ID查询配送司机信息

11
blade-service/logpm-aftersales/pom.xml

@ -62,6 +62,17 @@
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-distribution-api</artifactId>
<version>${bladex.project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-biz-common</artifactId>
<version>${bladex.project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>

41
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<List<AftersalesAbnormalPackageVO>> 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);
}
}

30
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;
// }
}

36
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;
}
}

46
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;
}

18
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<AftersalesAbnormalPackageVO> packageList;
/**
* 配送任务Id
*/
private Long deliveryId;
}

22
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<AftersalesWorkO
*/
void importUser(List<AftersalesWorkOrderExcel> data, Boolean isCovered);
/**
* PDA扫描工单关联包件
* @param aftersalesPackageScanDTO
* @return
*/
List<AftersalesAbnormalPackageVO> aftersalesPackageScan(AftersalesPackageScanDTO aftersalesPackageScanDTO);
/**
* PDA工单签收包件扫描
* @param aftersalesPackageScanDTO
* @return
*/
/**
* PDA保存异常工单
* @param aftersalesWorkOrderDTO
* @return
*/
R saveAfterSalesOrder(AftersalesWorkOrderDTO aftersalesWorkOrderDTO);
/**
* 查询客服信息
* @return

53
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<AftersalesWo
private final IBasicdataWarehouseClient warehouseClient;
private final IDistributionDeliveryListClient distributionDeliveryListClient;
private final ISysClient sysClient;
@ -155,7 +163,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
BladeUser user = AuthUtil.getUser();
if(ObjectUtils.isNull(aftersalesWorkOrder.getId())){
//新增
aftersalesWorkOrder.setInitiationIdentification("PC");
// aftersalesWorkOrder.setInitiationIdentification("PC");
aftersalesWorkOrder.setCreateUser(user.getUserId());
aftersalesWorkOrder.setCreateTime(new Date());
aftersalesWorkOrder.setCreateDept(Long.valueOf(user.getDeptId()));
@ -600,6 +608,49 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}
}
@Override
public List<AftersalesAbnormalPackageVO> aftersalesPackageScan(AftersalesPackageScanDTO aftersalesPackageScanDTO) {
List<AftersalesAbnormalPackageVO> 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<AftersalesAbnormalPackageVO> packageList = aftersalesWorkOrderDTO.getPackageList();
if (Func.isEmpty(packageList)){
return Resp.scanFail("请扫描包件信息","请扫描包件信息");
}
List<AftersalesAbnormalPackageEntity> 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

7
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<AftersalesAbnormalPackageVO> aftersalesPackageScan(Long deliveryId, String scanBarCode) {
return distributionDeliveryListService.aftersalesPackageScan(deliveryId,scanBarCode);
}
}

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

@ -1579,12 +1579,14 @@
<select id="selectReservationStockByDeliveryId"
resultType="com.logpm.distribution.entity.DistributionReservationStockarticleEntity">
SELECT
ldrs.*
ldrs.*,
ldsa.order_code AS stockArticleCode
FROM
logpm_distribution_delivery_list AS lddl
INNER JOIN logpm_distribution_signfor AS lds ON lddl.id = lds.delivery_id
INNER JOIN logpm_distribution_reservation AS ldr ON lds.reservation_id = ldr.id
INNER JOIN logpm_distribution_reservation_stockarticle As ldrs ON ldrs.reservation_id = ldr.id
INNER JOIN logpm_distribution_stock_article As ldsa ON ldsa.id = ldrs.stockarticle_id
WHERE lddl.id = #{delivaryListId} and ldrs.stock_article_status != 2
</select>
<select id="getReservationStockArticleByDeliveryId"

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

@ -19,6 +19,7 @@ package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO;
import com.logpm.distribution.bean.Resp;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.DistributionDeliveryListDTO;
@ -360,6 +361,21 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
*/
DistributionDeliveryListVO getRetentionDelivery(Long deliveryId);
/**
* 查询配送任务下指定码值包件信息
* @param deliveryId
* @param scanBarCode
* @return
*/
List<AftersalesAbnormalPackageVO> aftersalesPackageScan(Long deliveryId, String scanBarCode);
/**
* 查询签收预约客户包件信息
* @param reservationId
* @param scanBarCode
* @return
*/
// /**
// * 滞留取消配送
// * @param distributionRetentionScanVo

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

@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO;
import com.logpm.basic.entity.BasicPrintTemplateEntity;
import com.logpm.basic.feign.IBasicPrintTemplateClient;
import com.logpm.basicdata.entity.BasicdataDriverArteryEntity;
@ -45,9 +46,11 @@ import com.logpm.distribution.vo.app.DistributionAppReservationVO;
import com.logpm.distribution.vo.print.PrintPreviewVO;
import com.logpm.distribution.wrapper.*;
import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient;
import com.logpm.warehouse.feign.IWarehouseTrayTypeClient;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import com.logpm.warehouse.vo.TrayTypeDataVO;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
@ -153,6 +156,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
private final IDistributionReservationZeroPackageService distributionReservationZeroPackageService;
private final IDistributionParcelNumberService distributionParcelNumberService;
private final IWarehouseTrayGoodsClient warehouseTrayGoodsClient;
private final IWarehouseWaybillClient warehouseWaybillClient;
// 自提mapper
private final DistrilbutionBillLadingMapper distrilbutionBillLadingMapper;
@ -501,11 +505,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
.eq(DisStockListDetailEntity::getStockPackageCode, distrilbutionloadingscanDTO.getBarcode())
.ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(list)){
if (Func.isNotEmpty(list)) {
//满足条件此码必定为库存品
//判断该库存品是否属于当前客户
List<DisStockListDetailEntity> collect = list.stream().filter(l -> l.getReservationId().equals(distrilbutionloadingscanDTO.getReservationId())).collect(Collectors.toList());
if (Func.isNotEmpty(collect)){
if (Func.isNotEmpty(collect)) {
return Resp.scanFail("请在库存品页面扫描此码", "请在库存品页面扫描此码");
}
return Resp.scanFail("此码不是订制品", "此码不是订制品");
@ -610,10 +614,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return R.fail(5000, "异常装车");
// return Resp.scanFail("装车失败","程序出错,请联系彪桑");
} else {
if (parcelListEntity.getConditions() == 2){
if (parcelListEntity.getConditions() == 2) {
return Resp.scanFail("此包件不是订制品", "此包件不是订制品");
}else {
} else {
return Resp.scanFail("装车失败", "窜货");
}
}
@ -1498,7 +1502,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
Integer j = distributionSignforMapper.updateloadByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub());
//扣减在库订单的在库数量
Integer k =distributionStockArticleMapper.deductionHandQuantity(loadscanEntity.getOrderId(),loadscanEntity.getLoadedNub());
Integer k = distributionStockArticleMapper.deductionHandQuantity(loadscanEntity.getOrderId(), loadscanEntity.getLoadedNub());
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId());
distributionAsyncService.checkOrderLoadingStatus(parcelListEntity.getId());
}
@ -2115,7 +2119,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionAsyncService.changeMarketDeliveryListStatus(distributionLoadscaninvnEntity.getOrderPackageCode(), distributionLoadscaninvnEntity.getDeliveryId(), distributionLoadscaninvnEntity.getReservationId());
//处理出库问题
//扣减出库数量
distributionStockListMapper.deductionQuantityStock(distributionLoadscaninvnEntity.getInventoryId(),distributionLoadscaninvnEntity.getLoadedNub());
distributionStockListMapper.deductionQuantityStock(distributionLoadscaninvnEntity.getInventoryId(), distributionLoadscaninvnEntity.getLoadedNub());
// DistributionStockListEntity distributionStockListEntity = distributionStockListMapper.selectOne(Wrappers.<DistributionStockListEntity>query().lambda().eq(DistributionStockListEntity::getId, distributionLoadscaninvnEntity.getInventoryId()));
// BigDecimal quantityStock = new BigDecimal(distributionStockListEntity.getQuantityStock());
// BigDecimal loadedNub = new BigDecimal(distributionLoadscaninvnEntity.getLoadedNub());
@ -4417,7 +4421,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (planCount.get() - loadingCount > 0) {
builder.append("未装" + (planCount.get() - packageLoadingNum - inventoryLoadingNum) + "件");
}
if (loadingCount != 0){
if (loadingCount != 0) {
builder.append("装车" + loadingCount + "件");
}
@ -4505,21 +4509,21 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
strings.addAll(collect);
rs.setScanUser(String.join(",", strings));
if (loadingNum > 0 && loadingNum == rs.getReservationNum()){
if (loadingNum > 0 && loadingNum == rs.getReservationNum()) {
rs.setLoadingStatusName(DeliveryLoadingStatusConstant.yizhuangche.getName());
}else if (loadingNum > 0 && loadingNum < rs.getReservationNum()){
} else if (loadingNum > 0 && loadingNum < rs.getReservationNum()) {
rs.setLoadingStatusName(DeliveryLoadingStatusConstant.bunfenzhuangche.getName());
}else {
} else {
rs.setLoadingStatusName(DeliveryLoadingStatusConstant.weizhuangche.getName());
}
int signNum = list.stream().filter(f->f.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())).mapToInt(DistributionLoadscaninvnEntity::getLoadedNub).sum();
int signNum = list.stream().filter(f -> f.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())).mapToInt(DistributionLoadscaninvnEntity::getLoadedNub).sum();
if (signNum > 0 && signNum == rs.getReservationNum()){
if (signNum > 0 && signNum == rs.getReservationNum()) {
rs.setSigningStatusName(ReservationSigningStatusConstant.yiqianshou.getValue());
}else if (signNum > 0 && signNum < rs.getReservationNum()){
} else if (signNum > 0 && signNum < rs.getReservationNum()) {
rs.setSigningStatusName(ReservationSigningStatusConstant.bufenqianshou.getName());
}else {
} else {
rs.setSigningStatusName(ReservationSigningStatusConstant.daiqianshou.getName());
}
}
@ -4655,43 +4659,43 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// map.put("收货单单位", reservationEntity.getReceivingUnit());//收货单单位
// map.put("商场名称", reservationEntity.getStoreName());//商场名称
// 构建map集合中收货单和商场名称
buildMapByDistrilbutionBillLadingEntity(map, distrilbutionBillStockEntities, distributionParcelListEntities,distrilbutionBillLadingEntity);
buildMapByDistrilbutionBillLadingEntity(map, distrilbutionBillStockEntities, distributionParcelListEntities, distrilbutionBillLadingEntity);
map.put("提货人", distrilbutionBillLadingEntity.getConsignee());//提货人
map.put("联系电话", distrilbutionBillLadingEntity.getConsigneePhone());//收货人电话
BasicdataWarehouseEntity entityWarehouseId = warehouseClient.getEntityWarehouseId(distrilbutionBillLadingEntity.getWarehouseId());
map.put("自提仓库", entityWarehouseId!=null?entityWarehouseId.getName():"");
map.put("自提仓库", entityWarehouseId != null ? entityWarehouseId.getName() : "");
map.put("自提时间", DateUtil.formatDateTime(distrilbutionBillLadingEntity.getPickUpTime()));
map.put("提货车牌号", distrilbutionBillLadingEntity.getPickUpPlate());
map.put("创建时间", DateUtil.formatDateTime(distrilbutionBillLadingEntity.getCreateTime()));
Map<String,Object> fua = new HashMap<>();
Map<String, Object> fua = new HashMap<>();
// 需要去查询费用明细
LambdaQueryWrapper<DistributionDeliveryChargeEntity> qu = new LambdaQueryWrapper<>();
qu.eq(DistributionDeliveryChargeEntity::getBillLading,distrilbutionBillLadingEntity.getId());
qu.eq(DistributionDeliveryChargeEntity::getBillLading, distrilbutionBillLadingEntity.getId());
List<DistributionDeliveryChargeEntity> distributionDeliveryChargeEntities = distributionDeliveryChargeMapper.selectList(qu);
HashMap<String, Object> objectObjectHashMap = new HashMap<>();
BigDecimal sumMoney =new BigDecimal("0.00");
BigDecimal sumMoney = new BigDecimal("0.00");
// 构建费用明细
for (DistributionDeliveryChargeEntity distributionDeliveryChargeEntity : distributionDeliveryChargeEntities) {
String costName = distributionDeliveryChargeEntity.getCost();// 查询码表 得到类型
costName=DictBizCache.getValue("delivery_cost",costName);
costName = DictBizCache.getValue("delivery_cost", costName);
BigDecimal costMoney = distributionDeliveryChargeEntity.getMoney();// 查询码表 得到类型
objectObjectHashMap.put(costName,costMoney);
objectObjectHashMap.put(costName, costMoney);
sumMoney.add(costMoney);
}
fua.put("费用明细",objectObjectHashMap);
fua.put("费用明细", objectObjectHashMap);
fua.put("费用合计",sumMoney);
fua.put("费用合计", sumMoney);
map.put("费用统计",fua);
map.put("费用统计", fua);
String popHtml = TemplateUtil.popTemplate("自提配送单", map, html);
PrintPreviewVO printPreviewVO = new PrintPreviewVO();
@ -4705,7 +4709,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
private void buildMapByDistrilbutionBillLadingEntity(Map<String, Object> map, List<DistrilbutionBillStockEntity> distrilbutionBillStockEntities, List<DistributionParcelListEntity> distributionParcelListEntities,DistrilbutionBillLadingEntity distrilbutionBillLadingEntity) {
private void buildMapByDistrilbutionBillLadingEntity(Map<String, Object> map, List<DistrilbutionBillStockEntity> distrilbutionBillStockEntities, List<DistributionParcelListEntity> distributionParcelListEntities, DistrilbutionBillLadingEntity distrilbutionBillLadingEntity) {
// 查询订单集合
Set<Long> ids = new HashSet<Long>();
@ -4725,9 +4729,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<Map<String, Object>> listMapTemp = new ArrayList<>();
Map<String, Object> m = new HashMap<>();
int hejiNum =0;
int hejiNum = 0;
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) {
if(StringUtils.isBlank(distributionParcelListEntity.getThirdProduct())){
if (StringUtils.isBlank(distributionParcelListEntity.getThirdProduct())) {
distributionParcelListEntity.setThirdProduct("其它");
}
if (m.containsKey(distributionParcelListEntity.getThirdProduct())) {
@ -4747,7 +4751,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// 需要从所有的包件的
List<DistributionParcelListEntity> ts = new ArrayList<>();
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) {
if (distributionParcelListEntity.getStockArticleId().equals(distributionStockArticleEntity.getId())){
if (distributionParcelListEntity.getStockArticleId().equals(distributionStockArticleEntity.getId())) {
ts.add(distributionParcelListEntity);
}
}
@ -4777,16 +4781,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// 构建产品明细 --对于每一个订单
buildProductDetail(tempMap, m, ts);
Map<String,Object> os = (Map<String, Object>) tempMap.get("产品明细");
Map<String, Object> os = (Map<String, Object>) tempMap.get("产品明细");
Set<String> strings = os.keySet();
int sumNum =0;
int sumNum = 0;
for (String string : strings) {
Object o = os.get(string);
sumNum+=(o!=null)?(int)o:0;
sumNum += (o != null) ? (int) o : 0;
}
tempMap.put("小计", sumNum);
hejiNum+=sumNum;
hejiNum += sumNum;
// 查询货物货位
//通过订单id和预约id查询对应包件的库位信息
@ -4805,16 +4809,15 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
tempMap.put("货位", allocationStr);
//通过订单id和预约id查询对应包件的备货区信息
LambdaQueryWrapper<DistributionStockEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(DistributionStockEntity::getBillLadingId,distrilbutionBillLadingEntity.getId()).in(DistributionStockEntity::getParcelListId,orderPackageIds);
lambdaQueryWrapper.eq(DistributionStockEntity::getBillLadingId, distrilbutionBillLadingEntity.getId()).in(DistributionStockEntity::getParcelListId, orderPackageIds);
List<DistributionStockEntity> distributionStockEntities = distributionStockMapper.selectList(lambdaQueryWrapper);
Set<String> stockupAreaStrList=distributionStockEntities.stream().map(DistributionStockEntity::getStockupArea).collect(Collectors.toSet());
Set<String> stockupAreaStrList = distributionStockEntities.stream().map(DistributionStockEntity::getStockupArea).collect(Collectors.toSet());
String stockupAreaStr = StringUtils.join(stockupAreaStrList, ",");
tempMap.put("备货区", stockupAreaStr);
ls.add(tempMap);
a++;
@ -4825,15 +4828,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
map.put("明细", ls);
Map<String, Object> m1 = new HashMap<>();
m1.put("产品明细",m);
m1.put("产品明细", m);
m1.put("合计数量",hejiNum);
m1.put("合计数量", hejiNum);
map.put("合计", m1);
}
/**
* 构建分类明细
*
* @param tempMap
* @param m
* @param distributionParcelListEntities
@ -4841,12 +4845,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
private void buildProductDetail(Map<String, Object> tempMap, Map<String, Object> m, List<DistributionParcelListEntity> distributionParcelListEntities) {
Set<String> strings = m.keySet();
Map<String, Object> newTempMap= new HashMap<>();
Map<String, Object> newTempMap = new HashMap<>();
for (String string : strings) {
int count = buildCountNum(string, distributionParcelListEntities);
newTempMap.put(string, count);
}
tempMap.put("产品明细",newTempMap);
tempMap.put("产品明细", newTempMap);
}
/**
@ -4861,7 +4865,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
int num = 0;
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) {
if(StringUtils.isBlank(distributionParcelListEntity.getThirdProduct())){
if (StringUtils.isBlank(distributionParcelListEntity.getThirdProduct())) {
distributionParcelListEntity.setThirdProduct("其它");
}
@ -4876,7 +4880,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
StringBuffer sb = new StringBuffer();
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntitie) {
if(ObjectUtils.isNotNull(distributionParcelListEntity.getMallName())){
if (ObjectUtils.isNotNull(distributionParcelListEntity.getMallName())) {
if (!sb.toString().equals("")) {
sb.append(",");
}
@ -5149,6 +5153,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub());
//扣减订单在库数量
distributionStockArticleMapper.deductionHandQuantity(loadscanEntity.getOrderId(), loadscanEntity.getLoadedNub());
//异步维护此异常装车包件的订单状态
distributionAsyncService.checkOrderLoadingStatus(parcelListEntity.getId());
DistributionSignforEntity signforEntity = distributionSignforService.getOne(Wrappers.<DistributionSignforEntity>query().lambda().eq(DistributionSignforEntity::getReservationId, reservationEntity.getId()).eq(DistributionSignforEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()));
@ -5676,7 +5682,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// 对应签收信息的装车数量要进行扣减
int a = distributionSignforMapper.deductionLoadingPacjageNum(loadscanEntity.getReservationId(), loadscanEntity.getDeliveryId(), loadscanEntity.getLoadedNub());
//维护在库订单的在库数量字段
distributionStockArticleMapper.augmentHandQuantity(loadscanEntity.getOrderId(),loadscanEntity.getLoadedNub());
distributionStockArticleMapper.augmentHandQuantity(loadscanEntity.getOrderId(), loadscanEntity.getLoadedNub());
distributionAsyncService.checkReservationStatusAndLoadingStatusByPackage(parcelListEntity.getId());
}
//进行了一条包件任务的取消,此时就应该对预约、配送任务进行数量的维护
@ -5751,7 +5757,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
.eq(DistributionParcelNumberEntity::getStockArticleId, distributionParcelNumberVO.getStockArticleId())
.eq(DistributionParcelNumberEntity::getParcelListId, distributionParcelNumberVO.getParcelListId())
);
if (Func.isNotEmpty(distributionParcelNumberEntity)){
if (Func.isNotEmpty(distributionParcelNumberEntity)) {
//这里滞留都是在装车之后进行 只需要维护出库数量和在库数量字段
distributionParcelNumberEntity.setOutboundQuantity(distributionParcelNumberEntity.getOutboundQuantity() - retentionQuantity);
distributionParcelNumberEntity.setHandQuantity(distributionParcelNumberEntity.getHandQuantity() + retentionQuantity);
@ -5761,7 +5767,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (Func.isNotEmpty(zeroLoadscanEntity)) {
//存在装车数据
int num = zeroLoadscanEntity.getLoadedNub() - retentionQuantity;
if (num > 0){
if (num > 0) {
zeroLoadscanEntity.setLoadedNub(0);
zeroLoadscanEntity.setPackageNub(0);
} else {
@ -5774,7 +5780,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
int a = distributionSignforMapper.deductionLoadingPacjageNum(zeroLoadscanEntity.getReservationId(), zeroLoadscanEntity.getDeliveryId(), retentionQuantity);
distributionAsyncService.checkReservationStatusAndLoadingStatusByPackage(distributionParcelNumberEntity.getParcelListId());
}
distributionAsyncService.checkRetentionZeroPackageReservationAndDeliveryInfo(reservationId, deliveryId, orderPackageId,orderId);
distributionAsyncService.checkRetentionZeroPackageReservationAndDeliveryInfo(reservationId, deliveryId, orderPackageId, orderId);
return true;
} else {
return false;
@ -5796,6 +5802,122 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return baseMapper.selectDeliveryById(deliveryId);
}
@Override
public List<AftersalesAbnormalPackageVO> aftersalesPackageScan(Long deliveryId, String scanBarCode) {
DistributionDeliveryListEntity deliveryListEntity = this.getById(deliveryId);
if (ObjectUtils.isNull(deliveryListEntity)) {
log.info("#############查询配送失败,ID:{}", deliveryId);
return null;
}
List<AftersalesAbnormalPackageVO> aftersalesAbnormalPackageVOS = new ArrayList<>();
//查询该配送任务下的所有包件,查看是否存在有满足条件的包件
List<DistributionParcelListEntity> distributionParcelListEntities = distributionDeliveryListMapper.selectPackageListByDeliveryListId(deliveryListEntity.getId());
if (Func.isNotEmpty(distributionParcelListEntities)) {
List<DistributionParcelListEntity> packageList = distributionParcelListEntities.stream().filter(p -> p.getOrderPackageCode().equals(scanBarCode)).collect(Collectors.toList());
if (Func.isNotEmpty(packageList)) {
for (DistributionParcelListEntity parcelListEntity : packageList) {
AftersalesAbnormalPackageVO abnormalPackageVO = Func.copy(parcelListEntity, AftersalesAbnormalPackageVO.class);
abnormalPackageVO.setPackageCode(parcelListEntity.getOrderPackageCode());
abnormalPackageVO.setOrderCode(parcelListEntity.getOrderCode());
abnormalPackageVO.setWaybillNumber(parcelListEntity.getWaybillNumber());
WarehouseWaybillEntity byWaybillNo = warehouseWaybillClient.findByWaybillNo(parcelListEntity.getWaybillNumber());
abnormalPackageVO.setWaybillId(byWaybillNo.getId());
abnormalPackageVO.setConditions(1);
abnormalPackageVO.setNumber(parcelListEntity.getQuantity().toString());
abnormalPackageVO.setOrderId(parcelListEntity.getStockArticleId());
abnormalPackageVO.setWarehouseId(parcelListEntity.getWarehouseId());
abnormalPackageVO.setIsAbnormalLoading(1);
abnormalPackageVO.setIsAbnormalSinging(1);
aftersalesAbnormalPackageVOS.add(abnormalPackageVO);
}
}else {
//查看是否是异常装车包件
List<DistributionLoadscanEntity> list = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId, deliveryId)
.eq(DistributionLoadscanEntity::getIsAbnormalLoading, IsOrNoConstant.yes.getValue())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(list)){
List<DistributionLoadscanEntity> abnormalPackageList = list.stream().filter(f -> f.getOrderPackageCode().equals(scanBarCode)).collect(Collectors.toList());
if (Func.isNotEmpty(abnormalPackageList)){
for (DistributionLoadscanEntity distributionLoadscanEntity : abnormalPackageList) {
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(distributionLoadscanEntity.getPackageId());
AftersalesAbnormalPackageVO abnormalPackageVO = Func.copy(distributionLoadscanEntity, AftersalesAbnormalPackageVO.class);
abnormalPackageVO.setPackageCode(distributionLoadscanEntity.getOrderPackageCode());
abnormalPackageVO.setOrderCode(parcelListEntity.getOrderCode());
abnormalPackageVO.setWaybillNumber(parcelListEntity.getWaybillNumber());
WarehouseWaybillEntity byWaybillNo = warehouseWaybillClient.findByWaybillNo(parcelListEntity.getWaybillNumber());
abnormalPackageVO.setWaybillId(byWaybillNo.getId());
abnormalPackageVO.setConditions(1);
abnormalPackageVO.setNumber(parcelListEntity.getQuantity().toString());
abnormalPackageVO.setOrderId(parcelListEntity.getStockArticleId());
abnormalPackageVO.setWarehouseId(parcelListEntity.getWarehouseId());
abnormalPackageVO.setIsAbnormalLoading(distributionLoadscanEntity.getIsAbnormalLoading());
abnormalPackageVO.setIsAbnormalSinging(distributionLoadscanEntity.getIsAbnormalSigning());
aftersalesAbnormalPackageVOS.add(abnormalPackageVO);
}
}
}
}
}
if (deliveryListEntity.getType().equals("2")) {
List<DisStockListDetailEntity> disStockListDetailEntities = distributionDeliveryListMapper.selectInventoryListByDeliveryListId(deliveryId);
if (Func.isNotEmpty(disStockListDetailEntities)) {
List<DisStockListDetailEntity> inventoryList = disStockListDetailEntities.stream().filter(f -> f.getStockPackageCode().equals(scanBarCode)).collect(Collectors.toList());
if (Func.isNotEmpty(inventoryList)) {
for (DisStockListDetailEntity disStockListDetailEntity : inventoryList) {
AftersalesAbnormalPackageVO abnormalPackageVO = Func.copy(disStockListDetailEntity, AftersalesAbnormalPackageVO.class);
abnormalPackageVO.setPackageCode(disStockListDetailEntity.getStockPackageCode());
DistributionStockListEntity stockListEntity = distributionStockListService.getById(disStockListDetailEntity.getStockListId());
if (stockListEntity.getSourceType().equals(1)) {
DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleMapper.selectOne(Wrappers.<DistributionStockArticleEntity>query().lambda()
.eq(DistributionStockArticleEntity::getOrderCode, stockListEntity.getIncomingBatch())
);
//需要查询订单
abnormalPackageVO.setOrderCode(distributionStockArticleEntity.getOrderCode());
abnormalPackageVO.setWaybillNumber(distributionStockArticleEntity.getWaybillNumber());
WarehouseWaybillEntity byWaybillNo = warehouseWaybillClient.findByWaybillNo(distributionStockArticleEntity.getWaybillNumber());
abnormalPackageVO.setWaybillId(byWaybillNo.getId());
abnormalPackageVO.setOrderId(distributionStockArticleEntity.getId());
}
abnormalPackageVO.setConditions(2);
abnormalPackageVO.setNumber(disStockListDetailEntity.getNum().toString());
abnormalPackageVO.setWarehouseId(disStockListDetailEntity.getWarehouseId());
abnormalPackageVO.setCargoNumber(stockListEntity.getCargoNumber());
abnormalPackageVO.setIncomingBatch(stockListEntity.getIncomingBatch());
aftersalesAbnormalPackageVOS.add(abnormalPackageVO);
}
}
}
}
List<DistributionRetentionScanVo> distributionRetentionScanVos = distributionDeliveryListMapper.selectRetentionZeroPackage(deliveryId, scanBarCode);
if (Func.isNotEmpty(distributionRetentionScanVos)){
for (DistributionRetentionScanVo distributionRetentionScanVo : distributionRetentionScanVos) {
AftersalesAbnormalPackageVO abnormalPackageVO = Func.copy(distributionRetentionScanVo, AftersalesAbnormalPackageVO.class);
abnormalPackageVO.setConditions(3);
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(distributionRetentionScanVo.getOrderId());
abnormalPackageVO.setOrderCode(stockArticleEntity.getOrderCode());
abnormalPackageVO.setOrderId(stockArticleEntity.getId());
abnormalPackageVO.setWaybillNumber(stockArticleEntity.getWaybillNumber());
abnormalPackageVO.setWarehouseId(stockArticleEntity.getWarehouseId());
WarehouseWaybillEntity byWaybillNo = warehouseWaybillClient.findByWaybillNo(stockArticleEntity.getWaybillNumber());
abnormalPackageVO.setWaybillId(byWaybillNo.getId());
abnormalPackageVO.setMaxQuantity(distributionRetentionScanVo.getMaxQuantity());
aftersalesAbnormalPackageVOS.add(abnormalPackageVO);
}
}
if (Func.isEmpty(aftersalesAbnormalPackageVOS)) {
log.info("############此配送任务查询包件信息失败,码值:{}", scanBarCode);
return null;
}
return aftersalesAbnormalPackageVOS;
}
public Map<String, String> getDriverCar(String kind, Long deliveryListEntityId) {
Map<String, String> map = new HashMap<>();
String dirverName = null;

Loading…
Cancel
Save