|
|
@@ -1221,66 +1221,78 @@ project_id = values(project_id)
|
|
|
<if test="serviceYear !=null">
|
|
|
left join t_task_member f on b.id=f.tid
|
|
|
</if>
|
|
|
- where (c.superior_id= #{aid} or c.id= #{aid})
|
|
|
- <if test="userName != null and userName != ''">
|
|
|
- and d.buyer_name like concat('%',#{userName},'%')
|
|
|
- </if>
|
|
|
- <if test="consultantName !=null">
|
|
|
- and (a.technology_name like concat('%',#{consultantName},'%')
|
|
|
+ <where>
|
|
|
+ <if test="roleStatus ==1">
|
|
|
+ and c.id= #{aid}
|
|
|
+ </if>
|
|
|
+ <if test="roleStatus ==2">
|
|
|
+ and c.superior_id= #{aid}
|
|
|
+ </if>
|
|
|
+ <if test="roleStatus == 3">
|
|
|
+ and a.project_id=#{aid}
|
|
|
+ </if>
|
|
|
+ <if test="userName != null and userName != ''">
|
|
|
+ and d.buyer_name like concat('%',#{userName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="consultantName !=null">
|
|
|
+ and (a.technology_name like concat('%',#{consultantName},'%')
|
|
|
or a.finance_taxation_name like concat('%',#{consultantName},'%'))
|
|
|
- </if>
|
|
|
- <if test="contractNo !=null">
|
|
|
- and e.contract_no like concat('%',#{contractNo},'%')
|
|
|
- </if>
|
|
|
- <if test="serviceYear !=null">
|
|
|
- and f.service_year like concat('%',#{serviceYear},'%')
|
|
|
- </if>
|
|
|
- <if test="projectDebtorId !=null">
|
|
|
- and b.task_receiver = #{projectDebtorId}
|
|
|
- </if>
|
|
|
- <if test="projectStatus !=null">
|
|
|
- and b.project_status = #{projectStatus}
|
|
|
- </if>
|
|
|
- <if test="outSourcingStatus !=null">
|
|
|
- and b.outsource= #{outSourcingStatus}
|
|
|
- </if>
|
|
|
- <if test="updateTime !=null">
|
|
|
- and a.update_time between #{updateTime} and #{updateTime} + interval 1 day
|
|
|
- </if>
|
|
|
- <if test="progress !=null">
|
|
|
- and a.progress = #{progress}
|
|
|
- </if>
|
|
|
- <if test="applicationLevel !=null">
|
|
|
- <if test="applicationLevel == 0">
|
|
|
- and e.total_amount < 3
|
|
|
</if>
|
|
|
- <if test="applicationLevel == 1">
|
|
|
- and e.total_amount > 3 and e.total_amount < 8
|
|
|
+ <if test="contractNo !=null">
|
|
|
+ and e.contract_no like concat('%',#{contractNo},'%')
|
|
|
</if>
|
|
|
- <if test="applicationLevel == 2">
|
|
|
- and e.total_amount > 8
|
|
|
+ <if test="serviceYear !=null">
|
|
|
+ and f.service_year like concat('%',#{serviceYear},'%')
|
|
|
</if>
|
|
|
- </if>
|
|
|
- <if test="reviewProvince !=null">
|
|
|
- and (a.review_province = #{reviewProvince}
|
|
|
+ <if test="projectDebtorId !=null">
|
|
|
+ and b.task_receiver = #{projectDebtorId}
|
|
|
+ </if>
|
|
|
+ <if test="projectStatus !=null">
|
|
|
+ and b.project_status = #{projectStatus}
|
|
|
+ </if>
|
|
|
+ <if test="outSourcingStatus !=null">
|
|
|
+ and b.outsource= #{outSourcingStatus}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime !=null">
|
|
|
+ and a.update_time between #{updateTime} and #{updateTime} + interval 1 day
|
|
|
+ </if>
|
|
|
+ <if test="progress !=null">
|
|
|
+ and a.progress = #{progress}
|
|
|
+ </if>
|
|
|
+ <if test="applicationLevel !=null">
|
|
|
+ <if test="applicationLevel == 0">
|
|
|
+ and e.total_amount < 3
|
|
|
+ </if>
|
|
|
+ <if test="applicationLevel == 1">
|
|
|
+ and e.total_amount > 3 and e.total_amount < 8
|
|
|
+ </if>
|
|
|
+ <if test="applicationLevel == 2">
|
|
|
+ and e.total_amount > 8
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="reviewProvince !=null">
|
|
|
+ and (a.review_province = #{reviewProvince}
|
|
|
or a.review_country = #{reviewProvince})
|
|
|
- </if>
|
|
|
- <if test="finalSettlementStatus !=null">
|
|
|
- and a.final_settlement_status = #{finalSettlementStatus}
|
|
|
- </if>
|
|
|
- <if test="adDeliverStatus !=null">
|
|
|
- and (a.ad_prepare_july_status = #{adDeliverStatus}
|
|
|
+ </if>
|
|
|
+ <if test="finalSettlementStatus !=null">
|
|
|
+ and a.final_settlement_status = #{finalSettlementStatus}
|
|
|
+ </if>
|
|
|
+ <if test="adDeliverStatus !=null">
|
|
|
+ and (a.ad_prepare_july_status = #{adDeliverStatus}
|
|
|
or a.ad_prepare_october_status = #{adDeliverStatus})
|
|
|
- </if>
|
|
|
- <if test="torchStatus !=null">
|
|
|
- and a.torch_status = #{torchStatus}
|
|
|
- </if>
|
|
|
- <if test="statisticsStatus !=null">
|
|
|
- and a.statistics_status = #{statisticsStatus}
|
|
|
- </if>
|
|
|
- <if test="chStatus !=null">
|
|
|
- and a.ch_status = #{chStatus}
|
|
|
- </if>
|
|
|
+ </if>
|
|
|
+ <if test="torchStatus !=null">
|
|
|
+ and a.torch_status = #{torchStatus}
|
|
|
+ </if>
|
|
|
+ <if test="statisticsStatus !=null">
|
|
|
+ and a.statistics_status = #{statisticsStatus}
|
|
|
+ </if>
|
|
|
+ <if test="chStatus !=null">
|
|
|
+ and a.ch_status = #{chStatus}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+
|
|
|
+
|
|
|
</sql>
|
|
|
<select id="selectTaskDetailsCount" resultType="java.lang.Integer">
|
|
|
select
|