|
@@ -1514,13 +1514,19 @@
|
|
|
a.del_flag=0
|
|
|
and a.contract_state = 5
|
|
|
and a.office_id in(select id from sys_office where id = #{officeIdd} or parent_ids like concat('%',#{officeIdd},'%'))
|
|
|
- and a.accomplish_date >= #{beginDate}
|
|
|
- and a.accomplish_date <= #{endDate}
|
|
|
|
|
|
- <if test="contractRecordState != null and contractRecordState != ''">
|
|
|
- and a.contract_record_state = 5
|
|
|
- and a.over_due_status = 0
|
|
|
- </if>
|
|
|
+ <choose>
|
|
|
+ <when test="contractRecordState != null and contractRecordState != ''">
|
|
|
+ and a.contract_record_state = 5
|
|
|
+ and a.over_due_status = 0
|
|
|
+ and wcr.accomplish_date >= #{beginDate}
|
|
|
+ and wcr.accomplish_date <= #{endDate}
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and a.accomplish_date >= #{beginDate}
|
|
|
+ and a.accomplish_date <= #{endDate}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
|
|
|
and (a.alter_state is null or a.alter_state ="")
|
|
|
<if test="workContractInfo.id != null and workContractInfo.id != ''">
|
|
@@ -1601,13 +1607,19 @@
|
|
|
a.del_flag=0
|
|
|
and a.contract_state = 5
|
|
|
and a.office_id in(select id from sys_office where id = #{officeIdd} or parent_ids like concat('%',#{officeIdd},'%'))
|
|
|
- and a.accomplish_date >= #{beginDate}
|
|
|
- and a.accomplish_date <= #{endDate}
|
|
|
|
|
|
- <if test="contractRecordState != null and contractRecordState != ''">
|
|
|
- and a.contract_record_state = 5
|
|
|
- and a.over_due_status = 0
|
|
|
- </if>
|
|
|
+ <choose>
|
|
|
+ <when test="contractRecordState != null and contractRecordState != ''">
|
|
|
+ and a.contract_record_state = 5
|
|
|
+ and a.over_due_status = 0
|
|
|
+ and wcr.accomplish_date >= #{beginDate}
|
|
|
+ and wcr.accomplish_date <= #{endDate}
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and a.accomplish_date >= #{beginDate}
|
|
|
+ and a.accomplish_date <= #{endDate}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
|
|
|
and (a.alter_state is null or a.alter_state ="")
|
|
|
<if test="workContractInfo.id != null and workContractInfo.id != ''">
|
|
@@ -1758,13 +1770,13 @@
|
|
|
and a.over_due_status = 1
|
|
|
|
|
|
<if test="statementCompanyComprehensiveInfo.field3 != null and statementCompanyComprehensiveInfo.field3 != ''">
|
|
|
- and a.contract_record_state = 6
|
|
|
+ and a.contract_record_state != 7
|
|
|
</if>
|
|
|
|
|
|
<if test="statementCompanyComprehensiveInfo.field4 != null and statementCompanyComprehensiveInfo.field4 != ''">
|
|
|
and a.contract_record_state = 7
|
|
|
- and a.accomplish_date >= #{beginDate}
|
|
|
- and a.accomplish_date <= #{endDate}
|
|
|
+ and wcr.accomplish_date >= #{beginDate}
|
|
|
+ and wcr.accomplish_date <= #{endDate}
|
|
|
</if>
|
|
|
|
|
|
and (a.alter_state is null or a.alter_state ="")
|
|
@@ -1931,14 +1943,20 @@
|
|
|
a.del_flag=0
|
|
|
and a.contract_state = 5
|
|
|
and a.office_id in(select id from sys_office where id = #{officeIdd} or parent_ids like concat('%',#{officeIdd},'%'))
|
|
|
- and a.accomplish_date >= #{beginDate}
|
|
|
- and a.accomplish_date <= #{endDate}
|
|
|
and a.create_by = #{statementCompanyComprehensiveInfo.userId}
|
|
|
|
|
|
- <if test="contractRecordState != null and contractRecordState != ''">
|
|
|
- and a.contract_record_state = 5
|
|
|
- and a.over_due_status = 0
|
|
|
- </if>
|
|
|
+ <choose>
|
|
|
+ <when test="contractRecordState != null and contractRecordState != ''">
|
|
|
+ and a.contract_record_state = 5
|
|
|
+ and a.over_due_status = 0
|
|
|
+ and wcr.accomplish_date >= #{beginDate}
|
|
|
+ and wcr.accomplish_date <= #{endDate}
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and a.accomplish_date >= #{beginDate}
|
|
|
+ and a.accomplish_date <= #{endDate}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
|
|
|
and (a.alter_state is null or a.alter_state ="")
|
|
|
<if test="workContractInfo.id != null and workContractInfo.id != ''">
|
|
@@ -2019,14 +2037,20 @@
|
|
|
a.del_flag=0
|
|
|
and a.contract_state = 5
|
|
|
and a.office_id in(select id from sys_office where id = #{officeIdd} or parent_ids like concat('%',#{officeIdd},'%'))
|
|
|
- and a.accomplish_date >= #{beginDate}
|
|
|
- and a.accomplish_date <= #{endDate}
|
|
|
and a.create_by = #{statementCompanyComprehensiveInfo.userId}
|
|
|
|
|
|
- <if test="contractRecordState != null and contractRecordState != ''">
|
|
|
- and a.contract_record_state = 5
|
|
|
- and a.over_due_status = 0
|
|
|
- </if>
|
|
|
+ <choose>
|
|
|
+ <when test="contractRecordState != null and contractRecordState != ''">
|
|
|
+ and a.contract_record_state = 5
|
|
|
+ and a.over_due_status = 0
|
|
|
+ and wcr.accomplish_date >= #{beginDate}
|
|
|
+ and wcr.accomplish_date <= #{endDate}
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and a.accomplish_date >= #{beginDate}
|
|
|
+ and a.accomplish_date <= #{endDate}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
|
|
|
and (a.alter_state is null or a.alter_state ="")
|
|
|
<if test="workContractInfo.id != null and workContractInfo.id != ''">
|
|
@@ -2172,19 +2196,19 @@
|
|
|
and sodi.big_date_type = #{statementCompanyComprehensiveInfo.bigDateType}
|
|
|
and sodi.small_date_type = #{statementCompanyComprehensiveInfo.smallDateType}
|
|
|
and sodi.office_id = #{officeIdd}
|
|
|
+ and a.create_by = #{statementCompanyComprehensiveInfo.userId}
|
|
|
and a.contract_state = 5
|
|
|
and a.office_id in(select id from sys_office where id = #{officeIdd} or parent_ids like concat('%',#{officeIdd},'%'))
|
|
|
and a.over_due_status = 1
|
|
|
- and a.create_by = #{statementCompanyComprehensiveInfo.userId}
|
|
|
|
|
|
<if test="statementCompanyComprehensiveInfo.field3 != null and statementCompanyComprehensiveInfo.field3 != ''">
|
|
|
- and a.contract_record_state = 6
|
|
|
+ and a.contract_record_state != 7
|
|
|
</if>
|
|
|
|
|
|
<if test="statementCompanyComprehensiveInfo.field4 != null and statementCompanyComprehensiveInfo.field4 != ''">
|
|
|
and a.contract_record_state = 7
|
|
|
- and a.accomplish_date >= #{beginDate}
|
|
|
- and a.accomplish_date <= #{endDate}
|
|
|
+ and wcr.accomplish_date >= #{beginDate}
|
|
|
+ and wcr.accomplish_date <= #{endDate}
|
|
|
</if>
|
|
|
|
|
|
and (a.alter_state is null or a.alter_state ="")
|