更新统计相关内容
This commit is contained in:
parent
64438fd074
commit
b0fd8b7896
@ -317,7 +317,7 @@ public class RepairStatisticsController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description : 工种类型统计
|
* @description : 工种类型统计
|
||||||
* @author AI
|
* @author xyc
|
||||||
* @date 2025/11/1
|
* @date 2025/11/1
|
||||||
* @param reqVO {@link QueryBusinessReqVO}
|
* @param reqVO {@link QueryBusinessReqVO}
|
||||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
|
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
|
||||||
|
|||||||
@ -211,7 +211,7 @@ public interface RepairStatisticsService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description : 工种类型统计
|
* @description : 工种类型统计
|
||||||
* @author AI
|
* @author xyc
|
||||||
* @date 2025/11/1
|
* @date 2025/11/1
|
||||||
* @param reqVO {@link QueryBusinessReqVO}
|
* @param reqVO {@link QueryBusinessReqVO}
|
||||||
* @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
|
* @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.base.service.impl;
|
package cn.iocoder.yudao.module.base.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.iocoder.yudao.common.TicketsStatusEnum;
|
||||||
import cn.iocoder.yudao.module.base.entity.StaffStatisticsResp;
|
import cn.iocoder.yudao.module.base.entity.StaffStatisticsResp;
|
||||||
import cn.iocoder.yudao.module.base.mapper.RepairStatisticsMapper;
|
import cn.iocoder.yudao.module.base.mapper.RepairStatisticsMapper;
|
||||||
import cn.iocoder.yudao.module.base.service.RepairStatisticsService;
|
import cn.iocoder.yudao.module.base.service.RepairStatisticsService;
|
||||||
@ -410,7 +411,7 @@ public class RepairStatisticsServiceImpl implements RepairStatisticsService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description : 工种类型统计
|
* @description : 工种类型统计
|
||||||
* @author AI
|
* @author xyc
|
||||||
* @date 2025/11/1
|
* @date 2025/11/1
|
||||||
* @param reqVO {@link QueryBusinessReqVO}
|
* @param reqVO {@link QueryBusinessReqVO}
|
||||||
* @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
|
* @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
|
||||||
@ -464,6 +465,18 @@ public class RepairStatisticsServiceImpl implements RepairStatisticsService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*服务顾问统计接了多少单*/
|
||||||
|
long count = ticketsService.count(Wrappers.<DlRepairTickets>lambdaQuery()
|
||||||
|
.between(StringUtils.isNotBlank(startDate) && StringUtils.isNotBlank(endDate), DlRepairTickets::getCreateTime, startDate, endDate));
|
||||||
|
resp.add(new HashMap<String, Object>() {{
|
||||||
|
put("name", "服务顾问");
|
||||||
|
put("id", "fwgw");
|
||||||
|
put("count", count);
|
||||||
|
}});
|
||||||
|
|
||||||
|
/*总检 合格了多少 返工了多少*/
|
||||||
|
|
||||||
|
|
||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -501,7 +514,7 @@ public class RepairStatisticsServiceImpl implements RepairStatisticsService {
|
|||||||
|
|
||||||
// 维修中(按 repairType 分组)
|
// 维修中(按 repairType 分组)
|
||||||
Map<String, Long> workingStats = ticketsInRange.stream()
|
Map<String, Long> workingStats = ticketsInRange.stream()
|
||||||
.filter(item -> "04".equals(item.getTicketsStatus())) // 假设04是维修中的状态码
|
.filter(item -> TicketsStatusEnum.WORKING.getCode().equals(item.getTicketsStatus())) //
|
||||||
.collect(Collectors.groupingBy(DlRepairTickets::getRepairType, Collectors.counting()));
|
.collect(Collectors.groupingBy(DlRepairTickets::getRepairType, Collectors.counting()));
|
||||||
statsList.add(createStatsNode("workingNum", "维修中", workingStats, "weixiuzhong", true));
|
statsList.add(createStatsNode("workingNum", "维修中", workingStats, "weixiuzhong", true));
|
||||||
|
|
||||||
|
|||||||
@ -1170,6 +1170,9 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
|||||||
|
|
||||||
//计算实付金额的总和
|
//计算实付金额的总和
|
||||||
BigDecimal actualMoney = settlement.getActualMoney();
|
BigDecimal actualMoney = settlement.getActualMoney();
|
||||||
|
if (actualMoney == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
receivableAmount = receivableAmount.add(actualMoney);
|
receivableAmount = receivableAmount.add(actualMoney);
|
||||||
|
|
||||||
receivableCount++;
|
receivableCount++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user