|
@@ -312,6 +312,8 @@
|
|
|
<result column="productionFundId" property="productionFundId" />
|
|
|
<result column="created" property="created" />
|
|
|
<result column="remark" property="remark" />
|
|
|
+ <result column="plan_amount" property="planAmount" />
|
|
|
+ <result column="delivery" property="delivery" />
|
|
|
<result column="mDeclareResult" property="mDeclareResult" />
|
|
|
<result column="eDeclareResult" property="eDeclareResult" />
|
|
|
<association property="currentNodeName" javaType="java.lang.String"
|
|
@@ -359,11 +361,13 @@
|
|
|
pf.id as productionFundId,
|
|
|
pf.real_amount,
|
|
|
pf.production_should_amount as shouldAmount,
|
|
|
+ fi.plan_amount,
|
|
|
+ mp.delivery,
|
|
|
( SELECT declare_result FROM commission_declare WHERE business_id = m.id AND production_id IS NULL AND business_type = 'COMMISSION_DECLARE_MAJOR_MARKET' AND deleted = 0 ) as mDeclareResult,
|
|
|
( SELECT declare_result FROM commission_declare WHERE business_id = m.id AND production_id IS NULL AND business_type = 'COMMISSION_DECLARE_MAJOR_EVALUATE' AND deleted = 0 ) as eDeclareResult
|
|
|
FROM
|
|
|
major m
|
|
|
- left join (select id,major_id,report_no,evaluate_amount,production,if_save_file from major_production where deleted = 0 ) mp on mp.major_id = m.id
|
|
|
+ left join (select id,major_id,report_no,evaluate_amount,production,if_save_file,delivery from major_production where deleted = 0 ) mp on mp.major_id = m.id
|
|
|
left join user u on u.id = m.principal_id
|
|
|
left join user u1 on u1.id = m.client_manager_id
|
|
|
left join customer_company cc on cc.id = m.clientele_id
|
|
@@ -371,6 +375,7 @@
|
|
|
left join customer_linkman cl on cl.id = m.clientele_contact_id
|
|
|
left join (select * from order_fund where business_type ='MAJOR_BUSINESS' and deleted = 0) orf on orf.business_id = m.id
|
|
|
left join (select * from production_fund where business_type = 'MAJOR_BUSINESS' and deleted = 0) pf on (pf.business_id = m.id and pf.production_no = mp.report_no)
|
|
|
+ left join (select plan_amount,order_fund_id,production_fund_id from finance_invoice where state in ('审核中','已开票') and deleted = 0) fi on (fi.order_fund_id = orf.id and fi.production_fund_id = pf.id)
|
|
|
|
|
|
</sql>
|
|
|
|