|
|
@@ -1945,6 +1945,33 @@ ifnull(ttm.party_amount,0) partyAmount,a.commodity_price commodityPrice,a.outsou
|
|
|
from t_order_task a left join t_order_new b on a.order_no =b.order_no left join department c on b.order_dep =c.id left join district_glossory d on c.province=d.id
|
|
|
left join t_order_mid e on b.order_no =e.order_no left join business_project bp on a.commodity_id =bp.id left join business_category bc on bp.cid =bc.id
|
|
|
left join t_task_mid ttm on a.id=ttm.tid left join admin ta on a.task_receiver =ta.id left join department td on ta.department_id =td.id
|
|
|
+ <if test="status==1">
|
|
|
+ a.set_up_status setUpStatus , date_format( a.set_up_time , '%Y-%m-%d' ) setUpTime ,a.spot_check_status spotCheckStatus ,b.contact_mobile contactMobile ,
|
|
|
+ b.legal_person_tel legalPersonTel , a.certificate_number certificateNumber,a.declaration_batch declarationBatch,
|
|
|
+ </if>
|
|
|
+ <if test="status==2">
|
|
|
+ date_format(a.licence_time, '%Y-%m-%d' ) licenceTime,
|
|
|
+ </if>
|
|
|
+ <if test="status==3">
|
|
|
+ a.commodity_quantity commodityQuantity ,ttm.certificates_count certificatesCount,ttm.urgent_day urgentDay ,ttm.if_material ifMaterial,
|
|
|
+ date_format(tp.licence_time, '%Y-%m-%d' ) licenceTime,
|
|
|
+ a.certificate_number certificateNumber,ttm.cost_amount costAmount ,
|
|
|
+ (a.commodity_price-ttm.cost_amount)profit,
|
|
|
+ </if>
|
|
|
+ <if test="status==4">
|
|
|
+ ttm.certificates_count certificatesCount,a.high_tech_status highTechStatus,
|
|
|
+ tp.patent_name patentName ,tp.patent_no patentNo ,date_format(tp.accept_time, '%Y-%m-%d ' ) acceptTime ,
|
|
|
+ date_format(tp.licence_time, '%Y-%m-%d' ) licenceTime ,date_format(tp.authorize_time, '%Y-%m-%d ' ) authorizeTime,
|
|
|
+ ttm.reject_count rejectCount ,ttm.cost_amount costAmount ,(a.commodity_price-ttm.cost_amount)profit,
|
|
|
+ </if>
|
|
|
+
|
|
|
+ a.commodity_quantity commodityQuantity , a.commodity_price commodityPrice ,a.special_comment specialComment
|
|
|
+ from t_order_task a left join t_order_new b on a.order_no =b.order_no left join department c on b.order_dep =c.id left join district_glossory d on c.province=d.id
|
|
|
+ <if test="status==3 or status==4">
|
|
|
+ left join task_progress tp on a.id=tp.task_id
|
|
|
+ </if>
|
|
|
+ left join t_order_mid e on b.order_no =e.order_no left join business_project bp on a.commodity_id =bp.id left join business_category bc on bp.cid =bc.id
|
|
|
+ left join t_task_mid ttm on a.id=ttm.tid left join admin ta on a.task_receiver =ta.id left join department td on ta.department_id =td.id
|
|
|
<if test="screen ==6">
|
|
|
right join (select tid ,accept_count sls from t_task_mid where accept_count > 0)tj on a.id=tj.tid
|
|
|
</if>
|
|
|
@@ -1965,7 +1992,7 @@ ifnull(ttm.party_amount,0) partyAmount,a.commodity_price commodityPrice,a.outsou
|
|
|
where apply_count > 0)tj on a.id=tj.tid
|
|
|
</if>
|
|
|
where a.split_status in (0,2) and a.task_status in (1,2,3)
|
|
|
- <!-- 筛选项 0库存 1派单 2完成 3立项 4抽查 5未通过 6受理 7完结 8授权 9驳回 10下证 11申请 12公示数 -->
|
|
|
+ <!-- 筛选项 0库存 1派单 2完成 3立项 4抽查 5未通过 6受理 7完结 8授权 9驳回 10下证 11申请 -->
|
|
|
<if test="screen ==0">
|
|
|
and a.status in(0,1,2,3,5)
|
|
|
</if>
|
|
|
@@ -1980,13 +2007,19 @@ ifnull(ttm.party_amount,0) partyAmount,a.commodity_price commodityPrice,a.outsou
|
|
|
</if>
|
|
|
<if test="screen ==5">
|
|
|
and a.spot_check_status =1
|
|
|
- </if>
|
|
|
+ </if>
|
|
|
<if test="screen ==12">
|
|
|
and a.publicity_time is not null
|
|
|
- </if>
|
|
|
- <if test="startDate != null and endDate != null">
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null and endDate != null">
|
|
|
and a.task_distribution_time between #{startDate} and #{endDate}
|
|
|
</if>
|
|
|
+ <if test="province !=null">
|
|
|
+ and c.province = #{province}
|
|
|
+ </if>
|
|
|
+ <if test="projectId !=null">
|
|
|
+ and a.commodity_id = #{projectId}
|
|
|
+ </if>
|
|
|
<if test="depId !=null">
|
|
|
and b.order_dep = #{depId}
|
|
|
</if>
|