Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dist.1.3.0
zhaoqiaobo 11 months ago
parent
commit
5af4931503
  1. 30
      blade-biz-common/src/main/java/org/springblade/common/utils/StringSplitUtil.java
  2. 26
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryListDTO.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
  4. 351
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  5. 53
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  6. 32
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java
  7. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java
  8. 18
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml
  9. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java
  10. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java
  11. 186
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  12. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java

30
blade-biz-common/src/main/java/org/springblade/common/utils/StringSplitUtil.java

@ -0,0 +1,30 @@
package org.springblade.common.utils;
import org.apache.logging.log4j.util.Strings;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
public class StringSplitUtil {
public static List<String> StringSplitToList(String string) {
List<String> strs = null;
if (!Objects.isNull(string)) {
String str = string;
if (Strings.isNotBlank(str)) {
if (str.indexOf(",") > 0) {
//存在中文逗号
str = str.replaceAll(",", ",");
}
strs = Arrays.stream(str.split(",")).collect(Collectors.toList());
}
}
return strs;
}
}

26
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryListDTO.java

@ -88,6 +88,19 @@ public class DistributionDeliveryListDTO extends DistributionDeliveryListEntity
@ApiModelProperty(value = "主司机信息")
private String masterDriverName;
/**
* 车次号多个
*/
@ApiModelProperty(value = "车次号多个")
private String trainNumbers;
/**
* 车次号多个
*/
@ApiModelProperty(value = "车次号多个")
private List<String> trainNumberList;
/**
* 主车辆信息
*/
@ -99,6 +112,19 @@ public class DistributionDeliveryListDTO extends DistributionDeliveryListEntity
@ApiModelProperty(value = "备注")
private String remarks;
/**
* 时间区间起始
*/
@ApiModelProperty(value = "备注")
private String taskTimeStart;
/**
* 时间区间结束
*/
@ApiModelProperty(value = "备注")
private String taskTimeEnd;
/**
* 是否修改司机
*/

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

@ -60,7 +60,7 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
* @param map
* @return
*/
List<DistributionDeliveryListVO> exportDistributionDeliveryList(@Param("params") Map<String,Object> map);
List<DistributionDeliveryListExcel> exportDistributionDeliveryList(@Param("param") Map<String,Object> map);
/**
* 商配车次
*

351
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -192,14 +192,14 @@
) inventoryNub,
(
SELECT
COALESCE (sum(lds.loaded_number), 0)
COALESCE (sum(lds.loaded_number), 0) + COALESCE (sum(lds.loadedin_number), 0)
FROM
logpm_distribution_signfor lds
WHERE
lddl.id = lds.delivery_id
) scannedNumber,
(SELECT
COALESCE (sum(lds.received_quantity), 0)
COALESCE (sum(lds.received_quantity), 0) + COALESCE (sum(lds.receivedin_quantity), 0)
FROM
logpm_distribution_signfor lds
WHERE
@ -219,6 +219,12 @@
<if test="param.trainNumber != null and param.trainNumber!=''">
and lddl.train_number like concat('%',#{param.trainNumber},'%')
</if>
<if test="param.trainNumberList != null ">
and lddl.train_number IN
<foreach collection="param.trainNumberList" item="train" open="(" close=")" separator=",">
#{train}
</foreach>
</if>
<if test="param.warehouseIdList != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(param.warehouseIdList)">
and lddl.warehouse_id in
<foreach collection="param.warehouseIdList" item="item" open="(" close=")" separator=",">
@ -270,6 +276,9 @@
<if test="param.taskTime!=null and param.taskTime!=''">
and date_format(lddl.task_time,'%y%m%d%') = date_format(#{param.taskTime},'%y%m%d%')
</if>
<if test="param.taskTimeStart!=null and param.taskTimeStart!=''">
and date_format(lddl.task_time,'%y%m%d%') BETWEEN #{param.taskTimeStart} AND #{param.taskTimeEnd}
</if>
</where>
GROUP BY lddl.id ,
lddl.train_number ,
@ -307,119 +316,263 @@
</select>
<select id="exportDistributionDeliveryList" resultType="com.logpm.distribution.vo.DistributionDeliveryListVO">
SELECT DISTINCT
lddl.train_number AS trainNumber,
lddl.task_time AS taskTime,
ldr.warehouse_id AS warehouseId,
ldr.consignee AS consignee,
ldr.mall_name AS mallName,
CASE
lddl.kind
WHEN 1 THEN
'自主配送'
WHEN 2 THEN
'三方配送'
END kindName,
CASE
lddl.type
WHEN 1 THEN
'商配'
WHEN 2 THEN
'市配'
END deliveryTypeName,
IF
( lddl.kind = 1, GROUP_CONCAT( DISTINCT ldds.driver_name ), lddt.driver_name ) AS driverName,
IF
( lddl.kind = 1, GROUP_CONCAT( DISTINCT ldds.driver_phone ), lddt.driver_phone ) AS driverPhone,
IF
( lddl.kind = 1, GROUP_CONCAT( DISTINCT ldds.vehicle_nub ), lddt.vehicle_num ) AS vehicleNum,
lddl.distribution_company,
CASE
lddl.delivery_status
WHEN 1 THEN
'待配送'
WHEN 2 THEN
'配送中'
WHEN 3 THEN
'已完成'
END deliveryStatusName,
lddl.customers_number AS customersNumber,
lddl.order_number AS orderNumber,
lddl.delivery_number AS deliveryNumber,
lddl.inventory_nub AS inventoryNub,
<select id="exportDistributionDeliveryList" resultType="com.logpm.distribution.excel.DistributionDeliveryListExcel">
SELECT
lddl.id id,
lww.name AS warehouseName,
lddl.train_number trainNumber,
lddl.warehouse_name warehouseName,
lddl.warehouse_id warehouseId,
lddl.vehicle_name vehicle,
lddl.driver_name driver,
lddl.vehicle_id vehicleId,
lddl.driver_id driverId,
lddl.distribution_company distributionCompany,
lddl.delivery_status deliveryStatus,
lddl.delivery_list_loading_status deliveryListLoadingStatus,
GROUP_CONCAT(y.order_code) AS orderCode,
CASE lddl.kind
WHEN 1 THEN '自主配送'
WHEN 2 THEN '三方配送'
ELSE
'其他'
END kind,
CASE lddl.type
WHEN 1 THEN '商配'
WHEN 2 THEN '市配'
END type,
CASE lddl.delivery_status
WHEN 1 THEN '待配送'
WHEN 2 THEN '配送中'
WHEN 3 THEN '已完成'
ELSE
'其他'
END state,
(
SELECT
GROUP_CONCAT(
DISTINCT ldsu.forklift_name SEPARATOR ','
)
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
JOIN logpm_distribution_stockup_info ldsi ON ldr.id = ldsi.reservation_id
JOIN logpm_distribution_stockup ldsu ON ldsu.id = ldsi.stockup_id
WHERE
lds.delivery_id = lddl.id
) forkliftName,
lddl.create_time createTime,
(
SELECT
COALESCE (COUNT(*), 0)
FROM
logpm_distribution_signfor lds INNER JOIN logpm_distribution_reservation AS ldr ON lds.reservation_id = ldr.id
WHERE
lds.delivery_id = lddl.id and ldr.reservation_status != '40' AND (ldr.reservation_num + ldr.reservation_stock_list_num) > 0
) customersNumber,
lddl.price price,
lddl.added_services_id addedServicesId,
(
SELECT
COALESCE (COUNT(*), 0)
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
JOIN logpm_distribution_reservation_stockarticle ldrs ON ldrs.reservation_id = ldr.id
WHERE
lds.delivery_id = lddl.id and ldrs.stock_article_status != 2
) orderNumber,
(
SELECT
COALESCE (sum(ldr.reservation_num), 0)
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
WHERE
lds.delivery_id = lddl.id and ldr.reservation_status != '40'
) deliveryNumber,
(
SELECT
COALESCE (
sum(
ldr.reservation_stock_list_num
),
0
)
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
WHERE
lds.delivery_id = lddl.id
) reservationStockListNum,
(
SELECT
GROUP_CONCAT(
DISTINCT lds.loader_name SEPARATOR ','
)
FROM
logpm_distribution_signfor ldsf
JOIN logpm_distribution_reservation ldr ON ldr.id = ldsf.reservation_id
JOIN logpm_distribution_stockup_info AS ldsi ON ldr.id = ldsi.reservation_id
INNER JOIN logpm_distribution_stockup AS lds ON ldsi.stockup_id = lds.id
WHERE
ldsf.delivery_id = lddl.id
) loadingTeamName,
(
SELECT
GROUP_CONCAT(
DISTINCT lds.fix_time SEPARATOR ','
)
FROM
logpm_distribution_signfor ldsf
JOIN logpm_distribution_reservation ldr ON ldr.id = ldsf.reservation_id
JOIN logpm_distribution_stockup_info AS ldsi ON ldr.id = ldsi.reservation_id
INNER JOIN logpm_distribution_stockup AS lds ON ldsi.stockup_id = lds.id
WHERE
ldsf.delivery_id = lddl.id
-- ) leadTime,
-- lds.delivery_id = lddl.id
) reservationId,
lddl.order_id orderId,
lddl.fee fee,
lddl.task_time taskTime,
lddl.loading_time loadingTime,
lddl.note_number noteNumber,
lddl.source source,
(
SELECT
COALESCE (sum(lds.loaded_number + lds.loadedin_number), 0)
COALESCE (
sum(
ldr.reservation_stock_list_num
),
0
)
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
WHERE
lds.delivery_id = lddl.id
) inventoryNub,
(
SELECT
COALESCE (sum(lds.loaded_number), 0) + COALESCE (sum(lds.loadedin_number), 0)
FROM
logpm_distribution_signfor lds
WHERE
lddl.id = lds.delivery_id
) scannedNumber,
(SELECT
COALESCE (sum(lds.received_quantity + receivedin_quantity), 0)
COALESCE (sum(lds.received_quantity), 0) + COALESCE (sum(lds.receivedin_quantity), 0)
FROM
logpm_distribution_signfor lds
WHERE
lddl.id = lds.delivery_id
) signingNumber,
GROUP_CONCAT( lddl.loading_team_name, lddl.unloading_team_name ) AS handlingCrew
GROUP_CONCAT(DISTINCT ldr.consignee SEPARATOR ',') consignee,
GROUP_CONCAT(DISTINCT ldr.mall_name SEPARATOR ',') mallName,
(SELECT group_concat( DISTINCT ldsa.order_code SEPARATOR ',' ) FROM logpm_distribution_delivery_list lddll LEFT JOIN logpm_distribution_signfor lds ON lddll.id = lds.delivery_id LEFT JOIN logpm_distribution_reservation_stockarticle AS ldrs ON lds.reservation_id = ldrs.reservation_id AND ldrs.stock_article_status != 2 LEFT JOIN logpm_distribution_stock_article AS ldsa ON ldrs.stock_article_id = ldsa.id WHERE lddll.id = lddl.id GROUP BY lddl.id ) AS orderCode
FROM logpm_distribution_delivery_list lddl
LEFT JOIN (
SELECT
lddl.id,
a.consignee AS consignee,
a.mall_name AS mallName,
FROM
logpm_distribution_delivery_list AS lddl
LEFT JOIN logpm_distribution_signfor AS lds ON lddl.id = lds.delivery_id AND lds.is_deleted = 0
LEFT JOIN logpm_distribution_reservation AS ldr ON lds.reservation_id = ldr.id AND ldr.is_deleted = 0
LEFT JOIN logpm_distribution_delivery_self AS ldds ON ldds.delivery_id = lddl.id AND ldds.is_deleted = 0
LEFT JOIN logpm_distribution_delivery_tripartite AS lddt ON ldds.delivery_id = lddl.id AND lddt.is_deleted = 0
<where>
lddl.is_deleted = 0
<if test=" params.ids != null">
AND lddl.id in
<foreach collection="params.ids" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test=" params.trainNumber != '' and params.trainNumber != null">
AND lddl.train_number like concat('%',#{params.trainNumber},'%')
</if>
<if test=" params.clineName != '' and params.clineName != null">
AND ldr.consignee like concat('%',#{params.clineName},'%')
</if>
<if test=" params.mallName != '' and params.mallName != null">
AND ldr.mall_name like concat('%',#{params.mallName},'%')
</if>
<if test=" params.type != '' and params.type != null">
AND lddl.type = #{params.type}
</if>
<if test=" params.kind != '' and params.kind != null">
AND lddl.kind = #{params.kind}
</if>
<if test=" params.vehicleName != '' and params.vehicleName != null">
AND ldds.vehicle_nub like concat('%',#{params.vehicleName},'%')
</if>
<if test=" params.driverName != '' and params.driverName != null">
AND ldds.driver_name like concat('%',#{params.driverName},'%')
</if>
<if test=" params.distributionCompany != '' and params.distributionCompany != null">
AND ldds.distribution_company like concat('%',#{params.distributionCompany},'%')
</if>
<if test=" params.taskTime != '' and params.taskTime != null">
AND ldds.task_time like concat('%',#{params.taskTime},'%')
</if>
<if test=" params.deliveryStatus != '' and params.deliveryStatus != null">
AND lddl.delivery_status =#{params.deliveryStatus}
</if>
<if test=" params.warehouseId != '' and params.warehouseId != null">
AND lddl.warehouse_id =#{params.warehouseId}
</if>
<if test=" params.warehouseIds != null ">
AND lddl.warehouse_id IN
<foreach collection="params.warehouseIds" item="warehouseId" open="(" close=")" separator=",">
#{warehouseId}
</foreach>
</if>
</where>
logpm_distribution_delivery_list lddl
LEFT JOIN logpm_distribution_signfor lds ON lddl.id = lds.delivery_id
LEFT JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id
WHERE
IF
( lddl.delivery_number IS NULL, 0, lddl.delivery_number ) +
IF
( lddl.inventory_nub IS NULL, 0, lddl.inventory_nub ) > 0
AND ( lddl.customers_number > 0 AND ldr.reservation_num + ldr.reservation_stock_list_num ) > 0
AND lds.is_deleted = 0 AND lddl.is_deleted = 0 AND ldr.is_deleted = 0
GROUP BY
lddl.id
) AS a On a.id = lddl.id
LEFT JOIN (SELECT lddl.id,ldsa.order_code FROM logpm_distribution_delivery_list lddl
LEFT JOIN logpm_distribution_signfor lds ON lddl.id = lds.delivery_id
LEFT JOIN logpm_distribution_reservation_stockarticle AS ldrs ON lds.reservation_id = ldrs.reservation_id AND ldrs.stock_article_status != 2
LEFT JOIN logpm_distribution_stock_article AS ldsa ON ldrs.stock_article_id = ldsa.id ) AS y ON y.id = lddl.id
LEFT JOIN logpm_warehouse_warehouse AS lww ON lddl.warehouse_id = lww.id
<where>
lddl.is_deleted = 0
AND (IF(lddl.delivery_number is null ,0,lddl.delivery_number) + IF(lddl.inventory_nub is null ,0,lddl.inventory_nub)) > 0
AND (lddl.customers_number > 0 AND ldr.reservation_num + ldr.reservation_stock_list_num) >0
<if test="param.trainNumber != null and param.trainNumber!=''">
and lddl.train_number like concat('%',#{param.trainNumber},'%')
</if>
<if test="param.warehouseIdList != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(param.warehouseIdList)">
and lddl.warehouse_id in
<foreach collection="param.warehouseIdList" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="param.warehouseName != null and param.warehouseName!=''">
and lddl.warehouse_name like concat('%',#{param.warehouseName},'%')
</if>
<if test="param.clineName != null and param.clineName!=''">
and a.consignee like concat('%',#{param.clineName},'%')
</if>
<if test="param.mallName != null and param.mallName!=''">
and a.mall_name like concat('%',#{param.mallName},'%')
</if>
<if test="param.vehicleName != null and param.vehicleName!=''">
and lddl.vehicle_name like concat('%',#{param.vehicleName},'%')
</if>
<if test="param.driverName != null and param.driverName!=''">
and lddl.driver_name like concat('%',#{param.driverName},'%')
</if>
<if test="param.loadingTeamName != null and param.loadingTeamName!=''">
and lddl.loading_team_name like concat('%',#{param.loadingTeamName},'%')
</if>
<if test="param.orderCode != null and param.orderCode!=''">
and y.order_code like concat('%',#{param.orderCode},'%')
</if>
<if test="param.kind != null and param.kind!=''">
and lddl.kind = #{param.kind}
</if>
<if test="param.distributionCompany != null and param.distributionCompany!=''">
and lddl.distribution_company = #{param.distributionCompany}
</if>
<if test="param.type != null and param.type!=''">
and lddl.type = #{param.type}
</if>
<if test="param.deliveryStatus != null and param.deliveryStatus!=''">
and lddl.delivery_status = #{param.deliveryStatus}
</if>
<if test="param.createTime_query!=null and param.createTime_query!=''">
and date_format(lddl.create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%')
</if>
<if test="param.leadTime!=null and param.leadTime!=''">
and date_format(lddl.lead_time,'%y%m%d%') = date_format(#{param.leadTime},'%y%m%d%')
</if>
<if test="param.loadingTime!=null and param.loadingTime!=''">
and date_format(lddl.loading_time,'%y%m%d%') = date_format(#{param.loadingTime},'%y%m%d%')
</if>
<if test="param.taskTime!=null and param.taskTime!=''">
and date_format(lddl.task_time,'%y%m%d%') = date_format(#{param.taskTime},'%y%m%d%')
</if>
<if test="param.taskTimeStart!=null and param.taskTimeStart!=''">
and date_format(lddl.task_time,'%y%m%d%') BETWEEN #{param.taskTimeStart} AND #{param.taskTimeEnd}
</if>
</where>
GROUP BY lddl.id ,
lddl.train_number,
lddl.warehouse_name ,
lddl.warehouse_id ,
lddl.type ,
lddl.kind ,
lddl.vehicle_name ,
lddl.driver_name ,
lddl.vehicle_id ,
lddl.driver_id ,
lddl.distribution_company ,
lddl.delivery_status ,
lddl.delivery_list_loading_status
ORDER BY
lddl.create_time DESC
</select>
<select id="selectBycommercialNub" resultType="java.lang.Integer">
SELECT COALESCE(COUNT(*), 0) FROM logpm_distribution_delivery_list lddl

53
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -79,6 +79,7 @@ import org.springblade.common.exception.CustomerException;
import org.springblade.common.serviceConstant.ServiceConstant;
import org.springblade.common.utils.CommonUtil;
import org.springblade.common.utils.QRCodeUtil;
import org.springblade.common.utils.StringSplitUtil;
import org.springblade.common.utils.TemplateUtil;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
@ -247,11 +248,26 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionDeliveryList.setCreateTime_query(sdf.format(distributionDeliveryList.getCreateTime()));
}
//这里有两种情况,可能会搜索配送司机或者车辆
String driverName = distributionDeliveryList.getDriverName();
// String driverName = distributionDeliveryList.getDriverName();
//获取当前登录人仓库
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
List<Long> collect = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
distributionDeliveryList.setWarehouseIdList(collect);
if (!Func.isEmpty(distributionDeliveryList.getTrainNumbers())){
List<String> strings = StringSplitUtil.StringSplitToList(distributionDeliveryList.getTrainNumbers());
if (!strings.isEmpty()){
distributionDeliveryList.setTrainNumberList(strings);
}
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)){
List<BasicdataWarehouseEntity> warehouseList = warehouseClient.getMyWarehouseList();
if (!warehouseList.isEmpty()) {
List<Long> collect = warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
distributionDeliveryList.setWarehouseIdList(collect);
}
}else {
distributionDeliveryList.setWarehouseId(myCurrentWarehouse.getId());
}
List<DistributionDeliveryListEntity> distributionDeliveryListEntities = baseMapper.selectDistributionDeliveryListPage(page, distributionDeliveryList);
return page.setRecords(distributionDeliveryListEntities);
@ -260,7 +276,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
public List<DistributionDeliveryListExcel> exportDistributionDeliveryList(Map<String, Object> distributionDeliveryList) {
if (Func.isNotEmpty(distributionDeliveryList.get("ids"))){
//进行勾选操作
List<Long> deliveryId = Func.toLongList((String) distributionDeliveryList.get("ids"));
@ -281,32 +296,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}else {
distributionDeliveryList.put("warehouseId",myCurrentWarehouse.getId());
}
List<DistributionDeliveryListExcel> list = new ArrayList<>();
List<DistributionDeliveryListVO> distributionDeliveryListVOS = baseMapper.exportDistributionDeliveryList(distributionDeliveryList);
distributionDeliveryListVOS.forEach(dis -> {
DistributionDeliveryListExcel deliveryListExcel = Func.copy(dis, DistributionDeliveryListExcel.class);
deliveryListExcel.setKind(dis.getKindName());
deliveryListExcel.setDriver(dis.getDriverName());
deliveryListExcel.setVehicle(dis.getVehicleNum());
deliveryListExcel.setType(dis.getDeliveryTypeName());
deliveryListExcel.setState(dis.getDeliveryStatusName());
deliveryListExcel.setCustomersNumber(dis.getCustomersNumber());
deliveryListExcel.setOrderNumber(dis.getOrderNumber());
deliveryListExcel.setDeliveryNumber(dis.getDeliveryNumber());
deliveryListExcel.setInventoryNub(dis.getInventoryNub());
deliveryListExcel.setCustomersNumber(dis.getScannedNumber());
deliveryListExcel.setScannedNumber(dis.getScannedNumber());
deliveryListExcel.setSigningNumber(dis.getSigningNumber());
deliveryListExcel.setLoadingTeam(dis.getHandlingCrew());
if (!Objects.isNull(dis.getWarehouseId())){
BasicdataWarehouseEntity entityWarehouseId = warehouseClient.getEntityWarehouseId(dis.getWarehouseId());
deliveryListExcel.setWarehouseName(entityWarehouseId.getName());
}
list.add(deliveryListExcel);
});
return list;
List<DistributionDeliveryListExcel> distributionDeliveryListExcels = baseMapper.exportDistributionDeliveryList(distributionDeliveryList);
return distributionDeliveryListExcels;
}
@Override

32
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java

@ -1087,13 +1087,7 @@ public class OpenOrderController {
return R.fail(403,"仓库信息为空");
}
R<List<TrunklineAdvanceEntity>> listR = openOrderService.openLabelHasPacakage(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),file);
List<TrunklineAdvanceEntity> data = listR.getData();
if(!CollUtil.isEmpty(data)){
carsLoadAsyncService.sendRabbitMessageLoadScanData(data);
}
return listR;
return openOrderService.openLabelHasPacakage(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),file);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
@ -1119,15 +1113,7 @@ public class OpenOrderController {
return R.fail(403,"仓库信息为空");
}
R<List<TrunklineAdvanceEntity>> listR = openOrderService.importOrderNoPackage(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),myCurrentWarehouse.getWarehouseCode(),file);
// List<TrunklineAdvanceEntity> data = listR.getData();
// if(!CollUtil.isEmpty(data)){
// for (TrunklineAdvanceEntity datum : data) {
// carsLoadService.sendRabbitMessageLoadScanData(JSONUtil.toJsonStr(datum));
// }
// }
return listR;
return openOrderService.importOrderNoPackage(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),myCurrentWarehouse.getWarehouseCode(),file);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
@ -1156,12 +1142,7 @@ public class OpenOrderController {
return R.fail(403,"仓库信息为空");
}
R<List<TrunklineAdvanceEntity>> listR = openOrderService.importCustomizedOuPai(myCurrentWarehouse.getId(), myCurrentWarehouse.getName(), file);
List<TrunklineAdvanceEntity> data = listR.getData();
if(!CollUtil.isEmpty(data)){
carsLoadAsyncService.sendRabbitMessageLoadScanData(data);
}
return listR;
return openOrderService.importCustomizedOuPai(myCurrentWarehouse.getId(), myCurrentWarehouse.getName(), file);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
@ -1188,12 +1169,7 @@ public class OpenOrderController {
return R.fail(403,"仓库信息为空");
}
R<List<TrunklineAdvanceEntity>> listR = openOrderService.importStandardOuPai(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),file);
List<TrunklineAdvanceEntity> data = listR.getData();
if(!CollUtil.isEmpty(data)){
carsLoadAsyncService.sendRabbitMessageLoadScanData(data);
}
return listR;
return openOrderService.importStandardOuPai(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),file);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java

@ -60,4 +60,6 @@ public interface TrunklineAdvanceDetailMapper extends BaseMapper<TrunklineAdvanc
IPage<OrderDetailInfoVO> findOrderDetails(IPage<Object> page, @Param("param") OrderDetailsDTO orderDetailsDTO);
void updateWaybillNoIsNullByAdvanceIds(@Param("advanceIds") List<Long> advanceIds);
List<String> findListByExistsAndOrderPackageCodes(@Param("orderPackageCodeGroup") List<String> orderPackageCodeGroup);
}

18
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml

@ -346,4 +346,22 @@
</foreach>
</update>
<select id="findListByExistsAndOrderPackageCodes" resultType="String">
select ltad.order_package_code
from logpm_trunkline_advance_detail ltad
where exists(
select 1 from (
<foreach collection="orderPackageCodeGroup" index="ind" item="item">
<if test="ind == 0">
select #{item} orderPackageCode
</if>
<if test="ind != 0">
union all
select #{item} orderPackageCode
</if>
</foreach>
) orderPackageCodes where orderPackageCodes.orderPackageCode = ltad.order_package_code)
</select>
</mapper>

9
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.trunkline.dto.AdvanceDTO;
import com.logpm.trunkline.dto.OpenLabelDTO;
import com.logpm.trunkline.dto.OpenOrderDTO;
import com.logpm.trunkline.entity.TrunklineAdvanceEntity;
import com.logpm.trunkline.vo.TrunklineAdvanceDetailVO;
import com.logpm.trunkline.vo.TrunklineAdvanceVO;
import org.springblade.core.tool.api.R;
@ -44,11 +43,11 @@ public interface IOpenOrderService {
R openLabel(OpenLabelDTO openLabelDTO);
R<List<TrunklineAdvanceEntity>> openLabelHasPacakage(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R openLabelHasPacakage(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R<List<TrunklineAdvanceEntity>> importCustomizedOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R importCustomizedOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R<List<TrunklineAdvanceEntity>> importStandardOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R importStandardOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R findWaybillDetail(OpenOrderDTO openOrderDTO);
@ -62,7 +61,7 @@ public interface IOpenOrderService {
R findPayWayByClientId(Long clientId);
R<List<TrunklineAdvanceEntity>> importOrderNoPackage(Long warehouseId, String warehouseName, String warehouseCode, MultipartFile file) throws IOException;
R importOrderNoPackage(Long warehouseId, String warehouseName, String warehouseCode, MultipartFile file) throws IOException;
R checkWaybill(OpenOrderDTO openOrderDTO);

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java

@ -74,4 +74,7 @@ public interface ITrunklineAdvanceDetailService extends BaseService<TrunklineAdv
R findOrderDetails(OrderDetailsDTO orderDetailsDTO);
void updateWaybillNoIsNullByAdvanceIds(List<Long> advanceIds);
List<String> findListByExistsAndOrderPackageCodes(List<String> orderPackageCodeGroup);
}

186
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -93,6 +93,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
private final ITrunklineCarsLoadScanService trunklineCarsLoadScanService;
private final IBasicdataStoreContactClient basicdataStoreContactClient;
private final IAsyncService asyncService;
private final ICarsLoadAsyncService carsLoadAsyncService;
@Override
public IPage<TrunklineAdvanceVO> advancePageList(AdvanceDTO advanceDTO) {
@ -619,7 +620,6 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//队列处理包件补数据
// sendRabbitMessageLoadScanData(JSONUtil.parseArray(advanceIds));
carsLoadService.sendRabbitMessageOpenOrder(advanceIds, waybillId);
Map<String,Object> map = new HashMap<>();
@ -1062,7 +1062,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
@Transactional(rollbackFor = Exception.class)
@Override
public R<List<TrunklineAdvanceEntity>> openLabelHasPacakage(Long warehouseId, String warehouseName, MultipartFile file) throws IOException {
public R openLabelHasPacakage(Long warehouseId, String warehouseName, MultipartFile file) throws IOException {
if (Objects.isNull(file)) {
log.warn("##################openLabelHasPacakage: 文件不存在");
return R.fail(405, "文件不存在");
@ -1070,6 +1070,52 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
InputStream inputStream = file.getInputStream();
List<PacakgeDetailExcelDTO> pacakgeDetailExcelDTOS = EasyExcel.read(inputStream).head(PacakgeDetailExcelDTO.class).sheet(0).headRowNumber(2).doReadSync();
//排除pacakgeDetailExcelDTOS中的orderPackageCode为空的元素
pacakgeDetailExcelDTOS = pacakgeDetailExcelDTOS.stream().filter(item -> StringUtil.isNotBlank(item.getOrderPackageCode())).collect(Collectors.toList());
//把pacakgeDetailExcelDTOS转成以orderPacakgeCode为一个Set集合
Set<String> pacakgeDetailExcelDTOSet = pacakgeDetailExcelDTOS.stream().map(PacakgeDetailExcelDTO::getOrderPackageCode).collect(Collectors.toSet());
//把pacakgeDetailExcelDTOS中的元素的orderPackageCode属性分组
Map<String, Long> orderPackageCodeCounts = pacakgeDetailExcelDTOS.stream()
.collect(Collectors.groupingBy(PacakgeDetailExcelDTO::getOrderPackageCode, Collectors.counting()));
Set<String> duplicateOrderPackageCodes = orderPackageCodeCounts.entrySet().stream()
.filter(entry -> entry.getValue() > 1)
.map(Map.Entry::getKey)
.collect(Collectors.toSet());
if(!duplicateOrderPackageCodes.isEmpty()){
log.warn("#####################openLabelHasPacakage: 包条码重复 {}",duplicateOrderPackageCodes);
return R.fail(405, "包条码重复"+duplicateOrderPackageCodes);
}
List<String> orderPackageCodeKeys = new ArrayList<>(pacakgeDetailExcelDTOSet);
List<String> hasOrderPackageCodeList = new ArrayList<>();
//把orderPackageCodeKeys每2000个元素为一组
int batchSize = 2000;
List<List<String>> orderPackageCodeGroups = new ArrayList<>();
for (int i = 0; i < orderPackageCodeKeys.size(); i += batchSize) {
int endIndex = Math.min(i + batchSize, orderPackageCodeKeys.size());
orderPackageCodeGroups.add(orderPackageCodeKeys.subList(i, endIndex));
}
orderPackageCodeGroups.forEach(orderPackageCodeGroup -> {
List<String> hasOrderPackageCodes = advanceDetailService.findListByExistsAndOrderPackageCodes(orderPackageCodeGroup);
hasOrderPackageCodeList.addAll(hasOrderPackageCodes);
});
//排除pacakgeDetailExcelDTOS中orderPackageCode在hasOrderPackageCodeList中存在的元素
pacakgeDetailExcelDTOS = pacakgeDetailExcelDTOS.stream().filter(item -> !hasOrderPackageCodeList.contains(item.getOrderPackageCode())).collect(Collectors.toList());
List<TrunklineAdvanceEntity> advanceEntityList = new ArrayList<>();
if(pacakgeDetailExcelDTOS.isEmpty()){
log.warn("##################openLabelHasPacakage: 没有需要处理的数据 pacakgeDetailExcelDTOS={}",pacakgeDetailExcelDTOS);
return R.data(advanceEntityList);
}
Map<String, List<PacakgeDetailExcelDTO>> listMap = pacakgeDetailExcelDTOS.parallelStream().collect(Collectors.groupingBy(a -> a.getOrderCode() + "&" + a.getTrainNumber()));
@ -1080,7 +1126,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
List<TrunklineAdvanceDetailEntity> advanceDetailEntities = new ArrayList<>();
List<TrunklineAdvanceEntity> advanceEntityList = new ArrayList<>();
Map<String,TrunklineAdvanceEntity> advanceEntityMap = new HashMap<>();
@ -1090,7 +1136,6 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//把orderCodes转成List
List<String> orderCodeList = new ArrayList<>(orderCodes);
//把orderCodeList分成每2000个元素一组
int batchSize = 2000;
List<List<String>> orderedGroups = new ArrayList<>();
for (int i = 0; i < orderCodeList.size(); i += batchSize) {
@ -1307,7 +1352,13 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
}
return R.data(advanceEntityList);
if(!CollUtil.isEmpty(advanceEntityList)){
carsLoadAsyncService.sendRabbitMessageLoadScanData(advanceEntityList);
}
int successNum = advanceDetailEntities.size();
return R.success("成功处理包件"+successNum+"件");
}
public int findFirstDigitIndex(String str) {
@ -1322,7 +1373,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
@Transactional(rollbackFor = Exception.class)
@Override
public R<List<TrunklineAdvanceEntity>> importCustomizedOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException {
public R importCustomizedOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException {
if (Objects.isNull(file)) {
log.warn("##################importCustomizedOuPai: 文件不存在");
return R.fail(405, "文件不存在");
@ -1333,6 +1384,53 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
List<ImportCustomizedOuPaiDTO> importCustomizedOuPaiDTOS = EasyExcel.read(inputStream).head(ImportCustomizedOuPaiDTO.class).sheet(0).headRowNumber(1).doReadSync();
//排除pacakgeDetailExcelDTOS中的orderPackageCode为空的元素
importCustomizedOuPaiDTOS = importCustomizedOuPaiDTOS.stream().filter(item -> StringUtil.isNotBlank(item.getOrderPackageCode())).collect(Collectors.toList());
//把pacakgeDetailExcelDTOS转成以orderPacakgeCode为一个Set集合
Set<String> importCustomizedOuPaiDTOSet = importCustomizedOuPaiDTOS.stream().map(ImportCustomizedOuPaiDTO::getOrderPackageCode).collect(Collectors.toSet());
//把pacakgeDetailExcelDTOS中的元素的orderPackageCode属性分组
Map<String, Long> orderPackageCodeCounts = importCustomizedOuPaiDTOS.stream()
.collect(Collectors.groupingBy(ImportCustomizedOuPaiDTO::getOrderPackageCode, Collectors.counting()));
Set<String> duplicateOrderPackageCodes = orderPackageCodeCounts.entrySet().stream()
.filter(entry -> entry.getValue() > 1)
.map(Map.Entry::getKey)
.collect(Collectors.toSet());
if(!duplicateOrderPackageCodes.isEmpty()){
log.warn("#################importCustomizedOuPai: 包条码重复 {}",duplicateOrderPackageCodes);
return R.fail(405, "包条码重复"+duplicateOrderPackageCodes);
}
List<String> orderPackageCodeKeys = new ArrayList<>(importCustomizedOuPaiDTOSet);
List<String> hasOrderPackageCodeList = new ArrayList<>();
//把orderPackageCodeKeys每2000个元素为一组
int batchSize = 2000;
List<List<String>> orderPackageCodeGroups = new ArrayList<>();
for (int i = 0; i < orderPackageCodeKeys.size(); i += batchSize) {
int endIndex = Math.min(i + batchSize, orderPackageCodeKeys.size());
orderPackageCodeGroups.add(orderPackageCodeKeys.subList(i, endIndex));
}
orderPackageCodeGroups.forEach(orderPackageCodeGroup -> {
List<String> hasOrderPackageCodes = advanceDetailService.findListByExistsAndOrderPackageCodes(orderPackageCodeGroup);
hasOrderPackageCodeList.addAll(hasOrderPackageCodes);
});
//排除pacakgeDetailExcelDTOS中orderPackageCode在hasOrderPackageCodeList中存在的元素
importCustomizedOuPaiDTOS = importCustomizedOuPaiDTOS.stream().filter(item -> !hasOrderPackageCodeList.contains(item.getOrderPackageCode())).collect(Collectors.toList());
List<TrunklineAdvanceEntity> advanceEntityList = new ArrayList<>();
if(importCustomizedOuPaiDTOS.isEmpty()){
log.warn("##################importCustomizedOuPai: 没有需要处理的数据 importCustomizedOuPaiDTOS={}",importCustomizedOuPaiDTOS);
return R.data(advanceEntityList);
}
Map<String, List<ImportCustomizedOuPaiDTO>> listMap = importCustomizedOuPaiDTOS.parallelStream().collect(Collectors.groupingBy(a -> a.getOrderCode() + "&" + a.getTrainNumber()));
listMap.remove("null&null");
@ -1344,7 +1442,6 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//把orderCodes转成List
List<String> orderCodeList = new ArrayList<>(orderCodes);
//把orderCodeList分成每2000个元素一组
int batchSize = 2000;
List<List<String>> orderedGroups = new ArrayList<>();
for (int i = 0; i < orderCodeList.size(); i += batchSize) {
@ -1354,8 +1451,6 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
List<TrunklineAdvanceDetailEntity> advanceDetailEntities = new ArrayList<>();
List<TrunklineAdvanceEntity> advanceEntityList = new ArrayList<>();
Map<String,TrunklineAdvanceEntity> advanceEntityMap = new HashMap<>();
List<Long> advanceIds = new ArrayList<>();
@ -1530,13 +1625,18 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
log.info("################本次耗时 " + (end - start) + "ms");
int size = advanceDetailEntities.size();
if(!CollUtil.isEmpty(advanceEntityList)){
carsLoadAsyncService.sendRabbitMessageLoadScanData(advanceEntityList);
}
return R.data(advanceEntityList);
return R.success("成功导入"+size+"条");
}
@Transactional(rollbackFor = Exception.class)
@Override
public R<List<TrunklineAdvanceEntity>> importStandardOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException {
public R importStandardOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException {
if (Objects.isNull(file)) {
log.warn("##################importStandardOuPai: 文件不存在");
return R.fail(405, "文件不存在");
@ -1544,6 +1644,54 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
InputStream inputStream = file.getInputStream();
List<ImportStandardOuPaiDTO> importStandardOuPaiDTOS = EasyExcel.read(inputStream).head(ImportStandardOuPaiDTO.class).sheet(0).headRowNumber(1).doReadSync();
//排除importStandardOuPaiDTOS中的orderPackageCode为空的元素
importStandardOuPaiDTOS = importStandardOuPaiDTOS.stream().filter(item -> StringUtil.isNotBlank(item.getOrderPackageCode())).collect(Collectors.toList());
//把importStandardOuPaiDTOS转成以orderPacakgeCode为一个Set集合
Set<String> importStandardOuPaiDTOSet = importStandardOuPaiDTOS.stream().map(ImportStandardOuPaiDTO::getOrderPackageCode).collect(Collectors.toSet());
//把pacakgeDetailExcelDTOS中的元素的orderPackageCode属性分组
Map<String, Long> orderPackageCodeCounts = importStandardOuPaiDTOS.stream()
.collect(Collectors.groupingBy(ImportStandardOuPaiDTO::getOrderPackageCode, Collectors.counting()));
Set<String> duplicateOrderPackageCodes = orderPackageCodeCounts.entrySet().stream()
.filter(entry -> entry.getValue() > 1)
.map(Map.Entry::getKey)
.collect(Collectors.toSet());
if(!duplicateOrderPackageCodes.isEmpty()){
log.warn("#################importStandardOuPai: 包条码重复 {}",duplicateOrderPackageCodes);
return R.fail(405, "包条码重复"+duplicateOrderPackageCodes);
}
List<String> orderPackageCodeKeys = new ArrayList<>(importStandardOuPaiDTOSet);
List<String> hasOrderPackageCodeList = new ArrayList<>();
//把orderPackageCodeKeys每2000个元素为一组
int batchSize = 2000;
List<List<String>> orderPackageCodeGroups = new ArrayList<>();
for (int i = 0; i < orderPackageCodeKeys.size(); i += batchSize) {
int endIndex = Math.min(i + batchSize, orderPackageCodeKeys.size());
orderPackageCodeGroups.add(orderPackageCodeKeys.subList(i, endIndex));
}
orderPackageCodeGroups.forEach(orderPackageCodeGroup -> {
List<String> hasOrderPackageCodes = advanceDetailService.findListByExistsAndOrderPackageCodes(orderPackageCodeGroup);
hasOrderPackageCodeList.addAll(hasOrderPackageCodes);
});
//排除importStandardOuPaiDTOS中orderPackageCode在hasOrderPackageCodeList中存在的元素
importStandardOuPaiDTOS = importStandardOuPaiDTOS.stream().filter(item -> !hasOrderPackageCodeList.contains(item.getOrderPackageCode())).collect(Collectors.toList());
List<TrunklineAdvanceEntity> advanceEntityList = new ArrayList<>();
if(importStandardOuPaiDTOS.isEmpty()){
log.warn("##################importStandardOuPai: 没有需要处理的数据 importStandardOuPaiDTOS={}",importStandardOuPaiDTOS);
return R.data(advanceEntityList);
}
Map<String, List<ImportStandardOuPaiDTO>> listMap = importStandardOuPaiDTOS.parallelStream().collect(Collectors.groupingBy(a -> a.getOrderCode() + "&" + a.getTrainNumber()));
listMap.remove("null&null");
@ -1553,8 +1701,6 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
List<TrunklineAdvanceDetailEntity> advanceDetailEntities = new ArrayList<>();
List<TrunklineAdvanceEntity> advanceEntityList = new ArrayList<>();
Map<String,TrunklineAdvanceEntity> advanceEntityMap = new HashMap<>();
List<Long> advanceIds = new ArrayList<>();
@ -1563,7 +1709,6 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//把orderCodes转成List
List<String> orderCodeList = new ArrayList<>(orderCodes);
//把orderCodeList分成每2000个元素一组
int batchSize = 2000;
List<List<String>> orderedGroups = new ArrayList<>();
for (int i = 0; i < orderCodeList.size(); i += batchSize) {
@ -1773,10 +1918,15 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
comlist.add(fromCpFirstReq);
}
CompletableFuture.allOf(comlist.toArray(new CompletableFuture[0])).join();
}
if(!CollUtil.isEmpty(advanceEntityList)){
carsLoadAsyncService.sendRabbitMessageLoadScanData(advanceEntityList);
}
return R.data(advanceEntityList);
int successNum = advanceDetailEntities.size();
return R.success("成功导入"+successNum+"条");
}
@Override
@ -2072,7 +2222,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
@Transactional(rollbackFor = Exception.class)
@Override
public R<List<TrunklineAdvanceEntity>> importOrderNoPackage(Long warehouseId, String warehouseName, String warehouseCode, MultipartFile file) throws IOException {
public R importOrderNoPackage(Long warehouseId, String warehouseName, String warehouseCode, MultipartFile file) throws IOException {
if (Objects.isNull(file)) {
log.warn("##################importOrderNoPackage: 文件不存在");
return R.fail(405, "文件不存在");
@ -2159,7 +2309,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
});
advanceService.saveBatch(list);
return R.data(list);
int successNum = list.size();
return R.success("成功导入"+successNum+"件");
}
@Override

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java

@ -271,4 +271,9 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl<Trunkline
public void updateWaybillNoIsNullByAdvanceIds(List<Long> advanceIds) {
baseMapper.updateWaybillNoIsNullByAdvanceIds(advanceIds);
}
@Override
public List<String> findListByExistsAndOrderPackageCodes(List<String> orderPackageCodeGroup) {
return baseMapper.findListByExistsAndOrderPackageCodes(orderPackageCodeGroup);
}
}

Loading…
Cancel
Save