Browse Source

自提检测包件调整、已签收订单页面接口、预约商场字段BUG修复、

pull/4/head
汤建军 1 year ago
parent
commit
1a9124b0b7
  1. 226
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java
  2. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java
  3. 32
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSignforStockArticleDTO.java
  4. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java
  5. 98
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  6. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  7. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java
  8. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  9. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java
  10. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  11. 65
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  12. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

226
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java

@ -0,0 +1,226 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.vo;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.vo.DistributionParcelNumberVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 已签收订单视图类
*
* @author tjj
* @since 2023-06-13
*/
@Data
public class DistributionSignforStockArticleVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 运单号
*/
@ApiModelProperty(value = "运单号")
private String waybillNumber;
/**
* 服务号
*/
@ApiModelProperty(value = "服务号")
private String serviceNumber;
/**
* 订单自编号
*/
@ApiModelProperty(value = "订单自编号")
private String orderCode;
/**
* 商场名称
*/
@ApiModelProperty(value = "商场名称")
private String mallName;
/**
* 仓库名称
*/
@ApiModelProperty(value = "仓库名称")
private String warehouseName;
/**
* 最新入库时间
*/
@ApiModelProperty(value = "最新入库时间")
private Date warehouseEntryTime;
/**
* 收货单位
*/
@ApiModelProperty(value = "收货单位")
private String consigneeUnit;
/**
* 运单收货人
*/
@ApiModelProperty(value = "运单收货人")
private String consigneePerson;
/**
* 品牌
*/
@ApiModelProperty(value = "品牌")
private String brand;
/**
* 总数量
*/
@ApiModelProperty(value = "总数量")
private Integer totalNumber;
/**
* 在库数
*/
@ApiModelProperty(value = "在库数")
private Integer handQuantity;
/**
* 出库数
*/
@ApiModelProperty(value = "出库数")
private Integer deliveryNumber;
/**
* 出库数
*/
@ApiModelProperty(value = "签收数")
private Integer signForNumber;
/**
* 备货数
*/
@ApiModelProperty(value = "备货数")
private Integer stockUpNumber;
/**
* 预约数
*/
@ApiModelProperty(value = "预约数")
private Integer reservationNumber;
/**
* 订单状态
*/
@ApiModelProperty(value = "订单状态")
private String orderStatusName;
/**
* 是否零担
*/
@ApiModelProperty(value = "是否零担")
private String isZeroName;
/**
* 预约状态
*/
@ApiModelProperty(value = "预约状态")
private String orderReservationStatusName;
/**
* 是否齐套
*/
@ApiModelProperty(value = "是否齐套")
private String isCompleteSet;
/**
* 是否齐套
*/
@ApiModelProperty(value = "服务类型")
private String typeServiceName;
/**
* 预约信息
*/
@ApiModelProperty(value = "预约信息")
private String reservationInfo;
/**
* 车次信息
*/
@ApiModelProperty(value = "车次信息")
private String deliveryListInfo;
/**
* 司机信息
*/
@ApiModelProperty(value = "司机信息")
private String driverName;
/**
* 车辆信息
*/
@ApiModelProperty(value = "车辆信息")
private String vehicleName;
/**
* 审核人
*/
@ApiModelProperty(value = "审核人")
private String examineUserNames;
/**
* 最早入库时间
*/
@ApiModelProperty(value = "最早入库时间")
private Date earliestWarehouseEntryTime;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建人")
private Long createUser;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建人")
private String createUserName;
/**
* 创建时间
*/
@ApiModelProperty(value = "签收时间")
private Date signinTime;
}

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java

@ -498,4 +498,18 @@ public class DistributionStockArticleController extends BladeController {
} }
/**
* 配送在库订单 分页
*/
@GetMapping("/signforList")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionStockArticle")
public R<IPage<DistributionSignforStockArticleVO>> signforList(@ApiIgnore @RequestParam Map<String, Object> distributionStockArticle, Query query) {
IPage<DistributionSignforStockArticleVO> pages = distributionStockArticleService.pageSignforListtOwe(Condition.getPage(query), distributionStockArticle);
return R.data(pages);
}
} }

32
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSignforStockArticleDTO.java

@ -0,0 +1,32 @@
package com.logpm.distribution.dto;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* @program: LogisticsPlatform-Service
* @description:
* @author: cyz
* @create: 2023-09-06 20:57
**/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionSignforStockArticleDTO extends DistributionStockArticleEntity {
private static final long serialVersionUID = 1L;
private String orderCodeNum; //订单号
private List<String> orderCodeNumList;
private String orderCodeNumLike;
private String waybillNum; //订单号
private List<String> waybillNumList;
private String waybillNumLike;
private String ids;
private List<String> idsList;
private String idsLike;
private String reservation;
private String startDate;
private String entDate;
private List<Long> warehouseIdList;
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java

@ -183,4 +183,12 @@ public interface DistributionStockArticleMapper extends BaseMapper<DistributionS
void submitHandleNumAndTotalNumberByOrderId(@Param("subNum") Integer subNum, @Param("articleId") Long articleId); void submitHandleNumAndTotalNumberByOrderId(@Param("subNum") Integer subNum, @Param("articleId") Long articleId);
JSONObject findShowOrderCodeData(@Param("orderId") Long orderId); JSONObject findShowOrderCodeData(@Param("orderId") Long orderId);
/**
* 查询签收订单信息
* @param page
* @param stockArticleEntity
* @return
*/
IPage<DistributionSignforStockArticleVO> pageSignforListOwe(IPage<DistributionSignforStockArticleVO> page,@Param("param") DistributionStockArticleOweDTO stockArticleEntity);
} }

98
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -1102,5 +1102,103 @@
from logpm_distribution_stock_article ldsa from logpm_distribution_stock_article ldsa
where ldsa.id = #{orderId} where ldsa.id = #{orderId}
</select> </select>
<select id="pageSignforListOwe" resultType="com.logpm.distribution.vo.DistributionSignforStockArticleVO">
SELECT
ldsa.waybill_number AS waybillNumber,
ldsa.service_number AS serviceNumber,
ldsa.order_code orderCode,
ldsa.mall_name mallName,
ldsa.warehouse warehouseName,
ldsa.warehouse_entry_time warehouseEntryTime,
ldsa.consignee_unit consigneeUnit,
ldsa.consignee_person consigneePerson,
ldsa.total_number totalNumber,
ldsa.hand_quantity handQuantity,
ldsa.brand brand,
CASE ldsa.order_status
WHEN 70 THEN '部分签收'
WHEN 80 THEN '已签收'
ELSE
'未知'
END orderStatusName,
CASE ldsa.is_zero
WHEN 0 THEN '否'
WHEN 1 THEN '是'
ELSE
'未知'
END isZeroName,
CASE ldsa.reservation_status
WHEN 10 THEN '待预约'
WHEN 20 THEN '部分预约'
WHEN 30 THEN '已预约'
END orderReservationStatusName,
CASE ldsa.is_zero
WHEN 0 THEN IF(ldsa.total_number =(SELECT SUM(quantity) FROM logpm_distribution_parcel_list WHERE stock_article_id = ldsa.id),'是','否')
WHEN 1 THEN IF(ldsa.total_number =(SELECT SUM(quantity) FROM logpm_distribution_parcel_number WHERE stock_article_id = ldsa.id),'是','否')
END isCompleteSet,
CASE ldsa.type_service
WHEN 1 THEN '商配'
WHEN 2 THEN '市配'
WHEN 3 THEN '自提'
WHEN 4 THEN '三方中转'
END typeServiceName,
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,
GROUP_CONCAT(DISTINCT IFNULL( m.mssg,'')) AS deliveryListInfo,
ldsa.create_time As createTime,
ldsa.create_user As createUser,
m.signing_time AS signinTime,
GROUP_CONCAT(DISTINCT IFNULL( m.driverName,'')) AS driverName,
GROUP_CONCAT(DISTINCT IFNULL( m.vehicleName,'')) AS vehicleName,
GROUP_CONCAT(DISTINCT IFNULL( m.examine_user_name,'')) AS examineUserNames,
(SELECT MIN(create_time) FROM logpm_distribution_parcel_list WHERE stock_article_id = ldsa.id) AS earliestWarehouseEntryTime
FROM
logpm_distribution_stock_article AS ldsa
LEFT JOIN (
SELECT
ldrs.stock_article_id,
ldr.id AS reservation_id,
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
) AS t ON ldsa.id = t.stock_article_id
LEFT JOIN (
SELECT
ldbs.stock_article_id,
CONCAT( ldbl.pickup_batch, '(', IFNULL( SUM( ldbp.packet_number ), 0 ), ')' ) AS msg
FROM
logpm_distrilbution_bill_stock AS ldbs
LEFT JOIN logpm_distrilbution_bill_lading AS ldbl ON ldbs.bill_lading_id = ldbl.id
LEFT JOIN logpm_distrilbution_bill_package AS ldbp ON ldbp.bill_lading_id = ldbs.bill_lading_id
AND ldbp.stock_article_id = ldbs.stock_article_id
) AS y ON ldsa.id = y.stock_article_id
LEFT JOIN (
SELECT
ldrs.stock_article_id,
ldr.id AS reservation_id,
CONCAT( lddl.train_number, '(', ldrs.reservation_num, ')' ) AS mssg,
CONCAT( lds.examine_user_name ) AS examine_user_name,
CONCAT( lddl.driver_name ) AS driverName,
CONCAT( lddl.vehicle_name ) AS vehicleName,
lds.signing_time
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_signfor As lds ON lds.reservation_id = ldr.id
LEFT JOIN logpm_distribution_delivery_list AS lddl ON lds.delivery_id = lddl.id
) AS m ON ldsa.id = m.stock_article_id
WHERE
ldsa.id = '1749602880861630465'
GROUP BY
ldsa.id
</select>
</mapper> </mapper>

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -98,7 +98,7 @@
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldrzp.stock_article_id and LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldrzp.stock_article_id and
lwug.association_type = '1' lwug.association_type = '1'
<where> <where>
ldsi.stockup_id = #{param.stockupId} and lwug.allocation_id = #{param.allocationId} ldsi.stockup_id = #{param.stockupId} and lwug.allocation_id = #{param.allocationId} AND ldrzp.reservation_id = #{param.reservationId}
<if test="param.stockArticleId != null and param.stockArticleId != ''"> <if test="param.stockArticleId != null and param.stockArticleId != ''">
and ldrzp.stock_article_id = #{param.stockArticleId} and ldrzp.stock_article_id = #{param.stockArticleId}
</if> </if>

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

@ -128,6 +128,13 @@ public interface DistrilbutionBillLadingMapper extends BaseMapper<DistrilbutionB
*/ */
Integer selectBillLadingPlanNum(@Param("billLadingId") Long billLadingId); Integer selectBillLadingPlanNum(@Param("billLadingId") Long billLadingId);
/**
* 查询自提单订制品包件数量
* @param billLadingId
* @return
*/
Integer selectBillLadingPackagePlanNum(@Param("billLadingId") Long billLadingId);
/** /**
* *
* @param id * @param id

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml

@ -492,13 +492,17 @@
</select> </select>
<select id="selectBillLadingPlanNum" resultType="java.lang.Integer"> <select id="selectBillLadingPlanNum" resultType="java.lang.Integer">
SELECT( SELECT(
IF((SELECT sum(packet_number) FROM logpm_distrilbution_bill_package WHERE bill_lading_id = #{billLadingId} AND packet_bar_status != 3) IS NULL,0,(SELECT sum(packet_number) FROM logpm_distrilbution_bill_package WHERE bill_lading_id = #{billLadingId} AND packet_bar_status != 2)) IF((SELECT sum(packet_number) FROM logpm_distrilbution_bill_package WHERE bill_lading_id = #{billLadingId} AND packet_bar_status != 2) IS NULL,0,(SELECT sum(packet_number) FROM logpm_distrilbution_bill_package WHERE bill_lading_id = #{billLadingId} AND packet_bar_status != 2))
+ +
IF((SELECT sum(quantity) FROM logpm_distribution_delivery_details WHERE bill_lading_id = #{billLadingId} AND inventory_status != 3) IS NULL ,0,(SELECT sum(quantity) FROM logpm_distribution_delivery_details WHERE bill_lading_id = #{billLadingId} AND inventory_status != 2) ) ) IF((SELECT sum(quantity) FROM logpm_distribution_delivery_details WHERE bill_lading_id = #{billLadingId} AND inventory_status != 2) IS NULL ,0,(SELECT sum(quantity) FROM logpm_distribution_delivery_details WHERE bill_lading_id = #{billLadingId} AND inventory_status != 2) ) )
</select> </select>
<select id="selectBillLadingLoading" resultType="java.lang.Integer"> <select id="selectBillLadingLoading" resultType="java.lang.Integer">
SELECT sum(quantity) FROM logpm_distribution_bill_lading_scan WHERE bill_lading_id =#{billLadingId} AND is_deleted = 0 SELECT sum(quantity) FROM logpm_distribution_bill_lading_scan WHERE bill_lading_id =#{billLadingId} AND is_deleted = 0
</select> </select>
<select id="selectBillLadingPackagePlanNum" resultType="java.lang.Integer">
SELECT
IF((SELECT sum(packet_number) FROM logpm_distrilbution_bill_package WHERE bill_lading_id = #{billLadingId} AND packet_bar_status != 2) IS NULL,0,(SELECT sum(packet_number) FROM logpm_distrilbution_bill_package WHERE bill_lading_id = #{billLadingId} AND packet_bar_status != 2))
</select>
</mapper> </mapper>

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java

@ -241,4 +241,14 @@ public interface IDistributionStockArticleService extends BaseService<Distributi
Boolean maintenanceOrderInfoByWarehouseId(String warehouseId); Boolean maintenanceOrderInfoByWarehouseId(String warehouseId);
OrderCodeDataVO showOrderCode(Map<String, Object> params) throws Exception; OrderCodeDataVO showOrderCode(Map<String, Object> params) throws Exception;
/**
* 查询签收订单
* @param page
* @param distributionStockArticle
* @return
*/
IPage<DistributionSignforStockArticleVO> pageSignforListtOwe(IPage<DistributionSignforStockArticleVO> page, Map<String, Object> distributionStockArticle);
} }

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -1897,6 +1897,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
disStockListDetailService.saveBatch(detailEntities); disStockListDetailService.saveBatch(detailEntities);
} else { } else {
DistributionReservationStocklistEntity distributionReservationStocklistEntity = oleInventoryList.get(c).get(0); DistributionReservationStocklistEntity distributionReservationStocklistEntity = oleInventoryList.get(c).get(0);
mallName.add(distributionStockListDTO.getMarketName());
mallId.add(distributionStockListDTO.getMarketId());
// DistributionStockListDTO distributionStockListDTO = newInventoryList.get(c).get(0); // DistributionStockListDTO distributionStockListDTO = newInventoryList.get(c).get(0);
//比对原来的库存品数量和现在的数量是否一致 //比对原来的库存品数量和现在的数量是否一致
if (!Func.equals(distributionStockListDTO.getReservationNum(), distributionReservationStocklistEntity.getReservationNum())) { if (!Func.equals(distributionStockListDTO.getReservationNum(), distributionReservationStocklistEntity.getReservationNum())) {

65
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -73,6 +73,7 @@ import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.cache.DictBizCache; import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.DictBiz; import org.springblade.system.entity.DictBiz;
import org.springblade.system.entity.User;
import org.springblade.system.feign.IDictBizClient; import org.springblade.system.feign.IDictBizClient;
import org.springblade.system.feign.IUserClient; import org.springblade.system.feign.IUserClient;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -1549,7 +1550,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
// ).mapToInt(DistributionParcelListEntity::getQuantity).sum(); // ).mapToInt(DistributionParcelListEntity::getQuantity).sum();
int a = parcelListEntities.stream().filter(f -> !OrderPackageStatusConstant.yiqianshou.getValue().equals(f.getOrderPackageStatus())) int a = parcelListEntities.stream().filter(f -> !OrderPackageStatusConstant.yiqianshou.getValue().equals(f.getOrderPackageStatus()))
.filter(f->OrderPackageLoadingStatusConstant.weizhuancghe.getValue().equals(f.getOrderPackageLoadingStatus())) .filter(f->OrderPackageLoadingStatusConstant.weizhuancghe.getValue().equals(f.getOrderPackageLoadingStatus()))
.filter(f->OrderPackageReservationStatusConstant.daiyuyue.getValue().equals(f.getOrderPackageReservationStatus()) .filter(f->!OrderPackageReservationStatusConstant.daiyuyue.getValue().equals(f.getOrderPackageReservationStatus())
).mapToInt(DistributionParcelListEntity::getQuantity).sum(); ).mapToInt(DistributionParcelListEntity::getQuantity).sum();
inWarehouseQuantity = a; inWarehouseQuantity = a;
@ -1888,6 +1889,68 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
return orderCodeDataVO; return orderCodeDataVO;
} }
/**
* @param page
* @param distributionSignforStockArticle
* @return
*/
@Override
public IPage<DistributionSignforStockArticleVO> pageSignforListtOwe(IPage<DistributionSignforStockArticleVO> page, Map<String, Object> distributionSignforStockArticle) {
DistributionStockArticleOweDTO stockArticleEntity = JSONObject.parseObject(JSONObject.toJSONString(distributionSignforStockArticle), DistributionStockArticleOweDTO.class);
if (Func.isNotEmpty(distributionSignforStockArticle.get("typeServer"))){
stockArticleEntity.setTypeService((String) distributionSignforStockArticle.get("typeServer"));
}
if (Func.isNotEmpty(stockArticleEntity.getOrderCodeNum())) {
String anumbering = stockArticleEntity.getOrderCodeNum().trim();
List<String> list = CommonUtil.stringNum(anumbering);
if (list.size() > 1) {
stockArticleEntity.setOrderCodeNumList(list);
} else {
stockArticleEntity.setOrderCodeNumLike(anumbering);
}
}
if (Func.isNotEmpty(stockArticleEntity.getWaybillNum())) {
String waybill = stockArticleEntity.getWaybillNum().trim();
List<String> list = CommonUtil.stringNum(waybill);
if (list.size() > 1) {
stockArticleEntity.setWaybillNumList(list);
} else {
stockArticleEntity.setWaybillNumLike(waybill);
}
}
if (ObjectUtil.isNotEmpty(stockArticleEntity.getIds())) {
String ids = stockArticleEntity.getIds().trim();
List<String> list = CommonUtil.stringNum(ids);
if (list.size() > 1) {
stockArticleEntity.setIdsList(list);
} else {
stockArticleEntity.setIdsLike(ids);
}
}
// if(Func.isNotEmpty(stockArticleEntity.getReservation())){
// stockArticleEntity.setReservationStatus("10");
// }
List<BasicdataWarehouseEntity> myWarehouseList = warehouseClient.getMyWatchWarehouse();
List<Long> collect = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
if (collect.size() > 1) {
stockArticleEntity.setWarehouseIdList(collect);
} else if (collect.size() == 1) {
stockArticleEntity.setWarehouseId(collect.get(0));
}
IPage<DistributionSignforStockArticleVO> distributionStockArticleEntityIPage = baseMapper.pageSignforListOwe(page, stockArticleEntity);
//处理创建人
distributionStockArticleEntityIPage.getRecords().forEach(a->{
if (Func.isNotEmpty(a.getCreateUser())){
R<User> userR = userClient.userInfoById(a.getCreateUser());
a.setCreateUserName(userR.getData().getName());
}
});
return distributionStockArticleEntityIPage;
}
@Override @Override
public DistributionStockArticleEntity findZeroByOrderCodeAndWarehouseId(String orderCode, Long warehouseId) { public DistributionStockArticleEntity findZeroByOrderCodeAndWarehouseId(String orderCode, Long warehouseId) {

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -719,12 +719,17 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
log.info(method + "自提单查询失败:{}", billLadingId); log.info(method + "自提单查询失败:{}", billLadingId);
return 2; return 2;
} }
Integer integer = this.selectBillLadingPlanNum(billLadingEntity.getId()); Integer integer = baseMapper.selectBillLadingPackagePlanNum(billLadingEntity.getId());
if (integer == 0){
return 1;
}
//查询是否存在自提扫描 //查询是否存在自提扫描
List<DistributionBillLadingScanEntity> ladingScanEntities = distributionBillLadingScanService.list(Wrappers.<DistributionBillLadingScanEntity>query().lambda() List<DistributionBillLadingScanEntity> ladingScanEntities = distributionBillLadingScanService.list(Wrappers.<DistributionBillLadingScanEntity>query().lambda()
.eq(DistributionBillLadingScanEntity::getBillLadingId, billLadingId)); .eq(DistributionBillLadingScanEntity::getBillLadingId, billLadingId)
.eq(DistributionBillLadingScanEntity::getMaterialType, "2")
);
boolean a = false; boolean a = false;
if (Func.isEmpty(ladingScanEntities)) { if (Func.isNotEmpty(ladingScanEntities)) {
int sum = ladingScanEntities.stream().mapToInt(DistributionBillLadingScanEntity::getQuantity).sum(); int sum = ladingScanEntities.stream().mapToInt(DistributionBillLadingScanEntity::getQuantity).sum();
//提货扫描数量和计划保持一致无需进行资源释放 //提货扫描数量和计划保持一致无需进行资源释放
if (integer == sum) { if (integer == sum) {

Loading…
Cancel
Save