cpT
2025-06-19 c1ef2d1fc4c0dae2bc8452924dcd77a0ff3a1ef5
src/main/resources/mapper/ViewInOutMapper.xml
@@ -6,16 +6,16 @@
<!-- mapper不支持sql语句嵌套时,采用sql片段包含方式,解决xml标签问题 -->
<sql id="viewInOutConditionSql">   
      <if test="source_sta_no!=null and source_sta_no!='' ">
         and source_sta_no like '%' + #{source_sta_no} + '%'
         and "source_sta_no" like '%' + #{source_sta_no} + '%'
      </if>
      <if test="begin_date!=null and begin_date!='' ">
         <![CDATA[
         and ymd >= #{begin_date}
         and "ymd" >= #{begin_date}
         ]]>         
      </if>   
      <if test="end_date!=null and end_date!='' ">
         <![CDATA[
         and ymd <= #{end_date}
         and "ymd" <= #{end_date}
         ]]>         
      </if>
</sql>
@@ -23,8 +23,8 @@
<!-- 分页查询所有信息 -->
<select id="queryViewInOutList" parameterType="com.zy.asrs.entity.ViewInOutBean" resultType="com.zy.asrs.entity.ViewInOutBean">
select * from ( 
select *,ROW_NUMBER() OVER(Order by ymd desc) as rowid
 from asr_sta_inout_view
select *,ROW_NUMBER() OVER(Order by "ymd" desc) as rowid
 from "SOURCE"."asr_sta_inout_view"
<where>
   1=1
    <include refid="viewInOutConditionSql"></include>
@@ -39,7 +39,7 @@
</select>
<select id="getViewInOutCount" parameterType="com.zy.asrs.entity.ViewInOutBean"   resultType="Integer">
select count(1) from asr_sta_inout_view a
select count(1) from "SOURCE"."asr_sta_inout_view" a
<where>
<![CDATA[
   1=1
@@ -50,33 +50,33 @@
<!-- 不分页查询所有信息,用于excel导出 -->
<select id="getViewInOutAll" parameterType="com.zy.asrs.entity.ViewInOutBean" resultType="com.zy.asrs.entity.ViewInOutBean">
select * from asr_sta_inout_view a
select * from "SOURCE"."asr_sta_inout_view" a
<where>
   <![CDATA[
       1=1
    ]]>
   <include refid="viewInOutConditionSql"></include>
   <![CDATA[
      order by ymd desc
      order by "ymd" desc
   ]]>
</where>
</select>
    <select id="selectWorkCountInSum" resultType="java.lang.Integer">
      SELECT SUM(anfme) FROM asr_wrkin_count_view WHERE 1=1 AND
      (oneday > #{start}
      SELECT SUM(anfme) FROM"SOURCE". "asr_wrkin_count_view" WHERE 1=1 AND
      ("oneday" > #{start}
      AND
      oneday &lt; #{end})
      "oneday" &lt; #{end})
      <if test="matnr != null and matnr !=''">
         and matnr = #{matnr}
         and "matnr" = #{matnr}
      </if>
   </select>
   <select id="selectWorkCountOutSum" resultType="java.lang.Integer">
      SELECT SUM(anfme) FROM asr_wrkout_count_view WHERE 1=1 AND
      (oneday > #{start}
      SELECT SUM("anfme") FROM "SOURCE"."asr_wrkout_count_view" WHERE 1=1 AND
      ("oneday" > #{start}
      AND
      oneday &lt; #{end})
      "oneday" &lt; #{end})
      <if test="matnr != null and matnr !=''">
         and matnr = #{matnr}
         and "matnr" = #{matnr}
      </if>
   </select>