From 12862728f6123b2a9a927f6bad97317bc651d8c2 Mon Sep 17 00:00:00 2001
From: 李宇 <986321569@qq.com>
Date: 星期五, 23 四月 2021 15:43:39 +0800
Subject: [PATCH] 修改领用
---
src/main/java/com/nanometer/smartlab/dao/HazardousWasteMapper.xml | 50 +++++++++++++++++++++++++++++++++++---------------
1 files changed, 35 insertions(+), 15 deletions(-)
diff --git a/src/main/java/com/nanometer/smartlab/dao/HazardousWasteMapper.xml b/src/main/java/com/nanometer/smartlab/dao/HazardousWasteMapper.xml
index b6b49f4..1d5b686 100644
--- a/src/main/java/com/nanometer/smartlab/dao/HazardousWasteMapper.xml
+++ b/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 >= #{starttime}
+ </if>
+ <if test="endtime != null and endtime != ''">
+ and create_time <= #{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 > #{starttime}
+ and create_time >= #{starttime}
</if>
<if test="endtime != null and endtime != ''">
- and create_time < #{endtime}
+ and create_time <= #{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 > #{startTime}
+ and create_time >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
- and create_time < #{endTime}
+ and create_time <= #{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 > #{startTime}
+ and create_time >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
- and create_time < #{endTime}
+ and create_time <= #{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 > #{startTime}
+ and create_time >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
- and create_time < #{endTime}
+ and create_time <= #{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 > #{startTime}
+ and create_time >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
- and create_time < #{endTime}
+ and create_time <= #{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 > #{startTime}
+ and create_time >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
- and create_time < #{endTime}
+ and create_time <= #{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 > #{startTime}
+ and create_time >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
- and create_time < #{endTime}
+ and create_time <= #{endTime}
</if>
<if test="status != null and status != ''">
and status = #{status}
--
Gitblit v1.9.2