| | |
| | | id, |
| | | department_id, |
| | | concat( |
| | | IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select city from automessage_organization_chart |
| | | IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select city from automessage_organization_chart |
| | | where automessage_organization_chart.id=department_id)),''), |
| | | IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select district from automessage_organization_chart |
| | | IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select district from automessage_organization_chart |
| | | where automessage_organization_chart.id=department_id)),''), |
| | | IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select village from automessage_organization_chart |
| | | IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select village from automessage_organization_chart |
| | | where automessage_organization_chart.id=department_id)),'') |
| | | ) AS department_area, |
| | | (select contact_number from automessage_organization_chart where automessage_organization_chart.id=department_id) as contactNumber, |
| | |
| | | id, |
| | | department_id, |
| | | concat( |
| | | IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select city from automessage_organization_chart |
| | | IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select city from automessage_organization_chart |
| | | where automessage_organization_chart.id=department_id)),''), |
| | | IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select district from automessage_organization_chart |
| | | IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select district from automessage_organization_chart |
| | | where automessage_organization_chart.id=department_id)),''), |
| | | IFNULL((SELECT name FROM area_code_2022 WHERE area_code_2022.code=(select village from automessage_organization_chart |
| | | IFNULL((SELECT name FROM automessage_area_code_2022 WHERE automessage_area_code_2022.code=(select village from automessage_organization_chart |
| | | where automessage_organization_chart.id=department_id)),'') |
| | | ) AS department_area, |
| | | classify_id, |
| | |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <!-- 根据分类筛选数据 --> |
| | | <select id="selectClassifyList" resultMap="TransactionEventEntityResult"> |
| | | <include refid="selectTransactionEventList"/> |
| | | <where> |
| | | <if test="ids != null"> |
| | | and classify_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="selectListByIds" resultMap="TransactionEventEntityResult"> |
| | | <include refid="selectTransactionEventList"/> |
| | |
| | | <include refid="selectTransactionEventEntityVo"/> |
| | | where (classify_id= #{classifyId} or classify_id in (select id FROM automessage_classify_administration where parent_id =#{classifyId} )) |
| | | <if test="departmentId!=null"> |
| | | and department_id=#{departmentId} |
| | | and department_id in (select id from automessage_organization_chart where id=#{departmentId} or parent_id=#{departmentId}) |
| | | </if> |
| | | order by create_time desc |
| | | </select> |
| | |
| | | </select> |
| | | |
| | | <select id="selectSearchList" resultType="com.dg.core.db.manual.pojo.Search"> |
| | | select distinct classify_id, content, type FROM( |
| | | select id,classify_name title,ifnull(concat((select classify_name from automessage_classify_administration where c.parent_id=id),'/',classify_name),classify_name) content,id classify_id,4 type from automessage_classify_administration c UNION |
| | | |
| | | select id,matter_name title,concat((select classify_name from automessage_classify_administration |
| | | where id=(select parent_id from automessage_classify_administration where id=automessage_transaction_event.classify_id)), |
| | | '/',(select classify_name from automessage_classify_administration where id=automessage_transaction_event.classify_id)) content,classify_id, |
| | | 2 type from automessage_transaction_event) k |
| | | where k.title like concat('%',#{keyWord}, '%') |
| | | select id, title, content,classify_id, type from ( select id,matter_name title,concat((select classify_name from automessage_classify_administration |
| | | where id=(select parent_id from automessage_classify_administration where id=automessage_transaction_event.classify_id)), |
| | | '/',(select classify_name from automessage_classify_administration where id=automessage_transaction_event.classify_id)) content,classify_id, |
| | | 2 type from automessage_transaction_event) k |
| | | where k.title like concat('%',#{keyWord}, '%') or k.content like concat('%',#{keyWord}, '%') |
| | | </select> |
| | | |
| | | <select id="selectSearchAssociate" resultType="com.dg.core.db.manual.pojo.Search"> |