Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dist.1.3.0
zhaoqiaobo 10 months ago
parent
commit
3e61c02062
  1. 5
      blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java
  2. 2
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/MerchantStatisticsDTO.java
  3. 3
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/StatisticsBalanceRecordDTO.java
  4. 24
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  5. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  6. 51
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  7. 12
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/MerchantBalanceController.java
  8. 20
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.xml
  9. 20
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsBalanceOrderInfoServiceImpl.java

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

@ -39,8 +39,13 @@ public enum WorkNodeEnums implements Serializable {
PUTAWAY(240, "上架"),
DELIST(250, "下架"),
STOCKING_OPERATION(260, "备货作业"),
PLAN_DELIVERY(261, "计划配送"),
CANCEL_DELIVERY(262, "计划取消"),
PLAN_BILLOFLADING(263, "计划自提"),
CANCEL_BILLOFLADING(264, "取消自提"),
DISTRIBUTION_LOADING(270, "配送装车"),
DISTRIBUTION_ABNORMAL_LOADING(271, "异常装车"),
DISTRIBUTION_CANCEL_LOADING(272, "取消装车"),
DISTRIBUTION_SIGN_FOR(280, "配送签收"),
DISTRIBUTION_ABNORMAL_SIGN_FOR(281, "异常签收"),
CLERK_REVIEW(290, "文员复核");

2
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/MerchantStatisticsDTO.java

@ -23,6 +23,6 @@ public class MerchantStatisticsDTO implements Serializable {
private List<Long> orderInfoIds;
private Long balanceOrderId;
private Long balanceOrderInfoId;
}

3
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/StatisticsBalanceRecordDTO.java

@ -4,11 +4,12 @@ import com.logpm.statistics.entity.StatisticsBalanceRecordEntity;
import com.logpm.statistics.entity.StatisticsBalanceRecordPhotoEntity;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
public class StatisticsBalanceRecordDTO extends StatisticsBalanceRecordEntity {
private List<StatisticsBalanceRecordPhotoEntity> recordPhotoEntityList;
private List<StatisticsBalanceRecordPhotoEntity> recordPhotoEntityList = new ArrayList<>();
}

24
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -1155,14 +1155,24 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
.apply("conditions in (1,2)")
);
//需要待回复的处理方
List<AftersalesProcessorVO> processorVOS = list.stream().map(i -> {
if (i.getProcessingStatus().equals(ProcessorProcessingStatusStatusConstant.daichuli.getValue()) || i.getProcessingStatus().equals(ProcessorProcessingStatusStatusConstant.yichuli.getValue())) {
AftersalesProcessorVO processorVO = new AftersalesProcessorVO();
BeanUtil.copyProperties(i, processorVO);
return processorVO;
List<AftersalesProcessorVO> processorVOS = new ArrayList<>();
if (!list.isEmpty()) {
Iterator<AftersalesProcessorEntity> iterator = list.iterator();
while (iterator.hasNext()){
AftersalesProcessorEntity next = iterator.next();
if (ProcessorProcessingStatusStatusConstant.daichuli.getValue().equals(next.getProcessingStatus())
|| ProcessorProcessingStatusStatusConstant.yichuli.getValue().equals(next.getProcessingStatus())){
AftersalesProcessorVO processorVO = new AftersalesProcessorVO();
BeanUtil.copyProperties(next, processorVO);
processorVOS.add(processorVO);
}else {
iterator.remove();
}
}
return null;
}).collect(Collectors.toList());
}
aftersalesWorkOrderVO.setProcessorVOList(processorVOS);
//查询包件

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -783,7 +783,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
trunklinePackageTrackLog.put("createDept",loadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",loadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",loadscanEntity.getWarehouseId()==null?myCurrentWarehouse.getId():loadscanEntity.getWarehouseId());
trunklinePackageTrackLog.put("warehouseId",loadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():loadscanEntity.getWarehouseName());
trunklinePackageTrackLog.put("warehouseName",loadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():loadscanEntity.getWarehouseName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.DISTRIBUTION_LOADING.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",loadscanEntity.getScanUser());
@ -5503,7 +5503,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
trunklinePackageTrackLog.put("createDept",loadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",loadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",loadscanEntity.getWarehouseId()==null?myCurrentWarehouse.getId():loadscanEntity.getWarehouseId());
trunklinePackageTrackLog.put("warehouseId",loadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():loadscanEntity.getWarehouseName());
trunklinePackageTrackLog.put("warehouseName",loadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():loadscanEntity.getWarehouseName());
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",loadscanEntity.getScanUser());

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

@ -2489,7 +2489,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//下架解托
warehouseUpdownTypeClient.downPackageOrDelTray(loadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托");
//维护订单状态
String content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getScanUser()+"扫描签收,装车方式:扫描装车,配送车次号:"+deliveryListEntity.getTrainNumber()+"预约任务号:"+distributionReservationEntity.getReservationCode();
String content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getSigningUser()+"扫描签收,装车方式:扫描装车,配送车次号:"+deliveryListEntity.getTrainNumber()+"预约任务号:"+distributionReservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",loadscanEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",loadscanEntity.getCreateTime());
@ -2501,7 +2501,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
trunklinePackageTrackLog.put("createDept",loadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",loadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",loadscanEntity.getWarehouseId()==null?myCurrentWarehouse.getId():loadscanEntity.getWarehouseId());
trunklinePackageTrackLog.put("warehouseId",loadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():loadscanEntity.getWarehouseName());
trunklinePackageTrackLog.put("warehouseName",loadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():loadscanEntity.getWarehouseName());
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",loadscanEntity.getScanUser());
@ -2578,8 +2578,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
warehouseUpdownTypeClient.downPackageOrDelTray(collect.get(0).getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托");
packageLockIds.add(distributionLoadscanEntity.getPackageId());
String content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getScanUser()+"扫描签收,装车方式:补录装车,配送车次号:"+deliveryListEntity.getTrainNumber()+"预约任务号:"+distributionReservationEntity.getReservationCode();
log.info("content 参数:>>>>>>>>>>Warehouse:{},ScanUser:{},TrainNumber:{},ReservationCode:{}",myCurrentWarehouse.getName(),distributionLoadscanEntity.getSigningUser(),deliveryListEntity.getTrainNumber(),distributionReservationEntity.getReservationCode());
String content = "包件在"+myCurrentWarehouse.getName()+"由"+distributionLoadscanEntity.getSigningUser()+"扫描签收,装车方式:补录装车,配送车次号:"+deliveryListEntity.getTrainNumber()+"预约任务号:"+distributionReservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",distributionLoadscanEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",distributionLoadscanEntity.getCreateTime());
@ -2594,9 +2594,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
trunklinePackageTrackLog.put("warehouseId",distributionLoadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():loadscanEntity.getWarehouseName());
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",loadscanEntity.getScanUser());
trunklinePackageTrackLog.put("operator",distributionLoadscanEntity.getScanUser());
aaa.add(trunklinePackageTrackLog);
orderPackageCodes.add(loadscanEntity.getOrderPackageCode());
orderPackageCodes.add(distributionLoadscanEntity.getOrderPackageCode());
}
@ -3289,7 +3289,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
trunklinePackageTrackLog.put("createDept",distributionLoadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",distributionLoadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",distributionLoadscanEntity.getWarehouseId()==null?myCurrentWarehouse.getId():distributionLoadscanEntity.getWarehouseId());
trunklinePackageTrackLog.put("warehouseId",distributionLoadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():distributionLoadscanEntity.getWarehouseName());
trunklinePackageTrackLog.put("warehouseName",distributionLoadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():distributionLoadscanEntity.getWarehouseName());
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",distributionLoadscanEntity.getScanUser());
@ -5117,6 +5117,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
String signingTime = simpleDateFormat.format(new Date());
List<Long> packageIds = new ArrayList<>();
List<String> packageCodes = new ArrayList<>();
List<JSONObject> aaa = new ArrayList<>();
if (Func.isNotEmpty(parcelListEntityList)) {
loadingPackageNum += parcelListEntityList.stream().mapToInt(DistributionParcelListEntity::getQuantity).sum();
signingPackageNum += parcelListEntityList.stream().mapToInt(DistributionParcelListEntity::getQuantity).sum();
@ -5129,7 +5130,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
String content = "";
JSONObject trunklinePackageTrackLog= new JSONObject();
if (Func.isEmpty(loadscanEntities)) {
//没有进行过装车操作
DistributionLoadscanEntity loadscanEntity = new DistributionLoadscanEntity();
loadscanEntity.setPackageId(parcelListEntity.getId());
@ -5183,7 +5187,19 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
jsonObject.put("num",1);
jsonObject.put("remark","批量签收下架");
jsonObjects.add(jsonObject);
content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getSigningUser()+"司机一键签收,装车方式:扫描装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode();
trunklinePackageTrackLog.put("tenantId",loadscanEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",loadscanEntity.getCreateTime());
trunklinePackageTrackLog.put("createUser",loadscanEntity.getCreateUser());
trunklinePackageTrackLog.put("updateUser",loadscanEntities.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",loadscanEntity.getUpdateTime());
trunklinePackageTrackLog.put("isDeleted",loadscanEntity.getIsDeleted());
trunklinePackageTrackLog.put("status",loadscanEntity.getStatus());
trunklinePackageTrackLog.put("createDept",loadscanEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",loadscanEntity.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",loadscanEntity.getWarehouseId()==null?myCurrentWarehouse.getId():loadscanEntities.getWarehouseId());
trunklinePackageTrackLog.put("warehouseName",loadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():loadscanEntities.getWarehouseName());
trunklinePackageTrackLog.put("operator",loadscanEntity.getScanUser());
} else {
//存在装车数据
if (distributionSignfor.getIsClerk()) {
@ -5203,8 +5219,26 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntities.setSigningTime(signingTime);
distributionLoadscanService.updateById(loadscanEntities);
packageLockIds.add(loadscanEntities.getPackageId());
content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntities.getSigningUser()+"司机一键签收,装车方式:补录装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode();
trunklinePackageTrackLog.put("tenantId",loadscanEntities.getTenantId());
trunklinePackageTrackLog.put("createTime",loadscanEntities.getCreateTime());
trunklinePackageTrackLog.put("createUser",loadscanEntities.getCreateUser());
trunklinePackageTrackLog.put("updateUser",loadscanEntities.getUpdateUser());
trunklinePackageTrackLog.put("updateTime",loadscanEntities.getUpdateTime());
trunklinePackageTrackLog.put("isDeleted",loadscanEntities.getIsDeleted());
trunklinePackageTrackLog.put("status",loadscanEntities.getStatus());
trunklinePackageTrackLog.put("createDept",loadscanEntities.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",loadscanEntities.getOrderPackageCode());
trunklinePackageTrackLog.put("warehouseId",loadscanEntities.getWarehouseId()==null?myCurrentWarehouse.getId():loadscanEntities.getWarehouseId());
trunklinePackageTrackLog.put("warehouseName",loadscanEntities.getWarehouseName()==null?myCurrentWarehouse.getName():loadscanEntities.getWarehouseName());
trunklinePackageTrackLog.put("operator",loadscanEntities.getScanUser());
}
}
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
trunklinePackageTrackLog.put("content",content);
aaa.add(trunklinePackageTrackLog);
// distributionAsyncService.sendFactory(parcelListEntity, simpleDateFormat.format(new Date()), reservationEntity.getId(), reservationEntity.getReservationCode(), myCurrentWarehouse.getName(), user.getNickName());
packageIds.add(parcelListEntity.getId());
orderCodes.add(parcelListEntity.getOrderCode());
@ -5230,6 +5264,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
map.put("warehouseId", myCurrentWarehouse.getId());
warehouseUpdownTypeClient.downDeliveryPackage(map);
trunklinePackageTrackLogClient.addPackageTrackLog(aaa,packageCodes,WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
}
}
//批量维护订单信息

12
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/MerchantBalanceController.java

@ -133,7 +133,7 @@ public class MerchantBalanceController {
@ResponseBody
@PostMapping("/findRecordList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查询异常列表", notes = "传入balanceRecordDTO")
@ApiOperation(value = "查询结算记录列表", notes = "传入balanceRecordDTO")
public R findRecordList(@RequestBody StatisticsBalanceRecordDTO balanceRecordDTO) {
String method = "############findRecordList: ";
log.info(method+"请求参数{}",balanceRecordDTO);
@ -158,19 +158,19 @@ public class MerchantBalanceController {
@ResponseBody
@PostMapping("/findBalanceDetail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查询异常列表", notes = "传入merchantStatisticsDTO")
@ApiOperation(value = "查询结算单详情", notes = "传入merchantStatisticsDTO")
public R findBalanceDetail(@RequestBody MerchantStatisticsDTO merchantStatisticsDTO) {
String method = "############findBalanceDetail: ";
log.info(method+"请求参数{}",merchantStatisticsDTO);
try{
Long balanceOrderId = merchantStatisticsDTO.getBalanceOrderId();
if(Objects.isNull(balanceOrderId)){
log.warn(method+"请选择正确的结算单 balanceOrderId={}",balanceOrderId);
Long balanceOrderInfoId = merchantStatisticsDTO.getBalanceOrderInfoId();
if(Objects.isNull(balanceOrderInfoId)){
log.warn(method+"请选择正确的结算单 balanceOrderInfoId={}",balanceOrderInfoId);
return R.fail(405,"请选择正确的结算单");
}
return balanceOrderInfoService.findBalanceDetail(balanceOrderId);
return balanceOrderInfoService.findBalanceDetail(balanceOrderInfoId);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);

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

@ -39,11 +39,11 @@
GROUP_CONCAT(lscr.remark) changesRemark,
MAX(lscr.create_time) changesTime,
GROUP_CONCAT(DISTINCT lstp.product_name) goodsName,
sum(lstp.total_num) totalcount,
sum(lstp.total_weight) totalWeight,
sum(lstp.total_volume) totalVolume,
sum(lstp.open_price+lswp.open_price+lsdp.open_price) openFee,
sum(lstp.total_price+lswp.total_price+lsdp.total_price) totalFee,
IFNULL(sum(lstp.total_num),0) totalcount,
IFNULL(sum(lstp.total_weight),0) totalWeight,
IFNULL(sum(lstp.total_volume),0) totalVolume,
IFNULL(sum(lstp.open_price+lswp.open_price+lsdp.open_price),0) openFee,
IFNULL(sum(lstp.total_price+lswp.total_price+lsdp.total_price),0) totalFee,
sum(lstp.pickup_fee) pickupFee,
sum(lstp.real_pickup_fee) realPickupFee,
sum(lstp.freight_fee) freightFee,
@ -159,11 +159,11 @@
GROUP_CONCAT(lscr.remark) changesRemark,
MAX(lscr.create_time) changesTime,
GROUP_CONCAT(DISTINCT lstp.product_name) goodsName,
sum(lstp.total_num) totalcount,
sum(lstp.total_weight) totalWeight,
sum(lstp.total_volume) totalVolume,
sum(lstp.open_price+lswp.open_price+lsdp.open_price) openFee,
sum(lstp.total_price+lswp.total_price+lsdp.total_price) totalFee,
IFNULL(sum(lstp.total_num),0) totalcount,
IFNULL(sum(lstp.total_weight),0) totalWeight,
IFNULL(sum(lstp.total_volume),0) totalVolume,
IFNULL(sum(lstp.open_price+lswp.open_price+lsdp.open_price),0) openFee,
IFNULL(sum(lstp.total_price+lswp.total_price+lsdp.total_price),0) totalFee,
sum(lstp.pickup_fee) pickupFee,
sum(lstp.real_pickup_fee) realPickupFee,
sum(lstp.freight_fee) freightFee,

20
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsBalanceOrderInfoServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.statistics.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -22,6 +23,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@ -105,6 +107,11 @@ public class StatisticsBalanceOrderInfoServiceImpl extends BaseServiceImpl<Stati
balanceAbnormalEntityQueryWrapper.eq("balance_order_info_id",balanceOrderInfoId);
List<StatisticsBalanceAbnormalEntity> list = balanceAbnormalService.list(balanceAbnormalEntityQueryWrapper);
if(list.isEmpty()){
return R.data(CollUtil.newArrayList());
}
//把list中所有元素的id放到一个List集合中
List<Long> idList= list.stream()
.map(StatisticsBalanceAbnormalEntity::getId)
@ -118,13 +125,15 @@ public class StatisticsBalanceOrderInfoServiceImpl extends BaseServiceImpl<Stati
Map<Long, List<StatisticsBalanceAbnormalPhotoEntity>> groupedPhotos = abnormalPhotoEntityList.stream()
.collect(Collectors.groupingBy(StatisticsBalanceAbnormalPhotoEntity::getAbnormalId));
List<StatisticsBalanceAbnormalVO> abnormalVOList = new ArrayList<>();
list.forEach(balanceAbnormalEntity -> {
StatisticsBalanceAbnormalVO balanceAbnormalVO = new StatisticsBalanceAbnormalVO();
BeanUtil.copy(balanceAbnormalEntity,balanceAbnormalVO);
balanceAbnormalVO.setAbnormalPhotoEntityList(groupedPhotos.get(balanceAbnormalEntity.getId()));
abnormalVOList.add(balanceAbnormalVO);
});
return R.data(list);
return R.data(abnormalVOList);
}
@Transactional(rollbackFor = Exception.class)
@ -189,6 +198,11 @@ public class StatisticsBalanceOrderInfoServiceImpl extends BaseServiceImpl<Stati
balanceAbnormalEntityQueryWrapper.eq("balance_order_info_id",balanceOrderInfoId);
List<StatisticsBalanceRecordEntity> list = balanceRecordService.list(balanceAbnormalEntityQueryWrapper);
if(list.isEmpty()){
return R.data(CollUtil.newArrayList());
}
//把list中所有元素的id放到一个List集合中
List<Long> idList= list.stream()
.map(StatisticsBalanceRecordEntity::getId)
@ -202,15 +216,17 @@ public class StatisticsBalanceOrderInfoServiceImpl extends BaseServiceImpl<Stati
Map<Long, List<StatisticsBalanceRecordPhotoEntity>> groupedPhotos = recordPhotoEntityList.stream()
.collect(Collectors.groupingBy(StatisticsBalanceRecordPhotoEntity::getRecordId));
List<StatisticsBalanceRecordVO> balanceRecordVOS = new ArrayList<>();
list.forEach(balanceRecordEntity -> {
StatisticsBalanceRecordVO balanceRecordVO = new StatisticsBalanceRecordVO();
BeanUtil.copy(balanceRecordEntity,balanceRecordVO);
balanceRecordVO.setRecordPhotoEntityList(groupedPhotos.get(balanceRecordEntity.getId()));
balanceRecordVO.setBalanceUserName(balanceRecordEntity.getBalanceUserName());
balanceRecordVO.setBalanceRemark(balanceRecordEntity.getBalanceRemark());
balanceRecordVOS.add(balanceRecordVO);
});
return R.data(list);
return R.data(balanceRecordVOS);
}
@Override

Loading…
Cancel
Save