更新0826
This commit is contained in:
parent
6e3997af97
commit
8691f9e94a
@ -2,11 +2,15 @@ package cn.iocoder.yudao.module.base.controller.admin;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.module.base.service.RepairStatisticsService;
|
import cn.iocoder.yudao.module.base.service.RepairStatisticsService;
|
||||||
|
import cn.iocoder.yudao.module.base.vo.QueryBusinessReqVO;
|
||||||
|
import cn.iocoder.yudao.module.base.vo.QueryBusinessResp;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -136,4 +140,19 @@ public class RepairStatisticsController {
|
|||||||
return CommonResult.success(statisticsService.listWorks());
|
return CommonResult.success(statisticsService.listWorks());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 许
|
||||||
|
* @Description 统计最近业务(车辆或客户)
|
||||||
|
* @Date 11:16 2025/8/22
|
||||||
|
* @Param [reqVO]
|
||||||
|
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
|
||||||
|
**/
|
||||||
|
@GetMapping("/listBusiness")
|
||||||
|
public CommonResult<?> listBusinessByCustomerOrCar(QueryBusinessReqVO reqVO,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
Page<QueryBusinessResp> page = new Page<>(pageNo, pageSize);
|
||||||
|
return CommonResult.success(statisticsService.listBusinessByCustomerOrCar(reqVO,page));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -3,7 +3,10 @@ package cn.iocoder.yudao.module.base.entity;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.module.system.api.user.dto.UserDTO;
|
import cn.iocoder.yudao.module.system.api.user.dto.UserDTO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO;
|
||||||
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -65,9 +68,11 @@ public class RepairStaff {
|
|||||||
/** 家庭住址 */
|
/** 家庭住址 */
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
private String IdNumber;
|
private String idNumber;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date safeDate;
|
private Date safeDate;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date formalDate;
|
private Date formalDate;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,14 @@
|
|||||||
package cn.iocoder.yudao.module.base.mapper;
|
package cn.iocoder.yudao.module.base.mapper;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.base.vo.QueryBusinessReqVO;
|
||||||
|
import cn.iocoder.yudao.module.base.vo.QueryBusinessResp;
|
||||||
import cn.iocoder.yudao.module.base.vo.RepairStatisticsVO;
|
import cn.iocoder.yudao.module.base.vo.RepairStatisticsVO;
|
||||||
import cn.iocoder.yudao.module.base.vo.RepairTicketStatisticsVO;
|
import cn.iocoder.yudao.module.base.vo.RepairTicketStatisticsVO;
|
||||||
import cn.iocoder.yudao.module.tickets.vo.DlRepairTicketsRespVO;
|
import cn.iocoder.yudao.module.tickets.vo.DlRepairTicketsRespVO;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -96,4 +101,21 @@ public interface RepairStatisticsMapper {
|
|||||||
**/
|
**/
|
||||||
List<RepairStatisticsVO> listWorks();
|
List<RepairStatisticsVO> listWorks();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 许
|
||||||
|
* @Description 统计最近业务
|
||||||
|
* @Date 11:24 2025/8/22
|
||||||
|
* @Param [reqVO]
|
||||||
|
* @return java.util.List
|
||||||
|
**/
|
||||||
|
IPage<QueryBusinessResp> listBusinessByCustomer(@Param("reqVO") QueryBusinessReqVO reqVO,@Param("page") Page<QueryBusinessResp> page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 许
|
||||||
|
* @Description 统计最近业务
|
||||||
|
* @Date 11:24 2025/8/22
|
||||||
|
* @Param [reqVO]
|
||||||
|
* @return java.util.List
|
||||||
|
**/
|
||||||
|
IPage<QueryBusinessResp> listBusinessByCar(@Param("reqVO") QueryBusinessReqVO reqVO,@Param("page") Page<QueryBusinessResp> page);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,12 @@
|
|||||||
package cn.iocoder.yudao.module.base.service;
|
package cn.iocoder.yudao.module.base.service;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.base.vo.QueryBusinessReqVO;
|
||||||
|
import cn.iocoder.yudao.module.base.vo.QueryBusinessResp;
|
||||||
import cn.iocoder.yudao.module.base.vo.RepairStatisticsVO;
|
import cn.iocoder.yudao.module.base.vo.RepairStatisticsVO;
|
||||||
import cn.iocoder.yudao.module.base.vo.RepairTicketStatisticsVO;
|
import cn.iocoder.yudao.module.base.vo.RepairTicketStatisticsVO;
|
||||||
import cn.iocoder.yudao.module.tickets.vo.DlRepairTicketsRespVO;
|
import cn.iocoder.yudao.module.tickets.vo.DlRepairTicketsRespVO;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -82,4 +86,12 @@ public interface RepairStatisticsService {
|
|||||||
List<RepairStatisticsVO> listWorks();
|
List<RepairStatisticsVO> listWorks();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 许
|
||||||
|
* @Description 统计最近业务(车辆或客户)
|
||||||
|
* @Date 15:04 2025/8/25
|
||||||
|
* @Param [reqVO, page]
|
||||||
|
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.base.vo.QueryBusinessResp>
|
||||||
|
**/
|
||||||
|
IPage<QueryBusinessResp> listBusinessByCustomerOrCar(QueryBusinessReqVO reqVO, Page<QueryBusinessResp> page);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,13 +2,18 @@ package cn.iocoder.yudao.module.base.service.impl;
|
|||||||
|
|
||||||
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;
|
||||||
|
import cn.iocoder.yudao.module.base.vo.QueryBusinessReqVO;
|
||||||
|
import cn.iocoder.yudao.module.base.vo.QueryBusinessResp;
|
||||||
import cn.iocoder.yudao.module.base.vo.RepairStatisticsVO;
|
import cn.iocoder.yudao.module.base.vo.RepairStatisticsVO;
|
||||||
import cn.iocoder.yudao.module.base.vo.RepairTicketStatisticsVO;
|
import cn.iocoder.yudao.module.base.vo.RepairTicketStatisticsVO;
|
||||||
import cn.iocoder.yudao.module.tickets.vo.DlRepairTicketsRespVO;
|
import cn.iocoder.yudao.module.tickets.vo.DlRepairTicketsRespVO;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -128,4 +133,22 @@ public class RepairStatisticsServiceImpl implements RepairStatisticsService {
|
|||||||
public List<RepairStatisticsVO> listWorks() {
|
public List<RepairStatisticsVO> listWorks() {
|
||||||
return statisticsMapper.listWorks();
|
return statisticsMapper.listWorks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 许
|
||||||
|
* @Description 统计最近业务(车辆或客户)
|
||||||
|
* @Date 15:03 2025/8/25
|
||||||
|
* @Param [reqVO, page]
|
||||||
|
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.base.vo.QueryBusinessResp>
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public IPage<QueryBusinessResp> listBusinessByCustomerOrCar(QueryBusinessReqVO reqVO, Page<QueryBusinessResp> page) {
|
||||||
|
IPage<QueryBusinessResp> queryBusinessResps = null;
|
||||||
|
if ("customer".equals(reqVO.getType())) {
|
||||||
|
queryBusinessResps = statisticsMapper.listBusinessByCustomer(reqVO,page);
|
||||||
|
}else if ("car".equals(reqVO.getType())) {
|
||||||
|
queryBusinessResps = statisticsMapper.listBusinessByCar(reqVO,page);
|
||||||
|
}
|
||||||
|
return queryBusinessResps;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,30 @@
|
|||||||
|
package cn.iocoder.yudao.module.base.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@BelongsProject: lanan-system
|
||||||
|
*@BelongsPackage: cn.iocoder.yudao.module.base.vo
|
||||||
|
*@Author: 许
|
||||||
|
*@CreateTime: 2025-08-22 11:14
|
||||||
|
*@Description: 业务统计请求参数
|
||||||
|
*@Version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class QueryBusinessReqVO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间范围
|
||||||
|
*/
|
||||||
|
private String[] dateRange;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型 car: 车辆 customer: 客户
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索
|
||||||
|
*/
|
||||||
|
private String search;
|
||||||
|
}
|
||||||
@ -0,0 +1,58 @@
|
|||||||
|
package cn.iocoder.yudao.module.base.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@BelongsProject: lanan-system
|
||||||
|
*@BelongsPackage: cn.iocoder.yudao.module.base.vo
|
||||||
|
*@Author: 许
|
||||||
|
*@CreateTime: 2025-08-22 14:04
|
||||||
|
*@Description: TODO
|
||||||
|
*@Version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class QueryBusinessResp {
|
||||||
|
/**
|
||||||
|
* 客户id
|
||||||
|
*/
|
||||||
|
private String customerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户名称
|
||||||
|
*/
|
||||||
|
private String customerName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户手机号
|
||||||
|
*/
|
||||||
|
private String customerPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务id
|
||||||
|
*/
|
||||||
|
private String bizId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务编号
|
||||||
|
*/
|
||||||
|
private String bizNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date bizTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务来源
|
||||||
|
*/
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String carNum;
|
||||||
|
}
|
||||||
@ -266,4 +266,6 @@ public class DlRepairTickets extends TenantBaseDO {
|
|||||||
private String settlementStr;
|
private String settlementStr;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private TicketsSettlementVO settlement;
|
private TicketsSettlementVO settlement;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private boolean ifShow = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -579,6 +579,8 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
|||||||
Map<String, String> typeMap = recordTypeList.stream().collect(Collectors.toMap(DictDataRespDTO::getValue, DictDataRespDTO::getLabel));
|
Map<String, String> typeMap = recordTypeList.stream().collect(Collectors.toMap(DictDataRespDTO::getValue, DictDataRespDTO::getLabel));
|
||||||
result.setRecords(records.stream().peek(item -> item.setType(typeMap.get(item.getType()))).collect(Collectors.toList()));
|
result.setRecords(records.stream().peek(item -> item.setType(typeMap.get(item.getType()))).collect(Collectors.toList()));
|
||||||
|
|
||||||
|
|
||||||
|
if (!ifApp) {
|
||||||
//查询维修工人表
|
//查询维修工人表
|
||||||
List<RepairWorker> workers = repairWorkerService.listByTicketId(id);
|
List<RepairWorker> workers = repairWorkerService.listByTicketId(id);
|
||||||
//转成map
|
//转成map
|
||||||
@ -605,6 +607,8 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
|||||||
RepairWorker repairWorker = workerMap.get(Long.valueOf(repairIdStr));
|
RepairWorker repairWorker = workerMap.get(Long.valueOf(repairIdStr));
|
||||||
if (repairWorker != null) {
|
if (repairWorker != null) {
|
||||||
String jobType = repairWorker.getWorkType();
|
String jobType = repairWorker.getWorkType();
|
||||||
|
if (jobType == null) {
|
||||||
|
}
|
||||||
|
|
||||||
JobTypeProfitDTO dto = resultList.stream()
|
JobTypeProfitDTO dto = resultList.stream()
|
||||||
.filter(r -> r.getJobTypeCode().equals(jobType))
|
.filter(r -> r.getJobTypeCode().equals(jobType))
|
||||||
@ -692,6 +696,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
|||||||
}
|
}
|
||||||
result.setProfitRateNo(profitRateNo);
|
result.setProfitRateNo(profitRateNo);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@ -123,4 +123,113 @@
|
|||||||
GROUP BY drw.user_id,drr.ticket_id
|
GROUP BY drw.user_id,drr.ticket_id
|
||||||
ORDER BY value DESC
|
ORDER BY value DESC
|
||||||
</select>
|
</select>
|
||||||
|
<select id="listBusinessByCustomer" resultType="cn.iocoder.yudao.module.base.vo.QueryBusinessResp"
|
||||||
|
parameterType="cn.iocoder.yudao.module.base.vo.QueryBusinessReqVO">
|
||||||
|
SELECT t.*
|
||||||
|
FROM (
|
||||||
|
SELECT
|
||||||
|
c.id AS customerId,
|
||||||
|
c.cus_name AS customerName,
|
||||||
|
c.phone_number AS customerPhone,
|
||||||
|
r.id AS bizId,
|
||||||
|
r.ticket_no AS bizNo,
|
||||||
|
r.repair_type AS bizType,
|
||||||
|
r.in_time AS bizTime,
|
||||||
|
'repair' AS source,
|
||||||
|
ROW_NUMBER() OVER (PARTITION BY c.id ORDER BY r.in_time DESC) AS rn
|
||||||
|
FROM base_customer_main c
|
||||||
|
JOIN dl_repair_tickets r ON c.id = r.user_id
|
||||||
|
WHERE
|
||||||
|
1 = 1 and c.deleted = 0
|
||||||
|
<if test="reqVO.dateRange != null">
|
||||||
|
AND r.in_time BETWEEN #{reqVO.dateRange[0]} AND #{reqVO.dateRange[1]}
|
||||||
|
</if>
|
||||||
|
<if test="reqVO.search != null and reqVO.search != ''">
|
||||||
|
AND (c.cus_name LIKE CONCAT('%', #{reqVO.search}, '%')
|
||||||
|
OR c.phone_number LIKE CONCAT('%', #{reqVO.search}, '%')
|
||||||
|
OR r.ticket_no LIKE CONCAT('%', #{reqVO.search}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<!--
|
||||||
|
UNION ALL
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
c.id AS customerId,
|
||||||
|
c.cus_name AS customerName,
|
||||||
|
c.phone_number AS customerPhone,
|
||||||
|
ri.id AS bizId,
|
||||||
|
NULL AS bizNo,
|
||||||
|
ri.rescue_type AS bizType,
|
||||||
|
ri.rescue_time AS bizTime,
|
||||||
|
'rescue' AS source,
|
||||||
|
ROW_NUMBER() OVER (PARTITION BY c.id ORDER BY ri.rescue_time DESC) AS rn
|
||||||
|
FROM base_customer_main c
|
||||||
|
JOIN rescue_info ri ON c.user_id = ri.user_id
|
||||||
|
WHERE
|
||||||
|
1 = 1 and c.deleted = 0
|
||||||
|
<if test="reqVO.dateRange != null">
|
||||||
|
AND ri.rescue_time BETWEEN #{reqVO.dateRange[0]} AND #{reqVO.dateRange[1]}
|
||||||
|
</if>
|
||||||
|
<if test="reqVO.search != null and reqVO.search != ''">
|
||||||
|
AND (c.cus_name LIKE CONCAT('%', #{reqVO.search}, '%')
|
||||||
|
OR c.phone_number LIKE CONCAT('%', #{reqVO.search}, '%')
|
||||||
|
)
|
||||||
|
</if>-->
|
||||||
|
) t
|
||||||
|
WHERE t.rn = 1;
|
||||||
|
</select>
|
||||||
|
<select id="listBusinessByCar" resultType="cn.iocoder.yudao.module.base.vo.QueryBusinessResp"
|
||||||
|
parameterType="cn.iocoder.yudao.module.base.vo.QueryBusinessReqVO">
|
||||||
|
SELECT t.*
|
||||||
|
FROM (
|
||||||
|
-- 维修工单
|
||||||
|
SELECT
|
||||||
|
car.id AS carId,
|
||||||
|
car.license_number carNum,
|
||||||
|
c.id AS customerId,
|
||||||
|
c.cus_name AS customerName,
|
||||||
|
c.phone_number AS customerPhone,
|
||||||
|
r.id AS bizId,
|
||||||
|
r.ticket_no AS bizNo,
|
||||||
|
r.repair_type AS bizType,
|
||||||
|
r.create_time AS bizTime,
|
||||||
|
'repair' AS source,
|
||||||
|
ROW_NUMBER() OVER (PARTITION BY car.id ORDER BY r.in_time DESC) AS rn
|
||||||
|
FROM base_car_main car
|
||||||
|
JOIN base_customer_car cc ON car.id = cc.car_id
|
||||||
|
JOIN base_customer_main c ON cc.cus_id = c.id
|
||||||
|
JOIN dl_repair_tickets r ON c.id = r.user_id
|
||||||
|
|
||||||
|
-- UNION ALL
|
||||||
|
--
|
||||||
|
-- -- 救援单
|
||||||
|
-- SELECT
|
||||||
|
-- car.id AS car_id,
|
||||||
|
-- car.license_number,
|
||||||
|
-- c.id AS customer_id,
|
||||||
|
-- c.cus_name,
|
||||||
|
-- c.phone_number,
|
||||||
|
-- ri.id AS biz_id,
|
||||||
|
-- NULL AS biz_no,
|
||||||
|
-- ri.rescue_type AS biz_type,
|
||||||
|
-- ri.rescue_time AS biz_time,
|
||||||
|
-- 'rescue' AS source,
|
||||||
|
-- ROW_NUMBER() OVER (PARTITION BY car.id ORDER BY ri.rescue_time DESC) AS rn
|
||||||
|
-- FROM base_car_main car
|
||||||
|
-- JOIN base_customer_car cc ON car.id = cc.car_id
|
||||||
|
-- JOIN base_customer_main c ON cc.cus_id = c.id
|
||||||
|
-- JOIN rescue_info ri ON c.id = ri.user_id
|
||||||
|
-- WHERE ri.rescue_time BETWEEN '2025-01-01 00:00:00' AND '2025-01-31 23:59:59'
|
||||||
|
) t
|
||||||
|
WHERE t.rn = 1
|
||||||
|
<if test="reqVO.dateRange != null">
|
||||||
|
AND t.biz_time BETWEEN #{reqVO.dateRange[0]} AND #{reqVO.dateRange[1]}
|
||||||
|
</if>
|
||||||
|
<if test="reqVO.search != null and reqVO.search != ''">
|
||||||
|
AND (t.customerName LIKE CONCAT('%', #{reqVO.search}, '%')
|
||||||
|
OR t.customerPhone LIKE CONCAT('%', #{reqVO.search}, '%')
|
||||||
|
OR t.carNum LIKE CONCAT('%', #{reqVO.search}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -266,6 +266,10 @@
|
|||||||
-- 维修工需要关联操作记录,查没有总检记录的工单 --
|
-- 维修工需要关联操作记录,查没有总检记录的工单 --
|
||||||
left join dl_repair_records drr ON drt.id = drr.ticket_id AND drr.type='zj'
|
left join dl_repair_records drr ON drt.id = drr.ticket_id AND drr.type='zj'
|
||||||
</if>
|
</if>
|
||||||
|
<if test=" map.statisticsType == 'yjg'">
|
||||||
|
-- 维修工需要关联操作记录,查没有总检记录的工单 --
|
||||||
|
inner join dl_repair_records drr ON drt.id = drr.ticket_id AND drr.type='zj'
|
||||||
|
</if>
|
||||||
left join dl_repair_titem drti
|
left join dl_repair_titem drti
|
||||||
on drt.id = drti.ticket_id AND drti.deleted = '0'
|
on drt.id = drti.ticket_id AND drti.deleted = '0'
|
||||||
where (drt.deleted = '0') AND drt.tickets_status IN ('04','05','01','07','06','02')
|
where (drt.deleted = '0') AND drt.tickets_status IN ('04','05','01','07','06','02')
|
||||||
@ -306,6 +310,9 @@
|
|||||||
-- 在厂 --
|
-- 在厂 --
|
||||||
AND drt.is_handover = '0' AND drt.tickets_status != '03'
|
AND drt.is_handover = '0' AND drt.tickets_status != '03'
|
||||||
</if>
|
</if>
|
||||||
|
<if test="map.statisticsType == 'yjg'">
|
||||||
|
-- 已竣工 --
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="map.cusFrom != null and map.cusFrom!=''">
|
<if test="map.cusFrom != null and map.cusFrom!=''">
|
||||||
<choose>
|
<choose>
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
package cn.iocoder.yudao.module.system.api.user.dto;
|
package cn.iocoder.yudao.module.system.api.user.dto;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@ -75,10 +78,14 @@ public class UserDTO {
|
|||||||
/** 家庭住址 */
|
/** 家庭住址 */
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
private String IdNumber;
|
private String idNumber;
|
||||||
|
|
||||||
|
@JSONField(format = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date safeDate;
|
private Date safeDate;
|
||||||
|
|
||||||
|
@JSONField(format = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date formalDate;
|
private Date formalDate;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user