|
|
@@ -17,10 +17,11 @@
|
|
|
<result column="duration" jdbcType="DOUBLE" property="duration" />
|
|
|
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
|
|
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
|
|
+ <result column="create_aid" jdbcType="BIGINT" property="createAid" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, aid, `name`, project_status, create_time, remark, admin_name, staff_name, project_number,
|
|
|
- project_year, create_year, cross_year, duration, start_time, end_time
|
|
|
+ project_year, create_year, cross_year, duration, start_time, end_time, create_aid
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -37,12 +38,14 @@
|
|
|
create_time, remark, admin_name,
|
|
|
staff_name, project_number, project_year,
|
|
|
create_year, cross_year, duration,
|
|
|
- start_time, end_time)
|
|
|
+ start_time, end_time, create_aid
|
|
|
+ )
|
|
|
values (#{aid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{projectStatus,jdbcType=INTEGER},
|
|
|
#{createTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{adminName,jdbcType=VARCHAR},
|
|
|
#{staffName,jdbcType=VARCHAR}, #{projectNumber,jdbcType=VARCHAR}, #{projectYear,jdbcType=OTHER},
|
|
|
#{createYear,jdbcType=OTHER}, #{crossYear,jdbcType=INTEGER}, #{duration,jdbcType=DOUBLE},
|
|
|
- #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP})
|
|
|
+ #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{createAid,jdbcType=BIGINT}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.project.domain.ProjectTask" useGeneratedKeys="true">
|
|
|
insert into project_task
|
|
|
@@ -89,6 +92,9 @@
|
|
|
<if test="endTime != null">
|
|
|
end_time,
|
|
|
</if>
|
|
|
+ <if test="createAid != null">
|
|
|
+ create_aid,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="aid != null">
|
|
|
@@ -133,6 +139,9 @@
|
|
|
<if test="endTime != null">
|
|
|
#{endTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="createAid != null">
|
|
|
+ #{createAid,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.project.domain.ProjectTask">
|
|
|
@@ -180,6 +189,9 @@
|
|
|
<if test="endTime != null">
|
|
|
end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="createAid != null">
|
|
|
+ create_aid = #{createAid,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
@@ -198,12 +210,14 @@
|
|
|
cross_year = #{crossYear,jdbcType=INTEGER},
|
|
|
duration = #{duration,jdbcType=DOUBLE},
|
|
|
start_time = #{startTime,jdbcType=TIMESTAMP},
|
|
|
- end_time = #{endTime,jdbcType=TIMESTAMP}
|
|
|
+ end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
+ create_aid = #{createAid,jdbcType=BIGINT}
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
+
|
|
|
<update id="updateStaffName">
|
|
|
update project_task a left join (select pid ,group_concat(name)name from project_staff
|
|
|
- where pid = #{pid} group by pid) b on a.id=b.pid set a.staff_name =b.name
|
|
|
+ where pid = #{pid} group by pid) b on a.id=b.pid set a.staff_name =b.name
|
|
|
where a.id = #{pid}
|
|
|
</update>
|
|
|
<update id="updateDuration">
|
|
|
@@ -265,6 +279,9 @@
|
|
|
<if test="staffId !=null">
|
|
|
and a.id in (select pid from project_staff where aid= #{staffId})
|
|
|
</if>
|
|
|
+ <if test="createAid !=null">
|
|
|
+ and a.create_aid= #{createAid}
|
|
|
+ </if>
|
|
|
<if test="name !=null">
|
|
|
and a.name like concat('%',#{name},'%')
|
|
|
</if>
|
|
|
@@ -284,7 +301,7 @@
|
|
|
and a.project_status =#{projectStatus}
|
|
|
</if>
|
|
|
<if test="companyId !=null">
|
|
|
- and (d.dept_id= #{companyId} or find_in_set(#{companyId},d.ancestors))
|
|
|
+ and (d.dept_id= #{companyId} or find_in_set(#{companyId},d.ancestors))
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="projectAddDuration">
|
|
|
@@ -307,7 +324,7 @@
|
|
|
<if test="companyId !=null">
|
|
|
and (d.dept_id= #{companyId} or find_in_set(#{companyId},d.ancestors))
|
|
|
</if>
|
|
|
- </select>
|
|
|
+ </select>
|
|
|
<select id="selectAll" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|