|
|
@@ -24,12 +24,14 @@
|
|
|
<result column="valid_date" jdbcType="VARCHAR" property="validDate" />
|
|
|
<result column="new_user" jdbcType="INTEGER" property="newUser" />
|
|
|
<result column="sign_sum" jdbcType="INTEGER" property="signSum" />
|
|
|
- <result column="main_status" jdbcType="INTEGER" property="mainStatus" />
|
|
|
+ <result column="mian_status" jdbcType="INTEGER" property="mianStatus" />
|
|
|
+ <result column="supplement" jdbcType="VARCHAR" property="supplement" />
|
|
|
+ <result column="audit_info" jdbcType="VARCHAR" property="auditInfo" />
|
|
|
</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
|
|
|
+ ufid, duration, valid_date, new_user, sign_sum, mian_status, supplement, audit_info
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -49,7 +51,8 @@
|
|
|
clock_in_time, photo_url, pid,
|
|
|
pname, ufid, duration,
|
|
|
valid_date, new_user, sign_sum,
|
|
|
- main_status)
|
|
|
+ mian_status, supplement, audit_info
|
|
|
+ )
|
|
|
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},
|
|
|
@@ -57,7 +60,8 @@
|
|
|
#{clockInTime,jdbcType=TIMESTAMP}, #{photoUrl,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR},
|
|
|
#{pname,jdbcType=VARCHAR}, #{ufid,jdbcType=VARCHAR}, #{duration,jdbcType=DOUBLE},
|
|
|
#{validDate,jdbcType=VARCHAR}, #{newUser,jdbcType=INTEGER}, #{signSum,jdbcType=INTEGER},
|
|
|
- #{mainStatus,jdbcType=INTEGER})
|
|
|
+ #{mianStatus,jdbcType=INTEGER}, #{supplement,jdbcType=VARCHAR}, #{auditInfo,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
|
|
|
insert into public_release
|
|
|
@@ -125,8 +129,14 @@
|
|
|
<if test="signSum != null">
|
|
|
sign_sum,
|
|
|
</if>
|
|
|
- <if test="mainStatus != null">
|
|
|
- main_status,
|
|
|
+ <if test="mianStatus != null">
|
|
|
+ mian_status,
|
|
|
+ </if>
|
|
|
+ <if test="supplement != null">
|
|
|
+ supplement,
|
|
|
+ </if>
|
|
|
+ <if test="auditInfo != null">
|
|
|
+ audit_info,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
@@ -193,8 +203,14 @@
|
|
|
<if test="signSum != null">
|
|
|
#{signSum,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="mainStatus != null">
|
|
|
- #{mainStatus,jdbcType=INTEGER},
|
|
|
+ <if test="mianStatus != null">
|
|
|
+ #{mianStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="supplement != null">
|
|
|
+ #{supplement,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="auditInfo != null">
|
|
|
+ #{auditInfo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
@@ -264,8 +280,14 @@
|
|
|
<if test="signSum != null">
|
|
|
sign_sum = #{signSum,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="mainStatus != null">
|
|
|
- main_status = #{mainStatus,jdbcType=INTEGER},
|
|
|
+ <if test="mianStatus != null">
|
|
|
+ mian_status = #{mianStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="supplement != null">
|
|
|
+ supplement = #{supplement,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="auditInfo != null">
|
|
|
+ audit_info = #{auditInfo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -293,169 +315,178 @@
|
|
|
valid_date = #{validDate,jdbcType=VARCHAR},
|
|
|
new_user = #{newUser,jdbcType=INTEGER},
|
|
|
sign_sum = #{signSum,jdbcType=INTEGER},
|
|
|
- main_status = #{mainStatus,jdbcType=INTEGER}
|
|
|
+ mian_status = #{mianStatus,jdbcType=INTEGER},
|
|
|
+ supplement = #{supplement,jdbcType=VARCHAR},
|
|
|
+ audit_info = #{auditInfo,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
- <update id="updateSignByAidAndUid">
|
|
|
- update public_release a ,(select max(create_time)create_time from public_release
|
|
|
- where aid= #{aid} and uid=#{uid} and main_status =1 group by aid,uid)b
|
|
|
- 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>
|
|
|
- </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>
|
|
|
- </trim>
|
|
|
+
|
|
|
+ <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="mianStatus != null">
|
|
|
+ mian_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="mianStatus != null">
|
|
|
+ #{mianStatus,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,
|
|
|
-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
|
|
|
-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
|
|
|
+ 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.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
|
|
|
+ where 1=1
|
|
|
<if test="type==0">
|
|
|
and a.aid= #{aid}
|
|
|
</if>
|
|
|
<if test="type==1">
|
|
|
- and c.superior_id = #{aid}
|
|
|
+ and c.reviewer = #{aid}
|
|
|
</if>
|
|
|
<if test="clockTime !=null">
|
|
|
and a.release_start < #{clockTime} and a.release_end > #{clockTime}
|
|
|
@@ -472,7 +503,7 @@ from public_release a left join `user` b on a.uid =b.id left join admin c on a.a
|
|
|
<if test="clockIn !=null">
|
|
|
and a.clock_in = #{clockIn}
|
|
|
</if>
|
|
|
- ORDER BY (case when a.status=1 then 1 else 2 end),a.status ,a.create_time
|
|
|
+ ORDER BY (case when a.status=1 then 1 else 2 end),a.status ,a.create_time desc
|
|
|
<if test="page_sql!=null">
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
@@ -486,7 +517,7 @@ from public_release a left join `user` b on a.uid =b.id left join admin c on a.a
|
|
|
and a.aid= #{aid}
|
|
|
</if>
|
|
|
<if test="type==1">
|
|
|
- and c.superior_id = #{aid}
|
|
|
+ and c.reviewer = #{aid}
|
|
|
</if>
|
|
|
<if test="clockTime !=null">
|
|
|
and a.release_start < #{clockTime} and a.release_end > #{clockTime}
|
|
|
@@ -506,10 +537,10 @@ from public_release a left join `user` b on a.uid =b.id left join admin c on a.a
|
|
|
</select>
|
|
|
|
|
|
<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,
|
|
|
-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
|
|
|
- from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
|
|
|
+ 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 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">
|
|
|
and a.id= #{id}
|
|
|
@@ -563,15 +594,27 @@ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,
|
|
|
</select>
|
|
|
|
|
|
<select id="listPublicDtails" resultType="com.goafanti.weChat.bo.OutPublicDtails">
|
|
|
- select 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,
|
|
|
- date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,
|
|
|
- date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds
|
|
|
- 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="aid != null">
|
|
|
- and a.aid= #{aid}
|
|
|
- </if>
|
|
|
+ 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.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
|
|
|
+ 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
|
|
|
+ <if test="aid != null">
|
|
|
+ and a.aid= #{aid}
|
|
|
+ </if>
|
|
|
+ <if test="sid != null">
|
|
|
+ and d.id= #{sid}
|
|
|
+ </if>
|
|
|
+ <if test="depId != null">
|
|
|
+ and d.department_id = #{depId}
|
|
|
+ </if>
|
|
|
+ <if test="type==1 and deps !=null">
|
|
|
+ and d.department_id in
|
|
|
+ <foreach close=")" collection="deps" item="deps" open="(" separator=",">
|
|
|
+ #{deps.id}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
<if test="uid != null">
|
|
|
and a.uid = #{uid}
|
|
|
</if>
|
|
|
@@ -584,6 +627,7 @@ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,
|
|
|
<if test="clockIn !=null">
|
|
|
and a.clock_in= #{clockIn}
|
|
|
</if>
|
|
|
+ order by a.status,a.create_time desc
|
|
|
<if test="page_sql!=null">
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
@@ -592,22 +636,35 @@ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,
|
|
|
<select id="countPublicDtails" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
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
|
|
|
- <if test="aid != null">
|
|
|
- and a.aid= #{aid}
|
|
|
- </if>
|
|
|
- <if test="uid != null">
|
|
|
- and a.uid = #{uid}
|
|
|
- </if>
|
|
|
- <if test="releaseStart != null and releaseEnd != null">
|
|
|
- and (a.release_start between #{releaseStart} and #{releaseEnd} or a.release_end between #{releaseStart} and #{releaseEnd})
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- and a.status = #{status}
|
|
|
- </if>
|
|
|
- <if test="clockIn !=null">
|
|
|
- and a.clock_in= #{clockIn}
|
|
|
- </if>
|
|
|
+ <if test="aid != null">
|
|
|
+ and a.aid= #{aid}
|
|
|
+ </if>
|
|
|
+ <if test="sid != null">
|
|
|
+ and d.id= #{sid}
|
|
|
+ </if>
|
|
|
+ <if test="depId != null">
|
|
|
+ and d.department_id = #{depId}
|
|
|
+ </if>
|
|
|
+ <if test="type==1 and deps !=null">
|
|
|
+ and d.department_id in
|
|
|
+ <foreach close=")" collection="deps" item="deps" open="(" separator=",">
|
|
|
+ #{deps.id}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="uid != null">
|
|
|
+ and a.uid = #{uid}
|
|
|
+ </if>
|
|
|
+ <if test="releaseStart != null and releaseEnd != null">
|
|
|
+ and (a.release_start between #{releaseStart} and #{releaseEnd} or a.release_end between #{releaseStart} and #{releaseEnd})
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ and a.status = #{status}
|
|
|
+ </if>
|
|
|
+ <if test="clockIn !=null">
|
|
|
+ and a.clock_in= #{clockIn}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="checkTime" resultType="java.lang.Integer">
|
|
|
@@ -616,10 +673,5 @@ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,
|
|
|
or (release_start < #{start} and release_end > #{start})
|
|
|
or (release_start < #{end} and release_end > #{end}))
|
|
|
</select>
|
|
|
- <select id="getTimeUserFollow" resultType="com.goafanti.common.model.PublicReleaseCount">
|
|
|
- select e.id province,d.id depId,a.uid,a.new_user newUser from public_release a left join admin c on a.aid=c.id
|
|
|
- left join department d on c.department_id =d.id left join district_glossory e on d.province =e.id
|
|
|
- where a.main_status =1 and a.create_time between #{date} and #{now} group by aid,uid,new_user
|
|
|
- </select>
|
|
|
|
|
|
</mapper>
|