|
|
@@ -666,13 +666,13 @@
|
|
|
select b.id,a.district_name districtName ,c.name aname,a.duration ,b.status ,b.annex_url annexUrl,a.photo_url photoUrl,d.nickname userName,
|
|
|
date_format(a.clock_in_time ,'%Y-%m-%d %H:%i:%S') clockInTimes,a.clock_in clockIn ,b.remarks ,b.supplement ,b.`type` ,b.object_type objectType ,
|
|
|
date_format(b.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,b.audit_info auditInfo,date_format(b.audit_time ,'%Y-%m-%d %H:%i:%S') auditTimes,
|
|
|
- e.name sname, date_format(b.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,date_format(b.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,
|
|
|
+ date_format(b.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,date_format(b.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,
|
|
|
b.plan ,b.next_plan nextPlan ,b.expected_effect expectedEffect,b.update_status updateStatus,b.assist_aid_name assistAidName,
|
|
|
b.main_name mainName,b.assist,b.assistant_aid assistantAid, b.assistant_name assistantName,f.contract_no contractNo,
|
|
|
- f.total_amount totalAmout
|
|
|
+ e.name sname,f.total_amount totalAmout
|
|
|
from public_release_details a left join public_release b on a.prid =b.id
|
|
|
- left join admin c on b.aid =c.id left join `user` d on a.uid =d.id left join admin e on d.aid=e.id
|
|
|
- left join t_order_new f on b.order_no =f.order_no
|
|
|
+ left join admin c on b.aid =c.id left join t_order_new f on b.order_no =f.order_no
|
|
|
+ left join `user` d on a.uid =d.id left join admin e on d.aid=e.id
|
|
|
where 1=1
|
|
|
<if test="publicType != null">
|
|
|
and b.type= #{publicType}
|
|
|
@@ -681,7 +681,7 @@
|
|
|
and b.aid= #{aid}
|
|
|
</if>
|
|
|
<if test="sid != null">
|
|
|
- and e.id= #{sid}
|
|
|
+ and d.aid= #{sid}
|
|
|
</if>
|
|
|
<if test="deps !=null">
|
|
|
and c.department_id in
|
|
|
@@ -713,11 +713,8 @@
|
|
|
<select id="countPublicDtails" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
from public_release_details a left join public_release b on a.prid =b.id
|
|
|
- left join admin c on b.aid =c.id left join `user` d on a.uid =d.id left join admin e on d.aid=e.id
|
|
|
- <if test="uid != null">
|
|
|
- left join public_release_details prd on a.id=prd.prid
|
|
|
- </if>
|
|
|
- where 1=1
|
|
|
+ left join admin c on b.aid =c.id left join `user` d on a.uid =d.id
|
|
|
+ where 1=1
|
|
|
<if test="publicType != null">
|
|
|
and b.type= #{publicType}
|
|
|
</if>
|
|
|
@@ -725,7 +722,7 @@
|
|
|
and b.aid= #{aid}
|
|
|
</if>
|
|
|
<if test="sid != null">
|
|
|
- and e.id= #{sid}
|
|
|
+ and d.aid= #{sid}
|
|
|
</if>
|
|
|
<if test="deps !=null">
|
|
|
and c.department_id in
|
|
|
@@ -757,20 +754,21 @@
|
|
|
or (release_start < #{end} and release_end > #{end}))
|
|
|
</select>
|
|
|
<select id="getTimeUserFollow" resultType="com.goafanti.common.model.OutPublicReleaseCount">
|
|
|
- select e.id province,d.id depId,a.aid,a.uid,a.new_user newUser ,1 quantity from (select aid,uid,new_user from public_release
|
|
|
- where main_status =1 and create_time between #{date} and #{now}
|
|
|
- group by aid,uid,new_user)a left join admin c on a.aid=c.id
|
|
|
+ select e.id province,d.id depId,a.aid,a.uid,a.new_user newUser ,1 quantity from (select a.aid,b.uid,b.new_user from public_release a
|
|
|
+ left join public_release_details b on a.id=b.prid
|
|
|
+ where b.main_status =1 and a.create_time between #{date} and #{now}
|
|
|
+ group by a.aid,b.uid,b.new_user)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
|
|
|
</select>
|
|
|
<select id="publicByOrder" resultType="com.goafanti.weChat.bo.OutPublicRelease">
|
|
|
- select a.id,a.uid,a.aid,b.nickname ,c.name aname,a.duration ,a.district_name districtName,
|
|
|
- date_format(a.release_start,'%Y-%m-%d %H:%i:%S')releaseStarts,
|
|
|
- date_format(a.release_end ,'%Y-%m-%d %H:%i:%S')releaseEnds,
|
|
|
+ select a.id,a.uid,b.aid,b.nickname ,c.name aname,a.duration ,a.district_name districtName,
|
|
|
+ date_format(pr.release_start,'%Y-%m-%d %H:%i:%S')releaseStarts,
|
|
|
+ date_format(pr.release_end ,'%Y-%m-%d %H:%i:%S')releaseEnds,
|
|
|
date_format(a.clock_in_time ,'%Y-%m-%d %H:%i:%S')clockInTimes,
|
|
|
- a.remarks
|
|
|
- from public_release a left join user b on a.uid=b.id
|
|
|
- left join admin c on a.aid =c.id
|
|
|
- where a.order_no = #{orderNo}
|
|
|
+ pr.remarks
|
|
|
+ from public_release_details a left join public_release pr on a.prid=pr.id
|
|
|
+ left join user b on a.uid=b.id left join admin c on pr.aid =c.id
|
|
|
+ where pr.order_no = #{orderNo}
|
|
|
</select>
|
|
|
<select id="selectByMainId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|