|
@@ -58,7 +58,7 @@
|
|
|
and T2.ORGCODE like concat(concat('%',#{model.orgCode}),'%')
|
|
|
</if>
|
|
|
<if test="model.eDate != null and '' != model.eDate">
|
|
|
- and EDATE = #{model.eDate}
|
|
|
+ and substr(data_Date,1,6) = replace(#{model.eDate},'-','')
|
|
|
</if>
|
|
|
</where>
|
|
|
union all
|
|
@@ -91,12 +91,12 @@
|
|
|
<if test="model.orgCode != null and '' != model.orgCode">
|
|
|
and T2.ORGCODE like concat(concat('%',#{model.orgCode}),'%')
|
|
|
</if>
|
|
|
- <if test="model.sDate != null and '' != model.sDate">
|
|
|
- <![CDATA[ and SDATE >= #{model.sDate} ]]>
|
|
|
+ <if test="model.sDate != null and '' != model.sDate and model.eDate != null and '' != model.eDate">
|
|
|
+ <![CDATA[ and substr(data_Date,1,6) between replace(#{model.sDate},'-','') and replace(#{model.eDate},'-','') ]]>
|
|
|
</if>
|
|
|
- <if test="model.eDate != null and '' != model.eDate">
|
|
|
- <![CDATA[ and EDATE <= #{model.eDate} ]]>
|
|
|
- </if>
|
|
|
+<!-- <if test="model.eDate != null and '' != model.eDate">-->
|
|
|
+<!-- <![CDATA[ and substr(data_Date) <= replace(#{model.eDate},'-','') ]]>-->
|
|
|
+<!-- </if>-->
|
|
|
</where>
|
|
|
group by T2.ORGCODE
|
|
|
)
|
|
@@ -177,6 +177,12 @@
|
|
|
<if test="model.orgCode != null and '' != model.orgCode">
|
|
|
MANAGE_ORGN_NO in (select underorg from sys_orgrelational where orgcode = #{model.orgCode})
|
|
|
</if>
|
|
|
+ <if test="model.sDate != null and '' != model.sDate and model.eDate != null and '' != model.eDate">
|
|
|
+ <![CDATA[ and substr(data_Date,1,6) between replace(#{model.sDate},'-','') and replace(#{model.eDate},'-','') ]]>
|
|
|
+ </if>
|
|
|
+<!-- <if test="model.eDate != null and '' != model.eDate">-->
|
|
|
+<!-- <![CDATA[ and substr(data_Date) <= replace(#{model.eDate},'-','') ]]>-->
|
|
|
+<!-- </if>-->
|
|
|
<!-- <if test="model.ruleName != null and '' != model.ruleName">-->
|
|
|
<!-- and RULE_NAME like concat(concat('%',#{model.ruleName}),'%')-->
|
|
|
<!-- </if>-->
|
|
@@ -239,7 +245,7 @@
|
|
|
and ORGCODE in (select underorg from sys_orgrelational where orgcode = #{model.orgCode})
|
|
|
</if>
|
|
|
<if test="model.eDate != null and '' != model.eDate">
|
|
|
- and EDATE = #{model.eDate}
|
|
|
+ and substr(data_date,1,6) = replace(#{model.eDate},'-','')
|
|
|
</if>
|
|
|
</where>
|
|
|
union all
|
|
@@ -270,12 +276,12 @@
|
|
|
<if test="model.orgCode != null and '' != model.orgCode">
|
|
|
and ORGCODE in (select underorg from sys_orgrelational where orgcode = #{model.orgCode})
|
|
|
</if>
|
|
|
- <if test="model.sDate != null and '' != model.sDate">
|
|
|
- <![CDATA[ and SDATE >= #{model.sDate} ]]>
|
|
|
- </if>
|
|
|
- <if test="model.eDate != null and '' != model.eDate">
|
|
|
- <![CDATA[ and EDATE <= #{model.eDate} ]]>
|
|
|
+ <if test="model.sDate != null and '' != model.sDate and model.eDate != null and '' != model.eDate">
|
|
|
+ <![CDATA[ and substr(data_Date,1,6) between replace(#{model.sDate},'-','') and replace(#{model.eDate},'-','') ]]>
|
|
|
</if>
|
|
|
+<!-- <if test="model.eDate != null and '' != model.eDate">-->
|
|
|
+<!-- <![CDATA[ and substr(data_Date) <= replace(#{model.eDate},'-','') ]]>-->
|
|
|
+<!-- </if>-->
|
|
|
</where>
|
|
|
group by ORGCODE
|
|
|
)
|