| | |
| | | <result property="statusName" column="status_name"/> |
| | | <result property="process" column="process"/> |
| | | <result property="processName" column="process_name"/> |
| | | <result property="infoProcess" column="infoProcess"/> |
| | | <result property="infoProcess" column="info_process"/> |
| | | <result property="infoProcessName" column="info_process_name"/> |
| | | <result property="wantUnitId" column="want_unit_id"/> |
| | | <result property="wantUnitName" column="want_unit_name"/> |
| | |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <resultMap id="dataResult-all" type="cn.huge.module.cases.domain.dto.CasePageDTO"> |
| | | |
| | | <result property="id" column="id"/> |
| | | <result property="status" column="status"/> |
| | | <result property="statusName" column="status_name"/> |
| | | <result property="canal" column="canal"/> |
| | | <result property="canalName" column="canal_name"/> |
| | | <result property="caseLevel" column="case_level"/> |
| | | <result property="caseType" column="case_type"/> |
| | | <result property="caseTypeName" column="case_type_name"/> |
| | | <result property="inputUnitId" column="input_unit_id"/> |
| | | <result property="inputUnitName" column="input_unit_name"/> |
| | | <result property="mediResult" column="medi_result"/> |
| | | <result property="mediResultName" column="medi_result_name"/> |
| | | <result property="mediateDeptId" column="mediate_dept_id"/> |
| | | <result property="mediateDeptName" column="mediate_dept_name"/> |
| | | <result property="assistUnitId" column="assist_unit_id"/> |
| | | <result property="assistUnitName" column="assist_unit_name"/> |
| | | <result property="closeTime" column="close_time"/> |
| | | <result property="agreeType" column="agree_type"/> |
| | | <result property="agreeTypeName" column="agree_type_name"/> |
| | | <result property="agreeContent" column="agree_content"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_case_info</sql> |
| | |
| | | a.case_type_name, |
| | | a.input_unit_id, |
| | | a.input_unit_name, |
| | | b.medi_result, |
| | | b.medi_result_name, |
| | | b.mediate_dept_id, |
| | | b.mediate_dept_name |
| | | b.mediate_dept_name, |
| | | b.assist_unit_id, |
| | | b.assist_unit_name, |
| | | b.close_time, |
| | | b.agree_type, |
| | | b.agree_type_name, |
| | | b.agree_content |
| | | </sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | |
| | | <if test="terms.inputUnitName != null and terms.inputUnitName !=''"> |
| | | and a.input_unit_name = #{terms.inputUnitName} |
| | | </if> |
| | | <if test="terms.visitTimeStart != null and terms.visitTimeStart !='' and terms.visitTimeEnd != null and terms.visitTimeEnd !=''"> |
| | | and (DATE_FORMAT(a.visit_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{terms.visitTimeStart} |
| | | and DATE_FORMAT(a.visit_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{terms.visitTimeEnd}) |
| | | </if> |
| | | <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''"> |
| | | and (DATE_FORMAT(a.create_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{terms.createStart} |
| | | and DATE_FORMAT(a.create_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{terms.createEnd}) |
| | | </if> |
| | | <if test="terms.closeStart != null and terms.closeStart !='' and terms.closeEnd != null and terms.closeEnd !=''"> |
| | | and (DATE_FORMAT(b.close_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{terms.closeStart} |
| | | and DATE_FORMAT(b.close_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{terms.closeEnd}) |
| | | </if> |
| | | <if test="terms.fileStart != null and terms.fileStart !='' and terms.fileEnd != null and terms.fileEnd !=''"> |
| | | and (DATE_FORMAT(b.file_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{terms.fileStart} |
| | | and DATE_FORMAT(b.file_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{terms.fileEnd}) |
| | | </if> |
| | | |
| | | </if> |
| | | </sql> |
| | | <!-- 条件 --> |
| | |
| | | <where> |
| | | <if test="terms.ids != null and terms.ids.size > 0"> |
| | | and id in |
| | | <foreach collection="terms.id" item="terms.ids" index="index" open="(" separator="," close=")"> |
| | | #{terms.id} |
| | | <foreach collection="terms.ids" item="id" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="terms.id != null and terms.id !=''"> |
| | |
| | | </if> |
| | | <if test="terms.processList != null and terms.processList.size > 0"> |
| | | and process in |
| | | <foreach collection="terms.process" item="terms.processList" index="index" open="(" separator="," close=")"> |
| | | #{terms.process} |
| | | <foreach collection="terms.processList" item="process" index="index" open="(" separator="," close=")"> |
| | | #{process} |
| | | </foreach> |
| | | </if> |
| | | <if test="terms.process != null and terms.process !=''"> |
| | |
| | | </if> |
| | | </sql> |
| | | <!-- 更新对象 --> |
| | | <update id="updateCaseInfoList"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id IN |
| | | <foreach item="id" collection="caseIdList" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </where> |
| | | </update> |
| | | |
| | | <!-- 批量更新对象 --> |
| | | <update id="updateCaseInfo"> |
| | | update |
| | | <include refid="table-name"/> |
| | |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCaseInfoTerms"> |
| | | update |
| | |
| | | select |
| | | COUNT(1) |
| | | from |
| | | dyh_case_info a LEFT JOIN dyh_case_info_unfold b on a.id = b.case_id |
| | | dyh_case_info a LEFT JOIN dyh_case_info_unfold b on a.id = b.id |
| | | <include refid="where-part-all"/> |
| | | </select> |
| | | <!-- 根据条件分页查询 --> |
| | |
| | | SELECT |
| | | <include refid="column-part-all"/> |
| | | FROM |
| | | dyh_case_info a LEFT JOIN dyh_case_info_unfold b on a.id = b.case_id |
| | | dyh_case_info a LEFT JOIN dyh_case_info_unfold b on a.id = b.id |
| | | <include refid="where-part-all"/> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |