|
|
@@ -5,7 +5,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ This element was generated on Wed Jun 02 14:39:12 CST 2021.
|
|
|
-->
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="uid" jdbcType="VARCHAR" property="uid" />
|
|
|
@@ -22,12 +22,14 @@
|
|
|
<result column="clock_in_time" jdbcType="TIMESTAMP" property="clockInTime" />
|
|
|
<result column="pid" jdbcType="VARCHAR" property="pid" />
|
|
|
<result column="pname" jdbcType="VARCHAR" property="pname" />
|
|
|
+ <result column="ufid" jdbcType="VARCHAR" property="ufid" />
|
|
|
+ <result column="duration" jdbcType="DOUBLE" property="duration" />
|
|
|
</resultMap>
|
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.PublicRelease">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ This element was generated on Wed Jun 02 14:39:12 CST 2021.
|
|
|
-->
|
|
|
<result column="annex_url" jdbcType="LONGVARCHAR" property="annexUrl" />
|
|
|
<result column="photo_url" jdbcType="LONGVARCHAR" property="photoUrl" />
|
|
|
@@ -36,16 +38,16 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ This element was generated on Wed Jun 02 14:39:12 CST 2021.
|
|
|
-->
|
|
|
id, `uid`, aid, release_start, release_end, remarks, user_name, longitude, latitude,
|
|
|
- `status`, create_time, clock_in, clock_in_time, pid, pname
|
|
|
+ `status`, create_time, clock_in, clock_in_time, pid, pname, ufid, duration
|
|
|
</sql>
|
|
|
<sql id="Blob_Column_List">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ This element was generated on Wed Jun 02 14:39:12 CST 2021.
|
|
|
-->
|
|
|
annex_url, photo_url
|
|
|
</sql>
|
|
|
@@ -53,7 +55,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ This element was generated on Wed Jun 02 14:39:12 CST 2021.
|
|
|
-->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -66,7 +68,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ This element was generated on Wed Jun 02 14:39:12 CST 2021.
|
|
|
-->
|
|
|
delete from public_release
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -75,26 +77,28 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ This element was generated on Wed Jun 02 14:39:12 CST 2021.
|
|
|
-->
|
|
|
insert into public_release (id, `uid`, aid,
|
|
|
release_start, release_end, remarks,
|
|
|
user_name, longitude, latitude,
|
|
|
`status`, create_time, clock_in,
|
|
|
clock_in_time, pid, pname,
|
|
|
- annex_url, photo_url)
|
|
|
+ ufid, duration, annex_url,
|
|
|
+ photo_url)
|
|
|
values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
|
|
|
#{releaseStart,jdbcType=TIMESTAMP}, #{releaseEnd,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR},
|
|
|
#{userName,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR},
|
|
|
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{clockIn,jdbcType=INTEGER},
|
|
|
#{clockInTime,jdbcType=TIMESTAMP}, #{pid,jdbcType=VARCHAR}, #{pname,jdbcType=VARCHAR},
|
|
|
- #{annexUrl,jdbcType=LONGVARCHAR}, #{photoUrl,jdbcType=LONGVARCHAR})
|
|
|
+ #{ufid,jdbcType=VARCHAR}, #{duration,jdbcType=DOUBLE}, #{annexUrl,jdbcType=LONGVARCHAR},
|
|
|
+ #{photoUrl,jdbcType=LONGVARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.PublicRelease">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ This element was generated on Wed Jun 02 14:39:12 CST 2021.
|
|
|
-->
|
|
|
insert into public_release
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -143,6 +147,12 @@
|
|
|
<if test="pname != null">
|
|
|
pname,
|
|
|
</if>
|
|
|
+ <if test="ufid != null">
|
|
|
+ ufid,
|
|
|
+ </if>
|
|
|
+ <if test="duration != null">
|
|
|
+ duration,
|
|
|
+ </if>
|
|
|
<if test="annexUrl != null">
|
|
|
annex_url,
|
|
|
</if>
|
|
|
@@ -196,6 +206,12 @@
|
|
|
<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="annexUrl != null">
|
|
|
#{annexUrl,jdbcType=LONGVARCHAR},
|
|
|
</if>
|
|
|
@@ -208,7 +224,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ This element was generated on Wed Jun 02 14:39:12 CST 2021.
|
|
|
-->
|
|
|
update public_release
|
|
|
<set>
|
|
|
@@ -254,6 +270,12 @@
|
|
|
<if test="pname != null">
|
|
|
pname = #{pname,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="ufid != null">
|
|
|
+ ufid = #{ufid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="duration != null">
|
|
|
+ duration = #{duration,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
<if test="annexUrl != null">
|
|
|
annex_url = #{annexUrl,jdbcType=LONGVARCHAR},
|
|
|
</if>
|
|
|
@@ -267,7 +289,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ This element was generated on Wed Jun 02 14:39:12 CST 2021.
|
|
|
-->
|
|
|
update public_release
|
|
|
set `uid` = #{uid,jdbcType=VARCHAR},
|
|
|
@@ -284,6 +306,8 @@
|
|
|
clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
|
|
|
pid = #{pid,jdbcType=VARCHAR},
|
|
|
pname = #{pname,jdbcType=VARCHAR},
|
|
|
+ ufid = #{ufid,jdbcType=VARCHAR},
|
|
|
+ duration = #{duration,jdbcType=DOUBLE},
|
|
|
annex_url = #{annexUrl,jdbcType=LONGVARCHAR},
|
|
|
photo_url = #{photoUrl,jdbcType=LONGVARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -292,7 +316,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ This element was generated on Wed Jun 02 14:39:12 CST 2021.
|
|
|
-->
|
|
|
update public_release
|
|
|
set `uid` = #{uid,jdbcType=VARCHAR},
|
|
|
@@ -308,7 +332,9 @@
|
|
|
clock_in = #{clockIn,jdbcType=INTEGER},
|
|
|
clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
|
|
|
pid = #{pid,jdbcType=VARCHAR},
|
|
|
- pname = #{pname,jdbcType=VARCHAR}
|
|
|
+ pname = #{pname,jdbcType=VARCHAR},
|
|
|
+ ufid = #{ufid,jdbcType=VARCHAR},
|
|
|
+ duration = #{duration,jdbcType=DOUBLE}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
@@ -452,4 +478,93 @@ date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create
|
|
|
and c.superior_id = #{aid}
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="selectByUfid" resultType="com.goafanti.admin.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
|
|
|
+ from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
|
|
|
+ where a.ufid= #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="listPublicStatistics" resultType="com.goafanti.admin.bo.OutPublicStatistics">
|
|
|
+ select if(a.status=0,1,0)bh ,if(a.status=1,1,0)wsh,if(a.status=2,1,0)tg,b.name
|
|
|
+ ,sum(a.duration)duration
|
|
|
+ from public_release a left join admin b on a.aid =b.id
|
|
|
+ where 1=1
|
|
|
+ <if test="aid != null">
|
|
|
+ and a.aid= #{aid}
|
|
|
+ </if>
|
|
|
+ <if test="clockStart != null and clockEnd != null">
|
|
|
+ and a.clock_in_time between #{clockStart} and #{clockEnd}
|
|
|
+ </if>
|
|
|
+ <if test="createStart != null and createEnd !=null">
|
|
|
+ and a.create_time between #{createStart} and #{createEnd}
|
|
|
+ </if>
|
|
|
+ <if test="depId != null">
|
|
|
+ and b.department_id = #{depId}
|
|
|
+ </if>
|
|
|
+ <if test="page_sql!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="countPublicStatistics" resultType="java.lang.Integer">
|
|
|
+ select count(*)
|
|
|
+ from public_release a left join admin b on a.aid =b.id
|
|
|
+ where 1=1
|
|
|
+ <if test="aid != null">
|
|
|
+ and a.aid= #{aid}
|
|
|
+ </if>
|
|
|
+ <if test="clockStart != null and clockEnd != null">
|
|
|
+ and a.clock_in_time between #{clockStart} and #{clockEnd}
|
|
|
+ </if>
|
|
|
+ <if test="createStart != null and createEnd !=null">
|
|
|
+ and a.create_time between #{createStart} and #{createEnd}
|
|
|
+ </if>
|
|
|
+ <if test="depId != null">
|
|
|
+ and b.department_id = #{depId}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="listPublicDtails" resultType="com.goafanti.admin.bo.OutPublicDtails">
|
|
|
+ select b.nickname ,a.user_name userName,c.name aname,a.duration ,a.status,
|
|
|
+ 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>
|
|
|
+ <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="page_sql!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <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
|
|
|
+ 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>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|