|
@@ -948,7 +948,9 @@
|
|
wct.name AS "workContractInfo.client.name",
|
|
wct.name AS "workContractInfo.client.name",
|
|
o.top_company AS "office.name",
|
|
o.top_company AS "office.name",
|
|
dsu.name as "projectRegistrant",
|
|
dsu.name as "projectRegistrant",
|
|
- prd.number as "reportData.number"
|
|
|
|
|
|
+ prd.number as "reportData.number",
|
|
|
|
+ if(wipr.project_id is not null,"1","") as invoiceFlag,
|
|
|
|
+ wi.invoice_state as "invoiceStatus"
|
|
FROM rural_project_records a
|
|
FROM rural_project_records a
|
|
<include refid="projectRecordsJoins"/>
|
|
<include refid="projectRecordsJoins"/>
|
|
|
|
|
|
@@ -961,6 +963,8 @@
|
|
LEFT JOIN work_contract_info wci on a.contract_id = wci.id
|
|
LEFT JOIN work_contract_info wci on a.contract_id = wci.id
|
|
LEFT JOIN work_client_info wct on wci.client_id = wct.id
|
|
LEFT JOIN work_client_info wct on wci.client_id = wct.id
|
|
LEFT JOIN sys_office o ON o.id = a.office_id
|
|
LEFT JOIN sys_office o ON o.id = a.office_id
|
|
|
|
+ left join work_invoice_project_relation wipr on wipr.project_id = a.id
|
|
|
|
+ left join work_invoice wi on wi.id = wipr.invoice_id
|
|
<where>
|
|
<where>
|
|
<if test="projectId != null and projectId != ''">
|
|
<if test="projectId != null and projectId != ''">
|
|
AND a.project_id like concat('%',#{projectId},'%')
|
|
AND a.project_id like concat('%',#{projectId},'%')
|
|
@@ -1016,6 +1020,11 @@
|
|
<if test="endDate !=null">
|
|
<if test="endDate !=null">
|
|
AND a.create_date < #{endDate}
|
|
AND a.create_date < #{endDate}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="reportData != null and reportData != ''">
|
|
|
|
+ <if test="reportData.number != null and reportData.number != ''">
|
|
|
|
+ AND prd.number like concat(concat('%',#{reportData.number}),'%')
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
AND a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
|
|
AND a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
|
|
/*and prd.number is not null*/
|
|
/*and prd.number is not null*/
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|
|
@@ -1103,6 +1112,11 @@
|
|
<if test="endDate !=null">
|
|
<if test="endDate !=null">
|
|
AND a.create_date < #{endDate}
|
|
AND a.create_date < #{endDate}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="reportData != null and reportData != ''">
|
|
|
|
+ <if test="reportData.number != null and reportData.number != ''">
|
|
|
|
+ AND prd.number like concat(concat('%',#{reportData.number}),'%')
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
AND a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
|
|
AND a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
|
|
/*and prd.number is not null*/
|
|
/*and prd.number is not null*/
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|