Browse Source

Merge branch 'dev' into pre-production

pre-production
pref_mail@163.com 2 months ago
parent
commit
ddfb655a59
  1. 8
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java
  2. 18
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownTypeClient.java
  3. 32
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/DownPackageTrayVO.java
  4. 28
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionSignforAppController.java
  5. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  6. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  7. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/BillLadingScanDataQueueHandler.java
  8. 39
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  9. 30
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  10. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  11. 8
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java
  12. 29
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java
  13. 54
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/ExpenseDispatchOrderDetailMapper.xml
  14. 7
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/query/ExpenseDispatchTrainDetailQuery.java
  15. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java
  16. 8
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java
  17. 316
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  18. 21
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownTypeClient.java
  19. 9
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java

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

@ -50,6 +50,11 @@ public class DistributionSignforVO extends DistributionSignforEntity {
*/ */
@ApiModelProperty(value = "客户电话") @ApiModelProperty(value = "客户电话")
private String deliveryPhone; private String deliveryPhone;
/**
* 定位打卡位置
*/
@ApiModelProperty(value = "定位打卡位置")
private String positioningAdr;
/** /**
* 客户地址 * 客户地址
*/ */
@ -90,7 +95,7 @@ public class DistributionSignforVO extends DistributionSignforEntity {
* 计划总数 * 计划总数
*/ */
@ApiModelProperty(value = "计划总数") @ApiModelProperty(value = "计划总数")
private Integer totalNum; private Integer planNum;
/** /**
* 装车件数 * 装车件数
*/ */
@ -340,6 +345,7 @@ public class DistributionSignforVO extends DistributionSignforEntity {
@ApiModelProperty(value = "商城ID") @ApiModelProperty(value = "商城ID")
private List<Long> clientIds; private List<Long> clientIds;
/** /**
* 签收图片路径多个 * 签收图片路径多个
*/ */

18
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownTypeClient.java

@ -17,6 +17,7 @@
package com.logpm.warehouse.feign; package com.logpm.warehouse.feign;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.logpm.warehouse.vo.DownPackageTrayVO;
import org.springblade.common.constant.ModuleNameConstant; import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
@ -43,7 +44,7 @@ public interface IWarehouseUpdownTypeClient {
String TOP = API_PREFIX + "/top"; String TOP = API_PREFIX + "/top";
@GetMapping(TOP + "/downPackage") @GetMapping(TOP + "/downPackage")
R downPackage(@RequestParam("orderPackageCodes") String orderPackageCodes, @RequestParam("warehouseId") Long warehouseId,@RequestParam("remark") String remark); R downPackage(@RequestParam String orderPackageCodes, @RequestParam Long warehouseId,@RequestParam String remark);
@PostMapping(TOP + "/downDeliveryPackage") @PostMapping(TOP + "/downDeliveryPackage")
@ -55,26 +56,23 @@ public interface IWarehouseUpdownTypeClient {
@PostMapping(TOP + "/downStock") @PostMapping(TOP + "/downStock")
R downStock(@RequestBody List<JSONObject> stockLists); R downStock(@RequestBody List<JSONObject> stockLists);
@PostMapping(TOP + "/packageChangeStock")
boolean packageChangeStock(@RequestBody List<String> orderPackageCodes);
@GetMapping(TOP + "/downPackageOrDelTray") @PostMapping(TOP + "/downPackageOrDelTray")
R downPackageOrDelTray(@RequestParam("orderPackageCodes") String orderPackageCodes, @RequestParam("warehouseId") Long warehouseId,@RequestParam("remark") String remark); R downPackageOrDelTray(@RequestBody DownPackageTrayVO downPackageTrayVO);
@GetMapping(TOP + "/downPackageAndDelTrayAndIsUpdate") @GetMapping(TOP + "/downPackageAndDelTrayAndIsUpdate")
R downPackageAndDelTrayAndIsUpdate(@RequestParam("orderPackageCodes") String orderPackageCodes, @RequestParam("warehouseId") Long warehouseId,@RequestParam("remark") String remark,@RequestParam("isOrNo") boolean isOrNo); R downPackageAndDelTrayAndIsUpdate(@RequestParam String orderPackageCodes, @RequestParam Long warehouseId,@RequestParam String remark,@RequestParam boolean isOrNo);
@GetMapping(TOP + "/downTray") @GetMapping(TOP + "/downTray")
R downTray(@RequestParam("trayCode") String trayCode, @RequestParam("warehouseId") Long warehouseId); R downTray(@RequestParam String trayCode, @RequestParam Long warehouseId);
@GetMapping(TOP + "/upShelfTray") @GetMapping(TOP + "/upShelfTray")
boolean upShelfTray(@RequestParam("trayCode") String trayCode, @RequestParam("locationId") Long locationId, @RequestParam("warehouseId") Long warehouseId); boolean upShelfTray(@RequestParam String trayCode, @RequestParam Long locationId, @RequestParam Long warehouseId);
@GetMapping(TOP + "/upShelfPackage") @GetMapping(TOP + "/upShelfPackage")
boolean upShelfPackage(@RequestParam String orderPackageCode, @RequestParam Long locationId, @RequestParam Long warehouseId,@RequestParam String remark); boolean upShelfPackage(@RequestParam String orderPackageCode, @RequestParam Long locationId, @RequestParam Long warehouseId,@RequestParam String remark);
@GetMapping(TOP + "/findUpdownTypeInforByAllocationId")
R findUpdownTypeInforByAllocationId(@RequestParam Long allocationId, @RequestParam Long warehouseId);
@GetMapping(TOP + "/findAllGoodsByAllocationId") @GetMapping(TOP + "/findAllGoodsByAllocationId")
R findAllGoodsByAllocationId(@RequestParam Long allocationId, @RequestParam Long warehouseId); R findAllGoodsByAllocationId(@RequestParam Long allocationId, @RequestParam Long warehouseId);
@GetMapping(TOP + "/findZeroAllocation") @GetMapping(TOP + "/findZeroAllocation")

32
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/DownPackageTrayVO.java

@ -0,0 +1,32 @@
package com.logpm.warehouse.vo;
import lombok.Data;
import org.springframework.web.bind.annotation.RequestParam;
import java.io.Serializable;
/**
* 托盘下架解托对象
*/
@Data
public class DownPackageTrayVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 包条码
* 分割
*/
private String orderPackageCodes;
/**
* 仓库ID
*/
private Long warehouseId;
/**
* 备注
*/
private String remark;
}

28
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionSignforAppController.java

@ -20,6 +20,7 @@ import com.logpm.distribution.vo.app.DistributionAppParcelListVO;
import com.logpm.distribution.vo.app.DistributionAppSignforVO; import com.logpm.distribution.vo.app.DistributionAppSignforVO;
import com.logpm.distribution.vo.app.DistributionAppStockArticleVO; import com.logpm.distribution.vo.app.DistributionAppStockArticleVO;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.vo.DownPackageTrayVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -192,7 +193,13 @@ public class DistributionSignforAppController {
} }
} }
if (StringUtils.isNotBlank(orderPackageCodes)) { if (StringUtils.isNotBlank(orderPackageCodes)) {
updownTypeClient.downPackageOrDelTray(orderPackageCodes, myCurrentWarehouse.getId(), "签收下架解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(orderPackageCodes);
downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId());
downPackageTrayVO.setRemark("签收下架解托");
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
} }
@ -223,8 +230,16 @@ public class DistributionSignforAppController {
} }
// 执行下架解托盘代码 // 执行下架解托盘代码
String remark = "签收下架解托"; String remark = "签收下架解托";
if (StringUtils.isNotBlank(orderPackageCodes)) {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
updownTypeClient.downPackageOrDelTray(orderPackageCodes, myCurrentWarehouse.getId(), remark); DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(orderPackageCodes);
downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId());
downPackageTrayVO.setRemark(remark);
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
}
} }
return r; return r;
} catch (CustomerException e) { } catch (CustomerException e) {
@ -236,6 +251,7 @@ public class DistributionSignforAppController {
/** /**
* 取消异常签收 * 取消异常签收
*
* @param distrilbutionloadingscanDTO * @param distrilbutionloadingscanDTO
* @return * @return
*/ */
@ -336,7 +352,13 @@ public class DistributionSignforAppController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (orderPackageCodes != null) { if (orderPackageCodes != null) {
updownTypeClient.downPackageOrDelTray(orderPackageCodes, myCurrentWarehouse.getId(), "司机一键签收下架解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(orderPackageCodes);
downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId());
downPackageTrayVO.setRemark("司机一键签收下架解托");
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
log.info("##############oneclick: 结束执行下架:{}", packageCodes); log.info("##############oneclick: 结束执行下架:{}", packageCodes);

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java

@ -38,6 +38,7 @@ import com.logpm.distribution.wrapper.DistributionDeliveryListWrapper;
import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity;
import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; import com.logpm.warehouse.entity.WarehouseRetentionScanEntity;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.vo.DownPackageTrayVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
@ -485,7 +486,13 @@ public class DistributionDeliveryListController extends BladeController {
} }
} }
if(StringUtils.isNotBlank(orderPackageCodes)){ if(StringUtils.isNotBlank(orderPackageCodes)){
warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCodes,myCurrentWarehouse.getId(),"签收下架解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(orderPackageCodes);
downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId());
downPackageTrayVO.setRemark("签收下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
} }
return r; return r;

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

@ -743,15 +743,20 @@
lds.clerk_sign_pictures clerkSignPictures, lds.clerk_sign_pictures clerkSignPictures,
lds.delivery_sign_pictures deliverySignPictures, lds.delivery_sign_pictures deliverySignPictures,
ldr.reservation_date reservationDate, ldr.reservation_date reservationDate,
lds.positioning_adr positioningAdr, (ldr.reservation_num + ldr.reservation_stock_list_num) AS planNum,
(lds.loaded_number + lds.loadedin_number) loadingNum, (lds.loaded_number + lds.loadedin_number) loadingNum,
(lds.received_quantity + lds.receivedin_quantity) signingNum, (lds.received_quantity + lds.receivedin_quantity) signingNum,
lddl.train_number trainNumber, lddl.train_number trainNumber,
lddl.vehicle_name vehicleName, lddl.vehicle_name vehicleName,
lddl.driver_name driverName, lddl.driver_name driverName,
lddl.loading_team_name loadingTeamName, lddl.loading_team_name loadingTeamName,
lddl.unloading_team_name unLoadingTeamName, lddl.unloading_team_name unLoadingTeamName,
lds.signee_name AS signeeName,
lds.examine_user_name AS examineUserName,
lds.sjsigning_time AS sjsigningTime,
lds.signing_time AS signingTime,
lddl.task_time AS taskTime,
GROUP_CONCAT(DISTINCT ldp.latitude_and_longitude) AS positioningAdr,
CASE CASE
WHEN ldr.delivery_type = '1' THEN WHEN ldr.delivery_type = '1' THEN
'商配' '商配'
@ -773,7 +778,8 @@
FROM FROM
logpm_distribution_signfor lds logpm_distribution_signfor lds
JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id AND ldr.reservation_status != 40
LEFT JOIN logpm_distribution_positioning AS ldp ON lds.reservation_id = lds.reservation_id AND ldp.is_deleted = 0
where lds.is_deleted = 0 and lds.id = #{id} where lds.is_deleted = 0 and lds.id = #{id}
</select> </select>

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/BillLadingScanDataQueueHandler.java

@ -3,6 +3,7 @@ package com.logpm.distribution.receiver;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.vo.DownPackageTrayVO;
import com.rabbitmq.client.Channel; import com.rabbitmq.client.Channel;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -34,7 +35,13 @@ public class BillLadingScanDataQueueHandler {
Long warehouseId = (Long) warehouseIdObj; Long warehouseId = (Long) warehouseIdObj;
if(StringUtils.isNotBlank(coding)){ if(StringUtils.isNotBlank(coding)){
warehouseUpdownTypeClient.downPackageOrDelTray(coding, warehouseId, "签收下架解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(coding);
downPackageTrayVO.setWarehouseId(warehouseId);
downPackageTrayVO.setRemark("签收下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
}else{ }else{

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

@ -60,6 +60,7 @@ import com.logpm.warehouse.entity.WarehouseRetentionScanEntity;
import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity; import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity;
import com.logpm.warehouse.entity.WarehouseWaybillEntity; import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.*; import com.logpm.warehouse.feign.*;
import com.logpm.warehouse.vo.DownPackageTrayVO;
import com.logpm.warehouse.vo.TrayTypeDataVO; import com.logpm.warehouse.vo.TrayTypeDataVO;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
@ -106,7 +107,6 @@ import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.cache.DictBizCache; import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.User; import org.springblade.system.entity.User;
import org.springblade.system.feign.IDictBizClient; import org.springblade.system.feign.IDictBizClient;
@ -859,7 +859,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
info.put("orderPackageCode", parcelListEntity.getOrderPackageCode()); info.put("orderPackageCode", parcelListEntity.getOrderPackageCode());
info.put("warehouseId", myCurrentWarehouse.getId()); info.put("warehouseId", myCurrentWarehouse.getId());
if (StringUtils.isNotBlank(parcelListEntity.getOrderPackageCode())) { if (StringUtils.isNotBlank(parcelListEntity.getOrderPackageCode())) {
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "扫描装车进行下架、解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(parcelListEntity.getOrderPackageCode());
downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId());
downPackageTrayVO.setRemark("扫描装车进行下架、解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
Map<String, Object> map = new HashMap(); Map<String, Object> map = new HashMap();
@ -1613,7 +1618,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_LOADING.getCode()); JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_LOADING.getCode());
logList.add(trunklinePackageTrackLog); logList.add(trunklinePackageTrackLog);
//进行解托下架 //进行解托下架
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId(),"一件装车解托下架");
// warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId(),"一件装车解托下架");
} }
} }
break; break;
@ -1817,10 +1824,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (Func.isNotEmpty(updatePackageList)) { if (Func.isNotEmpty(updatePackageList)) {
String updownrOderPackages = updatePackageList.stream().map(DistributionParcelListEntity::getOrderPackageCode).collect(Collectors.joining(",")); String updownrOderPackages = updatePackageList.stream().map(DistributionParcelListEntity::getOrderPackageCode).collect(Collectors.joining(","));
if (Func.isNotEmpty(orderPackages)) { if (Func.isNotEmpty(orderPackages)) {
Map<String, Object> map = new HashMap<>(); DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
map.put("orderPackageCode", updownrOderPackages); downPackageTrayVO.setOrderPackageCodes(updownrOderPackages);
map.put("warehouseId", myCurrentWarehouse.getId()); downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId());
warehouseUpdownTypeClient.downDeliveryPackage(map); downPackageTrayVO.setRemark("一件装车解托下架");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
List<Long> packageIds = updatePackageList.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList()); List<Long> packageIds = updatePackageList.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList());
if (Func.isNotEmpty(packageIds)) { if (Func.isNotEmpty(packageIds)) {
@ -8514,7 +8523,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (StringUtils.isNotBlank(packageObj.getOrderPackageCode())) { if (StringUtils.isNotBlank(packageObj.getOrderPackageCode())) {
warehouseUpdownTypeClient.downPackageOrDelTray(packageObj.getOrderPackageCode(), warehouseId, "签收下架解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(packageObj.getOrderPackageCode());
downPackageTrayVO.setWarehouseId(warehouseId);
downPackageTrayVO.setRemark("签收下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
content = "包件在" + entityWarehouseId.getName() + "由" + distributionLoadscanEntity.getSigningUser() + "扫描签收,签收方式:司机未进行装车,由商家端进行签收,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode(); content = "包件在" + entityWarehouseId.getName() + "由" + distributionLoadscanEntity.getSigningUser() + "扫描签收,签收方式:司机未进行装车,由商家端进行签收,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
} }
@ -9015,7 +9030,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
info.put("orderPackageCode", parcelListEntity.getOrderPackageCode()); info.put("orderPackageCode", parcelListEntity.getOrderPackageCode());
info.put("warehouseId", myCurrentWarehouse.getId()); info.put("warehouseId", myCurrentWarehouse.getId());
if (StringUtils.isNotBlank(parcelListEntity.getOrderPackageCode())) { if (StringUtils.isNotBlank(parcelListEntity.getOrderPackageCode())) {
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "扫描装车进行下架、解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(parcelListEntity.getOrderPackageCode());
downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId());
downPackageTrayVO.setRemark("扫描装车进行下架、解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
//检查是否存在有装车异常,进行处理 //检查是否存在有装车异常,进行处理
// distributionSignforService.maintenanceSignfor(reservationId); // distributionSignforService.maintenanceSignfor(reservationId);

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

@ -156,6 +156,7 @@ import com.logpm.warehouse.feign.IWarehouseConfigClient;
import com.logpm.warehouse.feign.IWarehouseRetentionScanClient; import com.logpm.warehouse.feign.IWarehouseRetentionScanClient;
import com.logpm.warehouse.feign.IWarehouseUpdownStockUpAreaClient; import com.logpm.warehouse.feign.IWarehouseUpdownStockUpAreaClient;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.vo.DownPackageTrayVO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@ -3093,7 +3094,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (StringUtils.isNotBlank(collect.get(0).getOrderPackageCode())) { if (StringUtils.isNotBlank(collect.get(0).getOrderPackageCode())) {
//包件解托下架 //包件解托下架
warehouseUpdownTypeClient.downPackageOrDelTray(collect.get(0).getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托"); DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(collect.get(0).getOrderPackageCode());
downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId());
downPackageTrayVO.setRemark("签收下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
@ -3542,7 +3547,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// Integer m = distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser()); // Integer m = distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser());
if (StringUtils.isNotBlank(distributionLoadscanEntity.getOrderPackageCode())) { if (StringUtils.isNotBlank(distributionLoadscanEntity.getOrderPackageCode())) {
//下架解托 //下架解托
warehouseUpdownTypeClient.downPackageOrDelTray(distributionLoadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托"); DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(distributionLoadscanEntity.getOrderPackageCode());
downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId());
downPackageTrayVO.setRemark("签收下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "后台签收,装车方式:扫描装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + distributionReservationEntity.getReservationCode(); content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "后台签收,装车方式:扫描装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + distributionReservationEntity.getReservationCode();
try { try {
@ -3706,13 +3715,14 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override @Override
public DistributionSignforVO getOneCustom(Long id) { public DistributionSignforVO getOneCustom(Long id) {
DistributionSignforVO distributionSignforVO = baseMapper.selectOneCustom(id);
//查询客户下的订单列表信息 //查询客户下的订单列表信息
DistributionSignforEntity signforEntity = this.getById(id); DistributionSignforEntity signforEntity = this.getById(id);
if (Func.isEmpty(signforEntity)) { if (Func.isEmpty(signforEntity)) {
log.error("###########查询签收信息异常,id:{}", id); log.error("###########查询签收信息异常,id:{}", id);
return null; return null;
} }
DistributionSignforVO distributionSignforVO = baseMapper.selectOneCustom(id);
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.<DistributionReservationStockarticleEntity>query().lambda() List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.<DistributionReservationStockarticleEntity>query().lambda()
.eq(DistributionReservationStockarticleEntity::getReservationId, signforEntity.getReservationId()) .eq(DistributionReservationStockarticleEntity::getReservationId, signforEntity.getReservationId())
.ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue())); .ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue()));
@ -3936,7 +3946,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (StringUtils.isNotBlank(parcelListEntity.getOrderPackageCode())) { if (StringUtils.isNotBlank(parcelListEntity.getOrderPackageCode())) {
//包件下架解托 //包件下架解托
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托"); DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(parcelListEntity.getOrderPackageCode());
downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId());
downPackageTrayVO.setRemark("签收下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
List<JSONObject> jsonObjects = new ArrayList<>(); List<JSONObject> jsonObjects = new ArrayList<>();
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
@ -4025,7 +4039,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity.setAbnormalNote("异常签收"); distributionLoadscanEntity.setAbnormalNote("异常签收");
distributionLoadscanEntity.setIsZero(0); distributionLoadscanEntity.setIsZero(0);
if (StringUtils.isNotBlank(parcelListEntity.getOrderPackageCode())) { if (StringUtils.isNotBlank(parcelListEntity.getOrderPackageCode())) {
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(parcelListEntity.getOrderPackageCode());
downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId());
downPackageTrayVO.setRemark("签收下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
if (Func.isEmpty(loadscanEntity)) { if (Func.isEmpty(loadscanEntity)) {
loadingId = distributionLoadscanEntity.getId(); loadingId = distributionLoadscanEntity.getId();

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

@ -84,6 +84,7 @@ import com.logpm.trunkline.feign.ITrunklineWaybillTrackClient;
import com.logpm.warehouse.entity.WarehouseConfigEntity; import com.logpm.warehouse.entity.WarehouseConfigEntity;
import com.logpm.warehouse.feign.IWarehouseConfigClient; import com.logpm.warehouse.feign.IWarehouseConfigClient;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.vo.DownPackageTrayVO;
import com.sun.org.apache.xpath.internal.operations.Bool; import com.sun.org.apache.xpath.internal.operations.Bool;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.logging.log4j.util.Strings; import org.apache.logging.log4j.util.Strings;
@ -1461,7 +1462,13 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
String string = builder.deleteCharAt(builder.length() - 1).toString(); String string = builder.deleteCharAt(builder.length() - 1).toString();
if (StringUtils.isNotBlank(string)) { if (StringUtils.isNotBlank(string)) {
warehouseUpdownTypeClient.downPackageOrDelTray(string, myCurrentWarehouse.getId(), "签收下架解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(string);
downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId());
downPackageTrayVO.setRemark("签收下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
} }
if (!logList.isEmpty()) { if (!logList.isEmpty()) {
@ -3721,7 +3728,12 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
billLadingScanEntities.add(distributionBillLadingScan); billLadingScanEntities.add(distributionBillLadingScan);
//进行下架解托 //进行下架解托
if (StringUtils.isNotBlank(distributionBillLadingScan.getPacketBarCode())) { if (StringUtils.isNotBlank(distributionBillLadingScan.getPacketBarCode())) {
warehouseUpdownTypeClient.downPackageOrDelTray(distributionBillLadingScan.getPacketBarCode(), myCurrentWarehouse.getId(), "自提下架解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(distributionBillLadingScan.getPacketBarCode());
downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId());
downPackageTrayVO.setRemark("自提下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
// if(StringUtils.isNotBlank(distributionBillLadingScan.getPacketBarCode())){ // if(StringUtils.isNotBlank(distributionBillLadingScan.getPacketBarCode())){
// warehouseUpdownTypeClient.downPackageOrDelTray(distributionBillLadingScan.getPacketBarCode(),myCurrentWarehouse.getId(),"自提下架解托"); // warehouseUpdownTypeClient.downPackageOrDelTray(distributionBillLadingScan.getPacketBarCode(),myCurrentWarehouse.getId(),"自提下架解托");

8
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java

@ -11,6 +11,7 @@ import com.logpm.patch.mapper.WarehouseMappingDataMapper;
import com.logpm.patch.service.ISyncDistributionParcelListService; import com.logpm.patch.service.ISyncDistributionParcelListService;
import com.logpm.patch.service.IWarehouseMappingDataService; import com.logpm.patch.service.IWarehouseMappingDataService;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.vo.DownPackageTrayVO;
import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -111,7 +112,12 @@ public class DistributionDatarepair {
stringBuffer.append("仓库:" + k).append("包件解托" + orderPackageCodes); stringBuffer.append("仓库:" + k).append("包件解托" + orderPackageCodes);
if(StringUtils.isNotBlank(orderPackageCodes)){ if(StringUtils.isNotBlank(orderPackageCodes)){
warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCodes, k, "签收下架解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(orderPackageCodes);
downPackageTrayVO.setWarehouseId(k);
downPackageTrayVO.setRemark("签收下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
}); });
} }

29
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java

@ -35,6 +35,7 @@ import com.logpm.warehouse.feign.IWarehouseTrayTypeClient;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.feign.IWarehouseWaybillClient; import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import com.logpm.warehouse.feign.IWarehouseWaybillDetailClient; import com.logpm.warehouse.feign.IWarehouseWaybillDetailClient;
import com.logpm.warehouse.vo.DownPackageTrayVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
@ -322,7 +323,13 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
distributionParcelListClient.update(parcelListEntity); distributionParcelListClient.update(parcelListEntity);
distributionStockArticleClient.updateOrderInfo(orderCode,warehouseId); distributionStockArticleClient.updateOrderInfo(orderCode,warehouseId);
warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId,"系统签收下架解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(orderPackageCode);
downPackageTrayVO.setWarehouseId(warehouseId);
downPackageTrayVO.setRemark("系统签收下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
} }
@ -352,7 +359,12 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
distributionStockArticleClient.updateOrderInfo(orderCode,warehouseId); distributionStockArticleClient.updateOrderInfo(orderCode,warehouseId);
if(StringUtils.isNotBlank(orderPackageCode)){ if(StringUtils.isNotBlank(orderPackageCode)){
// warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托"); // warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId,"系统出库下架解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(orderPackageCode);
downPackageTrayVO.setWarehouseId(warehouseId);
downPackageTrayVO.setRemark("系统出库下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
} }
} }
@ -360,7 +372,12 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
@Override @Override
public void dealWithPackageUpdown(String orderPackageCode, Long allocationId,Long warehouseId) { public void dealWithPackageUpdown(String orderPackageCode, Long allocationId,Long warehouseId) {
if(StringUtils.isNotBlank(orderPackageCode)){ if(StringUtils.isNotBlank(orderPackageCode)){
warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId,"系统下架解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(orderPackageCode);
downPackageTrayVO.setWarehouseId(warehouseId);
downPackageTrayVO.setRemark("系统下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
warehouseUpdownTypeClient.upShelfPackage(orderPackageCode,allocationId,warehouseId,"系统上架"); warehouseUpdownTypeClient.upShelfPackage(orderPackageCode,allocationId,warehouseId,"系统上架");
} }
@ -369,7 +386,11 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
@Override @Override
public void clearOrderPackageDownAndDelTray(String orderPackageCode, Long warehouseId) { public void clearOrderPackageDownAndDelTray(String orderPackageCode, Long warehouseId) {
warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId,"系统下架解托"); DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(orderPackageCode);
downPackageTrayVO.setWarehouseId(warehouseId);
downPackageTrayVO.setRemark("系统下架解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
@Override @Override

54
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/ExpenseDispatchOrderDetailMapper.xml

@ -21,60 +21,6 @@
</if> </if>
</where> </where>
</select> </select>
<select id="selectExpenseDispatchOrderDetailPage" resultType="com.logpm.statistics.vo.ExpenseDispatchOrderDetailVO">
select t.order_code orderCode,
t.waybill_number waybillNumber,
t.brand_name brand,
t.warehouse_name destinationWarehouse,
t.shipper_unit shippingOrg,
t.consignee_unit consigneeOrg,
t.delivery_type waybillType,
t.open_order_time documentCreationTime,
count(*) totalQuantity,
sum(t.review_num) reviewNumber,
sum(case when t.settlement_time is not null then t.review_num end) settlementNumber,
sum(t.weight) totalWeight,
sum(t.volume) totalVolume,
sum(t.total_distribution_cost) totalDistributionCost,
sum(t.distribution_cost) distributionCost,
sum(t.inventory_distribution_cost) inventoryDistributionCost,
sum(t.apstairs_cost) stairCarryingFee,
sum(t.apart_cost) goodsAllocationCost,
sum(t.move_cost) repositioningCost,
sum(t.stevedore_cost) handlingCost,
sum(t.kilo_allow_cost) mileageCost,
sum(t.allow_kilo_allow_cost) subsidizedKilometerCost,
sum(t.ultr_allpw_cost) excessZoneMileageCost,
sum(t.point_allow_cost) locationSubsidyCost,
sum(t.guar_cost) minimumGuaranteeCost,
sum(t.fuel_cost) fuelCost,
sum(t.other_cost) otherCosts,
sum(t.change_amount) changeAmount,
t.shipper_person shipper,
t.shipper_mobile shippingPhone,
t.shipper_address shippingAddress,
t.begin_warehouse_name departureWarehouse,
t.consignee_person consignee,
t.consignee_mobile consigneePhone,
t.consignee_address consigneeAddress,
t.train_number customerTrip
from logpm_quality_deliver t
where
t.waybill_number is not null
and t.order_code is not null
and review_user_name is not null
<if test="expenseDispatchOrderDetail.orderCode != null and expenseDispatchOrderDetail.orderCode != ''">
and t.order_code like concat('%',#{expenseDispatchOrderDetail.orderCode},'%')
</if>
<if test="expenseDispatchOrderDetail.destinationWarehouse != null and expenseDispatchOrderDetail.destinationWarehouse != ''">
and t.destination_warehouse = #{expenseDispatchOrderDetail.destinationWarehouse}
</if>
<if test="expenseDispatchOrderDetail.waybillNumber != null and expenseDispatchOrderDetail.waybillNumber != ''">
and t.waybill_number = #{expenseDispatchOrderDetail.waybillNumber}
</if>
group by t.order_code, t.waybill_number
</select>
<select id="exportExpenseDispatchOrderDetail" resultType="com.logpm.statistics.excel.ExpenseDispatchOrderDetailExcel"> <select id="exportExpenseDispatchOrderDetail" resultType="com.logpm.statistics.excel.ExpenseDispatchOrderDetailExcel">
SELECT * FROM logpm_expense_dispatch_order_detail ${ew.customSqlSegment} SELECT * FROM logpm_expense_dispatch_order_detail ${ew.customSqlSegment}

7
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/query/ExpenseDispatchTrainDetailQuery.java

@ -1,12 +1,11 @@
package com.logpm.statistics.query; package com.logpm.statistics.query;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import java.util.Date;
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class ExpenseDispatchTrainDetailQuery extends Query { public class ExpenseDispatchTrainDetailQuery extends Query {
@ -24,12 +23,12 @@ public class ExpenseDispatchTrainDetailQuery extends Query {
* 车次完成时间开始 * 车次完成时间开始
*/ */
@ApiModelProperty(value = "车次完成时间开始") @ApiModelProperty(value = "车次完成时间开始")
private Date trainCompletionTimeStart; private String trainCompletionTimeStart;
/** /**
* 车次完成时间结束 * 车次完成时间结束
*/ */
@ApiModelProperty(value = "车次完成时间结束") @ApiModelProperty(value = "车次完成时间结束")
private Date trainCompletionTimeEnd; private String trainCompletionTimeEnd;
/** /**
* 配送司机 * 配送司机
*/ */

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

@ -46,7 +46,6 @@ public interface ICarsLoadAsyncService {
void sendFactoryData(String orderCode, String orderPackageCode, Long warehouseId, String warehouseName); void sendFactoryData(String orderCode, String orderPackageCode, Long warehouseId, String warehouseName);
void downPackageOrDelTray(String orderPackageCode, Long fromWarehouseId, String remark);
void sendReportPackageSignData(String nickName, Long userId, Long warehouseId, String warehouseName, TrunklineCarsLoadEntity carsLoadEntity, List<String> orderPackageCodeList); void sendReportPackageSignData(String nickName, Long userId, Long warehouseId, String warehouseName, TrunklineCarsLoadEntity carsLoadEntity, List<String> orderPackageCodeList);

8
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java

@ -34,6 +34,7 @@ import com.logpm.trunkline.vo.UnloadReportVO;
import com.logpm.warehouse.entity.WarehouseWaybillEntity; import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.feign.IWarehouseWaybillClient; import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import com.logpm.warehouse.vo.DownPackageTrayVO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.common.annotations.LogpmAsync; import org.springblade.common.annotations.LogpmAsync;
import org.springblade.common.constant.DictBizConstant; import org.springblade.common.constant.DictBizConstant;
@ -289,7 +290,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
trunklineCostShareRecordEntity.setLoadingWarehouseId(warehouseId); trunklineCostShareRecordEntity.setLoadingWarehouseId(warehouseId);
trunklineCostShareRecordEntity.setLoadingWarehouseName(warehouseName); trunklineCostShareRecordEntity.setLoadingWarehouseName(warehouseName);
trunklineCostShareRecordEntity.setPlanUnloadWarehouseId(finalNodeId); trunklineCostShareRecordEntity.setPlanUnloadWarehouseId(finalNodeId);
if(Objects.isNull(finalNodeId)){ if(!Objects.isNull(finalNodeId)){
BasicdataWarehouseEntity finalWarehouse = warehouseClient.getEntityWarehouseId(finalNodeId); BasicdataWarehouseEntity finalWarehouse = warehouseClient.getEntityWarehouseId(finalNodeId);
if (!Objects.isNull(finalWarehouse)) { if (!Objects.isNull(finalWarehouse)) {
trunklineCostShareRecordEntity.setPlanUnloadWarehouseName(finalWarehouse.getName()); trunklineCostShareRecordEntity.setPlanUnloadWarehouseName(finalWarehouse.getName());
@ -1257,10 +1258,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
} }
} }
@Override
public void downPackageOrDelTray(String orderPackageCode, Long fromWarehouseId, String remark) {
updownTypeClient.downPackageOrDelTray(orderPackageCode, fromWarehouseId, remark);
}
@Override @Override

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

@ -45,6 +45,7 @@ import com.logpm.trunkline.service.*;
import com.logpm.trunkline.vo.*; import com.logpm.trunkline.vo.*;
import com.logpm.warehouse.entity.*; import com.logpm.warehouse.entity.*;
import com.logpm.warehouse.feign.*; import com.logpm.warehouse.feign.*;
import com.logpm.warehouse.vo.DownPackageTrayVO;
import com.logpm.warehouse.vo.WarehouseWaybillVO; import com.logpm.warehouse.vo.WarehouseWaybillVO;
import com.logpm.warehouse.vo.WaybillOrderTotalWeightAndVolumeVO; import com.logpm.warehouse.vo.WaybillOrderTotalWeightAndVolumeVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -3606,68 +3607,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
} }
} else { } else {
return Resp.scanFail(405,"包件不在当前仓","包件不在当前仓,不能装车"); return Resp.scanFail(405,"包件不在当前仓","包件不在当前仓,不能装车");
//先把其他仓在库的包件出库并下架
// try{
// List<DistributionParcelListEntity> parcelListEntities = distributionParcelListClient.findAllStockListByOrderPackageCode(orderPackageCode);
// for (DistributionParcelListEntity listEntity : parcelListEntities) {
// listEntity.setOrderPackageStatus("60");
// distributionParcelListClient.update(listEntity);
// Long warehouseId1 = listEntity.getWarehouseId();
// updownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId1);
// }
// }catch (Exception e){
// log.warn("################loadingScan: 下架及解托包件失败");
// }
// carsLoadScanEntity.setIsData(1);
// isData = 1;
// Long otherPackageId = otherParcelListEntity.getId();
// String waybillNumber = otherParcelListEntity.getWaybillNumber();
// fromWarehouseId = otherParcelListEntity.getWarehouseId();
// orderCode = otherParcelListEntity.getOrderCode();
// brandName = otherParcelListEntity.getBrandName();
// BasicdataWarehouseEntity fromWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(fromWarehouseId);
// if (!Objects.isNull(fromWarehouseEntity)) {
// fromWarehouseName = fromWarehouseEntity.getName();
// }
// WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNumber);
// if (!Objects.isNull(waybillEntity)) {
// waybillId = waybillEntity.getId();
// waybillNo = waybillEntity.getWaybillNo();
// destinationWarehouse = waybillEntity.getDestinationWarehouseName();
// }
// carsLoadScanEntity.setWaybillId(waybillId);
// carsLoadScanEntity.setWaybillNo(waybillNo);
// carsLoadScanEntity.setOrderCode(orderCode);
// carsLoadScanEntity.setFromWarehouseId(fromWarehouseId);
// DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, fromWarehouseId);
// if (Objects.isNull(stockArticleEntity)) {
// log.warn("##################loadingScan: 订单信息不存在 orderCode={} warehouseId={}", orderCode, warehouseId);
// return R.fail(405, "订单信息不存在");
// }
// Long articleId = stockArticleEntity.getId();
// stockArticleEntity.setHandQuantity(stockArticleEntity.getHandQuantity() - 1);
//
// distributionParcelListClient.updateOrderPackageCodeById(otherPackageId, "60");
// distributionStockArticleClient.submitHandleNumByOrderId(1, articleId);
//
// carsLoadScanEntity.setCustomerName(stockArticleEntity.getCustomerName());
// carsLoadScanEntity.setCustomerTelephone(stockArticleEntity.getCustomerTelephone());
// carsLoadScanEntity.setCustomerAddress(stockArticleEntity.getCustomerAddress());
//
// carsLoadScanEntity.setFirsts(otherParcelListEntity.getFirsts());
// carsLoadScanEntity.setSenconds(otherParcelListEntity.getSecond());
// carsLoadScanEntity.setThirds(otherParcelListEntity.getThirdProduct());
// carsLoadScanEntity.setMaterialCode(otherParcelListEntity.getMaterialCode());
// carsLoadScanEntity.setMaterialName(otherParcelListEntity.getMaterialName());
//
// remark = "有数据,不在当前仓,异常装车";
// audio = "包件未入库";
// if(StringUtils.isNotBlank(orderPackageCode)){
// updownTypeClient.downPackageOrDelTray(orderPackageCode, fromWarehouseId, "干线装车下架解托");
// }
} }
} else { } else {
@ -3759,7 +3698,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionParcelListClient.updateOrderPackageCodeById(packageId, "60"); distributionParcelListClient.updateOrderPackageCodeById(packageId, "60");
// distributionStockArticleClient.submitHandleNumByOrderId(1, articleId); // distributionStockArticleClient.submitHandleNumByOrderId(1, articleId);
if (StringUtil.isBlank(trayCode) && StringUtil.isNotBlank(orderPackageCode)) { if (StringUtil.isBlank(trayCode) && StringUtil.isNotBlank(orderPackageCode)) {
updownTypeClient.downPackageOrDelTray(orderPackageCode, warehouseId, "干线装车下架解托"); DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, warehouseId, "干线装车下架解托");
if(downPackageTrayVO!=null){
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
}
} }
carsLoadScanEntity.setCustomerName(stockArticleEntity.getCustomerName()); carsLoadScanEntity.setCustomerName(stockArticleEntity.getCustomerName());
carsLoadScanEntity.setCustomerTelephone(stockArticleEntity.getCustomerTelephone()); carsLoadScanEntity.setCustomerTelephone(stockArticleEntity.getCustomerTelephone());
@ -5442,7 +5384,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String trayCode = trunklineCarsLoadScanEntity.getTrayCode(); String trayCode = trunklineCarsLoadScanEntity.getTrayCode();
String scanCode = trunklineCarsLoadScanEntity.getScanCode(); String scanCode = trunklineCarsLoadScanEntity.getScanCode();
if (StringUtil.isNotBlank(trayCode)) { if (StringUtil.isNotBlank(trayCode)) {
updownTypeClient.downPackageOrDelTray(scanCode, warehouseId, "包件下架解托");
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(scanCode, warehouseId, "包件下架解托");
if(downPackageTrayVO!=null){
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
}
} }
}); });
@ -7139,7 +7086,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionStockArticleClient.submitHandleNumByOrderId(1, articleId); distributionStockArticleClient.submitHandleNumByOrderId(1, articleId);
distributionParcelListClient.updateOrderPackageCodeById(pacakageId, "60"); distributionParcelListClient.updateOrderPackageCodeById(pacakageId, "60");
updownTypeClient.downPackageOrDelTray(orderPackageCode, wid, "中转卸车下架解托"); DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, wid, "中转卸车下架解托");
if(downPackageTrayVO!=null){
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
}
} }
} else { } else {
String scanStatus = carsLoadScanEntity.getScanStatus(); String scanStatus = carsLoadScanEntity.getScanStatus();
@ -7188,7 +7139,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trayName = trayEntity.getPalletName(); trayName = trayEntity.getPalletName();
} }
if (unbindTray == 1) { if (unbindTray == 1) {
updownTypeClient.downPackageOrDelTray(orderPackageCode, fromWarehouseId, "中转卸车下架解托");
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, fromWarehouseId, "中转卸车下架解托");
if(downPackageTrayVO!=null){
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
}
} }
trunklineCarsLoadScanService.updateById(carsLoadScanEntity); trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
@ -7861,7 +7816,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//需要解托下架的包件嘛 //需要解托下架的包件嘛
unbingTrayAndDelAllocationPackages.keySet().forEach(w -> { unbingTrayAndDelAllocationPackages.keySet().forEach(w -> {
List<String> list = unbingTrayAndDelAllocationPackages.get(w); List<String> list = unbingTrayAndDelAllocationPackages.get(w);
updownTypeClient.downPackageOrDelTray(StringUtil.join(list), w, "批量入库解托下架");
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(StringUtil.join(list), w, "批量入库解托下架");
if(downPackageTrayVO!=null){
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
}
}); });
//需要修改仓库信息的打托数据 //需要修改仓库信息的打托数据
@ -9272,7 +9232,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, e.getLoadCode(), e.getWaybillId(), e.getWaybillNo(), e.getOrderCode(), e.getScanCode(), 1, trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, e.getLoadCode(), e.getWaybillId(), e.getWaybillNo(), e.getOrderCode(), e.getScanCode(), 1,
1, 1, 0, null, null, null, e.getFromWarehouseId(), e.getId(), remark); 1, 1, 0, null, null, null, e.getFromWarehouseId(), e.getId(), remark);
updownTypeClient.downPackageOrDelTray(e.getScanCode(),e.getFromWarehouseId(),"手动批量装车下架解托"); DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(e.getScanCode(), e.getFromWarehouseId(), "手动批量装车下架解托");
if(downPackageTrayVO!=null){
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
}
}); });
@ -11116,7 +11079,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String trayCode = trunklineCarsLoadScanEntity.getTrayCode(); String trayCode = trunklineCarsLoadScanEntity.getTrayCode();
String scanCode = trunklineCarsLoadScanEntity.getScanCode(); String scanCode = trunklineCarsLoadScanEntity.getScanCode();
if (StringUtil.isNotBlank(trayCode)) { if (StringUtil.isNotBlank(trayCode)) {
updownTypeClient.downPackageOrDelTray(scanCode, warehouseId, "包件下架解托");
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(scanCode, warehouseId, "包件下架解托");
if(downPackageTrayVO!=null){
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
}
} }
}); });
@ -11227,129 +11194,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
updateNumByLoadId(loadId); updateNumByLoadId(loadId);
}); });
} }
// Long loadId = loadIdSet.stream().findFirst().get();
// TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId);
//TODO 暂时注释
// carsLoadAsyncService.sendReportRemoveScanData(AuthUtil.getUserId(),AuthUtil.getNickName(),warehouseId,warehouseName,carsLoadScanEntityList,carsLoadEntity);
// Long loadId = null;
// for (String str : split) {
// long carsLoadScanId = Long.parseLong(str);
//
// TrunklineCarsLoadScanEntity carsLoadScanEntity = trunklineCarsLoadScanService.getById(carsLoadScanId);
// if (Objects.isNull(carsLoadScanEntity)) {
// log.warn("##################removeCarsLoadScan: 配载装车扫描不存在 carsLoadScanId={}", carsLoadScanId);
// return R.fail(405, "配载装车扫描不存在");
// }
// loadId = carsLoadScanEntity.getLoadId();
//
// TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId);
// if (Objects.isNull(carsLoadEntity)) {
// log.warn("##################removeCarsLoadScan: 配载计划不存在 loadId={}", loadId);
// return R.fail(405, "配载计划不存在");
// }
//
// Long nowWarehouseId = carsLoadEntity.getNowWarehouseId();
//
// if (!nowWarehouseId.equals(warehouseId)) {
// log.warn("##################removeCarsLoadScan: 暂未有权限进行操作 nowWarehouseId={} warehouseId={}", nowWarehouseId, warehouseId);
// return R.fail(405, "暂未有权限进行操作");
// }
// String loadStatus = carsLoadEntity.getLoadStatus();
// if (!"0".equals(loadStatus) && !"20".equals(loadStatus) && !"40".equals(loadStatus) && !"100".equals(loadStatus)) {
// log.warn("##################removeCarsLoadScan: 当前配载计划不属于到车状态 loadStatus={} warehouseId={}", loadStatus, warehouseId);
// return R.fail(405, "当前配载计划不属于到车状态");
// }
//
// TrunklineCarsLoadLineEntity carsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId);
// if (Objects.isNull(carsLoadLineEntity)) {
// log.warn("##################removeCarsLoadScan: 当前节点信息不存在 loadId={} warehouseId={}", loadId, warehouseId);
// return R.fail(405, "当前节点信息不存在");
// }
//
// String nodeStatus = carsLoadLineEntity.getNodeStatus();
// if (!"10".equals(nodeStatus)) {
// log.warn("##################removeCarsLoadScan: 当前节点不是到车状态 nodeStatus={} warehouseId={}", nodeStatus, warehouseId);
// return R.fail(405, "当前节点不是到车状态");
// }
//
// //删除
// boolean b = trunklineCarsLoadScanService.deleteEntityByCarsLoadScanId(carsLoadScanId);
// if (b) {
// Integer isData = carsLoadScanEntity.getIsData();
// if (isData == 1) {
// updateNumByLoadId(loadId);
// String warehouseName = carsLoadScanEntity.getWarehouseName();
// Integer isAbnormal = carsLoadScanEntity.getLoadingAbnormal();
// Integer num = carsLoadScanEntity.getNum();
// Long trayId = carsLoadScanEntity.getTrayId();
// String trayCode = carsLoadScanEntity.getTrayCode();
// String orderCode = carsLoadScanEntity.getOrderCode();
// String waybillNo = carsLoadScanEntity.getWaybillNo();
// String scanCode = carsLoadScanEntity.getScanCode();
// Integer type = carsLoadScanEntity.getType();
// Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId();
// String fromWarehouseName = null;
// BasicdataWarehouseEntity fromWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(fromWarehouseId);
// if (!Objects.isNull(fromWarehouseEntity)) {
// fromWarehouseName = fromWarehouseEntity.getName();
// }
//
// DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, fromWarehouseId);
// if (!Objects.isNull(stockArticleEntity)) {
// Long articleId = stockArticleEntity.getId();
// distributionStockArticleClient.submitHandleNumByOrderId(-num, articleId);
// }
//
// if (type == 1) {
// DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(scanCode, fromWarehouseId);
// if (Objects.isNull(parcelListEntity)) {
// log.warn("##################removeCarsLoadScan: 包件信息不存在 fromWarehouseId={} scanCode={}", fromWarehouseId, scanCode);
// return R.fail(405, "包件信息不存在");
// }
// Long wid = parcelListEntity.getWarehouseId();
// String waybillNumber = parcelListEntity.getWaybillNumber();
// Long waybillId = parcelListEntity.getWaybillId();
// if (!Objects.isNull(waybillId)) {
// WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillId(waybillId);
// parcelListEntity.setIsTransfer(0);
// if (!Objects.isNull(waybillEntity)) {
// Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId();
// parcelListEntity.setOrderPackageStatus("20");
// if (destinationWarehouseId.equals(wid)) {
// parcelListEntity.setIsTransfer(0);
// } else {
// parcelListEntity.setIsTransfer(1);
// }
// }
// }
// distributionParcelListClient.update(parcelListEntity);
//// if (StringUtil.isNotBlank(trayCode)) {
//// updownTypeClient.downPackageOrDelTray(scanCode, warehouseId, "包件下架解托");
//// }
//
// List<String> orderPackageCodes = new ArrayList<>();
// orderPackageCodes.add(scanCode);
// String content = "包件在 " + warehouseName + "取消装车,配载计划目的仓 " + carsLoadScanEntity.getFinalNodeName();
// packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseName, WorkNodeEnums.CANCEL_INITIAL_WAREHOUSE_LOADING.getCode(), content);
//
// } else {
//// if (StringUtil.isNotBlank(trayCode)) {
//// trayTypeClient.deleteZeroOrderByTrayCode(orderCode, trayCode, warehouseId, "零担解托");
//// }
//
// }
//
// }
// }
// }
// if (!Objects.isNull(loadId)) {
// updateNumByLoadId(loadId);
// }
return R.success("删除成功"); return R.success("删除成功");
} }
@ -11945,7 +11789,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionParcelListClient.update(distributionParcelListEntity); distributionParcelListClient.update(distributionParcelListEntity);
} }
if(StringUtils.isNotBlank(orderPackageCode)){ if(StringUtils.isNotBlank(orderPackageCode)){
carsLoadAsyncService.downPackageOrDelTray(orderPackageCode, nowWarehouseId, "干线卸车下架解托"); DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, nowWarehouseId, "干线卸车下架解托");
if(downPackageTrayVO!=null){
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
}
} }
} }
}else{ }else{
@ -12150,7 +11998,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionParcelListClient.update(distributionParcelListEntity); distributionParcelListClient.update(distributionParcelListEntity);
} }
if(StringUtils.isNotBlank(orderPackageCode)){ if(StringUtils.isNotBlank(orderPackageCode)){
carsLoadAsyncService.downPackageOrDelTray(orderPackageCode, wid, "干线卸车下架解托"); DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, wid, "干线卸车下架解托");
if(downPackageTrayVO!=null){
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
}
} }
} }
@ -12201,7 +12052,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trayName = trayEntity.getPalletName(); trayName = trayEntity.getPalletName();
} }
if (unbindTray == 1) { if (unbindTray == 1) {
carsLoadAsyncService.downPackageOrDelTray(orderPackageCode, fromWarehouseId, "干线卸车下架解托"); DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, fromWarehouseId, "干线卸车下架解托");
if(downPackageTrayVO!=null){
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
}
} }
trunklineCarsLoadScanService.updateById(carsLoadScanEntity); trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
@ -12414,6 +12268,27 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return Resp.scanSuccess("卸车成功", audio.toString()); return Resp.scanSuccess("卸车成功", audio.toString());
} }
/**
* 构架下架解脱对象
* @param orderPackageCode
* @param warehouseId
* @param remark
* @return
*/
private DownPackageTrayVO buildDownPackageTrayVO(String orderPackageCode,Long warehouseId,String remark){
if(Objects.isNull(orderPackageCode) || Objects.isNull(warehouseId)){
return null;
}
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(orderPackageCode);
downPackageTrayVO.setWarehouseId(warehouseId);
downPackageTrayVO.setRemark(remark);
return downPackageTrayVO;
}
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ -12722,46 +12597,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionParcelListClient.update(distributionParcelListEntity); distributionParcelListClient.update(distributionParcelListEntity);
} }
if(StringUtils.isNotBlank(orderPackageCode)){ if(StringUtils.isNotBlank(orderPackageCode)){
updownTypeClient.downPackageOrDelTray(orderPackageCode, nowWarehouseId, "干线卸车下架解托");
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, nowWarehouseId, "干线卸车下架解托");
if(downPackageTrayVO!=null){
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
}
} }
} }
}else{ }else{
log.info("################unloadPackageNoXz: 无系统编码 orderPackageCode={}",orderPackageCode); log.info("################unloadPackageNoXz: 无系统编码 orderPackageCode={}",orderPackageCode);
return R.fail(405,"无系统编码"); return R.fail(405,"无系统编码");
//需要补装车扫记录
// TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity = new TrunklineCarsLoadScanEntity();
// trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
// trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
// trunklineCarsLoadScanEntity.setLoadId(loadId);
// trunklineCarsLoadScanEntity.setLoadCode(loadCode);
// trunklineCarsLoadScanEntity.setOrderCode("--");
// trunklineCarsLoadScanEntity.setScanCode(orderPackageCode);
// trunklineCarsLoadScanEntity.setScanStatus("2");
// trunklineCarsLoadScanEntity.setNum(1);
// trunklineCarsLoadScanEntity.setType(1);
// trunklineCarsLoadScanEntity.setIsData(0);
// isData=0;
// trunklineCarsLoadScanEntity.setLoadingAbnormal(1);
// trunklineCarsLoadScanEntity.setUnloadAbnormal(1);
// trunklineCarsLoadScanEntity.setUnloadNodeName(warehouseName);
// trunklineCarsLoadScanEntity.setUnloadNodeId(warehouseId);
// trunklineCarsLoadScanEntity.setUnloadNum(1);
// trunklineCarsLoadScanEntity.setIsSupple(1);
// trunklineCarsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName());
// trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
// trunklineCarsLoadScanEntity.setUnloadTime(new Date());
// trunklineCarsLoadScanEntity.setRemark("异常补录卸车");
// trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity);
// loadScanId = trunklineCarsLoadScanEntity.getId();
//
// trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, loadCode, null, null, null, orderPackageCode, 1,
// 1, 0, 1, trayId, trayCode, trayName, null, loadScanId, "无数据,补装车计划,异常装车");
//
// trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, null, null, null, orderPackageCode, 1,
// 1, 0, 1, trayId, trayCode, trayName, null, loadScanId, "无数据,异常卸车");
} }
} else { } else {
String waybillNumber = parcelListEntity.getWaybillNumber(); String waybillNumber = parcelListEntity.getWaybillNumber();
@ -12896,7 +12742,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
} }
if(StringUtils.isNotBlank(orderPackageCode)){ if(StringUtils.isNotBlank(orderPackageCode)){
updownTypeClient.downPackageOrDelTray(orderPackageCode, wid, "干线卸车下架解托");
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, wid, "干线卸车下架解托");
if(downPackageTrayVO!=null){
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
}
} }
@ -12905,8 +12755,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//无装车记录异常日志记录 //无装车记录异常日志记录
try { try {
assert carsLoadAsyncService != null;
carsLoadAsyncService.abnormalListUnloadByLoadIdAndWarehouseId(loadId, warehouseId, warehouseName, loadScanId, AuthUtil.getTenantId(), AuthUtil.getUserId(), AuthUtil.getNickName(), Func.firstLong(AuthUtil.getDeptId())); carsLoadAsyncService.abnormalListUnloadByLoadIdAndWarehouseId(loadId, warehouseId, warehouseName, loadScanId, AuthUtil.getTenantId(), AuthUtil.getUserId(), AuthUtil.getNickName(), Func.firstLong(AuthUtil.getDeptId()));
} catch (Exception e) { } catch (Exception e) {
log.warn("###############unloadPackage: 存入异常列表记录失败"); log.warn("###############unloadPackage: 存入异常列表记录失败");
@ -12952,7 +12801,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trayName = trayEntity.getPalletName(); trayName = trayEntity.getPalletName();
} }
if (unbindTray == 1) { if (unbindTray == 1) {
carsLoadAsyncService.downPackageOrDelTray(orderPackageCode, fromWarehouseId, "干线卸车下架解托"); DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, fromWarehouseId, "干线卸车下架解托");
updownTypeClient.downPackageOrDelTray(downPackageTrayVO);
} }
trunklineCarsLoadScanService.updateById(carsLoadScanEntity); trunklineCarsLoadScanService.updateById(carsLoadScanEntity);

21
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownTypeClient.java

@ -21,6 +21,7 @@ import com.logpm.warehouse.dto.UpShelfPackageDTO;
import com.logpm.warehouse.dto.UpShelfStockDTO; import com.logpm.warehouse.dto.UpShelfStockDTO;
import com.logpm.warehouse.dto.UpShelfZeroOrderDTO; import com.logpm.warehouse.dto.UpShelfZeroOrderDTO;
import com.logpm.warehouse.service.IWarehouseUpdownTypeService; import com.logpm.warehouse.service.IWarehouseUpdownTypeService;
import com.logpm.warehouse.vo.DownPackageTrayVO;
import com.logpm.warehouse.vo.UpShelfAllocationVO; import com.logpm.warehouse.vo.UpShelfAllocationVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -82,16 +83,18 @@ public class WarehouseUpdownTypeClient implements IWarehouseUpdownTypeClient {
@Override @Override
public R downPackageOrDelTray(String orderPackageCodes,Long warehouseId,String remark) { public R downPackageOrDelTray(DownPackageTrayVO downPackageTrayVO) {
List<UpShelfPackageDTO> upShelfPackageList = new ArrayList<>(); List<UpShelfPackageDTO> upShelfPackageList = new ArrayList<>();
String[] split = orderPackageCodes.split(","); String[] split = downPackageTrayVO.getOrderPackageCodes().split(",");
for(String orderPackageCode:split){ for(String orderPackageCode:split){
UpShelfPackageDTO dto = new UpShelfPackageDTO(); UpShelfPackageDTO dto = new UpShelfPackageDTO();
dto.setOrderPackageCode(orderPackageCode); dto.setOrderPackageCode(orderPackageCode);
upShelfPackageList.add(dto); upShelfPackageList.add(dto);
} }
if(!upShelfPackageList.isEmpty()){ if(!upShelfPackageList.isEmpty()){
return warehouseUpdownTypeService.downPackageOrDelTray(upShelfPackageList,warehouseId,remark); return warehouseUpdownTypeService.downPackageOrDelTray(upShelfPackageList,downPackageTrayVO.getWarehouseId(),downPackageTrayVO.getRemark());
}else{ }else{
return R.fail(403,"处理失败"); return R.fail(403,"处理失败");
} }
@ -203,24 +206,14 @@ public class WarehouseUpdownTypeClient implements IWarehouseUpdownTypeClient {
ls.add(dto); ls.add(dto);
} }
if(ls.size() > 0){ if(!ls.isEmpty()){
return warehouseUpdownTypeService.downStock(ls,warehouseId,remark); return warehouseUpdownTypeService.downStock(ls,warehouseId,remark);
}else{ }else{
return R.fail(403,"处理失败"); return R.fail(403,"处理失败");
} }
} }
@Override
public boolean packageChangeStock(List<String> orderPackageCodes) {
return warehouseUpdownTypeService.packageChangeStock(orderPackageCodes);
}
@Override
public R findUpdownTypeInforByAllocationId(Long allocationId, Long warehouseId) {
UpShelfAllocationVO upShelfAllocationVO = warehouseUpdownTypeService.upShelfScanAllocation(allocationId, warehouseId);
return R.data(JSONObject.toJSONString(upShelfAllocationVO));
}
@Override @Override
public R findAllGoodsByAllocationId(Long allocationId, Long warehouseId) { public R findAllGoodsByAllocationId(Long allocationId, Long warehouseId) {

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

@ -38,6 +38,7 @@ import com.logpm.warehouse.mapper.WarehouseRetentionRecordMapper;
import com.logpm.warehouse.service.IWarehouseNodeWorkService; import com.logpm.warehouse.service.IWarehouseNodeWorkService;
import com.logpm.warehouse.service.IWarehouseRetentionRecordService; import com.logpm.warehouse.service.IWarehouseRetentionRecordService;
import com.logpm.warehouse.service.IWarehouseRetentionScanService; import com.logpm.warehouse.service.IWarehouseRetentionScanService;
import com.logpm.warehouse.vo.DownPackageTrayVO;
import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; import com.logpm.warehouse.vo.WarehouseRetentionRecordVO;
import com.logpm.warehouse.vo.WarehouseRetentionScanVO; import com.logpm.warehouse.vo.WarehouseRetentionScanVO;
import com.logpm.warehouse.vo.WarehouseWaybillDetentionVO; import com.logpm.warehouse.vo.WarehouseWaybillDetentionVO;
@ -493,7 +494,13 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
); );
} }
result = distributionParcelListClient.maintainInWarehouse(warehouseRetentionScanEntity.getOrderPackageId(), warehouseRetentionScanEntity.getTaskCode()); result = distributionParcelListClient.maintainInWarehouse(warehouseRetentionScanEntity.getOrderPackageId(), warehouseRetentionScanEntity.getTaskCode());
warehouseUpdownTypeClient.downPackageOrDelTray(warehouseRetentionScanEntity.getOrderPackageCode(), warehouseRetentionScanEntity.getWarehouseId(), "自主回库进行下架 解托");
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO();
downPackageTrayVO.setOrderPackageCodes(warehouseRetentionScanEntity.getOrderPackageCode());
downPackageTrayVO.setWarehouseId( warehouseRetentionScanEntity.getWarehouseId());
downPackageTrayVO.setRemark("自主回库进行下架 解托");
warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO);
break; break;
case 2: // 回库指定数量的零担包件 case 2: // 回库指定数量的零担包件

Loading…
Cancel
Save