Browse Source

增加库存品冻结明细、BUG修复

fix-sign
汤建军 5 months ago
parent
commit
5594149c34
  1. 50
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionInventoryPlacnDetailVO.java
  2. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  3. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockListInfoController.java
  4. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListInfoMapper.java
  5. 39
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListInfoMapper.xml
  6. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  7. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListInfoService.java
  8. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListInfoServiceImpl.java
  9. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

50
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionInventoryPlacnDetailVO.java

@ -0,0 +1,50 @@
/*
* 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 io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 库存品计划详情VO
*
* @author cyz
* @since 2023-06-13
*/
@Data
public class DistributionInventoryPlacnDetailVO implements Serializable {
private static final long serialVersionUID = 1L;
private String reservationCode;
private String consignee;
private String scanUser;
private String packageCode;
private Integer planNum;
}

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -1718,7 +1718,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
public boolean savaSurveyRecord(AftersalesWorkOrderDTO aftersalesWorkOrderDTO) { public boolean savaSurveyRecord(AftersalesWorkOrderDTO aftersalesWorkOrderDTO) {
boolean b = this.judgeIsCustomerService(AuthUtil.getUser()); boolean b = this.judgeIsCustomerService(AuthUtil.getUser());
if (!b){ if (!b){
throw new ServiceException("当前登录人无复权限!!!"); throw new ServiceException("当前登录人无复权限!!!");
} }
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
BladeUser user = AuthUtil.getUser(); BladeUser user = AuthUtil.getUser();

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockListInfoController.java

@ -23,6 +23,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.distribution.entity.DistributionStockListInfoEntity; import com.logpm.distribution.entity.DistributionStockListInfoEntity;
import com.logpm.distribution.excel.DistributionStockListInfoExcel; import com.logpm.distribution.excel.DistributionStockListInfoExcel;
import com.logpm.distribution.service.IDistributionStockListInfoService; import com.logpm.distribution.service.IDistributionStockListInfoService;
import com.logpm.distribution.vo.DistributionInventoryPlacnDetailVO;
import com.logpm.distribution.vo.DistributionStockListInfoVO; import com.logpm.distribution.vo.DistributionStockListInfoVO;
import com.logpm.distribution.wrapper.DistributionStockListInfoWrapper; import com.logpm.distribution.wrapper.DistributionStockListInfoWrapper;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -146,4 +147,15 @@ public class DistributionStockListInfoController extends BladeController {
ExcelUtil.export(response, "库存品明细数据" + DateUtil.time(), "库存品明细数据表", list, DistributionStockListInfoExcel.class); ExcelUtil.export(response, "库存品明细数据" + DateUtil.time(), "库存品明细数据表", list, DistributionStockListInfoExcel.class);
} }
/**
* 计划详情
*/
@GetMapping("/planDetail")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入distributionStockListInfo")
public R planDetail(@RequestParam Long stockListId) {
List<DistributionInventoryPlacnDetailVO> inventoryPlanDetail = distributionStockListInfoService.planDetail(stockListId);
return R.data(inventoryPlanDetail);
}
} }

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

@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionStockListInfoEntity; import com.logpm.distribution.entity.DistributionStockListInfoEntity;
import com.logpm.distribution.vo.DistributionInventoryPlacnDetailVO;
import com.logpm.distribution.vo.DistributionStockListInfoVO; import com.logpm.distribution.vo.DistributionStockListInfoVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -61,4 +62,11 @@ public interface DistributionStockListInfoMapper extends BaseMapper<Distribution
String findAllTraysByNoParcelListIdsAndStockListId(@Param("parcelListIds") List<Long> parcelListIds, @Param("stockListId") Long stockListId); String findAllTraysByNoParcelListIdsAndStockListId(@Param("parcelListIds") List<Long> parcelListIds, @Param("stockListId") Long stockListId);
String findAllAllocationByNoParcelListIdsAndStockListId(@Param("parcelListIds") List<Long> parcelListIds, @Param("stockListId") Long stockListId); String findAllAllocationByNoParcelListIdsAndStockListId(@Param("parcelListIds") List<Long> parcelListIds, @Param("stockListId") Long stockListId);
/**
* 查询计划详情
* @param stockListId
* @return
*/
List<DistributionInventoryPlacnDetailVO> planDetail(@Param("stockListId")Long stockListId);
} }

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

@ -145,5 +145,44 @@
#{item} #{item}
</foreach> </foreach>
</select> </select>
<select id="planDetail" resultType="com.logpm.distribution.vo.DistributionInventoryPlacnDetailVO">
SELECT
ldr.reservation_code AS reservationCode,
ldr.consignee AS consignee,
ldrs.reservation_num AS planNum,
lds.scan_user AS scanUser,
GROUP_CONCAT(ldsld.stock_package_code) AS packageCode
FROM
logpm_distribution_reservation_stocklist AS ldrs
LEFT JOIN logpm_distribution_reservation AS ldr ON ldrs.reservation_id = ldr.id AND ldr.reservation_status != 40
LEFT JOIN logpm_dis_stock_list_detail AS ldsld ON ldrs.id = ldsld.stock_list_id AND ldsld.reservation_id = ldr.id AND ldsld.stock_package_status != 2
LEFT JOIN logpm_distribution_stock AS lds ON lds.reservation_id = ldr.id AND ldsld.stock_package_code = lds.coding
WHERE
ldrs.is_deleted = 0
AND ldrs.stocklist_id = #{stockListId}
AND ldrs.stock_list_status != 2
AND ldrs.reservation_num > 0
GROUP BY
ldr.id
UNION ALL
SELECT
ldbl.pickup_batch AS reservationCode,
ldbl.consignee AS consignee,
SUM(ldsld.num) AS planNum,
lds.scan_user,
GROUP_CONCAT(ldsld.stock_package_code) AS packageCode
FROM
logpm_distribution_delivery_details AS lddd
LEFT JOIN logpm_distrilbution_bill_lading AS ldbl ON lddd.bill_lading_id = ldbl.id AND ldbl.is_deleted = 0
LEFT JOIN logpm_dis_stock_list_detail AS ldsld ON lddd.stock_list_id = ldsld.stock_list_id AND ldsld.reservation_id = ldbl.id AND ldsld.stock_package_status != 2
LEFT JOIN logpm_distribution_stock AS lds ON lds.reservation_id = ldbl.id AND ldsld.stock_package_code = lds.coding
WHERE
lddd.is_deleted = 0
AND lddd.stock_list_id = #{stockListId}
AND lddd.inventory_status != 2
AND IFNULL(SUM(ldsld.num),0) > 0
GROUP BY
ldbl.id
</select>
</mapper> </mapper>

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

@ -126,10 +126,10 @@
dsa.storage_fee dsa.storage_fee
FROM FROM
logpm_distrilbution_bill_lading aaa logpm_distrilbution_bill_lading aaa
LEFT JOIN logpm_distrilbution_bill_stock lds ON lds.bill_lading_id = aaa.id LEFT JOIN logpm_distrilbution_bill_stock lds ON lds.bill_lading_id = aaa.id AND lds.order status != 2
LEFT JOIN logpm_distribution_stock_article dsa ON lds.stock_article_id = dsa.id LEFT JOIN logpm_distribution_stock_article dsa ON lds.stock_article_id = dsa.id
WHERE WHERE
1=1 aaa.is_deleted = 0
<if test="collect != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(collect)"> <if test="collect != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(collect)">
and aaa.warehouse_id in and aaa.warehouse_id in
<foreach collection="collect" item="item" open="(" close=")" separator=","> <foreach collection="collect" item="item" open="(" close=")" separator=",">

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

@ -19,6 +19,7 @@ package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionStockListInfoEntity; import com.logpm.distribution.entity.DistributionStockListInfoEntity;
import com.logpm.distribution.excel.DistributionStockListInfoExcel; import com.logpm.distribution.excel.DistributionStockListInfoExcel;
import com.logpm.distribution.vo.DistributionInventoryPlacnDetailVO;
import com.logpm.distribution.vo.DistributionStockListInfoVO; import com.logpm.distribution.vo.DistributionStockListInfoVO;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;
@ -64,4 +65,10 @@ public interface IDistributionStockListInfoService extends BaseService<Distribut
String findAllAllocationByNoParcelListIdsAndStockListId(List<Long> parcelListIds, Long stockListId); String findAllAllocationByNoParcelListIdsAndStockListId(List<Long> parcelListIds, Long stockListId);
/**
* 查询计划详情
* @param stockListId
* @return
*/
List<DistributionInventoryPlacnDetailVO> planDetail(Long stockListId);
} }

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListInfoServiceImpl.java

@ -22,6 +22,7 @@ import com.logpm.distribution.entity.DistributionStockListInfoEntity;
import com.logpm.distribution.excel.DistributionStockListInfoExcel; import com.logpm.distribution.excel.DistributionStockListInfoExcel;
import com.logpm.distribution.mapper.DistributionStockListInfoMapper; import com.logpm.distribution.mapper.DistributionStockListInfoMapper;
import com.logpm.distribution.service.IDistributionStockListInfoService; import com.logpm.distribution.service.IDistributionStockListInfoService;
import com.logpm.distribution.vo.DistributionInventoryPlacnDetailVO;
import com.logpm.distribution.vo.DistributionStockListInfoVO; import com.logpm.distribution.vo.DistributionStockListInfoVO;
import org.springblade.common.constant.DictBizConstant; import org.springblade.common.constant.DictBizConstant;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
@ -98,4 +99,9 @@ public class DistributionStockListInfoServiceImpl extends BaseServiceImpl<Distri
return baseMapper.findAllAllocationByNoParcelListIdsAndStockListId(parcelListIds,stockListId); return baseMapper.findAllAllocationByNoParcelListIdsAndStockListId(parcelListIds,stockListId);
} }
@Override
public List<DistributionInventoryPlacnDetailVO> planDetail(Long stockListId) {
return baseMapper.planDetail(stockListId);
}
} }

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -821,8 +821,9 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
if (ObjectUtils.isNotEmpty(detailList)) { if (ObjectUtils.isNotEmpty(detailList)) {
// 得到需要打印的页面数量 // 得到需要打印的页面数量
int num = (int) Math.ceil((double) detailList.size() / 4); int num = (int) Math.ceil((double) detailList.size() / 4);
; if (detailList.size() % 4>0) {
num = num+1;
}
// int totalPages = (int) Math.ceil((double) totalItems / itemsPerPage); // int totalPages = (int) Math.ceil((double) totalItems / itemsPerPage);
for (int i = 1; i <= num; i++) { for (int i = 1; i <= num; i++) {

Loading…
Cancel
Save