|
@@ -53,6 +53,8 @@
|
|
|
a.check_remarks as "checkRemarks",
|
|
|
a.project_properties As "projectProperties",
|
|
|
a.submit_scale As "submitScale",
|
|
|
+ ifnull(a.record_state,0) as "projectRecordStatus",
|
|
|
+ a.over_record_status as "overRecordStatus",
|
|
|
a.emergency_project AS "emergencyProject"
|
|
|
</sql>
|
|
|
|
|
@@ -1581,4 +1583,112 @@
|
|
|
project_master_id = #{projectMasterId}
|
|
|
WHERE id = #{id}
|
|
|
</update>
|
|
|
+
|
|
|
+ <select id="getProjectRecordListByAdventExamine" resultType="com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords" >
|
|
|
+ SELECT
|
|
|
+ <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"
|
|
|
+ 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
|
|
|
+ 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
|
|
|
+ LEFT JOIN work_project_user w1 on a.id = w1.project_id
|
|
|
+ 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 (a.record_state=6 or a.record_state is null)
|
|
|
+ and prd.status = 5
|
|
|
+ and now() > date_add(prd.audit_pass_date,interval #{startCount} day)
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getProjectRecordListByAdvent" resultType="com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords" >
|
|
|
+ SELECT
|
|
|
+ <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"
|
|
|
+ FROM rural_project_records a
|
|
|
+ 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 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
|
|
|
+ LEFT JOIN work_project_user w1 on a.id = w1.project_id
|
|
|
+ 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 (a.record_state=6 or a.record_state is null)
|
|
|
+ and prd.status = 5
|
|
|
+ and now() > date_add(prd.audit_pass_date,interval #{startCount} day)
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="getProjectNotrecordListExamine" resultType="com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords" >
|
|
|
+ SELECT
|
|
|
+ <include refid="projectRecordsColumns"/>
|
|
|
+ ,date_add(date_format(prd.audit_pass_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDate
|
|
|
+ ,a.project_type as "projectType"
|
|
|
+ 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
|
|
|
+ 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
|
|
|
+ LEFT JOIN work_project_user w1 on a.id = w1.project_id
|
|
|
+ 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 (a.record_state!=5 or a.record_state is null)
|
|
|
+ and prd.status = 5
|
|
|
+ and now() > date_add(prd.audit_pass_date,interval #{endingCount} day)
|
|
|
+ and prd.audit_pass_date is not null
|
|
|
+ and a.reported_state is null
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <select id="getProjectNotrecordList" resultType="com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords" >
|
|
|
+ SELECT
|
|
|
+ <include refid="projectRecordsColumns"/>
|
|
|
+ ,date_add(date_format(prd.audit_pass_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDate
|
|
|
+ ,a.project_type as "projectType"
|
|
|
+ FROM rural_project_records a
|
|
|
+ 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 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
|
|
|
+ LEFT JOIN work_project_user w1 on a.id = w1.project_id
|
|
|
+ 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 (a.record_state!=5 or a.record_state is null)
|
|
|
+ and prd.status = 5
|
|
|
+ and now() > date_add(prd.audit_pass_date,interval #{endingCount} day)
|
|
|
+ and prd.audit_pass_date is not null
|
|
|
+ and a.reported_state is null
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="updateProjectRecordState">
|
|
|
+ update rural_project_records set
|
|
|
+ record_state = '6',
|
|
|
+ over_record_status = 1
|
|
|
+ where id in
|
|
|
+ <foreach item="item" index="index" collection="idList"
|
|
|
+ open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach> ;
|
|
|
+ </update>
|
|
|
</mapper>
|