From b1639589470a9f3717a547ba0f46e3e9d29523fc Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Fri, 10 Nov 2023 23:56:02 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=87=E8=B4=A7?= =?UTF-8?q?=E6=95=B4=E6=89=98=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/DistributionStockListEntity.java | 3 + .../vo/DistributionSignforVO.java | 6 + .../vo/WarehouseStockListZationVO.java | 13 +- .../DistributionStockupAppController.java | 12 +- .../mapper/DistributionReservationMapper.xml | 2 +- .../mapper/DistributionSignforMapper.xml | 4 + .../service/IDistributionStockupService.java | 7 ++ .../impl/DistributionStockupServiceImpl.java | 65 +++++++--- .../dto/WarehouseStockListZationDTO.java | 6 + .../warehouse/mapper/TaskQuestMapper.xml | 14 ++- .../WarehouseGoodsAllocationMapper.java | 2 +- .../mapper/WarehouseGoodsAllocationMapper.xml | 115 +++++++++++------- .../service/impl/TaskQuestServiceImpl.java | 33 +++-- .../WarehouseGoodsAllocationServiceImpl.java | 12 +- 14 files changed, 210 insertions(+), 84 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java index a64c8eef3..cc3ba2524 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java @@ -18,6 +18,7 @@ package com.logpm.distribution.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -129,11 +130,13 @@ public class DistributionStockListEntity extends TenantEntity { * 入库时间 */ @ApiModelProperty(value = "入库时间") + @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") private Date warehousingTime; /** * 上架时间 */ @ApiModelProperty(value = "上架时间") + @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") private Date groundingTime; /** * 拆包数 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 c453c7da6..4ad899e33 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 @@ -21,6 +21,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.Date; import java.util.List; /** @@ -150,6 +151,11 @@ public class DistributionSignforVO extends DistributionSignforEntity { */ @ApiModelProperty(value = "装车班组") private String loadingTeamName; + /** + * 配车时间 + */ + @ApiModelProperty(value = "配车时间") + private Date taskTime; /** * 卸车班组 diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseStockListZationVO.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseStockListZationVO.java index 4b37387ca..c7ae68c18 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseStockListZationVO.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseStockListZationVO.java @@ -23,7 +23,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; -; +;import java.util.Date; /** * 库存品管理 视图实体类 @@ -120,5 +120,16 @@ public class WarehouseStockListZationVO extends DistributionStockListEntity { */ @ApiModelProperty(value = "操作数量") private String num; + /** + * 操作数量 + */ + @ApiModelProperty(value = "物料名称") + private String marketName; + /** + * 操作数量 + */ + @ApiModelProperty(value = "入库时间") + private Date warehousingTime; + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java index ee943a5ee..359154512 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java @@ -212,8 +212,10 @@ public class DistributionStockupAppController extends BladeController { List list = distributionStockupService.selectStockupOrderList(stockupDTO); if(!list.isEmpty()){ List collect = list.stream().filter(i -> { - if (ObjectUtils.isNotNull(i.getTrayId()) && !i.getPallet().contains(",") && !i.isCompleteStact() && ObjectUtils.isNotNull( i.getAllocationId()) ) { - i.setTrayLean(true); +// if (ObjectUtils.isNotNull(i.getTrayId()) && !i.getPallet().contains(",") && !i.isCompleteStact() && ObjectUtils.isNotNull( i.getAllocationId()) ) { + + if (ObjectUtils.isNotNull(i.getTrayId()) && !i.getPallet().contains(",") && !i.isCompleteStact()) { + i.setTrayLean(distributionStockupService.getTrayBoot(i)); } return true; }).collect(Collectors.toList()); @@ -252,8 +254,10 @@ public class DistributionStockupAppController extends BladeController { // Boolean aBoolean = distributionStockupService.getClientStockupTray(reservationId, vo.getAllocationId()); // Boolean aBoolean = distributionReservationPackageService.selectClientStockupState(reservationId, vo.getStockArticleId()); // vo.setTrayLean(aBoolean); - if (ObjectUtils.isNotNull(vo.getTrayId()) && !vo.getPallet().contains(",") && !vo.isCompleteStact() && ObjectUtils.isNotNull( vo.getAllocationId()) ) { - vo.setTrayLean(true); +// if (ObjectUtils.isNotNull(vo.getTrayId()) && !vo.getPallet().contains(",") && !vo.isCompleteStact() && ObjectUtils.isNotNull( vo.getAllocationId()) ) { + if (ObjectUtils.isNotNull(vo.getTrayId()) && !vo.isCompleteStact() ) { + //有没有可用整托配货的数据 + vo.setTrayLean(distributionStockupService.getTrayBoot(vo)); } } } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml index 5c2c9cc31..bc18235f0 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml @@ -217,7 +217,7 @@ LEFT JOIN logpm_distribution_stock_article ldsa on ldrs.stock_article_id = ldsa.id LEFT JOIN logpm_distribution_parcel_list ldpl on ldrs.stock_article_id = ldpl.stock_article_id and ldpl.order_package_status != '70' LEFT JOIN logpm_warehouse_updown_goods lwug on ldpl.id = lwug.association_id - LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = lwug.association_id + LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id LEFT JOIN logpm_distribution_stock lds on lds.parcel_list_id = ldpl.id and lds.reservation_id = ldrs.reservation_id ldrs.reservation_id = #{reservationId} and ldrs.stock_article_status in (1,3) and ldsa.is_zero = #{isZero} 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 1567df861..354ae69f7 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 @@ -291,6 +291,7 @@ lds.is_have_abnormal_package isHaveAbnormalPackage, lds.signing_type signingType, lddl.train_number trainNumber, + lddl.task_time taskTime, lds.received_quantity receivedQuantity, ldr.delivery_phone deliveryPhone, (SELECT GROUP_CONCAT(distinct driver_name SEPARATOR ',') from logpm_distribution_loadscan ldl WHERE ldl.reservation_id = lds.reservation_id) deliveryDriverName, @@ -372,6 +373,9 @@ and lds.signing_status = #{param.signingStatus} + + and date_format(lddl.task_time,'%Y-%m-%d') = #{param.taskTime} + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java index 4295f9a61..3674b2050 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java @@ -229,4 +229,11 @@ public interface IDistributionStockupService extends BaseService exportCity(Map paramMap); List exportSelf(Map paramMap); + + /** + * 查询托盘数据是否可用整托 + * @param vo + * @return + */ + boolean getTrayBoot(DistributionStockupOrderListVO vo); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java index 735144d71..519d7681b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java @@ -65,7 +65,6 @@ import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.StringUtil; import org.springblade.system.cache.DictBizCache; -import org.springblade.system.cache.DictCache; import org.springblade.system.entity.DictBiz; import org.springblade.system.entity.User; import org.springblade.system.feign.ISysClient; @@ -78,6 +77,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.*; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; import java.util.function.Predicate; @@ -1758,7 +1758,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl list1 = new ArrayList<>(); - + AtomicBoolean f = new AtomicBoolean(false); voList.forEach(i -> { //查询是否已备货 DistributionParcelListEntity byId = distributionParcelListService.getById(i.getParcelListId()); @@ -1791,6 +1791,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl trayIdList = warehouseTrayGoodsClient.getTrayIdList(vo.getTrayId(), vo.getPallet()); + AtomicBoolean f = new AtomicBoolean(true); + trayIdList.stream().collect(Collectors.groupingBy(WarehouseTrayGoodsEntity::getTrayId)). + forEach((k,v) ->{ + List di = new ArrayList<>(); + v.stream().forEach( i ->{ + DistributionParcelListEntity byId = distributionParcelListService.getById(i.getAssociationId()); + if(!vo.getStockArticleId().contains(byId.getStockArticleId().toString())){ + f.set(false); + } + }); + + }); + return f.get(); + } + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseStockListZationDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseStockListZationDTO.java index 63678afc8..24094b589 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseStockListZationDTO.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseStockListZationDTO.java @@ -98,6 +98,12 @@ public class WarehouseStockListZationDTO extends DistributionStockListEntity { */ @ApiModelProperty(value = "操作人(v)") private String operateUserName; + + /** + * 操作人(v) + */ + @ApiModelProperty(value = "操作人(v)") + private String waerTime; /** * 操作数量 */ diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml index 385ed0e7d..f4df050fc 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml @@ -153,6 +153,7 @@ from ${questNum} is_deleted = 0 + and id = #{param.id } and quest_id =#{param.questId } and quest_type =#{param.questType } and quest_target =#{param.questTarget } @@ -200,13 +201,13 @@ update ${questNum} set quest_status = #{param.questStatus} WHERE `id` = #{ param.id } - - - update ${questNum} + + + update ${questNum} - grounding_allocation_id = #{item. groundingAllocationId}, - grounding_position_code = #{item.groundingPositionCode }, - quest_status = #{item.questStatus }, + grounding_allocation_id = #{item.groundingAllocationId}, + grounding_position_code = #{item.groundingPositionCode }, + quest_status = #{item.questStatus }, - - and ldsa.warehouse_id in - - #{item} - - and ldsa.order_code like concat('%',#{param.orderCode},'%') @@ -218,32 +232,32 @@