Browse Source

自提推送BUG修复、首页自提查询

master
汤建军 9 months ago
parent
commit
6706a044c9
  1. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  2. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  3. 69
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java
  4. 172
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml
  5. 80
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -3065,6 +3065,9 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
mtReceiveImagesDTOS.add(mtReceiveImagesDTO);
}
}
if (!mtReceiveImagesDTOS.isEmpty()) {
mtReceiveDTO.setReceiveImagesList(mtReceiveImagesDTOS);
}
orderMainClinet.sendReceiveInfoByNewSystem(mtReceiveDTO);
}

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

@ -2804,6 +2804,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
//查询图片
List<DistributionPrintEntity> list2 = distributionPrintService.list(Wrappers.<DistributionPrintEntity>query().lambda()
.eq(DistributionPrintEntity::getBillLadingId, distrilbutionBillLadingEntity.getId())
.eq(DistributionPrintEntity::getIsDeleted, 0)
);
detailOne.setPrintVOS(list2);
//查询库存品

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

@ -115,28 +115,52 @@ public interface WarehouseIndexMapper {
* @param indexDTO
* @return
*/
IndexDeliveryDataVO findTripartiteTotal(@Param("param")IndexDTO indexDTO);
IndexDeliveryDataVO findTripartiteTotalByMerchant(@Param("param")IndexDTO indexDTO);
/**
* 查询三方总件数
* 查询三方配送信息
* @param indexDTO
* @return
*/
IndexDeliveryDataVO findTripartiteTotalByCity(@Param("param")IndexDTO indexDTO);
/**
* 查询三方商配总件数
* @param indexDTO
* @return
*/
Integer findTripartiteTotalNumByMerchant(@Param("param")IndexDTO indexDTO);
/**
* 查询三方市配总件数
* @param indexDTO
* @return
*/
Integer findTripartiteTotalNum(@Param("param")IndexDTO indexDTO);
Integer findTripartiteTotalNumByCity(@Param("param")IndexDTO indexDTO);
/**
* 查询三方总重量
* @param indexDTO
* @return
*/
BigDecimal findTripartiteTotalWeight(@Param("param")IndexDTO indexDTO);
BigDecimal findTripartiteTotalWeightByMerchant(@Param("param")IndexDTO indexDTO);
BigDecimal findTripartiteTotalWeightByCity(@Param("param")IndexDTO indexDTO);
/**
* 查询三方配送总体积
* @param indexDTO
* @return
*/
BigDecimal findTripartiteTotalVolume(@Param("param")IndexDTO indexDTO);
BigDecimal findTripartiteTotalVolumeByMerchant(@Param("param")IndexDTO indexDTO);
/**
* 查询三方配送市配总体积
* @param indexDTO
* @return
*/
BigDecimal findTripartiteTotalVolumeByCity(@Param("param")IndexDTO indexDTO);
/**
* 查询当天的签收数量
@ -207,4 +231,39 @@ public interface WarehouseIndexMapper {
* @return
*/
Integer findClerkOverTimeNumByMonth(@Param("param")IndexDTO indexDTO);
/**
* 查询自提签收包件数
* @param indexDTO
* @return
*/
Integer findBillLadingSignforByDay(@Param("param")IndexDTO indexDTO);
/**
* 查询当月自提签收包件数
* @param indexDTO
* @return
*/
Integer findBillLadingSignforByMonth(@Param("param")IndexDTO indexDTO);
/**
* 查询当天自提未签收数
* @param indexDTO
* @return
*/
Integer findBillLadingUnSignforByDay(@Param("param")IndexDTO indexDTO);
/**
* 查询当月自提未签收数
* @param indexDTO
* @return
*/
Integer findBillLadingUnSignforByMonth(@Param("param")IndexDTO indexDTO);
/**
* 查询当天自提复核数
* @param indexDTO
* @return
*/
Integer findBillLadingSignForNumByDay(@Param("param")IndexDTO indexDTO);
}

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

@ -374,7 +374,7 @@
</if>
</where>
</select>
<select id="findTripartiteTotal" resultType="com.logpm.report.vo.indexCount.IndexDeliveryDataVO">
<select id="findTripartiteTotalByMerchant" resultType="com.logpm.report.vo.indexCount.IndexDeliveryDataVO">
SELECT
4 AS type,
count( 1 ) AS totalNum
@ -383,6 +383,7 @@
<where>
is_deleted = 0 AND type IS NOT NULL
AND kind = 2
AND type = 1
<if test="param.warehouseIds != null">
and warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
@ -392,7 +393,26 @@
</where>
</select>
<select id="findTripartiteTotalNum" resultType="java.lang.Integer">
<select id="findTripartiteTotalByCity" resultType="com.logpm.report.vo.indexCount.IndexDeliveryDataVO">
SELECT
5 AS type,
count( 1 ) AS totalNum
FROM
logpm_distribution_delivery_list
<where>
is_deleted = 0 AND type IS NOT NULL
AND kind = 2
AND type = 2
<if test="param.warehouseIds != null">
and warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findTripartiteTotalNumByMerchant" resultType="java.lang.Integer">
SELECT
count(ldrp.id)
FROM
@ -403,6 +423,7 @@
lddl.is_deleted = 0
AND lddl.type IS NOT NULL
AND lddl.kind = 2
AND lddl.type = 1
AND ldrp.packet_bar_status != 2
<if test="param.warehouseIds != null">
and lddl.warehouse_id in
@ -412,7 +433,50 @@
</if>
</where>
</select>
<select id="findTripartiteTotalWeight" resultType="java.math.BigDecimal">
<select id="findTripartiteTotalNumByCity" resultType="java.lang.Integer">
SELECT
count(ldrp.id)
FROM
logpm_distribution_delivery_list AS lddl
LEFT JOIN logpm_distribution_signfor AS lds ON lddl.id = lds.delivery_id
LEFT JOIN logpm_distribution_reservation_package AS ldrp ON ldrp.reservation_id = lds.reservation_id
<where>
lddl.is_deleted = 0
AND lddl.type IS NOT NULL
AND lddl.kind = 2
AND lddl.type = 2
AND ldrp.packet_bar_status != 2
<if test="param.warehouseIds != null">
and lddl.warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findTripartiteTotalWeightByMerchant" resultType="java.math.BigDecimal">
SELECT
IFNULL(sum(ldpl.weight),0) AS weight
FROM
logpm_distribution_delivery_list AS lddl
LEFT JOIN logpm_distribution_signfor AS lds ON lddl.id = lds.delivery_id
LEFT JOIN logpm_distribution_reservation_package AS ldrp ON ldrp.reservation_id = lds.reservation_id
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldrp.parce_list_id = ldpl.id
<where>
lddl.is_deleted = 0
AND lddl.type IS NOT NULL
AND lddl.kind = 2
AND lddl.type = 1
AND ldrp.packet_bar_status != 2
<if test="param.warehouseIds != null">
and lddl.warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findTripartiteTotalWeightByCity" resultType="java.math.BigDecimal">
SELECT
IFNULL(sum(ldpl.weight),0) AS weight
FROM
@ -424,6 +488,29 @@
lddl.is_deleted = 0
AND lddl.type IS NOT NULL
AND lddl.kind = 2
AND lddl.type = 2
AND ldrp.packet_bar_status != 2
<if test="param.warehouseIds != null">
and lddl.warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findTripartiteTotalVolumeByMerchant" resultType="java.math.BigDecimal">
SELECT
IFNULL(sum(ldpl.volume),0) AS volume
FROM
logpm_distribution_delivery_list AS lddl
LEFT JOIN logpm_distribution_signfor AS lds ON lddl.id = lds.delivery_id
LEFT JOIN logpm_distribution_reservation_package AS ldrp ON ldrp.reservation_id = lds.reservation_id
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldrp.parce_list_id = ldpl.id
<where>
lddl.is_deleted = 0
AND lddl.type IS NOT NULL
AND lddl.kind = 2
AND lddl.type = 1
AND ldrp.packet_bar_status != 2
<if test="param.warehouseIds != null">
and lddl.warehouse_id in
@ -433,7 +520,7 @@
</if>
</where>
</select>
<select id="findTripartiteTotalVolume" resultType="java.math.BigDecimal">
<select id="findTripartiteTotalVolumeByCity" resultType="java.math.BigDecimal">
SELECT
IFNULL(sum(ldpl.volume),0) AS volume
FROM
@ -445,6 +532,7 @@
lddl.is_deleted = 0
AND lddl.type IS NOT NULL
AND lddl.kind = 2
AND lddl.type = 2
AND ldrp.packet_bar_status != 2
<if test="param.warehouseIds != null">
and lddl.warehouse_id in
@ -671,5 +759,81 @@
</if>
</where>
</select>
<select id="findBillLadingSignforByDay" resultType="java.lang.Integer">
SELECT
count( 1 ) AS num
FROM
logpm_distribution_bill_lading_scan
<where>
is_deleted = 0
AND DATE_FORMAT( create_time, '%y%m%d' ) = DATE_FORMAT(
#{param.dayStr},
'%y%m%d')
<if test="param.warehouseIds != null">
AND warehouse_id
<foreach collection="param.warehouseIds" item="item" open="in (" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findBillLadingSignforByMonth" resultType="java.lang.Integer">
SELECT
count( 1 ) AS num
FROM
logpm_distribution_bill_lading_scan
<where>
is_deleted = 0
AND DATE_FORMAT( create_time, '%y%m' ) = DATE_FORMAT(
#{param.dayStr},
'%y%m')
<if test="param.warehouseIds != null">
AND warehouse_id
<foreach collection="param.warehouseIds" item="item" open="in (" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findBillLadingUnSignforByDay" resultType="java.lang.Integer">
SELECT
count( 1 )
FROM
logpm_distrilbution_bill_package AS ldbp
INNER JOIN logpm_distribution_parcel_list AS ldpl ON ldbp.parce_list_id = ldpl.id
<where>
ldbp.is_deleted = 0
AND ldpl.order_package_status != 70
AND DATE_FORMAT( ldbp.create_time, '%y%m%d' ) = DATE_FORMAT( #{param.dayStr}, '%y%m%d' )
<if test="param.warehouseIds != null">
AND ldpl.warehouse_id
<foreach collection="param.warehouseIds" item="item" open="in (" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findBillLadingUnSignforByMonth" resultType="java.lang.Integer">
SELECT
count( 1 ) AS num
FROM
logpm_distrilbution_bill_package AS ldbp
INNER JOIN logpm_distribution_parcel_list AS ldpl ON ldbp.parce_list_id = ldpl.id
<where>
ldbp.is_deleted = 0
AND ldpl.order_package_status != 70
AND DATE_FORMAT( ldbp.create_time, '%y%m' ) = DATE_FORMAT( #{param.dayStr}, '%y%m' )
<if test="param.warehouseIds != null">
AND ldpl.warehouse_id
<foreach collection="param.warehouseIds" item="item" open="in (" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>

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

@ -277,19 +277,34 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexDeliveryDataVO.setTotalVolume(billLadingTotalVolume);
indexDeliveryDataVOList.add(indexDeliveryDataVO);
}
//查询外协信息
IndexDeliveryDataVO indexTripartiteDeliveryDataVO = warehouseIndexMapper.findTripartiteTotal(indexDTO);
if (Func.isNotEmpty(indexTripartiteDeliveryDataVO)) {
//查询外协总件数
Integer tripartiteTotalNum = warehouseIndexMapper.findTripartiteTotalNum(indexDTO);
indexTripartiteDeliveryDataVO.setTotalDeliveryNum(tripartiteTotalNum);
//查询外协总重量
BigDecimal tripartiteTotalWeight = warehouseIndexMapper.findTripartiteTotalWeight(indexDTO);
indexTripartiteDeliveryDataVO.setTotalWeight(tripartiteTotalWeight);
//查询外协总包件体积
BigDecimal tripartiteTotalVolume = warehouseIndexMapper.findTripartiteTotalVolume(indexDTO);
indexTripartiteDeliveryDataVO.setTotalVolume(tripartiteTotalVolume);
indexDeliveryDataVOList.add(indexTripartiteDeliveryDataVO);
//查询商配外协信息
IndexDeliveryDataVO indexTripartiteDeliveryMerchantDataVO = warehouseIndexMapper.findTripartiteTotalByMerchant(indexDTO);
if (Func.isNotEmpty(indexTripartiteDeliveryMerchantDataVO)) {
//查询商配外协总件数
Integer tripartiteTotalNum = warehouseIndexMapper.findTripartiteTotalNumByMerchant(indexDTO);
indexTripartiteDeliveryMerchantDataVO.setTotalDeliveryNum(tripartiteTotalNum);
//查询商配外协总重量
BigDecimal tripartiteTotalWeight = warehouseIndexMapper.findTripartiteTotalWeightByMerchant(indexDTO);
indexTripartiteDeliveryMerchantDataVO.setTotalWeight(tripartiteTotalWeight);
//查询商配外协总包件体积
BigDecimal tripartiteTotalVolume = warehouseIndexMapper.findTripartiteTotalVolumeByMerchant(indexDTO);
indexTripartiteDeliveryMerchantDataVO.setTotalVolume(tripartiteTotalVolume);
indexDeliveryDataVOList.add(indexTripartiteDeliveryMerchantDataVO);
}
//查询市配外协信息
IndexDeliveryDataVO indexTripartiteDeliveryCityDataVO = warehouseIndexMapper.findTripartiteTotalByCity(indexDTO);
if (Func.isNotEmpty(indexTripartiteDeliveryCityDataVO)) {
//查询市配外协总件数
Integer tripartiteTotalNum = warehouseIndexMapper.findTripartiteTotalNumByCity(indexDTO);
indexTripartiteDeliveryCityDataVO.setTotalDeliveryNum(tripartiteTotalNum);
//查询市配外协总重量
BigDecimal tripartiteTotalWeight = warehouseIndexMapper.findTripartiteTotalWeightByCity(indexDTO);
indexTripartiteDeliveryCityDataVO.setTotalWeight(tripartiteTotalWeight);
//查询市配外协总包件体积
BigDecimal tripartiteTotalVolume = warehouseIndexMapper.findTripartiteTotalVolumeByCity(indexDTO);
indexTripartiteDeliveryCityDataVO.setTotalVolume(tripartiteTotalVolume);
indexDeliveryDataVOList.add(indexTripartiteDeliveryCityDataVO);
}
return indexDeliveryDataVOList;
}
@ -350,9 +365,7 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexSignforMonthDataVO.setSignScale(monthSignforScale);
}else {
indexSignforMonthDataVO.setSignScale(0.00);
}
//查询当月文员复核数
Integer monthClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByMonth(indexDTO);
indexSignforMonthDataVO.setClerkSignNum(monthClerkSignforNum);
@ -374,6 +387,43 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexSignforMonthDataVO.setClerkOverTimeScale(0.00);
}
list.add(indexSignforMonthDataVO);
//查询自提相关的签收信息
//查询自提签收包件信息
Integer dayBillLadingSignfor = warehouseIndexMapper.findBillLadingSignforByDay(indexDTO);
//查询自提未签收树
Integer dayBillLadingUnSignfor = warehouseIndexMapper.findBillLadingUnSignforByDay(indexDTO);
//计算当天的签收率
if (dayBillLadingSignfor > 0 && (dayBillLadingSignfor + dayBillLadingUnSignfor) > 0) {
Double dayBillLadingSignforScale = (double) (dayBillLadingSignfor / (dayBillLadingSignfor + dayBillLadingUnSignfor));
}
//查询当天文员复数
Integer dayBillLadingSignforNum = warehouseIndexMapper.findBillLadingSignForNumByDay(indexDTO);
//查询当天签收超时数
//查询自提当月签收情况
Integer monthBillLadingSignfor = warehouseIndexMapper.findBillLadingSignforByMonth(indexDTO);
//查询自提当月未签数量
Integer monthBillLadingUnSignfor = warehouseIndexMapper.findBillLadingUnSignforByMonth(indexDTO);
//计算当月的签收率
if (monthBillLadingSignfor > 0 && (monthBillLadingSignfor + monthBillLadingUnSignfor) > 0) {
Double monthBillLadingSignforScale = (double) (dayBillLadingSignfor / (dayBillLadingSignfor + dayBillLadingUnSignfor));
}
return list;
}
}

Loading…
Cancel
Save