|
|
|
@ -56,9 +56,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectSmzSspProblemmodifyList" parameterType="SmzSspProblemmodifyWhere" resultMap="SmzSspProblemmodifyResult">
|
|
|
|
|
select ssp.id, ssp.projectId, ssp.infoType, ssp.problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.createBy
|
|
|
|
|
select ssp.id, ssp.projectId, ssp.infoType, sp.projectName as problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, su.nick_name as createBy
|
|
|
|
|
from vw_smz_ssp_problemmodify_audit ssp
|
|
|
|
|
left join sur_project sp on ssp.projectId = sp.id
|
|
|
|
|
left join sys_user su ON su.phonenumber = ssp.createUser
|
|
|
|
|
<!--监理单位/总包公司/分包单位-->
|
|
|
|
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
|
|
|
|
<where>
|
|
|
|
@ -87,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="startDate!=null">and DATE(ssp.createtime)>=DATE(#{startDate})</if>
|
|
|
|
|
<if test="endDate!=null">and DATE(ssp.createtime) <= DATE(#{endDate})</if>
|
|
|
|
|
<if test="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''"> and (ssp.createUser like concat('%', #{createBy}, '%') or su.nick_name like concat('%', #{createBy}, '%'))</if>
|
|
|
|
|
<if test="createTime != null "> and ssp.createTime = #{createTime}</if>
|
|
|
|
|
<if test="updateUser != null and updateUser != ''"> and ssp.updateUser = #{updateUser}</if>
|
|
|
|
|
<if test="updateTime != null "> and ssp.updateTime = #{updateTime}</if>
|
|
|
|
@ -113,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectWechatSmzSspProblemmodifyList" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
|
|
|
|
select ssp.id, ssp.projectId, ssp.infoType, ssp.problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.problemType, su.nick_name as createBy,
|
|
|
|
|
select ssp.id, ssp.projectId, ssp.infoType, sp.projectName as problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.problemType, su.nick_name as createBy,
|
|
|
|
|
case when ud.type_flag in (1,11) then sd.dept_name else ud.dept_name end as deptName,
|
|
|
|
|
sdd.dict_label as danger_type_name,
|
|
|
|
|
case when ssp.recheckSendUser = #{nowUser} and ssp.checkState=1 then 0
|
|
|
|
@ -152,6 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="checkUserPhone != null and checkUserPhone != ''"> and ssp.checkUserPhone = #{checkUserPhone}</if>
|
|
|
|
|
<if test="isDel != null "> and ssp.isDel = #{isDel}</if>
|
|
|
|
|
<if test="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''"> and (ssp.createUser like concat('%', #{createBy}, '%') or su.nick_name like concat('%', #{createBy}, '%'))</if>
|
|
|
|
|
<if test="createTime != null "> and ssp.createTime = #{createTime}</if>
|
|
|
|
|
<if test="updateUser != null and updateUser != ''"> and ssp.updateUser = #{updateUser}</if>
|
|
|
|
|
<if test="updateTime != null "> and ssp.updateTime = #{updateTime}</if>
|
|
|
|
@ -206,6 +209,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<select id="findProblemmodifyGroupByCheckState" parameterType="SmzSspProblemmodify" resultType="map">
|
|
|
|
|
SELECT ssp.checkState,COUNT(ssp.id) total FROM smz_ssp_problemmodify ssp
|
|
|
|
|
left join sur_project sp on ssp.projectId = sp.id
|
|
|
|
|
LEFT JOIN sys_user su ON ssp.createUser = su.phonenumber
|
|
|
|
|
<!--监理单位/总包公司/分包单位-->
|
|
|
|
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
|
|
|
|
WHERE ssp.isDel=0
|
|
|
|
@ -216,6 +220,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</if>
|
|
|
|
|
<if test="dangerType != null and dangerType != ''"> and ssp.danger_type = #{dangerType}</if>
|
|
|
|
|
<if test="lordSent != null and lordSent != ''"> and (ssp.lordSent like concat('%', #{lordSent}, '%') or ssp.lordSentUser like concat('%', #{lordSent}, '%'))</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''"> and (ssp.createUser like concat('%', #{createBy}, '%') or su.nick_name like concat('%', #{createBy}, '%'))</if>
|
|
|
|
|
<if test="params.beginMarksTime != null and params.beginMarksTime != '' and params.endMarksTime != null and params.endMarksTime != ''"> and date(ssp.createTime) between #{params.beginMarksTime} and #{params.endMarksTime}</if>
|
|
|
|
|
<!-- 查询条件-项目部门 -->
|
|
|
|
|
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
|
|
|
@ -236,6 +241,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<select id="findProblemmodifyTimeoutCount" parameterType="SmzSspProblemmodify" resultType="Integer">
|
|
|
|
|
SELECT COUNT(ssp.id) total FROM smz_ssp_problemmodify ssp
|
|
|
|
|
left join sur_project sp on ssp.projectId = sp.id
|
|
|
|
|
LEFT JOIN sys_user su ON ssp.createUser = su.phonenumber
|
|
|
|
|
<!--监理单位/总包公司/分包单位-->
|
|
|
|
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
|
|
|
|
WHERE ssp.isDel=0
|
|
|
|
@ -243,6 +249,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
and (date(NOW())<![CDATA[ > ]]> date(ssp.nickedTime) and (ssp.updateTime is null or date(ssp.updateTime) <![CDATA[ > ]]> date(ssp.nickedTime)))
|
|
|
|
|
<if test="infoType !=null">and infoType=#{infoType}</if>
|
|
|
|
|
<if test="lordSent != null and lordSent != ''"> and (ssp.lordSent like concat('%', #{lordSent}, '%') or ssp.lordSentUser like concat('%', #{lordSent}, '%'))</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''"> and (ssp.createUser like concat('%', #{createBy}, '%') or su.nick_name like concat('%', #{createBy}, '%'))</if>
|
|
|
|
|
<if test="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</if>
|
|
|
|
|
<if test="workParts != null and workParts != ''"> and ssp.workParts like concat('%', #{workParts}, '%')</if>
|
|
|
|
|
<if test="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</if>
|
|
|
|
@ -269,7 +276,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectSmzSspProblemmodifyInfoById" parameterType="Long" resultMap="SmzSspProblemmodifyResult">
|
|
|
|
|
select ssp.id, ssp.projectId, ssp.infoType, ssp.problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.problemType, su.nick_name as createBy,
|
|
|
|
|
select ssp.id, ssp.projectId, ssp.infoType, sp.projectName as problemArea, ssp.workParts, ssp.changeInfo, ssp.lordSent, ssp.lordSentUser, ssp.copySend, ssp.copySendUser, ssp.checkState, ssp.nickedArea, ssp.nickedTime, ssp.projectType, ssp.processName, ssp.projectName, ssp.nickedInfo, ssp.checkUser, ssp.checkUserPhone, ssp.isDel, ssp.createUser, ssp.createTime, ssp.updateUser, ssp.updateTime, ssp.marks_picture, ssp.marks_video, ssp.smark_url, ssp.danger_type, ssp.recheckSend, ssp.recheckSendUser, ssp.roleType, ssp.problemType, su.nick_name as createBy,
|
|
|
|
|
case when ud.type_flag in (1,11) then concat(sd.dept_name,' ', '[责任主体]') else concat(ud.dept_name, ' ', '[', sdd3.dict_label ,']') end as deptName,
|
|
|
|
|
IFNULL(sdd1.dict_label,sdd2.dict_label) as danger_type_name,
|
|
|
|
|
su.nick_name as createUserName
|
|
|
|
|