gdg
2021-01-29 d7427ab305dc17af447f5832903691eee329850c
src/main/java/com/nanometer/smartlab/dao/HazardousWasteMapper.xml
@@ -226,17 +226,37 @@
      updatetime = #{updatetime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <select id="setAllWasters" resultMap="BaseResultMap">
  <select id="setAllWasterCount" resultType="com.nanometer.smartlab.entity.HazardousWaste">
    select
    sum(acid) as acid,sum(alkali) as alkali, sum(organic) as organic,sum(solid) as solid,sum(medical) as medical
    from sys_hazardous_waste
    <where>
      1 = 1
      <if test="starttime != null and starttime != ''">
        and create_time &gt;= #{starttime}
      </if>
      <if test="endtime != null and endtime != ''">
        and create_time &lt;= #{endtime}
      </if>
      <if test="status != null and status != ''">
        and status = #{status}
      </if>
      <if test="applyPerson != null and applyPerson != ''">
        and apply_person = #{applyPerson}
      </if>
    </where>
  </select>
    <select id="setAllWasters" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from sys_hazardous_waste
    <where>
      1 = 1
      <if test="starttime != null and starttime != ''">
        and create_time &gt; #{starttime}
        and create_time &gt;= #{starttime}
      </if>
      <if test="endtime != null and endtime != ''">
        and create_time &lt; #{endtime}
        and create_time &lt;= #{endtime}
      </if>
      <if test="status != null and status != ''">
        and status = #{status}
@@ -255,10 +275,10 @@
    <where>
      1 = 1
      <if test="startTime != null and startTime != ''">
        and create_time &gt; #{startTime}
        and create_time &gt;= #{startTime}
      </if>
      <if test="endTime != null and endTime != ''">
        and create_time &lt; #{endTime}
        and create_time &lt;= #{endTime}
      </if>
      <if test="status != null and status != ''">
        and status = #{status}
@@ -289,10 +309,10 @@
    <where>
      1 = 1
      <if test="startTime != null and startTime != ''">
        and create_time &gt; #{startTime}
        and create_time &gt;= #{startTime}
      </if>
      <if test="endTime != null and endTime != ''">
        and create_time &lt; #{endTime}
        and create_time &lt;= #{endTime}
      </if>
      <if test="status != null and status != ''">
        and status = #{status}
@@ -319,10 +339,10 @@
    <where>
      1 = 1
      <if test="startTime != null and startTime != ''">
        and create_time &gt; #{startTime}
        and create_time &gt;= #{startTime}
      </if>
      <if test="endTime != null and endTime != ''">
        and create_time &lt; #{endTime}
        and create_time &lt;= #{endTime}
      </if>
      <if test="status != null and status != ''">
        and status = #{status}
@@ -348,10 +368,10 @@
    <where>
      1 = 1
      <if test="startTime != null and startTime != ''">
        and create_time &gt; #{startTime}
        and create_time &gt;= #{startTime}
      </if>
      <if test="endTime != null and endTime != ''">
        and create_time &lt; #{endTime}
        and create_time &lt;= #{endTime}
      </if>
      <if test="status != null and status != ''">
        and status = #{status}
@@ -376,10 +396,10 @@
    <where>
      1 = 1
      <if test="startTime != null and startTime != ''">
        and create_time &gt; #{startTime}
        and create_time &gt;= #{startTime}
      </if>
      <if test="endTime != null and endTime != ''">
        and create_time &lt; #{endTime}
        and create_time &lt;= #{endTime}
      </if>
      <if test="status != null and status != ''">
        and status = #{status}
@@ -408,10 +428,10 @@
    <where>
      1 = 1
      <if test="startTime != null and startTime != ''">
        and create_time &gt; #{startTime}
        and create_time &gt;= #{startTime}
      </if>
      <if test="endTime != null and endTime != ''">
        and create_time &lt; #{endTime}
        and create_time &lt;= #{endTime}
      </if>
      <if test="status != null and status != ''">
        and status = #{status}