|
|
@@ -630,6 +630,7 @@
|
|
|
<if test="assistProcess != null">assist_process,</if>
|
|
|
<if test="alone != null">alone,</if>
|
|
|
<if test="processStatus != null">process_status,</if>
|
|
|
+ <if test="aname != null">aname,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">#{id,jdbcType=INTEGER},</if>
|
|
|
@@ -674,6 +675,7 @@
|
|
|
<if test="assistProcess != null">#{assistProcess,jdbcType=INTEGER},</if>
|
|
|
<if test="alone != null">#{alone,jdbcType=INTEGER},</if>
|
|
|
<if test="processStatus != null">#{processStatus,jdbcType=INTEGER},</if>
|
|
|
+ <if test="aname != null">#{aname,jdbcType=VARCHAR},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -686,7 +688,7 @@
|
|
|
|
|
|
|
|
|
<select id="listPublicRelease" resultType="com.goafanti.weChat.bo.OutPublicReleaseList">
|
|
|
- select a.id ,c.aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.aid,a.public_type publicType,a.order_no orderNo,
|
|
|
+ select a.id ,a.aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.aid,a.public_type publicType,a.order_no orderNo,
|
|
|
ton.contract_no contractNo,a.process_status processStatus,
|
|
|
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.update_time ,'%Y-%m-%d %H:%i:%S') updateTimes,a.update_status updateStatus,a.district_name districtName,
|
|
|
@@ -852,13 +854,13 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectDtails" resultType="com.goafanti.weChat.bo.OutPublicRelease">
|
|
|
- select a.id,c.name aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.update_time updateTime,a.user_names userNames,a.process_status processStatus,
|
|
|
+ select a.id,a.aname aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.update_time updateTime,a.user_names userNames,a.process_status processStatus,
|
|
|
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.assist_process assistProcess,
|
|
|
a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.aid ,c.superior_id suprId,a.tech_start_process techStartProcess,a.alone,
|
|
|
a.plan ,a.expected_effect expectedEffect,a.next_plan nextPlan,c.reviewer,a.type,a.order_no orderNo,d.contract_no contractNo,a.address_name addressName,
|
|
|
date_format(a.update_time ,'%Y-%m-%d %H:%i:%S') updateTimes,a.update_Status updateStatus,a.assist,a.assist_aid assistAid,a.assist_aid_name assistAidName,
|
|
|
a.main_name mainName,a.assistant_aid assistantAid,a.assistant_name assistantName,a.public_again publicAhain,x.uids,a.public_type publicType,c2.name reviewerName
|
|
|
- from public_release a left join admin c on a.aid =c.id left join admin c2 on c.reviewer =c2.id
|
|
|
+ from public_release a left join admin c2 on c.reviewer =c2.id
|
|
|
left join (select prid ,GROUP_CONCAT(uid)uids from public_release_details where prid= #{id} group by prid)x on a.id=x.prid
|
|
|
left join t_order_new d on a.order_no=d.order_no
|
|
|
where 1=1
|
|
|
@@ -867,7 +869,7 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="selectDtailsByFid" resultType="com.goafanti.weChat.bo.OutPublicReleaseAndDetails">
|
|
|
- select a.id,c.name aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.update_time updateTime,a.user_names userNames,
|
|
|
+ select a.id,a.aname aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.update_time updateTime,a.user_names userNames,
|
|
|
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.aid ,c.superior_id suprId,x.uid uids,x.district_name districtName ,u.nickname,
|
|
|
a.plan ,a.expected_effect expectedEffect,a.next_plan nextPlan,c.reviewer,a.type,a.order_no orderNo,d.contract_no contractNo,
|
|
|
@@ -884,14 +886,14 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="listPublicStatistics" resultType="com.goafanti.weChat.bo.OutPublicStatistics">
|
|
|
- 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
|
|
|
+ select y.aid,y.bh,y.dk,y.wsh,y.tg,y.duration,a.aname 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 a.aid, if(a.status=0,1,0)bh ,if(a.status=1,1,0)wsh,if(a.status=2,1,0)tg,b.dk ,if(a.status=2,a.duration,0)duration
|
|
|
from public_release a inner join (select prid ,sum(if(clock_in=1,1,0))dk from public_release_details where 1=1
|
|
|
<if test="clockStart != null and clockEnd != null">
|
|
|
and clock_in_time between #{clockStart} and #{clockEnd}
|
|
|
</if>
|
|
|
group by prid ) b on a.id =b.prid
|
|
|
- left join admin c on a.aid=c.id where 1=1
|
|
|
+ where 1=1
|
|
|
<if test="aid != null">
|
|
|
and a.aid= #{aid}
|
|
|
</if>
|
|
|
@@ -929,7 +931,7 @@
|
|
|
group by aid)x
|
|
|
</select>
|
|
|
<select id="listPublicDtails" resultType="com.goafanti.weChat.bo.OutPublicDtails">
|
|
|
- select a.id prdId,b.id,a.district_name districtName ,c.name aname,a.duration ,b.status ,b.annex_url annexUrl,a.photo_url photoUrl,d.nickname userName,
|
|
|
+ select a.id prdId,b.id,a.district_name districtName ,a.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 ,b.alone,
|
|
|
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,
|
|
|
date_format(b.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,date_format(b.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,a.address_name addressName,
|
|
|
@@ -940,7 +942,7 @@
|
|
|
uai.interview_recommend interviewRecommend,
|
|
|
e.name sname,f.total_amount totalAmout,d.sign_bills signBills,date_format(d.sign_time,'%Y-%m-%d')signTime
|
|
|
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 t_order_new f on b.order_no =f.order_no
|
|
|
+ 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
|
|
|
left join user_archives_interview uai on a.id=uai.prdid
|
|
|
where 1=1
|
|
|
@@ -1041,7 +1043,7 @@
|
|
|
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,b.aid,b.nickname ,c.name aname,a.duration ,a.district_name districtName,
|
|
|
+ select a.id,a.uid,b.aid,b.nickname ,pr.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,
|
|
|
@@ -1112,15 +1114,14 @@
|
|
|
order by release_start desc limit 10
|
|
|
</select>
|
|
|
<select id="selectOutListBoById" resultType="com.goafanti.weChat.bo.OutPublicReleaseList">
|
|
|
- select a.id ,c.name aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.aid,a.public_type publicType,
|
|
|
+ select a.id ,a.aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.aid,a.public_type publicType,
|
|
|
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.update_time ,'%Y-%m-%d %H:%i:%S') updateTimes,a.update_status updateStatus,a.district_name districtName,
|
|
|
a.assist,a.assist_aid assistAid,a.assist_aid_name assistAidName,a.type,a.main_name mainName,a.reject_name rejectName,
|
|
|
a.assistant_aid assistantAid ,a.assistant_name assistantName,a.public_again publicAgain,a.user_names userNames,
|
|
|
- ea.total_amount expenseAmount ,a.clock_in clockIn,c2.name reviewerName,a.tech_start_process techStartProcess
|
|
|
- from public_release a left join admin c on a.aid =c.id
|
|
|
- left join admin c2 on c.reviewer=c2.id
|
|
|
- left join (select * from expense_account where status in (0,1,2,3)) ea on a.id =ea.prid
|
|
|
+ ea.total_amount expenseAmount ,a.clock_in clockIn,a.tech_start_process techStartProcess
|
|
|
+ from public_release a
|
|
|
+ left join (select * from expense_account where status in (0,1,2,3)) ea on a.id =ea.prid
|
|
|
where a.id= #{id}
|
|
|
</select>
|
|
|
<select id="selectAll" resultMap="PublicReleaseMap">
|
|
|
@@ -1208,15 +1209,15 @@
|
|
|
and e.aid = #{aid}
|
|
|
</select>
|
|
|
<select id="selectByUid" resultType="com.goafanti.customer.bo.MyUserDetailsBo">
|
|
|
- select a.id ,a.aid,c.name aname,a.release_start as releaseStart
|
|
|
- from public_release a left join admin c on a.aid =c.id
|
|
|
+ select a.id ,a.aid,a.aname,a.release_start as releaseStart
|
|
|
+ from public_release a
|
|
|
where a.status in (2) and a.type in (0,1,2)
|
|
|
and a.id in (select DISTINCT prid from public_release_details where uid = #{id})
|
|
|
</select>
|
|
|
|
|
|
<select id="selectCountByUid" resultType="com.goafanti.customer.bo.MyUserDetailsBo">
|
|
|
- select a.id ,a.aid,c.name aname,a.release_start as releaseStart,a.duration
|
|
|
- from public_release a left join admin c on a.aid =c.id
|
|
|
+ select a.id ,a.aid,a.aname,a.release_start as releaseStart,a.duration
|
|
|
+ from public_release a
|
|
|
where a.status in (2)
|
|
|
and a.id in (select DISTINCT prid from public_release_details where uid = #{id})
|
|
|
</select>
|