|
@@ -65,7 +65,8 @@
|
|
|
a.contract_information AS "contractInformation",
|
|
|
a.describe_content AS "describeContent",
|
|
|
a.contract_record_state AS "contractRecordState",
|
|
|
- a.over_due_status AS "overDueStatus"
|
|
|
+ a.over_due_status AS "overDueStatus",
|
|
|
+ a.letter_of_acceptance_remarks AS "letterOfAcceptanceRemarks"
|
|
|
</sql>
|
|
|
|
|
|
<sql id="workContractInfoJoins">
|
|
@@ -143,7 +144,8 @@
|
|
|
wcr.file_num_tow as "fileNumTow",
|
|
|
a.describe_content AS "describeContent",
|
|
|
a.contract_record_state AS "contractRecordState",
|
|
|
- a.over_due_status AS "overDueStatus"
|
|
|
+ a.over_due_status AS "overDueStatus",
|
|
|
+ a.letter_of_acceptance_remarks AS "letterOfAcceptanceRemarks"
|
|
|
FROM work_contract_info a
|
|
|
<include refid="workContractInfoJoins"/>
|
|
|
LEFT JOIN work_contract_record wcr ON wcr.contract_info_id = a.id
|
|
@@ -265,6 +267,7 @@
|
|
|
a.charge_criterion as "chargeCriterion",
|
|
|
a.other_details as "otherDetails",
|
|
|
a.contract_information AS "contractInformation",
|
|
|
+ a.letter_of_acceptance_remarks AS "letterOfAcceptanceRemarks",
|
|
|
(CASE a.contract_information
|
|
|
WHEN '0' THEN '金额合同'
|
|
|
WHEN '1' THEN '费率合同'
|
|
@@ -325,11 +328,27 @@
|
|
|
<if test="isTotal != null and isTotal != ''">
|
|
|
AND a.is_total = #{isTotal}
|
|
|
</if>
|
|
|
- <if test="letterOfAcceptanceFlag != null and letterOfAcceptanceFlag != '' and letterOfAcceptanceFlag == 1">
|
|
|
- AND wa.attachment_flag = 45
|
|
|
- </if>
|
|
|
- <if test="letterOfAcceptanceFlag != null and letterOfAcceptanceFlag != '' and letterOfAcceptanceFlag == 0">
|
|
|
- AND a.id NOT IN ( SELECT DISTINCT aa.id FROM work_contract_info aa LEFT JOIN work_attachment waa ON aa.id = waa.attachment_id where waa.attachment_flag = 45 )
|
|
|
+ <if test="letterOfAcceptanceFlag != null and letterOfAcceptanceFlag != ''">
|
|
|
+ <if test="letterOfAcceptanceFlag == 1">
|
|
|
+ AND wa.attachment_flag = 45
|
|
|
+ </if>
|
|
|
+ <if test="letterOfAcceptanceFlag == 0">
|
|
|
+ AND a.id NOT IN ( SELECT DISTINCT aa.id FROM work_contract_info aa LEFT JOIN work_attachment waa ON aa.id = waa.attachment_id where waa.attachment_flag = 45 )
|
|
|
+ </if>
|
|
|
+ <if test="letterOfAcceptanceFlag == 2">
|
|
|
+ AND wa.attachment_flag = 45 and (a.letter_of_acceptance_remarks is null or a.letter_of_acceptance_remarks = '')
|
|
|
+ </if>
|
|
|
+ <if test="letterOfAcceptanceFlag == 3">
|
|
|
+ AND wa.attachment_flag = 45 and a.letter_of_acceptance_remarks is not null and a.letter_of_acceptance_remarks != ''
|
|
|
+ </if>
|
|
|
+ <if test="letterOfAcceptanceFlag == 4">
|
|
|
+ AND a.id NOT IN ( SELECT DISTINCT aa.id FROM work_contract_info aa LEFT JOIN work_attachment waa ON aa.id = waa.attachment_id where waa.attachment_flag = 45 )
|
|
|
+ and (a.letter_of_acceptance_remarks is null or a.letter_of_acceptance_remarks = '')
|
|
|
+ </if>
|
|
|
+ <if test="letterOfAcceptanceFlag == 5">
|
|
|
+ AND a.id NOT IN ( SELECT DISTINCT aa.id FROM work_contract_info aa LEFT JOIN work_attachment waa ON aa.id = waa.attachment_id where waa.attachment_flag = 45 )
|
|
|
+ and a.letter_of_acceptance_remarks is not null and a.letter_of_acceptance_remarks != ''
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="contrractRecordStatus != null and contrractRecordStatus != ''">
|
|
|
<choose>
|
|
@@ -409,11 +428,27 @@
|
|
|
<if test="isTotal != null and isTotal != ''">
|
|
|
AND a.is_total = #{isTotal}
|
|
|
</if>
|
|
|
- <if test="letterOfAcceptanceFlag != null and letterOfAcceptanceFlag != '' and letterOfAcceptanceFlag == 1">
|
|
|
- AND wa.attachment_flag = 45
|
|
|
- </if>
|
|
|
- <if test="letterOfAcceptanceFlag != null and letterOfAcceptanceFlag != '' and letterOfAcceptanceFlag == 0">
|
|
|
- AND a.id NOT IN ( SELECT DISTINCT aa.id FROM work_contract_info aa LEFT JOIN work_attachment waa ON aa.id = waa.attachment_id where waa.attachment_flag = 45 )
|
|
|
+ <if test="letterOfAcceptanceFlag != null and letterOfAcceptanceFlag != ''">
|
|
|
+ <if test="letterOfAcceptanceFlag == 1">
|
|
|
+ AND wa.attachment_flag = 45
|
|
|
+ </if>
|
|
|
+ <if test="letterOfAcceptanceFlag == 0">
|
|
|
+ AND a.id NOT IN ( SELECT DISTINCT aa.id FROM work_contract_info aa LEFT JOIN work_attachment waa ON aa.id = waa.attachment_id where waa.attachment_flag = 45 )
|
|
|
+ </if>
|
|
|
+ <if test="letterOfAcceptanceFlag == 2">
|
|
|
+ AND wa.attachment_flag = 45 and (a.letter_of_acceptance_remarks is null or a.letter_of_acceptance_remarks = '')
|
|
|
+ </if>
|
|
|
+ <if test="letterOfAcceptanceFlag == 3">
|
|
|
+ AND wa.attachment_flag = 45 and a.letter_of_acceptance_remarks is not null and a.letter_of_acceptance_remarks != ''
|
|
|
+ </if>
|
|
|
+ <if test="letterOfAcceptanceFlag == 4">
|
|
|
+ AND a.id NOT IN ( SELECT DISTINCT aa.id FROM work_contract_info aa LEFT JOIN work_attachment waa ON aa.id = waa.attachment_id where waa.attachment_flag = 45 )
|
|
|
+ and (a.letter_of_acceptance_remarks is null or a.letter_of_acceptance_remarks = '')
|
|
|
+ </if>
|
|
|
+ <if test="letterOfAcceptanceFlag == 5">
|
|
|
+ AND a.id NOT IN ( SELECT DISTINCT aa.id FROM work_contract_info aa LEFT JOIN work_attachment waa ON aa.id = waa.attachment_id where waa.attachment_flag = 45 )
|
|
|
+ and a.letter_of_acceptance_remarks is not null and a.letter_of_acceptance_remarks != ''
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="contrractRecordStatus != null and contrractRecordStatus != ''">
|
|
|
<choose>
|
|
@@ -1083,6 +1118,9 @@
|
|
|
<if test="contractRecordState != null and contractRecordState!= ''">
|
|
|
,contract_record_state = #{contractRecordState}
|
|
|
</if>
|
|
|
+ <if test="letterOfAcceptanceRemarks != null and letterOfAcceptanceRemarks!= ''">
|
|
|
+ ,letter_of_acceptance_remarks = #{letterOfAcceptanceRemarks}
|
|
|
+ </if>
|
|
|
WHERE id = #{id}
|
|
|
</update>
|
|
|
|