|
@@ -72,7 +72,10 @@
|
|
a.quality_signature_upload_file_user as "qualitySignatureUploadFileUser.id",
|
|
a.quality_signature_upload_file_user as "qualitySignatureUploadFileUser.id",
|
|
a.quality_signature_upload_date as "qualitySignatureUploadDate",
|
|
a.quality_signature_upload_date as "qualitySignatureUploadDate",
|
|
a.belonging_department as "belongingDepartment",
|
|
a.belonging_department as "belongingDepartment",
|
|
- a.reviewer_person as "reviewerPerson"
|
|
|
|
|
|
+ a.reviewer_person as "reviewerPerson",
|
|
|
|
+ a.reviewer_person_id as "reviewerPersonId",
|
|
|
|
+ a.company_type as "companyType",
|
|
|
|
+ a.contracts_num as "contractsNum"
|
|
|
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
@@ -123,7 +126,10 @@
|
|
ifnull(a.record_state,0) as "projectRecordStatus",
|
|
ifnull(a.record_state,0) as "projectRecordStatus",
|
|
a.over_record_status as "overRecordStatus",
|
|
a.over_record_status as "overRecordStatus",
|
|
a.emergency_project as "emergencyProject",
|
|
a.emergency_project as "emergencyProject",
|
|
- a.reviewer_person as "reviewerPerson"
|
|
|
|
|
|
+ a.reviewer_person as "reviewerPerson",
|
|
|
|
+ a.reviewer_person_id as "reviewerPersonId",
|
|
|
|
+ a.company_type as "companyType",
|
|
|
|
+ a.contracts_num as "contractsNum"
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<sql id="projectRecordsJoins">
|
|
<sql id="projectRecordsJoins">
|
|
@@ -312,6 +318,7 @@
|
|
wci.name AS "workContractInfo.name",
|
|
wci.name AS "workContractInfo.name",
|
|
wci.contract_num as "workContractInfo.contractNum",
|
|
wci.contract_num as "workContractInfo.contractNum",
|
|
wci.contract_price as "workContractInfo.contractPrice",
|
|
wci.contract_price as "workContractInfo.contractPrice",
|
|
|
|
+ wci.clientName as "workContractInfo.clientName",
|
|
sub.name as "projectMasterName",
|
|
sub.name as "projectMasterName",
|
|
sob.name as "projectMasterOffice",
|
|
sob.name as "projectMasterOffice",
|
|
wct.id AS "workContractInfo.client.id",
|
|
wct.id AS "workContractInfo.client.id",
|
|
@@ -486,6 +493,9 @@
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|
|
<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} )
|
|
AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="companyType!=null and companyType!=''">
|
|
|
|
+ and a.company_type=#{companyType}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
GROUP BY a.id
|
|
GROUP BY a.id
|
|
<choose>
|
|
<choose>
|
|
@@ -520,6 +530,9 @@
|
|
LEFT JOIN sys_office o ON o.id = a.office_id
|
|
LEFT JOIN sys_office o ON o.id = a.office_id
|
|
LEFT JOIN project_flingbatch_relation pfp on pfp.project_id=a.id
|
|
LEFT JOIN project_flingbatch_relation pfp on pfp.project_id=a.id
|
|
<where>
|
|
<where>
|
|
|
|
+ <if test="projectType!=null and projectType!=''">
|
|
|
|
+ and a.project_type = #{projectType}
|
|
|
|
+ </if>
|
|
<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},'%')
|
|
</if>
|
|
</if>
|
|
@@ -574,8 +587,8 @@
|
|
<if test="endDate !=null">
|
|
<if test="endDate !=null">
|
|
AND a.create_date < #{endDate}
|
|
AND a.create_date < #{endDate}
|
|
</if>
|
|
</if>
|
|
- <if test="projectType !=null and projectType !=''">
|
|
|
|
- and project_type= #{projectType}
|
|
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
</if>
|
|
</if>
|
|
<if test="engineeringType !=null and engineeringType !=''">
|
|
<if test="engineeringType !=null and engineeringType !=''">
|
|
and a.engineering_type= #{engineeringType}
|
|
and a.engineering_type= #{engineeringType}
|
|
@@ -625,6 +638,7 @@
|
|
,
|
|
,
|
|
wci.name AS "workContractInfo.name",
|
|
wci.name AS "workContractInfo.name",
|
|
wci.contract_num AS "workContractInfo.contractNum",
|
|
wci.contract_num AS "workContractInfo.contractNum",
|
|
|
|
+ wci.clientName as "clientName",
|
|
wct.id AS "workContractInfo.client.id",
|
|
wct.id AS "workContractInfo.client.id",
|
|
wct.name AS "workContractInfo.client.name",
|
|
wct.name AS "workContractInfo.client.name",
|
|
o.top_company AS "office.name"
|
|
o.top_company AS "office.name"
|
|
@@ -661,6 +675,9 @@
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|
|
AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND (s.id = #{currentUser.company.id} or find_in_set( #{currentUser.company.id}, s.parent_ids ) ))${sqlMap.dsf} )
|
|
AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND (s.id = #{currentUser.company.id} or find_in_set( #{currentUser.company.id}, s.parent_ids ) ))${sqlMap.dsf} )
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
AND a.del_flag = #{DEL_FLAG_NORMAL}
|
|
AND a.del_flag = #{DEL_FLAG_NORMAL}
|
|
</where>
|
|
</where>
|
|
GROUP BY a.id
|
|
GROUP BY a.id
|
|
@@ -708,6 +725,9 @@
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|
|
AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND (s.id = #{currentUser.company.id} or find_in_set( #{currentUser.company.id}, s.parent_ids ) ))${sqlMap.dsf} )
|
|
AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND (s.id = #{currentUser.company.id} or find_in_set( #{currentUser.company.id}, s.parent_ids ) ))${sqlMap.dsf} )
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
AND a.del_flag = #{DEL_FLAG_NORMAL}
|
|
AND a.del_flag = #{DEL_FLAG_NORMAL}
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
@@ -718,7 +738,7 @@
|
|
FROM rural_project_records a
|
|
FROM rural_project_records a
|
|
<include refid="projectRecordsJoins"/>
|
|
<include refid="projectRecordsJoins"/>
|
|
<where>
|
|
<where>
|
|
- a.del_flag = #{DEL_FLAG_NORMAL}
|
|
|
|
|
|
+ a.del_flag = #{DEL_FLAG_NORMAL} and a.company_type= #{companyType}
|
|
</where>
|
|
</where>
|
|
<choose>
|
|
<choose>
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
@@ -784,7 +804,10 @@
|
|
emergency_project,
|
|
emergency_project,
|
|
reported_state,
|
|
reported_state,
|
|
belonging_department,
|
|
belonging_department,
|
|
- reviewer_person
|
|
|
|
|
|
+ reviewer_person,
|
|
|
|
+ reviewer_person_id,
|
|
|
|
+ company_type,
|
|
|
|
+ contracts_num
|
|
) VALUES (
|
|
) VALUES (
|
|
#{id},
|
|
#{id},
|
|
#{createBy.id},
|
|
#{createBy.id},
|
|
@@ -838,7 +861,10 @@
|
|
#{emergencyProject},
|
|
#{emergencyProject},
|
|
#{reportedState},
|
|
#{reportedState},
|
|
#{belongingDepartment},
|
|
#{belongingDepartment},
|
|
- #{reviewerPerson}
|
|
|
|
|
|
+ #{reviewerPerson},
|
|
|
|
+ #{reviewerPersonId},
|
|
|
|
+ #{companyType},
|
|
|
|
+ #{contractsNum}
|
|
)
|
|
)
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
@@ -892,8 +918,9 @@
|
|
project_properties =#{projectProperties},
|
|
project_properties =#{projectProperties},
|
|
submit_scale =#{submitScale},
|
|
submit_scale =#{submitScale},
|
|
emergency_project=#{emergencyProject},
|
|
emergency_project=#{emergencyProject},
|
|
- reviewer_person = #{reviewerPerson}
|
|
|
|
-
|
|
|
|
|
|
+ reviewer_person = #{reviewerPerson},
|
|
|
|
+ reviewer_person_id = #{reviewerPersonId},
|
|
|
|
+ contracts_num = #{contractsNum}
|
|
<choose>
|
|
<choose>
|
|
<when test="reportedState ==null or reportedState == ''">
|
|
<when test="reportedState ==null or reportedState == ''">
|
|
,reported_state = null
|
|
,reported_state = null
|
|
@@ -955,7 +982,9 @@
|
|
submit_scale = #{submitScale},
|
|
submit_scale = #{submitScale},
|
|
emergency_project = #{emergencyProject},
|
|
emergency_project = #{emergencyProject},
|
|
belonging_department = #{belongingDepartment},
|
|
belonging_department = #{belongingDepartment},
|
|
- reviewer_person = #{reviewerPerson}
|
|
|
|
|
|
+ reviewer_person = #{reviewerPerson},
|
|
|
|
+ reviewer_person_id = #{reviewerPersonId},
|
|
|
|
+ contracts_num = #{contractsNum}
|
|
<if test="engineeringType != null and engineeringType != ''">
|
|
<if test="engineeringType != null and engineeringType != ''">
|
|
,engineering_type =#{engineeringType}
|
|
,engineering_type =#{engineeringType}
|
|
</if>
|
|
</if>
|
|
@@ -1154,6 +1183,7 @@
|
|
,
|
|
,
|
|
wci.name AS "workContractInfo.name",
|
|
wci.name AS "workContractInfo.name",
|
|
wci.contract_num AS "workContractInfo.contractNum",
|
|
wci.contract_num AS "workContractInfo.contractNum",
|
|
|
|
+ wci.clientName as "workContractInfo.clientName",
|
|
wct.id AS "workContractInfo.client.id",
|
|
wct.id AS "workContractInfo.client.id",
|
|
wct.name AS "workContractInfo.client.name",
|
|
wct.name AS "workContractInfo.client.name",
|
|
o.name AS "office.name"
|
|
o.name AS "office.name"
|
|
@@ -1166,8 +1196,13 @@
|
|
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 s ON s.id = a.company_id
|
|
LEFT JOIN sys_office s ON s.id = a.company_id
|
|
LEFT JOIN sys_office o ON o.id = a.office_id
|
|
LEFT JOIN sys_office o ON o.id = a.office_id
|
|
- where a.status='5' and a.del_flag='0' and w.user_id=#{userId} and w.del_flag='0'
|
|
|
|
- and wci.del_flag='0' and (wci.completion_status!='5' or wci.completion_status is null)
|
|
|
|
|
|
+ <where>
|
|
|
|
+ a.status='5' and a.del_flag='0' and w.user_id=#{userId} and w.del_flag='0'
|
|
|
|
+ and wci.del_flag='0' and (wci.completion_status!='5' or wci.completion_status is null)
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
GROUP BY a.id
|
|
GROUP BY a.id
|
|
<choose>
|
|
<choose>
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
@@ -1265,6 +1300,9 @@
|
|
<if test="projectStatus !=null">
|
|
<if test="projectStatus !=null">
|
|
AND a.status = #{projectStatus}
|
|
AND a.status = #{projectStatus}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
<if test="beginDate !=null">
|
|
<if test="beginDate !=null">
|
|
AND a.create_date >= #{beginDate}
|
|
AND a.create_date >= #{beginDate}
|
|
</if>
|
|
</if>
|
|
@@ -1357,6 +1395,9 @@
|
|
<if test="beginDate !=null">
|
|
<if test="beginDate !=null">
|
|
AND a.create_date >= #{beginDate}
|
|
AND a.create_date >= #{beginDate}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
<if test="endDate !=null">
|
|
<if test="endDate !=null">
|
|
AND a.create_date < #{endDate}
|
|
AND a.create_date < #{endDate}
|
|
</if>
|
|
</if>
|
|
@@ -1412,6 +1453,9 @@
|
|
<if test="scaleUnit != null and scaleUnit != ''">
|
|
<if test="scaleUnit != null and scaleUnit != ''">
|
|
AND a.scale_unit = #{scaleUnit}
|
|
AND a.scale_unit = #{scaleUnit}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
<if test="scaleQuantity != null and scaleQuantity != ''">
|
|
<if test="scaleQuantity != null and scaleQuantity != ''">
|
|
AND a.scale_quantity = #{scaleQuantity}
|
|
AND a.scale_quantity = #{scaleQuantity}
|
|
</if>
|
|
</if>
|
|
@@ -1507,6 +1551,9 @@
|
|
<if test="projectSite != null and projectSite != ''">
|
|
<if test="projectSite != null and projectSite != ''">
|
|
AND a.project_site LIKE concat('%',#{projectSite},'%')
|
|
AND a.project_site LIKE concat('%',#{projectSite},'%')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
<if test="remarks != null and remarks != ''">
|
|
<if test="remarks != null and remarks != ''">
|
|
AND a.remarks LIKE concat('%',#{remarks},'%')
|
|
AND a.remarks LIKE concat('%',#{remarks},'%')
|
|
</if>
|
|
</if>
|
|
@@ -1568,6 +1615,9 @@
|
|
and (a.reported_state=6 or a.reported_state is null)
|
|
and (a.reported_state=6 or a.reported_state is null)
|
|
and prd.status = 5
|
|
and prd.status = 5
|
|
and now() > date_add(prd.audit_pass_date,interval #{startCount} day)
|
|
and now() > date_add(prd.audit_pass_date,interval #{startCount} day)
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -1593,6 +1643,9 @@
|
|
and (a.reported_state=6 or a.reported_state is null)
|
|
and (a.reported_state=6 or a.reported_state is null)
|
|
and prd.status = 5
|
|
and prd.status = 5
|
|
and now() > date_add(prd.audit_pass_date,interval #{startCount} day)
|
|
and now() > date_add(prd.audit_pass_date,interval #{startCount} day)
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -1619,6 +1672,9 @@
|
|
and now() > date_add(prd.audit_pass_date,interval #{endingCount} day)
|
|
and now() > date_add(prd.audit_pass_date,interval #{endingCount} day)
|
|
and prd.audit_pass_date is not null
|
|
and prd.audit_pass_date is not null
|
|
and a.reported_state is null
|
|
and a.reported_state is null
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -1645,6 +1701,9 @@
|
|
and now() > date_add(prd.audit_pass_date,interval #{endingCount} day)
|
|
and now() > date_add(prd.audit_pass_date,interval #{endingCount} day)
|
|
and prd.audit_pass_date is not null
|
|
and prd.audit_pass_date is not null
|
|
and a.reported_state is null
|
|
and a.reported_state is null
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -1668,6 +1727,7 @@
|
|
,(case when a.submit_money = '1' then 'B级' when a.submit_money = '2' then 'A级' else '' end) as submitMoneyStr
|
|
,(case when a.submit_money = '1' then 'B级' when a.submit_money = '2' then 'A级' else '' end) as submitMoneyStr
|
|
,
|
|
,
|
|
wci.name AS "workContractInfo.name",
|
|
wci.name AS "workContractInfo.name",
|
|
|
|
+ wci.clientName as "workContractInfo.clientName",
|
|
prd.number AS "projectReportNumber",
|
|
prd.number AS "projectReportNumber",
|
|
wct.id AS "workContractInfo.client.id",
|
|
wct.id AS "workContractInfo.client.id",
|
|
wct.name AS "workContractInfo.client.name",
|
|
wct.name AS "workContractInfo.client.name",
|
|
@@ -1718,6 +1778,9 @@
|
|
<if test="area != null and area.id != null and area.id != ''">
|
|
<if test="area != null and area.id != null and area.id != ''">
|
|
AND a.area_id = #{area.id}
|
|
AND a.area_id = #{area.id}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
|
|
<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
|
|
AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
|
|
AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
|
|
</if>
|
|
</if>
|
|
@@ -1808,6 +1871,9 @@
|
|
<if test="projectSite != null and projectSite != ''">
|
|
<if test="projectSite != null and projectSite != ''">
|
|
AND a.project_site LIKE concat('%',#{projectSite},'%')
|
|
AND a.project_site LIKE concat('%',#{projectSite},'%')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
<if test="remarks != null and remarks != ''">
|
|
<if test="remarks != null and remarks != ''">
|
|
AND a.remarks LIKE concat('%',#{remarks},'%')
|
|
AND a.remarks LIKE concat('%',#{remarks},'%')
|
|
</if>
|
|
</if>
|
|
@@ -1886,6 +1952,9 @@
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|
|
<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} )
|
|
AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id})${sqlMap.dsf} )
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
<select id="projectFindList" resultType="com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords">
|
|
<select id="projectFindList" resultType="com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords">
|
|
@@ -1922,6 +1991,9 @@
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|
|
<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} )
|
|
AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id})${sqlMap.dsf} )
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
<choose>
|
|
<choose>
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
@@ -1965,6 +2037,9 @@
|
|
and (a.record_state=6 or a.record_state is null)
|
|
and (a.record_state=6 or a.record_state is null)
|
|
and prd.status = 5
|
|
and prd.status = 5
|
|
and now() > date_add(prd.audit_pass_date,interval #{startCount} day)
|
|
and now() > date_add(prd.audit_pass_date,interval #{startCount} day)
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -1989,6 +2064,9 @@
|
|
and (a.record_state=6 or a.record_state is null)
|
|
and (a.record_state=6 or a.record_state is null)
|
|
and prd.status = 5
|
|
and prd.status = 5
|
|
and now() > date_add(prd.audit_pass_date,interval #{startCount} day)
|
|
and now() > date_add(prd.audit_pass_date,interval #{startCount} day)
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -2015,6 +2093,9 @@
|
|
and now() > date_add(prd.audit_pass_date,interval #{endingCount} day)
|
|
and now() > date_add(prd.audit_pass_date,interval #{endingCount} day)
|
|
and prd.audit_pass_date is not null
|
|
and prd.audit_pass_date is not null
|
|
and a.record_state is null
|
|
and a.record_state is null
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -2042,6 +2123,9 @@
|
|
and now() > date_add(prd.audit_pass_date,interval #{endingCount} day)
|
|
and now() > date_add(prd.audit_pass_date,interval #{endingCount} day)
|
|
and prd.audit_pass_date is not null
|
|
and prd.audit_pass_date is not null
|
|
and a.record_state is null
|
|
and a.record_state is null
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -2083,7 +2167,12 @@
|
|
select
|
|
select
|
|
count(a.id)
|
|
count(a.id)
|
|
FROM rural_project_records a
|
|
FROM rural_project_records a
|
|
- where a.project_name=#{projectName} and a.`status`!=7
|
|
|
|
|
|
+ <where>
|
|
|
|
+ a.project_name=#{projectName} and a.`status`!=7
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<update id="updateReportDataTwo">
|
|
<update id="updateReportDataTwo">
|
|
@@ -2159,6 +2248,9 @@
|
|
and a.report_signature_url_flag = 0
|
|
and a.report_signature_url_flag = 0
|
|
and (a.report_signature_url is null or a.report_signature_url = '')
|
|
and (a.report_signature_url is null or a.report_signature_url = '')
|
|
and (a.report_signature_contract_id is not null or a.report_signature_contract_id != '')
|
|
and (a.report_signature_contract_id is not null or a.report_signature_contract_id != '')
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
order by prd.number asc
|
|
order by prd.number asc
|
|
limit #{count}
|
|
limit #{count}
|
|
@@ -2175,6 +2267,9 @@
|
|
and a.report_signature_url_flag = 0
|
|
and a.report_signature_url_flag = 0
|
|
and (a.report_signature_url is null or a.report_signature_url = '')
|
|
and (a.report_signature_url is null or a.report_signature_url = '')
|
|
and (a.report_signature_contract_id is not null or a.report_signature_contract_id != '')
|
|
and (a.report_signature_contract_id is not null or a.report_signature_contract_id != '')
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -2194,6 +2289,7 @@
|
|
wci.name AS "workContractInfo.name",
|
|
wci.name AS "workContractInfo.name",
|
|
wci.contract_num as "workContractInfo.contractNum",
|
|
wci.contract_num as "workContractInfo.contractNum",
|
|
wci.contract_price as "workContractInfo.contractPrice",
|
|
wci.contract_price as "workContractInfo.contractPrice",
|
|
|
|
+ wci.clientName as "workContractInfo.clientName",
|
|
sub.name as "projectMasterName",
|
|
sub.name as "projectMasterName",
|
|
sob.name as "projectMasterOffice",
|
|
sob.name as "projectMasterOffice",
|
|
wct.id AS "workContractInfo.client.id",
|
|
wct.id AS "workContractInfo.client.id",
|
|
@@ -2296,7 +2392,9 @@
|
|
and rprr.accomplish_date >= #{beginDate}
|
|
and rprr.accomplish_date >= #{beginDate}
|
|
and rprr.accomplish_date <= #{endDate}
|
|
and rprr.accomplish_date <= #{endDate}
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
|
|
|
|
<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
|
|
<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
|
|
AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
|
|
AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
|
|
@@ -2457,7 +2555,9 @@
|
|
and rprr.accomplish_date >= #{beginDate}
|
|
and rprr.accomplish_date >= #{beginDate}
|
|
and rprr.accomplish_date <= #{endDate}
|
|
and rprr.accomplish_date <= #{endDate}
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
|
|
|
|
<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
|
|
<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
|
|
AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
|
|
AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
|
|
@@ -2699,7 +2799,9 @@
|
|
and rprr.accomplish_date >= #{beginDate}
|
|
and rprr.accomplish_date >= #{beginDate}
|
|
and rprr.accomplish_date <= #{endDate}
|
|
and rprr.accomplish_date <= #{endDate}
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
|
|
<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
|
|
AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
|
|
AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
|
|
</if>
|
|
</if>
|
|
@@ -2951,7 +3053,9 @@
|
|
and rprr.accomplish_date >= #{beginDate}
|
|
and rprr.accomplish_date >= #{beginDate}
|
|
and rprr.accomplish_date <= #{endDate}
|
|
and rprr.accomplish_date <= #{endDate}
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
|
|
|
|
<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
|
|
<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
|
|
AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
|
|
AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
|
|
@@ -3114,7 +3218,9 @@
|
|
and rprr.accomplish_date <= #{endDate}
|
|
and rprr.accomplish_date <= #{endDate}
|
|
</if>
|
|
</if>
|
|
|
|
|
|
-
|
|
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
|
|
<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
|
|
AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
|
|
AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
|
|
</if>
|
|
</if>
|
|
@@ -3227,6 +3333,7 @@
|
|
wci.name AS "workContractInfo.name",
|
|
wci.name AS "workContractInfo.name",
|
|
wci.contract_num as "workContractInfo.contractNum",
|
|
wci.contract_num as "workContractInfo.contractNum",
|
|
wci.contract_price as "workContractInfo.contractPrice",
|
|
wci.contract_price as "workContractInfo.contractPrice",
|
|
|
|
+ wci.clientName as "workContractInfo.clientName",
|
|
sub.name as "projectMasterName",
|
|
sub.name as "projectMasterName",
|
|
sob.name as "projectMasterOffice",
|
|
sob.name as "projectMasterOffice",
|
|
wct.id AS "workContractInfo.client.id",
|
|
wct.id AS "workContractInfo.client.id",
|
|
@@ -3353,7 +3460,9 @@
|
|
and rprr.accomplish_date >= #{beginDate}
|
|
and rprr.accomplish_date >= #{beginDate}
|
|
and rprr.accomplish_date <= #{endDate}
|
|
and rprr.accomplish_date <= #{endDate}
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
|
|
<if test="ruralProjectRecords.projectId != null and ruralProjectRecords.projectId != ''">
|
|
AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
|
|
AND a.project_id like concat('%',#{ruralProjectRecords.projectId},'%')
|
|
</if>
|
|
</if>
|
|
@@ -3498,6 +3607,7 @@
|
|
,a.submit_money as "submitMoney"
|
|
,a.submit_money as "submitMoney"
|
|
,a.project_type as projectType,
|
|
,a.project_type as projectType,
|
|
wci.name AS "workContractInfo.name",
|
|
wci.name AS "workContractInfo.name",
|
|
|
|
+ wci.clientName as "workContractInfo.clientName",
|
|
wct.id AS "workContractInfo.client.id",
|
|
wct.id AS "workContractInfo.client.id",
|
|
wct.name AS "workContractInfo.client.name",
|
|
wct.name AS "workContractInfo.client.name",
|
|
o.top_company AS "office.name",
|
|
o.top_company AS "office.name",
|
|
@@ -3567,6 +3677,9 @@
|
|
<if test="#{id} != null and #{id} != ''">
|
|
<if test="#{id} != null and #{id} != ''">
|
|
cb.project_id = #{id}
|
|
cb.project_id = #{id}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="companyType !=null and companyType !=''">
|
|
|
|
+ and a.company_type= #{companyType}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|