| | |
| | | <id property="commonProblem" column="common_problem" /> |
| | | <id property="commonProblemUrl" column="common_problem_url" /> |
| | | <id property="commonProblemName" column="common_problem_name" /> |
| | | <id property="operationalGuidelineVideoName" column="operational_guideline_video_name" /> |
| | | <id property="operationalGuidelineName" column="operational_guideline_name" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | common_problem_url, |
| | | common_problem_name, |
| | | operational_guideline_video_url, |
| | | operational_guideline_video_name, |
| | | operational_guideline_name, |
| | | (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)), |
| | | (select classify_name from automessage_classify_administration where automessage_classify_administration.id=automessage_transaction_event.classify_id))) as classifyName, |
| | | (select organization_name from automessage_organization_chart where automessage_organization_chart.id=automessage_transaction_event.department_id) as departmentName, |
| | | concat( |
| | | (select classify_name from classify_administration where id=(select parent_id from classify_administration where id=transaction_event.classify_id)), |
| | | '>',(select classify_name from classify_administration where id=transaction_event.classify_id) |
| | | (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) |
| | | ) sumClassifyName |
| | | FROM |
| | | transaction_event |
| | | automessage_transaction_event |
| | | </sql> |
| | | |
| | | <sql id="selectTransactionEventList"> |
| | |
| | | department_id, |
| | | department_area, |
| | | classify_id, |
| | | (select classify_grade from classify_administration where classify_administration.id=transaction_event.classify_id) as classifyName, |
| | | (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)), |
| | | (select classify_name from automessage_classify_administration where automessage_classify_administration.id=automessage_transaction_event.classify_id))) as classifyName, |
| | | (select organization_name from automessage_organization_chart where automessage_organization_chart.id=automessage_transaction_event.department_id) as departmentName, |
| | | matter_name, |
| | | associate_ids, |
| | | associate_names, |
| | |
| | | create_time, |
| | | update_time |
| | | FROM |
| | | transaction_event |
| | | automessage_transaction_event |
| | | </sql> |
| | | |
| | | <select id="selectConfigData" parameterType="string" resultMap="TransactionEventEntityResult"> |
| | |
| | | AND associate_names like concat('%', #{matterAndUser}, '%') or matter_name like concat('%', #{matterAndUser}, '%') |
| | | </if> |
| | | <if test="classifyGrade != null and classifyGrade != ''"> |
| | | AND (select classify_grade from classify_administration where classify_administration.id=classify_id) = #{classifyGrade} |
| | | AND (select classify_grade from automessage_classify_administration where automessage_classify_administration.id=classify_id) = #{classifyGrade} |
| | | </if> |
| | | <if test="ids != null"> |
| | | and department_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"/> |
| | | WHERE id IN |
| | | <foreach collection="array" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <insert id="insertConfig" parameterType="com.dg.core.db.gen.entity.TransactionEvent"> |
| | | insert into transaction_event ( |
| | | insert into automessage_transaction_event ( |
| | | <if test="id != null">id,</if> |
| | | <if test="departmentId != null and departmentId != '' ">department_id,</if> |
| | | <if test="departmentArea != null">department_area,</if> |
| | |
| | | <if test="commonProblem != null and commonProblem != '' ">common_problem,</if> |
| | | <if test="commonProblemUrl != null and commonProblemUrl != '' ">common_problem_url,</if> |
| | | <if test="commonProblemName != null and commonProblemName != '' ">common_problem_name,</if> |
| | | <if test="operationalGuidelineVideoName != null and operationalGuidelineVideoName != '' ">operational_guideline_video_name,</if> |
| | | <if test="operationalGuidelineName != null and operationalGuidelineName != '' ">operational_guideline_name,</if> |
| | | update_time, |
| | | create_time |
| | | )values( |
| | |
| | | <if test="commonProblem != null and commonProblem != '' ">#{commonProblem},</if> |
| | | <if test="commonProblemUrl != null and commonProblemUrl != '' ">#{commonProblemUrl},</if> |
| | | <if test="commonProblemName != null and commonProblemName != '' ">#{commonProblemName},</if> |
| | | <if test="operationalGuidelineVideoName != null and operationalGuidelineVideoName != '' ">#{operationalGuidelineVideoName},</if> |
| | | <if test="operationalGuidelineName != null and operationalGuidelineName != '' ">#{operationalGuidelineName},</if> |
| | | sysdate(), |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateConfig" parameterType="com.dg.core.db.gen.entity.TransactionEvent"> |
| | | update transaction_event |
| | | update automessage_transaction_event |
| | | <set> |
| | | <if test="id != null">id=#{id},</if> |
| | | <if test="departmentId != null and departmentId != '' ">department_id=#{departmentId},</if> |
| | |
| | | <if test="associateIds != null and associateIds != '' ">associate_ids=#{associateIds},</if> |
| | | <if test="transactionNum != null ">transaction_num=#{transactionNum},</if> |
| | | <if test="browseNum != null ">browse_num=#{browseNum},</if> |
| | | <if test="basicInformation != null and basicInformation != '' ">basic_information=#{basicInformation},</if> |
| | | <if test="acceptConditions != null and acceptConditions != '' ">accept_conditions=#{acceptConditions},</if> |
| | | <if test="applicationMaterial != null and applicationMaterial != '' ">application_material=#{applicationMaterial},</if> |
| | | <if test="handlingProcedures != null and handlingProcedures != '' ">handling_procedures=#{handlingProcedures},</if> |
| | | <if test="rates != null and rates != '' ">rates=#{rates},</if> |
| | | <if test="basicInformation != null">basic_information=#{basicInformation},</if> |
| | | <if test="acceptConditions != null ">accept_conditions=#{acceptConditions},</if> |
| | | <if test="applicationMaterial != null ">application_material=#{applicationMaterial},</if> |
| | | <if test="handlingProcedures != null ">handling_procedures=#{handlingProcedures},</if> |
| | | <if test="rates != null ">rates=#{rates},</if> |
| | | <if test="associateNames != null and associateNames != '' ">associate_names=#{associateNames},</if> |
| | | <if test="queryTime != null">query_time=#{queryTime},</if> |
| | | <if test="basicInformationUrl != null and basicInformationUrl != '' ">basic_information_url=#{basicInformationUrl},</if> |
| | | <if test="acceptConditionsUrl != null and acceptConditionsUrl != '' ">accept_conditions_url=#{acceptConditionsUrl},</if> |
| | | <if test="applicationMaterialUrl != null and applicationMaterialUrl != '' ">application_material_url=#{applicationMaterialUrl},</if> |
| | | <if test="handlingProceduresUrl != null and handlingProceduresUrl != '' ">handling_procedures_url=#{handlingProceduresUrl},</if> |
| | | <if test="ratesUrl != null and ratesUrl != '' ">rates_url=#{ratesUrl},</if> |
| | | <if test="basicInformationFileName != null and basicInformationFileName != '' ">basic_information_file_name=#{basicInformationFileName},</if> |
| | | <if test="acceptConditionsFileName != null and acceptConditionsFileName != '' ">accept_conditions_file_name=#{acceptConditionsFileName},</if> |
| | | <if test="applicationMaterialFileName != null and applicationMaterialFileName != '' ">application_material_file_name=#{applicationMaterialFileName},</if> |
| | | <if test="handlingProceduresFileName != null and handlingProceduresFileName != '' ">handling_procedures_file_name=#{handlingProceduresFileName},</if> |
| | | <if test="ratesFileName != null and ratesFileName != '' ">rates_file_name=#{ratesFileName},</if> |
| | | <if test="operationalGuidelineUrl != null and operationalGuidelineUrl != '' ">operational_guideline_url=#{operationalGuidelineUrl},</if> |
| | | <if test="basicInformationUrl != null">basic_information_url=#{basicInformationUrl},</if> |
| | | <if test="acceptConditionsUrl != null ">accept_conditions_url=#{acceptConditionsUrl},</if> |
| | | <if test="applicationMaterialUrl != null ">application_material_url=#{applicationMaterialUrl},</if> |
| | | <if test="handlingProceduresUrl != null ">handling_procedures_url=#{handlingProceduresUrl},</if> |
| | | <if test="ratesUrl != null ">rates_url=#{ratesUrl},</if> |
| | | <if test="basicInformationFileName != null ">basic_information_file_name=#{basicInformationFileName},</if> |
| | | <if test="acceptConditionsFileName != null ">accept_conditions_file_name=#{acceptConditionsFileName},</if> |
| | | <if test="applicationMaterialFileName != null ">application_material_file_name=#{applicationMaterialFileName},</if> |
| | | <if test="handlingProceduresFileName != null ">handling_procedures_file_name=#{handlingProceduresFileName},</if> |
| | | <if test="ratesFileName != null ">rates_file_name=#{ratesFileName},</if> |
| | | <if test="operationalGuidelineUrl != null">operational_guideline_url=#{operationalGuidelineUrl},</if> |
| | | <if test="setGist != null and setGist != '' ">set_gist=#{setGist},</if> |
| | | <if test="setGistUrl != null and setGistUrl != '' ">set_gist_url=#{setGistUrl},</if> |
| | | <if test="setGistName != null and setGistName != '' ">set_gist_name=#{setGistName},</if> |
| | | <if test="commonProblem != null and commonProblem != '' ">common_problem=#{commonProblem},</if> |
| | | <if test="commonProblemUrl != null and commonProblemUrl != '' ">common_problem_url=#{commonProblemUrl},</if> |
| | | <if test="commonProblemName != null and commonProblemName != '' ">common_problem_name=#{commonProblemName},</if> |
| | | <if test="operationalGuidelineVideoUrl != null and operationalGuidelineVideoUrl != '' ">operational_guideline_video_url=#{operationalGuidelineVideoUrl},</if> |
| | | <if test="operationalGuidelineVideoUrl != null ">operational_guideline_video_url=#{operationalGuidelineVideoUrl},</if> |
| | | <if test="operationalGuidelineVideoName != null and operationalGuidelineVideoName != '' ">operational_guideline_video_name=#{operationalGuidelineVideoName},</if> |
| | | <if test="operationalGuidelineName != null and operationalGuidelineName != '' ">operational_guideline_name=#{operationalGuidelineName},</if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id= #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteConfigById" parameterType="string"> |
| | | delete from transaction_event where id= #{Id} |
| | | delete from automessage_transaction_event where id= #{Id} |
| | | </delete> |
| | | |
| | | <select id="countNum" resultType="integer"> |
| | | select count(id) from transaction_event |
| | | select count(id) from automessage_transaction_event |
| | | <where> |
| | | <if test="matterAndUser != null and matterAndUser != ''"> |
| | | AND associate_names like concat('%', #{matterAndUser}, '%') or matter_name like concat('%', #{matterAndUser}, '%') |
| | | </if> |
| | | <if test="classifyGrade != null and classifyGrade != ''"> |
| | | AND (select classify_grade from classify_administration where classify_grade.id=classify_id) = #{classifyGrade} |
| | | </if> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | <if test="matterName != null and matterName != ''"> |
| | | AND (matter_name like concat('%', #{matterName}, '%') or #{matterName} like concat('%', matter_name, '%')) |
| | | </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} )) |
| | | </if> |
| | | |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="sumTransactionNum" resultMap="TransactionEventEntityResult"> |
| | | select sum(transaction_num)sumTransactionNum,count(*) counttransaction FROM transaction_event |
| | | select sum(transaction_num)sumTransactionNum,count(*) counttransaction FROM automessage_transaction_event |
| | | </select> |
| | | |
| | | <select id="queryByClassifyIdList" resultMap="TransactionEventEntityResult"> |
| | | <include refid="selectTransactionEventEntityVo"/> |
| | | where (classify_id= #{classifyId} or classify_id in (select id FROM classify_administration where parent_id =#{classifyId} )) |
| | | 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} |
| | | </if> |
| | |
| | | </select> |
| | | |
| | | <select id="countNumByClassifyIdList" resultType="integer"> |
| | | select count(id) from transaction_event |
| | | where (classify_id= #{classifyId} or classify_id in (select id FROM classify_administration where parent_id =#{classifyId} )) |
| | | select count(id) from automessage_transaction_event |
| | | 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} |
| | | </if> |
| | |
| | | |
| | | |
| | | <update id="updateConfigByMatterName" parameterType="com.dg.core.db.gen.entity.TransactionEvent"> |
| | | update transaction_event |
| | | update automessage_transaction_event |
| | | <set> |
| | | browse_num=browse_num+1,query_time=sysdate() |
| | | </set> |
| | |
| | | </update> |
| | | |
| | | <select id="countNumByMatterName" resultType="integer"> |
| | | select count(id) from transaction_event |
| | | select count(id) from automessage_transaction_event |
| | | <where> |
| | | <if test="matterName != null and matterName != ''"> |
| | | AND matter_name like concat('%', #{matterName}, '%') |
| | |
| | | </select> |
| | | |
| | | <select id="selectSearch" resultType="com.dg.core.db.manual.pojo.Search"> |
| | | select title,content,views FROM( |
| | | select organization_name title,resume content,null views from organization_chart UNION |
| | | select matter_name title,concat((select classify_name from classify_administration |
| | | where id=(select parent_id from classify_administration where id=transaction_event.classify_id)), |
| | | '>',(select classify_name from classify_administration where id=transaction_event.classify_id)) content, |
| | | transaction_num views from transaction_event |
| | | ) k |
| | | select id,title,content,views, type FROM( |
| | | select id,organization_name title,resume content,null views,1 type from automessage_organization_chart 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, |
| | | transaction_num views,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"> |
| | | select matter_name title,concat((select classify_name from classify_administration |
| | | where id=(select parent_id from classify_administration where id=transaction_event.classify_id)), |
| | | '>',(select classify_name from classify_administration where id=transaction_event.classify_id)) content, |
| | | transaction_num views from transaction_event where associate_names like concat('%',#{keyWord}, '%') |
| | | <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> |
| | | |
| | | <select id="selectSearchAssociate" resultType="com.dg.core.db.manual.pojo.Search"> |
| | | 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, |
| | | transaction_num views ,3 type from automessage_transaction_event where associate_names like concat('%',#{keyWord}, '%') |
| | | </select> |
| | | |
| | | <select id="selectSearchAssociateDistinct" resultType="com.dg.core.db.manual.pojo.Search" > |
| | | select distinct classify_id, |
| | | (select ifnull(concat((select classify_name from automessage_classify_administration where c.parent_id=id),'/',classify_name),classify_name) content from automessage_classify_administration c where c.id=t.classify_id) content, |
| | | 3 type from automessage_transaction_event t where associate_names like concat('%',#{keyWord}, '%') |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="selectDataIfExist" resultType="string"> |
| | | select id from automessage_transaction_event |
| | | where department_id=#{departmentId} |
| | | and matter_name=#{matterName} |
| | | </select> |
| | | |
| | | <select id="selectclassifyId" resultType="string"> |
| | | select id from automessage_transaction_event |
| | | where classify_id=#{classifyId} |
| | | </select> |
| | | |
| | | |
| | | |
| | | </mapper> |