|
@@ -71,7 +71,10 @@
|
|
|
a.quality_signature_file_name as "qualitySignatureFileName",
|
|
|
a.quality_signature_upload_file_user as "qualitySignatureUploadFileUser.id",
|
|
|
a.quality_signature_upload_date as "qualitySignatureUploadDate",
|
|
|
- a.belonging_department as "belongingDepartment"
|
|
|
+ a.belonging_department as "belongingDepartment",
|
|
|
+ a.paper_filing_status as "paperFilingStatus",
|
|
|
+ ifnull(a.over_paper_filing_status,0) as "overPaperFilingStatus",
|
|
|
+ ifnull(a.over_batch_archive_status,0) as "overBatchArchiveStatus"
|
|
|
</sql>
|
|
|
|
|
|
<sql id="projectRecordsColumnss">
|
|
@@ -433,7 +436,6 @@
|
|
|
LEFT JOIN project_material_defect_record pmdr on prd.id = pmdr.report_id
|
|
|
left join project_paper_filing ppf on ppf.project_id = a.id
|
|
|
<where>
|
|
|
- a.status = 5
|
|
|
<if test="projectId != null and projectId != ''">
|
|
|
AND a.project_id like concat('%',#{projectId},'%')
|
|
|
</if>
|
|
@@ -641,8 +643,9 @@
|
|
|
</if>
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
-
|
|
|
- AND a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
|
|
|
+ <if test="projectStatus !=null">
|
|
|
+ AND a.status = #{projectStatus}
|
|
|
+ </if>
|
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|
|
|
AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
|
|
|
</if>
|
|
@@ -942,7 +945,6 @@
|
|
|
LEFT JOIN project_material_defect_record pmdr on prd.id = pmdr.report_id
|
|
|
left join project_paper_filing ppf on ppf.project_id = a.id
|
|
|
<where>
|
|
|
- a.status = 5
|
|
|
<if test="projectId != null and projectId != ''">
|
|
|
AND a.project_id like concat('%',#{projectId},'%')
|
|
|
</if>
|
|
@@ -1150,7 +1152,9 @@
|
|
|
<if test="projectType !=null and projectType !=''">
|
|
|
and project_type= #{projectType}
|
|
|
</if>
|
|
|
- AND a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
|
|
|
+ <if test="projectStatus !=null">
|
|
|
+ AND a.status = #{projectStatus}
|
|
|
+ </if>
|
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|
|
|
AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id})${sqlMap.dsf} )
|
|
|
</if>
|
|
@@ -1360,7 +1364,8 @@
|
|
|
submit_scale,
|
|
|
emergency_project,
|
|
|
reported_state,
|
|
|
- belonging_department
|
|
|
+ belonging_department,
|
|
|
+ paper_filing_status
|
|
|
) VALUES (
|
|
|
#{id},
|
|
|
#{createBy.id},
|
|
@@ -1413,7 +1418,8 @@
|
|
|
#{submitScale},
|
|
|
#{emergencyProject},
|
|
|
#{reportedState},
|
|
|
- #{belongingDepartment}
|
|
|
+ #{belongingDepartment},
|
|
|
+ #{paperFilingStatus}
|
|
|
)
|
|
|
</insert>
|
|
|
|
|
@@ -1462,6 +1468,9 @@
|
|
|
<if test="projectMasterId != null and projectMasterId != ''">
|
|
|
,project_master_id = #{projectMasterId}
|
|
|
</if>
|
|
|
+ <if test="paperFilingStatus != null and paperFilingStatus != ''">
|
|
|
+ ,paper_filing_status = #{paperFilingStatus}
|
|
|
+ </if>
|
|
|
,submit_money =#{submitMoney},
|
|
|
engineering_type =#{engineeringType},
|
|
|
project_properties =#{projectProperties},
|
|
@@ -2451,6 +2460,7 @@
|
|
|
/*判定是否紧急项目【紧急项目 质量复核状态为5】【非紧急项目 签发状态为5】*/
|
|
|
IF( a.emergency_project = 0 or a.emergency_project is null , prdt.`status` = 5, prd.`status` = 5 )
|
|
|
and a.submit_money = 1
|
|
|
+ AND (a.paper_filing_status != 10 or a.paper_filing_status is null)
|
|
|
and a.del_flag = 0 and project_type in (1,2)
|
|
|
# and prd.`status`=5
|
|
|
and a.id not in (select project_id FROM project_flingbatch_relation r left join project_filingbatch f on f.filing_batch=r.filing_batch where f.filing_status in(2,3,5) )
|
|
@@ -2490,6 +2500,7 @@
|
|
|
<if test="projectName != null and projectName != ''">
|
|
|
AND a.project_name like concat(concat('%',#{projectName}),'%')
|
|
|
</if>
|
|
|
+ AND (a.paper_filing_status != 10 or a.paper_filing_status is null)
|
|
|
and a.submit_money = 1
|
|
|
and a.del_flag = 0 and a.project_type in (1,2)
|
|
|
/*不捞取已经发起审批并审批状态为2、3、5的项目信息*/
|
|
@@ -3279,6 +3290,20 @@
|
|
|
LEFT JOIN rural_project_records a ON sdi.field6 = a.id
|
|
|
</if>
|
|
|
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field13 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field7 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field14 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field8 = a.id
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field15 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field9 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field16 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field10 = a.id
|
|
|
+ </if>
|
|
|
+
|
|
|
LEFT JOIN sys_area area ON area.id = a.area_id
|
|
|
left join rural_project_records_reported rprr on rprr.id = a.id
|
|
|
LEFT JOIN project_flingbatch_relation pfp on pfp.project_id=a.id
|
|
@@ -3474,6 +3499,18 @@
|
|
|
<if test="statementCompanyComprehensiveInfo.field12 == '5'.toString() ">
|
|
|
LEFT JOIN rural_project_records a ON sdi.field6 = a.id
|
|
|
</if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field13 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field7 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field14 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field8 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field15 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field9 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field16 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field10 = a.id
|
|
|
+ </if>
|
|
|
LEFT JOIN sys_area area ON area.id = a.area_id
|
|
|
left join rural_project_records_reported rprr on rprr.id = a.id
|
|
|
LEFT JOIN project_flingbatch_relation pfp on pfp.project_id=a.id
|
|
@@ -4095,6 +4132,25 @@
|
|
|
LEFT JOIN rural_project_records a ON sodi.field4 = a.id
|
|
|
</if>
|
|
|
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field11 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sodi.field5 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field12 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sodi.field6 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field13 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sodi.field7 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field14 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sodi.field8 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field15 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sodi.field9 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field16 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sodi.field10 = a.id
|
|
|
+ </if>
|
|
|
+
|
|
|
LEFT JOIN sys_area area ON area.id = a.area_id
|
|
|
left join rural_project_records_reported rprr on rprr.id = a.id
|
|
|
LEFT JOIN project_flingbatch_relation pfp on pfp.project_id=a.id
|
|
@@ -4263,32 +4319,212 @@
|
|
|
limit ${ruralProjectRecords.page.pageNo},${ruralProjectRecords.page.pageSize}
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
<select id="selectDepartmentReportPageOverdueCount" resultType="integer">
|
|
|
select
|
|
|
- count(DISTINCT id)
|
|
|
- from statement_office_data_info
|
|
|
+ count(DISTINCT a.id)
|
|
|
+ from statement_office_data_info sdi
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field5 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field1 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field6 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field2 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field7 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field3 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field8 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field4 = a.id
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field11 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field5 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field12 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field6 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field13 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field7 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field14 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field8 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field15 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field9 = a.id
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field16 == '5'.toString() ">
|
|
|
+ LEFT JOIN rural_project_records a ON sdi.field10 = a.id
|
|
|
+ </if>
|
|
|
+ LEFT JOIN sys_area area ON area.id = a.area_id
|
|
|
+ left join rural_project_records_reported rprr on rprr.id = a.id
|
|
|
+ LEFT JOIN project_flingbatch_relation pfp on pfp.project_id=a.id
|
|
|
+ LEFT JOIN project_filingbatch pfb on pfb.id=pfp.filing_batch
|
|
|
+ LEFT JOIN sys_user sua on a.create_by = sua.id
|
|
|
+ <if test="ruralProjectRecords.leaderNameStr !=null and ruralProjectRecords.leaderNameStr !=''">
|
|
|
+ LEFT JOIN work_project_user w on a.id = w.project_id
|
|
|
+ LEFT JOIN sys_user su on w.user_id = su.id
|
|
|
+ </if>
|
|
|
+ LEFT JOIN sys_user sub on a.project_master_id = sub.id
|
|
|
+ LEFT JOIN sys_office sob ON sob.id = sub.office_id
|
|
|
+ LEFT JOIN work_project_user w1 on a.id = w1.project_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 sys_office o ON o.id = a.office_id
|
|
|
+ left join project_report_data prd on prd.project_id = a.id
|
|
|
+ left join project_report_data_two prdt on prdt.project_id = a.id
|
|
|
+ left join rural_project_report_record prr on prr.report_id = prd.id
|
|
|
+ LEFT JOIN project_material_defect_record pmdr on prd.id = pmdr.report_id
|
|
|
+ left join rural_project_report_record_down prrd on prrd.report_id = prd.id
|
|
|
+ left join project_paper_filing ppf on ppf.project_id = a.id
|
|
|
+ left join project_approval_signature pas on pas.project_id = a.id
|
|
|
+ left join project_report_signature prs on prs.project_id = a.id
|
|
|
+ left join project_report_signature_info prsi on prsi.project_report_id = prd.number
|
|
|
<where>
|
|
|
- year = #{year}
|
|
|
- and type = #{type}
|
|
|
- and big_date_type = #{bigDateType}
|
|
|
- and small_date_type = #{smallDateType}
|
|
|
- and office_id = #{officeId}
|
|
|
- and user_id = #{userId}
|
|
|
- <if test="field5 == '5'.toString() ">
|
|
|
- and field1 IS NOT NULL and field1 != ''
|
|
|
+ a.status = 5
|
|
|
+ and a.del_flag = 0
|
|
|
+ and sdi.small_date_type = #{statementCompanyComprehensiveInfo.smallDateType}
|
|
|
+ and sdi.office_id = #{statementCompanyComprehensiveInfo.officeId}
|
|
|
+ and sdi.user_id = #{statementCompanyComprehensiveInfo.userId}
|
|
|
+ and sdi.year = #{statementCompanyComprehensiveInfo.year}
|
|
|
+ and sdi.type = #{statementCompanyComprehensiveInfo.type}
|
|
|
+ and sdi.big_date_type = #{statementCompanyComprehensiveInfo.bigDateType}
|
|
|
+ <if test="statementCompanyComprehensiveInfo.departmentLevel != null and statementCompanyComprehensiveInfo.departmentLevel !='' and statementCompanyComprehensiveInfo.departmentLevel != 'company'">
|
|
|
+ and sdi.small_date_type = #{statementCompanyComprehensiveInfo.smallDateType}
|
|
|
</if>
|
|
|
- <if test="field6 == '5'.toString() ">
|
|
|
- and field2 IS NOT NULL and field2 != ''
|
|
|
+ and sdi.office_id = #{statementCompanyComprehensiveInfo.officeId}
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field5 == '5'.toString() ">
|
|
|
+ and a.record_state != 7
|
|
|
+ and pmdr.id is null
|
|
|
+ and a.over_record_status = 1
|
|
|
+ and a.office_id in(select id from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
|
|
|
</if>
|
|
|
- <if test="field7 == '5'.toString() ">
|
|
|
- and field3 IS NOT NULL and field3 != ''
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field6 == '5'.toString() ">
|
|
|
+ and a.record_state = 7
|
|
|
+ and pmdr.id is null
|
|
|
+ and a.over_record_status = 1
|
|
|
+ and a.office_id in(select id from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
|
|
|
+ and prr.status = 7
|
|
|
+ and prr.del_flag = 0
|
|
|
+ and prr.accomplish_date >= #{beginDate}
|
|
|
+ and prr.accomplish_date <= #{endDate}
|
|
|
</if>
|
|
|
- <if test="field8 == '5'.toString() ">
|
|
|
- and field4 IS NOT NULL and field4 != ''
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field7 == '5'.toString() ">
|
|
|
+ and a.over_due_status = 1
|
|
|
+ and a.office_id in(select id from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="statementCompanyComprehensiveInfo.field8 == '5'.toString() ">
|
|
|
+ and a.reported_state = 7
|
|
|
+ and a.over_due_status = 1
|
|
|
+ and a.office_id in(select id from sys_office where id = #{statementCompanyComprehensiveInfo.officeId} or parent_ids like concat('%',#{statementCompanyComprehensiveInfo.officeId},'%'))
|
|
|
+ and rprr.report_status = 5
|
|
|
+ and rprr.del_flag = 0
|
|
|
+ and rprr.accomplish_date >= #{beginDate}
|
|
|
+ and rprr.accomplish_date <= #{endDate}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
|
|
|
+ AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.projectName != null and ruralProjectRecords.projectName != ''">
|
|
|
+ AND a.project_name like concat(concat('%',#{ruralProjectRecords.projectName}),'%')
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.scaleType != null and ruralProjectRecords.scaleType != ''">
|
|
|
+ AND a.scale_type = #{ruralProjectRecords.scaleType}
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.scaleUnit != null and ruralProjectRecords.scaleUnit != ''">
|
|
|
+ AND a.scale_unit = #{ruralProjectRecords.scaleUnit}
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.scaleQuantity != null and ruralProjectRecords.scaleQuantity != ''">
|
|
|
+ AND a.scale_quantity = #{ruralProjectRecords.scaleQuantity}
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.projectSite != null and ruralProjectRecords.projectSite != ''">
|
|
|
+ AND a.project_site LIKE concat('%',#{ruralProjectRecords.projectSite},'%')
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.remarks != null and ruralProjectRecords.remarks != ''">
|
|
|
+ AND a.remarks LIKE concat('%',#{ruralProjectRecords.remarks},'%')
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.projectDesc != null and ruralProjectRecords.projectDesc != ''">
|
|
|
+ AND a.project_desc LIKE concat('%',#{ruralProjectRecords.projectDesc},'%')
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.area != null and ruralProjectRecords.area.id != null and ruralProjectRecords.area.id != ''">
|
|
|
+ AND a.area_id = #{ruralProjectRecords.area.id}
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.name !=null and ruralProjectRecords.workContractInfo.name !=''">
|
|
|
+ AND wci.name like concat(concat('%',#{ruralProjectRecords.workContractInfo.name}),'%')
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.contractNum !=null and ruralProjectRecords.workContractInfo.contractNum !=''">
|
|
|
+ AND wci.contract_num like concat(concat('%',#{ruralProjectRecords.workContractInfo.contractNum}),'%')
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.contractPrice !=null and ruralProjectRecords.workContractInfo.contractPrice !=''">
|
|
|
+ AND wci.contract_price = #{ruralProjectRecords.workContractInfo.contractPrice}
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.workContractInfo !=null and ruralProjectRecords.workContractInfo.contractType !=null and ruralProjectRecords.workContractInfo.contractType !=''">
|
|
|
+ AND wci.contract_type = #{ruralProjectRecords.workContractInfo.contractType}
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.workContractInfo!=null and ruralProjectRecords.workContractInfo.client !=null and ruralProjectRecords.workContractInfo.client.name !=null and ruralProjectRecords.workContractInfo.client.name !=''">
|
|
|
+ AND wct.name like concat(concat('%',#{ruralProjectRecords.workContractInfo.client.name}),'%')
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.leaderNameStr !=null and ruralProjectRecords.leaderNameStr !=''">
|
|
|
+ AND su.name like concat(concat('%',#{ruralProjectRecords.leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.projectStatus !=null">
|
|
|
+ AND a.status = #{ruralProjectRecords.projectStatus}
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.beginDate !=null">
|
|
|
+ AND a.create_date >= #{ruralProjectRecords.beginDate}
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.endDate !=null">
|
|
|
+ AND a.create_date < #{ruralProjectRecords.endDate}
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.projectType !=null and ruralProjectRecords.projectType !=''">
|
|
|
+ and project_type= #{ruralProjectRecords.projectType}
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.engineeringType !=null and ruralProjectRecords.engineeringType !=''">
|
|
|
+ and a.engineering_type= #{ruralProjectRecords.engineeringType}
|
|
|
+ </if>
|
|
|
+ <!--<if test="office!=null and office.id!=null and office.id!=''">
|
|
|
+ and a.office_id = #{office.id}
|
|
|
+ </if>-->
|
|
|
+ <if test="ruralProjectRecords.officeIdList!=null and ruralProjectRecords.officeIdList.size!=0">
|
|
|
+ and a.office_id in
|
|
|
+ <foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
|
|
|
+ #{ruralProjectRecords.officeId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="ruralProjectRecords.reportData!=null and ruralProjectRecords.reportData.number !=null and ruralProjectRecords.reportData.number !=''">
|
|
|
+ and prd.number like concat('%',#{ruralProjectRecords.reportData.number},'%')
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.filingProjectStatus!=null and ruralProjectRecords.filingProjectStatus !=''">
|
|
|
+ and pfp.status =${ruralProjectRecords.filingProjectStatus}
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.submitMoney!=null and ruralProjectRecords.submitMoney !=''">
|
|
|
+ and a.submit_money =#{ruralProjectRecords.submitMoney}
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.createBy !=null and ruralProjectRecords.createBy !=''">
|
|
|
+ <if test="ruralProjectRecords.createBy.name !=null and ruralProjectRecords.createBy.name !=''">
|
|
|
+ AND sua.name like concat(concat('%',#{ruralProjectRecords.createBy.name}),'%')
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.office!=null and ruralProjectRecords.office.name!=null and ruralProjectRecords.office.name!=''">
|
|
|
+ AND o.name like concat(concat('%',#{ruralProjectRecords.office.name}),'%')
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.sqlMap.delFlag !=null and ruralProjectRecords.sqlMap.delFlag!=''">
|
|
|
+ ${ruralProjectRecords.sqlMap.delFlag}
|
|
|
+ </if>
|
|
|
+ <if test="ruralProjectRecords.sqlMap.dsf !=null and ruralProjectRecords.sqlMap.dsf!=''">
|
|
|
+ AND ((w1.user_id = #{ruralProjectRecords.currentUser.id} AND w1.del_flag='0' AND a.company_id = #{ruralProjectRecords.currentUser.company.id} )${ruralProjectRecords.sqlMap.dsf} )
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<update id="updateProcessInstanceId">
|
|
|
UPDATE case_base SET
|
|
|
case_process_id = #{processInstanceId}
|
|
@@ -4416,11 +4652,14 @@
|
|
|
,date_add(date_format(prd.audit_pass_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDate
|
|
|
,date_add(date_format(prd.audit_pass_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDateDate
|
|
|
,a.project_type as "projectType"
|
|
|
+ ,ifnull(ppf.status,0) as "paperFilingStatus"
|
|
|
+ ,ifnull(a.over_paper_filing_status,0) as "overPaperFilingStatus"
|
|
|
FROM rural_project_records a
|
|
|
left join project_paper_filing ppf on ppf.project_id = a.id
|
|
|
left join work_contract_info wci on a.contract_id = wci.id
|
|
|
left join project_report_data_two prd on prd.project_id = a.id
|
|
|
left join rural_project_report_record prr on prr.report_id = prd.id
|
|
|
+ left join project_material_defect_record pmdrd on prd.id = pmdrd.report_id and pmdrd.del_flag = 0
|
|
|
left join sys_user u on u.id = a.create_by
|
|
|
left join sys_office o on o.id = a.office_id
|
|
|
LEFT JOIN sys_area area ON area.id = a.area_id
|
|
@@ -4433,6 +4672,7 @@
|
|
|
and a.status = 5
|
|
|
and (ppf.status is null or ppf.status = 1)
|
|
|
and now() > date_add(prd.audit_pass_date,interval #{startCount} day)
|
|
|
+ and (pmdrd.id is null or pmdrd.status = 1 or pmdrd.status = 2 or pmdrd.status = 3 or pmdrd.status = 4)
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -4441,12 +4681,13 @@
|
|
|
<include refid="projectRecordsColumns"/>
|
|
|
,date_add(date_format(prd.audit_pass_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDate
|
|
|
,date_add(date_format(prd.audit_pass_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDateDate
|
|
|
- ,a.project_type as "projectType"
|
|
|
+ ,ifnull(pfp.status,0) as "batchArchiveStatus"
|
|
|
FROM rural_project_records a
|
|
|
LEFT JOIN project_flingbatch_relation pfp on pfp.project_id=a.id
|
|
|
left join work_contract_info wci on a.contract_id = wci.id
|
|
|
left join project_report_data prd on prd.project_id = a.id
|
|
|
left join rural_project_report_record prr on prr.report_id = prd.id
|
|
|
+ left join project_material_defect_record pmdrd on prd.id = pmdrd.report_id and pmdrd.del_flag = 0
|
|
|
left join sys_user u on u.id = a.create_by
|
|
|
left join sys_office o on o.id = a.office_id
|
|
|
LEFT JOIN sys_area area ON area.id = a.area_id
|
|
@@ -4458,14 +4699,16 @@
|
|
|
AND a.STATUS = 5
|
|
|
AND prd.STATUS = 5
|
|
|
AND a.submit_money = 1
|
|
|
- AND pfp.STATUS IS NULL
|
|
|
+ AND (pfp.STATUS IS NULL or (pfp.STATUS != 5 and pfp.STATUS != 7))
|
|
|
and now() > date_add(prd.audit_pass_date,interval #{startCount} day)
|
|
|
+ and (pmdrd.id is null or pmdrd.status = 1 or pmdrd.status = 2 or pmdrd.status = 3 or pmdrd.status = 4)
|
|
|
</where>
|
|
|
</select>
|
|
|
<select id="findJudgeAdvanceWeekNotice"
|
|
|
resultType="com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords">
|
|
|
SELECT <include refid="projectRecordsColumns"/>,
|
|
|
datediff( now(), prd.create_date) "adventDate",a.project_type as "projectType"
|
|
|
+ ,ifnull(prd.status,0) as "projectReportStatus"
|
|
|
FROM rural_project_records a
|
|
|
left join work_contract_info wci on a.contract_id = wci.id
|
|
|
left join project_report_data prd on prd.project_id = a.id
|
|
@@ -4477,9 +4720,9 @@
|
|
|
left join sys_user su on su.id = w1.user_id
|
|
|
left join sys_office so on so.id = su.office_id
|
|
|
WHERE
|
|
|
- a.del_flag = 0
|
|
|
- AND ( prd.STATUS IS NULL OR prd.STATUS = '' )
|
|
|
- AND datediff( now(), prd.create_date )> 53
|
|
|
+ a.del_flag = 0 and a.status = 5
|
|
|
+ AND ( prd.STATUS IS NULL OR prd.STATUS = '' OR prd.STATUS = '1' OR prd.STATUS = '3' OR prd.STATUS = '4' )
|
|
|
+ AND datediff( now(), prd.create_date )> 60
|
|
|
</select>
|
|
|
<select id="findProjectRegistrantResponsiblePersonList" resultType="com.jeeplus.modules.sys.entity.User">
|
|
|
SELECT
|
|
@@ -5712,4 +5955,31 @@ GROUP BY
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
+ <update id="updateProjectReportDataOnOverDue">
|
|
|
+ update project_report_data
|
|
|
+ set over_report_status = 1
|
|
|
+ <if test="status != null and status != ''">
|
|
|
+ ,status = ${status}
|
|
|
+ </if>
|
|
|
+ where project_id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="updateProjectPaperFilingOnOverDue">
|
|
|
+ update rural_project_records
|
|
|
+ set over_paper_filing_status = 1
|
|
|
+ <if test="status != null and status != ''">
|
|
|
+ ,paper_filing_status = ${status}
|
|
|
+ </if>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="updateProjectBatchArchiveOnOverDue">
|
|
|
+ update rural_project_records
|
|
|
+ set over_batch_archive_status = 1
|
|
|
+ <if test="status != null and status != ''">
|
|
|
+ ,batch_archive_status = ${status}
|
|
|
+ </if>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
</mapper>
|