|
@@ -8,7 +8,7 @@
|
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
|
<result property="subjectId" column="subject_id" />
|
|
<result property="subjectId" column="subject_id" />
|
|
|
<result property="location" column="location" />
|
|
<result property="location" column="location" />
|
|
|
- <result property="applyUserid" column="apply_userid" />
|
|
|
|
|
|
|
+ <result property="userId" column="user_id" />
|
|
|
<result property="applyUser" column="apply_user" />
|
|
<result property="applyUser" column="apply_user" />
|
|
|
<result property="deptId" column="dept_id" />
|
|
<result property="deptId" column="dept_id" />
|
|
|
<result property="deptName" column="dept_name" />
|
|
<result property="deptName" column="dept_name" />
|
|
@@ -36,7 +36,7 @@
|
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
|
<result property="subjectId" column="subject_id" />
|
|
<result property="subjectId" column="subject_id" />
|
|
|
<result property="location" column="location" />
|
|
<result property="location" column="location" />
|
|
|
- <result property="applyUserid" column="apply_userid" />
|
|
|
|
|
|
|
+ <result property="userId" column="user_id" />
|
|
|
<result property="applyUser" column="apply_user" />
|
|
<result property="applyUser" column="apply_user" />
|
|
|
<result property="deptId" column="dept_id" />
|
|
<result property="deptId" column="dept_id" />
|
|
|
<result property="deptName" column="dept_name" />
|
|
<result property="deptName" column="dept_name" />
|
|
@@ -61,7 +61,7 @@
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectQpQualificationApplyVo">
|
|
<sql id="selectQpQualificationApplyVo">
|
|
|
- select id, subject_id, location, apply_userid, apply_user,dept_id,dept_name,
|
|
|
|
|
|
|
+ select id, subject_id, location, user_id, apply_user,dept_id,dept_name,
|
|
|
phone, start_time, end_time, gas_use, apply_certificate,
|
|
phone, start_time, end_time, gas_use, apply_certificate,
|
|
|
safety_precautions, use_gas_id, lead_audit_status, lead_audit_userid,lead_audit_username,
|
|
safety_precautions, use_gas_id, lead_audit_status, lead_audit_userid,lead_audit_username,
|
|
|
lead_audit_time, lead_audit_cause, center_audit_status, center_audit_userid,center_audit_username,
|
|
lead_audit_time, lead_audit_cause, center_audit_status, center_audit_userid,center_audit_username,
|
|
@@ -69,7 +69,7 @@
|
|
|
from qp_qualification_apply
|
|
from qp_qualification_apply
|
|
|
</sql>
|
|
</sql>
|
|
|
<sql id="selectQpQualificationApplyListVo">
|
|
<sql id="selectQpQualificationApplyListVo">
|
|
|
- select t.id, t.subject_id, t.location, t.apply_userid, t.apply_user,t.dept_id,t.dept_name, t.phone,
|
|
|
|
|
|
|
+ select t.id, t.subject_id, t.location, t.user_id, t.apply_user,t.dept_id,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.start_time, t.end_time, t.gas_use, t.apply_certificate, t.safety_precautions, t.use_gas_id,
|
|
|
t.lead_audit_status, t.lead_audit_userid,t.lead_audit_username, t.lead_audit_time, t.lead_audit_cause,
|
|
t.lead_audit_status, t.lead_audit_userid,t.lead_audit_username, t.lead_audit_time, t.lead_audit_cause,
|
|
|
t.center_audit_status, t.center_audit_userid,t.center_audit_username,
|
|
t.center_audit_status, t.center_audit_userid,t.center_audit_username,
|
|
@@ -79,6 +79,8 @@
|
|
|
( select sum(d.bottle_number) from qp_qualification_apply_detail d where d.qualificate_apply_id = t.id) bottle_number,
|
|
( select sum(d.bottle_number) from qp_qualification_apply_detail d where d.qualificate_apply_id = t.id) bottle_number,
|
|
|
( 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_qualification_apply as t
|
|
from qp_qualification_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="selectQpQualificationApplyList" parameterType="com.zd.airbottle.domain.vo.QpQualificationApplyVO" resultMap="QpQualificationApplyResultVO">
|
|
<select id="selectQpQualificationApplyList" parameterType="com.zd.airbottle.domain.vo.QpQualificationApplyVO" resultMap="QpQualificationApplyResultVO">
|
|
|
<include refid="selectQpQualificationApplyListVo"/>
|
|
<include refid="selectQpQualificationApplyListVo"/>
|
|
@@ -91,7 +93,7 @@
|
|
|
</if>
|
|
</if>
|
|
|
<if test="subjectId != null "> and t.subject_id = #{subjectId}</if>
|
|
<if test="subjectId != null "> and t.subject_id = #{subjectId}</if>
|
|
|
<if test="location != null and location != ''"> and t.location = #{location}</if>
|
|
<if test="location != null and location != ''"> and t.location = #{location}</if>
|
|
|
- <if test="applyUserid != null "> and t.apply_userid = #{applyUserid}</if>
|
|
|
|
|
|
|
+ <if test="userId != null "> and t.user_id = #{userId}</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="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>
|
|
@@ -121,6 +123,8 @@
|
|
|
#{id}
|
|
#{id}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</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>
|
|
@@ -139,7 +143,7 @@
|
|
|
|
|
|
|
|
<if test="location != null">location,</if>
|
|
<if test="location != null">location,</if>
|
|
|
|
|
|
|
|
- <if test="applyUserid != null">apply_userid,</if>
|
|
|
|
|
|
|
+ <if test="userId != null">user_id,</if>
|
|
|
|
|
|
|
|
<if test="applyUser != null">apply_user,</if>
|
|
<if test="applyUser != null">apply_user,</if>
|
|
|
|
|
|
|
@@ -187,7 +191,7 @@
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="subjectId != null">#{subjectId},</if>
|
|
<if test="subjectId != null">#{subjectId},</if>
|
|
|
<if test="location != null">#{location},</if>
|
|
<if test="location != null">#{location},</if>
|
|
|
- <if test="applyUserid != null">#{applyUserid},</if>
|
|
|
|
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
<if test="applyUser != null">#{applyUser},</if>
|
|
<if test="applyUser != null">#{applyUser},</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>
|
|
@@ -217,7 +221,7 @@
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
|
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
|
|
<if test="location != null">location = #{location},</if>
|
|
<if test="location != null">location = #{location},</if>
|
|
|
- <if test="applyUserid != null">apply_userid = #{applyUserid},</if>
|
|
|
|
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
<if test="applyUser != null">apply_user = #{applyUser},</if>
|
|
<if test="applyUser != null">apply_user = #{applyUser},</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>
|
|
@@ -342,7 +346,7 @@
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
|
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
|
|
<if test="location != null">location = #{location},</if>
|
|
<if test="location != null">location = #{location},</if>
|
|
|
- <if test="applyUserid != null">apply_userid = #{applyUserid},</if>
|
|
|
|
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
<if test="applyUser != null">apply_user = #{applyUser},</if>
|
|
<if test="applyUser != null">apply_user = #{applyUser},</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>
|
|
@@ -374,7 +378,7 @@
|
|
|
<select id="selectApplyListCount" parameterType="com.zd.airbottle.domain.QpQualificationApply" resultMap="QpQualificationApplyResultVO">
|
|
<select id="selectApplyListCount" parameterType="com.zd.airbottle.domain.QpQualificationApply" resultMap="QpQualificationApplyResultVO">
|
|
|
<include refid="selectQpQualificationApplyListVo"/>
|
|
<include refid="selectQpQualificationApplyListVo"/>
|
|
|
<where>
|
|
<where>
|
|
|
- <if test="applyUserid != null "> and t.apply_userid = #{applyUserid}</if>
|
|
|
|
|
|
|
+ <if test="userId != null "> and t.user_id = #{userId}</if>
|
|
|
</where>
|
|
</where>
|
|
|
order by create_time desc
|
|
order by create_time desc
|
|
|
</select>
|
|
</select>
|