1、统计枚举、校验统一使用common模块;2、旧超管统计相关代码移除;

This commit is contained in:
gaoqr
2025-09-30 17:54:47 +08:00
parent b2f004df00
commit fe5e14002f
24 changed files with 61 additions and 464 deletions
@@ -1,7 +1,6 @@
package com.cf.imes.module.system.service.funds.organamount;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -10,7 +9,6 @@ import com.cf.imes.framework.common.util.Assert.AssertUtils;
import com.cf.imes.framework.common.util.object.BeanUtils;
import com.cf.imes.framework.mybatis.core.query.LambdaUpdateWrapperX;
import com.cf.imes.framework.security.core.util.SecurityFrameworkUtils;
import com.cf.imes.module.executor.enums.OrderStatisticsUnit;
import com.cf.imes.module.system.controller.admin.funds.organamount.vo.ManageAmountOverviewRespVO;
import com.cf.imes.module.system.controller.admin.funds.organamount.vo.OrganAmountGroupByCreateTimeRespVO;
import com.cf.imes.module.system.controller.admin.funds.organamount.vo.OrganAmountRespVO;
@@ -1,7 +1,7 @@
package com.cf.imes.module.system.validation.pay;
import cn.hutool.core.util.ObjectUtil;
import com.cf.imes.module.executor.enums.OrderStatisticsUnit;
import com.cf.imes.framework.common.enums.StatisticsUnit;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
@@ -23,7 +23,7 @@ public class FundsStatisticsUnitInEnumValidator implements ConstraintValidator<F
if (ObjectUtil.isNull(value)) {
return true;
}
OrderStatisticsUnit unit = OrderStatisticsUnit.fromValue(value);
StatisticsUnit unit = StatisticsUnit.fromValue(value);
if (ObjectUtil.isNotNull(unit)) {
return true;
} else {
@@ -2,16 +2,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.cf.imes.module.system.dal.mysql.funds.organamount.OrganAmountMapper">
<sql id="dateFormat">
<if test="req.unit != null and req.unit == @com.cf.imes.module.executor.enums.OrderStatisticsUnit@QUARTER.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@QUARTER.getValue()">
,CONCAT(YEAR(create_time), '-', QUARTER(create_time)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.module.executor.enums.OrderStatisticsUnit@MONTH.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@MONTH.getValue()">
,CONCAT(YEAR(create_time), '-', MONTH(create_time)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.module.executor.enums.OrderStatisticsUnit@WEEK.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@WEEK.getValue()">
,CONCAT(YEAR(create_time), '-', MONTH(create_time), '-', WEEK(create_time, 1)) AS date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.module.executor.enums.OrderStatisticsUnit@DAY.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@DAY.getValue()">
,CONCAT(YEAR(create_time), '-', MONTH(create_time), '-', DAY(create_time)) as date
</if>
</sql>
@@ -28,17 +28,17 @@
</select>
<sql id="dateCreate">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@QUARTER.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@QUARTER.getValue()">
,CONCAT(YEAR(o.notify_time), '-', QUARTER(o.notify_time)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@MONTH.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@MONTH.getValue()">
,CONCAT(YEAR(o.notify_time), '-', MONTH(o.notify_time)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@WEEK.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@WEEK.getValue()">
,CONCAT(YEAR(o.notify_time), '-', MONTH(o.notify_time), '-', FLOOR((DayOfMonth(o.notify_time)-1)/7)+1) AS
date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@DAY.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@DAY.getValue()">
,CONCAT(YEAR(o.notify_time), '-', MONTH(o.notify_time), '-', DAY(o.notify_time)) as date
</if>
</sql>
@@ -78,17 +78,17 @@
</select>
<sql id="dateCreate">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@QUARTER.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@QUARTER.getValue()">
,CONCAT(YEAR(o.create_time), '-', QUARTER(o.create_time)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@MONTH.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@MONTH.getValue()">
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@WEEK.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@WEEK.getValue()">
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time), '-', FLOOR((DayOfMonth(o.create_time)-1)/7)+1) AS
date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@DAY.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@DAY.getValue()">
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time), '-', DAY(o.create_time)) as date
</if>
</sql>
@@ -24,16 +24,16 @@
<sql id="dateFormat">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@QUARTER.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@QUARTER.getValue()">
,CONCAT(YEAR(o.update_time), '-', QUARTER(o.update_time)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@MONTH.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@MONTH.getValue()">
,CONCAT(YEAR(o.update_time), '-', MONTH(o.update_time)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@WEEK.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@WEEK.getValue()">
,CONCAT(YEAR(o.update_time), '-', MONTH(o.update_time), '-', FLOOR((DayOfMonth(o.update_time)-1)/7)+1) AS date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@DAY.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@DAY.getValue()">
,CONCAT(YEAR(o.update_time), '-', MONTH(o.update_time), '-', DAY(o.update_time)) as date
</if>
</sql>
@@ -49,16 +49,16 @@
</select>
<sql id="dateCreate">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@QUARTER.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@QUARTER.getValue()">
,CONCAT(YEAR(o.create_time), '-', QUARTER(o.create_time)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@MONTH.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@MONTH.getValue()">
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@WEEK.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@WEEK.getValue()">
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time), '-', FLOOR((DayOfMonth(o.create_time)-1)/7)+1) AS date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@DAY.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@DAY.getValue()">
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time), '-', DAY(o.create_time)) as date
</if>
</sql>
@@ -55,32 +55,32 @@
</select>
<sql id="dateUpdate">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@QUARTER.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@QUARTER.getValue()">
,CONCAT(YEAR(o.update_time), '-', QUARTER(o.update_time)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@MONTH.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@MONTH.getValue()">
,CONCAT(YEAR(o.update_time), '-', MONTH(o.update_time)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@WEEK.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@WEEK.getValue()">
,CONCAT(YEAR(o.update_time), '-', MONTH(o.update_time), '-', FLOOR((DayOfMonth(o.update_time)-1)/7)+1) AS date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@DAY.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@DAY.getValue()">
,CONCAT(YEAR(o.update_time), '-', MONTH(o.update_time), '-', DAY(o.update_time)) as date
</if>
</sql>
<sql id="dateCreate">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@QUARTER.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@QUARTER.getValue()">
,CONCAT(YEAR(o.create_time), '-', QUARTER(o.create_time)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@MONTH.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@MONTH.getValue()">
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@WEEK.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@WEEK.getValue()">
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time), '-', FLOOR((DayOfMonth(o.create_time)-1)/7)+1) AS
date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@DAY.getValue()">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@DAY.getValue()">
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time), '-', DAY(o.create_time)) as date
</if>
</sql>