|
@@ -27,11 +27,15 @@
|
|
|
<result column="main_status" jdbcType="INTEGER" property="mainStatus" />
|
|
<result column="main_status" jdbcType="INTEGER" property="mainStatus" />
|
|
|
<result column="supplement" jdbcType="VARCHAR" property="supplement" />
|
|
<result column="supplement" jdbcType="VARCHAR" property="supplement" />
|
|
|
<result column="audit_info" jdbcType="VARCHAR" property="auditInfo" />
|
|
<result column="audit_info" jdbcType="VARCHAR" property="auditInfo" />
|
|
|
|
|
+ <result column="plan" jdbcType="VARCHAR" property="plan" />
|
|
|
|
|
+ <result column="expected_effect" jdbcType="VARCHAR" property="expectedEffect" />
|
|
|
|
|
+ <result column="next_plan" jdbcType="VARCHAR" property="nextPlan" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
|
id, `uid`, aid, release_start, release_end, remarks, annex_url, user_name, longitude,
|
|
id, `uid`, aid, release_start, release_end, remarks, annex_url, user_name, longitude,
|
|
|
latitude, `status`, create_time, clock_in, clock_in_time, photo_url, pid, pname,
|
|
latitude, `status`, create_time, clock_in, clock_in_time, photo_url, pid, pname,
|
|
|
- ufid, duration, valid_date, new_user, sign_sum, main_status, supplement, audit_info
|
|
|
|
|
|
|
+ ufid, duration, valid_date, new_user, sign_sum, main_status, supplement, audit_info,
|
|
|
|
|
+ `plan`, expected_effect, next_plan
|
|
|
</sql>
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
select
|
|
@@ -51,7 +55,8 @@
|
|
|
clock_in_time, photo_url, pid,
|
|
clock_in_time, photo_url, pid,
|
|
|
pname, ufid, duration,
|
|
pname, ufid, duration,
|
|
|
valid_date, new_user, sign_sum,
|
|
valid_date, new_user, sign_sum,
|
|
|
- main_status, supplement, audit_info
|
|
|
|
|
|
|
+ main_status, supplement, audit_info,
|
|
|
|
|
+ `plan`, expected_effect, next_plan
|
|
|
)
|
|
)
|
|
|
values (#{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{releaseStart,jdbcType=TIMESTAMP},
|
|
values (#{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{releaseStart,jdbcType=TIMESTAMP},
|
|
|
#{releaseEnd,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{annexUrl,jdbcType=VARCHAR},
|
|
#{releaseEnd,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{annexUrl,jdbcType=VARCHAR},
|
|
@@ -60,7 +65,8 @@
|
|
|
#{clockInTime,jdbcType=TIMESTAMP}, #{photoUrl,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR},
|
|
#{clockInTime,jdbcType=TIMESTAMP}, #{photoUrl,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR},
|
|
|
#{pname,jdbcType=VARCHAR}, #{ufid,jdbcType=VARCHAR}, #{duration,jdbcType=DOUBLE},
|
|
#{pname,jdbcType=VARCHAR}, #{ufid,jdbcType=VARCHAR}, #{duration,jdbcType=DOUBLE},
|
|
|
#{validDate,jdbcType=VARCHAR}, #{newUser,jdbcType=INTEGER}, #{signSum,jdbcType=INTEGER},
|
|
#{validDate,jdbcType=VARCHAR}, #{newUser,jdbcType=INTEGER}, #{signSum,jdbcType=INTEGER},
|
|
|
- #{mainStatus,jdbcType=INTEGER}, #{supplement,jdbcType=VARCHAR}, #{auditInfo,jdbcType=VARCHAR}
|
|
|
|
|
|
|
+ #{mainStatus,jdbcType=INTEGER}, #{supplement,jdbcType=VARCHAR}, #{auditInfo,jdbcType=VARCHAR},
|
|
|
|
|
+ #{plan,jdbcType=VARCHAR}, #{expectedEffect,jdbcType=VARCHAR}, #{nextPlan,jdbcType=VARCHAR}
|
|
|
)
|
|
)
|
|
|
</insert>
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
|
|
@@ -138,6 +144,15 @@
|
|
|
<if test="auditInfo != null">
|
|
<if test="auditInfo != null">
|
|
|
audit_info,
|
|
audit_info,
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="plan != null">
|
|
|
|
|
+ `plan`,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="expectedEffect != null">
|
|
|
|
|
+ expected_effect,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="nextPlan != null">
|
|
|
|
|
+ next_plan,
|
|
|
|
|
+ </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="uid != null">
|
|
<if test="uid != null">
|
|
@@ -212,6 +227,15 @@
|
|
|
<if test="auditInfo != null">
|
|
<if test="auditInfo != null">
|
|
|
#{auditInfo,jdbcType=VARCHAR},
|
|
#{auditInfo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="plan != null">
|
|
|
|
|
+ #{plan,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="expectedEffect != null">
|
|
|
|
|
+ #{expectedEffect,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="nextPlan != null">
|
|
|
|
|
+ #{nextPlan,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicRelease">
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicRelease">
|
|
@@ -289,6 +313,15 @@
|
|
|
<if test="auditInfo != null">
|
|
<if test="auditInfo != null">
|
|
|
audit_info = #{auditInfo,jdbcType=VARCHAR},
|
|
audit_info = #{auditInfo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="plan != null">
|
|
|
|
|
+ `plan` = #{plan,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="expectedEffect != null">
|
|
|
|
|
+ expected_effect = #{expectedEffect,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="nextPlan != null">
|
|
|
|
|
+ next_plan = #{nextPlan,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
</set>
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
</update>
|
|
@@ -317,7 +350,10 @@
|
|
|
sign_sum = #{signSum,jdbcType=INTEGER},
|
|
sign_sum = #{signSum,jdbcType=INTEGER},
|
|
|
main_status = #{mainStatus,jdbcType=INTEGER},
|
|
main_status = #{mainStatus,jdbcType=INTEGER},
|
|
|
supplement = #{supplement,jdbcType=VARCHAR},
|
|
supplement = #{supplement,jdbcType=VARCHAR},
|
|
|
- audit_info = #{auditInfo,jdbcType=VARCHAR}
|
|
|
|
|
|
|
+ audit_info = #{auditInfo,jdbcType=VARCHAR},
|
|
|
|
|
+ `plan` = #{plan,jdbcType=VARCHAR},
|
|
|
|
|
+ expected_effect = #{expectedEffect,jdbcType=VARCHAR},
|
|
|
|
|
+ next_plan = #{nextPlan,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
@@ -487,6 +523,9 @@
|
|
|
date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status,
|
|
date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status,
|
|
|
a.latitude ,a.longitude ,a.clock_in clockIn
|
|
a.latitude ,a.longitude ,a.clock_in clockIn
|
|
|
from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
|
|
from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
|
|
|
|
|
+ <if test="type==2">
|
|
|
|
|
+ left join department d on c.department_id =d.id
|
|
|
|
|
+ </if>
|
|
|
where 1=1
|
|
where 1=1
|
|
|
<if test="type==0">
|
|
<if test="type==0">
|
|
|
and a.aid= #{aid}
|
|
and a.aid= #{aid}
|
|
@@ -494,6 +533,9 @@
|
|
|
<if test="type==1">
|
|
<if test="type==1">
|
|
|
and c.reviewer = #{aid}
|
|
and c.reviewer = #{aid}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="type==2">
|
|
|
|
|
+ and d.manager_id = #{aid}
|
|
|
|
|
+ </if>
|
|
|
<if test="clockTime !=null">
|
|
<if test="clockTime !=null">
|
|
|
and a.release_start < #{clockTime} and a.release_end > #{clockTime}
|
|
and a.release_start < #{clockTime} and a.release_end > #{clockTime}
|
|
|
</if>
|
|
</if>
|
|
@@ -516,15 +558,20 @@
|
|
|
</select>
|
|
</select>
|
|
|
<select id="countPublicRelease" resultType="java.lang.Integer">
|
|
<select id="countPublicRelease" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
select count(*)
|
|
|
- from public_release a left join `user` b on a.uid =b.id
|
|
|
|
|
- left join admin c on a.aid =c.id
|
|
|
|
|
- where 1=1
|
|
|
|
|
- <if test="type==0">
|
|
|
|
|
- and a.aid= #{aid}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="type==1">
|
|
|
|
|
- and c.reviewer = #{aid}
|
|
|
|
|
- </if>
|
|
|
|
|
|
|
+ from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
|
|
|
|
|
+ <if test="type==2">
|
|
|
|
|
+ left join department d on c.department_id =d.id
|
|
|
|
|
+ </if>
|
|
|
|
|
+ where 1=1
|
|
|
|
|
+ <if test="type==0">
|
|
|
|
|
+ and a.aid= #{aid}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="type==1">
|
|
|
|
|
+ and c.reviewer = #{aid}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="type==2">
|
|
|
|
|
+ and d.manager_id = #{aid}
|
|
|
|
|
+ </if>
|
|
|
<if test="clockTime !=null">
|
|
<if test="clockTime !=null">
|
|
|
and a.release_start < #{clockTime} and a.release_end > #{clockTime}
|
|
and a.release_start < #{clockTime} and a.release_end > #{clockTime}
|
|
|
</if>
|
|
</if>
|
|
@@ -543,10 +590,11 @@
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectDtails" resultType="com.goafanti.weChat.bo.OutPublicRelease">
|
|
<select id="selectDtails" resultType="com.goafanti.weChat.bo.OutPublicRelease">
|
|
|
- select a.id,b.nickname ,c.name aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,
|
|
|
|
|
|
|
+ select a.id,b.nickname ,c.name aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,
|
|
|
date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status,
|
|
date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status,
|
|
|
a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,a.longitude ,a.aid ,c.superior_id suprId,a.uid,
|
|
a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,a.longitude ,a.aid ,c.superior_id suprId,a.uid,
|
|
|
- a.clock_in clockIn from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
|
|
|
|
|
|
|
+ a.clock_in clockIn ,a.plan ,a.expected_effect expectedEffect,a.next_plan nextPlan,d.reviewer
|
|
|
|
|
+ from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
|
|
|
where 1=1
|
|
where 1=1
|
|
|
<if test="id !=null">
|
|
<if test="id !=null">
|
|
|
and a.id= #{id}
|
|
and a.id= #{id}
|
|
@@ -603,7 +651,8 @@
|
|
|
select a.id,b.nickname ,a.user_name userName,c.name aname,a.duration ,a.status,a.annex_url annexUrl,a.photo_url photoUrl,
|
|
select a.id,b.nickname ,a.user_name userName,c.name aname,a.duration ,a.status,a.annex_url annexUrl,a.photo_url photoUrl,
|
|
|
date_format(a.clock_in_time ,'%Y-%m-%d %H:%i:%S') clockInTimes,a.clock_in clockIn,a.remarks,a.supplement,
|
|
date_format(a.clock_in_time ,'%Y-%m-%d %H:%i:%S') clockInTimes,a.clock_in clockIn,a.remarks,a.supplement,
|
|
|
date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.audit_info auditInfo,d.name sname,
|
|
date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.audit_info auditInfo,d.name sname,
|
|
|
- date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds
|
|
|
|
|
|
|
+ date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,
|
|
|
|
|
+ a.plan ,a.next_plan nextPlan ,a.expected_effect expectedEffect
|
|
|
from public_release a left join `user` b on a.uid=b.id left join admin c on a.aid =c.id
|
|
from public_release a left join `user` b on a.uid=b.id left join admin c on a.aid =c.id
|
|
|
left join admin d on b.aid=d.id where 1=1
|
|
left join admin d on b.aid=d.id where 1=1
|
|
|
<if test="aid != null">
|
|
<if test="aid != null">
|