|
|
|
@ -89,7 +89,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectBgscreenProjectCheckingList" parameterType="SurProjectChecking" resultMap="SurProjectCheckingResult">
|
|
|
|
|
select spc.id, spc.project_id, spc.dept_id, spc.group_dept_id, spc.check_type, spc.main_image, spc.image_urls, spc.working_position_type, spc.check_working_position, spc.checking_num, spc.check_result, spc.intro, spc.quality_user, spc.quality_user_name, spc.supervise_user, spc.supervise_user_name, spc.group_dept_user, spc.group_dept_user_name, spc.checking_date, spc.checking_files, spc.is_del, spc.create_by, spc.create_time, spc.update_by, spc.update_time, spc.remark, spc.approve_status, sp.projectName, sd.dept_name from sur_project_checking spc
|
|
|
|
|
select spc.id, spc.project_id, spc.dept_id, spc.group_dept_id, spc.check_type, spc.main_image, spc.image_urls, spc.working_position_type, spc.check_working_position, spc.checking_num, spc.check_result, spc.intro, spc.quality_user, spc.quality_user_name, spc.supervise_user, spc.supervise_user_name, spc.group_dept_user, spc.group_dept_user_name, spc.checking_date, spc.checking_files, spc.is_del, spc.create_by, spc.create_time, spc.update_by, spc.update_time, spc.remark, spc.approve_status, sp.projectName, sd.dept_name
|
|
|
|
|
from sur_project_checking spc
|
|
|
|
|
left join sur_project sp on spc.project_id = sp.id
|
|
|
|
|
left join sys_dept sd on sd.dept_id = spc.dept_id
|
|
|
|
|
<!--监理单位/总包公司/分包单位-->
|
|
|
|
@ -103,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dataTypeLvl2 != null "> and spc.data_type_lvl2 = #{dataTypeLvl2}</if>
|
|
|
|
|
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
|
|
|
|
<if test="deptId != null "> and spc.dept_id = #{deptId}</if>
|
|
|
|
|
<if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if>
|
|
|
|
@ -132,6 +134,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
limit 0,10
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectBgscreenProjectCheckingListByPage" parameterType="SurProjectChecking" resultMap="SurProjectCheckingResult">
|
|
|
|
|
select spc.id, spc.project_id, spc.dept_id, spc.group_dept_id, spc.check_type, spc.main_image, spc.image_urls, spc.working_position_type, spc.check_working_position, spc.checking_num, spc.check_result, spc.intro, spc.quality_user, spc.quality_user_name, spc.supervise_user, spc.supervise_user_name, spc.group_dept_user, spc.group_dept_user_name, spc.checking_date, spc.checking_files, spc.is_del, spc.create_by, spc.create_time, spc.update_by, spc.update_time, spc.remark, spc.approve_status, sp.projectName, sd.dept_name
|
|
|
|
|
from sur_project_checking spc
|
|
|
|
|
left join sur_project sp on spc.project_id = sp.id
|
|
|
|
|
left join sys_dept sd on sd.dept_id = spc.dept_id
|
|
|
|
|
<!--监理单位/总包公司/分包单位-->
|
|
|
|
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
|
|
|
|
<where>
|
|
|
|
|
and spc.is_del=0
|
|
|
|
|
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
|
|
|
|
|
<if test="prjIds !=null and prjIds.size()>0">
|
|
|
|
|
and spc.project_id in
|
|
|
|
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dataTypeLvl2 != null "> and spc.data_type_lvl2 = #{dataTypeLvl2}</if>
|
|
|
|
|
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
|
|
|
|
<if test="deptId != null "> and spc.dept_id = #{deptId}</if>
|
|
|
|
|
<if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if>
|
|
|
|
|
<if test="groupDeptId != null "> and spc.group_dept_id = #{groupDeptId}</if>
|
|
|
|
|
<if test="checkType != null and checkType != ''"> and spc.check_type = #{checkType}</if>
|
|
|
|
|
<if test="workingPositionType != null and workingPositionType != ''"> and spc.working_position_type = #{workingPositionType}</if>
|
|
|
|
|
<if test="checkWorkingPosition != null and checkWorkingPosition != ''"> and spc.check_working_position like concat('%', #{checkWorkingPosition}, '%')</if>
|
|
|
|
|
<if test="checkResult != null and checkResult != ''"> and spc.check_result = #{checkResult}</if>
|
|
|
|
|
<if test="qualityUser != null and qualityUser != ''"> and (spc.quality_user like concat('%', #{qualityUser}, '%') or spc.quality_user_name like concat('%', #{qualityUser}, '%'))</if>
|
|
|
|
|
<if test="qualityUserName != null and qualityUserName != ''"> and spc.quality_user_name like concat('%', #{qualityUserName}, '%')</if>
|
|
|
|
|
<if test="superviseUser != null and superviseUser != ''"> and (spc.supervise_user like concat('%', #{superviseUser}, '%') or spc.supervise_user_name like concat('%', #{superviseUser}, '%'))</if>
|
|
|
|
|
<if test="superviseUserName != null and superviseUserName != ''"> and spc.supervise_user_name like concat('%', #{superviseUserName}, '%')</if>
|
|
|
|
|
<if test="groupDeptUser != null and groupDeptUser != ''"> and spc.group_dept_user like concat('%', #{groupDeptUser}, '%')</if>
|
|
|
|
|
<if test="groupDeptUserName != null and groupDeptUserName != ''"> and spc.group_dept_user_name like concat('%', #{groupDeptUserName}, '%')</if>
|
|
|
|
|
<if test="params.beginCheckingDate != null and params.beginCheckingDate != '' and params.endCheckingDate != null and params.endCheckingDate != ''"> and spc.checking_date between #{params.beginCheckingDate} and #{params.endCheckingDate}</if>
|
|
|
|
|
<if test="isDel != null "> and spc.is_del = #{isDel}</if>
|
|
|
|
|
<!-- 查询条件-项目部门 -->
|
|
|
|
|
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
|
|
|
|
<!--子部门数据-->
|
|
|
|
|
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
|
|
|
|
|
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
|
|
|
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
|
|
|
|
|
<!--普通用户查询项目人员-->
|
|
|
|
|
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spc.create_by = #{nowUserName}</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by checking_date desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectBgscreenProjectCheckingView" parameterType="SurProjectChecking" resultType="map">
|
|
|
|
|
select spc.check_result, count(spc.id) as total from sur_project_checking spc
|
|
|
|
|
left join sur_project sp on spc.project_id = sp.id
|
|
|
|
|