mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 05:42:06 +08:00
接口对接修改,超管分时间统计生产单
This commit is contained in:
+32
-1
@@ -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
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user