| | |
| | | <result property="companyAddress" column="company_address" /> |
| | | <result property="regionCode" column="region_code" /> |
| | | <result property="regionName" column="region_name" /> |
| | | <result property="enforceContent" column="enforce_content" /> |
| | | <result property="enforceReason" column="enforce_reason" /> |
| | | <result property="enforceType" column="enforce_type" /> |
| | | <result property="applyId" column="apply_id" /> |
| | |
| | | parameterType="EnforceOrderQueryBo" |
| | | resultMap="EnforceOrderResult"> |
| | | <include refid="selectEnforceOrderVo"/> |
| | | <where> |
| | | where 1=1 |
| | | and check_status !=2 |
| | | and check_status!=-1 |
| | | <if test="orderNo != null and orderNo != ''"> |
| | | AND order_no like concat('%', #{orderNo}, '%') |
| | | </if> |
| | |
| | | <if test="checkIds != null and checkIds != '' "> |
| | | AND check_ids like concat('%', #{checkIds}, '%') |
| | | </if> |
| | | <if test="enforceReason != null and enforceReason != '' "> |
| | | AND enforce_reason like concat('%', #{enforceReason}, '%') |
| | | </if> |
| | | <if test="applyDeptIds != null and applyDeptIds !='' "> |
| | | AND apply_dept_id in |
| | | <foreach collection="applyDeptIds" item="applyDeptId" open="(" separator="," close=")"> |
| | | #{applyDeptId} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | order by apply_time desc |
| | | </select> |
| | | |
| | | <select id="selectCheckedList" |
| | | parameterType="OrderCheckedQueryBo" |
| | | resultMap="EnforceOrderResult"> |
| | | select t2.* |
| | | from enforce_check_log t1 join enforce_order t2 on t1.order_id = t2.order_id |
| | | where t2.del_flag = 0 |
| | | and t1.check_id = #{userId} |
| | | <if test="checkStatus != null"> |
| | | AND t2.check_status = #{checkStatus} |
| | | </if> |
| | | <if test="enforceReason != null and enforceReason != '' "> |
| | | AND t2.enforce_reason like concat('%', #{enforceReason}, '%') |
| | | </if> |
| | | order by t2.apply_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="selectScanList" |
| | | resultMap="EnforceOrderResult"> |
| | | select t2.* |
| | | from enforce_peer t1 join enforce_order t2 on t1.order_id = t2.order_id |
| | | where |
| | | t2.del_flag = 0 |
| | | 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> |