Browse Source

aaa

dist.1.3.0
汤建军 11 months ago
parent
commit
65cfb4e892
  1. 12
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAbnormalPackageEntity.java
  2. 8
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java
  3. 6
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  4. 9
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  5. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  6. 278
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

12
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAbnormalPackageEntity.java

@ -127,6 +127,18 @@ public class AftersalesAbnormalPackageEntity extends TenantEntity {
*/
@ApiModelProperty(value = "物料编码(库存品)")
private String cargoNumber;
/**
* 一级品
*/
@ApiModelProperty(value = "一级品")
private String first;
/**
* 二级品
*/
@ApiModelProperty(value = "二级品")
private String secondary;
/**
* 入库批次号库存品)
*/

8
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java

@ -80,10 +80,10 @@ public class DistributionParcelListVO extends DistributionParcelListEntity {
*/
private String trayMsg;
/**
* 装车操作人
*/
private String scanUser;
// /**
// * 装车操作人
// */
// private String scanUser;
/**
* 装车操作人

6
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java

@ -654,9 +654,9 @@ public class AftersalesWorkOrderController extends BladeController {
if(ObjectUtils.isNull( aftersalesWorkOrder.getOrderCode()) ){
throw new ServiceException("订单自编号未填!");
}
if(ObjectUtils.isNull( aftersalesWorkOrder.getFirst()) ){
throw new ServiceException("一级品类未填!");
}
// if(ObjectUtils.isNull( aftersalesWorkOrder.getFirst()) ){
// throw new ServiceException("一级品类未填!");
// }
// if(ObjectUtils.isNull( aftersalesWorkOrder.getSecondary()) ){
// throw new ServiceException("二级品类未填!");
// }

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

@ -53,6 +53,7 @@ import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.DictBiz;
import org.springblade.system.entity.User;
@ -323,6 +324,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}
@Override
@Transactional
public boolean extractedSaveAndUpdate(AftersalesWorkOrderDTO aftersalesWorkOrder, BladeUser user, BasicdataWarehouseEntity myCurrentWarehouse) {
if (ObjectUtils.isNull(aftersalesWorkOrder.getId())) {
//新增
@ -417,6 +419,13 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}
//添加包件信息
if (ObjectUtils.isNotNull(aftersalesWorkOrder.getPackageEntityList())) {
List<AftersalesAbnormalPackageEntity> packageEntityList = aftersalesWorkOrder.getPackageEntityList();
if (!packageEntityList.isEmpty()){
List<String> collect = packageEntityList.stream().filter(f -> Objects.isNull(f.getFirst())).map(AftersalesAbnormalPackageEntity::getPackageCode).collect(Collectors.toList());
if (!collect.isEmpty()){
throw new RuntimeException(collect.stream().collect(Collectors.joining(","))+"无一级品信息");
}
}
//包件信息
List<AftersalesAbnormalPackageEntity> list = new ArrayList<>();
aftersalesWorkOrder.getPackageEntityList().forEach(i -> {

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

@ -108,7 +108,7 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
List<DistributionParcelListEntity> getParcelListInfo(@Param("param")DistributionParcelListVO parcelListVO);
List<DistributionParcelListExcel> exportDistributionParcelList(@Param("paramMap")Map<String, Object> paramMap, @Param("idArr") List<String> idArr);
List<DistributionParcelListExcel> exportDistributionParcelList(@Param("param")Map<String, Object> paramMap, @Param("idArr") List<String> idArr);
void freezeByOrderCode(@Param("orderCode") String orderCode,@Param("freezeStatus") String freezeStatus);

278
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -299,13 +299,6 @@
<if test="param.startWarehouseEntryTimeEnd != null and param.startWarehouseEntryTimeEnd !='' and param.lastWarehouseEntryTimeEnd !=''and param.lastWarehouseEntryTimeEnd != null">
and ldpl.warehouse_entry_time_end BETWEEN #{param.startWarehouseEntryTimeEnd} AND #{param.lastWarehouseEntryTimeEnd}
</if>
<!-- <if test="param.startLoadingTime != null and param.lastLoadingTime != null and param.startLoadingTime != '' and param.lastLoadingTime != ''">-->
<!-- AND ldl.scan_time BETWEEN #{param.startLoadingTime} AND #{param.lastLoadingTime}-->
<!-- </if>-->
<!-- <if test="param.startSigningTime != null and param.lastSigningTime != null and param.startSigningTime != '' and param.lastSigningTime != ''">-->
<!-- AND ldl.signing_time BETWEEN #{param.startSigningTime} AND #{param.lastSigningTime}-->
<!-- </if>-->
</where>
</select>
@ -893,55 +886,244 @@
<select id="exportDistributionParcelList"
resultType="com.logpm.distribution.excel.DistributionParcelListExcel">
SELECT
ldpl.warehouse_id warehouseId,
ldpl.id id,
lww.name warehouse,
ldpl.conditions conditions,
ldpl.order_package_code orderPackageCode,
ldpl.firsts firsts,
ldpl.second second,
ldpl.third_product thirdProduct,
ldpl.quantity quantity,
ldpl.train_number trainNumber,
ldpl.stock_article_id stockArticleId,
ldpl.order_code orderCode,
ldpl.service_number serviceNumber,
ldpl.material_id materialId,
ldpl.material_name materialName,
ldpl.brand_name brandName,
ldpl.order_package_freeze_status orderPackageFreezeStatus,
ldpl.order_package_grounding_status orderPackageGroundingStatus,
ldpl.order_package_stockup_status orderPackageStockupStatus,
ldpl.order_package_reservation_status orderPackageReservationStatus,
ldpl.order_package_loading_status orderPackageLoadingStatus,
ldpl.waybill_number waybillNumber,
ldpl.warehouse_entry_time_end warehouseEntryTimeEnd,
ldpl.waybill_number waybillNumber,
lwug.position_code goodsAllocation,
lwtg.tray_code pallet
ldpl.warehouse_id warehouseId,
ldpl.id id,
lww.name warehouse,
ldpl.conditions conditions,
ldpl.order_package_code orderPackageCode,
ldpl.firsts firsts,
ldpl.second second,
ldpl.third_product thirdProduct,
ldpl.quantity quantity,
ldpl.train_number trainNumber,
ldpl.stock_article_id stockArticleId,
ldpl.order_code orderCode,
ldpl.service_number serviceNumber,
ldpl.material_id materialId,
ldpl.material_name materialName,
ldpl.material_code materialCode,
ldpl.brand_name brandName,
ldpl.order_package_status orderPackageStatus,
ldpl.order_package_freeze_status orderPackageFreezeStatus,
ldpl.order_package_grounding_status orderPackageGroundingStatus,
ldpl.order_package_stockup_status orderPackageStockupStatus,
ldpl.order_package_reservation_status orderPackageReservationStatus,
ldpl.order_package_loading_status orderPackageLoadingStatus,
ldpl.warehouse_entry_time_end warehouseEntryTimeEnd,
ldpl.waybill_number waybillNumber,
ldsa.type_service typeService,
ldpl.order_code,
IF(c.reservation_code is not null,c.reservation_code,IF(b.pickup_batch is not null,b.pickup_batch,a.reservation_code)) AS reservationCode,
IF(c.driver_name is not null,c.driver_name,IF(b.consignee is not null,b.consignee,a.driver_name)) AS driverName,
IF(c.vehicle_name is not null,c.vehicle_name,IF(b.pick_up_plate is not null,b.pick_up_plate,a.vehicle_name)) AS vehicleName,
IF(c.train_number is not null,c.train_number,IF(b.train_number is not null,b.train_number,a.train_number)) AS dvehicleName,
IF(c.scan_user is not null,c.scan_user,IF(b.scan_user is not null,b.scan_user,a.scan_user)) AS scanUser,
IF(c.signing_user is not null,c.signing_user,IF(b.signing_user is not null,b.signing_user,a.signing_user)) AS signingUser,
IF(c.scan_time is not null,c.scan_time,IF(b.scan_time is not null,b.scan_time,a.scan_time)) AS loadingTime,
IF(c.signing_time is not null,c.signing_time,IF(b.signing_time is not null,b.signing_time,a.signing_time)) AS signingTime,
m.qr_code AS goodsAllocation,
n.pallet_name AS pallet
FROM
logpm_distribution_parcel_list AS ldpl
LEFT JOIN logpm_warehouse_updown_goods lwug ON ldpl.id = lwug.association_id
LEFT JOIN logpm_warehouse_tray_goods lwtg ON ldpl.id = lwtg.association_id
LEFT join logpm_distribution_stock_article ldsa on ldsa.id = ldpl.stock_article_id
LEFT join logpm_warehouse_warehouse lww on lww.id = ldpl.warehouse_id
LEFT JOIN (SELECT lwug.association_id,lwga.qr_code,lwug.is_deleted FROM logpm_warehouse_updown_goods AS lwug LEFT JOIN logpm_warehouse_goods_allocation AS lwga ON lwug.allocation_id = lwga.id ) AS m ON m.association_id = ldpl.id
LEFT JOIN (SELECT lwtg.association_id,lwt.pallet_name,lwtg.is_deleted FROM logpm_warehouse_tray_goods AS lwtg LEFT JOIN logpm_warehouse_tray AS lwt ON lwtg.tray_id = lwt.id) AS n ON n.association_id = ldpl.id
LEFT JOIN
(SELECT
ldrp.parce_list_id,
ldl.scan_time,
lddl.train_number,
lddl.driver_name,
lddl.vehicle_name,
ldl.signing_time,
ldl.scan_user,
ldl.signing_user,
ldr.reservation_code
FROM logpm_distribution_reservation_package ldrp
LEFT JOIN logpm_distribution_loadscan ldl on ldl.package_id = ldrp.parce_list_id and ldl.scan_status !=1 AND ldl.is_deleted = 0
LEFT JOIN logpm_distribution_reservation ldr on ldr.id = ldrp.reservation_id
LEFT JOIN logpm_distribution_signfor AS lds ON lds.reservation_id = ldr.id
LEFT JOIN logpm_distribution_delivery_list lddl on lds.delivery_id =lddl.id
<where>
ldrp.packet_bar_status != '2'
<if test="param.reservationCode !='' and param.reservationCode != null">
and ldr.reservation_code like concat(#{param.reservationCode},'%')
</if>
<if test="param.scanTime !='' and param.scanTime != null">
and date_format(from_unixtime(ldl.scan_time),'%Y-%m-%d') = date_format(#{param.scanTime}),'%Y-%m-%d')
</if>
<if test="param.signingTime !='' and param.signingTime != null">
and date_format(from_unixtime(ldl.signing_time),'%Y-%m-%d') = date_format(#{param.signingTime}),'%Y-%m-%d')
</if>
<if test="param.dvehicleName !='' and param.dvehicleName != null">
and lddl.train_number = #{param.dvehicleName}
</if>
<if test="param.vehicleName !='' and param.vehicleName != null">
and lddl.vehicle_name like concat('%',#{param.vehicleName},'%')
</if>
<if test="param.vehicleName !='' and param.vehicleName != null">
and lddl.vehicle_name like concat('%',#{param.vehicleName},'%')
</if>
<if test="param.driverName !='' and param.driverName != null">
and lddl.driver_name like concat('%',#{param.driverName},'%')
</if>
<if test="param.scanUser !='' and param.scanUser != null">
and ldl.scan_user like concat('%',#{param.scanUser},'%')
</if>
<if test="param.signingUser !='' and param.signingUser != null">
and ldl.signing_user like concat('%',#{param.signingUser},'%')
</if>
</where>
) AS a ON a.parce_list_id = ldpl.id
LEFT JOIN (
SELECT
ldbp.parce_list_id,
ldbl.pickup_batch,
ldbl.pickup_batch AS train_number,
ldbl.pick_up_plate AS pick_up_plate,
ldbl.consignee AS consignee,
ldbls.create_time AS scan_time,
ldbls.create_time AS signing_time,
ldbls.scan_user AS scan_user,
ldbls.scan_user AS signing_user
FROM
logpm_platform.logpm_distribution_parcel_list ldpl
LEFT JOIN logpm_platform.logpm_warehouse_updown_goods lwug ON ldpl.id = lwug.association_id
LEFT JOIN logpm_platform.logpm_warehouse_tray_goods lwtg ON ldpl.id = lwtg.association_id
Left join logpm_platform.logpm_warehouse_warehouse lww on lww.id = ldpl.warehouse_id
logpm_distrilbution_bill_package AS ldbp
LEFT JOIN logpm_distrilbution_bill_lading ldbl ON ldbl.id = ldbp.bill_lading_id
LEFT JOIN logpm_distribution_bill_lading_scan ldbls ON ldbls.parcel_list_id = ldbp.parce_list_id
<where>
ldbp.packet_bar_status != '2'
<if test="param.reservationCode !='' and param.reservationCode != null">
and ldbl.pickup_batch like concat(#{param.reservationCode},'%')
</if>
<if test="param.scanTime !='' and param.scanTime != null">
and date_format(from_unixtime(ldl.created_time),'%Y-%m-%d') = date_format(#{param.scanTime}),'%Y-%m-%d')
</if>
<if test="param.signingTime !='' and param.signingTime != null">
and date_format(from_unixtime(ldl.created_time),'%Y-%m-%d') = date_format(#{param.signingTime}),'%Y-%m-%d')
</if>
<if test="param.dvehicleName !='' and param.dvehicleName != null">
and ldbl.pickup_batch = #{param.dvehicleName}
</if>
<if test="param.vehicleName !='' and param.vehicleName != null">
and ldbl.pick_up_plate like concat('%',#{param.vehicleName},'%')
</if>
<if test="param.driverName !='' and param.driverName != null">
and lddl.consignee like concat('%',#{param.driverName},'%')
</if>
<if test="param.scanUser !='' and param.scanUser != null">
and ldbls.scan_user like concat('%',#{param.scanUser},'%')
</if>
<if test="param.signingUser !='' and param.signingUser != null">
and ldbls.scan_user like concat('%',#{param.signingUser},'%')
</if>
</where>
) AS b ON b.parce_list_id = ldpl.id
LEFT JOIN (
SELECT
ldrzp.parcel_list_id,
IF(lddl.train_number is not null,lddl.train_number,ldbl.pickup_batch) AS train_number,
IF(lddl.driver_name is not null,lddl.driver_name,ldbl.consignee) AS driver_name,
IF(lddl.vehicle_name is not null,lddl.vehicle_name,ldbl.pick_up_plate) AS vehicle_name,
IF(ldl.signing_time is not null,ldl.signing_time,ldbls.create_time) AS signing_time,
IF(ldl.scan_time is not null,ldl.scan_time,ldbls.create_time) AS scan_time,
IF(ldl.scan_user is not null,ldl.scan_user,ldbls.scan_user) AS scan_user,
IF(ldl.signing_user is not null,ldl.signing_user,ldbls.scan_user) AS signing_user,
IF(ldr.reservation_code is not null,ldr.reservation_code,ldbl.pickup_batch) AS reservation_code
FROM logpm_distribution_reservation_zero_package ldrzp
LEFT JOIN logpm_distribution_loadscan ldl on ldl.package_id = ldrzp.parcel_list_id and ldl.scan_status !=1 AND ldl.is_deleted = 0
LEFT JOIN logpm_distribution_reservation ldr on ldr.id = ldrzp.reservation_id
LEFT JOIN logpm_distribution_signfor AS lds ON lds.reservation_id = ldr.id
LEFT JOIN logpm_distribution_delivery_list lddl on lds.delivery_id =lddl.id
LEFT JOIN logpm_distrilbution_bill_lading ldbl ON ldrzp.reservation_id = ldbl.id
LEFT JOIN logpm_distribution_bill_lading_scan ldbls ON ldbls.parcel_list_id = ldrzp.parcel_list_id
) AS c ON c.parcel_list_id = ldpl.id
<where>
ldpl.is_deleted = 0
<if test="paramMap.warehouseId != null and paramMap.warehouseId != ''">
and ldpl.warehouse_id = #{paramMap.warehouseId}
<if test="param.warehouse !='' and param.warehouse != null">
and lww.name like concat('%',#{param.warehouse},'%')
</if>
<if test="param.pallet !='' and param.pallet != null">
and n.pallet_name like concat('%',#{param.warehouse},'%')
</if>
<if test="param.goodsAllocation !='' and param.goodsAllocation != null">
and m.qr_code like concat('%',#{param.warehouse},'%')
</if>
<if test="param.orderPackageGroundingStatus !='' and param.orderPackageGroundingStatus != null">
and ldpl.order_package_grounding_status = #{param.orderPackageGroundingStatus}
</if>
<if test="paramMap.warehouseIds != null ">
and ldpl.warehouse_id IN
<foreach collection="paramMap.warehouseIds" item="wItem" index="index" open="(" close=")" separator=",">
#{wItem}
<if test="param.warehouseIdList != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(param.warehouseIdList)">
and ldpl.warehouse_id in
<foreach collection="param.warehouseIdList" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="paramMap.tenantId != null and paramMap.tenantId != ''">
and ldpl.tenant_id = #{paramMap.tenantId}
<if test="param.orderPackageCode !='' and param.orderPackageCode != null">
and ldpl.order_package_code like concat(#{param.orderPackageCode},'%')
</if>
<if test="paramMap.serviceNumber != null and paramMap.serviceNumber != ''">
and ldpl.service_Number = #{paramMap.serviceNumber}
<if test="param.firsts !='' and param.firsts != null">
and ldpl.firsts = #{param.firsts}
</if>
<if test="param.second !='' and param.second != null">
and ldpl.second = #{param.second}
</if>
<if test="param.thirdProduct !='' and param.thirdProduct != null">
and ldpl.third_product = #{param.thirdProduct}
</if>
<if test="param.quantity !='' and param.quantity != null">
and ldpl.quantity = #{param.quantity}
</if>
<if test="param.trainNumber !='' and param.trainNumber != null">
and ldpl.train_number = #{param.trainNumber}
</if>
<if test="param.stockArticleId !='' and param.stockArticleId != null">
and ldpl.stock_article_id like concat('%',#{param.stockArticleId},'%')
</if>
<if test="param.orderCode !='' and param.orderCode != null">
and ldpl.order_code like concat(#{param.orderCode},'%')
</if>
<if test="param.serviceNumber !='' and param.serviceNumber != null">
and ldpl.service_number like concat('%',#{param.serviceNumber},'%')
</if>
<if test="param.materialName !='' and param.materialName != null">
and ldpl.material_name like concat('%',#{param.materialName},'%')
</if>
<if test="param.materialCode !='' and param.materialCode != null">
and ldpl.material_code =#{param.materialCode}
</if>
<if test="param.brandName !='' and param.brandName != null">
and ldpl.brand_name like concat('%',#{param.brandName},'%')
</if>
<if test="param.orderPackageFreezeStatus !='' and param.orderPackageFreezeStatus != null">
and ldpl.order_package_freeze_status = #{param.orderPackageFreezeStatus}
</if>
<if test="param.orderPackageLoadingStatus !='' and param.orderPackageLoadingStatus != null">
and ldpl.order_package_loading_status = #{param.orderPackageLoadingStatus}
</if>
<if test="param.orderPackageReservationStatus !='' and param.orderPackageReservationStatus != null">
and ldpl.order_package_reservation_status = #{param.orderPackageReservationStatus}
</if>
<if test="param.pallet !='' and param.pallet != null">
and lwtg.tray_code = #{param.pallet}
</if>
<if test="param.goodsAllocation !='' and param.goodsAllocation != null">
and lwug.position_code = #{param.goodsAllocation}
</if>
<if test="param.conditions !='' and param.conditions != null">
and ldpl.conditions = #{param.conditions}
</if>
<if test="param.orderPackageStatus !='' and param.orderPackageStatus != null">
and ldpl.order_package_status = #{param.orderPackageStatus}
</if>
<if test="param.waybillNumber != '' and param.waybillNumber != null ">
and ldpl.waybill_number = #{param.waybillNumber}
</if>
<if test="param.startWarehouseEntryTimeEnd != null and param.startWarehouseEntryTimeEnd !='' and param.lastWarehouseEntryTimeEnd !=''and param.lastWarehouseEntryTimeEnd != null">
and ldpl.warehouse_entry_time_end BETWEEN #{param.startWarehouseEntryTimeEnd} AND #{param.lastWarehouseEntryTimeEnd}
</if>
<if test="idArr != null and idArr != ''">
<if test="idArr != null ">
and ldpl.id in
<foreach collection="idArr" item="item" open="(" close=")" separator=",">
#{item}

Loading…
Cancel
Save