From 21e0f70317f31d4f1f628d123f3abe279f6e9ab5 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Fri, 26 Apr 2024 14:57:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E7=AD=BE=E6=94=B6=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E9=A2=84=E7=BA=A6=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/DistributionSignforStockArticleVO.java | 13 +++++++++++++ .../mapper/DistributionSignforMapper.java | 8 ++++++++ .../mapper/DistributionSignforMapper.xml | 15 +++++++++++++++ .../mapper/DistributionStockArticleMapper.xml | 10 +++++++--- .../service/IDistributionSignforService.java | 6 ++++++ .../impl/DistributionSignforServiceImpl.java | 10 ++++++++++ .../impl/DistributionStockArticleServiceImpl.java | 8 ++++++++ 7 files changed, 67 insertions(+), 3 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java index 80cc63016..a9e77c376 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java @@ -224,6 +224,12 @@ public class DistributionSignforStockArticleVO implements Serializable { @ApiModelProperty(value = "创建人") private String createUserName; + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建人") + private String reservationIds; + /** * 创建时间 @@ -232,6 +238,13 @@ public class DistributionSignforStockArticleVO implements Serializable { private Date signinTime; + /** + * 创建时间 + */ + @ApiModelProperty(value = "签收时间") + private List> info; + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java index 4b606d0a9..34c6c6f8c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java @@ -33,6 +33,7 @@ import org.apache.ibatis.annotations.Param; import org.springblade.core.secure.BladeUser; import java.util.List; +import java.util.Map; /** * 签收管理 Mapper 接口 @@ -331,4 +332,11 @@ public interface DistributionSignforMapper extends BaseMapper selectReservationByDeliveryId(@Param("deliveryId") Long deliveryId); DistributionSignforEntity selectByReservationId(@Param("reservationId") Long reservationId); + + /** + * 已签收订单查询签收信息 + * @param longList + * @return + */ + List> getByReservationIds(@Param("reservationIds") List longList); } 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 ac7313aa9..9d311b96b 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 @@ -1329,4 +1329,19 @@ + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml index c2c79af28..23f14b1c5 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml @@ -1163,8 +1163,8 @@ IFNULL(( SELECT SUM( loaded_nub ) FROM logpm_distribution_loadscan WHERE order_id = ldsa.id AND scan_status != 1 ), 0 ) AS deliveryNumber, IFNULL(( SELECT SUM( received_quantity ) FROM logpm_distribution_loadscan WHERE order_id = ldsa.id AND scan_status != 1 ), 0 ) AS signForNumber, IFNULL(( SELECT SUM( stock_quantity ) FROM logpm_distribution_stock WHERE stock_article = ldsa.id ), 0 ) AS stockUpNumber, - IFNULL(( SELECT SUM( reservation_num ) FROM logpm_distribution_reservation_stockarticle WHERE stock_article_id = ldsa.id ), 0 ) AS reservationNumber, - CONCAT(GROUP_CONCAT(DISTINCT IFNULL(t.msg,'')),GROUP_CONCAT(DISTINCT IFNULL(y.msg,''))) AS reservationInfo, + IFNULL(( SELECT SUM( reservation_num ) FROM logpm_distribution_reservation_stockarticle WHERE stock_article_id = ldsa.id AND stock_article_status!= 2), 0 ) AS reservationNumber, + IF(GROUP_CONCAT(t.msg) is not null,GROUP_CONCAT(t.msg),IFNULL(GROUP_CONCAT(y.msg),null)) AS reservationInfo, GROUP_CONCAT(DISTINCT IFNULL( m.mssg,'')) AS deliveryListInfo, ldsa.create_time As createTime, ldsa.create_user As createUser, @@ -1173,6 +1173,7 @@ GROUP_CONCAT(DISTINCT IFNULL( m.vehicleName,'')) AS vehicleName, GROUP_CONCAT(DISTINCT IFNULL( m.examine_user_name,'')) AS examineUserNames, k.earliestWarehouseEntryTime AS earliestWarehouseEntryTime, + GROUP_CONCAT(t.reservation_id) AS reservationIds, j.scanSigningTime AS scanSigningTime FROM logpm_distribution_stock_article AS ldsa @@ -1183,7 +1184,10 @@ CONCAT( ldr.reservation_code, '(', ldrs.reservation_num, ')' ) AS msg FROM logpm_distribution_reservation_stockarticle AS ldrs - LEFT JOIN logpm_distribution_reservation ldr ON ldrs.reservation_id = ldr.id AND ldrs.stock_article_status != 2 AND (ldr.reservation_num + ldr.reservation_stock_list_num) > 0 + LEFT JOIN logpm_distribution_reservation ldr ON ldrs.reservation_id = ldr.id + AND ldrs.stock_article_status != 2 + AND ldr.reservation_status != 40 + AND (ldr.reservation_num + ldr.reservation_stock_list_num) > 0 ) AS t ON ldsa.id = t.stock_article_id LEFT JOIN ( SELECT diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java index 9b84521e2..ba332c5fe 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java @@ -329,4 +329,10 @@ public interface IDistributionSignforService extends BaseService> getByReservationIds(List longList); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index d6281b97f..85a04eb00 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -126,6 +126,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl> getByReservationIds(List longList) { + return baseMapper.getByReservationIds(longList); + } + private List handleStockUp(DistributionStockupEntity distributionStockupEntity) { List nodeVos = new ArrayList<>(); try { diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java index eed503779..7de83320a 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java @@ -141,6 +141,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl selectDistributionStockArticlePage(IPage page, DistributionStockArticleVO distributionStockArticle) { @@ -2025,6 +2026,13 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl userR = userClient.userInfoById(a.getCreateUser()); a.setCreateUserName(userR.getData().getName()); } + if (!Func.isEmpty(a.getReservationIds())){ + //构建签收信息 + List> mapList = distributionSignforMapper.getByReservationIds(Func.toLongList(a.getReservationIds())); + if (!mapList.isEmpty()){ + a.setInfo(mapList); + } + } }); return distributionStockArticleEntityIPage;