From 4c521b8f1fcc538f59cc0001dcf6649b0dee4880 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 17 八月 2023 17:05:25 +0800
Subject: [PATCH] 生产订单

---
 inspect-server/src/main/resources/mapper/RawInspectMapper.xml |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/inspect-server/src/main/resources/mapper/RawInspectMapper.xml b/inspect-server/src/main/resources/mapper/RawInspectMapper.xml
index f8bfd64..a5b294b 100644
--- a/inspect-server/src/main/resources/mapper/RawInspectMapper.xml
+++ b/inspect-server/src/main/resources/mapper/RawInspectMapper.xml
@@ -3,7 +3,6 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yuanchu.mom.mapper.RawInspectMapper">
-
     <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.RawInspect">
         <id property="id" column="id" jdbcType="INTEGER"/>
         <result property="code" column="code" jdbcType="VARCHAR"/>
@@ -21,8 +20,9 @@
         <result property="formTime" column="form_time" jdbcType="DATE"/>
     </resultMap>
     <select id="selectRawInspectsByLimit" resultType="com.yuanchu.mom.pojo.RawInspect">
-        select id, code, name, specifications, unit, number, ins_state, judge_state, ins_time, user_name, create_time, form_time
-        from raw_inspect
+        select id, code, name, specifications, unit, number, ins_state, judge_state, ins_time, user_name, create_time,
+        form_time
+        from mom_ocean.raw_inspect
         where state = 1
         <if test="formTime!=null and formTime!=''">
             and form_time = #{formTime}
@@ -36,6 +36,31 @@
         <if test="judgeState!=2">
             and judge_state = #{judgeState}
         </if>
+        order by id desc
         limit #{pageSize},#{countSize}
     </select>
+    <select id="selCountRaw" resultType="java.lang.Integer">
+        select count(id)
+        from mom_ocean.raw_inspect
+        where state=1
+        and ins_state=1
+        and judge_state=#{judgeState}
+        <if test="begin != null and begin!=''">
+            and raw_inspect.create_time &gt;= #{begin}
+        </if>
+        <if test="end != null and end!=''">
+            and raw_inspect.create_time &lt;= #{end}
+        </if>
+    </select>
+    <select id="seAllCount" resultType="java.lang.Long">
+        select count(id)
+        from mom_ocean.raw_inspect
+        where state=1
+        <if test="begin != null and begin!=''">
+            and raw_inspect.create_time &gt;= #{begin}
+        </if>
+        <if test="end != null and end!=''">
+            and raw_inspect.create_time &lt;= #{end}
+        </if>
+    </select>
 </mapper>

--
Gitblit v1.9.3