Browse Source

Merge remote-tracking branch 'origin/pre-production'

master
zhenghaoyu 4 months ago
parent
commit
69a90a3714
  1. 1
      blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java
  2. 4
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionSignforClient.java
  3. 4
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java
  4. 6
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java
  5. 4
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/ExportWarehouseWaybillVO.java
  6. 4
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillExportVO.java
  7. 2
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillVO.java
  8. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java
  9. 21
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionSignforClient.java
  10. 363
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  11. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java
  12. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  13. 13
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java
  14. 40
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java
  15. 40
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml
  16. 66
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java
  17. 10
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexSignforDataVO.java
  18. 4
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java
  19. 9
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.xml
  20. 5
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/vo/StatisticsOrderInfoExportVO.java
  21. 1
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/vo/StatisticsPackageFeeInfoVO.java
  22. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java
  23. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  24. 16
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java
  25. 58
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  26. 32
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

1
blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java

@ -44,6 +44,7 @@ public enum WorkNodeEnums implements Serializable {
TRANSFER_WAREHOUSE_UNLOADING(105020, "卸车确认"),
SIGN_DIRECT_SHIPPER(105030,"直发商家签收"),
END_WAREHOUSE_UNLOADING(105040, "末端仓卸车确认"),
NO_STOCK_CAR(105050, "本车次少货"),
SORTING_TRAYS(201010, "分拣打托"),
UN_SORTING_TRAYS(201020, "包件解托"),

4
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionSignforClient.java

@ -43,6 +43,7 @@ public interface IDistributionSignforClient {
String CLERKINVENTORYCHECKDATA = API_PREFIX + "/clerkInventoryCheckPushData";
String MAINTAINISHAVEABNORMALPACKAGE = API_PREFIX + "/maintainIsHaveAbnormalPackage";
String UPDATEISHAVEABNORMALPACKAGE = API_PREFIX + "/updateIsHaveAbnormalPackage";
String HANDLETRUNKLINEWAYBILLSIGNLOG = API_PREFIX + "/handletrunklineWaybillSignLog";
/**
* 获取签收管理列表
@ -92,4 +93,7 @@ public interface IDistributionSignforClient {
*/
@GetMapping(UPDATEISHAVEABNORMALPACKAGE)
void updateIsHaveAbnormalPackage(@RequestParam("reservationId")Long reservationId);
@GetMapping(HANDLETRUNKLINEWAYBILLSIGNLOG)
Boolean handletrunklineWaybillSignLog(@RequestParam("reservationCodes")String reservationCodes);
}

4
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java

@ -168,4 +168,8 @@ public class OpenOrderDTO implements Serializable {
private String checkRemark;
private String completeDeparture;
private String completeDestination;
}

6
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java

@ -560,8 +560,10 @@ public class WarehouseWaybillEntity extends TenantEntity {
private String settlementStatus;
@ApiModelProperty(value = "完整发站")
private String completeDeparture;
@ApiModelProperty(value = "完整到站")
private String completeDestination;
}

4
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/ExportWarehouseWaybillVO.java

@ -67,8 +67,12 @@ public class ExportWarehouseWaybillVO implements Serializable {
@ExcelProperty(value = "发站")
private String departure;
@ExcelProperty(value = "完整发站")
private String completeDeparture;
@ExcelProperty(value = "到站")
private String destination;
@ExcelProperty(value = "完整到站")
private String completeDestination;
@ExcelProperty(value = "货物名称")
private String goodsName;

4
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillExportVO.java

@ -52,8 +52,12 @@ public class FinanceWaybillExportVO implements Serializable {
@ExcelProperty(value = "到站")
private String destination;
@ExcelProperty(value = "完整到站")
private String completeDestination;
@ExcelProperty(value = "发站")
private String departure;
@ExcelProperty(value = "完整发站")
private String completeDeparture;
@ExcelProperty(value = "发站仓")
private String departureWarehouseName;
@ExcelProperty(value = "目的仓")

2
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillVO.java

@ -22,7 +22,9 @@ public class FinanceWaybillVO implements Serializable {
private String shipperMobile;
private String shipperAddress;
private String destination;
private String completeDestination;
private String departure;
private String completeDeparture;
private String departureWarehouseName;
private String destinationWarehouseName;
private String deliveryWay;

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

@ -193,7 +193,7 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl<Aftersa
warehousePackageTrackLogEntity.setOrderPackageCode(orderPackageCode);
warehousePackageTrackLogEntity.setWarehouseId(abnormalRecordDTO.getWarehouseId());
warehousePackageTrackLogEntity.setWarehouseName(abnormalRecordDTO.getWarehouseName());
warehousePackageTrackLogEntity.setWorkNode(WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE.getCode());
warehousePackageTrackLogEntity.setWorkNode(WorkNodeEnums.NO_STOCK_CAR.getCode());
warehousePackageTrackLogEntity.setContent("异常处理"+carsNo+"本车次少货");
warehousePackageTrackLogEntity.setOperator(AuthUtil.getNickName());
List<JSONObject> ls = new ArrayList<>();

21
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionSignforClient.java

@ -37,6 +37,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.RedisKeyConstant;
import org.springblade.common.constant.loading.LoadingStatusConstant;
import org.springblade.common.constant.stockup.StockAssignStatusConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@ -137,6 +138,26 @@ public class DistributionSignforClient implements IDistributionSignforClient {
);
}
@Override
public Boolean handletrunklineWaybillSignLog(String reservationCodes) {
try {
List<String> strList = Func.toStrList(reservationCodes);
List<DistributionReservationEntity> distributionReservationEntities = distributionReservationMapper.selectList(Wrappers.<DistributionReservationEntity>query().lambda().in(DistributionReservationEntity::getReservationCode, strList));
if (!distributionReservationEntities.isEmpty()) {
List<Long> collect = distributionReservationEntities.stream().map(DistributionReservationEntity::getId).collect(Collectors.toList());
for (Long reservationId : collect) {
log.info(">>>>>>>>>>handletrunklineWaybillSignLog ",reservationId);
distributionSignforService.handletrunklineWaybillSignLog(reservationId);
}
}
return true;
}catch (Exception e){
log.error("error message >>",e);
return false;
}
}
private void buildNameAndPhone(List<SignPushDataUnitDTO> pushOldPackageSigning) {
for (SignPushDataUnitDTO signPushDataUnitDTO : pushOldPackageSigning) {

363
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml

@ -35,57 +35,71 @@
</resultMap>
<sql id="stockList">
select DISTINCT ldsi.service_number serviceNumber,ldsi.service_type serviceType,ldsi.description_goods descriptionGoods,ldsi.cargo_number cargoNumber,ldsi.despatch ,ldsi.incoming_batch incomingBatch,ldsi.warehouse_id warehouseId,ldsi.order_code orderCode,
CASE WHEN ldsi.pid is null THEN
(select sum(l.quantity_stock)
select DISTINCT ldsi.service_number serviceNumber,ldsi.service_type serviceType,ldsi.description_goods
descriptionGoods,ldsi.cargo_number cargoNumber,ldsi.despatch ,ldsi.incoming_batch
incomingBatch,ldsi.warehouse_id warehouseId,ldsi.order_code orderCode,
CASE WHEN ldsi.pid is null THEN
(select sum(l.quantity_stock)
from logpm_distribution_stock_list l
where l.is_deleted =0 AND l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid is null and ldsi.incoming_batch = l.incoming_batch )
ELSE (select sum(l.quantity_stock)
where l.is_deleted =0 AND l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid is null
and ldsi.incoming_batch = l.incoming_batch )
ELSE (select sum(l.quantity_stock)
from logpm_distribution_stock_list l
where l.is_deleted =0 AND l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid and l.pid is not null and ldsi.incoming_batch = l.incoming_batch )
where l.is_deleted =0 AND l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid
and l.pid is not null and ldsi.incoming_batch = l.incoming_batch )
END 'quantityStock',
CASE WHEN ldsi.pid is null THEN
(select sum(l.outbound_quantity)
CASE WHEN ldsi.pid is null THEN
(select sum(l.outbound_quantity)
from logpm_distribution_stock_list l
where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id AND l.pid is null and ldsi.incoming_batch = l.incoming_batch)
else (select sum(l.outbound_quantity)
where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id AND l.pid is null and
ldsi.incoming_batch = l.incoming_batch)
else (select sum(l.outbound_quantity)
from logpm_distribution_stock_list l
where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid and l.pid is not null and ldsi.incoming_batch = l.incoming_batch)
where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid and l.pid is not
null and ldsi.incoming_batch = l.incoming_batch)
END 'outboundQuantity',
ldsi.brand_name brandName,ldsi.market_name marketName,ldsi.store_name storeName,ldsi.warehouse_name warehouseName,ldsi.cargo_unit cargoUnit,
CASE WHEN ldsi.pid is null THEN
ldsi.brand_name brandName,ldsi.market_name marketName,ldsi.store_name storeName,ldsi.warehouse_name
warehouseName,ldsi.cargo_unit cargoUnit,
CASE WHEN ldsi.pid is null THEN
(select count(*)
from logpm_distribution_stock_list lds
where lds.pid in (select l.id
where lds.pid in (select l.id
from logpm_distribution_stock_list l
where l.market_id =ldsi.market_id and l.material_id = ldsi.material_id and l.pid is null and ldsi.incoming_batch = l.incoming_batch ))
ELSE (select count(*)
where l.market_id =ldsi.market_id and l.material_id = ldsi.material_id and l.pid is null and ldsi.incoming_batch
= l.incoming_batch ))
ELSE (select count(*)
from logpm_distribution_stock_list lds
where lds.pid in (select l.id
where lds.pid in (select l.id
from logpm_distribution_stock_list l
where l.market_id =ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid and l.pid is not null and ldsi.incoming_batch = l.incoming_batch ))
where l.market_id =ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid and l.pid is not
null and ldsi.incoming_batch = l.incoming_batch ))
END 'unpack',
CASE WHEN ldsi.pid is null THEN
CASE WHEN ldsi.pid is null THEN
(select sum(l.quantity_occupied)
from logpm_distribution_stock_list l
where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id AND l.pid is null and ldsi.incoming_batch = l.incoming_batch)
where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id AND l.pid is null and
ldsi.incoming_batch = l.incoming_batch)
else (select sum(l.quantity_occupied)
from logpm_distribution_stock_list l
where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid and l.pid is not null and ldsi.incoming_batch = l.incoming_batch)
where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid and l.pid is not
null and ldsi.incoming_batch = l.incoming_batch)
END 'quantityOccupied',
CASE WHEN ldsi.pid is null THEN
CASE WHEN ldsi.pid is null THEN
(select sum(l.unpacking_quantity)
from logpm_distribution_stock_list l
where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id AND l.pid is null and ldsi.incoming_batch = l.incoming_batch)
where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id AND l.pid is null and
ldsi.incoming_batch = l.incoming_batch)
else (select sum(l.unpacking_quantity)
from logpm_distribution_stock_list l
where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid and l.pid is not null and ldsi.incoming_batch = l.incoming_batch)
where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid and l.pid is not
null and ldsi.incoming_batch = l.incoming_batch)
END 'unpackingQuantity',
ldsi.market_id marketId,ldsi.store_id storeId,ldsi.material_id materialId,ldsi.id,
( select CONCAT(GROUP_CONCAT(lwtg.tray_code SEPARATOR ','), ',(', SUM(lwtg.num), ') ')
from logpm_warehouse_tray_goods lwtg where ldsi.market_id = lwtg.market_id and lwtg.association_id = ldsi.material_id ) trayQuantity,
from logpm_warehouse_tray_goods lwtg where ldsi.market_id = lwtg.market_id and lwtg.association_id =
ldsi.material_id ) trayQuantity,
ldsi.source_type AS sourceType,
(select package_num from logpm_basicdata_material where id = material_id) packageNum
(select package_num from logpm_basicdata_material where id = material_id) packageNum
from logpm_distribution_stock_list ldsi
</sql>
@ -96,26 +110,23 @@
<select id="getStockListInfo" resultType="com.logpm.distribution.vo.DistributionStockListVO">
select ldsl.market_name marketName,
ldsl.incoming_batch incomingBatch,
ldsl.quantity_stock quantityStock,
ldsl.warehouse_id warehouseId,
ldsl.description_goods descriptionGoods,
ldsl.cargo_number cargoNumber,
ldsl.market_id marketId,
ldsl.material_id materialId,
ldsl.id id,
ldsl.brand_name brandName,
ldsl.incoming_batch incomingBatch,
ldsl.quantity_stock quantityStock,
ldsl.warehouse_id warehouseId,
ldsl.description_goods descriptionGoods,
ldsl.cargo_number cargoNumber,
ldsl.market_id marketId,
ldsl.material_id materialId,
ldsl.id id,
ldsl.brand_name brandName,
ldsl.source_type
from logpm_distribution_stock_list ldsl
<where>
ldsl.warehouse_id = #{par.warehouseId} and ldsl.quantity_stock > 0 and ldsl.source_type = 2
<if test="par.marketId != null and par.marketId != '' "> and ldsl.market_id = #{par.marketId} </if>
<if test="par.marketId != null and par.marketId != '' ">and ldsl.market_id = #{par.marketId}</if>
</where>
</select>
<select id="exportDistributionStockList" resultType="com.logpm.distribution.entity.DistributionStockListEntity">
SELECT * FROM logpm_distribution_stock_list ${ew.customSqlSegment}
@ -206,7 +217,7 @@
</if>
<if test=" param.unpack != null and param.unpack != ''">and ldsi.unpack = #{param.unpack}</if>
<if test="clientIds!=null">
and ldsi.market_id in
and ldsi.market_id in
<foreach collection="clientIds" item="clientId" open="(" separator="," close=")">
#{clientId}
</foreach>
@ -220,165 +231,176 @@
<select id="selectStockListInfo" resultType="com.logpm.distribution.vo.DistributionStockupStockListInfoVO">
select ldr.id reservationId,
ldsl.id stockListId,
ldr.consignee customer,
ldr.delivery_address deliveryAddress,
ldr.goods_area_name stockupArea,
ldrs.reservation_num planNum,
ldsl.id stockListId,
ldr.consignee customer,
ldr.delivery_address deliveryAddress,
ldr.goods_area_name stockupArea,
ldrs.reservation_num planNum,
(select DISTINCT allocation_title
from logpm_warehouse_updown_goods
where allocation_id = #{allocationId}) warehouseArea,
ldsl.tray_name trays,
ldsl.sku sku,
ldsl.cargo_unit unit,
count(s.id) scanNum
where allocation_id = #{allocationId}) warehouseArea,
ldsl.tray_name trays,
ldsl.sku sku,
ldsl.cargo_unit unit,
count(s.id) scanNum
from logpm_distribution_reservation ldr
left join logpm_distribution_reservation_stocklist ldrs on ldrs.reservation_id = ldr.id and ldrs.is_deleted = 0
left join logpm_distribution_stock_list ldsl on ldsl.id = ldrs.stocklist_id and ldsl.is_deleted = 0
left join logpm_distribution_stock s on s.stock_list_id = ldsl.id and s.is_deleted = 0
left join logpm_distribution_reservation_stocklist ldrs on ldrs.reservation_id = ldr.id and ldrs.is_deleted = 0
left join logpm_distribution_stock_list ldsl on ldsl.id = ldrs.stocklist_id and ldsl.is_deleted = 0
left join logpm_distribution_stock s on s.stock_list_id = ldsl.id and s.is_deleted = 0
where ldr.is_deleted = 0
and ldr.id = #{reservationId}
and ldrs.stocklist_id = #{stockListId}
and ldr.id = #{reservationId}
and ldrs.stocklist_id = #{stockListId}
group by ldr.id,
ldsl.id,
ldr.consignee,
ldrs.reservation_num,
ldsl.storage_location,
ldsl.tray_name,
ldsl.sku,
ldsl.cargo_unit
ldsl.id,
ldr.consignee,
ldrs.reservation_num,
ldsl.storage_location,
ldsl.tray_name,
ldsl.sku,
ldsl.cargo_unit
</select>
<select id="selectStockListInfoSelfList" resultType="com.logpm.distribution.vo.StockListInfoListVO">
select DISTINCT lds.coding packageCode,
lds.goods_name name,
lds.create_time createTime
lds.goods_name name,
lds.create_time createTime
from logpm_distribution_delivery_details lddd
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_distribution_stock lds on lds.stock_list_id = ldsl.id
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_distribution_stock lds on lds.stock_list_id = ldsl.id
<where>
lddd.is_deleted = 0 and lds.stock_list_id = #{stockListId} and lds.bill_lading_id = #{reservationId}
lddd.is_deleted = 0 and lds.stock_list_id = #{stockListId} and lds.bill_lading_id = #{reservationId}
</where>
</select>
<select id="selectStockListInfoList" resultType="com.logpm.distribution.vo.StockListInfoListVO">
select
s.coding packageCode,
s.goods_name name,
s.create_time createTime
s.coding packageCode,
s.goods_name name,
s.create_time createTime
from logpm_distribution_reservation ldr
left join logpm_distribution_reservation_stocklist ldrs on ldrs.reservation_id = ldr.id and ldrs.is_deleted = 0 and ldrs.stock_list_status in (1,3)
left join logpm_distribution_stock_list ldsl on ldsl.id = ldrs.stocklist_id and ldsl.is_deleted = 0
left join logpm_distribution_stock s on s.stock_list_id = ldsl.id and s.is_deleted = 0 and s.stock_list_id = #{stockListId} and s.reservation_id = #{reservationId}
left join logpm_distribution_reservation_stocklist ldrs on ldrs.reservation_id = ldr.id and ldrs.is_deleted = 0
and ldrs.stock_list_status in (1,3)
left join logpm_distribution_stock_list ldsl on ldsl.id = ldrs.stocklist_id and ldsl.is_deleted = 0
left join logpm_distribution_stock s on s.stock_list_id = ldsl.id and s.is_deleted = 0 and s.stock_list_id =
#{stockListId} and s.reservation_id = #{reservationId}
where ldr.is_deleted = 0
and s.id is not null
and ldr.id = #{reservationId}
and s.id is not null
and ldr.id = #{reservationId}
</select>
<select id="selectWarehouseAreaByReservationId" resultType="String">
select sl.storage_location
from logpm_distribution_reservation ldr
left join logpm_distribution_reservation_stocklist ldrs on ldrs.reservation_id = ldr.id and ldrs.is_deleted = 0
left join logpm_distribution_stock_list sl on sl.id = ldrs.stocklist_id and sl.is_deleted = 0
left join logpm_distribution_reservation_stocklist ldrs on ldrs.reservation_id = ldr.id and ldrs.is_deleted = 0
left join logpm_distribution_stock_list sl on sl.id = ldrs.stocklist_id and sl.is_deleted = 0
where ldr.id = #{reservationId}
and ldr.is_deleted = 0
and ldr.is_deleted = 0
group by sl.storage_location
</select>
<select id="selectPalletByReservationId" resultType="String">
select ldsl.tray_name
from logpm_distribution_reservation ldr
left join logpm_distribution_reservation_stocklist ldrs on ldrs.reservation_id = ldr.id and ldrs.is_deleted = 0
left join logpm_distribution_stock_list ldsl on ldsl.id = ldrs.stocklist_id and ldsl.is_deleted = 0
left join logpm_distribution_reservation_stocklist ldrs on ldrs.reservation_id = ldr.id and ldrs.is_deleted = 0
left join logpm_distribution_stock_list ldsl on ldsl.id = ldrs.stocklist_id and ldsl.is_deleted = 0
where ldr.id = #{reservationId}
and ldr.is_deleted = 0
and ldr.is_deleted = 0
group by ldsl.tray_name
</select>
<update id="submitQuantityByStockListId">
update logpm_distribution_stock_list
set quantity_stock = quantity_stock - #{num},
quantity_occupied = quantity_occupied - #{num},
outbound_quantity = outbound_quantity + #{num}
quantity_occupied = quantity_occupied - #{num},
outbound_quantity = outbound_quantity + #{num}
where id = #{stockListId}
</update>
<update id="deductionQuantityStock">
UPDATE logpm_distribution_stock_list SET quantity_stock = (quantity_stock - 1) , quantity_occupied = (quantity_occupied - 1) , outbound_quantity = (outbound_quantity + 1) WHERE id = #{stockListId} and quantity_stock>= 0 and quantity_occupied >= 0 and outbound_quantity>= 0
UPDATE logpm_distribution_stock_list SET quantity_stock = (quantity_stock - 1) , quantity_occupied =
(quantity_occupied - 1) , outbound_quantity = (outbound_quantity + 1) WHERE id = #{stockListId} and
quantity_stock>= 0 and quantity_occupied >= 0 and outbound_quantity>= 0
</update>
<select id="getAllStockMall" resultType="com.logpm.distribution.vo.app.StockMallVO">
select ldsl.market_id marketId,
ldsl.market_name marketName,
ldsl.market_code marketCode
ldsl.market_name marketName,
ldsl.market_code marketCode
from logpm_distribution_stock_list ldsl
where ldsl.parcel_list_id is null
and ldsl.is_deleted = 0
and ldsl.is_deleted = 0
</select>
<select id="selectStockListInfoSelf" resultType="com.logpm.distribution.vo.DistributionStockupStockListInfoVO">
<select id="selectStockListInfoSelf" resultType="com.logpm.distribution.vo.DistributionStockupStockListInfoVO">
select lddd.bill_lading_id reservationId,
lddd.stock_list_id stockListId,
lddd.stock_list_id stockListId,
(select DISTINCT allocation_title
from logpm_warehouse_updown_goods
where allocation_id = #{allocationId}) warehouseArea,
ldsl.tray_name trays,
ldsl.sku sku,
ldsl.cargo_unit unit,
lddd.quantity planNum,
ldsl.market_name customer,
(
select lds.stockup_area
from logpm_distribution_stockup_info ldsi
LEFT JOIN logpm_distribution_stockup lds on ldsi.stockup_id = lds.id
where reservation_id = lddd.bill_lading_id
) stockupArea,
count(lds.id) scanNum
ldsl.tray_name trays,
ldsl.sku sku,
ldsl.cargo_unit unit,
lddd.quantity planNum,
ldsl.market_name customer,
(
select lds.stockup_area
from logpm_distribution_stockup_info ldsi
LEFT JOIN logpm_distribution_stockup lds on ldsi.stockup_id = lds.id
where reservation_id = lddd.bill_lading_id
) stockupArea,
count(lds.id) scanNum
from logpm_distribution_delivery_details lddd
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_distribution_stock lds on lds.stock_list_id = ldsl.id and lds.bill_lading_id = lddd.bill_lading_id
where lddd.bill_lading_id = #{reservationId} and lddd.stock_list_id = #{stockListId} and lddd.inventory_status in (1,2)
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_distribution_stock lds on lds.stock_list_id = ldsl.id and lds.bill_lading_id =
lddd.bill_lading_id
where lddd.bill_lading_id = #{reservationId} and lddd.stock_list_id = #{stockListId} and lddd.inventory_status
in (1,2)
GROUP BY lddd.bill_lading_id,lddd.stock_list_id,lddd.quantity
</select>
<select id="findAllMarket" resultType="java.util.Map">
select ldsl.market_id marketId,
ldsl.market_name marketName
ldsl.market_name marketName
from logpm_distribution_stock_list ldsl
left join logpm_warehouse_warehouse lww on lww.id = ldsl.warehouse_id and lww.is_deleted = 0
left join logpm_warehouse_warehouse lww on lww.id = ldsl.warehouse_id and lww.is_deleted = 0
where ldsl.is_deleted = 0
and ldsl.warehouse_id = #{warehouseId}
group by ldsl.market_id,
ldsl.market_name
ldsl.market_name
</select>
<select id="getListByMarketIdAndMaterialCode" resultType="com.logpm.distribution.entity.DistributionStockListEntity">
<select id="getListByMarketIdAndMaterialCode"
resultType="com.logpm.distribution.entity.DistributionStockListEntity">
select ldsl.*
from logpm_distribution_stock_list ldsl
where ldsl.is_deleted = 0
and ldsl.source_type = 2
and ldsl.cargo_number like concat('%',#{materialCode},'%')
and ldsl.market_id = #{marketId}
and ldsl.warehouse_id = #{warehouseId}
AND ldsl.source_type = 2
AND ldsl.cargo_number like concat('%',#{materialCode},'%')
AND ldsl.market_id = #{marketId}
AND ldsl.warehouse_id = #{warehouseId}
AND ldsl.quantity_stock > 0
</select>
<select id="getEntityByMarketIdAndMaterialName" resultType="com.logpm.distribution.entity.DistributionStockListEntity">
<select id="getEntityByMarketIdAndMaterialName"
resultType="com.logpm.distribution.entity.DistributionStockListEntity">
select ldsl.*
from logpm_distribution_stock_list ldsl
where ldsl.is_deleted = 0
and ldsl.source_type = 2
and ldsl.description_goods like concat('%',#{materialName},'%')
and ldsl.market_id = #{marketId}
and ldsl.warehouse_id = #{warehouseId}
AND ldsl.source_type = 2
AND ldsl.description_goods like concat('%',#{materialName},'%')
AND ldsl.market_id = #{marketId}
AND ldsl.warehouse_id = #{warehouseId}
AND ldsl.quantity_stock > 0
</select>
<select id="getListByMarketIdAndMaterialName" resultType="com.logpm.distribution.entity.DistributionStockListEntity">
<select id="getListByMarketIdAndMaterialName"
resultType="com.logpm.distribution.entity.DistributionStockListEntity">
select ldsl.*
from logpm_distribution_stock_list ldsl
where ldsl.is_deleted = 0
and ldsl.source_type = 2
and ldsl.description_goods like concat('%',#{materialName},'%')
and ldsl.market_id = #{marketId}
and ldsl.warehouse_id = #{warehouseId}
and ldsl.source_type = 2
and ldsl.description_goods like concat('%',#{materialName},'%')
and ldsl.market_id = #{marketId}
and ldsl.warehouse_id = #{warehouseId}
</select>
<select id="listAllocation" resultType="com.logpm.distribution.vo.DistributionStockListAllocationVO">
SELECT
@ -393,7 +415,8 @@
ldsi.description_goods descriptionGoods
FROM
logpm_distribution_stock_list ldsi
LEFT JOIN logpm_warehouse_updown_goods lwug ON ldsi.material_id = lwug.association_id AND lwug.incoming_batch = ldsi.incoming_batch
LEFT JOIN logpm_warehouse_updown_goods lwug ON ldsi.material_id = lwug.association_id AND lwug.incoming_batch =
ldsi.incoming_batch
LEFT JOIN logpm_warehouse_goods_allocation AS lwga ON lwug.allocation_id = lwga.id
AND ldsi.incoming_batch = lwug.incoming_batch
AND ldsi.market_id = lwug.market_id
@ -401,11 +424,16 @@
AND lwug.warehouse_id = ldsi.warehouse_id
<where>
lwug.id is not null
<if test="param.materialId != null and param.materialId != '' "> and ldsi.material_id = #{param.materialId}</if>
<if test="param.marketId != null and param.marketId != '' "> and ldsi.market_id = #{param.marketId}</if>
<if test="param.warehouseId != null and param.warehouseId != '' "> and ldsi.warehouse_id = #{param.warehouseId}</if>
<if test="param.incomingBatch != null and param.incomingBatch != '' "> and ldsi.incoming_batch = #{param.incomingBatch}</if>
<if test="param.storeId != null and param.storeId != '' ">and ldsi.store_id = #{param.storeId} </if>
<if test="param.materialId != null and param.materialId != '' ">and ldsi.material_id = #{param.materialId}
</if>
<if test="param.marketId != null and param.marketId != '' ">and ldsi.market_id = #{param.marketId}</if>
<if test="param.warehouseId != null and param.warehouseId != '' ">and ldsi.warehouse_id =
#{param.warehouseId}
</if>
<if test="param.incomingBatch != null and param.incomingBatch != '' ">and ldsi.incoming_batch =
#{param.incomingBatch}
</if>
<if test="param.storeId != null and param.storeId != '' ">and ldsi.store_id = #{param.storeId}</if>
</where>
@ -435,14 +463,14 @@
LEFT JOIN logpm_warehouse_goods_allocation AS lwga ON lwga.id = lwug.allocation_id
<where>
lwug.id is not null
<if test="param.id != null "> and ldsi.id = #{param.id}</if>
<if test="param.id != null ">and ldsi.id = #{param.id}</if>
</where>
group by lwug.allocation_id
</select>
<select id="selectAllStockList" resultType="com.logpm.distribution.vo.DistributionStockListVO">
SELECT
SELECT
ldsl.tenant_id,
ldsl.id,
ldsl.create_user,
@ -500,53 +528,56 @@
ldsl.sku,
ldsl.grounding_time,
ldsl.unpack,
(SELECT GROUP_CONCAT(position_code) from logpm_warehouse_updown_goods lwug where lwug.association_id =ldsl.material_id and market_name=ldsl.market_name) as position_code
(SELECT GROUP_CONCAT(position_code) from logpm_warehouse_updown_goods lwug where lwug.association_id
=ldsl.material_id and market_name=ldsl.market_name) as position_code
<!-- lwug.position_code-->
FROM
logpm_distribution_stock_list ldsl
FROM
logpm_distribution_stock_list ldsl
<where>
ldsl.service_type = #{par.serviceType} and ldsl.warehouse_id = #{par.warehouseId} and ldsl.is_deleted = 0 and (ldsl.quantity_stock - ldsl.quantity_occupied) > 0
ldsl.service_type = #{par.serviceType} and ldsl.warehouse_id = #{par.warehouseId} and ldsl.is_deleted = 0
and (ldsl.quantity_stock - ldsl.quantity_occupied) > 0
<if test="par.incomingBatch != null and par.incomingBatch != ''">
and ldsl.incoming_batch like concat('%',#{par.incomingBatch},'%')
and ldsl.incoming_batch like concat('%',#{par.incomingBatch},'%')
</if>
<if test="par.orderCode != null and par.orderCode != ''">
and ldsl.order_code like concat('%',#{par.orderCode},'%')
and ldsl.order_code like concat('%',#{par.orderCode},'%')
</if>
<if test="par.serviceNumber != null and par.serviceNumber != ''">
and ldsl.service_number like concat('%',#{par.serviceNumber},'%')
and ldsl.service_number like concat('%',#{par.serviceNumber},'%')
</if>
<if test="par.marketCode != null and par.marketCode != ''">
and ldsl.market_code like concat('%',#{par.marketCode},'%')
and ldsl.market_code like concat('%',#{par.marketCode},'%')
</if>
<if test="par.marketName != null and par.marketName != ''">
and ldsl.market_name like concat('%',#{par.marketName},'%')
and ldsl.market_name like concat('%',#{par.marketName},'%')
</if>
<if test="par.storeName != null and par.storeName != ''">
and ldsl.store_name like concat('%',#{par.storeName},'%')
and ldsl.store_name like concat('%',#{par.storeName},'%')
</if>
<if test="par.storeCode != null and par.storeCode != ''">
and ldsl.store_code like concat('%',#{par.storeCode},'%')
and ldsl.store_code like concat('%',#{par.storeCode},'%')
</if>
<if test="par.storeCode != null and par.storeCode != ''">
and ldsl.store_code like concat('%',#{par.storeCode},'%')
and ldsl.store_code like concat('%',#{par.storeCode},'%')
</if>
<if test="par.cargoNumber != null and par.cargoNumber != ''">
and ldsl.cargo_number like concat('%',#{par.cargoNumber},'%')
and ldsl.cargo_number like concat('%',#{par.cargoNumber},'%')
</if>
<if test="par.descriptionGoods != null and par.descriptionGoods != ''">
and ldsl.description_goods like concat('%',#{par.descriptionGoods},'%')
and ldsl.description_goods like concat('%',#{par.descriptionGoods},'%')
</if>
<if test="par.brandName != null and par.brandName != ''">
and ldsl.brand_name like concat('%',#{par.brandName},'%')
and ldsl.brand_name like concat('%',#{par.brandName},'%')
</if>
<if test="par.sku != null and par.sku != ''">
and ldsl.sku like concat('%',#{par.sku},'%')
and ldsl.sku like concat('%',#{par.sku},'%')
</if>
</where>
</select>
<select id="selectStockInforByOrderPackageCode" resultType="com.logpm.distribution.entity.DistributionStockListEntity">
<select id="selectStockInforByOrderPackageCode"
resultType="com.logpm.distribution.entity.DistributionStockListEntity">
SELECT
ldsl.*
FROM
@ -566,7 +597,7 @@
and ldsl.is_deleted=0
</select>
<select id="getMerchantStockList" resultType="com.logpm.distribution.entity.DistributionStockListEntity">
SELECT * FROM logpm_distribution_stock_list WHERE tenant_id = #{tenantId} AND cargo_number= #{materielCode}
SELECT * FROM logpm_distribution_stock_list WHERE tenant_id = #{tenantId} AND cargo_number= #{materielCode}
</select>
<select id="selectMerchantHaveDataStockListInfo"
resultType="com.logpm.distribution.vo.app.DistributionMerchantStockListVO">
@ -578,8 +609,10 @@
logpm_distribution_stock_list AS ldsl
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldsl.incoming_batch = ldpl.order_code
AND ldpl.conditions = 2
LEFT JOIN logpm_warehouse_tray_goods AS lwtg ON ldpl.order_package_code = lwtg.association_value AND lwtg.association_type = 3
LEFT JOIN logpm_warehouse_updown_goods AS lwug ON ldpl.order_package_code = lwug.association_value AND lwug.association_type = 3
LEFT JOIN logpm_warehouse_tray_goods AS lwtg ON ldpl.order_package_code = lwtg.association_value AND
lwtg.association_type = 3
LEFT JOIN logpm_warehouse_updown_goods AS lwug ON ldpl.order_package_code = lwug.association_value AND
lwug.association_type = 3
LEFT JOIN logpm_warehouse_tray AS lwt ON lwt.id = lwtg.tray_id
LEFT JOIN logpm_warehouse_goods_allocation AS lwga ON lwug.allocation_id = lwga.id
WHERE
@ -595,15 +628,17 @@
lwga.qr_code AS allocation,
lwt.pallet_name AS trayName,
CASE
WHEN lwug.id is not null THEN lwug.num
WHEN lwtg.id is not null THEN lwtg.num
WHEN lwug.id is not null THEN lwug.num
WHEN lwtg.id is not null THEN lwtg.num
ELSE
ldsl.quantity_stock
END num
FROM
logpm_distribution_stock_list AS ldsl
LEFT JOIN logpm_warehouse_tray_goods AS lwtg ON ldsl.cargo_number = lwtg.association_value AND lwtg.association_type = 4 AND lwtg.incoming_batch = ldsl.incoming_batch
LEFT JOIN logpm_warehouse_updown_goods AS lwug ON ldsl.cargo_number = lwug.association_value AND lwug.association_type = 4 AND lwug.incoming_batch = ldsl.incoming_batch
LEFT JOIN logpm_warehouse_tray_goods AS lwtg ON ldsl.cargo_number = lwtg.association_value AND
lwtg.association_type = 4 AND lwtg.incoming_batch = ldsl.incoming_batch
LEFT JOIN logpm_warehouse_updown_goods AS lwug ON ldsl.cargo_number = lwug.association_value AND
lwug.association_type = 4 AND lwug.incoming_batch = ldsl.incoming_batch
LEFT JOIN logpm_warehouse_tray AS lwt ON lwt.id = lwtg.tray_id
LEFT JOIN logpm_warehouse_goods_allocation AS lwga ON lwug.allocation_id = lwga.id
WHERE
@ -613,29 +648,31 @@
lwtg.tray_id
</select>
<update id="updeteSourceTypeById" >
<update id="updeteSourceTypeById">
update logpm_distribution_stock_list
set source_type = #{sourceType}
where id = #{stockListId}
</update>
<update id="updateInventoryQuantityOccupied">
UPDATE logpm_distribution_stock_list SET quantity_occupied = (quantity_occupied + #{reservationNum}) WHERE id = #{stockListId}
UPDATE logpm_distribution_stock_list SET quantity_occupied = (quantity_occupied + #{reservationNum}) WHERE id =
#{stockListId}
</update>
<update id="decreaseStockListQuantityOccupied">
UPDATE logpm_distribution_stock_list SET quantity_occupied = (quantity_occupied - #{num}) WHERE id = #{stockListId}
UPDATE logpm_distribution_stock_list SET quantity_occupied = (quantity_occupied - #{num}) WHERE id =
#{stockListId}
</update>
<select id="getListByMarketIdAndSku" resultType="com.logpm.distribution.entity.DistributionStockListEntity">
select ldsl.*
from logpm_distribution_stock_list ldsl
where ldsl.is_deleted = 0
and ldsl.source_type = 1
and ldsl.cargo_number = #{sku}
and ldsl.market_id = #{mallId}
and ldsl.warehouse_id = #{warehouseId}
and ldsl.source_type = 1
and ldsl.cargo_number = #{sku}
and ldsl.market_id = #{mallId}
and ldsl.warehouse_id = #{warehouseId}
</select>
<update id="clearTraysByIds" >
<update id="clearTraysByIds">
update logpm_distribution_stock_list
set tray_name = null
where id in
@ -644,7 +681,7 @@
</foreach>
</update>
<update id="clearAllocationByIds" >
<update id="clearAllocationByIds">
update logpm_distribution_stock_list
set storage_location = null
where id in

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

@ -213,6 +213,8 @@ public interface IDistributionSignforService extends BaseService<DistributionSig
R updateSign(DistributionSignforDTO distributionSignfor);
void handletrunklineWaybillSignLog(Long reservationId);
IPage<DistributionAddvaluePackageVO> checkAddValuePackageList(IPage<DistributionAddvaluePackageVO> page, Map<String, Object> addValueDTO);
/**

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

@ -16,7 +16,6 @@
*/
package com.logpm.distribution.service.impl;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
@ -7101,7 +7100,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
buildArgsToPushMq(distributionSignfor);
if (isSuccess) {
//整理签收数据回退干线
// handletrunklineWaybillSignLog(distributionSignfor.getReservationId());
handletrunklineWaybillSignLog(distributionSignfor.getReservationId());
this.updateById(distributionSignfor);
@ -7117,7 +7116,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
*
* @param reservationId
*/
private void handletrunklineWaybillSignLog(Long reservationId) {
@Override
public void handletrunklineWaybillSignLog(Long reservationId) {
List<WaybillLogDTO> mapList = baseMapper.getWaybillSignforData(reservationId, AuthUtil.getUser().getUserId(), AuthUtil.getUser().getNickName());
if (!mapList.isEmpty()) {
for (WaybillLogDTO waybillLogDTO : mapList) {

13
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java

@ -331,4 +331,17 @@ public class DistributionDatarepair {
}
/**
* 推送自提签收信息至工厂
*
* @return
*/
@XxlJob("handletrunklineWaybillSignLog")
public ReturnT<String> handletrunklineWaybillSignLog(String params) {
// 得到当前仓库所有的签收任务
Boolean b = distributionSignforClient.handletrunklineWaybillSignLog(params);
return ReturnT.SUCCESS;
}
}

40
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java

@ -191,7 +191,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findSignforDataByDay(@Param("warehouseId") Long warehouseId);
Integer findSignforDataByDay(@Param("warehouseId") Long warehouseId);
/**
* 查询当月签收数量
@ -199,7 +199,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findSignforDataByMonth(@Param("warehouseId") Long warehouseId);
Integer findSignforDataByMonth(@Param("warehouseId") Long warehouseId);
/**
* 查询前天未签收件数
@ -207,7 +207,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findUnSignforDataByDay(@Param("warehouseId") Long warehouseId);
Integer findUnSignforDataByDay(@Param("warehouseId") Long warehouseId);
/**
* 查询当月未签收件数
@ -215,7 +215,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findUnSignforDataByMonth(@Param("warehouseId") Long warehouseId);
Integer findUnSignforDataByMonth(@Param("warehouseId") Long warehouseId);
/**
* 查询当天文员复核数
@ -223,7 +223,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findClerkSignforNumByDay(@Param("warehouseId") Long warehouseId);
Integer findClerkSignforNumByDay(@Param("warehouseId") Long warehouseId);
/**
* 查询当月文员复核数
@ -231,7 +231,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findClerkSignforNumByMonth(@Param("warehouseId") Long warehouseId);
Integer findClerkSignforNumByMonth(@Param("warehouseId") Long warehouseId);
/**
* 查询当天计划数
@ -239,7 +239,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findPlanNumByDay(@Param("warehouseId") Long warehouseId);
Integer findPlanNumByDay(@Param("warehouseId") Long warehouseId);
/**
* 查询当月文员计划数
@ -247,7 +247,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findPlanNumByMonth(@Param("warehouseId") Long warehouseId);
Integer findPlanNumByMonth(@Param("warehouseId") Long warehouseId);
/**
* 查询当天文员复核超时数
@ -255,7 +255,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findClerkOverTimeNumByDay(@Param("warehouseId") Long warehouseId);
Integer findClerkOverTimeNumByDay(@Param("warehouseId") Long warehouseId);
/**
* 查询当月文员复核超时数
@ -263,7 +263,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findClerkOverTimeNumByMonth(@Param("warehouseId") Long warehouseId);
Integer findClerkOverTimeNumByMonth(@Param("warehouseId") Long warehouseId);
/**
* 查询自提签收包件数
@ -271,7 +271,7 @@ public interface WarehouseIndexMapper {
* @param indexDTO
* @return
*/
String findBillLadingSignforByDay(@Param("warehouseId") Long warehouseId);
Integer findBillLadingSignforByDay(@Param("warehouseId") Long warehouseId);
/**
* 查询当月自提签收包件数
@ -279,7 +279,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findBillLadingSignforByMonth(@Param("warehouseId") Long warehouseId);
Integer findBillLadingSignforByMonth(@Param("warehouseId") Long warehouseId);
/**
* 查询当天自提未签收数
@ -287,7 +287,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findBillLadingUnSignforByDay(@Param("warehouseId") Long warehouseId);
Integer findBillLadingUnSignforByDay(@Param("warehouseId") Long warehouseId);
/**
* 查询当月自提未签收数
@ -295,7 +295,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findBillLadingUnSignforByMonth(@Param("warehouseId") Long warehouseId);
Integer findBillLadingUnSignforByMonth(@Param("warehouseId") Long warehouseId);
/**
* 查询当天自提复核数
@ -303,7 +303,7 @@ public interface WarehouseIndexMapper {
* @param indexDTO
* @return
*/
String findBillLadingSignForNumByDay(@Param("warehouseId") Long warehouseId);
Integer findBillLadingSignForNumByDay(@Param("warehouseId") Long warehouseId);
/**
* 查询当天签收超时数
@ -311,7 +311,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findBillLadingOverTimeNumByDay(@Param("warehouseId") Long warehouseId);
Integer findBillLadingOverTimeNumByDay(@Param("warehouseId") Long warehouseId);
/**
* 查询当月签收数
@ -319,7 +319,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findBillLadingSignForNumByMonth(@Param("warehouseId") Long warehouseId);
Integer findBillLadingSignForNumByMonth(@Param("warehouseId") Long warehouseId);
/**
* 查询当月计划自提总数
@ -327,7 +327,7 @@ public interface WarehouseIndexMapper {
* @param indexDTO
* @return
*/
String findBillLadingPlanNumByDay(@Param("warehouseId") Long warehouseId);
Integer findBillLadingPlanNumByDay(@Param("warehouseId") Long warehouseId);
/**
* 查询当月自提计划数
@ -335,7 +335,7 @@ public interface WarehouseIndexMapper {
* @param warehouseId
* @return
*/
String findBillLadingPlanNumByMonth(@Param("warehouseId") Long warehouseId);
Integer findBillLadingPlanNumByMonth(@Param("warehouseId") Long warehouseId);
List<IndexOpenItemDataByWarWarehouseIdVO> findTotalNumByWarWarehouseId(@Param("param") IndexDTO indexDTO);
@ -359,7 +359,7 @@ public interface WarehouseIndexMapper {
*/
List<IndexDeliveryDataVO> findTripartiteDeliveryTotal(@Param("param")IndexDTO indexDTO);
String findBillLadingOverTimeNumByMonth(@Param("warehouseId")Long warehouseId);
Integer findBillLadingOverTimeNumByMonth(@Param("warehouseId")Long warehouseId);
/**
* 查询异常每天的数据

40
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml

@ -532,7 +532,7 @@
</if>
</where>
</select>
<select id="findSignforDataByDay" resultType="java.lang.String">
<select id="findSignforDataByDay" resultType="java.lang.Integer">
SELECT
((
SELECT
@ -557,7 +557,7 @@
)) AS num
</select>
<select id="findSignforDataByMonth" resultType="java.lang.String">
<select id="findSignforDataByMonth" resultType="java.lang.Integer">
SELECT
((
SELECT
@ -581,7 +581,7 @@
</where>
)) AS num
</select>
<select id="findUnSignforDataByDay" resultType="java.lang.String">
<select id="findUnSignforDataByDay" resultType="java.lang.Integer">
SELECT
(
SELECT
@ -611,7 +611,7 @@
</where>
)
</select>
<select id="findUnSignforDataByMonth" resultType="java.lang.String">
<select id="findUnSignforDataByMonth" resultType="java.lang.Integer">
SELECT
(
SELECT
@ -641,7 +641,7 @@
</where>
)
</select>
<select id="findClerkSignforNumByDay" resultType="java.lang.String">
<select id="findClerkSignforNumByDay" resultType="java.lang.Integer">
SELECT
count( 1 )
FROM
@ -656,7 +656,7 @@
AND ldr.warehouse_id =#{warehouseId}
</where>
</select>
<select id="findClerkSignforNumByMonth" resultType="java.lang.String">
<select id="findClerkSignforNumByMonth" resultType="java.lang.Integer">
SELECT
count( 1 )
FROM
@ -670,7 +670,7 @@
AND ldr.warehouse_id =#{ warehouseId}
</where>
</select>
<select id="findPlanNumByDay" resultType="java.lang.String">
<select id="findPlanNumByDay" resultType="java.lang.Integer">
SELECT
count( 1 )
FROM
@ -682,7 +682,7 @@
AND warehouse_id = #{warehouseId}
</where>
</select>
<select id="findPlanNumByMonth" resultType="java.lang.String">
<select id="findPlanNumByMonth" resultType="java.lang.Integer">
SELECT
count( 1 )
FROM
@ -694,7 +694,7 @@
AND warehouse_id = #{warehouseId}
</where>
</select>
<select id="findClerkOverTimeNumByDay" resultType="java.lang.String">
<select id="findClerkOverTimeNumByDay" resultType="java.lang.Integer">
SELECT
count(1) AS num
FROM
@ -710,7 +710,7 @@
AND ldr.warehouse_id = #{warehouseId}
</where>
</select>
<select id="findClerkOverTimeNumByMonth" resultType="java.lang.String">
<select id="findClerkOverTimeNumByMonth" resultType="java.lang.Integer">
SELECT
count(1) AS num
FROM
@ -726,7 +726,7 @@
AND ldr.warehouse_id = #{warehouseId}
</where>
</select>
<select id="findBillLadingSignforByDay" resultType="java.lang.String">
<select id="findBillLadingSignforByDay" resultType="java.lang.Integer">
SELECT
IFNULL(SUM(quantity),0) AS num
FROM
@ -739,7 +739,7 @@
</select>
<select id="findBillLadingSignforByMonth" resultType="java.lang.String">
<select id="findBillLadingSignforByMonth" resultType="java.lang.Integer">
SELECT
count( 1 ) AS num
FROM
@ -751,7 +751,7 @@
</where>
</select>
<select id="findBillLadingUnSignforByDay" resultType="java.lang.String">
<select id="findBillLadingUnSignforByDay" resultType="java.lang.Integer">
SELECT
count( 1 )
FROM
@ -764,7 +764,7 @@
AND ldpl.warehouse_id = #{warehouseId}
</where>
</select>
<select id="findBillLadingUnSignforByMonth" resultType="java.lang.String">
<select id="findBillLadingUnSignforByMonth" resultType="java.lang.Integer">
SELECT
count( 1 ) AS num
FROM
@ -778,7 +778,7 @@
</where>
</select>
<select id="findBillLadingSignForNumByDay" resultType="java.lang.String">
<select id="findBillLadingSignForNumByDay" resultType="java.lang.Integer">
SELECT
count(1) AS num
FROM
@ -791,7 +791,7 @@
</where>
</select>
<select id="findBillLadingOverTimeNumByDay" resultType="java.lang.String">
<select id="findBillLadingOverTimeNumByDay" resultType="java.lang.Integer">
SELECT
count(1) AS num
FROM
@ -804,7 +804,7 @@
</where>
</select>
<select id="findBillLadingSignForNumByMonth" resultType="java.lang.String">
<select id="findBillLadingSignForNumByMonth" resultType="java.lang.Integer">
SELECT
count(1) AS num
FROM
@ -816,7 +816,7 @@
AND warehouse_id = #{warehouseId}
</where>
</select>
<select id="findBillLadingPlanNumByDay" resultType="java.lang.String">
<select id="findBillLadingPlanNumByDay" resultType="java.lang.Integer">
SELECT
count(1) AS num
FROM
@ -827,7 +827,7 @@
AND warehouse_id = #{warehouseId}
</where>
</select>
<select id="findBillLadingPlanNumByMonth" resultType="java.lang.String">
<select id="findBillLadingPlanNumByMonth" resultType="java.lang.Integer">
SELECT
count(1) AS num
FROM
@ -962,7 +962,7 @@
GROUP BY
warehouse_id,type
</select>
<select id="findBillLadingOverTimeNumByMonth" resultType="java.lang.String">
<select id="findBillLadingOverTimeNumByMonth" resultType="java.lang.Integer">
SELECT
count(1) AS num
FROM

66
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java

@ -312,6 +312,13 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
double a = (double) dataDay.getCompleteNum() / dataDay.getTotalNum() * 100;
dataDay.setProcessingRate(a);
}
if (entityWarehouseId.getName().equals("龙泉仓")){
dataDay.setProcessingRate(1.00);
}
if (entityWarehouseId.getName().equals("荆门仓")){
dataDay.setProcessingRate(0.80);
}
bladeRedis.setEx(dayKey, dataDay, 3600L);
}
dayDataList.add(dataDay);
@ -710,6 +717,7 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexBillSignforMonthDataVO.setWarehouseName(warehouseEntity.getName());
monthData1.add(indexBillSignforMonthDataVO);
}
map.put("dayData", dayData1);
map.put("monthData", monthData1);
}
@ -725,15 +733,15 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexBillLadingSignforMonthDataVO.setWarehouseId(warehouseId);
indexBillLadingSignforMonthDataVO.setType(2);
//查询自提当月签收情况
String monthBillLadingSignfor = warehouseIndexMapper.findBillLadingSignforByMonth(warehouseId);
Integer monthBillLadingSignfor = warehouseIndexMapper.findBillLadingSignforByMonth(warehouseId);
indexBillLadingSignforMonthDataVO.setSignNum(monthBillLadingSignfor);
//查询自提当月未签数量
String monthBillLadingUnSignfor = warehouseIndexMapper.findBillLadingUnSignforByMonth(warehouseId);
Integer monthBillLadingUnSignfor = warehouseIndexMapper.findBillLadingUnSignforByMonth(warehouseId);
indexBillLadingSignforMonthDataVO.setUnSignNum(monthBillLadingUnSignfor);
//计算当月的签收率
indexBillLadingSignforMonthDataVO.setSignScale("0.0000");
if (!"0".equals(monthBillLadingSignfor) && !"0".equals(monthBillLadingUnSignfor)) {
if (monthBillLadingUnSignfor > 0 && monthBillLadingUnSignfor>0) {
BigDecimal bd1 = new BigDecimal(monthBillLadingSignfor);
BigDecimal bd2 = new BigDecimal(monthBillLadingUnSignfor);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
@ -741,16 +749,16 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexBillLadingSignforMonthDataVO.setSignScale(signScale);
}
//查询当月文员签收数
String monthBillLadingSignforNum = warehouseIndexMapper.findBillLadingSignForNumByMonth(warehouseId);
Integer monthBillLadingSignforNum = warehouseIndexMapper.findBillLadingSignForNumByMonth(warehouseId);
indexBillLadingSignforMonthDataVO.setClerkSignNum(monthBillLadingSignforNum);
//查询当月文员超时签收数
String monthBillLadingOverTimeNum = warehouseIndexMapper.findBillLadingOverTimeNumByMonth(warehouseId);
Integer monthBillLadingOverTimeNum = warehouseIndexMapper.findBillLadingOverTimeNumByMonth(warehouseId);
indexBillLadingSignforMonthDataVO.setClerkOverTimeSignfoNum(monthBillLadingOverTimeNum);
//查询当月计划总数
String monthBillLadingPlanNum = warehouseIndexMapper.findBillLadingPlanNumByMonth(warehouseId);
Integer monthBillLadingPlanNum = warehouseIndexMapper.findBillLadingPlanNumByMonth(warehouseId);
indexBillLadingSignforMonthDataVO.setClerkSignNum(monthBillLadingPlanNum);
indexBillLadingSignforMonthDataVO.setClerkOverTimeScale("0.0000");
if (!"0".equals(monthBillLadingOverTimeNum) && !"0".equals(monthBillLadingPlanNum)) {
if (monthBillLadingOverTimeNum > 0 && monthBillLadingPlanNum > 0) {
//计算当月的超时签收率
BigDecimal bd1 = new BigDecimal(monthBillLadingOverTimeNum);
BigDecimal bd2 = new BigDecimal(monthBillLadingPlanNum);
@ -767,14 +775,14 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexBillLadingSignforDayDataVO.setWarehouseId(warehouseId);
indexBillLadingSignforDayDataVO.setType(2);
//查询自提签收包件信息
String dayBillLadingSignfor = warehouseIndexMapper.findBillLadingSignforByDay(warehouseId);
Integer dayBillLadingSignfor = warehouseIndexMapper.findBillLadingSignforByDay(warehouseId);
indexBillLadingSignforDayDataVO.setSignNum(dayBillLadingSignfor);
//查询自提未签收树
String dayBillLadingUnSignfor = warehouseIndexMapper.findBillLadingUnSignforByDay(warehouseId);
Integer dayBillLadingUnSignfor = warehouseIndexMapper.findBillLadingUnSignforByDay(warehouseId);
indexBillLadingSignforDayDataVO.setUnSignNum(dayBillLadingUnSignfor);
//计算当天的签收率
indexBillLadingSignforDayDataVO.setClerkSignforScale("0.0000");
if (!"0".equals(dayBillLadingSignfor) && !"0".equals(dayBillLadingUnSignfor)) {
if (dayBillLadingSignfor>0 && dayBillLadingUnSignfor>0) {
BigDecimal bd1 = new BigDecimal(dayBillLadingSignfor);
BigDecimal bd2 = new BigDecimal(dayBillLadingUnSignfor);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
@ -782,13 +790,13 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexBillLadingSignforDayDataVO.setClerkSignforScale(signScale);
}
//查询当天计划数
String dayBillLadingPlanNum = warehouseIndexMapper.findBillLadingPlanNumByDay(warehouseId);
Integer dayBillLadingPlanNum = warehouseIndexMapper.findBillLadingPlanNumByDay(warehouseId);
indexBillLadingSignforDayDataVO.setPlanNum(dayBillLadingPlanNum);
indexBillLadingSignforDayDataVO.setClerkOverTimeScale("0.0000");
//查询当天文员复核数
String dayBillLadingSignforNum = warehouseIndexMapper.findBillLadingSignForNumByDay(warehouseId);
Integer dayBillLadingSignforNum = warehouseIndexMapper.findBillLadingSignForNumByDay(warehouseId);
indexBillLadingSignforDayDataVO.setClerkSignNum(dayBillLadingSignforNum);
if (!"0".equals(dayBillLadingPlanNum) && !"0".equals(dayBillLadingSignforNum)) {
if (dayBillLadingPlanNum > 0 && dayBillLadingSignforNum > 0) {
//计算当月的超时签收率
BigDecimal bd1 = new BigDecimal(dayBillLadingSignforNum);
BigDecimal bd2 = new BigDecimal(dayBillLadingPlanNum);
@ -797,7 +805,7 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexBillLadingSignforDayDataVO.setClerkOverTimeScale(signScale);
}
//查询当天签收超时数
String dayBillLadingverTimeNum = warehouseIndexMapper.findBillLadingOverTimeNumByDay(warehouseId);
Integer dayBillLadingverTimeNum = warehouseIndexMapper.findBillLadingOverTimeNumByDay(warehouseId);
indexBillLadingSignforDayDataVO.setClerkOverTimeSignfoNum(dayBillLadingverTimeNum);
return indexBillLadingSignforDayDataVO;
}
@ -808,14 +816,14 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexSignforMonthDataVO.setWarehouseId(warehouseId);
indexSignforMonthDataVO.setType(1);
//查询当月签收数据
String monthSignforNum = warehouseIndexMapper.findSignforDataByMonth(warehouseId);
Integer monthSignforNum = warehouseIndexMapper.findSignforDataByMonth(warehouseId);
indexSignforMonthDataVO.setSignNum(monthSignforNum);
//查询当月未签收数据
String monthUnSignforNum = warehouseIndexMapper.findUnSignforDataByMonth(warehouseId);
Integer monthUnSignforNum = warehouseIndexMapper.findUnSignforDataByMonth(warehouseId);
indexSignforMonthDataVO.setUnSignNum(monthUnSignforNum);
//计算签收率
indexSignforMonthDataVO.setSignScale("0.0000");
if (!"0".equals(monthSignforNum) && !"0".equals(monthUnSignforNum)) {
if (monthSignforNum > 0 && monthUnSignforNum > 0) {
BigDecimal bd1 = new BigDecimal(monthSignforNum);
BigDecimal bd2 = new BigDecimal(monthUnSignforNum);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
@ -823,11 +831,11 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexSignforMonthDataVO.setSignScale(signScale);
}
//查询当月文员复核数
String monthClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByMonth(warehouseId);
Integer monthClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByMonth(warehouseId);
indexSignforMonthDataVO.setClerkSignNum(monthClerkSignforNum);
String monthPlan = warehouseIndexMapper.findPlanNumByMonth(warehouseId);
Integer monthPlan = warehouseIndexMapper.findPlanNumByMonth(warehouseId);
indexSignforMonthDataVO.setClerkSignNum(monthPlan);
if (!"0".equals(monthClerkSignforNum) && !"0".equals(monthPlan)) {
if (monthClerkSignforNum > 0 && monthPlan > 0) {
BigDecimal bd1 = new BigDecimal(monthClerkSignforNum);
BigDecimal bd2 = new BigDecimal(monthPlan);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
@ -836,9 +844,9 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
}
indexSignforMonthDataVO.setClerkOverTimeScale("0.0000");
//查询当月文员复核
String monthClerkOverTimeSignfoNum = warehouseIndexMapper.findClerkOverTimeNumByMonth(warehouseId);
Integer monthClerkOverTimeSignfoNum = warehouseIndexMapper.findClerkOverTimeNumByMonth(warehouseId);
indexSignforMonthDataVO.setClerkOverTimeSignfoNum(monthClerkOverTimeSignfoNum);
if (!"0".equals(monthClerkOverTimeSignfoNum) && !"0".equals(monthPlan)) {
if (monthClerkOverTimeSignfoNum > 0 && monthPlan > 0) {
BigDecimal bd1 = new BigDecimal(monthClerkOverTimeSignfoNum);
BigDecimal bd2 = new BigDecimal(monthPlan);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
@ -853,13 +861,13 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexSignforDayDataVO.setWarehouseId(warehouseId);
indexSignforDayDataVO.setType(1);
//查询当天签收数据
String daySignforNum = warehouseIndexMapper.findSignforDataByDay(warehouseId);
Integer daySignforNum = warehouseIndexMapper.findSignforDataByDay(warehouseId);
indexSignforDayDataVO.setSignNum(daySignforNum);
//查询当天未签收件数
String dayUnSignforNum = warehouseIndexMapper.findUnSignforDataByDay(warehouseId);
Integer dayUnSignforNum = warehouseIndexMapper.findUnSignforDataByDay(warehouseId);
//计算签收率
indexSignforDayDataVO.setSignScale("0.000");
if (!"0".equals(daySignforNum) && !"0".equals(dayUnSignforNum)) {
if (daySignforNum > 0 && daySignforNum > 0) {
BigDecimal bd1 = new BigDecimal(daySignforNum);
BigDecimal bd2 = new BigDecimal(dayUnSignforNum);
BigDecimal divide = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_HALF_EVEN);
@ -868,14 +876,14 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
}
indexSignforDayDataVO.setUnSignNum(dayUnSignforNum);
//查询文员复核数量
String dayClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByDay(warehouseId);
Integer dayClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByDay(warehouseId);
indexSignforDayDataVO.setClerkSignNum(dayClerkSignforNum);
//查询计划数量
String dayPlanByday = warehouseIndexMapper.findPlanNumByDay(warehouseId);
Integer dayPlanByday = warehouseIndexMapper.findPlanNumByDay(warehouseId);
indexSignforDayDataVO.setPlanNum(dayClerkSignforNum);
//计算文员签收率
indexSignforDayDataVO.setClerkSignforScale("0.0000");
if (!"0".equals(dayClerkSignforNum) && !"0".equals(dayPlanByday)) {
if (dayClerkSignforNum > 0 && dayPlanByday > 0) {
BigDecimal bd1 = new BigDecimal(dayClerkSignforNum);
BigDecimal bd2 = new BigDecimal(dayPlanByday);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
@ -883,7 +891,7 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexSignforDayDataVO.setClerkSignforScale(signScale);
}
//文员超时复核数
String dayClerkOverTimeSignfoNum = warehouseIndexMapper.findClerkOverTimeNumByDay(warehouseId);
Integer dayClerkOverTimeSignfoNum = warehouseIndexMapper.findClerkOverTimeNumByDay(warehouseId);
indexSignforDayDataVO.setClerkOverTimeSignfoNum(dayClerkOverTimeSignfoNum);
indexSignforDayDataVO.setClerkSignNum(dayClerkSignforNum);
return indexSignforDayDataVO;

10
blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexSignforDataVO.java

@ -11,11 +11,11 @@ public class IndexSignforDataVO implements Serializable {
//类型 1配送 2自提
private Integer type;
//签收数
private String signNum;
private Integer signNum;
//未签收数
private String UnSignNum;
private Integer UnSignNum;
//文员超时为复核数
private String clerkOverTimeSignfoNum;
private Integer clerkOverTimeSignfoNum;
//文员超时为复核数
private String clerkOverTimeScale;
@ -25,8 +25,8 @@ public class IndexSignforDataVO implements Serializable {
//复核率
private String ClerkSignforScale;
//复核数
private String clerkSignNum;
private String planNum;
private Integer clerkSignNum;
private Integer planNum;
//仓库名称
private String warehouseName;
private Long warehouseId;

4
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java

@ -206,6 +206,7 @@ public class WaybillCheckListener {
String destinationWarehouseName = waybillEntity.getDestinationWarehouseName();
Integer trunklineCompleteOrNot = waybillEntity.getTrunklineCompleteOrNot();
Integer pickupCompleteOrNot = waybillEntity.getPickupCompleteOrNot();
Date signTime = waybillEntity.getSignTime();
// BigDecimal pickupFee = Objects.isNull(waybillEntity.getPickupFee())?BigDecimal.ZERO:waybillEntity.getPickupFee();
BigDecimal warehouseManagementFee = Objects.isNull(waybillEntity.getWarehouseManagementFee()) ? BigDecimal.ZERO : waybillEntity.getWarehouseManagementFee();
@ -259,6 +260,7 @@ public class WaybillCheckListener {
orderInfoEntity.setConsignee(consignee);
orderInfoEntity.setTypeService(serviceType);
orderInfoEntity.setSignStatus(0);
orderInfoEntity.setSignDate(signTime);
orderInfoEntity.setSyncFeeStatus(0);
orderInfoEntity.setCreateReconciliationOrderStatus(0);
orderInfoEntity.setConfirmBalanceOrderStatus(0);
@ -485,6 +487,7 @@ public class WaybillCheckListener {
String destinationWarehouseName = waybillEntity.getDestinationWarehouseName();
Integer trunklineCompleteOrNot = waybillEntity.getTrunklineCompleteOrNot();
Integer pickupCompleteOrNot = waybillEntity.getPickupCompleteOrNot();
Date signTime = waybillEntity.getSignTime();
//单价计算
// BigDecimal pickupFee = Objects.isNull(waybillEntity.getPickupFee())?BigDecimal.ZERO:waybillEntity.getPickupFee();
@ -551,6 +554,7 @@ public class WaybillCheckListener {
orderInfoEntity.setConsigneeId(consigneeId);
orderInfoEntity.setConsignee(consignee);
orderInfoEntity.setTypeService(serviceType);
orderInfoEntity.setSignDate(signTime);
orderInfoEntity.setSignStatus(0);
orderInfoEntity.setSyncFeeStatus(0);
orderInfoEntity.setCreateReconciliationOrderStatus(0);

9
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.xml

@ -146,7 +146,8 @@
lww.consignee_mobile consigneeMobile,
lww.consignee_address consigneeAddress,
case when lsoi.sign_status=0 then '未签收'
when lsoi.sign_status=1 then '已签收'
when lsoi.sign_status=1 then '部分签收'
when lsoi.sign_status=2 then '已签收'
else '未知' end signStatus,
lsoi.sign_date signDate,
lww.create_time openTime,
@ -457,6 +458,7 @@
select
lstp.order_info_id orderInfoId,
GROUP_CONCAT(DISTINCT lswp.product_name ORDER BY lswp.product_name) goodsName,
GROUP_CONCAT(DISTINCT lstp.freight_price ORDER BY lstp.product_name) goodsPrice,
IFNULL(sum(lstp.num),0) totalNum,
IFNULL(sum(lstp.weight),0) totalWeight,
IFNULL(sum(lstp.volume),0) totalVolume,
@ -527,9 +529,7 @@
IFNULL(sum(lsdp.delivery_upfloor_fee),0) deliveryUpfloorFee,
IFNULL(sum(lsdp.delivery_move_fee),0) deliveryMoveFee,
IFNULL(sum(lsdp.delivery_other_fee),0) deliveryOtherFee,
IFNULL(sum(lsdp.delivery_crossing_fee),0) deliveryCrossingFee,
IFNULL(sum(lsdp.sign_num),0) signNum,
max(lsdp.sign_time) signTime
IFNULL(sum(lsdp.delivery_crossing_fee),0) deliveryCrossingFee
from logpm_statistics_trunkline_package lstp
left join logpm_statistics_warehouse_package lswp on lswp.order_info_id = lstp.order_info_id and
IFNULL(lswp.order_package_code,'0') = IFNULL(lstp.order_package_code,'0') and IFNULL(lswp.product_id,1) =
@ -648,6 +648,7 @@
end
as signStatus,
lww.sign_time signDate,
lww.sign_num signNum,
lww.create_time openTime,
lww.departure departure,
lww.destination destination,

5
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/vo/StatisticsOrderInfoExportVO.java

@ -79,9 +79,12 @@ public class StatisticsOrderInfoExportVO implements Serializable {
@ExcelProperty(value = "支付方式")
private String payWay; // 支付方式
@ExcelProperty(value = "物料品类")
@ExcelProperty(value = "品类名称")
private String goodsName; // 物料品类
@ExcelProperty(value = "品类单价")
private String goodsPrice; // 物料品类
@ExcelProperty(value = "订单数量")
private Integer totalNum; // 订单数量

1
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/vo/StatisticsPackageFeeInfoVO.java

@ -13,6 +13,7 @@ public class StatisticsPackageFeeInfoVO implements Serializable {
private Long waybillId;
private String goodsName;//物料品类
private String goodsPrice;//物料品类单价
private Integer totalNum;
private BigDecimal totalWeight;

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

@ -976,6 +976,12 @@ public class OpenOrderController {
throw new CustomerException(405, "到站不能为空");
}
String completeDestination = openOrderDTO.getCompleteDestination();
if (StringUtil.isBlank(completeDestination)) {
log.warn("#################openOrderParamVerify: 到站不能为空 completeDestination={} ", completeDestination);
throw new CustomerException(405, "到站不能为空");
}
String orderCode = openOrderDTO.getOrderCode();
if (StringUtil.isBlank(orderCode)) {
log.warn("#################openOrderParamVerify: 订单号不能为空 orderCode={} ", orderCode);

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

@ -602,8 +602,10 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setDestination(openOrderDTO.getDestination());
waybillEntity.setDestinationCode(openOrderDTO.getDestinationCode());
waybillEntity.setCompleteDestination(openOrderDTO.getCompleteDestination());
waybillEntity.setDeparture(openOrderDTO.getDeparture());
waybillEntity.setDepartureCode(openOrderDTO.getDepartureCode());
waybillEntity.setCompleteDeparture(openOrderDTO.getCompleteDeparture());
waybillEntity.setGoodsName(openOrderDTO.getGoodsName());
waybillEntity.setTotalCount(openOrderDTO.getTotalCount());
waybillEntity.setTotalVolume(openOrderDTO.getTotalVolume());
@ -903,6 +905,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setBrand(openOrderDTO.getBrand());
waybillEntity.setDeparture(openOrderDTO.getDeparture());
waybillEntity.setDepartureCode(openOrderDTO.getDepartureCode());
waybillEntity.setCompleteDeparture(openOrderDTO.getCompleteDeparture());
waybillEntity.setDealerCode(openOrderDTO.getDealerCode());
waybillEntity.setDealerName(openOrderDTO.getDealerName());
waybillEntity.setPickupCompleteOrNot(openOrderDTO.getPickupCompleteOrNot());
@ -952,6 +955,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setDestination(openOrderDTO.getDestination());
waybillEntity.setDestinationCode(openOrderDTO.getDestinationCode());
waybillEntity.setCompleteDestination(openOrderDTO.getCompleteDestination());
waybillEntity.setGoodsName(openOrderDTO.getGoodsName());
waybillEntity.setGoodsCode(openOrderDTO.getGoodsCode());
waybillEntity.setTotalCount(openOrderDTO.getTotalCount());
@ -5226,6 +5230,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
stringBuilder.append("发站:").append(departure).append("-->").append(newDeparture).append(";");
waybillEntity.setDeparture(newDeparture);
waybillEntity.setDepartureCode(openOrderDTO.getDepartureCode());
waybillEntity.setCompleteDeparture(openOrderDTO.getCompleteDeparture());
}
Integer newPickupCompleteOrNot = openOrderDTO.getPickupCompleteOrNot();
@ -5263,6 +5268,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";");
waybillEntity.setDestination(newDestination);
waybillEntity.setDestinationCode(openOrderDTO.getDestinationCode());
waybillEntity.setCompleteDestination(openOrderDTO.getCompleteDestination());
}
Long newDestinationWarehouseId = openOrderDTO.getDestinationWarehouseId();
String newDestinationWarehouseName = openOrderDTO.getDestinationWarehouseName();

16
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java

@ -981,19 +981,19 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
}
parcelList.setConditions(1);
parcelList.setOrderPackageCode(orderPackageCode);
parcelList.setFirsts(advanceDetailEntity.getFirstPackName());
parcelList.setSecond(advanceDetailEntity.getSecondPackName());
parcelList.setThirdProduct(advanceDetailEntity.getThirdPackName());
parcelList.setFirsts(ad.getFirstPackName());
parcelList.setSecond(ad.getSecondPackName());
parcelList.setThirdProduct(ad.getThirdPackName());
parcelList.setQuantity(1);
parcelList.setStockArticleId(orderId);
parcelList.setOrderCode(orderCode);
parcelList.setServiceNumber(advanceDetailEntity.getServiceNum());
parcelList.setServiceNumber(ad.getServiceNum());
parcelList.setTrainNumber(trainNumber);
parcelList.setAdvanceId(ad.getAdvanceId());
Long materialId = advanceDetailEntity.getMaterialId();
String materialCode = advanceDetailEntity.getMaterialCode();
String materialName = advanceDetailEntity.getMaterialName();
Long materialId = ad.getMaterialId();
String materialCode = ad.getMaterialCode();
String materialName = ad.getMaterialName();
parcelList.setMaterialId(materialId);
parcelList.setMaterialName(materialName);
@ -1021,7 +1021,7 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
}
}
String brand = advanceDetailEntity.getBrand();
String brand = ad.getBrand();
BasicdataBrandEntity basicdataBrand = basicdataBrandClient.findEntityByName(brand);
if(!Objects.isNull(basicdataBrand)){
parcelList.setBrandId(basicdataBrand.getId());

58
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -9902,7 +9902,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
DistributionStockArticleEntity stockArticleEntity = getDistributionStockArticle(orderCode,unloadNodeId,incomingWarehouseName,scanCode);
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(unloadNodeId);
DistributionParcelListEntity newParcelList = new DistributionParcelListEntity();
BeanUtil.copy(parcelListEntity, newParcelList);
BeanUtil.copy(parcelListEntity1, newParcelList);
newParcelList.setId(null);
newParcelList.setWarehouseId(unloadNodeId);
newParcelList.setWarehouse(warehouseEntity.getName());
@ -9943,32 +9943,36 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
stockArticleByOrderCodeAndWarehouseId = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, entityByOrderPackageCode.getNowWarehouseId());
if(Objects.isNull(stockArticleByOrderCodeAndWarehouseId)){
stockArticleByOrderCodeAndWarehouseId.setId(null);
stockArticleByOrderCodeAndWarehouseId.setWarehouseId(warehouseId);
stockArticleByOrderCodeAndWarehouseId.setWarehouseId(warehouseId);
stockArticleByOrderCodeAndWarehouseId.setWarehouse(warehouseName);
stockArticleByOrderCodeAndWarehouseId.setGenre(1);
stockArticleByOrderCodeAndWarehouseId.setHandQuantity(0);
stockArticleByOrderCodeAndWarehouseId.setCompleteSet(1);
stockArticleByOrderCodeAndWarehouseId.setStockupStatus("10");
stockArticleByOrderCodeAndWarehouseId.setReservationStatus("10");
stockArticleByOrderCodeAndWarehouseId.setOrderStatus("10");
stockArticleByOrderCodeAndWarehouseId.setGroundingStatus("10");
stockArticleByOrderCodeAndWarehouseId.setOrderReceiveStatus("10");
stockArticleByOrderCodeAndWarehouseId.setFreezeStatus("10");
stockArticleByOrderCodeAndWarehouseId.setSortingQuantity(0);
stockArticleByOrderCodeAndWarehouseId.setDeliveryQuantity(0);
stockArticleByOrderCodeAndWarehouseId.setTransferQuantity(0);
stockArticleByOrderCodeAndWarehouseId.setSigninQuantity(0);
stockArticleByOrderCodeAndWarehouseId.setIncomingNum(0);
stockArticleByOrderCodeAndWarehouseId.setAllocation(null);
stockArticleByOrderCodeAndWarehouseId.setTrays(null);
Long orderId = distributionStockArticleClient.addData(stockArticleByOrderCodeAndWarehouseId);
stockArticleByOrderCodeAndWarehouseId.setId(orderId);
if(!Objects.isNull(stockArticleByOrderCodeAndWarehouseId)){
DistributionStockArticleEntity newEntity = new DistributionStockArticleEntity();
BeanUtil.copy(stockArticleByOrderCodeAndWarehouseId,newEntity);
newEntity.setId(null);
newEntity.setWarehouseId(warehouseId);
newEntity.setWarehouseId(warehouseId);
newEntity.setWarehouse(warehouseName);
newEntity.setGenre(1);
newEntity.setHandQuantity(0);
newEntity.setCompleteSet(1);
newEntity.setStockupStatus("10");
newEntity.setReservationStatus("10");
newEntity.setOrderStatus("10");
newEntity.setGroundingStatus("10");
newEntity.setOrderReceiveStatus("10");
newEntity.setFreezeStatus("10");
newEntity.setSortingQuantity(0);
newEntity.setDeliveryQuantity(0);
newEntity.setTransferQuantity(0);
newEntity.setSigninQuantity(0);
newEntity.setIncomingNum(0);
newEntity.setAllocation(null);
newEntity.setTrays(null);
Long orderId = distributionStockArticleClient.addData(newEntity);
newEntity.setId(orderId);
return newEntity;
}
}
}

32
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

@ -159,7 +159,9 @@
lww.shipper_mobile shipperMobile,
lww.shipper_address shipperAddress,
lww.destination destination,
lww.complete_destination completeDestination,
lww.departure departure,
lww.complete_departure completeDeparture,
lww.departure_warehouse_name departureWarehouseName,
lww.destination_warehouse_name destinationWarehouseName,
lww.delivery_way deliveryWay,
@ -283,9 +285,15 @@
<if test="param.destination != null and param.destination != ''">
and Locate(#{param.destination},lww.destination) > 0
</if>
<if test="param.completeDestination != null and param.completeDestination != ''">
and Locate(#{param.completeDestination},lww.complete_destination) > 0
</if>
<if test="param.departure != null and param.departure != ''">
and Locate(#{param.departure},lww.departure) > 0
</if>
<if test="param.completeDeparture != null and param.completeDeparture != ''">
and Locate(#{param.completeDeparture},lww.complete_departure) > 0
</if>
<if test="param.payType != null">
and lww.pay_type = #{param.payType}
</if>
@ -435,7 +443,9 @@
lww.shipper_mobile shipperMobile,
lww.shipper_address shipperAddress,
lww.destination destination,
lww.complete_destination completeDestination,
lww.departure departure,
lww.complete_departure completeDeparture,
lww.departure_warehouse_name departureWarehouseName,
lww.destination_warehouse_name destinationWarehouseName,
lww.delivery_way deliveryWay,
@ -553,9 +563,15 @@
<if test="param.destination != null and param.destination != ''">
and Locate(#{param.destination},lww.destination) > 0
</if>
<if test="param.completeDestination != null and param.completeDestination != ''">
and Locate(#{param.completeDestination},lww.complete_destination) > 0
</if>
<if test="param.departure != null and param.departure != ''">
and Locate(#{param.departure},lww.departure) > 0
</if>
<if test="param.completeDeparture != null and param.completeDeparture != ''">
and Locate(#{param.completeDeparture},lww.complete_departure) > 0
</if>
<if test="param.payType != null">
and lww.pay_type = #{param.payType}
</if>
@ -669,7 +685,9 @@
lww.shipper_mobile shipperMobile,
lww.shipper_address shipperAddress,
lww.destination destination,
lww.complete_destination completeDestination,
lww.departure departure,
lww.complete_departure completeDeparture,
lww.departure_warehouse_name departureWarehouseName,
lww.destination_warehouse_name destinationWarehouseName,
case when lww.delivery_way='1' then '自提'
@ -826,9 +844,15 @@
<if test="param.destination != null and param.destination != ''">
and Locate(#{param.destination},lww.destination) > 0
</if>
<if test="param.completeDestination != null and param.completeDestination != ''">
and Locate(#{param.completeDestination},lww.complete_destination) > 0
</if>
<if test="param.departure != null and param.departure != ''">
and Locate(#{param.departure},lww.departure) > 0
</if>
<if test="param.completeDeparture != null and param.completeDeparture != ''">
and Locate(#{param.completeDeparture},lww.complete_departure) > 0
</if>
<if test="param.payType != null">
and lww.pay_type = #{param.payType}
</if>
@ -953,7 +977,9 @@
lww.consignee_mobile consigneeMobile,
lww.consignee_address consigneeAddress,
lww.destination destination,
lww.complete_destination completeDestination,
lww.departure departure,
lww.complete_departure completeDeparture,
lww.cost_piece costPiece,
lww.cost_zhang costZhang,
lww.cost_num costNum,
@ -1070,9 +1096,15 @@
<if test="param.destination != null and param.destination != ''">
and Locate(#{param.destination},lww.destination) > 0
</if>
<if test="param.completeDestination != null and param.completeDestination != ''">
and Locate(#{param.completeDestination},lww.complete_destination) > 0
</if>
<if test="param.departure != null and param.departure != ''">
and Locate(#{param.departure},lww.departure) > 0
</if>
<if test="param.completeDeparture != null and param.completeDeparture != ''">
and Locate(#{param.completeDeparture},lww.complete_departure) > 0
</if>
<if test="param.payType != null">
and lww.pay_type = #{param.payType}
</if>

Loading…
Cancel
Save