Compare commits
12 Commits
3c8d315876
...
b160d368d1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b160d368d1 | ||
|
|
643194cf97 | ||
|
|
69701b5341 | ||
|
|
040d73969e | ||
|
|
ac54a7735c | ||
|
|
4d3a306b53 | ||
|
|
57f5f46709 | ||
|
|
b3d4cbbe68 | ||
| 47970cb1c9 | |||
| 96fd9fe05e | |||
| 7456e0fa06 | |||
| 0fbd4fd974 |
@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.base.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.base.service.RepairStatisticsService;
|
||||
import cn.iocoder.yudao.module.base.vo.InventoryStatisticsVO;
|
||||
import cn.iocoder.yudao.module.base.service.impl.InventoryStatisticsVO;
|
||||
import cn.iocoder.yudao.module.base.vo.QueryBusinessReqVO;
|
||||
import cn.iocoder.yudao.module.base.vo.QueryBusinessResp;
|
||||
import cn.iocoder.yudao.module.base.vo.QueryTableResp;
|
||||
@ -346,7 +346,6 @@ public class RepairStatisticsController {
|
||||
* @description : 库存统计
|
||||
* @author xyc
|
||||
* @date 11:30 2025/11/18
|
||||
* @param [reqVO]
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.module.base.vo.InventoryStatisticsVO>
|
||||
**/
|
||||
@GetMapping("/inventoryStatistics")
|
||||
|
||||
@ -11,11 +11,12 @@ import cn.iocoder.yudao.module.rescue.domain.RescueInfo;
|
||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto;
|
||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto;
|
||||
import cn.iocoder.yudao.module.rescue.service.IRescueInfoService;
|
||||
import cn.iocoder.yudao.module.rescue.vo.DriverReceiptStatVO;
|
||||
import cn.iocoder.yudao.module.rescue.vo.RescueCarStatRespVO;
|
||||
import cn.iocoder.yudao.module.rescue.vo.StatisticsStaffVO;
|
||||
import cn.iocoder.yudao.module.staff.entity.CompanyStaff;
|
||||
import cn.iocoder.yudao.module.rescue.vo.money.DriverSummaryDetailVO;
|
||||
import cn.iocoder.yudao.module.rescue.vo.money.DriverSummaryVO;
|
||||
import cn.iocoder.yudao.module.staff.service.CompanyStaffService;
|
||||
import cn.iocoder.yudao.module.staff.vo.CompanyStaffReqVO;
|
||||
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
||||
import cn.iocoder.yudao.module.system.api.permission.RoleApi;
|
||||
import cn.iocoder.yudao.module.system.api.permission.dto.RoleReqDTO;
|
||||
@ -23,7 +24,6 @@ import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -89,8 +89,8 @@ public class RescueInfoController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/getRescueCarKPI")
|
||||
public CommonResult<List<RescueInfo>> getRescueCarKPI(
|
||||
String driverCarNum,String startTime,String endTime,String channel,String secondDispatchName) {
|
||||
List<RescueInfo> list = rescueInfoService.getRescueCarKPI(driverCarNum,startTime,endTime,channel,secondDispatchName);
|
||||
String driverCarNum, String startTime, String endTime, String channel, String secondDispatchName) {
|
||||
List<RescueInfo> list = rescueInfoService.getRescueCarKPI(driverCarNum, startTime, endTime, channel, secondDispatchName);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@ -148,8 +148,8 @@ public class RescueInfoController extends BaseController {
|
||||
|
||||
@GetMapping("/getRescueRevokeList")
|
||||
public CommonResult getRescueRevokeList(RescueInfo rescueInfo,
|
||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<RescueInfo> page = new Page<>(pageNum, pageSize);
|
||||
//获取当前登录用户
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
@ -314,6 +314,7 @@ public class RescueInfoController extends BaseController {
|
||||
List<DriverInfo2Dto> driverList = rescueInfoService.driverInMap(driverInfoDto);
|
||||
return success(driverList);
|
||||
}
|
||||
|
||||
@GetMapping("/secondDriverInMap")
|
||||
public CommonResult secondDriverInMap(DriverInfoDto driverInfoDto) {
|
||||
List<DriverInfo2Dto> driverList = rescueInfoService.secondDriverInMap(driverInfoDto);
|
||||
@ -388,8 +389,8 @@ public class RescueInfoController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/getHcList")
|
||||
public CommonResult getHcList(RescueInfo rescueInfo,
|
||||
@RequestParam(value = "pageNum", defaultValue = "1")Integer pageNum,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize) {
|
||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<RescueInfo> page = new Page<>(pageNum, pageSize);
|
||||
IPage<RescueInfo> rescueInfos = rescueInfoService.getHcList(rescueInfo, page);
|
||||
return success(rescueInfos);
|
||||
@ -399,12 +400,11 @@ public class RescueInfoController extends BaseController {
|
||||
* 获取扣车订单
|
||||
*/
|
||||
@GetMapping("/statisticsInfo")
|
||||
public CommonResult statisticsInfo(String type) {
|
||||
public CommonResult statisticsInfo(String type) {
|
||||
return success(rescueInfoService.statisticsInfo(type));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/toRepair")
|
||||
public CommonResult toRepair(@RequestBody RepairBookingRespVO repairBookingRespVO) {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
@ -449,14 +449,39 @@ public class RescueInfoController extends BaseController {
|
||||
return success(rescueInfoService.statisticsAllSecond(statisticsStaffReqVO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 待收款明细统计 app端
|
||||
*/
|
||||
@GetMapping("/moneySummary")
|
||||
public CommonResult moneySummary(DriverSummaryVO driverSummaryVO) {
|
||||
return success(rescueInfoService.moneySummary(driverSummaryVO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 明细详情 app端
|
||||
*/
|
||||
@GetMapping("/moneySummaryDetail")
|
||||
public CommonResult moneySummaryDetail(DriverSummaryDetailVO driverSummaryDetailVO) {
|
||||
return success(rescueInfoService.moneySummaryDetail(driverSummaryDetailVO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 司机收款统计(汇总 + 渠道明细)PC端
|
||||
*/
|
||||
@GetMapping("/getRescueStatisticsInfoByDriver")
|
||||
public CommonResult getRescueStatisticsInfoByDriver(DriverReceiptStatVO query) {
|
||||
// query 里包含时间区间 / 司机姓名等筛选条件
|
||||
return CommonResult.success(rescueInfoService.getRescueStatisticsInfoByDriver(query));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* App首页数据统计工单列表数据
|
||||
*/
|
||||
@GetMapping("/getRescueStatisticsInfoList")
|
||||
public CommonResult getRescueStatisticsInfoList(RescueInfo rescueInfo,
|
||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<RescueInfo> page = new Page<>(pageNum, pageSize);
|
||||
//获取当前登录用户
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
|
||||
@ -221,6 +221,8 @@ public class RescueInfoSystem extends BaseController {
|
||||
rescueInfoIPage.getRecords().forEach(item -> {
|
||||
item.setSetMoneyYuan(Double.valueOf(Optional.ofNullable(item.getSetMoney()).orElse(0L)) / 100);
|
||||
item.setPayMoneyYuan(Double.valueOf(Optional.ofNullable(item.getPayMoney()).orElse(0L)) / 100);
|
||||
// ⭐ 关键:这里把施救里程数算出来
|
||||
item.calcRescueScale();
|
||||
});
|
||||
list.addAll(rescueInfoIPage.getRecords());
|
||||
pageNo++;
|
||||
|
||||
@ -9,10 +9,13 @@ import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 rescue_info
|
||||
*
|
||||
@ -42,7 +45,7 @@ public class RescueInfo extends TenantBaseDO
|
||||
private String licenseNum;
|
||||
@Excel(name = "司机姓名")
|
||||
private String driverName;
|
||||
@Excel(name = "司机手机号")
|
||||
// @Excel(name = "司机手机号")
|
||||
private String driverPhoneNum;
|
||||
@Excel(name = "司机车牌号")
|
||||
private String driverCarNum;
|
||||
@ -65,9 +68,9 @@ public class RescueInfo extends TenantBaseDO
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone="GMT+8")
|
||||
@Excel(name = "救援时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
||||
private Date rescueTime;
|
||||
@Excel(name = "救援开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
||||
// @Excel(name = "救援开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
||||
private Date rescueStartTime;
|
||||
@Excel(name = "救援结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
||||
// @Excel(name = "救援结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
||||
private Date rescueEndTime;
|
||||
|
||||
/** 救援类型 */
|
||||
@ -108,7 +111,7 @@ public class RescueInfo extends TenantBaseDO
|
||||
private String carBrand;
|
||||
|
||||
/** 目的地详细描述 */
|
||||
@Excel(name = "目的地")
|
||||
// @Excel(name = "目的地")
|
||||
private String destinationInfo;
|
||||
|
||||
/** 目的地经度 */
|
||||
@ -129,12 +132,31 @@ public class RescueInfo extends TenantBaseDO
|
||||
@Excel(name = "路段")
|
||||
private String sectionRoad;
|
||||
//开始的公里数
|
||||
@Excel(name = "出发里程表")
|
||||
private Double startScale;
|
||||
//结束的公里数
|
||||
@Excel(name = "结束里程表")
|
||||
private Double endScale;
|
||||
// 施救里程数(数据库没有)
|
||||
@Excel(name = "施救里程数")
|
||||
@TableField(exist = false)
|
||||
private Double rescueScale;
|
||||
// 可选:写个便捷方法专门算这个字段
|
||||
public void calcRescueScale() {
|
||||
if (startScale == null || endScale == null) {
|
||||
this.rescueScale = null;
|
||||
return;
|
||||
}
|
||||
this.rescueScale = BigDecimal.valueOf(endScale)
|
||||
.subtract(BigDecimal.valueOf(startScale))
|
||||
.setScale(2, RoundingMode.HALF_UP)
|
||||
.doubleValue();
|
||||
}
|
||||
|
||||
//放空公里数
|
||||
private Double emptyNum;
|
||||
//过关费
|
||||
@Excel(name = "过关费")
|
||||
private Double checkpointMoney;
|
||||
private Long deptId;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
@ -296,9 +318,17 @@ public class RescueInfo extends TenantBaseDO
|
||||
*/
|
||||
private String secondDispatchPhone;
|
||||
|
||||
/** 指派给二级调度id */
|
||||
private String assignDispatchId;
|
||||
/** 指派给二级调度姓名 */
|
||||
private String assignDispatchName;
|
||||
/** 指派给二级调度手机号 */
|
||||
private String assignDispatchPhone;
|
||||
|
||||
/**
|
||||
* 来源
|
||||
*/
|
||||
@Excel(name = "来源")
|
||||
private String source;
|
||||
|
||||
/**
|
||||
@ -412,18 +442,23 @@ public class RescueInfo extends TenantBaseDO
|
||||
private String orderSigningRealName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "是否确认收款", readConverterExp = "0=否,1=是")
|
||||
private String ifConfirmPay;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "收款账号")
|
||||
private String accountNumber;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "确认收款人")
|
||||
private String confirmPaymentPersonName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "确认收款时间")
|
||||
private String confirmPaymentTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "确认收款备注")
|
||||
private String confirmPaymentPersonRemark;
|
||||
|
||||
@TableField(exist = false)
|
||||
|
||||
@ -7,6 +7,8 @@ import cn.iocoder.yudao.module.rescue.domain.RescueInfo;
|
||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto;
|
||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto;
|
||||
import cn.iocoder.yudao.module.rescue.vo.*;
|
||||
import cn.iocoder.yudao.module.rescue.vo.money.DriverSummaryDetailVO;
|
||||
import cn.iocoder.yudao.module.rescue.vo.money.DriverSummaryVO;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
@ -143,4 +145,11 @@ public interface RescueInfoMapper extends BaseMapper<RescueInfo>
|
||||
@Param("secondDispatchName") String secondDispatchName
|
||||
);
|
||||
|
||||
List<DriverReceiptStatVO> selectDriverReceiptStats(DriverReceiptStatVO query);
|
||||
|
||||
List<ChannelReceiptStatVO> selectChannelReceiptStats(DriverReceiptStatVO query);
|
||||
|
||||
List<DriverSummaryVO> moneySummary(DriverSummaryVO driverSummaryVO);
|
||||
|
||||
List<DriverSummaryDetailVO> moneySummaryDetail(DriverSummaryDetailVO driverSummaryDetailVO);
|
||||
}
|
||||
|
||||
@ -8,6 +8,8 @@ import cn.iocoder.yudao.module.rescue.domain.RescueInfo;
|
||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfo2Dto;
|
||||
import cn.iocoder.yudao.module.rescue.dto.DriverInfoDto;
|
||||
import cn.iocoder.yudao.module.rescue.vo.*;
|
||||
import cn.iocoder.yudao.module.rescue.vo.money.DriverSummaryDetailVO;
|
||||
import cn.iocoder.yudao.module.rescue.vo.money.DriverSummaryVO;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -215,4 +217,10 @@ public interface IRescueInfoService extends IService<RescueInfo>
|
||||
List<RescueCarStatRespVO> getRescueCarAgeAndMileage();
|
||||
|
||||
List<RescueInfo> getRescueCarKPI(String driverCarNum,String startTime,String endTime,String channel,String secondDispatchName);
|
||||
|
||||
List<DriverReceiptStatVO> getRescueStatisticsInfoByDriver(DriverReceiptStatVO query);
|
||||
|
||||
List<DriverSummaryVO> moneySummary(DriverSummaryVO driverSummaryVO);
|
||||
|
||||
List<DriverSummaryDetailVO> moneySummaryDetail(DriverSummaryDetailVO driverSummaryDetailVO);
|
||||
}
|
||||
|
||||
@ -136,7 +136,8 @@ public class RescueBusinessStatisticsServiceImpl implements RescueBusinessStatis
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 3. 批量翻译
|
||||
Map<String, String> dict = dictDataService.getDictDataLabels("jyc_type", codes);
|
||||
// Map<String, String> dict = dictDataService.getDictDataLabels("jyc_type", codes);
|
||||
Map<String, String> dict = dictDataService.getDictDataLabels("rescue_car_type", codes);
|
||||
|
||||
// 4. 设置中文,并兜底空值
|
||||
items.forEach(i -> {
|
||||
|
||||
@ -27,6 +27,8 @@ import cn.iocoder.yudao.module.rescue.utils.RedisUtil;
|
||||
import cn.iocoder.yudao.module.rescue.utils.RedissonDelayQueue;
|
||||
import cn.iocoder.yudao.module.rescue.utils.StringUtils;
|
||||
import cn.iocoder.yudao.module.rescue.vo.*;
|
||||
import cn.iocoder.yudao.module.rescue.vo.money.DriverSummaryDetailVO;
|
||||
import cn.iocoder.yudao.module.rescue.vo.money.DriverSummaryVO;
|
||||
import cn.iocoder.yudao.module.staff.entity.CompanyStaff;
|
||||
import cn.iocoder.yudao.module.staff.service.CompanyStaffService;
|
||||
import cn.iocoder.yudao.module.staff.vo.CompanyStaffRespVO;
|
||||
@ -60,6 +62,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
@ -3108,6 +3111,111 @@ public class RescueInfoServiceImpl extends ServiceImpl<RescueInfoMapper, RescueI
|
||||
return baseMapper.getRescueCarKPI(driverCarNum,startTime,endTime,channel,secondDispatchName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DriverReceiptStatVO> getRescueStatisticsInfoByDriver(DriverReceiptStatVO query) {
|
||||
String startTime = "";
|
||||
String endTime = "";
|
||||
if ("more".equals(query.getTimeType())) {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotEmpty(query.getStartTimeStr())) {
|
||||
startTime = query.getStartTimeStr() + " 00:00:00";
|
||||
}
|
||||
if (org.apache.commons.lang3.StringUtils.isNotEmpty(query.getEndTimeStr())) {
|
||||
endTime = query.getEndTimeStr() + " 23:59:59";
|
||||
}
|
||||
} else if ("month".equals(query.getTimeType())) {
|
||||
//当月
|
||||
startTime = DateUtil.format(DateUtil.beginOfMonth(DateUtil.date()), "yyyy-MM-dd") + " 00:00:00";
|
||||
endTime = DateUtil.format(DateUtil.endOfMonth(DateUtil.date()), "yyyy-MM-dd") + " 23:59:59";
|
||||
} else if ("day".equals(query.getTimeType())) {
|
||||
//当天
|
||||
startTime = DateUtil.formatDate(DateUtil.date()) + " 00:00:00";
|
||||
endTime = DateUtil.formatDate(DateUtil.date()) + " 23:59:59";
|
||||
}else if ("year".equals(query.getTimeType())) {
|
||||
// 当年
|
||||
startTime = DateUtil.format(DateUtil.beginOfYear(DateUtil.date()), "yyyy-MM-dd") + " 00:00:00";
|
||||
endTime = DateUtil.format(DateUtil.endOfYear(DateUtil.date()), "yyyy-MM-dd") + " 23:59:59";
|
||||
}
|
||||
query.setStartTimeStr(startTime);
|
||||
query.setEndTimeStr(endTime);
|
||||
|
||||
// ① 先查司机层汇总
|
||||
List<DriverReceiptStatVO> drivers = baseMapper.selectDriverReceiptStats(query);
|
||||
|
||||
if (CollectionUtils.isEmpty(drivers)) {
|
||||
return drivers;
|
||||
}
|
||||
|
||||
// ② 再为每个司机查渠道明细
|
||||
return drivers.stream().peek(d -> {
|
||||
DriverReceiptStatVO param = new DriverReceiptStatVO();
|
||||
param.setDriverName(d.getDriverName());
|
||||
param.setStartTimeStr(query.getStartTimeStr());
|
||||
param.setEndTimeStr(query.getEndTimeStr());
|
||||
List<ChannelReceiptStatVO> channels = baseMapper.selectChannelReceiptStats(param);
|
||||
d.setChannels(channels);
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DriverSummaryVO> moneySummary(DriverSummaryVO driverSummaryVO) {
|
||||
String startTime = "";
|
||||
String endTime = "";
|
||||
if ("more".equals(driverSummaryVO.getTimeType())) {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotEmpty(driverSummaryVO.getStartTimeStr())) {
|
||||
startTime = driverSummaryVO.getStartTimeStr() + " 00:00:00";
|
||||
}
|
||||
if (org.apache.commons.lang3.StringUtils.isNotEmpty(driverSummaryVO.getEndTimeStr())) {
|
||||
endTime = driverSummaryVO.getEndTimeStr() + " 23:59:59";
|
||||
}
|
||||
} else if ("month".equals(driverSummaryVO.getTimeType())) {
|
||||
//当月
|
||||
startTime = DateUtil.format(DateUtil.beginOfMonth(DateUtil.date()), "yyyy-MM-dd") + " 00:00:00";
|
||||
endTime = DateUtil.format(DateUtil.endOfMonth(DateUtil.date()), "yyyy-MM-dd") + " 23:59:59";
|
||||
} else if ("day".equals(driverSummaryVO.getTimeType())) {
|
||||
//当天
|
||||
startTime = DateUtil.formatDate(DateUtil.date()) + " 00:00:00";
|
||||
endTime = DateUtil.formatDate(DateUtil.date()) + " 23:59:59";
|
||||
}else if ("year".equals(driverSummaryVO.getTimeType())) {
|
||||
// 当年
|
||||
startTime = DateUtil.format(DateUtil.beginOfYear(DateUtil.date()), "yyyy-MM-dd") + " 00:00:00";
|
||||
endTime = DateUtil.format(DateUtil.endOfYear(DateUtil.date()), "yyyy-MM-dd") + " 23:59:59";
|
||||
}
|
||||
driverSummaryVO.setStartTimeStr(startTime);
|
||||
driverSummaryVO.setEndTimeStr(endTime);
|
||||
|
||||
return baseMapper.moneySummary(driverSummaryVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DriverSummaryDetailVO> moneySummaryDetail(DriverSummaryDetailVO driverSummaryDetailVO) {
|
||||
String startTime = "";
|
||||
String endTime = "";
|
||||
if ("more".equals(driverSummaryDetailVO.getTimeType())) {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotEmpty(driverSummaryDetailVO.getStartTimeStr())) {
|
||||
startTime = driverSummaryDetailVO.getStartTimeStr() + " 00:00:00";
|
||||
}
|
||||
if (org.apache.commons.lang3.StringUtils.isNotEmpty(driverSummaryDetailVO.getEndTimeStr())) {
|
||||
endTime = driverSummaryDetailVO.getEndTimeStr() + " 23:59:59";
|
||||
}
|
||||
} else if ("month".equals(driverSummaryDetailVO.getTimeType())) {
|
||||
//当月
|
||||
startTime = DateUtil.format(DateUtil.beginOfMonth(DateUtil.date()), "yyyy-MM-dd") + " 00:00:00";
|
||||
endTime = DateUtil.format(DateUtil.endOfMonth(DateUtil.date()), "yyyy-MM-dd") + " 23:59:59";
|
||||
} else if ("day".equals(driverSummaryDetailVO.getTimeType())) {
|
||||
//当天
|
||||
startTime = DateUtil.formatDate(DateUtil.date()) + " 00:00:00";
|
||||
endTime = DateUtil.formatDate(DateUtil.date()) + " 23:59:59";
|
||||
}else if ("year".equals(driverSummaryDetailVO.getTimeType())) {
|
||||
// 当年
|
||||
startTime = DateUtil.format(DateUtil.beginOfYear(DateUtil.date()), "yyyy-MM-dd") + " 00:00:00";
|
||||
endTime = DateUtil.format(DateUtil.endOfYear(DateUtil.date()), "yyyy-MM-dd") + " 23:59:59";
|
||||
}
|
||||
driverSummaryDetailVO.setStartTimeStr(startTime);
|
||||
driverSummaryDetailVO.setEndTimeStr(endTime);
|
||||
return baseMapper.moneySummaryDetail(driverSummaryDetailVO);
|
||||
}
|
||||
|
||||
|
||||
public List<StatisticsStaffVO> driverStatisticsSecond(StatisticsStaffVO statisticsStaffReqVO) {
|
||||
return baseMapper.driverStatisticsSecond(statisticsStaffReqVO);
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.rescue.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 司机收款统计 - 渠道明细 VO
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ChannelReceiptStatVO {
|
||||
|
||||
/** 渠道名称(空或 NULL 统一映射成“未知渠道”) */
|
||||
private String channel;
|
||||
|
||||
/** 救援单总数 */
|
||||
private Integer orderCount;
|
||||
|
||||
/** 应收金额(元) */
|
||||
private BigDecimal yingskNum;
|
||||
/** 应收单数 */
|
||||
private Integer yingskNumOrderCount;
|
||||
|
||||
/** 已收金额(元) */
|
||||
private BigDecimal yiskNum;
|
||||
/** 已收单数 */
|
||||
private Integer yiskNumOrderCount;
|
||||
|
||||
/** 待收金额(元) */
|
||||
private BigDecimal dskNum;
|
||||
/** 待收单数 */
|
||||
private Integer dskNumOrderCount;
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.rescue.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 司机收款统计 - 司机汇总 VO
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DriverReceiptStatVO {
|
||||
/** 司机主键 ID */
|
||||
private Long driverId;
|
||||
|
||||
/** 司机姓名 */
|
||||
private String driverName;
|
||||
private String driverType;
|
||||
|
||||
/** 应收金额(元) */
|
||||
private BigDecimal yingskNum;
|
||||
/** 应收单数 */
|
||||
private Integer yingskNumOrderCount;
|
||||
|
||||
/** 已收金额(元) */
|
||||
private BigDecimal yiskNum;
|
||||
/** 已收单数 */
|
||||
private Integer yiskNumOrderCount;
|
||||
|
||||
/** 待收金额(元) */
|
||||
private BigDecimal dskNum;
|
||||
/** 待收单数 */
|
||||
private Integer dskNumOrderCount;
|
||||
|
||||
/** ↓↓↓ 渠道明细列表,可为空 */
|
||||
private List<ChannelReceiptStatVO> channels;
|
||||
|
||||
/**
|
||||
* 筛选时间类型
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String timeType;
|
||||
|
||||
/**
|
||||
* 筛选开始时间
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String startTimeStr;
|
||||
|
||||
/**
|
||||
* 筛选结束时间
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String endTimeStr;
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package cn.iocoder.yudao.module.rescue.vo.money;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class DriverSummaryDetailVO {
|
||||
/** 司机姓名(冗余,方便前端展示) */
|
||||
private String driverName;
|
||||
private String secondDispatchName;
|
||||
private String toScene;
|
||||
private String toRepair;
|
||||
private String source;
|
||||
private String faultType;
|
||||
private String rescuePosition;
|
||||
private String carBrand;
|
||||
private String carType;
|
||||
private String estimateDownCar;
|
||||
private String ifNewEnergy;
|
||||
private String rescueType;
|
||||
private String feeType;
|
||||
private String isKouChe;
|
||||
private String transferReason;
|
||||
private String driverCarNum;
|
||||
|
||||
/** 客户车牌 */
|
||||
private String licenseNum;
|
||||
|
||||
/** 救援日期(仅日期即可;如需时分秒可改 LocalDateTime) */
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate rescueTime;
|
||||
|
||||
/** 应收款 */
|
||||
private BigDecimal setMoney;
|
||||
|
||||
/** 渠道(例:沪渝高速) */
|
||||
private String channel;
|
||||
/** 救援状态 */
|
||||
private String rescueStatus;
|
||||
|
||||
/** 筛选时间类型*/
|
||||
private String timeType;
|
||||
|
||||
/** 筛选开始时间 */
|
||||
@TableField(exist = false)
|
||||
private String startTimeStr;
|
||||
|
||||
/** 筛选结束时间 */
|
||||
@TableField(exist = false)
|
||||
private String endTimeStr;
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package cn.iocoder.yudao.module.rescue.vo.money;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class DriverSummaryVO {
|
||||
/** 司机姓名 */
|
||||
private String driverName;
|
||||
private String secondDispatchName;
|
||||
private String driverCarNum;
|
||||
private String toScene;
|
||||
private String toRepair;
|
||||
private String channel;
|
||||
private String source;
|
||||
private String faultType;
|
||||
private String rescuePosition;
|
||||
private String carBrand;
|
||||
private String carType;
|
||||
private String estimateDownCar;
|
||||
private String ifNewEnergy;
|
||||
private String rescueType;
|
||||
private String feeType;
|
||||
private String isKouChe;
|
||||
private String transferReason;
|
||||
|
||||
private Integer dqcNum;
|
||||
|
||||
/** 应收金额(元) */
|
||||
private BigDecimal yingskNum;
|
||||
/** 应收单数 */
|
||||
private Integer yingskNumOrderCount;
|
||||
|
||||
/** 已收金额(元) */
|
||||
private BigDecimal yiskNum;
|
||||
/** 已收单数 */
|
||||
private Integer yiskNumOrderCount;
|
||||
|
||||
/** 待收金额(元) */
|
||||
private BigDecimal dskNum;
|
||||
/** 待收单数 */
|
||||
private Integer dskNumOrderCount;
|
||||
|
||||
/** 该司机救援数量 */
|
||||
private Integer rescueNum;
|
||||
/** 救援状态 */
|
||||
private String rescueStatus;
|
||||
|
||||
/** 筛选时间类型*/
|
||||
private String timeType;
|
||||
|
||||
/** 筛选开始时间 */
|
||||
private String startTimeStr;
|
||||
|
||||
/** 筛选结束时间 */
|
||||
private String endTimeStr;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user