Browse Source

备货管理、上架记录、包件明细、滞留包条、滞留运单、扫描记录、已签记录、入库管理、提货管理几个模块的导出功能(如果已有导出功能,此次未做修改)

training
shuishangtang 1 year ago
parent
commit
ab0d267677
  1. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java
  2. 4
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistrilbutionBillLadingVO.java
  3. 4
      blade-service-api/logpm-warehouse-api/pom.xml
  4. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java
  5. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionBillLadingController.java
  6. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java
  7. 374
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  8. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillLadingService.java
  9. 48
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  10. 77
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java
  11. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWarehousingEntryMapper.java
  12. 61
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWarehousingEntryMapper.xml
  13. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWarehousingEntryService.java
  14. 30
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

2
blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java

@ -8,7 +8,7 @@ public interface ModuleNameConstant {
/**
* 如果不需要 ""
*/
public static final String DEVAUTH ="";
public static final String DEVAUTH ="-sst";
/**
* 工厂对接服务名称

4
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistrilbutionBillLadingVO.java

@ -19,8 +19,10 @@ package com.logpm.distribution.vo;
import com.logpm.distribution.entity.DistributionDeliveryChargeEntity;
import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.List;
@ -33,6 +35,8 @@ import java.util.List;
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class DistrilbutionBillLadingVO extends DistrilbutionBillLadingEntity {
private static final long serialVersionUID = 1L;

4
blade-service-api/logpm-warehouse-api/pom.xml

@ -10,6 +10,10 @@
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies>
<parent>

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

@ -100,6 +100,7 @@ public class DistributionStockArticleController extends BladeController {
IPage<DistributionStockArticleEntity> pages = distributionStockArticleService.pageListOwe(Condition.getPage(query), distributionStockArticle);
return R.data(DistributionStockArticleWrapper.build().pageVO(pages));
}
/**
* 配送在库订单 分页
*/

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionBillLadingController.java

@ -20,9 +20,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.logpm.distribution.dto.DistrilbutionBillLadingDTO;
import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import com.logpm.distribution.excel.DistributionStockArticleExcel;
import com.logpm.distribution.excel.DistrilbutionBillLadingExcel;
import com.logpm.distribution.service.IDistrilbutionBillLadingService;
import com.logpm.distribution.vo.DistrilbutionBillLadingDetailsVO;
@ -33,7 +33,7 @@ import com.logpm.distribution.wrapper.DistrilbutionBillLadingWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import kotlin.Suppress;
//import kotlin.Suppress;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
@ -152,6 +152,18 @@ public class DistrilbutionBillLadingController extends BladeController {
return R.data(pages);
}
/**
* 导出数据
*/
@GetMapping("/export-distributionBillLadingVO")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出提货数据", notes = "传入-distributionBillLading")
public void exportDistributionBillLading(@ApiIgnore @RequestParam Map<String, Object> distributionBillLading, HttpServletResponse response) {
List<DistrilbutionBillLadingExcel> list = distrilbutionBillLadingService.exportDistributionBillLading(distributionBillLading);
ExcelUtil.export(response, "提货数据" + DateUtil.time(), "提货数据表", list, DistrilbutionBillLadingExcel.class);
}
/**
* 提货单 自定义分页
*/

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

@ -26,7 +26,6 @@ import com.logpm.distribution.excel.DistrilbutionBillLadingExcel;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.vo.app.DistrilbutionAppBillLadingDetailVO;
import org.apache.ibatis.annotations.Param;
import org.springblade.core.tool.api.R;
import java.util.List;
import java.util.Map;
@ -89,4 +88,7 @@ public interface DistrilbutionBillLadingMapper extends BaseMapper<DistrilbutionB
List<DistrilbutionBillLadingViewVO> getViewDetailOwn(@Param("id") String id);
List<DistrilbutionBillLadingVO> selectBillStockList(IPage<DistrilbutionBillLadingVO> page, @Param("distrilbutionBillLading") Map<String, Object> distrilbutionBillLading);
List<DistrilbutionBillLadingVO> exportDistributionBillLading(@Param("param") Map<String, Object> param, @Param("idArr") List<String> idArr);
}

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

@ -27,59 +27,184 @@
</resultMap>
<select id="pageList" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingVO">
select dbl.id,dsa.service_number serviceNumber,dsa.waybill_number waybillNumber,dsa.consignee_unit consigneeUnit,dsa.customer_name customerName,dsa.customer_telephone
customerTelephone,dsa.warehouse,dsa.warehouse_entry_time warehouseEntryTime,dsa.storage_fee storageFee,dsa.total_number totalNumber,dbl.certificate_type certificateType,
dsa.brand,dsa.type_service typeService,dbl.pick_up_time pickUpTime,dbl.consignee,dbl.delivery_document deliveryDocument,dbl.conditions,dbl.total_cost totalCost,
dbl.pick_up_plate pickUpPlate,dbl.pickup_batch pickupBatch,
select dbl.id,dsa.service_number serviceNumber,dsa.waybill_number waybillNumber,dsa.consignee_unit
consigneeUnit,dsa.customer_name customerName,dsa.customer_telephone
customerTelephone,dsa.warehouse,dsa.warehouse_entry_time warehouseEntryTime,dsa.storage_fee
storageFee,dsa.total_number totalNumber,dbl.certificate_type certificateType,
dsa.brand,dsa.type_service typeService,dbl.pick_up_time pickUpTime,dbl.consignee,dbl.delivery_document
deliveryDocument,dbl.conditions,dbl.total_cost totalCost,
dbl.pick_up_plate pickUpPlate,dbl.pickup_batch pickupBatch,
(
select COUNT(lds.id)
from logpm_distribution_delivery_details lddd
from logpm_distribution_delivery_details lddd
LEFT JOIN logpm_distribution_stock lds on lds.stock_list_id = lddd.stock_list_id
where lddd.bill_lading_id = dbl.id
) + (
select COUNT(lds.id)
from logpm_distrilbution_bill_stock ldbs
from logpm_distrilbution_bill_stock ldbs
LEFT JOIN logpm_distribution_stock lds on lds.stock_article = ldbs.stock_article_id
where ldbs.bill_lading_id = dbl.id
) stopNum
) stopNum
from logpm_distrilbution_bill_lading dbl
LEFT JOIN logpm_distribution_stock_article dsa on dbl.stock_article_id = dsa.id
<where>
dbl.is_deleted = 0
<if test="param.serviceNumber != null and param.serviceNumber != ''"> and dsa.service_number like concat('%',#{param.serviceNumber},'%')</if>
<if test="param.pickupBatch != null and param.pickupBatch != ''"> and dbl.pickup_batch like concat('%',#{param.pickupBatch},'%')</if>
<if test="param.waybillNumber != null and param.waybillNumber != ''">and dsa.waybill_number like concat('%',#{param.waybillNumber},'%')</if>
<if test="param.consigneeUnit != null and param.consigneeUnit != ''">and dsa.consignee_unit like concat('%',#{param.consigneeUnit},'%')</if>
<if test="param.customerName != null and param.customerName != ''">and dsa.customer_name like concat('%',#{param.customerName},'%')</if>
<if test="param.customerTelephone != null and param.customerTelephone != ''">and dsa.customer_telephone like concat('%',#{param.customerTelephone},'%')</if>
<if test="param.warehouse != null and param.warehouse != ''">and dsa.warehouse like concat('%',#{param.warehouse},'%')</if>
<if test="param.serviceNumber != null and param.serviceNumber != ''">and dsa.service_number like
concat('%',#{param.serviceNumber},'%')
</if>
<if test="param.pickupBatch != null and param.pickupBatch != ''">and dbl.pickup_batch like
concat('%',#{param.pickupBatch},'%')
</if>
<if test="param.waybillNumber != null and param.waybillNumber != ''">and dsa.waybill_number like
concat('%',#{param.waybillNumber},'%')
</if>
<if test="param.consigneeUnit != null and param.consigneeUnit != ''">and dsa.consignee_unit like
concat('%',#{param.consigneeUnit},'%')
</if>
<if test="param.customerName != null and param.customerName != ''">and dsa.customer_name like
concat('%',#{param.customerName},'%')
</if>
<if test="param.customerTelephone != null and param.customerTelephone != ''">and dsa.customer_telephone like
concat('%',#{param.customerTelephone},'%')
</if>
<if test="param.warehouse != null and param.warehouse != ''">and dsa.warehouse like
concat('%',#{param.warehouse},'%')
</if>
<if test="param.warehouseIdList != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(param.warehouseIdList)">
and dbl.warehouse_id in
<foreach collection="param.warehouseIdList" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="param.warehouseEntryTime != null ">and date(dsa.warehouse_entry_time) = #{param.warehouseEntryTime}</if>
<if test="param.startDate != null ">and dsa.warehouse_entry_time between #{param.startDate} and #{param.entDate} </if>
<if test="param.warehouseEntryTime != null ">and date(dsa.warehouse_entry_time) =
#{param.warehouseEntryTime}
</if>
<if test="param.startDate != null ">and dsa.warehouse_entry_time between #{param.startDate} and
#{param.entDate}
</if>
<if test="param.brand != null and param.brand != ''">and dsa.brand like concat('%',#{param.brand},'%')</if>
<if test="param.typeService != null and param.typeService != ''">and dsa.type_service = #{param.typeService},=</if>
<if test="param.productInformation != null and param.productInformation != ''">and dsa.allocation like concat('%',#{param.productInformation},'%')</if>
<if test="param.pickupPhone != null and param.pickupPhone != ''">and dbl.pickup_phone concat('%',#{param.pickupPhone},'%')</if>
<if test="param.consignee != null and param.consignee != ''">and dbl.consignee like concat('%',#{param.consignee},'%')</if>
<if test="param.pickUpPlate != null and param.pickUpPlate != ''">and dbl.pick_up_plate like concat('%',#{param.pickUpPlate},'%')</if>
<if test="param.deliveryDocument != null and param.deliveryDocument != ''">and dbl.delivery_document like concat('%',#{param.deliveryDocument},'%')</if>
<if test="param.certificateType != null and param.certificateType != ''">and dbl.certificate_type = #{param.certificateType},</if>
<if test="param.typeService != null and param.typeService != ''">and dsa.type_service =
#{param.typeService}
</if>
<if test="param.productInformation != null and param.productInformation != ''">and dsa.allocation like
concat('%',#{param.productInformation},'%')
</if>
<if test="param.pickupPhone != null and param.pickupPhone != ''">and dbl.pickup_phone
concat('%',#{param.pickupPhone},'%')
</if>
<if test="param.consignee != null and param.consignee != ''">and dbl.consignee like
concat('%',#{param.consignee},'%')
</if>
<if test="param.pickUpPlate != null and param.pickUpPlate != ''">and dbl.pick_up_plate like
concat('%',#{param.pickUpPlate},'%')
</if>
<if test="param.deliveryDocument != null and param.deliveryDocument != ''">and dbl.delivery_document like
concat('%',#{param.deliveryDocument},'%')
</if>
<if test="param.certificateType != null and param.certificateType != ''">and dbl.certificate_type =
#{param.certificateType},
</if>
</where>
</select>
<select id="exportDistributionBillLading" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingVO">
select dbl.id,dsa.service_number serviceNumber,dsa.waybill_number waybillNumber,dsa.consignee_unit
consigneeUnit,dsa.customer_name customerName,dsa.customer_telephone
customerTelephone,dsa.warehouse,dsa.warehouse_entry_time warehouseEntryTime,dsa.storage_fee
storageFee,dsa.total_number totalNumber,dbl.certificate_type certificateType,
dsa.brand,dsa.type_service typeService,dbl.pick_up_time pickUpTime,dbl.consignee,dbl.delivery_document
deliveryDocument,dbl.conditions,dbl.total_cost totalCost,
dbl.pick_up_plate pickUpPlate,dbl.pickup_batch pickupBatch,
(
select COUNT(lds.id)
from logpm_distribution_delivery_details lddd
LEFT JOIN logpm_distribution_stock lds on lds.stock_list_id = lddd.stock_list_id
where lddd.bill_lading_id = dbl.id
) + (
select COUNT(lds.id)
from logpm_distrilbution_bill_stock ldbs
LEFT JOIN logpm_distribution_stock lds on lds.stock_article = ldbs.stock_article_id
where ldbs.bill_lading_id = dbl.id
) stopNum
from logpm_distrilbution_bill_lading dbl
LEFT JOIN logpm_distribution_stock_article dsa on dbl.stock_article_id = dsa.id
<where>
dbl.is_deleted = 0
<if test="param.serviceNumber != null and param.serviceNumber != ''">
and dsa.service_number like concat('%',#{param.serviceNumber},'%')
</if>
<if test="param.pickupBatch != null and param.pickupBatch != ''">
and dbl.pickup_batch like concat('%',#{param.pickupBatch},'%')
</if>
<if test="param.waybillNumber != null and param.waybillNumber != ''">
and dsa.waybill_number like concat('%',#{param.waybillNumber},'%')
</if>
<if test="param.consigneeUnit != null and param.consigneeUnit != ''">
and dsa.consignee_unit like concat('%',#{param.consigneeUnit},'%')
</if>
<if test="param.customerName != null and param.customerName != ''">
and dsa.customer_name like concat('%',#{param.customerName},'%')
</if>
<if test="param.customerTelephone != null and param.customerTelephone != ''">
and dsa.customer_telephone like concat('%',#{param.customerTelephone},'%')
</if>
<if test="param.warehouse != null and param.warehouse != ''">
and dsa.warehouse like concat('%',#{param.warehouse},'%')
</if>
<if test="param.warehouseId != null and param.warehouseId != ''">
and dsa.warehouse_id like concat('%',#{param.warehouseId},'%')
</if>
<if test="param.warehouseEntryTime != null ">
and date(dsa.warehouse_entry_time) = #{param.warehouseEntryTime}
</if>
<if test="param.startDate != null ">
and dsa.warehouse_entry_time between #{param.startDate} and #{param.entDate}
</if>
<if test="param.brand != null and param.brand != ''">
and dsa.brand like concat('%',#{param.brand},'%')
</if>
<if test="param.typeService != null and param.typeService != ''">
and dsa.type_service = #{param.typeService}
</if>
<if test="param.productInformation != null and param.productInformation != ''">
and dsa.allocation like concat('%',#{param.productInformation},'%')
</if>
<if test="param.pickupPhone != null and param.pickupPhone != ''">
and dbl.pickup_phone concat('%',#{param.pickupPhone},'%')
</if>
<if test="param.consignee != null and param.consignee != ''">
and dbl.consignee like concat('%',#{param.consignee},'%')
</if>
<if test="param.pickUpPlate != null and param.pickUpPlate != ''">
and dbl.pick_up_plate like concat('%',#{param.pickUpPlate},'%')
</if>
<if test="param.deliveryDocument != null and param.deliveryDocument != ''">
and dbl.delivery_document like concat('%',#{param.deliveryDocument},'%')
</if>
<if test="param.certificateType != null and param.certificateType != ''">
and dbl.certificate_type = #{param.certificateType},
</if>
<if test="idArr != null">
and dbl.stock_article_id in
<foreach collection="idArr" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
</select>
<select id="selectDistrilbutionBillLadingPage" resultMap="distrilbutionBillLadingResultMap">
select * from logpm_distrilbution_bill_lading where is_deleted = 0
select *
from logpm_distrilbution_bill_lading
where is_deleted = 0
</select>
<select id="exportDistrilbutionBillLading" resultType="com.logpm.distribution.excel.DistrilbutionBillLadingExcel">
SELECT * FROM logpm_distrilbution_bill_lading ${ew.customSqlSegment}
SELECT *
FROM logpm_distrilbution_bill_lading ${ew.customSqlSegment}
</select>
<select id="pageListApp" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingAppVO">
@ -95,18 +220,20 @@
<where>
lad.is_deleted = 0 and lad.conditions = 10
<!-- and lad.warehouse_id = #{param.warehouseId} -->
<if test="param.pickUpTimeStart != null and param.pickUpTimeStart!='' ">and lad.pick_up_time between #{param.pickUpTimeStart} and #{param.pickUpTimeEnd}</if>
<if test="param.pickUpTimeStart != null and param.pickUpTimeStart!='' ">and lad.pick_up_time between
#{param.pickUpTimeStart} and #{param.pickUpTimeEnd}
</if>
</where>
</select>
<select id="selectDataByBillLadingId" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingAppVO">
select lad.id billLadingId,
3 carType,
lad.conditions conditions,
lad.Pick_up_plate pickUpPlate,
lad.consignee consignee,
select lad.id billLadingId,
3 carType,
lad.conditions conditions,
lad.Pick_up_plate pickUpPlate,
lad.consignee consignee,
lad.create_time,
lad.pick_up_time,
lad.stock_article_id stockArticleId
@ -119,15 +246,15 @@
select ldpl.stock_article_id stockArticleId,
ldpl.order_code orderCode,
ldpl.order_package_code orderPackageCode,
case
when ldbls.id is null then 1
else 2
end scanStatus,
0 errorStatus
case
when ldbls.id is null then 1
else 2
end scanStatus,
0 errorStatus
from logpm_distribution_parcel_list ldpl
left join logpm_distribution_bill_lading_scan ldbls on ldbls.parcel_list_id = ldpl.id and ldbls.is_deleted = 0
left join logpm_distribution_bill_lading_scan ldbls on ldbls.parcel_list_id = ldpl.id and ldbls.is_deleted = 0
<where>
ldpl.is_deleted = 0 and ldpl.order_package_code is not null
ldpl.is_deleted = 0 and ldpl.order_package_code is not null
and ldpl.stock_article_id = #{stockArticleId}
<if test="orderCode != null and orderCode !=''">
and ldpl.order_code = ${orderCode}
@ -141,16 +268,23 @@
</where>
</select>
<select id="getOneOwn" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingVO">
select lad.id,lad.stockup_code stockupCode,lad.pick_up_time pickUpTime,lad.stockup_area stockupArea,lad.consignee,
select lad.id,lad.stockup_code stockupCode,lad.pick_up_time pickUpTime,lad.stockup_area
stockupArea,lad.consignee,
lad.pick_up_plate pickUpPlate,lad.total_cost totalCost
from logpm_distrilbution_bill_lading lad
from logpm_distrilbution_bill_lading lad
<where>
lad.id = #{id}
</where>
</select>
<select id="detailReservationOwn" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingOwnVO">
select ldpi.id,ldpi.order_package_code orderPackageCode,ldpi.firsts ,ldpi.second ,ldpi.third_product thirdProduct,ldpi.material_name materialName,
ldpi.goods_allocation goodsAllocation,ldpi.pallet
select ldpi.id,
ldpi.order_package_code orderPackageCode,
ldpi.firsts,
ldpi.second,
ldpi.third_product thirdProduct,
ldpi.material_name materialName,
ldpi.goods_allocation goodsAllocation,
ldpi.pallet
from logpm_distribution_parcel_list ldpi
where ldpi.stock_article_id in (
select dbs.stock_article_id
@ -160,36 +294,39 @@
</select>
<select id="detailOrderOwn" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingOwnVO">
select ldsa.id,ldsa.order_code orderCode,ldsa.description_goods descriptionGoods,ldsa.total_number totalNumber,
ldbl.stockup_status stockupStatus,ldbl.stockip_allocation stockipAllocation,
( select count(*)
from logpm_distribution_stock lds
where lds.parcel_list_id in (
select ldpi.id
from logpm_distribution_parcel_list ldpi
where ldpi.stock_article_id in (
select dbs.stock_article_id
from logpm_distrilbution_bill_stock dbs
where dbs.bill_lading_id = #{id}
)
)
) esau
ldbl.stockup_status stockupStatus,ldbl.stockip_allocation stockipAllocation,
( select count(*)
from logpm_distribution_stock lds
where lds.parcel_list_id in (
select ldpi.id
from logpm_distribution_parcel_list ldpi
where ldpi.stock_article_id in (
select dbs.stock_article_id
from logpm_distrilbution_bill_stock dbs
where dbs.bill_lading_id = #{id}
)
)
) esau
from logpm_distrilbution_bill_lading ldbl
LEFT JOIN logpm_distrilbution_bill_stock ldbs on ldbl.id = ldbs.bill_lading_id
LEFT JOIN logpm_distribution_stock_article ldsa on ldbs.stock_article_id = ldsa.id
LEFT JOIN logpm_distrilbution_bill_stock ldbs on ldbl.id = ldbs.bill_lading_id
LEFT JOIN logpm_distribution_stock_article ldsa on ldbs.stock_article_id = ldsa.id
<where>
ldbl.id = #{id}
</where>
</select>
<select id="getInventoryOwn" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingOwnVO">
select ldsi.id,ldsi.sku,ldsi.order_code,ldsi.description_goods ,ldsi.cargo_unit ,lddd.quantity ,ldsi.tray_name ,ldsi.storage_location
from logpm_distribution_delivery_details lddd LEFT JOIN logpm_distribution_stock_list ldsi on lddd.stock_list_id = ldsi.id
select ldsi.id,ldsi.sku,ldsi.order_code,ldsi.description_goods ,ldsi.cargo_unit ,lddd.quantity ,ldsi.tray_name
,ldsi.storage_location
from logpm_distribution_delivery_details lddd LEFT JOIN logpm_distribution_stock_list ldsi on lddd.stock_list_id
= ldsi.id
<where>
lddd.bill_lading_id = #{id}
</where>
</select>
<select id="getDetailOne" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingDetailsVO">
select lad.id,lad.pick_up_time ,lad.consignee ,lad.pick_up_plate ,lad.delivery_document ,lad.certificate_type ,lad.total_cost
select lad.id,lad.pick_up_time ,lad.consignee ,lad.pick_up_plate ,lad.delivery_document ,lad.certificate_type
,lad.total_cost
from logpm_distrilbution_bill_lading lad
<where>
lad.id = #{id}
@ -197,87 +334,88 @@
</select>
<select id="getInventory" 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
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
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'
ldbl.id = #{param.id} and lddd.is_deleted = '0'
</where>
</select>
<select id="getBillLadingNum" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingVO">
select DISTINCT (select count(conditions)
from logpm_distrilbution_bill_lading
<where>
conditions IN (10) and is_deleted = '0'
<if test="param.startDate != null">and pick_up_time between #{param.startDate} and #{param.entDate}</if>
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE() </if>
</where>) treatNum,
(select count(conditions)
from logpm_distrilbution_bill_lading
<where>
conditions IN (20) and is_deleted = '0'
conditions IN (10) and is_deleted = '0'
<if test="param.startDate != null">and pick_up_time between #{param.startDate} and #{param.entDate}</if>
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE()</if>
</where>
) treatNum,
(select count(conditions)
from logpm_distrilbution_bill_lading
<where>
conditions IN (20) and is_deleted = '0'
<if test="param.startDate != null">and pick_up_time between #{param.startDate} and #{param.entDate}</if>
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE() </if>
</where> ) stopNum
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE()</if>
</where>
) stopNum
from logpm_distrilbution_bill_lading
<where>
is_deleted = '0'
<if test="param.startDate != null">and pick_up_time between #{param.startDate} and #{param.entDate}</if>
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE() </if>
<if test="param.startDate == null">and DATE(pick_up_time) = CURDATE()</if>
</where>
</select>
<select id="getViewDetailOwn" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingViewVO">
SELECT
ldbl.pickup_batch AS pickupBatch,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.waybill_number)) AS waybillNumber,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.service_number)) AS serviceNumber,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.consignee_unit)) AS consigneeUnit,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.customer_name)) AS customerName,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.customer_telephone)) AS customerTelephone
FROM logpm_distrilbution_bill_lading ldbl
LEFT JOIN logpm_distrilbution_bill_stock ldbs ON ldbl.id = ldbs.bill_lading_id
LEFT JOIN logpm_distribution_stock_article ldsa ON ldbs.stock_article_id = ldsa.id
WHERE ldbl.id = #{id} GROUP BY ldbl.id;
SELECT ldbl.pickup_batch AS pickupBatch,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.waybill_number)) AS waybillNumber,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.service_number)) AS serviceNumber,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.consignee_unit)) AS consigneeUnit,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.customer_name)) AS customerName,
GROUP_CONCAT(DISTINCT ANY_VALUE(ldsa.customer_telephone)) AS customerTelephone
FROM logpm_distrilbution_bill_lading ldbl
LEFT JOIN logpm_distrilbution_bill_stock ldbs ON ldbl.id = ldbs.bill_lading_id
LEFT JOIN logpm_distribution_stock_article ldsa ON ldbs.stock_article_id = ldsa.id
WHERE ldbl.id = #{id}
GROUP BY ldbl.id;
</select>
<select id="selectBillStockList" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingVO">
SELECT
dbl.id,
dsa.service_number serviceNumber,
dsa.waybill_number waybillNumber,
dsa.consignee_unit consigneeUnit,
dsa.customer_name customerName,
dsa.customer_telephone customerTelephone,
dsa.warehouse,
dsa.warehouse_entry_time warehouseEntryTime,
dsa.storage_fee storageFee,
dsa.total_number totalNumber,
dbl.certificate_type certificateType,
dsa.brand,
dsa.type_service typeService,
dbl.pick_up_time pickUpTime,
dbl.consignee,
dbl.delivery_document deliveryDocument,
dbl.conditions,
dbl.notification_status,
dbl.total_cost totalCost,
dbl.pick_up_plate pickUpPlate,
dbl.pickup_batch pickupBatch
FROM
logpm_distrilbution_bill_lading dbl
LEFT JOIN logpm_distribution_stock_article dsa ON dbl.stock_article_id = dsa.id
LEFT JOIN logpm_distribution_stockup_info ldsi on dbl.id = ldsi.reservation_id and ldsi.stock_up_type=#{distrilbutionBillLading.stockupType}
where ldsi.stockup_id=#{distrilbutionBillLading.id};
SELECT dbl.id,
dsa.service_number serviceNumber,
dsa.waybill_number waybillNumber,
dsa.consignee_unit consigneeUnit,
dsa.customer_name customerName,
dsa.customer_telephone customerTelephone,
dsa.warehouse,
dsa.warehouse_entry_time warehouseEntryTime,
dsa.storage_fee storageFee,
dsa.total_number totalNumber,
dbl.certificate_type certificateType,
dsa.brand,
dsa.type_service typeService,
dbl.pick_up_time pickUpTime,
dbl.consignee,
dbl.delivery_document deliveryDocument,
dbl.conditions,
dbl.notification_status,
dbl.total_cost totalCost,
dbl.pick_up_plate pickUpPlate,
dbl.pickup_batch pickupBatch
FROM logpm_distrilbution_bill_lading dbl
LEFT JOIN logpm_distribution_stock_article dsa ON dbl.stock_article_id = dsa.id
LEFT JOIN logpm_distribution_stockup_info ldsi on dbl.id = ldsi.reservation_id and
ldsi.stock_up_type = #{distrilbutionBillLading.stockupType}
where ldsi.stockup_id = #{distrilbutionBillLading.id};
</select>
</mapper>

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

@ -28,6 +28,7 @@ import com.logpm.distribution.vo.app.DistrilbutionAppBillLadingOrderMainVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@ -65,6 +66,8 @@ public interface IDistrilbutionBillLadingService extends BaseService<Distrilbuti
IPage<DistrilbutionBillLadingVO> pageList(IPage<Object> page, Map<String, Object> distrilbutionBillLading);
List<DistrilbutionBillLadingExcel> exportDistributionBillLading(Map<String, Object> distributionBillLading);
/**
* pda列表
* @param page
@ -195,4 +198,5 @@ public interface IDistrilbutionBillLadingService extends BaseService<Distrilbuti
* @return
*/
R zeroBillPack(BillLadingAppDTO billLadingAppDTO);
}

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

@ -17,8 +17,12 @@
package com.logpm.distribution.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@ -34,6 +38,7 @@ import com.logpm.distribution.dto.DistributionStockListDTO;
import com.logpm.distribution.dto.DistrilbutionBillLadingDTO;
import com.logpm.distribution.dto.app.BillLadingAppDTO;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.excel.DistributionStockArticleExcel;
import com.logpm.distribution.excel.DistrilbutionBillLadingExcel;
import com.logpm.distribution.mapper.DistrilbutionBillLadingMapper;
import com.logpm.distribution.service.*;
@ -41,6 +46,8 @@ import com.logpm.distribution.vo.*;
import com.logpm.distribution.vo.app.*;
import com.logpm.distribution.wrapper.DistributionStockArticleWrapper;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.codec.Charsets;
import org.redisson.api.RLock;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.billLading.BillLadingStatusConstant;
@ -55,9 +62,13 @@ import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.constant.stockup.StockupTypeConstant;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.cache.DictBizCache;
@ -65,8 +76,12 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.Serializable;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;
@ -82,6 +97,7 @@ import java.util.stream.Collectors;
*/
@Service
@AllArgsConstructor
@Log4j2
public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<DistrilbutionBillLadingMapper, DistrilbutionBillLadingEntity> implements IDistrilbutionBillLadingService {
private final IDistributionDeliveryChargeService distributionDeliveryChargeService;
@ -113,6 +129,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
private final IDistributionReservationZeroPackageService distributionZeroPackageService; //零担配送记录
private final IDistributionParcelNumberService distributionParcelNumberService; //零担配送数量记录
private final IDistrilbutionBillPackageService distrilbutionBillPackageService;
private final IBasicdataWarehouseClient warehouseClient;
@Override
@ -774,6 +791,36 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
return distrilbutionBillLadingVOIPage;
}
@Override
public List<DistrilbutionBillLadingExcel> exportDistributionBillLading(Map<String, Object> param) {
// 获取当前登录的仓库信息
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(ObjectUtils.isNull(myCurrentWarehouse)){
throw new ServiceException("没有仓库信息!");
}
// 用户勾选数据的ids
String ids = param.get("ids").toString();
List<String> idArr = new ArrayList<>();
if (StringUtils.isNotBlank(ids)){
idArr = Arrays.asList(ids.split(","));
}
param.put("warehouseId", myCurrentWarehouse.getId());
List<DistrilbutionBillLadingVO> list = baseMapper.exportDistributionBillLading(param, idArr);
List<DistrilbutionBillLadingExcel> listExcel = new ArrayList<>();
list.forEach(s -> {
DistrilbutionBillLadingExcel excel = new DistrilbutionBillLadingExcel();
BasicdataWarehouseEntity entityWarehouse = warehouseClient.getEntityWarehouseId(s.getWarehouseId());
BeanUtil.copyProperties(s,excel);
String value = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, s.getTypeService());
// excel.setTypeService(value);
listExcel.add(excel);
});
return listExcel;
}
/**
* 添加提货图片
@ -1934,6 +1981,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
return Resp.scanSuccess("签收成功!","签收成功!");
}
/**
* 修改订单状态
* @return

77
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java

@ -26,6 +26,7 @@ import com.logpm.warehouse.dto.WarehouseWarehousingEntryDTO;
import com.logpm.warehouse.entity.WarehouseWarehouseEntity;
import com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity;
import com.logpm.warehouse.excel.WarehouseEntryImporter;
import com.logpm.warehouse.excel.WarehouseWarehousingEntryExcel;
import com.logpm.warehouse.excel.WarehousingEntryDetailExcel;
import com.logpm.warehouse.service.IWarehouseWarehousingEntryService;
import com.logpm.warehouse.vo.WarehouseWarehousingEntryVO;
@ -107,6 +108,18 @@ public class WarehouseWarehousingEntryController extends BladeController {
return R.data(pages);
}
/**
* 导出数据
*/
@GetMapping("/export-warehouseWarehousingEntry")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出提货数据", notes = "传入-paramMap")
public void exportWarehouseWarehousingEntry(@ApiIgnore @RequestParam Map<String, Object> paramMap, HttpServletResponse response) {
List<WarehouseWarehousingEntryExcel> list = warehouseWarehousingEntryService.exportWarehouseWarehousing(paramMap);
ExcelUtil.export(response, "入库数据" + DateUtil.time(), "入库数据表", list, WarehouseWarehousingEntryExcel.class);
}
/**
* 仓库入库单 自定义分页
*/
@ -177,37 +190,37 @@ public class WarehouseWarehousingEntryController extends BladeController {
/**
* 导出数据
*/
@GetMapping("/export-warehouseWarehousingEntry")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入warehouseWarehousingEntry")
public void exportWarehouseWarehousingEntry(@ApiIgnore @RequestParam Map<String, Object> warehouseWarehousingEntry, BladeUser bladeUser, HttpServletResponse response) {
List<WarehousingEntryDetailExcel> list = new ArrayList<>();
WarehousingEntryDetailExcel warehousingEntryDetailExcel = new WarehousingEntryDetailExcel();
warehousingEntryDetailExcel.setReceiptBatch("2022031402350 选添");
warehousingEntryDetailExcel.setReceiptDate(new Date());
warehousingEntryDetailExcel.setCustomerCode("NCOP00011");
warehousingEntryDetailExcel.setCustomerName("南充欧派衣橱");
warehousingEntryDetailExcel.setStoreName("门店 选填");
warehousingEntryDetailExcel.setOrderNumber("OPLYC南充市220200015YA5-5 选填");
warehousingEntryDetailExcel.setBrandName("欧派");
warehousingEntryDetailExcel.setWarehouse("南充仓");
warehousingEntryDetailExcel.setWarehouseCode("NC");
warehousingEntryDetailExcel.setTrainNumber("SF098876456 选添");
warehousingEntryDetailExcel.setLicensePlate("川S5346347 选添");
warehousingEntryDetailExcel.setServiceType("自提 商配 市配 选择其一");
warehousingEntryDetailExcel.setSku("G21191547");
warehousingEntryDetailExcel.setProductName("OP-CD309-1.8慕思如梦时光床垫/1800*2000*260");
warehousingEntryDetailExcel.setProductCode("G21191547");
warehousingEntryDetailExcel.setProductUnit("张");
warehousingEntryDetailExcel.setLogisticsCompany("物流公司 选填");
warehousingEntryDetailExcel.setPackagingNumber("1");
warehousingEntryDetailExcel.setPackagingSpecifications("1");
warehousingEntryDetailExcel.setCreateInventory(100);
warehousingEntryDetailExcel.setPositions("存放位置 选填");
warehousingEntryDetailExcel.setRemark("备注 选填");
list.add(warehousingEntryDetailExcel);
ExcelUtil.export(response, "仓库入库单数据" + DateUtil.time(), "仓库入库单数据表", list, WarehousingEntryDetailExcel.class);
}
// @GetMapping("/export-warehouseWarehousingEntry")
// @ApiOperationSupport(order = 9)
// @ApiOperation(value = "导出数据", notes = "传入warehouseWarehousingEntry")
// public void exportWarehouseWarehousingEntry(@ApiIgnore @RequestParam Map<String, Object> warehouseWarehousingEntry, BladeUser bladeUser, HttpServletResponse response) {
//
// List<WarehousingEntryDetailExcel> list = new ArrayList<>();
// WarehousingEntryDetailExcel warehousingEntryDetailExcel = new WarehousingEntryDetailExcel();
// warehousingEntryDetailExcel.setReceiptBatch("2022031402350 选添");
// warehousingEntryDetailExcel.setReceiptDate(new Date());
// warehousingEntryDetailExcel.setCustomerCode("NCOP00011");
// warehousingEntryDetailExcel.setCustomerName("南充欧派衣橱");
// warehousingEntryDetailExcel.setStoreName("门店 选填");
// warehousingEntryDetailExcel.setOrderNumber("OPLYC南充市220200015YA5-5 选填");
// warehousingEntryDetailExcel.setBrandName("欧派");
// warehousingEntryDetailExcel.setWarehouse("南充仓");
// warehousingEntryDetailExcel.setWarehouseCode("NC");
// warehousingEntryDetailExcel.setTrainNumber("SF098876456 选添");
// warehousingEntryDetailExcel.setLicensePlate("川S5346347 选添");
// warehousingEntryDetailExcel.setServiceType("自提 商配 市配 选择其一");
// warehousingEntryDetailExcel.setSku("G21191547");
// warehousingEntryDetailExcel.setProductName("OP-CD309-1.8慕思如梦时光床垫/1800*2000*260");
// warehousingEntryDetailExcel.setProductCode("G21191547");
// warehousingEntryDetailExcel.setProductUnit("张");
// warehousingEntryDetailExcel.setLogisticsCompany("物流公司 选填");
// warehousingEntryDetailExcel.setPackagingNumber("1");
// warehousingEntryDetailExcel.setPackagingSpecifications("1");
// warehousingEntryDetailExcel.setCreateInventory(100);
// warehousingEntryDetailExcel.setPositions("存放位置 选填");
// warehousingEntryDetailExcel.setRemark("备注 选填");
// list.add(warehousingEntryDetailExcel);
// ExcelUtil.export(response, "仓库入库单数据" + DateUtil.time(), "仓库入库单数据表", list, WarehousingEntryDetailExcel.class);
// }
}

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

@ -25,6 +25,7 @@ import com.logpm.warehouse.vo.WarehouseWarehousingEntryVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 仓库入库单 Mapper 接口
@ -52,4 +53,5 @@ public interface WarehouseWarehousingEntryMapper extends BaseMapper<WarehouseWar
*/
List<WarehousingEntryDetailExcel> exportWarehouseWarehousingEntry(@Param("ew") Wrapper<WarehouseWarehousingEntryEntity> queryWrapper);
List<WarehouseWarehousingEntryEntity> exportWarehouseWarehousing(@Param("paramMap") Map<String, Object> paramMap, @Param("idArr") List<String> idArr);
}

61
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWarehousingEntryMapper.xml

@ -3,7 +3,8 @@
<mapper namespace="com.logpm.warehouse.mapper.WarehouseWarehousingEntryMapper">
<!-- 通用查询映射结果 -->
<resultMap id="warehouseWarehousingEntryResultMap" type="com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity">
<resultMap id="warehouseWarehousingEntryResultMap"
type="com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity">
<result column="tenant_id" property="tenantId"/>
<result column="id" property="id"/>
<result column="create_user" property="createUser"/>
@ -29,18 +30,70 @@
<result column="license_plate" property="licensePlate"/>
<result column="service_type" property="serviceType"/>
<result column="source" property="source"/>
<!-- <result column="condition" property="condition"/>-->
<!-- <result column="condition" property="condition"/>-->
<result column="total_input" property="totalInput"/>
</resultMap>
<select id="selectWarehouseWarehousingEntryPage" resultMap="warehouseWarehousingEntryResultMap">
select * from logpm_warehouse_warehousing_entry where is_deleted = 0
select *
from logpm_warehouse_warehousing_entry
where is_deleted = 0
</select>
<select id="exportWarehouseWarehousingEntry" resultType="com.logpm.warehouse.excel.WarehousingEntryDetailExcel">
SELECT * FROM logpm_warehouse_warehousing_entry ${ew.customSqlSegment} limit 1
SELECT *
FROM logpm_warehouse_warehousing_entry ${ew.customSqlSegment}
limit 1
</select>
<select id="exportWarehouseWarehousing"
resultType="com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity">
select id,
receipt_batch,
receipt_date,
customer_name,
store_name,
warehouse,
order_number,
train_number,
license_plate,
service_type,
status
from logpm_platform.logpm_warehouse_warehousing_entry lwwe
<where>
<if test="paramMap.orderNumber !=null and paramMap.orderNumber != ''">
and lwwe.order_number = #{paramMap.orderNumber}
</if>
<if test="paramMap.orderNumber !=null and paramMap.orderNumber != ''">
and lwwe.receipt_batch = #{paramMap.receiptBatch}
</if>
<if test="paramMap.receiptDate !=null and paramMap.receiptDate != ''">
and lwwe.receipt_date = #{paramMap.receiptDate}
</if>
<if test="paramMap.storeName !=null and paramMap.storeName != ''">
and lwwe.store_name = #{paramMap.storeName}
</if>
<if test="paramMap.trainNumber !=null and paramMap.trainNumber != ''">
and lwwe.train_number = #{paramMap.trainNumber}
</if>
<if test="paramMap.conditions !=null and paramMap.conditions != ''">
and lwwe.conditions = #{paramMap.conditions}
</if>
<if test="paramMap.warehouse !=null and paramMap.warehouse != ''">
and lwwe.warehouse = #{paramMap.warehouse}
</if>
<if test="paramMap.customerName !=null and paramMap.customerName != ''">
and lwwe.customer_name = #{paramMap.customerName}
</if>
<if test="idArr != null">
and lwwe.id in
<foreach collection="idArr" open="(" close=")" item="item" separator=",">
#{item}
</foreach>
</if>
and lwwe.is_deleted = 0
</where>
</select>
</mapper>

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWarehousingEntryService.java

@ -22,11 +22,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.warehouse.dto.WarehouseWarehousingEntryDTO;
import com.logpm.warehouse.entity.WarehouseWarehouseEntity;
import com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity;
import com.logpm.warehouse.excel.WarehouseWarehousingEntryExcel;
import com.logpm.warehouse.excel.WarehousingEntryDetailExcel;
import com.logpm.warehouse.vo.WarehouseWarehousingEntryVO;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
import java.util.Map;
/**
* 仓库入库单 服务类
@ -68,4 +70,6 @@ public interface IWarehouseWarehousingEntryService extends BaseService<Warehouse
WarehouseWarehousingEntryVO getOneOwn(WarehouseWarehousingEntryEntity warehouseWarehousingEntry);
void importUser(List<WarehousingEntryDetailExcel> data, Boolean isCovered);
List<WarehouseWarehousingEntryExcel> exportWarehouseWarehousing(Map<String, Object> paramMap);
}

30
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

@ -41,6 +41,7 @@ import com.logpm.warehouse.dto.WarehouseWarehousingEntryDTO;
import com.logpm.warehouse.entity.WarehouseWarehouseEntity;
import com.logpm.warehouse.entity.WarehouseWarehousingDetailEntity;
import com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity;
import com.logpm.warehouse.excel.WarehouseWarehousingEntryExcel;
import com.logpm.warehouse.excel.WarehousingEntryDetailExcel;
import com.logpm.warehouse.mapper.WarehouseWarehousingEntryMapper;
import com.logpm.warehouse.service.IWarehouseWarehousingDetailService;
@ -83,6 +84,8 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
private final IBasicdataWarehouseClient basicdataWarehouseClient;
private final IBasicdataStoreBrandClient basicdataStoreBrandClient;
private final IBasicdataWarehouseClient warehouseClient;
@ -505,4 +508,31 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
});
}
@Override
public List<WarehouseWarehousingEntryExcel> exportWarehouseWarehousing(Map<String, Object> paramMap) {
// 获取当前登录的仓库信息
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(ObjectUtils.isNull(myCurrentWarehouse)){
throw new ServiceException("没有仓库信息!");
}
// 用户勾选数据的ids
String ids = paramMap.get("ids").toString();
List<String> idArr = new ArrayList<>();
if (StringUtils.isNotBlank(ids)){
idArr = Arrays.asList(ids.split(","));
}
paramMap.put("warehouseId", myCurrentWarehouse.getId());
List<WarehouseWarehousingEntryEntity> list = baseMapper.exportWarehouseWarehousing(paramMap, idArr);
List<WarehouseWarehousingEntryExcel> listExcel = new ArrayList<>();
list.forEach(s->{
WarehouseWarehousingEntryExcel excel = new WarehouseWarehousingEntryExcel();
BeanUtil.copyProperties(s,excel);
listExcel.add(excel);
});
return listExcel;
}
}

Loading…
Cancel
Save