diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillVO.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillVO.java index 3a8d2e43d..d39186e6d 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillVO.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillVO.java @@ -83,6 +83,10 @@ public class FinanceWaybillVO implements Serializable { private String goodsTypeFreightPrice; private Integer goodsTypeCount; + private String payStatus; + + private String settlementStatus; + } diff --git a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsBalanceOrderInfoServiceImpl.java b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsBalanceOrderInfoServiceImpl.java index f1bd14d42..de0b50fa5 100644 --- a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsBalanceOrderInfoServiceImpl.java +++ b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsBalanceOrderInfoServiceImpl.java @@ -1,6 +1,7 @@ package com.logpm.statistics.service.impl; import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -14,6 +15,8 @@ import com.logpm.statistics.service.*; import com.logpm.statistics.vo.StatisticsBalanceAbnormalVO; import com.logpm.statistics.vo.StatisticsBalanceOrderInfoVO; import com.logpm.statistics.vo.StatisticsBalanceRecordVO; +import com.logpm.warehouse.entity.WarehouseWaybillEntity; +import com.logpm.warehouse.feign.IWarehouseWaybillClient; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.common.exception.CustomerException; @@ -21,6 +24,7 @@ import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.BeanUtil; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -33,14 +37,23 @@ import java.util.stream.Collectors; @Slf4j @Service -@AllArgsConstructor public class StatisticsBalanceOrderInfoServiceImpl extends BaseServiceImpl implements IStatisticsBalanceOrderInfoService { - private final IStatisticsBalanceAbnormalService balanceAbnormalService; - private final IStatisticsBalanceAbnormalPhotoService balanceAbnormalPhotoService; - private final IStatisticsBalanceRecordService balanceRecordService; - private final IStatisticsBalanceRecordPhotoService balanceRecordPhotoService; - private final IBasicdataWarehouseClient warehouseClient; + @Autowired + private IStatisticsBalanceAbnormalService balanceAbnormalService; + @Autowired + private IStatisticsBalanceAbnormalPhotoService balanceAbnormalPhotoService; + @Autowired + private IStatisticsBalanceRecordService balanceRecordService; + @Autowired + private IStatisticsBalanceRecordPhotoService balanceRecordPhotoService; + @Autowired + private IBasicdataWarehouseClient warehouseClient; + + @Autowired + private IStatisticsOrderInfoService statisticsOrderInfoService; + @Autowired + private IWarehouseWaybillClient warehouseWaybillClient; @Override public IPage pageList(MerchantStatisticsDTO merchantStatisticsDTO) { @@ -287,6 +300,29 @@ public R findBalanceDetail(Long balanceOrderId) { updateById(statisticsBalanceOrderInfoEntity); + // 更新运单状态 + // 获取结算单对应的运单ID + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(StatisticsOrderInfoEntity::getBalanceOrderId, balanceOrderInfoId); + List list = statisticsOrderInfoService.list(queryWrapper); + List waybillIds = list.stream().map(StatisticsOrderInfoEntity::getWaybillId).collect(Collectors.toList()); + + // 更新运单的状态 + List data = new ArrayList<>(); + waybillIds.forEach(id ->{ + WarehouseWaybillEntity t = new WarehouseWaybillEntity(); + t.setId(id); +// t.setPayStatus("30"); + t.setSettlementStatus("30"); + data.add(t); + + + }); + warehouseWaybillClient.updateList(data); + + + + return R.success("结算成功"); } diff --git a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java index 64d7ef1be..8663d088b 100644 --- a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java +++ b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java @@ -45,6 +45,8 @@ import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.StringUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -55,22 +57,35 @@ import java.util.stream.Collectors; @Slf4j @Service -@AllArgsConstructor public class StatisticsOrderInfoServiceImpl extends BaseServiceImpl implements IStatisticsOrderInfoService { - private final IStatisticsChangesRecordService changesRecordService; - private final IStatisticsChangesPhotoService changesPhotoService; - private final IStatisticsBalanceOrderInfoService balanceOrderInfoService; - private final IBasicdataPriceClient priceClient; - private final IStatisticsDistributionPackageService distributionPackageService; - private final IStatisticsWarehousePackageService warehousePackageService; - private final IStatisticsTrunklinePackageService trunklinePackageService; - private final IStatisticsReconciliationOrderInfoService reconciliationOrderInfoService; - private final IStatisticsAftersalesOrderRecordService aftersalesOrderRecordService; - private final IBasicdataWarehouseClient warehouseClient; - private final IStatisticsBalanceRecordService balanceRecordService; - private final IWarehouseWaybillClient warehouseWaybillClient; - private final IBasicdataClientClient basicdataClientClient; + @Autowired + private IStatisticsChangesRecordService changesRecordService; + @Autowired + private IStatisticsChangesPhotoService changesPhotoService; + @Lazy + @Autowired + private IStatisticsBalanceOrderInfoService balanceOrderInfoService; + @Autowired + private IBasicdataPriceClient priceClient; + @Autowired + private IStatisticsDistributionPackageService distributionPackageService; + @Autowired + private IStatisticsWarehousePackageService warehousePackageService; + @Autowired + private IStatisticsTrunklinePackageService trunklinePackageService; + @Autowired + private IStatisticsReconciliationOrderInfoService reconciliationOrderInfoService; + @Autowired + private IStatisticsAftersalesOrderRecordService aftersalesOrderRecordService; + @Autowired + private IBasicdataWarehouseClient warehouseClient; + @Autowired + private IStatisticsBalanceRecordService balanceRecordService; + @Autowired + private IWarehouseWaybillClient warehouseWaybillClient; + @Autowired + private IBasicdataClientClient basicdataClientClient; @Override public List findListByWaybillId(Long waybillId) { @@ -786,7 +801,8 @@ public class StatisticsOrderInfoServiceImpl extends BaseServiceImpl orderInfoIdsList) { @@ -1113,7 +1129,7 @@ public class StatisticsOrderInfoServiceImpl extends BaseServiceImpl te = warehouseWaybillClient.findListByWaybillIds(waybillIds); List data = new ArrayList<>(); - te.forEach(waybillEntity ->{ + te.forEach(waybillEntity -> { WarehouseWaybillEntity t = new WarehouseWaybillEntity(); t.setId(waybillEntity.getId()); t.setPayStatus("30"); - t.setSettlementStatus("30"); +// t.setSettlementStatus("30"); data.add(t); }); - - - - warehouseWaybillClient.updateList(data); return R.success("操作成功"); - } @Override diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java index 31ba17b39..971da470e 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java @@ -314,19 +314,9 @@ public class WarehouseWaybillController extends BladeController { String method = "############pageFinanceWaybillList: "; log.info(method + "请求参数{}", waybillDTO); try{ - List destinationWarehouseIds = new ArrayList<>(); + List destinationWarehouseIds = warehouseClient.getWarehouseIds(); //当前登录人选择的仓库 - BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); - if(Objects.isNull(myCurrentWarehouse)){ - List myWatchWarehouse = warehouseClient.getMyWatchWarehouse(); - if(!myWatchWarehouse.isEmpty()){ - myWatchWarehouse.forEach(warehouseEntity -> { - destinationWarehouseIds.add(warehouseEntity.getId()); - }); - } - }else{ - destinationWarehouseIds.add(myCurrentWarehouse.getId()); - } + waybillDTO.setDestinationWarehouseIds(destinationWarehouseIds); IPage pages = warehouseWaybillService.pageFinanceWaybillList(waybillDTO); diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseWaybillDTO.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseWaybillDTO.java index eac25f05b..e8c56eae1 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseWaybillDTO.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseWaybillDTO.java @@ -75,4 +75,14 @@ public class WarehouseWaybillDTO extends WarehouseWaybillEntity { private Date checkTimeEndDate; private String ids; + /** + * 付款状态 + */ + private String payStatus; + + /** + * 结算状态 + */ + private String settlementStatus; + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml index 790d4d50f..c4e49a461 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml @@ -494,7 +494,9 @@ GROUP_CONCAT(concat(lwwd.product_name,'(',IFNULL(lwwd.delivery_price,0),')')) goodsTypeDeliveryPrice, GROUP_CONCAT(concat(lwwd.product_name,'(',IFNULL(lwwd.pickup_price,0),')')) goodsTypePickupPrice, GROUP_CONCAT(concat(lwwd.product_name,'(',IFNULL(lwwd.freight_price,0),')')) goodsTypeFreightPrice, - count(lwwd.id) goodsTypeCount + count(lwwd.id) goodsTypeCount, + lww.pay_status, + lww.settlement_status from logpm_warehouse_waybill lww left join logpm_basicdata_client lbc on lbc.id = lww.consignee_id left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id and lwwd.is_deleted = 0 @@ -642,6 +644,12 @@ and lww.freeze_time <= #{param.freezeTimeEndDate} + + and lww.pay_status = #{param.payStatus} + + + and lww.freeze_time = #{param.settlementStatus} + GROUP BY lww.id order by lww.create_time desc