|
|
@@ -31,12 +31,13 @@
|
|
|
<result column="expected_effect" jdbcType="VARCHAR" property="expectedEffect" />
|
|
|
<result column="next_plan" jdbcType="VARCHAR" property="nextPlan" />
|
|
|
<result column="type" jdbcType="INTEGER" property="type" />
|
|
|
+ <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
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,
|
|
|
ufid, duration, valid_date, new_user, sign_sum, main_status, supplement, audit_info,
|
|
|
- `plan`, expected_effect, next_plan, `type`
|
|
|
+ `plan`, expected_effect, next_plan, `type`, order_no
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -58,7 +59,7 @@
|
|
|
valid_date, new_user, sign_sum,
|
|
|
main_status, supplement, audit_info,
|
|
|
`plan`, expected_effect, next_plan,
|
|
|
- `type`)
|
|
|
+ `type`, order_no)
|
|
|
values (#{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{releaseStart,jdbcType=TIMESTAMP},
|
|
|
#{releaseEnd,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{annexUrl,jdbcType=VARCHAR},
|
|
|
#{userName,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR},
|
|
|
@@ -68,7 +69,7 @@
|
|
|
#{validDate,jdbcType=VARCHAR}, #{newUser,jdbcType=INTEGER}, #{signSum,jdbcType=INTEGER},
|
|
|
#{mainStatus,jdbcType=INTEGER}, #{supplement,jdbcType=VARCHAR}, #{auditInfo,jdbcType=VARCHAR},
|
|
|
#{plan,jdbcType=VARCHAR}, #{expectedEffect,jdbcType=VARCHAR}, #{nextPlan,jdbcType=VARCHAR},
|
|
|
- #{type,jdbcType=INTEGER})
|
|
|
+ #{type,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
|
|
|
insert into public_release
|
|
|
@@ -157,6 +158,9 @@
|
|
|
<if test="type != null">
|
|
|
`type`,
|
|
|
</if>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ order_no,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="uid != null">
|
|
|
@@ -243,6 +247,9 @@
|
|
|
<if test="type != null">
|
|
|
#{type,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ #{orderNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicRelease">
|
|
|
@@ -332,6 +339,9 @@
|
|
|
<if test="type != null">
|
|
|
`type` = #{type,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
@@ -364,7 +374,8 @@
|
|
|
`plan` = #{plan,jdbcType=VARCHAR},
|
|
|
expected_effect = #{expectedEffect,jdbcType=VARCHAR},
|
|
|
next_plan = #{nextPlan,jdbcType=VARCHAR},
|
|
|
- `type` = #{type,jdbcType=INTEGER}
|
|
|
+ `type` = #{type,jdbcType=INTEGER},
|
|
|
+ order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
@@ -374,160 +385,6 @@
|
|
|
set a.sign_sum =a.sign_sum +1
|
|
|
where a.aid =#{aid} and a.uid =#{uid} and a.main_status =1 and a.create_time =b.create_time
|
|
|
</update>
|
|
|
- <insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
|
|
|
- insert into public_release
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="uid != null">
|
|
|
- `uid`,
|
|
|
- </if>
|
|
|
- <if test="aid != null">
|
|
|
- aid,
|
|
|
- </if>
|
|
|
- <if test="releaseStart != null">
|
|
|
- release_start,
|
|
|
- </if>
|
|
|
- <if test="releaseEnd != null">
|
|
|
- release_end,
|
|
|
- </if>
|
|
|
- <if test="remarks != null">
|
|
|
- remarks,
|
|
|
- </if>
|
|
|
- <if test="annexUrl != null">
|
|
|
- annex_url,
|
|
|
- </if>
|
|
|
- <if test="userName != null">
|
|
|
- user_name,
|
|
|
- </if>
|
|
|
- <if test="longitude != null">
|
|
|
- longitude,
|
|
|
- </if>
|
|
|
- <if test="latitude != null">
|
|
|
- latitude,
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- `status`,
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time,
|
|
|
- </if>
|
|
|
- <if test="clockIn != null">
|
|
|
- clock_in,
|
|
|
- </if>
|
|
|
- <if test="clockInTime != null">
|
|
|
- clock_in_time,
|
|
|
- </if>
|
|
|
- <if test="photoUrl != null">
|
|
|
- photo_url,
|
|
|
- </if>
|
|
|
- <if test="pid != null">
|
|
|
- pid,
|
|
|
- </if>
|
|
|
- <if test="pname != null">
|
|
|
- pname,
|
|
|
- </if>
|
|
|
- <if test="ufid != null">
|
|
|
- ufid,
|
|
|
- </if>
|
|
|
- <if test="duration != null">
|
|
|
- duration,
|
|
|
- </if>
|
|
|
- <if test="validDate != null">
|
|
|
- valid_date,
|
|
|
- </if>
|
|
|
- <if test="newUser != null">
|
|
|
- new_user,
|
|
|
- </if>
|
|
|
- <if test="signSum != null">
|
|
|
- sign_sum,
|
|
|
- </if>
|
|
|
- <if test="mainStatus != null">
|
|
|
- main_status,
|
|
|
- </if>
|
|
|
- <if test="supplement != null">
|
|
|
- supplement,
|
|
|
- </if>
|
|
|
- <if test="auditInfo != null">
|
|
|
- audit_info,
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="uid != null">
|
|
|
- #{uid,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="aid != null">
|
|
|
- #{aid,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="releaseStart != null">
|
|
|
- #{releaseStart,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="releaseEnd != null">
|
|
|
- #{releaseEnd,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="remarks != null">
|
|
|
- #{remarks,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="annexUrl != null">
|
|
|
- #{annexUrl,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="userName != null">
|
|
|
- #{userName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="longitude != null">
|
|
|
- #{longitude,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="latitude != null">
|
|
|
- #{latitude,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- #{status,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- #{createTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="clockIn != null">
|
|
|
- #{clockIn,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="clockInTime != null">
|
|
|
- #{clockInTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="photoUrl != null">
|
|
|
- #{photoUrl,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="pid != null">
|
|
|
- #{pid,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="pname != null">
|
|
|
- #{pname,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="ufid != null">
|
|
|
- #{ufid,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="duration != null">
|
|
|
- #{duration,jdbcType=DOUBLE},
|
|
|
- </if>
|
|
|
- <if test="validDate != null">
|
|
|
- #{validDate,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="newUser != null">
|
|
|
- #{newUser,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="signSum != null">
|
|
|
- #{signSum,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="mainStatus != null">
|
|
|
- #{mainStatus,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="supplement != null">
|
|
|
- #{supplement,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="auditInfo != null">
|
|
|
- #{auditInfo,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- <selectKey keyProperty="id" order="AFTER" resultType="int">
|
|
|
- SELECT LAST_INSERT_ID()
|
|
|
- </selectKey>
|
|
|
- </insert>
|
|
|
|
|
|
<select id="listPublicRelease" resultType="com.goafanti.weChat.bo.OutPublicReleaseList">
|
|
|
select a.id,b.nickname ,c.name aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,
|
|
|
@@ -604,7 +461,7 @@
|
|
|
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,
|
|
|
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 ,a.plan ,a.expected_effect expectedEffect,a.next_plan nextPlan,c.reviewer
|
|
|
+ a.clock_in clockIn ,a.plan ,a.expected_effect expectedEffect,a.next_plan nextPlan,c.reviewer,a.type,a.order_no orderNo
|
|
|
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="id !=null">
|
|
|
@@ -620,7 +477,7 @@
|
|
|
select y.aid,y.bh,y.dk,y.wsh,y.tg,y.duration,c.name from(select x.aid ,sum(x.bh)bh,sum(x.wsh)wsh,sum(x.tg)tg,sum(x.dk)dk,sum(x.duration)duration
|
|
|
from (select if(a.status=0,1,0)bh ,if(a.status=1,1,0)wsh,if(a.status=2,1,0)tg,if(a.clock_in=1,1,0) dk,a.aid
|
|
|
,if(a.status=2,a.duration,0)duration from public_release a left join admin b on a.aid=b.id
|
|
|
- where 1=1
|
|
|
+ where a.type=0
|
|
|
<if test="aid != null">
|
|
|
and a.aid= #{aid}
|
|
|
</if>
|
|
|
@@ -642,7 +499,7 @@
|
|
|
|
|
|
<select id="countPublicStatistics" resultType="java.lang.Integer">
|
|
|
select count(*) from (select aid from public_release a left join admin b on a.aid=b.id
|
|
|
- where 1=1
|
|
|
+ where a.type=0
|
|
|
<if test="aid != null">
|
|
|
and a.aid= #{aid}
|
|
|
</if>
|