diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/reservation/ReservationInventoryStatusConstant.java b/blade-biz-common/src/main/java/org/springblade/common/constant/reservation/ReservationInventoryStatusConstant.java new file mode 100644 index 000000000..669d791f1 --- /dev/null +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/reservation/ReservationInventoryStatusConstant.java @@ -0,0 +1,47 @@ +package org.springblade.common.constant.reservation; + +/** + * 预约单状态枚举 + * 对应码表 + * resvervation_status + * @author pref + */ +public enum ReservationInventoryStatusConstant { + + zhengchang("正常","1"), + quxiao("取消","2"), + zengjia("增加","3"); + + + /** + * 状态 + */ + private String name; + + /** + * 值 + */ + private String value; + + + private ReservationInventoryStatusConstant(String name, String value) { + this.name = name; + this.value = value; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +} diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java index 79ed88020..bc43ca62a 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java @@ -85,7 +85,7 @@ public class DistributionParcelListEntity extends TenantEntity { * 包条码 */ @ApiModelProperty(value = "包条码") - @TableField("order_package_code") +// @TableField("order_package_code") private String orderPackageCode; @ApiModelProperty(value = "货区信息") diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationStocklistEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationStocklistEntity.java index ddaafacec..acc2bd579 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationStocklistEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationStocklistEntity.java @@ -68,7 +68,7 @@ public class DistributionReservationStocklistEntity extends TenantEntity { * 库存品状态 ;1-正常、2-取消 */ @ApiModelProperty(value = "库存品状态 ;1-正常、2-取消") - private Integer stockListStatus; + private String stockListStatus; /** * 预留1 */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDeliveryListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDeliveryListVO.java index bce985be5..2d5eed827 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDeliveryListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDeliveryListVO.java @@ -92,6 +92,21 @@ public class DistributionAppDeliveryListVO extends DistributionDeliveryListEntit */ @ApiModelProperty(value = "是否备货(1-没有,2-备货)") private String isstock; + /** + * 电话 + */ + @ApiModelProperty(value = "电话") + private String deliveryPhone; + /** + * 名称 + */ + @ApiModelProperty(value = "名称") + private String consignee; + /** + * 地址 + */ + @ApiModelProperty(value = "地址") + private String deliveryAddress; diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockArticleVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockArticleVO.java index c54b45636..4da860597 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockArticleVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockArticleVO.java @@ -40,6 +40,12 @@ public class DistributionAppStockArticleVO extends DistributionStockArticleEntit */ @ApiModelProperty(value = "扫描数") private Integer loadingNub; + + /** + * 订单ID + */ + @ApiModelProperty(value = "订单ID") + private Long stockArticleId; /** * 签收数 */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java index 88fb1539b..dbbddcff0 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java @@ -111,6 +111,35 @@ public class DistributionStockArticleController extends BladeController { IPage pages = distributionStockArticleService.page(Condition.getPage(query), queryWrapper); return R.data(DistributionStockArticleWrapper.build().pageVO(pages)); + } /** + * 配送在库订单 分页 + */ + @GetMapping("/selectStockArticleInfoList") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入distributionStockArticle") + public R> selectStockArticleInfoList(@ApiIgnore @RequestParam Map distributionStockArticle, Query query) { + Object o = distributionStockArticle.get("orderSelfNumbering"); + distributionStockArticle.remove("orderSelfNumbering"); + Object o2 = distributionStockArticle.get("startDate"); + Object o1 = distributionStockArticle.get("entDate"); + Object d = distributionStockArticle.get("id"); + distributionStockArticle.remove("id"); + distributionStockArticle.remove("startDate"); + distributionStockArticle.remove("entDate"); + QueryWrapper queryWrapper = Condition.getQueryWrapper(distributionStockArticle, DistributionStockArticleEntity.class); + if(Func.isNotEmpty(o)){ + queryWrapper.in("order_self_numbering",String.valueOf(o).split(",")); + } + if(ObjectUtil.isNotEmpty(d)){ + queryWrapper.in("id",String.valueOf(d).split(",")); + } + if(ObjectUtil.isNotEmpty(o2)){ + queryWrapper.between("warehouse_entry_time",o2,o1); + } + IPage pages = distributionStockArticleService.page(Condition.getPage(query), queryWrapper); + IPage distributionStockArticleVOIPage = distributionStockArticleService.handlePackage(DistributionStockArticleWrapper.build().pageVO(pages)); + return R.data(distributionStockArticleVOIPage); + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml index 22466859f..3ab4357da 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml @@ -91,7 +91,7 @@ logpm_distribution_signfor lds JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id - lds.is_deleted = 0 and lds.delivery_id = #{id} + lds.is_deleted = 0 and lds.delivery_id = #{id} and ldr.reservation_status != 40 SELECT distinct ldsa.order_code orderCode, + ldsa.consignee_unit, + ldsa.consignee_person, + ldsa.consignee_address, + ldsa.consignee_mobile, ldsa.description_goods descriptionGoods, ( diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml index d8e7136ab..dd2d42403 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml @@ -628,7 +628,15 @@ join logpm_distribution_reservation ldr on lds.reservation_id =ldr.id WHERE lds.delivery_id = lddl.id) inventoryNub, (SELECT COALESCE(sum(lds.loaded_number+lds.loadedin_number), 0) FROM logpm_distribution_signfor lds WHERE - lddl.id = lds.delivery_id) scannedNumber + lddl.id = lds.delivery_id) scannedNumber, + ( + select GROUP_CONCAT(ldr.consignee) + from logpm_distribution_reservation ldr + where ldr.id in + (select lds.reservation_id + from logpm_distribution_signfor lds + where lds.delivery_id = lddl.id ) + ) consignee FROM logpm_distribution_delivery_list lddl left join logpm_distribution_delivery_self ldds on lddl.id =ldds.delivery_id diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java index 03901aaf2..83b2b5718 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java @@ -70,7 +70,7 @@ public interface DistributionParcelListMapper extends BaseMapper getPageVOList(Page objectPage, Long id); + List getPageVOList( Long id); List getStockDataBase(@Param("param") DistributionParcelListEntity parcelListEntity); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.java index 11d168c99..5d70dbd84 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.java @@ -101,7 +101,7 @@ public interface DistributionReservationPackageMapper extends BaseMapper selectPackageVOList(Page objectPage,@Param("reservationId") Long id,@Param("stockArticleId") Long id1); + List selectPackageVOList(@Param("reservationId") Long id,@Param("stockArticleId") Long id1); /** * @@ -125,4 +125,6 @@ public interface DistributionReservationPackageMapper extends BaseMapper getPackDetail(@Param("param") DistributionReservationPackageDTO packageDTO); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.xml index 6bb0b1ada..256e8bea1 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.xml @@ -198,10 +198,9 @@ WHERE logpm_distribution_reservation_package AS ldrp INNER JOIN logpm_distribution_parcel_list AS ldpl ON ldrp.parce_list_id = ldpl.id - ldpl.packet_bar_status != 2 + ldrp.packet_bar_status != 2 and ldrp.reservation_id =#{reservationId} - and ldrp.stock_article_id =#{stockArticleId} @@ -232,6 +231,7 @@ WHERE packet_bar_status FROM logpm_distribution_reservation_package + packet_bar_status != 2 and reservation_id =#{reservationId} @@ -249,5 +249,15 @@ WHERE + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStocklistMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStocklistMapper.java index 943b2b0f2..6d5857bb2 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStocklistMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStocklistMapper.java @@ -18,6 +18,7 @@ package com.logpm.distribution.mapper; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionReservationStocklistEntity; +import com.logpm.distribution.entity.DistributionStockListEntity; import com.logpm.distribution.vo.DistributionReservationStocklistVO; import com.logpm.distribution.excel.DistributionReservationStocklistExcel; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -71,4 +72,11 @@ public interface DistributionReservationStocklistMapper extends BaseMapper selectReservationPackageNum(@Param("reservationId")Long id,@Param("stockArticleId") Long stockArticleId); + + /** + * 查询预约下的有效库存品 + * @param id + * @return + */ + List selectInventory(@Param("reservationId") Long id); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStocklistMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStocklistMapper.xml index 76c830c7d..d941ad0ff 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStocklistMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationStocklistMapper.xml @@ -102,5 +102,18 @@ - + 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 7f47e0ea6..7becd5259 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 @@ -510,6 +510,8 @@ lds.driver_signing driverSigning, lds.Signing_status SigningStatus, lds.loaded_number loadingNub, + ldr.delivery_phone deliveryPhone, + ldr.delivery_address deliveryAddress, (SELECT COALESCE(COUNT(*), 0) from logpm_distribution_reservation_stockarticle ldrs WHERE ldrs.reservation_id =ldr.id ) ordNub, COALESCE(lds.received_quantity + lds.receivedin_quantity, 0) signNub FROM @@ -520,11 +522,12 @@ AND lds.delivery_id = #{id} - - - + + +