From 8e39c9bbf8a8bb4707f2a766295b40497ae96706 Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期五, 01 九月 2023 13:46:54 +0800
Subject: [PATCH] MOM系统-9-01 生产订单 生产计划完成
---
standard-server/src/main/resources/mapper/DeviceMapper.xml | 50 +++++++++++++++++++++++++++++++++-----------------
1 files changed, 33 insertions(+), 17 deletions(-)
diff --git a/standard-server/src/main/resources/mapper/DeviceMapper.xml b/standard-server/src/main/resources/mapper/DeviceMapper.xml
index 461895f..f6cc9da 100644
--- a/standard-server/src/main/resources/mapper/DeviceMapper.xml
+++ b/standard-server/src/main/resources/mapper/DeviceMapper.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yuanchu.mom.mapper.DeviceMapper">
-
<select id="selectDeviceTables" resultType="map">
- SELECT d.`id`, d.`name`, d.`father`,t.`quota`
- FROM device d, technology t
+ SELECT d.`id`, d.`name`, d.`father`, t.`quota`
+ FROM device d,
+ technology t
WHERE d.`state` = 1
AND d.`id` = t.`device_id`
</select>
@@ -23,26 +23,28 @@
SELECT d.`id`, d.`name`, d.`father`
FROM device d
WHERE d.state = 1
- AND d.type = #{type}
- <if test="search_class !=null and search_class != ''">
- AND d.`name` like concat('%',#{search_class},'%')
- </if>
+ AND d.type = #{type}
+ <if test="search_class !=null and search_class != ''">
+ AND d.`name` like concat('%',#{search_class},'%')
+ </if>
</select>
<select id="DevicePageList" resultType="Map">
- SELECT d.id, d.`code`, d.`name`, u.`name` keeper, DATE_FORMAT(d.`end_measure`,'%Y-%m-%d') end_measure, d.`device_status`, d.`factory`, r.`name` inspectProject, i.`name` testSample, i.`user_name`
+ SELECT d.id, d.`code`, d.`name`, u.`name` keeper, DATE_FORMAT(d.`end_measure`,'%Y-%m-%d') end_measure,
+ d.`device_status`, d.`factory`, r.`name` inspectProject, i.`name` testSample, i.`user_name`
FROM (device d, `user` u)
- LEFT JOIN raw_ins_product r
- ON d.`id` = r.`device_id`
- LEFT JOIN raw_inspect i
- ON r.`raw_inspect_id` = i.`id`
+ LEFT JOIN raw_ins_product r
+ ON d.`id` = r.`device_id`
+ LEFT JOIN raw_inspect i
+ ON r.`raw_inspect_id` = i.`id`
WHERE r.`test_state` IS NULL
- AND d.`state` = 1
- AND (r.`state` = 1 OR r.`state` IS NULL)
- AND d.`keeper` = u.`id`
- AND d.type = #{type}
+ AND d.`state` = 1
+ AND (r.`state` = 1 OR r.`state` IS NULL)
+ AND d.`keeper` = u.`id`
+ AND d.type = #{type}
<if test="codeNameModel != null and codeNameModel != ''">
- AND (d.`name` LIKE CONCAT('%',#{codeNameModel},'%') OR d.`code` LIKE CONCAT('%',#{codeNameModel},'%') OR i.`specifications` LIKE CONCAT('%',#{codeNameModel},'%'))
+ AND (d.`name` LIKE CONCAT('%',#{codeNameModel},'%') OR d.`code` LIKE CONCAT('%',#{codeNameModel},'%') OR
+ i.`specifications` LIKE CONCAT('%',#{codeNameModel},'%'))
</if>
<if test="deviceStatue != null and deviceStatue != ''">
AND d.`device_status` = #{deviceStatue}
@@ -54,4 +56,18 @@
AND d.`father` = #{fatherName}
</if>
</select>
+
+ <select id="getDeviceNameByGroup" resultType="java.util.Map">
+ select id as deviceid, name deviceName
+ from mom_ocean.device
+ where state = 1
+ and father = #{deviceGroup}
+ and device_status in (1, 5)
+ </select>
+ <!--閫夋嫨璁惧缁�-->
+ <select id="chooseDevGroup" resultType="java.util.Map">
+ select distinct father
+ from mom_ocean.device
+ where state=1 and device_status in(1,5)
+ </select>
</mapper>
--
Gitblit v1.9.3