|
@@ -9,7 +9,7 @@
|
|
|
<result property="location" column="location" />
|
|
<result property="location" column="location" />
|
|
|
<result property="subjectId" column="subject_id" />
|
|
<result property="subjectId" column="subject_id" />
|
|
|
<result property="applyUser" column="apply_user" />
|
|
<result property="applyUser" column="apply_user" />
|
|
|
- <result property="applyUserid" column="apply_userid" />
|
|
|
|
|
|
|
+ <result property="userId" column="user_id" />
|
|
|
<result property="deptId" column="dept_id" />
|
|
<result property="deptId" column="dept_id" />
|
|
|
<result property="deptName" column="dept_name" />
|
|
<result property="deptName" column="dept_name" />
|
|
|
<result property="phone" column="phone" />
|
|
<result property="phone" column="phone" />
|
|
@@ -34,7 +34,7 @@
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectQpUsegasApplyVo">
|
|
<sql id="selectQpUsegasApplyVo">
|
|
|
- select id, location, subject_id, apply_user, apply_userid, dept_id, dept_name,
|
|
|
|
|
|
|
+ select id, location, subject_id, apply_user, user_id, dept_id, dept_name,
|
|
|
phone, start_time, end_time, gas_use, apply_certificate, safety_precautions,
|
|
phone, start_time, end_time, gas_use, apply_certificate, safety_precautions,
|
|
|
use_gas_id,use_gas_name, lead_audit_staus, lead_audit_userid, lead_audit_username,
|
|
use_gas_id,use_gas_name, lead_audit_staus, lead_audit_userid, lead_audit_username,
|
|
|
lead_audit_time, lead_audit_cause, center_audit_status, center_audit_userid,
|
|
lead_audit_time, lead_audit_cause, center_audit_status, center_audit_userid,
|
|
@@ -42,7 +42,7 @@
|
|
|
from qp_usegas_apply
|
|
from qp_usegas_apply
|
|
|
</sql>
|
|
</sql>
|
|
|
<sql id="selectQpUsegasApplyListVo">
|
|
<sql id="selectQpUsegasApplyListVo">
|
|
|
- select t.id, t.location, t.subject_id, t.apply_user, t.apply_userid, t.dept_id,
|
|
|
|
|
|
|
+ select t.id, t.location, t.subject_id, t.apply_user, t.user_id, t.dept_id,
|
|
|
t.dept_name, t.phone, t.start_time, t.end_time, t.gas_use, t.apply_certificate,
|
|
t.dept_name, t.phone, t.start_time, t.end_time, t.gas_use, t.apply_certificate,
|
|
|
t.safety_precautions, t.use_gas_id,t.use_gas_name, t.lead_audit_staus,
|
|
t.safety_precautions, t.use_gas_id,t.use_gas_name, t.lead_audit_staus,
|
|
|
t.lead_audit_userid, t.lead_audit_username, t.lead_audit_time, t.lead_audit_cause,
|
|
t.lead_audit_userid, t.lead_audit_username, t.lead_audit_time, t.lead_audit_cause,
|
|
@@ -51,6 +51,8 @@
|
|
|
(select l.room room from lab_subject s,lab_subject_layout l where s.layout_id =l.id and s.id=t.subject_id) room,
|
|
(select l.room room from lab_subject s,lab_subject_layout l where s.layout_id =l.id and s.id=t.subject_id) room,
|
|
|
( select admin_id from lab_subject su where su.id=t.subject_id ) admin_id
|
|
( select admin_id from lab_subject su where su.id=t.subject_id ) admin_id
|
|
|
from qp_usegas_apply as t
|
|
from qp_usegas_apply as t
|
|
|
|
|
+ LEFT JOIN sys_dept d on t.dept_id=d.dept_id
|
|
|
|
|
+ LEFT JOIN sys_user u on t.user_id=u.user_id
|
|
|
</sql>
|
|
</sql>
|
|
|
<select id="selectQpUsegasApplyList" parameterType="com.zd.airbottle.domain.vo.QpUsegasApplyVO" resultMap="QpUsegasApplyResult">
|
|
<select id="selectQpUsegasApplyList" parameterType="com.zd.airbottle.domain.vo.QpUsegasApplyVO" resultMap="QpUsegasApplyResult">
|
|
|
<include refid="selectQpUsegasApplyListVo"/>
|
|
<include refid="selectQpUsegasApplyListVo"/>
|
|
@@ -64,7 +66,7 @@
|
|
|
<if test="location != null and location != ''"> and t.location = #{location}</if>
|
|
<if test="location != null and location != ''"> and t.location = #{location}</if>
|
|
|
<if test="subjectId != null "> and t.subject_id = #{subjectId}</if>
|
|
<if test="subjectId != null "> and t.subject_id = #{subjectId}</if>
|
|
|
<if test="applyUser != null and applyUser != ''"> and t.apply_user = #{applyUser}</if>
|
|
<if test="applyUser != null and applyUser != ''"> and t.apply_user = #{applyUser}</if>
|
|
|
- <if test="applyUserid != null "> and t.apply_userid = #{applyUserid}</if>
|
|
|
|
|
|
|
+ <if test="userId != null "> and t.user_id = #{userId}</if>
|
|
|
<if test="deptId != null "> and t.dept_id = #{deptId}</if>
|
|
<if test="deptId != null "> and t.dept_id = #{deptId}</if>
|
|
|
<if test="deptName != null and deptName != ''"> and t.dept_name like concat('%', #{deptName}, '%')</if>
|
|
<if test="deptName != null and deptName != ''"> and t.dept_name like concat('%', #{deptName}, '%')</if>
|
|
|
<if test="phone != null and phone != ''"> and t.phone = #{phone}</if>
|
|
<if test="phone != null and phone != ''"> and t.phone = #{phone}</if>
|
|
@@ -88,6 +90,8 @@
|
|
|
<if test="auditStatus !=null and auditStatus == 0 "> and (t.lead_audit_staus=0 or t.center_audit_status=0 ) and t.lead_audit_staus !=2</if> /**待审核**/
|
|
<if test="auditStatus !=null and auditStatus == 0 "> and (t.lead_audit_staus=0 or t.center_audit_status=0 ) and t.lead_audit_staus !=2</if> /**待审核**/
|
|
|
<if test="auditStatus !=null and auditStatus == 1 "> and t.center_audit_status=1 </if> /**通过**/
|
|
<if test="auditStatus !=null and auditStatus == 1 "> and t.center_audit_status=1 </if> /**通过**/
|
|
|
<if test="auditStatus !=null and auditStatus == 2 "> and (t.lead_audit_staus=2 or t.center_audit_status=2) </if> /**驳回**/
|
|
<if test="auditStatus !=null and auditStatus == 2 "> and (t.lead_audit_staus=2 or t.center_audit_status=2) </if> /**驳回**/
|
|
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
|
|
+ ${params.dataScope}
|
|
|
order by
|
|
order by
|
|
|
<if test="remark != '100' "> t.create_time </if>
|
|
<if test="remark != '100' "> t.create_time </if>
|
|
|
<if test="remark == '100' "> t.lead_audit_time </if>
|
|
<if test="remark == '100' "> t.lead_audit_time </if>
|
|
@@ -108,7 +112,7 @@
|
|
|
|
|
|
|
|
<if test="applyUser != null">apply_user,</if>
|
|
<if test="applyUser != null">apply_user,</if>
|
|
|
|
|
|
|
|
- <if test="applyUserid != null">apply_userid,</if>
|
|
|
|
|
|
|
+ <if test="userId != null">user_id,</if>
|
|
|
|
|
|
|
|
<if test="deptId != null">dept_id,</if>
|
|
<if test="deptId != null">dept_id,</if>
|
|
|
|
|
|
|
@@ -157,7 +161,7 @@
|
|
|
<if test="location != null">#{location},</if>
|
|
<if test="location != null">#{location},</if>
|
|
|
<if test="subjectId != null">#{subjectId},</if>
|
|
<if test="subjectId != null">#{subjectId},</if>
|
|
|
<if test="applyUser != null">#{applyUser},</if>
|
|
<if test="applyUser != null">#{applyUser},</if>
|
|
|
- <if test="applyUserid != null">#{applyUserid},</if>
|
|
|
|
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
<if test="deptId != null">#{deptId},</if>
|
|
<if test="deptId != null">#{deptId},</if>
|
|
|
<if test="deptName != null">#{deptName},</if>
|
|
<if test="deptName != null">#{deptName},</if>
|
|
|
<if test="phone != null">#{phone},</if>
|
|
<if test="phone != null">#{phone},</if>
|
|
@@ -188,7 +192,7 @@
|
|
|
<if test="location != null">location = #{location},</if>
|
|
<if test="location != null">location = #{location},</if>
|
|
|
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
|
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
|
|
<if test="applyUser != null">apply_user = #{applyUser},</if>
|
|
<if test="applyUser != null">apply_user = #{applyUser},</if>
|
|
|
- <if test="applyUserid != null">apply_userid = #{applyUserid},</if>
|
|
|
|
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
<if test="deptName != null">dept_name = #{deptName},</if>
|
|
<if test="deptName != null">dept_name = #{deptName},</if>
|
|
|
<if test="phone != null">phone = #{phone},</if>
|
|
<if test="phone != null">phone = #{phone},</if>
|
|
@@ -232,7 +236,7 @@
|
|
|
<if test="location != null">location = #{location},</if>
|
|
<if test="location != null">location = #{location},</if>
|
|
|
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
|
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
|
|
<if test="applyUser != null">apply_user = #{applyUser},</if>
|
|
<if test="applyUser != null">apply_user = #{applyUser},</if>
|
|
|
- <if test="applyUserid != null">apply_userid = #{applyUserid},</if>
|
|
|
|
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
<if test="deptName != null">dept_name = #{deptName},</if>
|
|
<if test="deptName != null">dept_name = #{deptName},</if>
|
|
|
<if test="phone != null">phone = #{phone},</if>
|
|
<if test="phone != null">phone = #{phone},</if>
|