|
@@ -6,7 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<resultMap type="TProgress" id="TProgressResult">
|
|
<resultMap type="TProgress" id="TProgressResult">
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
- <result property="secSubChapId" column="sec_sub_chap_id" />
|
|
|
|
|
|
+ <result property="questionnaireId" column="questionnaire_id" />
|
|
<result property="chapName" column="chap_name" />
|
|
<result property="chapName" column="chap_name" />
|
|
<result property="subChapName" column="sub_chap_name" />
|
|
<result property="subChapName" column="sub_chap_name" />
|
|
<result property="secSubChapName" column="sec_sub_chap_name" />
|
|
<result property="secSubChapName" column="sec_sub_chap_name" />
|
|
@@ -17,20 +17,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="targetDate" column="target_date" />
|
|
<result property="targetDate" column="target_date" />
|
|
<result property="finishDate" column="finish_date" />
|
|
<result property="finishDate" column="finish_date" />
|
|
<result property="preparation" column="preparation" />
|
|
<result property="preparation" column="preparation" />
|
|
- <result property="description" column="description" />
|
|
|
|
|
|
+ <result property="progress" column="progress" />
|
|
<result property="applyStatus" column="apply_status" />
|
|
<result property="applyStatus" column="apply_status" />
|
|
<result property="remarks" column="remarks" />
|
|
<result property="remarks" column="remarks" />
|
|
<result property="deptId" column="dept_id" />
|
|
<result property="deptId" column="dept_id" />
|
|
|
|
+ <result property="auditId" column="audit_id" />
|
|
|
|
+ <result property="personInChargeName" column="person_in_charge_name" />
|
|
|
|
+ <result property="supporterName" column="supporter_name" />
|
|
|
|
+ <result property="code" column="code" />
|
|
|
|
+ <result property="name" column="name" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTProgressVo">
|
|
<sql id="selectTProgressVo">
|
|
- select id, sec_sub_chap_id, chap_name, sub_chap_name, sec_sub_chap_name, content, person_in_charge, supporter, start_date, target_date, finish_date, preparation, description, apply_status, remarks, dept_id from t_progress
|
|
|
|
|
|
+ select p.id, questionnaire_id, chap_name, sub_chap_name, sec_sub_chap_name, content, p.person_in_charge, supporter, start_date, target_date, finish_date, preparation, progress, apply_status, p.remarks, p.dept_id, p.audit_id,
|
|
|
|
+ u1.nick_name as person_in_charge_name, u2.nick_name as supporter_name,
|
|
|
|
+ q.code as code, q.name as name
|
|
|
|
+ from t_progress p
|
|
|
|
+ left join sys_user u1 on p.person_in_charge = u1.user_id
|
|
|
|
+ left join sys_user u2 on p.supporter = u2.user_id
|
|
|
|
+ inner join t_questionnaire q on p.questionnaire_id = q.id
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectTProgressList" parameterType="TProgress" resultMap="TProgressResult">
|
|
<select id="selectTProgressList" parameterType="TProgress" resultMap="TProgressResult">
|
|
<include refid="selectTProgressVo"/>
|
|
<include refid="selectTProgressVo"/>
|
|
<where>
|
|
<where>
|
|
- <if test="secSubChapId != null "> and sec_sub_chap_id = #{secSubChapId}</if>
|
|
|
|
|
|
+ <if test="questionnaireId != null "> and questionnaire_id = #{questionnaireId}</if>
|
|
<if test="chapName != null and chapName != ''"> and chap_name like concat('%', #{chapName}, '%')</if>
|
|
<if test="chapName != null and chapName != ''"> and chap_name like concat('%', #{chapName}, '%')</if>
|
|
<if test="subChapName != null and subChapName != ''"> and sub_chap_name like concat('%', #{subChapName}, '%')</if>
|
|
<if test="subChapName != null and subChapName != ''"> and sub_chap_name like concat('%', #{subChapName}, '%')</if>
|
|
<if test="secSubChapName != null and secSubChapName != ''"> and sec_sub_chap_name like concat('%', #{secSubChapName}, '%')</if>
|
|
<if test="secSubChapName != null and secSubChapName != ''"> and sec_sub_chap_name like concat('%', #{secSubChapName}, '%')</if>
|
|
@@ -41,22 +52,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="targetDate != null "> and target_date = #{targetDate}</if>
|
|
<if test="targetDate != null "> and target_date = #{targetDate}</if>
|
|
<if test="finishDate != null "> and finish_date = #{finishDate}</if>
|
|
<if test="finishDate != null "> and finish_date = #{finishDate}</if>
|
|
<if test="preparation != null and preparation != ''"> and preparation = #{preparation}</if>
|
|
<if test="preparation != null and preparation != ''"> and preparation = #{preparation}</if>
|
|
- <if test="description != null and description != ''"> and description = #{description}</if>
|
|
|
|
|
|
+ <if test="progress != null and progress != ''"> and progress = #{progress}</if>
|
|
<if test="applyStatus != null and applyStatus != ''"> and apply_status = #{applyStatus}</if>
|
|
<if test="applyStatus != null and applyStatus != ''"> and apply_status = #{applyStatus}</if>
|
|
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
|
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
|
- <if test="deptId != null "> and dept_id like concat(concat('%', #{deptId}), '%')</if>
|
|
|
|
|
|
+ <if test="deptId != null and deptId != ''"> and p.dept_id = #{deptId}</if>
|
|
|
|
+ <if test="auditId != null "> and p.audit_id = #{auditId}</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectTProgressById" parameterType="Long" resultMap="TProgressResult">
|
|
<select id="selectTProgressById" parameterType="Long" resultMap="TProgressResult">
|
|
<include refid="selectTProgressVo"/>
|
|
<include refid="selectTProgressVo"/>
|
|
- where id = #{id}
|
|
|
|
|
|
+ where p.id = #{id}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<insert id="insertTProgress" parameterType="TProgress" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insertTProgress" parameterType="TProgress" useGeneratedKeys="true" keyProperty="id">
|
|
insert into t_progress
|
|
insert into t_progress
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
- <if test="secSubChapId != null">sec_sub_chap_id,</if>
|
|
|
|
|
|
+ <if test="questionnaireId != null">questionnaire_id,</if>
|
|
<if test="chapName != null">chap_name,</if>
|
|
<if test="chapName != null">chap_name,</if>
|
|
<if test="subChapName != null">sub_chap_name,</if>
|
|
<if test="subChapName != null">sub_chap_name,</if>
|
|
<if test="secSubChapName != null">sec_sub_chap_name,</if>
|
|
<if test="secSubChapName != null">sec_sub_chap_name,</if>
|
|
@@ -67,13 +79,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="targetDate != null">target_date,</if>
|
|
<if test="targetDate != null">target_date,</if>
|
|
<if test="finishDate != null">finish_date,</if>
|
|
<if test="finishDate != null">finish_date,</if>
|
|
<if test="preparation != null">preparation,</if>
|
|
<if test="preparation != null">preparation,</if>
|
|
- <if test="description != null">description,</if>
|
|
|
|
|
|
+ <if test="progress != null">progress,</if>
|
|
<if test="applyStatus != null">apply_status,</if>
|
|
<if test="applyStatus != null">apply_status,</if>
|
|
<if test="remarks != null">remarks,</if>
|
|
<if test="remarks != null">remarks,</if>
|
|
<if test="deptId != null">dept_id,</if>
|
|
<if test="deptId != null">dept_id,</if>
|
|
|
|
+ <if test="auditId != null">audit_id,</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
- <if test="secSubChapId != null">#{secSubChapId},</if>
|
|
|
|
|
|
+ <if test="questionnaireId != null">#{questionnaireId},</if>
|
|
<if test="chapName != null">#{chapName},</if>
|
|
<if test="chapName != null">#{chapName},</if>
|
|
<if test="subChapName != null">#{subChapName},</if>
|
|
<if test="subChapName != null">#{subChapName},</if>
|
|
<if test="secSubChapName != null">#{secSubChapName},</if>
|
|
<if test="secSubChapName != null">#{secSubChapName},</if>
|
|
@@ -84,17 +97,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="targetDate != null">#{targetDate},</if>
|
|
<if test="targetDate != null">#{targetDate},</if>
|
|
<if test="finishDate != null">#{finishDate},</if>
|
|
<if test="finishDate != null">#{finishDate},</if>
|
|
<if test="preparation != null">#{preparation},</if>
|
|
<if test="preparation != null">#{preparation},</if>
|
|
- <if test="description != null">#{description},</if>
|
|
|
|
|
|
+ <if test="progress != null">#{progress},</if>
|
|
<if test="applyStatus != null">#{applyStatus},</if>
|
|
<if test="applyStatus != null">#{applyStatus},</if>
|
|
<if test="remarks != null">#{remarks},</if>
|
|
<if test="remarks != null">#{remarks},</if>
|
|
<if test="deptId != null">#{deptId},</if>
|
|
<if test="deptId != null">#{deptId},</if>
|
|
|
|
+ <if test="auditId != null">#{auditId},</if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="updateTProgress" parameterType="TProgress">
|
|
<update id="updateTProgress" parameterType="TProgress">
|
|
update t_progress
|
|
update t_progress
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
- <if test="secSubChapId != null">sec_sub_chap_id = #{secSubChapId},</if>
|
|
|
|
|
|
+ <if test="questionnaireId != null">questionnaire_id = #{questionnaireId},</if>
|
|
<if test="chapName != null">chap_name = #{chapName},</if>
|
|
<if test="chapName != null">chap_name = #{chapName},</if>
|
|
<if test="subChapName != null">sub_chap_name = #{subChapName},</if>
|
|
<if test="subChapName != null">sub_chap_name = #{subChapName},</if>
|
|
<if test="secSubChapName != null">sec_sub_chap_name = #{secSubChapName},</if>
|
|
<if test="secSubChapName != null">sec_sub_chap_name = #{secSubChapName},</if>
|
|
@@ -105,10 +119,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="targetDate != null">target_date = #{targetDate},</if>
|
|
<if test="targetDate != null">target_date = #{targetDate},</if>
|
|
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
|
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
|
<if test="preparation != null">preparation = #{preparation},</if>
|
|
<if test="preparation != null">preparation = #{preparation},</if>
|
|
- <if test="description != null">description = #{description},</if>
|
|
|
|
|
|
+ <if test="progress != null">progress = #{progress},</if>
|
|
<if test="applyStatus != null">apply_status = #{applyStatus},</if>
|
|
<if test="applyStatus != null">apply_status = #{applyStatus},</if>
|
|
<if test="remarks != null">remarks = #{remarks},</if>
|
|
<if test="remarks != null">remarks = #{remarks},</if>
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
|
+ <if test="auditId != null">audit_id = #{auditId},</if>
|
|
</trim>
|
|
</trim>
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</update>
|
|
</update>
|
|
@@ -118,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteTProgressByIds" parameterType="String">
|
|
<delete id="deleteTProgressByIds" parameterType="String">
|
|
- delete from t_progress where id in
|
|
|
|
|
|
+ delete from t_progress where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|