diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java index 2f6ed1e13..260dab40a 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java +++ b/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 = "客户电话") private String deliveryPhone; + /** + * 定位打卡位置 + */ + @ApiModelProperty(value = "定位打卡位置") + private String positioningAdr; /** * 客户地址 */ @@ -90,7 +95,7 @@ public class DistributionSignforVO extends DistributionSignforEntity { * 计划总数 */ @ApiModelProperty(value = "计划总数") - private Integer totalNum; + private Integer planNum; /** * 装车件数 */ @@ -340,6 +345,7 @@ public class DistributionSignforVO extends DistributionSignforEntity { @ApiModelProperty(value = "商城ID") private List clientIds; + /** * 签收图片路径,多个 */ diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownTypeClient.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownTypeClient.java index cd7d991b7..008e99b1d 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownTypeClient.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownTypeClient.java @@ -17,6 +17,7 @@ package com.logpm.warehouse.feign; import com.alibaba.fastjson.JSONObject; +import com.logpm.warehouse.vo.DownPackageTrayVO; import org.springblade.common.constant.ModuleNameConstant; import org.springblade.core.tool.api.R; import org.springframework.cloud.openfeign.FeignClient; @@ -43,7 +44,7 @@ public interface IWarehouseUpdownTypeClient { String TOP = API_PREFIX + "/top"; @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") @@ -55,26 +56,23 @@ public interface IWarehouseUpdownTypeClient { @PostMapping(TOP + "/downStock") R downStock(@RequestBody List stockLists); - @PostMapping(TOP + "/packageChangeStock") - boolean packageChangeStock(@RequestBody List orderPackageCodes); - @GetMapping(TOP + "/downPackageOrDelTray") - R downPackageOrDelTray(@RequestParam("orderPackageCodes") String orderPackageCodes, @RequestParam("warehouseId") Long warehouseId,@RequestParam("remark") String remark); + @PostMapping(TOP + "/downPackageOrDelTray") + R downPackageOrDelTray(@RequestBody DownPackageTrayVO downPackageTrayVO); @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") - R downTray(@RequestParam("trayCode") String trayCode, @RequestParam("warehouseId") Long warehouseId); + R downTray(@RequestParam String trayCode, @RequestParam Long warehouseId); @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") 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") R findAllGoodsByAllocationId(@RequestParam Long allocationId, @RequestParam Long warehouseId); @GetMapping(TOP + "/findZeroAllocation") diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/DownPackageTrayVO.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/DownPackageTrayVO.java new file mode 100644 index 000000000..40a6dab8e --- /dev/null +++ b/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; + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionSignforAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionSignforAppController.java index fd95d0d0a..091522892 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionSignforAppController.java +++ b/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.DistributionAppStockArticleVO; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; +import com.logpm.warehouse.vo.DownPackageTrayVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; @@ -191,8 +192,14 @@ public class DistributionSignforAppController { orderPackageCodes = orderPackageCodes + "," + packageCode; } } - if(StringUtils.isNotBlank(orderPackageCodes)){ - updownTypeClient.downPackageOrDelTray(orderPackageCodes, myCurrentWarehouse.getId(), "签收下架解托"); + if (StringUtils.isNotBlank(orderPackageCodes)) { + + DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO(); + downPackageTrayVO.setOrderPackageCodes(orderPackageCodes); + downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId()); + downPackageTrayVO.setRemark("签收下架解托"); + + updownTypeClient.downPackageOrDelTray(downPackageTrayVO); } } @@ -211,9 +218,9 @@ public class DistributionSignforAppController { try { R r = distributionSignforService.newSignfor(distrilbutionloadingscanDTO); - if(r.getData()!=null){ + if (r.getData() != null) { String orderPackageCodes = null; - List packageCodes= (List) r.getData(); + List packageCodes = (List) r.getData(); for (String packageCode : packageCodes) { if (StringUtils.isBlank(orderPackageCodes)) { orderPackageCodes = packageCode; @@ -222,20 +229,29 @@ public class DistributionSignforAppController { } } // 执行下架解托盘代码 - String remark="签收下架解托"; - BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); - updownTypeClient.downPackageOrDelTray(orderPackageCodes, myCurrentWarehouse.getId(), remark); + String remark = "签收下架解托"; + + if (StringUtils.isNotBlank(orderPackageCodes)) { + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO(); + downPackageTrayVO.setOrderPackageCodes(orderPackageCodes); + downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId()); + downPackageTrayVO.setRemark(remark); + updownTypeClient.downPackageOrDelTray(downPackageTrayVO); + } + } return r; } catch (CustomerException e) { log.error("#############signfor:签收报错", e); - return Resp.scanFail("签收失败!",e.getMessage()); + return Resp.scanFail("签收失败!", e.getMessage()); } } /** * 取消异常签收 + * * @param distrilbutionloadingscanDTO * @return */ @@ -335,8 +351,14 @@ public class DistributionSignforAppController { log.info("##############oneclick: 开始执行下架:{}", packageCodes); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); - if(orderPackageCodes!=null){ - updownTypeClient.downPackageOrDelTray(orderPackageCodes, myCurrentWarehouse.getId(), "司机一键签收下架解托"); + if (orderPackageCodes != null) { + + DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO(); + downPackageTrayVO.setOrderPackageCodes(orderPackageCodes); + downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId()); + downPackageTrayVO.setRemark("司机一键签收下架解托"); + + updownTypeClient.downPackageOrDelTray(downPackageTrayVO); } log.info("##############oneclick: 结束执行下架:{}", packageCodes); @@ -364,8 +386,8 @@ public class DistributionSignforAppController { @ApiOperationSupport(order = 4) @ApiOperation(value = "回显照片", notes = "回显照片") public R prices(@Valid @RequestBody DistributionSignforDTO distributionSignfor) { - R r =distributionSignforService.getDriverPrices(distributionSignfor); - return r; + R r = distributionSignforService.getDriverPrices(distributionSignfor); + return r; } /** @@ -375,7 +397,7 @@ public class DistributionSignforAppController { @ApiOperationSupport(order = 4) @ApiOperation(value = "修改签收照片信息", notes = "修改签收照片信息") public R updatePicture(@Valid @RequestBody DistributionSignforDTO distributionSignfor) { - return distributionSignforService.updatePicturePDA(distributionSignfor); + return distributionSignforService.updatePicturePDA(distributionSignfor); } /** diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java index c95bdbc1c..3c770f582 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java +++ b/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.WarehouseRetentionScanEntity; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; +import com.logpm.warehouse.vo.DownPackageTrayVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -485,7 +486,13 @@ public class DistributionDeliveryListController extends BladeController { } } 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; diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml index 4f9a976eb..5407946b4 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml @@ -743,15 +743,20 @@ lds.clerk_sign_pictures clerkSignPictures, lds.delivery_sign_pictures deliverySignPictures, 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.received_quantity + lds.receivedin_quantity) signingNum, lddl.train_number trainNumber, lddl.vehicle_name vehicleName, lddl.driver_name driverName, - lddl.loading_team_name loadingTeamName, 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 WHEN ldr.delivery_type = '1' THEN '商配' @@ -773,7 +778,8 @@ FROM logpm_distribution_signfor lds 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} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/BillLadingScanDataQueueHandler.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/BillLadingScanDataQueueHandler.java index 5ec79186a..178bcf6f5 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/BillLadingScanDataQueueHandler.java +++ b/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 com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; +import com.logpm.warehouse.vo.DownPackageTrayVO; import com.rabbitmq.client.Channel; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -34,7 +35,13 @@ public class BillLadingScanDataQueueHandler { Long warehouseId = (Long) warehouseIdObj; if(StringUtils.isNotBlank(coding)){ - warehouseUpdownTypeClient.downPackageOrDelTray(coding, warehouseId, "签收下架解托"); + + DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO(); + downPackageTrayVO.setOrderPackageCodes(coding); + downPackageTrayVO.setWarehouseId(warehouseId); + downPackageTrayVO.setRemark("签收下架解托"); + + warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO); } }else{ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index 307611b0d..db003a150 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/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.WarehouseWaybillEntity; import com.logpm.warehouse.feign.*; +import com.logpm.warehouse.vo.DownPackageTrayVO; import com.logpm.warehouse.vo.TrayTypeDataVO; import lombok.extern.log4j.Log4j2; 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.Func; import org.springblade.core.tool.utils.ObjectUtil; -import org.springblade.core.tool.utils.StringUtil; import org.springblade.system.cache.DictBizCache; import org.springblade.system.entity.User; import org.springblade.system.feign.IDictBizClient; @@ -859,7 +859,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl map = new HashMap(); @@ -1613,7 +1618,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl map = new HashMap<>(); - map.put("orderPackageCode", updownrOderPackages); - map.put("warehouseId", myCurrentWarehouse.getId()); - warehouseUpdownTypeClient.downDeliveryPackage(map); + DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO(); + downPackageTrayVO.setOrderPackageCodes(updownrOderPackages); + downPackageTrayVO.setWarehouseId(myCurrentWarehouse.getId()); + downPackageTrayVO.setRemark("一件装车解托下架"); + warehouseUpdownTypeClient.downPackageOrDelTray(downPackageTrayVO); + } List packageIds = updatePackageList.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList()); if (Func.isNotEmpty(packageIds)) { @@ -8514,7 +8523,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.query().lambda() .eq(DistributionReservationStockarticleEntity::getReservationId, signforEntity.getReservationId()) .ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue())); @@ -3936,7 +3946,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl jsonObjects = new ArrayList<>(); JSONObject jsonObject = new JSONObject(); @@ -4025,7 +4039,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl - -