Compare commits
No commits in common. "dfef351a46683545ec8a0b3d0689a09398326e73" and "21e1a41022feff74dec6e85abc72cfc455ae03b9" have entirely different histories.
dfef351a46
...
21e1a41022
@ -132,8 +132,8 @@ public class InspectionInfoController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("geStelectInspectionByBusiness")
|
@GetMapping("geStelectInspectionByBusiness")
|
||||||
public CommonResult geStelectInspectionByBusiness(InspectionInfo inspectionInfo,
|
public CommonResult geStelectInspectionByBusiness(InspectionInfo inspectionInfo,
|
||||||
@RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
|
@RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) {
|
@RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) {
|
||||||
Page<InspectionInfo> page = new Page<>(pageNum, pageSize);
|
Page<InspectionInfo> page = new Page<>(pageNum, pageSize);
|
||||||
return success(inspectionInfoService.geStelectInspectionByBusiness(page, inspectionInfo));
|
return success(inspectionInfoService.geStelectInspectionByBusiness(page, inspectionInfo));
|
||||||
}
|
}
|
||||||
@ -396,27 +396,8 @@ public class InspectionInfoController extends BaseController {
|
|||||||
* @date 16:22 2024/12/18
|
* @date 16:22 2024/12/18
|
||||||
**/
|
**/
|
||||||
@GetMapping("/getBusinessCountByType")
|
@GetMapping("/getBusinessCountByType")
|
||||||
public CommonResult<?> getBusinessCountByType(@RequestParam(required = false, name = "partnerId") Integer partnerId,
|
public CommonResult<?> getBusinessCountByType(@RequestParam(required = false, name ="partnerId") Integer partnerId) {
|
||||||
@RequestParam(required = false, name = "unit") String unit) {
|
return success(inspectionInfoService.getBusinessCountByType(partnerId));
|
||||||
List<String> datetimeRange = new ArrayList<>();
|
|
||||||
if (unit != null) {
|
|
||||||
DateTime now = DateUtil.date();
|
|
||||||
switch (unit) {
|
|
||||||
case "day":
|
|
||||||
datetimeRange.add(String.valueOf(DateUtil.beginOfDay(now)));
|
|
||||||
datetimeRange.add(String.valueOf(DateUtil.endOfDay(now)));
|
|
||||||
break;
|
|
||||||
case "week":
|
|
||||||
datetimeRange.add(String.valueOf(DateUtil.beginOfWeek(now)));
|
|
||||||
datetimeRange.add(String.valueOf(DateUtil.endOfWeek(now)));
|
|
||||||
break;
|
|
||||||
case "month":
|
|
||||||
datetimeRange.add(String.valueOf(DateUtil.beginOfMonth(now)));
|
|
||||||
datetimeRange.add(String.valueOf(DateUtil.endOfMonth(now)));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return success(inspectionInfoService.getBusinessCountByType(partnerId,datetimeRange));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -258,6 +258,4 @@ public class InspectionInfo extends TenantBaseDO
|
|||||||
/** 保险公司名称 */
|
/** 保险公司名称 */
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String insuranceCompanyName;
|
private String insuranceCompanyName;
|
||||||
@TableField(exist = false)
|
|
||||||
private List<String> datetimeRange;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -179,7 +179,7 @@ public interface IInspectionInfoService extends IService<InspectionInfo>
|
|||||||
*/
|
*/
|
||||||
IPage<InspectionInfo> geStelectInspectionByBusiness(Page<InspectionInfo> page, InspectionInfo inspectionInfo);
|
IPage<InspectionInfo> geStelectInspectionByBusiness(Page<InspectionInfo> page, InspectionInfo inspectionInfo);
|
||||||
|
|
||||||
Map<String, Long> getBusinessCountByType(Integer partnerId, List<String> datetimeRange);
|
Map<String, Long> getBusinessCountByType(Integer partnerId);
|
||||||
|
|
||||||
List<InspectionInfo> selectMeetCarList(List<String> datetimeRange);
|
List<InspectionInfo> selectMeetCarList(List<String> datetimeRange);
|
||||||
|
|
||||||
|
|||||||
@ -1027,7 +1027,7 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Long> getBusinessCountByType(Integer partnerId, List<String> datetimeRange) {
|
public Map<String, Long> getBusinessCountByType(Integer partnerId) {
|
||||||
// 创建线程池
|
// 创建线程池
|
||||||
ExecutorService executor = Executors.newFixedThreadPool(10);
|
ExecutorService executor = Executors.newFixedThreadPool(10);
|
||||||
|
|
||||||
@ -1058,7 +1058,6 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
|||||||
// 深拷贝对象,防止多线程修改冲突
|
// 深拷贝对象,防止多线程修改冲突
|
||||||
InspectionInfo infoCopy = JSON.parseObject(JSON.toJSONString(inspectionInfo), InspectionInfo.class);
|
InspectionInfo infoCopy = JSON.parseObject(JSON.toJSONString(inspectionInfo), InspectionInfo.class);
|
||||||
infoCopy.setStatus(status);
|
infoCopy.setStatus(status);
|
||||||
infoCopy.setDatetimeRange(datetimeRange);
|
|
||||||
|
|
||||||
Page<InspectionInfo> page = new Page<>(1, 1);
|
Page<InspectionInfo> page = new Page<>(1, 1);
|
||||||
|
|
||||||
|
|||||||
@ -689,11 +689,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
AND ii.status = '1'
|
AND ii.status = '1'
|
||||||
</if>
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="info.datetimeRange != null and info.datetimeRange.size() > 0">
|
|
||||||
<if test="info.datetimeRange.size() == 2">
|
|
||||||
AND imco.create_time BETWEEN #{info.datetimeRange[0]} AND #{info.datetimeRange[1]}
|
|
||||||
</if>
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMeetCarList" resultType="cn.iocoder.yudao.module.inspection.entity.InspectionInfo">
|
<select id="selectMeetCarList" resultType="cn.iocoder.yudao.module.inspection.entity.InspectionInfo">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user