Browse Source

数据看板签收板块、签收回退运单日志

fix-sign
汤建军 4 months ago
parent
commit
d1980c1c97
  1. 4
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionSignforClient.java
  2. 21
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionSignforClient.java
  3. 141
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  4. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java
  5. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  6. 13
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java
  7. 40
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java
  8. 40
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml
  9. 66
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java
  10. 10
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexSignforDataVO.java

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);
}

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) {

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

@ -35,55 +35,69 @@
</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,
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 )
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)
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.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,
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
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 count(*)
from logpm_distribution_stock_list lds
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
(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
(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
from logpm_distribution_stock_list ldsi
@ -109,13 +123,10 @@
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}
@ -268,9 +279,11 @@
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_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_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}
@ -304,7 +317,9 @@
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">
@ -335,8 +350,10 @@
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 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>
@ -351,27 +368,32 @@
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
@ -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,7 +463,7 @@
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>
@ -500,13 +528,15 @@
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
<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},'%')
</if>
@ -546,7 +576,8 @@
</where>
</select>
<select id="selectStockInforByOrderPackageCode" resultType="com.logpm.distribution.entity.DistributionStockListEntity">
<select id="selectStockInforByOrderPackageCode"
resultType="com.logpm.distribution.entity.DistributionStockListEntity">
SELECT
ldsl.*
FROM
@ -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
@ -602,8 +635,10 @@
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,16 +648,18 @@
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">
@ -635,7 +672,7 @@
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;

Loading…
Cancel
Save