From a24f12f15d639346844581b43060bd07599f5992 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Wed, 26 Jun 2024 16:55:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E8=BD=A6=E6=AC=A1=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E3=80=81=E5=8F=B8=E6=9C=BA=E4=B8=80=E4=BB=B6=E7=AD=BE?= =?UTF-8?q?=E6=94=B6=E6=8E=A8=E9=80=81=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/constant/DictBizConstant.java | 1 + .../entity/DistributionReservationEntity.java | 6 +- .../vo/DistributionReservationVO.java | 6 + .../DistributionSignforController.java | 1 - .../DistributionDeliveryListServiceImpl.java | 219 +++++++++++------ .../DistributionReservationServiceImpl.java | 1 + .../impl/DistributionSignforServiceImpl.java | 13 +- .../DistributionReservationWrapper.java | 1 + .../controller/WarehouseIndexController.java | 36 +++ .../java/com/logpm/report/dto/IndexDTO.java | 1 + .../report/mapper/WarehouseIndexMapper.java | 48 ++++ .../report/mapper/WarehouseIndexMapper.xml | 225 +++++++++++++++++- .../service/IWarehouseIndexService.java | 8 + .../impl/WarehouseIndexServiceImpl.java | 61 ++++- .../vo/indexCount/IndexDeliveryDataVO.java | 4 +- .../vo/indexCount/IndexSignforDataVO.java | 27 +++ 16 files changed, 552 insertions(+), 106 deletions(-) create mode 100644 blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexSignforDataVO.java diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java b/blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java index 33112603b..1c1c6b5af 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java @@ -94,6 +94,7 @@ public class DictBizConstant { // --------------2023-08-24 --------------------- public static final String RESERVATION_LIST_LOADING_STATUS = "reservation_loading_status";//预约装车状态 public static final String RESERVATION_SIGNFOR_STATUS = "reservation_signfor_status";//预约签收状态 + public static final String YES_NO = "yes_no";//预约签收状态 // --------------2023-09-01 --------------------- public static final String ORDER_PACKAGE_LOADING_STATUS = "order_package_loading_status";//预约签收状态 diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java index 0dd00567e..20e3dac27 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java @@ -297,6 +297,10 @@ public class DistributionReservationEntity extends TenantEntity { @ApiModelProperty(value = "备货结束时间") private Date endTimeStocking; - + /** + * 是否安装 + */ + @ApiModelProperty(value = "是否安装, 0-否 1- 是") + private Integer isInstall; } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationVO.java index 1890bd12f..f1b97d8b0 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationVO.java @@ -91,6 +91,12 @@ public class DistributionReservationVO extends DistributionReservationEntity { @ApiModelProperty(value = "签收状态") private String warehouseAddress; + /** + * 是否安装 + */ + @ApiModelProperty(value = "是否安装") + private String isInstallName; + /** * 仓库经度 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java index 3bdc8d8ee..fe69d7e7f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java @@ -335,7 +335,6 @@ public class DistributionSignforController extends BladeController { distributionSignforDTO.setId(distributionSignfor.getId()); distributionSignforService.updateSign(distributionSignforDTO); distributionStockupInfoService.maintenanceStockUp(distributionSignfor.getReservationId(),1); - } // return R.status(distributionSignforService.updateById(distributionSignfor)); return r; diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index 9035047be..daa5127d6 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -252,6 +252,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl distrilbutionBillPackageEntities = distrilbutionBillPackageMapper.selectList(distrilbutionBillStockEntityLambdaQueryWrapper); - // 得到所以的订单列表 - List distributionParcelListEntities = null; + List distributionParcelListEntities = new ArrayList<>(); if (!distrilbutionBillPackageEntities.isEmpty()) { List ids = distrilbutionBillPackageEntities.stream().map(DistrilbutionBillPackageEntity::getParceListId).collect(Collectors.toList()); - distributionParcelListEntities = distributionParcelListMapper.selectBatchIds(ids); - + distributionParcelListEntities = distributionParcelListMapper.selectBatchIds(ids); } + + + Map map = new HashMap<>(); map.put("自提单号", distrilbutionBillLadingEntity.getPickupBatch()); String fileTypeName = QRCodeUtil.createCodeToFile(map.get("自提单号").toString()); @@ -4864,9 +4868,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl map, List distrilbutionBillStockEntities, List distributionParcelListEntities, DistrilbutionBillLadingEntity distrilbutionBillLadingEntity) { // 查询订单集合 - Set ids = new HashSet(); - for (DistrilbutionBillStockEntity distrilbutionBillStockEntity : distrilbutionBillStockEntities) { - ids.add(distrilbutionBillStockEntity.getStockArticleId()); - } - // 得到所以的订单列表 - List distributionStockArticleEntities = distributionStockArticleMapper.selectBatchIds(ids); + int a = 1; + List> ls = new ArrayList<>(); + // 获取订单中的商城和收货单位 StringBuilder consigneeUnit = new StringBuilder(); StringBuilder mailNames = new StringBuilder(); - List> ls = new ArrayList<>(); + int hejiNum = 0; + Map m = new HashMap<>(); + + + + // 查询库存品信息 + List detailsEntities = distributionDeliveryDetailsService.list(Wrappers.query().lambda() + .eq(DistributionDeliveryDetailsEntity::getBillLadingId, distrilbutionBillLadingEntity.getId()) + .ne(DistributionDeliveryDetailsEntity::getStockStatus, ReservationOrderStatusConstant.quxiao.getValue()) + ); + if (!detailsEntities.isEmpty()) { + Map> inventoryMap = detailsEntities.stream().collect(Collectors.groupingBy(DistributionDeliveryDetailsEntity::getStockListId)); + List inventoryIds = detailsEntities.stream().map(DistributionDeliveryDetailsEntity::getStockListId).collect(Collectors.toList()); + List distributionStockListEntities = distributionStockListService.listByIds(inventoryIds); + if (!distributionStockListEntities.isEmpty()) { + for (DistributionStockListEntity distributionStockListEntity : distributionStockListEntities) { + Map tempMap = new HashMap<>(); + + tempMap.put("序号", a); + + tempMap.put("运单号", distributionStockListEntity.getIncomingBatch()); + tempMap.put("合同号", distributionStockListEntity.getOrderCode()); + tempMap.put("物料名称", distributionStockListEntity.getDescriptionGoods()); + //构建产品明细 + Map map1 = new HashMap<>(); + map1.put("物料编码",distributionStockListEntity.getCargoNumber()); + map1.put("物料单位",distributionStockListEntity.getCargoUnit()); + map1.put("物料规格",distributionStockListEntity.getCargoNorms()); + //查询此订制品库位信息 + DistributionDeliveryDetailsEntity distributionDeliveryDetailsEntity = inventoryMap.get(distributionStockListEntity.getId()).get(0); + Integer quantity = distributionDeliveryDetailsEntity.getQuantity(); + map1.put("计划数量",quantity); + hejiNum += quantity; + tempMap.put("小计", quantity); + tempMap.put("货位", ""); + tempMap.put("产品明细", map1); + tempMap.put("备货区", ""); + ls.add(tempMap); + a++; + if (!mailNames.toString().contains(distributionStockListEntity.getMarketName())) { + if (!mailNames.toString().isEmpty()) { + mailNames.append(","); + } + mailNames.append(distributionStockListEntity.getMarketName()); + } + if (!consigneeUnit.toString().contains(distributionStockListEntity.getMarketName())) { + if (!consigneeUnit.toString().isEmpty()) { + consigneeUnit.append(","); + } + consigneeUnit.append(distributionStockListEntity.getMarketName()); + } + } + } + } - int a = 1; // 构建产品明细的表头 -- 这里目前只处理了定制品和有数据的库存品,对于零担 还没有处理 List> listMapTemp = new ArrayList<>(); - Map m = new HashMap<>(); - int hejiNum = 0; for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) { if (StringUtils.isBlank(distributionParcelListEntity.getThirdProduct())) { distributionParcelListEntity.setThirdProduct("其它"); @@ -4952,98 +5002,111 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl ids = distrilbutionBillStockEntities.stream().map(DistrilbutionBillStockEntity::getStockArticleId).collect(Collectors.toList()); + // 得到所以的订单列表 + List distributionStockArticleEntities = distributionStockArticleMapper.selectBatchIds(ids); + for (DistributionStockArticleEntity distributionStockArticleEntity : distributionStockArticleEntities) { + Map tempMap = new HashMap<>(); + // 需要从所有的包件的 + List ts = new ArrayList<>(); + for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) { + if (distributionParcelListEntity.getStockArticleId().equals(distributionStockArticleEntity.getId())) { + ts.add(distributionParcelListEntity); + } + } - for (DistributionStockArticleEntity distributionStockArticleEntity : distributionStockArticleEntities) { - - // 需要从所有的包件的 - List ts = new ArrayList<>(); - for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) { - if (distributionParcelListEntity.getStockArticleId().equals(distributionStockArticleEntity.getId())) { - ts.add(distributionParcelListEntity); - } - } + if (!mailNames.toString().contains(distributionStockArticleEntity.getMallName())) { + if (!mailNames.toString().isEmpty()) { + mailNames.append(","); + } + mailNames.append(distributionStockArticleEntity.getMallName()); + } + if (!consigneeUnit.toString().contains(distributionStockArticleEntity.getConsigneeUnit())) { + if (!consigneeUnit.toString().isEmpty()) { + consigneeUnit.append(","); + } + consigneeUnit.append(distributionStockArticleEntity.getConsigneeUnit()); + } - if (!mailNames.toString().contains(distributionStockArticleEntity.getMallName())) { - if (!mailNames.toString().isEmpty()) { - mailNames.append(","); - } - mailNames.append(distributionStockArticleEntity.getMallName()); - } - if (!consigneeUnit.toString().contains(distributionStockArticleEntity.getConsigneeUnit())) { - if (!consigneeUnit.toString().isEmpty()) { - consigneeUnit.append(","); - } - consigneeUnit.append(distributionStockArticleEntity.getConsigneeUnit()); - } - Map tempMap = new HashMap<>(); + tempMap.put("序号", a); + tempMap.put("运单号", distributionStockArticleEntity.getWaybillNumber()); + tempMap.put("合同号", distributionStockArticleEntity.getOrderCode()); + String materialNameStr = buildMaterialNameStr(distributionParcelListEntities); + tempMap.put("物料名称", materialNameStr); - tempMap.put("序号", a); - tempMap.put("运单号", distributionStockArticleEntity.getWaybillNumber()); - tempMap.put("合同号", distributionStockArticleEntity.getOrderCode()); - String materialNameStr = buildMaterialNameStr(distributionParcelListEntities); - tempMap.put("物料名称", materialNameStr); + // 构建产品明细 --对于每一个订单 + buildProductDetail(tempMap, m, ts); - // 构建产品明细 --对于每一个订单 - buildProductDetail(tempMap, m, ts); + Map os = (Map) tempMap.get("产品明细"); - Map os = (Map) tempMap.get("产品明细"); + Set strings = os.keySet(); + int sumNum = 0; + for (String string : strings) { + Object o = os.get(string); + sumNum += (o != null) ? (int) o : 0; + } + tempMap.put("小计", sumNum); + hejiNum += sumNum; + // 查询货物货位 - Set strings = os.keySet(); - int sumNum = 0; - for (String string : strings) { - Object o = os.get(string); - sumNum += (o != null) ? (int) o : 0; - } - tempMap.put("小计", sumNum); - hejiNum += sumNum; - // 查询货物货位 + //通过订单id和预约id查询对应包件的库位信息 + List orderPackageCodes = ts.stream() + .map(DistributionParcelListEntity::getOrderPackageCode) // 获取每个对象的orderPackageCode + .collect(Collectors.toList()); - //通过订单id和预约id查询对应包件的库位信息 - List orderPackageCodes = ts.stream() - .map(DistributionParcelListEntity::getOrderPackageCode) // 获取每个对象的orderPackageCode - .collect(Collectors.toList()); + List orderPackageIds = ts.stream() + .map(DistributionParcelListEntity::getId) // 获取每个对象的包件ID + .collect(Collectors.toList()); + if (Func.isNotEmpty(orderPackageCodes)) { + List allocationStrList = distributionParcelListMapper.selectAllocationInforByOrderPackageCode(orderPackageCodes, distrilbutionBillLadingEntity.getWarehouseId()); + String allocationStr = StringUtils.join(allocationStrList, ","); + tempMap.put("货位", allocationStr); + } - List orderPackageIds = ts.stream() - .map(DistributionParcelListEntity::getId) // 获取每个对象的包件ID - .collect(Collectors.toList()); - if (Func.isNotEmpty(orderPackageCodes)) { - List allocationStrList = distributionParcelListMapper.selectAllocationInforByOrderPackageCode(orderPackageCodes, distrilbutionBillLadingEntity.getWarehouseId()); - String allocationStr = StringUtils.join(allocationStrList, ","); - tempMap.put("货位", allocationStr); - } + //通过订单id和预约id查询对应包件的备货区信息 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(DistributionStockEntity::getBillLadingId, distrilbutionBillLadingEntity.getId()) + .in(DistributionStockEntity::getParcelListId, orderPackageIds); + List distributionStockEntities = distributionStockMapper.selectList(lambdaQueryWrapper); - //通过订单id和预约id查询对应包件的备货区信息 - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); - lambdaQueryWrapper.eq(DistributionStockEntity::getBillLadingId, distrilbutionBillLadingEntity.getId()) - .in(DistributionStockEntity::getParcelListId, orderPackageIds); - List distributionStockEntities = distributionStockMapper.selectList(lambdaQueryWrapper); + Set stockupAreaStrList = distributionStockEntities.stream().map(DistributionStockEntity::getStockupArea).collect(Collectors.toSet()); - Set stockupAreaStrList = distributionStockEntities.stream().map(DistributionStockEntity::getStockupArea).collect(Collectors.toSet()); + String stockupAreaStr = StringUtils.join(stockupAreaStrList, ","); + tempMap.put("备货区", stockupAreaStr); - String stockupAreaStr = StringUtils.join(stockupAreaStrList, ","); - tempMap.put("备货区", stockupAreaStr); + ls.add(tempMap); + a++; - ls.add(tempMap); - a++; + } } + + + + + + map.put("收货单单位", consigneeUnit.toString()); map.put("商场名称", mailNames.toString()); map.put("明细", ls); Map m1 = new HashMap<>(); - m1.put("产品明细", m); + if (!m.isEmpty()) { + m1.put("产品明细", m); + } m1.put("合计数量", hejiNum); map.put("合计", m1); } + /** * 构建分类明细 * diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java index 7a855d819..126bf5b81 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java @@ -1985,6 +1985,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl warehouseIds = new ArrayList<>(); + //当前登录人选择的仓库 + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if(Objects.isNull(myCurrentWarehouse)){ + List myWatchWarehouse = warehouseClient.getMyWarehouseList(); + if (myWatchWarehouse.isEmpty()) { + warehouseIds = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); + } + + }else{ + warehouseIds.add(myCurrentWarehouse.getId()); + } + indexDTO.setWarehouseIds(warehouseIds); + + //查询订制品打托列表 + List indexDeliveryDataVO = warehouseIndexService.signforData(indexDTO); + return R.data(indexDeliveryDataVO); + }catch (CustomerException e){ + log.warn(e.message); + return R.fail(e.code,e.message); + }catch (Exception e){ + log.error(method+"系统异常,联系管理员",e); + return R.fail(500,"系统异常,联系管理员"); + } + } + + } diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/dto/IndexDTO.java b/blade-service/logpm-report/src/main/java/com/logpm/report/dto/IndexDTO.java index 44eeb8159..85717a98e 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/dto/IndexDTO.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/dto/IndexDTO.java @@ -12,5 +12,6 @@ public class IndexDTO implements Serializable { private List warehouseIds; private Date startDate; private Date endDate; + private String dayStr; } diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java index d9a5c34ac..4815ad2f2 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java @@ -138,4 +138,52 @@ public interface WarehouseIndexMapper { */ BigDecimal findTripartiteTotalVolume(@Param("param")IndexDTO indexDTO); + /** + * 查询当天的签收数量 + * @param indexDTO + * @return + */ + Integer findSignforDataByDay(@Param("param")IndexDTO indexDTO); + + /** + * 查询当月签收数量 + * @param indexDTO + * @return + */ + Integer findSignforDataByMonth(@Param("param")IndexDTO indexDTO); + + /** + * 查询前天未签收件数 + * @param indexDTO + * @return + */ + Integer findUnSignforDataByDay(@Param("param")IndexDTO indexDTO); + + /** + * 查询当月未签收件数 + * @param indexDTO + * @return + */ + Integer findUnSignforDataByMonth(@Param("param")IndexDTO indexDTO); + + /** + * 查询当天文员复核数 + * @param indexDTO + * @return + */ + Integer findClerkSignforNumByDay(@Param("param")IndexDTO indexDTO); + + /** + * 查询当月文员复核数 + * @param indexDTO + * @return + */ + Integer findClerkSignforNumByMonth(@Param("param")IndexDTO indexDTO); + + /** + * 查询当天计划数 + * @param indexDTO + * @return + */ + Integer findPlanNumByDay(@Param("param")IndexDTO indexDTO); } diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml index 6dd226b2c..cb03f75e9 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml @@ -223,7 +223,7 @@ + + + + + + + diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/IWarehouseIndexService.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/IWarehouseIndexService.java index 1cc196c31..572692c59 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/IWarehouseIndexService.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/IWarehouseIndexService.java @@ -3,6 +3,7 @@ package com.logpm.report.service; import com.logpm.report.dto.IndexDTO; import com.logpm.report.vo.*; import com.logpm.report.vo.indexCount.IndexDeliveryDataVO; +import com.logpm.report.vo.indexCount.IndexSignforDataVO; import java.util.List; @@ -27,4 +28,11 @@ public interface IWarehouseIndexService { * @return */ List deliveryData(IndexDTO indexDTO); + + /** + * 查询当前签收率 + * @param indexDTO + * @return + */ + List signforData(IndexDTO indexDTO); } diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java index f6e772f41..f0f63b4e0 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java @@ -6,6 +6,7 @@ import com.logpm.report.mapper.WarehouseIndexMapper; import com.logpm.report.service.IWarehouseIndexService; import com.logpm.report.vo.*; import com.logpm.report.vo.indexCount.IndexDeliveryDataVO; +import com.logpm.report.vo.indexCount.IndexSignforDataVO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.common.constant.DistributionTypeConstant; @@ -14,6 +15,7 @@ import org.springblade.core.tool.utils.Func; import org.springframework.stereotype.Service; import java.math.BigDecimal; +import java.text.SimpleDateFormat; import java.util.*; @Slf4j @@ -278,18 +280,61 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService { //查询外协信息 IndexDeliveryDataVO indexTripartiteDeliveryDataVO = warehouseIndexMapper.findTripartiteTotal(indexDTO); if (Func.isNotEmpty(indexTripartiteDeliveryDataVO)) { - //查询自提总件数 + //查询外协总件数 Integer tripartiteTotalNum = warehouseIndexMapper.findTripartiteTotalNum(indexDTO); - indexDeliveryDataVO.setTotalDeliveryNum(tripartiteTotalNum); - //查询总重量 + indexTripartiteDeliveryDataVO.setTotalDeliveryNum(tripartiteTotalNum); + //查询外协总重量 BigDecimal tripartiteTotalWeight = warehouseIndexMapper.findTripartiteTotalWeight(indexDTO); - indexDeliveryDataVO.setTotalWeight(tripartiteTotalWeight); - //查询总包件体积 + indexTripartiteDeliveryDataVO.setTotalWeight(tripartiteTotalWeight); + //查询外协总包件体积 BigDecimal tripartiteTotalVolume = warehouseIndexMapper.findTripartiteTotalVolume(indexDTO); - indexDeliveryDataVO.setTotalVolume(tripartiteTotalVolume); - indexDeliveryDataVOList.add(indexDeliveryDataVO); + indexTripartiteDeliveryDataVO.setTotalVolume(tripartiteTotalVolume); + indexDeliveryDataVOList.add(indexTripartiteDeliveryDataVO); } - return indexDeliveryDataVOList; } + + @Override + public List signforData(IndexDTO indexDTO) { + List list = new ArrayList<>(); + Date date = new Date(); + SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd"); + String day = dayFormat.format(date); + indexDTO.setDayStr(day); + IndexSignforDataVO indexSignforDayDataVO = new IndexSignforDataVO(); + indexSignforDayDataVO.setType(1); + //查询当天签收数据 + Integer daySignforNum = warehouseIndexMapper.findSignforDataByDay(indexDTO); + indexSignforDayDataVO.setSignNum(daySignforNum); + //查询当天未签收件数 + Integer dayUnSignforNum = warehouseIndexMapper.findUnSignforDataByDay(indexDTO); + indexSignforDayDataVO.setUnSignNum(dayUnSignforNum); + //计算签收率 + Double daySignforScale = (double) (daySignforNum / (daySignforNum + dayUnSignforNum) * 100); + indexSignforDayDataVO.setSignScale(daySignforScale); + //查询当天文员复核数 + Integer dayClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByDay(indexDTO); + //查询当天计划数 + Integer planByday = warehouseIndexMapper.findPlanNumByDay(indexDTO); + //计算文员签收率 + + + indexSignforDayDataVO.setClerkSignNum(dayClerkSignforNum); + list.add(indexSignforDayDataVO); + IndexSignforDataVO indexSignforMonthDataVO = new IndexSignforDataVO(); + indexSignforMonthDataVO.setType(2); + //查询当月签收数据 + Integer monthSignforNum = warehouseIndexMapper.findSignforDataByMonth(indexDTO); + indexSignforMonthDataVO.setSignNum(monthSignforNum); + //查询当月未签收数据 + Integer monthUnSignforNum = warehouseIndexMapper.findUnSignforDataByMonth(indexDTO); + indexSignforMonthDataVO.setUnSignNum(monthUnSignforNum); + //计算签收率 + Double monthSignforScale = (double) (monthSignforNum / (monthUnSignforNum + monthSignforNum) * 100); + indexSignforMonthDataVO.setSignScale(monthSignforScale); + //查询当月文员复核数 + Integer monthClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByMonth(indexDTO); + indexSignforMonthDataVO.setClerkSignNum(monthClerkSignforNum); + return list; + } } diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexDeliveryDataVO.java b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexDeliveryDataVO.java index 5cf163b59..e061fc72a 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexDeliveryDataVO.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexDeliveryDataVO.java @@ -11,8 +11,8 @@ public class IndexDeliveryDataVO implements Serializable { private String type ; private Integer totalNum = 0; private Integer totalDeliveryNum = 0; - private BigDecimal totalWeight ; - private BigDecimal totalVolume ; + private BigDecimal totalWeight = BigDecimal.ZERO; + private BigDecimal totalVolume = BigDecimal.ZERO; private Integer totalRoadNum = 0; diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexSignforDataVO.java b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexSignforDataVO.java new file mode 100644 index 000000000..824d123b0 --- /dev/null +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexSignforDataVO.java @@ -0,0 +1,27 @@ +package com.logpm.report.vo.indexCount; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +@Data +public class IndexSignforDataVO implements Serializable { + + + private Integer type; + + private Integer signNum; + + private Integer UnSignNum; + + + private Double signScale; + + private Integer clerkSignNum; + + + + + +}