Browse Source

自提BUG修复、已签订单完善、自提签收调整、备货库存品明细接口

pull/7/head
汤建军 1 year ago
parent
commit
1612820406
  1. 22
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupInventoryDetailVO.java
  2. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistrilbutionAppBillLadingOrderMainVO.java
  3. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionBillLadingAppController.java
  4. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java
  5. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockArticleOweDTO.java
  6. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  7. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java
  8. 22
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  9. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java
  10. 39
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  11. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
  12. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillLadingService.java
  13. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  14. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  15. 69
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

22
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupInventoryDetailVO.java

@ -0,0 +1,22 @@
package com.logpm.distribution.vo;
import lombok.Data;
import java.util.Date;
/**
*
*/
@Data
public class DistributionStockupInventoryDetailVO {
private Long id; //id
private String pickupBatch; //自提批次号
private Date reservationTime; //明细创建时间
private Date codeCreatedTime; //订单自编号
private Date stockScanTime; //备货扫描时间
private String descriptionGoods; //物料名称
private String stockPackageCode; //包条码
private String qrCode; //下架库位
}

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistrilbutionAppBillLadingOrderMainVO.java

@ -16,6 +16,7 @@
*/
package com.logpm.distribution.vo.app;
import com.logpm.distribution.vo.DistrilbutionBillLadingAppVO;
import lombok.Data;
import java.io.Serializable;
@ -39,5 +40,7 @@ public class DistrilbutionAppBillLadingOrderMainVO implements Serializable {
private Integer signedNum;//签收总数
private List<DistrilbutionAppBillLadingOrderVO> list = new ArrayList<>();
private List<DistrilbutionBillLadingAppVO> inventoryList = new ArrayList<>();
private List<DistrilbutionAppBillLadingZeroOrderVO> billLadingZeroOrderVOS = new ArrayList<>();
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionBillLadingAppController.java

@ -105,8 +105,8 @@ public class DistributionBillLadingAppController extends BladeController {
@GetMapping("/getInventory")
@ApiOperationSupport(order = 1)
@ApiImplicitParam(name = "id",value ="自提单ID")
public R<IPage<DistrilbutionBillLadingAppVO>> getInventory(@ApiIgnore @RequestParam Map<String, Object> distrilbutionBillLading, Query query){
IPage<DistrilbutionBillLadingAppVO> ladingAppVOIPage = distrilbutionBillLadingService.getInventory(Condition.getPage(query),distrilbutionBillLading);
public R<DistrilbutionAppBillLadingOrderMainVO> getInventory(@ApiIgnore @RequestParam Map<String, Object> distrilbutionBillLading){
DistrilbutionAppBillLadingOrderMainVO ladingAppVOIPage = distrilbutionBillLadingService.getInventory(distrilbutionBillLading);
return R.data(ladingAppVOIPage);
}

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

@ -100,6 +100,16 @@ public class DistributionStockupController extends BladeController {
return R.data(detail);
}
/**
* 备货信息表 提货 详情
*/
@GetMapping("/detailOwnSelfInventoryDetail")
@ApiOperation(value = "自提库存品备货详情", notes = "传入distributionStockup")
public R detailOwnSelfInventoryDetail(@RequestParam Long billLadingId,@RequestParam Long stockListId ) {
R r = distributionStockupService.detailOwnSelfInventoryDetail(billLadingId,stockListId);
return r;
}

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockArticleOweDTO.java

@ -27,6 +27,7 @@ public class DistributionStockArticleOweDTO extends DistributionStockArticleEnti
private String driverName;
private String examineUserNames;
private String reservationInfo;
private String earliestWarehouseEntryTime;
private String ids;
private List<String> idsList;
private String idsLike;

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

@ -1158,7 +1158,7 @@
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
k.earliestWarehouseEntryTime AS earliestWarehouseEntryTime
FROM
logpm_distribution_stock_article AS ldsa
LEFT JOIN (
@ -1198,13 +1198,14 @@
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 AND t.reservation_id = m.reservation_id
LEFT JOIN ( SELECT stock_article_id, min( create_time ) AS earliestWarehouseEntryTime FROM logpm_distribution_parcel_list) AS k ON k.stock_article_id = ldsa.id
<where>
ldsa.order_status in ('70','80')
<if test="param.waybillNumber != null and param.waybillNumber != ''">
AND ldsa.waybill_number like concat("%",#{param.waybillNumber},"%")
</if>
<if test="param.serviceNumber != null and param.serviceNumber != ''">
AND ldsa.service_umber like concat("%",#{param.serviceNumber},"%")
AND ldsa.service_number like concat("%",#{param.serviceNumber},"%")
</if>
<if test="param.orderCode != null and param.orderCode != ''">
AND ldsa.order_code like concat("%",#{param.orderCode},"%")
@ -1213,7 +1214,7 @@
AND ldsa.warehouse like concat("%",#{param.warehouseName},"%")
</if>
<if test="param.mallName != null and param.mallName != ''">
AND ldsa.mall_mame like concat("%",#{param.mallName},"%")
AND ldsa.mall_name like concat("%",#{param.mallName},"%")
</if>
<if test="param.brand != null and param.brand != ''">
AND ldsa.brand like concat("%",#{param.brand},"%")
@ -1270,6 +1271,9 @@
<if test=" param.signinTime != null ">and DATE(m.signing_time) =
#{param.signinTime}
</if>
<if test=" param.earliestWarehouseEntryTime != null ">and DATE(k.earliestWarehouseEntryTime) =
#{param.earliestWarehouseEntryTime}
</if>
<!-- <if test=" param.warehouseEntryTimeEnd != null ">and DATE(ldsa.warehouse_entry_time) =-->
<!-- #{param.warehouseEntryTimeEnd}-->
<!-- </if>-->

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

@ -270,4 +270,12 @@ public interface DistributionStockupMapper extends BaseMapper<DistributionStocku
* @return
*/
Integer selectStockUpPlanNum(@Param("stockUpId") Long stockUpId);
/**
* 备货列表库存品备货详情
* @param billLadingId
* @param stockListId
* @return
*/
List<DistributionStockupInventoryDetailVO> selectInventoryDetailByBillLadingIdAndStockListId(@Param("billLadingId") Long billLadingId,@Param("stockListId") Long stockListId);
}

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

@ -1253,5 +1253,27 @@
END num
FROM logpm_distribution_stockup WHERE id = #{stockUpId}
</select>
<select id="selectInventoryDetailByBillLadingIdAndStockListId"
resultType="com.logpm.distribution.vo.DistributionStockupInventoryDetailVO">
SELECT
ldbl.pickup_batch,
ldsld.create_time reservationTime,
ldsor.create_time codeCreatedTime,
lds.create_time stockScanTime,
ldsl.description_goods descriptionGoods,
ldsld.stock_package_code stockPackageCode,
lwga.qr_code AS qrCode
FROM
logpm_dis_stock_list_detail AS ldsld
LEFT JOIN logpm_dis_stock_ordercode_reco AS ldsor ON ldsld.stock_package_code = ldsor.`code`
LEFT JOIN logpm_distribution_stock_list AS ldsl ON ldsld.stock_list_id = ldsl.id
LEFT JOIN logpm_distrilbution_bill_lading AS ldbl ON ldsld.reservation_id = ldbl.`id`
LEFT JOIN logpm_distribution_stock AS lds ON ldsld.reservation_id = lds.reservation_id AND ldsld.stock_list_id = lds.stock_list_id
LEFT JOIN logpm_warehouse_goods_allocation AS lwga ON lwga.id = lds.allocation_id
WHERE
ldsld.reservation_id = #{billLadingId} AND ldsld.stock_list_id = #{stockListId} AND lds.outbound_type = 3
GROUP BY
ldsld.id
</select>
</mapper>

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

@ -19,6 +19,7 @@ package com.logpm.distribution.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.distribution.dto.DistributionDeliveryDetailsDTO;
import com.logpm.distribution.dto.DistrilbutionBillLadingDTO;
import com.logpm.distribution.dto.app.BillLadingAppDTO;
@ -29,6 +30,7 @@ import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import com.logpm.distribution.excel.DistrilbutionBillLadingExcel;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.vo.app.DistrilbutionAppBillLadingDetailVO;
import com.logpm.distribution.vo.app.DistrilbutionAppBillLadingOrderMainVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -85,7 +87,7 @@ public interface DistrilbutionBillLadingMapper extends BaseMapper<DistrilbutionB
* @param distrilbutionBillLadingEntity
* @return
*/
IPage<DistrilbutionBillLadingAppVO> getInventory(IPage<Object> page,@Param("param") DistrilbutionBillLadingEntity distrilbutionBillLadingEntity);
List<DistrilbutionBillLadingAppVO> getInventory(@Param("param") DistrilbutionBillLadingEntity distrilbutionBillLadingEntity);
DistrilbutionBillLadingVO getBillLadingNum(@Param("param") DistrilbutionBillLadingDTO billLadingEntity);
@ -141,4 +143,14 @@ public interface DistrilbutionBillLadingMapper extends BaseMapper<DistrilbutionB
* @return
*/
Integer selectBillLadingLoading(@Param("billLadingId") Long billLadingId);
DistrilbutionAppBillLadingOrderMainVO getBillLadingOrderMainVO(@Param("billLadingId")Long billLadingId);
List<Boolean> getCompleteNum(@Param("billLadingId")Long billLadingId);
Page<DistrilbutionBillLadingAppVO> getInventoryPage(IPage<Object> page,@Param("param") DistrilbutionBillLadingEntity distrilbutionBillLadingEntity);
// Page<DistrilbutionBillLadingAppVO> getInventoryPage(IPage<Object> page, DistrilbutionBillLadingEntity distrilbutionBillLadingEntity);
}

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

@ -458,7 +458,7 @@
dsa.warehouse,
dsa.warehouse_entry_time warehouseEntryTime,
dsa.storage_fee storageFee,
COUNT(ldbp.id) totalNumber,
(COUNT(ldbp.id) + IFNULL((SELECT sum(quantity) FROM logpm_distribution_delivery_details WHERE bill_lading_id = dbl.id),0)) totalNumber,
COUNT(lds.id) handQuantity,
GROUP_CONCAT(DISTINCT lds.goods_name) productInformation,
dbl.certificate_type certificateType,
@ -511,6 +511,43 @@
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>
<select id="getBillLadingOrderMainVO"
resultType="com.logpm.distribution.vo.app.DistrilbutionAppBillLadingOrderMainVO">
SELECT
( SELECT count( 1 ) FROM logpm_distrilbution_bill_stock WHERE bill_lading_id = ldbl.id AND order_status != 2 AND is_deleted = 0) AS orderNum ,
IFNULL((SELECT SUM(quantity) FROM logpm_distribution_reservation_zero_package WHERE reservation_id = ldbl.id AND is_deleted = 0),0) + IFNULL((SELECT sum(packet_number) FROM logpm_distrilbution_bill_package WHERE bill_lading_id = ldbl.id AND is_deleted = 0),0) AS planNum,
IFNULL((SELECT SUM(quantity) FROM logpm_distribution_delivery_details WHERE bill_lading_id = ldbl.id AND is_deleted = 0),0) AS inventoryNub,
IFNULL((SELECT SUM(quantity) FROM logpm_distribution_bill_lading_scan WHERE bill_lading_id = ldbl.id AND is_deleted = 0) ,0) AS signedNum
FROM
logpm_distrilbution_bill_lading AS ldbl
WHERE
ldbl.id = #{billLadingId}
</select>
<select id="getCompleteNum" resultType="java.lang.Boolean">
SELECT
IF(IFNULL(SUM(ldbls.quantity),0) = sum( ldbp.packet_number ),1,0) c
FROM
logpm_distrilbution_bill_stock AS ldbs
LEFT JOIN logpm_distrilbution_bill_package AS ldbp ON ldbs.stock_article_id = ldbp.stock_article_id
AND ldbs.bill_lading_id = ldbp.bill_lading_id
LEFT JOIN logpm_distribution_bill_lading_scan AS ldbls ON ldbls.stock_article_id = ldbp.stock_article_id AND ldbls.bill_lading_id = ldbs.bill_lading_id
WHERE ldbs.bill_lading_id = #{billLadingId} GROUP BY ldbp.id
</select>
<select id="getInventoryPage" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingAppVO">
select ldbl.id ,lddd.stock_list_id stockListId,lddd.quantity,ldsl.description_goods
descriptionGoods,ldsl.cargo_unit cargoUnit,ldsl.sku,(
select count(1)
from logpm_distribution_stock lds
where lds.bill_lading_id = #{param.id} and lds.is_deleted = 0
) deliveryNum ,lbm.packing_specification packingSpecification
from logpm_distrilbution_bill_lading ldbl
LEFT JOIN logpm_distribution_delivery_details lddd on ldbl.id = lddd.bill_lading_id
LEFT JOIN logpm_distribution_stock_list ldsl on ldsl.id = lddd.stock_list_id
LEFT JOIN logpm_basicdata_material lbm on lbm.id = ldsl.material_id
<where>
ldbl.id = #{param.id} and lddd.is_deleted = '0'
</where>
</select>
</mapper>

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

@ -292,4 +292,12 @@ public interface IDistributionStockupService extends BaseService<DistributionSto
* @return
*/
DistributionStockupEntity selectStockUpByStockUpCode(String searchCode);
/**
* 自提查询库存品备货详情
* @param billLadingId
* @param stockListId
* @return
*/
R detailOwnSelfInventoryDetail(Long billLadingId, Long stockListId);
}

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

@ -124,7 +124,7 @@ public interface IDistrilbutionBillLadingService extends BaseService<Distrilbuti
* @param distrilbutionBillLading
* @return
*/
IPage<DistrilbutionBillLadingAppVO> getInventory(IPage<Object> page, Map<String, Object> distrilbutionBillLading);
DistrilbutionAppBillLadingOrderMainVO getInventory( Map<String, Object> distrilbutionBillLading);
/**
* pda扫描操作

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

@ -2736,6 +2736,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
return true;
}

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

@ -207,6 +207,8 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
private IBasicdataClientClient basicdataClientClient;
@Override
public IPage<DistributionStockupVO> selectDistributionStockupPage(IPage<DistributionStockupVO> page, DistributionStockupVO distributionStockup) {
return page.setRecords(baseMapper.selectDistributionStockupPage(page, distributionStockup));
@ -3341,4 +3343,21 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
return baseMapper.selectStockUpByStockUpCode(myCurrentWarehouse.getId(),searchCode);
}
/**
* @param billLadingId
* @param stockListId
* @return
*/
@Override
public R detailOwnSelfInventoryDetail(Long billLadingId, Long stockListId) {
String method = "####################DistributionStockupServiceImpl.detailOwnSelfInventoryDetail";
if (Func.isEmpty(billLadingId) || Func.isEmpty(stockListId)){
log.info(method+ "参数缺失");
return null;
}
//查询指定库存品备货扫描详情
List<DistributionStockupInventoryDetailVO> detailVOS = baseMapper.selectInventoryDetailByBillLadingIdAndStockListId(billLadingId,stockListId);
return R.data(detailVOS);
}
}

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

@ -1282,6 +1282,13 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
int sum = list1.stream().mapToInt(DistributionReservationZeroPackageEntity::getQuantity).sum();
planNum = planNum + sum;
}
QueryWrapper<DistributionBillLadingScanEntity> qw = new QueryWrapper<>();
qw.eq("bill_lading_id", vo.getBillLadingId());
List<DistributionBillLadingScanEntity> ls = distributionBillLadingScanService.list(qw);
if (!ls.isEmpty()) {
int sum = ls.stream().mapToInt(DistributionBillLadingScanEntity::getQuantity).sum();
signedNum = signedNum + sum;
}
for (String s : split) {
@ -1302,14 +1309,18 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
int pn = list.size(); //包件数量
planNum = planNum + pn;
//通过订单id查询扫描表中有多少数据
QueryWrapper<DistributionBillLadingScanEntity> qw = new QueryWrapper<>();
qw.eq("stock_article_id", Long.parseLong(s))
.eq("is_deleted", 0);
List<DistributionBillLadingScanEntity> ls = distributionBillLadingScanService.list(qw);
if (!ls.isEmpty()) {
int sum = ls.stream().mapToInt(DistributionBillLadingScanEntity::getQuantity).sum();
signedNum = signedNum + sum;
}
// QueryWrapper<DistributionBillLadingScanEntity> qw = new QueryWrapper<>();
// qw.eq("stock_article_id", Long.parseLong(s))
// .eq("is_deleted", 0);
// List<DistributionBillLadingScanEntity> ls = distributionBillLadingScanService.list(qw);
// QueryWrapper<DistributionBillLadingScanEntity> qw = new QueryWrapper<>();
// qw.eq("bill_lading_id", Long.parseLong(s))
// .eq("is_deleted", 0);
// List<DistributionBillLadingScanEntity> ls = distributionBillLadingScanService.list(qw);
// if (!ls.isEmpty()) {
// int sum = ls.stream().mapToInt(DistributionBillLadingScanEntity::getQuantity).sum();
// signedNum = signedNum + sum;
// }
}
//查询库存品的件数量
@ -1724,15 +1735,32 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
/**
* 查询自提任务库存品
*
* @param page
* @param distrilbutionBillLading
* @return
*/
@Override
public IPage<DistrilbutionBillLadingAppVO> getInventory(IPage<Object> page, Map<String, Object> distrilbutionBillLading) {
public DistrilbutionAppBillLadingOrderMainVO getInventory( Map<String, Object> distrilbutionBillLading) {
String method = "##################DistributionBillLadingServiceImpl.getInventory";
if (Func.isEmpty(distrilbutionBillLading.get("id"))){
log.error(method+"自提Id缺失");
return null;
}
String id = (String) distrilbutionBillLading.get("id");
DistrilbutionAppBillLadingOrderMainVO mainVO =baseMapper.getBillLadingOrderMainVO(Long.parseLong(id));
//查询订单数量,
//查询齐套数
//查询字体件数
//查询签收件数
//查询库存品数
// 查询签收完成订单数
List<Boolean> num = baseMapper.getCompleteNum(Long.parseLong(id));
if (Func.isNotEmpty(num)){
int size = num.stream().filter(f -> f.equals(true)).collect(Collectors.toList()).size();
mainVO.setCompleteNum(size);
}
DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = JSONObject.parseObject(JSONObject.toJSONString(distrilbutionBillLading), DistrilbutionBillLadingEntity.class);
IPage<DistrilbutionBillLadingAppVO> inventory = baseMapper.getInventory(page, distrilbutionBillLadingEntity);
inventory.getRecords().forEach(i -> {
List<DistrilbutionBillLadingAppVO> inventory = baseMapper.getInventory(distrilbutionBillLadingEntity);
inventory.forEach(i -> {
List<DisStockListDetailEntity> listed = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda()
.eq(DisStockListDetailEntity::getReservationId, i.getId())
.eq(DisStockListDetailEntity::getStockListId, i.getStockListId())
@ -1765,7 +1793,8 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
// i.setEsauInventoryNum(-1);
// }
});
return inventory;
mainVO.setInventoryList(inventory);
return mainVO;
}
@ -2024,7 +2053,8 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
@Override
public IPage<DistrilbutionBillLadingAppVO> getInventoryNum(IPage<Object> page, Map<String, Object> distrilbutionBillLading) {
DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = JSONObject.parseObject(JSONObject.toJSONString(distrilbutionBillLading), DistrilbutionBillLadingEntity.class);
IPage<DistrilbutionBillLadingAppVO> inventory = baseMapper.getInventory(page, distrilbutionBillLadingEntity);
// List<DistrilbutionBillLadingAppVO> inventory = baseMapper.getInventory(distrilbutionBillLadingEntity);
Page<DistrilbutionBillLadingAppVO> inventory = baseMapper.getInventoryPage(page,distrilbutionBillLadingEntity);
inventory.getRecords().forEach(i -> {
if (i.getQuantity().equals(i.getDeliveryNum())) {
//已备货
@ -2534,6 +2564,14 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
@Override
public R zeroBillOrderData(BillLadingAppDTO billLadingAppDTO) {
DistrilbutionAppBillLadingOrderMainVO billLadingOrderMainVO = baseMapper.getBillLadingOrderMainVO(billLadingAppDTO.getBillLadingId());
List<Boolean> completeNum = baseMapper.getCompleteNum(billLadingAppDTO.getBillLadingId());
if (Func.isNotEmpty(completeNum)){
int size = completeNum.stream().filter(f -> f.equals(true)).collect(Collectors.toList()).size();
billLadingOrderMainVO.setCompleteNum(size);
}else {
billLadingOrderMainVO.setCompleteNum(0);
}
//查询订单
List<DistributionReservationZeroPackageEntity> list = distributionZeroPackageService.list(Wrappers.<DistributionReservationZeroPackageEntity>query().lambda()
.eq(DistributionReservationZeroPackageEntity::getReservationId, billLadingAppDTO.getBillLadingId())
@ -2563,8 +2601,9 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
billLadingZeroOrderVOS.add(zeroOrderVO);
});
billLadingOrderMainVO.setBillLadingZeroOrderVOS(billLadingZeroOrderVOS);
}
return R.data(billLadingZeroOrderVOS);
return R.data(billLadingOrderMainVO);
}
/**

Loading…
Cancel
Save