| | |
| | | <if test="dto.status != null "> |
| | | and report.status = #{dto.status} |
| | | </if> |
| | | <if test="dto.reportPerson != null "> |
| | | and report.report_user = #{dto.reportPerson} |
| | | </if> |
| | | </select> |
| | | <select id="queryById" resultType="cn.gistack.sm.sg.VO.SgProgressReportVO"> |
| | | select * from SG_PROGRESS_REPORT report where id = #{id} |
| | |
| | | WHERE |
| | | 1 = 1 |
| | | AND userR.is_his = 0 |
| | | AND userR.approval_order != 0 |
| | | <if test="dto.userId != null and dto.userId != ''"> |
| | | and userR.user_id = #{dto.userId} |
| | | </if> |
| | | <if test="dto.approvalStatus != null"> |
| | | <if test="dto.approvalStatus != null and dto.approvalStatus != 3"> |
| | | and userR.approval_status = #{dto.approvalStatus} |
| | | AND userR.approval_order != 0 |
| | | </if> |
| | | <choose > |
| | | <when test="dto.approvalStatus != null and dto.approvalStatus == 0"> |
| | | and report.audit_person = #{dto.approvalStatus} |
| | | and report.audit_person = #{dto.userId} |
| | | </when> |
| | | <when test="dto.approvalStatus != null and dto.approvalStatus == 3"> |
| | | and report.report_user = #{dto.userId} |
| | | </when> |
| | | </choose> |
| | | </select> |
| | |
| | | </if> |
| | | <choose > |
| | | <when test="dto.approvalStatus != null and dto.approvalStatus == 0"> |
| | | and report.audit_person = #{dto.approvalStatus} |
| | | and report.audit_person = #{dto.userId} |
| | | </when> |
| | | </choose> |
| | | </select> |
| | |
| | | <if test="dto.deviceName != null and dto.deviceName != ''"> |
| | | and de.device_name like CONCAT(CONCAT('%', #{dto.deviceName}), '%') |
| | | </if> |
| | | <if test="dto.reportPerson != null"> |
| | | and report.reportPerson = #{dto.reportPerson} |
| | | </if> |
| | | </select> |
| | | <select id="getUserByIds" resultType="java.util.Map"> |
| | | select id ,real_name from ywxt.blade_user where 1 = 1 |