Browse Source

Merge branch 'dev' into pre-production

newStockUp
zhenghaoyu 1 year ago
parent
commit
d47f366104
  1. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java
  2. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java
  3. 13
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseStockListZationVO.java
  4. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  5. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  6. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  7. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  8. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
  9. 90
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  10. 6
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseStockListZationDTO.java
  11. 14
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml
  12. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.java
  13. 115
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.xml
  14. 33
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java
  15. 12
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java

3
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;
/**
* 拆包数

6
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;
/**
* 卸车班组

13
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;
}

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

@ -212,8 +212,10 @@ public class DistributionStockupAppController extends BladeController {
List<DistributionStockupOrderListVO> list = distributionStockupService.selectStockupOrderList(stockupDTO);
if(!list.isEmpty()){
List<DistributionStockupOrderListVO> 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.isCompleteStact()) {
i.setTrayLean(distributionStockupService.getTrayBoot(i,stockupDTO.getTypeService()));
}
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,stockupDTO.getTypeService()));
}
}
}

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -725,12 +725,10 @@
<where>
lddl.is_deleted =0
<if test=" param.type != null and param.type != ''">and lddl.type = #{param.type}</if>
<if test="array != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(array)">
and lddl.id in
<foreach collection="array" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
and lddl.id in
<foreach collection="array" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
<if test="param.createTime_query!=null and param.createTime_query!=''">
and date_format(lddl.create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%')
</if>

2
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
<where>
ldrs.reservation_id = #{reservationId} and ldrs.stock_article_status in (1,3) and ldsa.is_zero = #{isZero}

4
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 @@
<if test="param.signingStatus != null and param.signingStatus!=''">
and lds.signing_status = #{param.signingStatus}
</if>
<if test="param.taskTime != null and param.taskTime!=''">
and date_format(lddl.task_time,'%Y-%m-%d') = #{param.taskTime}
</if>
</where>
</select>

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java

@ -229,4 +229,11 @@ public interface IDistributionStockupService extends BaseService<DistributionSto
List<DistributionCityExcel> exportCity(Map<String, Object> paramMap);
List<DistributionSelfExcel> exportSelf(Map<String, Object> paramMap);
/**
* 查询托盘数据是否可用整托
* @param vo
* @return
*/
boolean getTrayBoot(DistributionStockupOrderListVO vo,String type);
}

90
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -50,6 +50,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.CodeDesEnum;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant;
import org.springblade.common.constant.pda.PdaAudioLingoStatus;
import org.springblade.common.constant.stocklist.StockLockingStatusConstant;
@ -65,7 +66,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 +78,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;
@ -873,6 +874,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if( ObjectUtils.isNotNull(i.getPallet()) && !wu.getPallet().contains(i.getPallet())){
wu.setPallet(wu.getPallet()+","+i.getPallet());
}
//托盘信息
if( ObjectUtils.isNotNull(i.getTrayId()) && !wu.getTrayId().contains(i.getTrayId())){
wu.setTrayId(wu.getTrayId()+","+i.getTrayId());
}
//订单自编号信息
if(ObjectUtils.isNotNull(i.getOrderCode()) && !wu.getOrderCode().contains(i.getOrderCode())){
wu.setOrderCode(wu.getOrderCode()+","+i.getOrderCode());
@ -948,6 +953,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
//t托盘信息
if(ObjectUtils.isNotNull(y.getTrayId()) && !y.getTrayId().contains(p.getTrayId())){
y.setTrayId(y.getTrayId()+","+p.getTrayId());
}
//t托盘信息
if(ObjectUtils.isNotNull(y.getPallet()) && !y.getPallet().contains(p.getPallet())){
y.setPallet(y.getPallet()+","+p.getPallet());
}
//订单自编号信息
@ -1025,6 +1034,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
//t托盘信息
if(ObjectUtils.isNotNull(y.getTrayId()) && ObjectUtils.isNotNull(p.getTrayId()) && !y.getTrayId().contains(p.getTrayId())){
y.setTrayId(y.getTrayId()+","+p.getTrayId());
}
//托盘信息
if(ObjectUtils.isNotNull(y.getPallet()) && ObjectUtils.isNotNull(p.getPallet()) && !y.getPallet().contains(p.getPallet())){
y.setPallet(y.getPallet()+","+p.getPallet());
}
//订单自编号信息
@ -1087,6 +1100,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
//托盘信息
if(ObjectUtils.isNotNull(wu.getTrayId()) && ObjectUtils.isNotNull(i.getTrayId()) && !wu.getTrayId().contains(i.getTrayId())){
wu.setTrayId(wu.getTrayId()+","+i.getTrayId());
}
//托盘信息
if(ObjectUtils.isNotNull(wu.getPallet()) && ObjectUtils.isNotNull(i.getPallet()) && !wu.getPallet().contains(i.getPallet())){
wu.setPallet(wu.getPallet()+","+i.getPallet());
}
//订单自编号信息
@ -1739,7 +1756,8 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if(trayIdList.isEmpty()){
return Resp.scanFail("托盘信息错误!!!", "托盘信息错误!!!");
}
trayIdList.forEach(t -> {
List<WarehouseTrayGoodsEntity> trayIdListCode = trayIdList.stream().filter(i -> i.getTrayCode().equals(stockupDTO.getTrayBarCode())).collect(Collectors.toList());
trayIdListCode.forEach(t -> {
boolean b = finalList.stream().anyMatch(l -> l.getParcelListId().equals(t.getAssociationId()));
if (b) {
finalList.stream().forEach(i -> {
@ -1758,11 +1776,13 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
return Resp.scanFail("备货失败!有其他包件无法整托", "备货失败!有其他包件无法整托");
} else {
List<DistributionStockEntity> list1 = new ArrayList<>();
AtomicBoolean f = new AtomicBoolean(false); //是否下架
AtomicBoolean fa = new AtomicBoolean(false); //是否有包件
voList.forEach(i -> {
//查询是否已备货
DistributionParcelListEntity byId = distributionParcelListService.getById(i.getParcelListId());
if(ObjectUtils.isNotNull(byId) && !byId.getOrderPackageStockupStatus().equals(OrderPackageStockupStatusConstant.yibeihu.getValue())){
fa.set(true);
DistributionStockEntity distributionStock = new DistributionStockEntity();
//修改包件备货状态
@ -1791,6 +1811,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if(ObjectUtils.isNotNull(locationInformation)){
distributionStock.setAllocationTitle(locationInformation.getPositionCode());
distributionStock.setAllocationId(locationInformation.getAllocationId());
}else{
f.set(true);
}
distributionStock.setStockupId(stockupDTO.getStockupId());
distributionStock.setStockArticle(i.getStockArticleId());
@ -1810,23 +1833,27 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
list1.add(distributionStock);
}
});
Long warehouseId ;
if(one.getStockUpType().equals("3")){
DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = distrilbutionBillLadingMapper.selectById(stockupDTO.getReservationId());
warehouseId = distrilbutionBillLadingEntity.getWarehouseId();
}else{
DistributionReservationEntity byId1 = distributionReservationService.getById(stockupDTO.getReservationId());
warehouseId = byId1.getWarehouseId();
}
if(ObjectUtils.isNull(warehouseId)){
throw new ServiceException("预约信息不存在,无法备货!");
if(!fa.get()){
return Resp.scanSuccess("当前托盘已完成备货!!","当前托盘已完成备货!!");
}
String trayCode= stockupDTO.getTrayBarCode() ;
//货位下架
R r = warehouseUpdownTypeClient.downTray(trayCode,warehouseId );
if(ObjectUtils.isNull(r) || ObjectUtils.isNotNull(r) && r.getCode() != 200){
throw new ServiceException("下架失败!!");
if(!f.get() ){
Long warehouseId ;
if(one.getStockUpType().equals("3")){
DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = distrilbutionBillLadingMapper.selectById(stockupDTO.getReservationId());
warehouseId = distrilbutionBillLadingEntity.getWarehouseId();
}else{
DistributionReservationEntity byId1 = distributionReservationService.getById(stockupDTO.getReservationId());
warehouseId = byId1.getWarehouseId();
}
if(ObjectUtils.isNull(warehouseId)){
throw new ServiceException("预约信息不存在,无法备货!");
}
String trayCode= stockupDTO.getTrayBarCode() ;
//货位下架
R r = warehouseUpdownTypeClient.downTray(trayCode,warehouseId );
if(ObjectUtils.isNull(r) || ObjectUtils.isNotNull(r) && r.getCode() != 200){
throw new ServiceException("下架失败!!");
}
}
//TODO 其他操作
//添加扫描记录
@ -2664,4 +2691,29 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
return list;
}
/**
* 查询
* @param vo
* @return
*/
@Override
public boolean getTrayBoot(DistributionStockupOrderListVO vo,String type) {
// BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
List<WarehouseTrayGoodsEntity> trayIdList = warehouseTrayGoodsClient.getTrayIdList(vo.getTrayId(), vo.getPallet());
AtomicBoolean f = new AtomicBoolean(true);
trayIdList.stream().collect(Collectors.groupingBy(WarehouseTrayGoodsEntity::getTrayId)).
forEach((k,v) ->{
// List<Long> di = new ArrayList<>();
// AtomicReference<Integer> s = new AtomicReference<>(0); //已扫数量
v.stream().forEach( i ->{
DistributionParcelListEntity byId = distributionParcelListService.getById(i.getAssociationId());
if(!vo.getStockArticleId().contains(byId.getStockArticleId().toString())){
f.set(false);
}
});
});
return f.get();
}
}

6
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;
/**
* 操作数量
*/

14
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml

@ -153,6 +153,7 @@
from ${questNum}
<where>
is_deleted = 0
<if test="param.id != null and param.id != ''">and id = #{param.id } </if>
<if test="param.questId != null and param.questId != ''">and quest_id =#{param.questId } </if>
<if test="param.questType != null and param.questType != ''">and quest_type =#{param.questType } </if>
<if test="param.questTarget != null and param.questTarget != ''">and quest_target =#{param.questTarget } </if>
@ -200,13 +201,13 @@
update ${questNum} set quest_status = #{param.questStatus}
WHERE `id` = #{ param.id }
</update>
<update id="updatePositionCodeList">
<foreach collection="list" separator=";" item="item" index="index">
update ${questNum}
<update id="updatePositionCodeList" parameterType="com.logpm.warehouse.entity.QuestDetailEntity">
<foreach collection="list" separator=";" item="item" index="index" open="" close="">
update ${questNum}
<set>
<if test="item.groundingAllocationId != null and item.groundingAllocationId != null">grounding_allocation_id = #{item. groundingAllocationId},</if>
<if test="item.groundingPositionCode != null and item.groundingPositionCode != null">grounding_position_code = #{item.groundingPositionCode },</if>
<if test="item.questStatus != null and item.questStatus != null"> quest_status = #{item.questStatus },</if>
<if test="item.groundingAllocationId != null"> grounding_allocation_id = #{item.groundingAllocationId},</if>
<if test="item.groundingPositionCode != null and item.groundingPositionCode != ''"> grounding_position_code = #{item.groundingPositionCode },</if>
<if test="item.questStatus != null and item.questStatus != ''"> quest_status = #{item.questStatus },</if>
<!-- <if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>
@ -265,6 +266,7 @@
is_deleted = 0
<if test="param.questDetailId != null and param.questDetailId != ''">and quest_detail_id = #{param.questDetailId } </if>
<if test="param.warehouseId != null and param.warehouseId != ''">and warehouse_id = #{param.warehouseId } </if>
<if test="param.cargoName != null and param.cargoName != ''">and cargo_name = #{param.cargoName } </if>
</where>
</select>

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.java

@ -94,7 +94,7 @@ public interface WarehouseGoodsAllocationMapper extends BaseMapper<WarehouseGood
*/
List<WarehouseMaterialEntity> selectStockList(@Param("id")Long id);
List<WarehouseStockArticleZationVO> selectOrder(IPage<WarehouseStockArticleZationVO> page, @Param("param") WarehouseStockArticleZationDTO warehouseGoodsAllocation);
List<WarehouseStockArticleZationVO> selectOrder(IPage<WarehouseStockArticleZationVO> page, @Param("param") WarehouseStockArticleZationDTO warehouseGoodsAllocation,@Param("list") List<Long> list);
/**
* 查询服务号
*

115
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.xml

@ -62,33 +62,47 @@
and lwug.allocation_id = #{id}
</select>
<select id="selectOrder" resultType="com.logpm.warehouse.vo.WarehouseStockArticleZationVO">
select ldsa.* from logpm_distribution_stock_article ldsa
select * from logpm_distribution_stock_article ldsa
<where>
ldsa.is_deleted = 0 and ldsa.is_zero ='0'
<if test="list != null ">
and ldsa.warehouse_id in
<foreach collection="list" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="param.serviceNumber!=null and param.serviceNumber!=''">
and ldsa.service_number like concat('%',#{param.serviceNumber},'%')
</if>
<!-- <if test="param.warehouseId!=null and param.warehouseId!=''">-->
<!-- and ldsa.warehouse_id = #{param.warehouseId}-->
<!-- </if>-->
<if test="param.warehouseIdList != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(param.warehouseIdList)">
and ldsa.warehouse_id in
<foreach collection="param.warehouseIdList" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="param.orderCode!=null and param.orderCode!=''">
and ldsa.order_code like concat('%',#{param.orderCode},'%')
</if>
</where>
</select>
<select id="selectservicenub" resultType="com.logpm.warehouse.vo.WarehouseStockArticleZationVO">
select group_concat(ldsa.order_Code separator ',') as orderCode, group_concat(ldsa.service_number separator ',')
select group_concat(ldsa.order_Code separator ',') as orderCode, ldsa.service_number
as serviceNumber, group_concat(ldsa.customer_name separator ',') as customerName ,
group_concat(ldsa.customer_address separator ',') as customerAddress, group_concat(ldsa.customer_telephone
separator ',') as customerTelephone from logpm_distribution_stock_article ldsa
separator ',') as customerTelephone
from logpm_distribution_stock_article ldsa
<where>
ldsa.is_deleted = 0 and ldsa.is_zero ='0'
ldsa.is_deleted = 0 and ldsa.is_zero ='0' and ldsa.service_number in (
select DISTINCT service_number
from logpm_distribution_stock_article
<where>
is_deleted = 0 and is_zero ='0' and service_number is not null
<if test="param.warehouseIdList != null">
and warehouse_id in
<foreach collection="param.warehouseIdList" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
)
</where>
<if test="param.customerName!=null and param.customerName!=''">
and ldsa.customer_name like concat('%',#{param.customerName},'%')
</if>
@ -98,12 +112,12 @@
<!-- <if test="param.warehouseId!=null and param.warehouseId!=''">-->
<!-- and ldsa.warehouse_id = #{param.warehouseId}-->
<!-- </if>-->
<if test="param.warehouseIdList != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(param.warehouseIdList)">
and ldsa.warehouse_id in
<foreach collection="param.warehouseIdList" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<!-- <if test="param.warehouseIdList != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(param.warehouseIdList)">-->
<!-- and ldsa.warehouse_id in-->
<!-- <foreach collection="param.warehouseIdList" item="item" open="(" close=")" separator=",">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </if>-->
</where>
GROUP BY ldsa.service_number
</select>
@ -218,32 +232,32 @@
</where>
</select>
<select id="selectInventory" resultType="com.logpm.warehouse.vo.WarehouseStockListZationVO">
-- SELECT
-- ldsl.id id,
-- ldsl.material_id materialId,
-- ldsl.order_code orderCode,
-- lbm.product_code materialCode,
-- ldsl.service_number serviceNumber,
-- ldsl.description_goods descriptionGoods,
-- ldsl.cargo_number cargoNumber,
-- ldsl.market_id marketId,
-- ldsl.cargo_norms cargoNorms,
-- ldsl.incoming_batch incomingBatch,
-- ldsl.cargo_unit cargoUnit,
-- ldsl.stock_list_code stockListCode,
-- ldsl.quantity_stock quantityStock,
-- ldsl.sku sku,
-- sum(lwug.num) allNum
-- FROM
-- logpm_distribution_stock_list ldsl
-- left JOIN logpm_warehouse_updown_goods lwug ON ldsl.material_id = lwug.association_id
-- AND ldsl.market_id = lwug.market_id
-- AND ldsl.incoming_batch = lwug.incoming_batch
-- left join logpm_basicdata_material lbm on lbm.id =ldsl.material_id
<!--&#45;&#45; SELECT
&#45;&#45; ldsl.id id,
&#45;&#45; ldsl.material_id materialId,
&#45;&#45; ldsl.order_code orderCode,
&#45;&#45; lbm.product_code materialCode,
&#45;&#45; ldsl.service_number serviceNumber,
&#45;&#45; ldsl.description_goods descriptionGoods,
&#45;&#45; ldsl.cargo_number cargoNumber,
&#45;&#45; ldsl.market_id marketId,
&#45;&#45; ldsl.cargo_norms cargoNorms,
&#45;&#45; ldsl.incoming_batch incomingBatch,
&#45;&#45; ldsl.cargo_unit cargoUnit,
&#45;&#45; ldsl.stock_list_code stockListCode,
&#45;&#45; ldsl.quantity_stock quantityStock,
&#45;&#45; ldsl.sku sku,
&#45;&#45; sum(lwug.num) allNum
&#45;&#45; FROM
&#45;&#45; logpm_distribution_stock_list ldsl
&#45;&#45; left JOIN logpm_warehouse_updown_goods lwug ON ldsl.material_id = lwug.association_id
&#45;&#45; AND ldsl.market_id = lwug.market_id
&#45;&#45; AND ldsl.incoming_batch = lwug.incoming_batch
&#45;&#45; left join logpm_basicdata_material lbm on lbm.id =ldsl.material_id-->
SELECT
ldsl.id AS id,
ldsl.material_id AS materialId,
ldsl.order_code AS orderCode,
ldsl.incoming_batch AS orderCode,
lbm.product_code AS materialCode,
ldsl.service_number AS serviceNumber,
ldsl.description_goods AS descriptionGoods,
@ -254,6 +268,9 @@
ldsl.cargo_unit AS cargoUnit,
ldsl.stock_list_code AS stockListCode,
ldsl.quantity_stock AS quantityStock,
ldsl.market_name AS marketName,
ldsl.incoming_batch AS incomingBatch,
ldsl.warehousing_time AS warehousingTime,
ldsl.sku AS sku,
COALESCE(lwug.allNum, 0) AS allNum
FROM
@ -279,7 +296,7 @@
<where>
(ldsl.quantity_stock > COALESCE(lwug.allNum, 0) OR lwug.association_id IS NULL) and ldsl.is_deleted = 0
<if test="param.orderCode!=null and param.orderCode !=''">
and ldpl.order_code like concat('%',#{param.orderCode},'%')
and ldsl.incoming_batch like concat('%',#{param.orderCode},'%')
</if>
<if test="param.warehouseIdList != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(param.warehouseIdList)">
and ldsl.warehouse_id in
@ -288,8 +305,24 @@
</foreach>
</if>
<if test="param.sku!=null and param.sku !=''">
and ldpl.sku like concat('%',#{param.sku},'%')
and ldsl.sku like concat('%',#{param.sku},'%')
</if>
<if test="param.marketName!=null and param.marketName !=''">
and ldsl.market_name like concat('%',#{param.marketName},'%')
</if>
<if test="param.incomingBatch!=null and param.incomingBatch !=''">
and ldsl.incoming_batch like concat('%',#{param.incomingBatch},'%')
</if>
<if test="param.descriptionGoods!=null and param.descriptionGoods !=''">
and ldsl.description_goods like concat('%',#{param.descriptionGoods},'%')
</if>
<if test="param.cargoNumber != null and param.cargoNumber !=''">
and ldsl.cargo_number like concat('%',#{param.cargoNumber},'%')
</if>
<if test="param.waerTime !=null ">
and ldsl.warehousing_time like concat(#{param.waerTime},'%')
</if>
</where>
</select>
<select id="selectAllTray" resultType="com.logpm.warehouse.vo.WarehouseTrayVO">

33
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

@ -1355,8 +1355,16 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
childList.add(addQuestDetailChild(noRepairNum,"40",questDetaiId,warehouseId,taskQuestEntity.getQuestNum()));
childList.add(addQuestDetailChild(deliveNum,"50",questDetaiId,warehouseId,taskQuestEntity.getQuestNum()));
childList.add(addQuestDetailChild(noReceivedNum,"60",questDetaiId,warehouseId,taskQuestEntity.getQuestNum()));
//修改
baseMapper.updetaQuestDetailChildList(taskQuestEntity.getQuestNum(),childList);
if(!childList.isEmpty()){
boolean b = childList.stream().anyMatch(i -> ObjectUtils.isNull(i.getId()));
if(b){
//添加
baseMapper.insertQuestDetailChildList(taskSearchDTO.getQuestNum()+"_child",childList);
}else{
//修改
baseMapper.updetaQuestDetailChildList(taskQuestEntity.getQuestNum()+"_child",childList);
}
}
// questDetailChildService.saveOrUpdateBatch(childList);
detailEntity.setQuestStatus(1);
//修改状态
@ -1881,16 +1889,23 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
throw new CustomerException(403,"数量不正确");
}
QueryWrapper<QuestDetailChildEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("quest_detail_id",questDetaiId)
.eq("cargo_name",cargoName)
.eq("is_deleted",0);
// QueryWrapper<QuestDetailChildEntity> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("quest_detail_id",questDetaiId)
// .eq("cargo_name",cargoName)
// .eq("is_deleted",0);
QuestDetailChildEntity questDetailChild = new QuestDetailChildEntity();
QuestDetailChildEntity questDetailChildEntity = baseMapper.selectQuestDetailChildInfoOne(qu,questDetailChild);
questDetailChild.setQuestDetailId(questDetaiId);
questDetailChild.setCargoName(cargoName);
questDetailChild.setWarehouseId(warehouseId);
QuestDetailChildEntity questDetailChildEntity = baseMapper.selectQuestDetailChildInfoOne(qu+"_child",questDetailChild);
if(Objects.isNull(questDetailChildEntity)){
BladeUser user = AuthUtil.getUser();
questDetailChildEntity = new QuestDetailChildEntity();
questDetailChildEntity.setTenantId(user.getTenantId());
questDetailChildEntity.setCreateUser(user.getUserId());
// questDetailChildEntity.setCreateDept(user.getDeptId());
questDetailChildEntity.setCreateTime(new Date());
questDetailChildEntity.setQuestDetailId(questDetaiId);
questDetailChildEntity.setCargoName(cargoName);
questDetailChildEntity.setQuestNum(num);

12
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java

@ -19,6 +19,7 @@ package com.logpm.warehouse.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.warehouse.dto.*;
@ -38,6 +39,7 @@ import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.tool.utils.Func;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@ -150,8 +152,9 @@ public class WarehouseGoodsAllocationServiceImpl extends BaseServiceImpl<Warehou
@Override
public IPage<WarehouseStockArticleZationVO> selectorder(WarehouseStockArticleZationDTO warehouseGoodsAllocation, IPage<WarehouseStockArticleZationVO> page) {
//获取当前登录人仓库
warehouseGoodsAllocation.setWarehouseIdList(this.getMyWatchWarehouseIds());
List<WarehouseStockArticleZationVO> list =baseMapper.selectOrder(page,warehouseGoodsAllocation);
List<Long> myWatchWarehouseIds = this.getMyWatchWarehouseIds();
// warehouseGoodsAllocation.setWarehouseIdList(myWatchWarehouseIds);
List<WarehouseStockArticleZationVO> list =baseMapper.selectOrder(page,warehouseGoodsAllocation,myWatchWarehouseIds);
return page.setRecords(list);
}
@ -201,6 +204,11 @@ public class WarehouseGoodsAllocationServiceImpl extends BaseServiceImpl<Warehou
public IPage<WarehouseStockListZationVO> selectInventory(WarehouseStockListZationDTO warehouseGoodsAllocation, IPage<WarehouseStockListZationVO> page) {
//查询没有上架的库存品
warehouseGoodsAllocation.setWarehouseIdList(this.getMyWatchWarehouseIds());
if(ObjectUtils.isNotNull(warehouseGoodsAllocation.getWarehousingTime())){
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
String format1 = format.format(warehouseGoodsAllocation.getWarehousingTime());
warehouseGoodsAllocation.setWaerTime(format1);
}
List<WarehouseStockListZationVO>list = baseMapper.selectInventory(page,warehouseGoodsAllocation);
//可上架数量
for (WarehouseStockListZationVO warehouseStockListZationVO : list) {

Loading…
Cancel
Save