| | |
| | | <id property="transactionAreaUrl" column="transaction_area_url" /> |
| | | <id property="transactionAreaName" column="transaction_area_name" /> |
| | | <id property="classifyIds" column="classify_ids" /> |
| | | <id property="departmentIds" column="department_ids" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | transaction_area_url, |
| | | transaction_area_name, |
| | | classify_ids, |
| | | department_ids, |
| | | (SELECT GROUP_CONCAT(organization_name) FROM automessage_organization_chart WHERE id in (SELECT |
| | | substring_index(substring_index(department_ids,',', b.help_topic_id + 1), ',', -1) result |
| | | FROM |
| | | mysql.help_topic b |
| | | where |
| | | b.help_topic_id < (LENGTH(department_ids) - LENGTH(REPLACE(department_ids, ',', '')) + 1))) as departmentNames, |
| | | (IF((select classify_grade from automessage_classify_administration where automessage_classify_administration.id=automessage_transaction_event.classify_id)='2', |
| | | (select classify_name from automessage_classify_administration where automessage_classify_administration.id=(select parent_id from |
| | | automessage_classify_administration where automessage_classify_administration.id=automessage_transaction_event.classify_id)), |
| | |
| | | associate_names, |
| | | transaction_num, |
| | | browse_num, |
| | | department_ids, |
| | | (SELECT GROUP_CONCAT(organization_name) FROM automessage_organization_chart WHERE id in (SELECT |
| | | substring_index(substring_index(department_ids,',', b.help_topic_id + 1), ',', -1) result |
| | | FROM |
| | | mysql.help_topic b |
| | | where |
| | | b.help_topic_id < (LENGTH(department_ids) - LENGTH(REPLACE(department_ids, ',', '')) + 1))) as departmentNames, |
| | | create_time, |
| | | update_time |
| | | FROM |
| | |
| | | <if test="transactionAreaUrl != null ">transaction_area_url,</if> |
| | | <if test="transactionAreaName != null ">transaction_area_name,</if> |
| | | <if test="classifyIds != null ">classify_ids,</if> |
| | | <if test="departmentIds != null ">department_ids,</if> |
| | | update_time, |
| | | create_time |
| | | )values( |
| | |
| | | <if test="transactionAreaUrl != null ">#{transactionAreaUrl},</if> |
| | | <if test="transactionAreaName != null ">#{transactionAreaName},</if> |
| | | <if test="classifyIds != null ">#{classifyIds},</if> |
| | | <if test="departmentIds != null ">#{departmentIds},</if> |
| | | sysdate(), |
| | | sysdate() |
| | | ) |
| | |
| | | <if test="transactionAreaUrl != null ">transaction_area_url=#{transactionAreaUrl},</if> |
| | | <if test="transactionAreaName != null ">transaction_area_name=#{transactionAreaName},</if> |
| | | <if test="classifyIds != null ">classify_ids=#{classifyIds},</if> |
| | | <if test="departmentIds != null ">department_ids=#{departmentIds},</if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id= #{id} |
| | |
| | | <include refid="selectTransactionEventEntityVo"/> |
| | | <where> |
| | | <if test="associateNames != null and associateNames != ''"> |
| | | AND (associate_names like concat('%', #{associateNames}, '%') or #{associateNames} like concat('%', associate_names, '%')) |
| | | AND (associate_names like concat('%', #{associateNames}, '%') ) |
| | | </if> |
| | | <if test="classifyId != null and classifyId != ''"> |
| | | and (classify_id= #{classifyId} or classify_id in (select id FROM automessage_classify_administration where parent_id =#{classifyId} )) |
| | |
| | | </select> |
| | | |
| | | <select id="sumTransactionNum" resultMap="TransactionEventEntityResult"> |
| | | select sum(transaction_num)sumTransactionNum,count(*) counttransaction FROM automessage_transaction_event |
| | | select sum(TransactionNum)sumTransactionNum, count(*) counttransaction from ( |
| | | SELECT (select count(id) from automessage_guide_repair_order where state in (3,4) and a.id=matter_id) TransactionNum |
| | | from automessage_transaction_event a)k |
| | | </select> |
| | | |
| | | <select id="queryByClassifyIdList" resultMap="TransactionEventEntityResult"> |
| | |
| | | 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, |
| | | browse_num views,2 type from automessage_transaction_event |
| | | browse_num views,2 type from automessage_transaction_event UNION |
| | | SELECT id ,name title,concat((select organization_name from automessage_organization_chart where id=automessage_policy_documents.department_id ),'>','政策文件') content,null views,5 type FROM automessage_policy_documents where type=2 UNION |
| | | SELECT id ,name title,concat((select organization_name from automessage_organization_chart where id=automessage_policy_documents.department_id ),'>','法律法规') content,null views,6 type FROM automessage_policy_documents where type=1 |
| | | ) k |
| | | where k.title like concat('%',#{keyWord}, '%') or k.content like concat('%', #{keyWord}, '%') |
| | | </select> |