| | |
| | | #{applyDeptId} |
| | | </foreach> |
| | | </if> |
| | | |
| | | order by apply_time desc |
| | | </select> |
| | | |
| | | <select id="selectCheckedList" |
| | |
| | | <if test="enforceReason != null and enforceReason != '' "> |
| | | AND t2.enforce_reason like concat('%', #{enforceReason}, '%') |
| | | </if> |
| | | |
| | | order by t2.apply_time desc |
| | | </select> |
| | | |
| | | |
| | |
| | | and t2.order_status=2 |
| | | AND t1.peer_id = #{userId} |
| | | AND t2.company_code = #{companyCode} |
| | | order by t2.apply_time asc |
| | | </select> |
| | | |
| | | |
| | | <select id="selectDistinctCheckDeptIdAndCompanyId" |
| | | resultType="com.project.enforce.domain.vo.EnforceDistinctVo"> |
| | | select t.* from |
| | | ( |
| | | SELECT company_id, check_dept_id, SUBSTR(apply_time,1,10) as apply_time_str, count( 1 ) AS apply_num |
| | | FROM enforce_order WHERE warn_status=0 |
| | | GROUP BY company_id, check_dept_id,apply_time_str |
| | | ) t |
| | | WHERE |
| | | t.apply_num > 1 |
| | | </select> |
| | | </mapper> |