|
@@ -4,27 +4,27 @@
|
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
<!-- 通用查询映射结果 -->
|
|
|
<resultMap id="BaseResultMap" type="com.zd.bottle.domain.UsegasApply">
|
|
<resultMap id="BaseResultMap" type="com.zd.bottle.domain.UsegasApply">
|
|
|
- <result column="id" property="id" />
|
|
|
|
|
- <result column="create_time" property="createTime" />
|
|
|
|
|
- <result column="location" property="location" />
|
|
|
|
|
- <result column="subject_id" property="subjectId" />
|
|
|
|
|
- <result column="apply_user" property="applyUser" />
|
|
|
|
|
- <result column="user_id" property="userId" />
|
|
|
|
|
- <result column="dept_id" property="deptId" />
|
|
|
|
|
- <result column="dept_name" property="deptName" />
|
|
|
|
|
- <result column="phone" property="phone" />
|
|
|
|
|
- <result column="start_time" property="startTime" />
|
|
|
|
|
- <result column="end_time" property="endTime" />
|
|
|
|
|
- <result column="gas_use" property="gasUse" />
|
|
|
|
|
- <result column="apply_certificate" property="applyCertificate" />
|
|
|
|
|
- <result column="safety_precautions" property="safetyPrecautions" />
|
|
|
|
|
- <result column="use_gas_id" property="useGasId" />
|
|
|
|
|
- <result column="use_gas_name" property="useGasName" />
|
|
|
|
|
- <result column="lead_audit_staus" property="leadAuditStaus" />
|
|
|
|
|
- <result column="lead_audit_userid" property="leadAuditUserid" />
|
|
|
|
|
- <result column="lead_audit_username" property="leadAuditUsername" />
|
|
|
|
|
- <result column="lead_audit_time" property="leadAuditTime" />
|
|
|
|
|
- <result column="lead_audit_cause" property="leadAuditCause" />
|
|
|
|
|
|
|
+ <result column="id" property="id"/>
|
|
|
|
|
+ <result column="create_time" property="createTime"/>
|
|
|
|
|
+ <result column="location" property="location"/>
|
|
|
|
|
+ <result column="subject_id" property="subjectId"/>
|
|
|
|
|
+ <result column="apply_user" property="applyUser"/>
|
|
|
|
|
+ <result column="user_id" property="userId"/>
|
|
|
|
|
+ <result column="dept_id" property="deptId"/>
|
|
|
|
|
+ <result column="dept_name" property="deptName"/>
|
|
|
|
|
+ <result column="phone" property="phone"/>
|
|
|
|
|
+ <result column="start_time" property="startTime"/>
|
|
|
|
|
+ <result column="end_time" property="endTime"/>
|
|
|
|
|
+ <result column="gas_use" property="gasUse"/>
|
|
|
|
|
+ <result column="apply_certificate" property="applyCertificate"/>
|
|
|
|
|
+ <result column="safety_precautions" property="safetyPrecautions"/>
|
|
|
|
|
+ <result column="use_gas_id" property="useGasId"/>
|
|
|
|
|
+ <result column="use_gas_name" property="useGasName"/>
|
|
|
|
|
+ <result column="lead_audit_staus" property="leadAuditStaus"/>
|
|
|
|
|
+ <result column="lead_audit_userid" property="leadAuditUserid"/>
|
|
|
|
|
+ <result column="lead_audit_username" property="leadAuditUsername"/>
|
|
|
|
|
+ <result column="lead_audit_time" property="leadAuditTime"/>
|
|
|
|
|
+ <result column="lead_audit_cause" property="leadAuditCause"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
<!-- 通用查询结果列 -->
|
|
@@ -35,8 +35,10 @@
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <select id="selectUseagsApplyList" parameterType="com.zd.bottle.domain.UsegasApply" resultType="com.zd.bottle.vo.UsegasApplyVo">
|
|
|
|
|
- select ua.id,ua.apply_user applyUserName,ua.phone applyUserPhone,ua.use_gas_name useGasName,ua.create_time applyTime,
|
|
|
|
|
|
|
+ <select id="selectUseagsApplyList" parameterType="com.zd.bottle.domain.UsegasApply"
|
|
|
|
|
+ resultType="com.zd.bottle.vo.UsegasApplyVo">
|
|
|
|
|
+ select ua.id,ua.apply_user applyUserName,ua.phone applyUserPhone,ua.use_gas_name useGasName,ua.create_time
|
|
|
|
|
+ applyTime,
|
|
|
ua.start_time startTime,ua.end_time endTime,ua.gas_use gasUse,ua.safety_precautions safetyPrecautions,
|
|
ua.start_time startTime,ua.end_time endTime,ua.gas_use gasUse,ua.safety_precautions safetyPrecautions,
|
|
|
ua.use_gas_file useGasFile
|
|
ua.use_gas_file useGasFile
|
|
|
from ab_usegas_apply ua
|
|
from ab_usegas_apply ua
|
|
@@ -53,11 +55,27 @@
|
|
|
</where>
|
|
</where>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
- <select id="selectApplyTabCount" parameterType="com.zd.bottle.domain.UsegasApply" resultType="com.zd.bottle.vo.UsegasApplyTabVo">
|
|
|
|
|
- SELECT
|
|
|
|
|
- (SELECT COUNT(ua.id) FROM ab_usegas_apply ua WHERE ua.lead_audit_staus = 0) waitApplyCount,
|
|
|
|
|
- (SELECT COUNT(ua.id) FROM ab_usegas_apply ua WHERE ua.lead_audit_staus = 1) passApplyCount,
|
|
|
|
|
- (SELECT COUNT(ua.id) FROM ab_usegas_apply ua WHERE ua.lead_audit_staus = 2) refuseApplyCount
|
|
|
|
|
|
|
+ <select id="selectApplyTabCount" parameterType="com.zd.bottle.domain.UsegasApply"
|
|
|
|
|
+ resultType="com.zd.bottle.vo.UsegasApplyTabVo">
|
|
|
|
|
+ SELECT (SELECT COUNT(ua.id) FROM ab_usegas_apply ua WHERE ua.lead_audit_staus = 0) waitApplyCount,
|
|
|
|
|
+ (SELECT COUNT(ua.id) FROM ab_usegas_apply ua WHERE ua.lead_audit_staus = 1) passApplyCount,
|
|
|
|
|
+ (SELECT COUNT(ua.id) FROM ab_usegas_apply ua WHERE ua.lead_audit_staus = 2) refuseApplyCount
|
|
|
FROM DUAL
|
|
FROM DUAL
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+ <select id="calcApply" resultType="com.zd.bottle.vo.AirAmount" parameterType="java.lang.String">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ DATE_FORMAT( r.create_time, '%Y年-%m月' ) date,
|
|
|
|
|
+ count(1) as count
|
|
|
|
|
+ FROM
|
|
|
|
|
+ ab_usegas_apply r
|
|
|
|
|
+ WHERE
|
|
|
|
|
+ DATE_FORMAT( r.create_time, '%Y-%m' )> DATE_FORMAT( date_sub( curdate(), INTERVAL 12 MONTH ), '%Y-%m' )
|
|
|
|
|
+ and r.lead_audit_staus=1
|
|
|
|
|
+ <if test="airName != null and airName!=''">
|
|
|
|
|
+ and r.use_gas_name LIKE concat( '%', #{airName}, '%' ) )
|
|
|
|
|
+ </if>
|
|
|
|
|
+ GROUP BY
|
|
|
|
|
+ MONTH (r.create_time
|
|
|
|
|
+ )
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|