接口对接修改,超管分时间统计生产单

This commit is contained in:
lym
2024-08-19 17:52:04 +08:00
parent 939a8e003f
commit 889aa87456
23 changed files with 553 additions and 94 deletions
@@ -28,8 +28,39 @@
</select>
<sql id="dateFormat">
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@QUARTER.getValue()">
,CONCAT(YEAR(o.order_date), '-', QUARTER(o.order_date)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@MONTH.getValue()">
,CONCAT(YEAR(o.order_date), '-', MONTH(o.order_date)) as date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@WEEK.getValue()">
,CONCAT(YEAR(o.order_date), '-', MONTH(o.order_date), '-', FLOOR((DayOfMonth(o.order_date)-1)/7)+1) AS date
</if>
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@DAY.getValue()">
,CONCAT(YEAR(o.order_date), '-', MONTH(o.order_date), '-', DAY(o.order_date)) as date
</if>
</sql>
<select id="selectOrgCountLapseByOrderDate"
resultType="com.cf.imes.module.system.api.organ.dto.OrgStatisticsIsLapseRespDTO">
select count(o.id) as orgCount
<include refid="dateFormat"/>
from system_organization o
where o.update_time between #{req.createTime[0]} and #{req.createTime[1]}
and o.deleted = 1
group by date;
</select>
<select id="selectOrgCountAddByOrderDate"
resultType="com.cf.imes.module.system.api.organ.dto.OrgStatisticsIsLapseRespDTO">
select count(o.id) as orgCount
<include refid="dateFormat"/>
from system_organization o
where o.create_time between #{req.createTime[0]} and #{req.createTime[1]}
and o.deleted = 0
group by date;
</select>
</mapper>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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.organ.OrganMapper">
<mapper namespace="com.cf.imes.module.system.dal.mysql.user.AdminUserMapper">
<select id="selectUserSilentCount" resultType="java.lang.Integer">
SELECT DISTINCT COUNT(*) AS count