gaodd 5 年 前
コミット
a2a4e3702b
共有77 個のファイルを変更した22400 個の追加0 個の削除を含む
  1. 168 0
      bin/pom.xml
  2. 258 0
      bin/src/main/java/com/chinaitop/depot/device/mapper/BasicEquipmentEquipmentPoolMapper.xml
  3. 281 0
      bin/src/main/java/com/chinaitop/depot/device/mapper/StorageDevicebackMapper.xml
  4. 370 0
      bin/src/main/java/com/chinaitop/depot/device/mapper/StorageDevicecheckMapper.xml
  5. 399 0
      bin/src/main/java/com/chinaitop/depot/device/mapper/StorageDevicegetMapper.xml
  6. 733 0
      bin/src/main/java/com/chinaitop/depot/device/mapper/StorageDeviceinputMapper.xml
  7. 310 0
      bin/src/main/java/com/chinaitop/depot/device/mapper/StorageDevicekeepMapper.xml
  8. 338 0
      bin/src/main/java/com/chinaitop/depot/device/mapper/StorageDevicerepairMapper.xml
  9. 465 0
      bin/src/main/java/com/chinaitop/depot/device/mapper/SystemLogMapper.xml
  10. 48 0
      bin/src/main/resources/bootstrap.yml
  11. 204 0
      src/main/java/com/chinaitop/depot/device/controller/BasicEquipmentEquipmentPoolController.java
  12. 204 0
      src/main/java/com/chinaitop/depot/device/controller/StorageDeviceCheckController.java
  13. 416 0
      src/main/java/com/chinaitop/depot/device/controller/StorageDeviceGetController.java
  14. 272 0
      src/main/java/com/chinaitop/depot/device/controller/StorageDeviceInputController.java
  15. 248 0
      src/main/java/com/chinaitop/depot/device/controller/StorageDeviceKeepController.java
  16. 85 0
      src/main/java/com/chinaitop/depot/device/controller/StorageDeviceOutController.java
  17. 266 0
      src/main/java/com/chinaitop/depot/device/controller/StorageDeviceRepairController.java
  18. 30 0
      src/main/java/com/chinaitop/depot/device/mapper/BasicEquipmentEquipmentPoolMapper.java
  19. 258 0
      src/main/java/com/chinaitop/depot/device/mapper/BasicEquipmentEquipmentPoolMapper.xml
  20. 32 0
      src/main/java/com/chinaitop/depot/device/mapper/StorageDevicebackMapper.java
  21. 281 0
      src/main/java/com/chinaitop/depot/device/mapper/StorageDevicebackMapper.xml
  22. 38 0
      src/main/java/com/chinaitop/depot/device/mapper/StorageDevicecheckMapper.java
  23. 370 0
      src/main/java/com/chinaitop/depot/device/mapper/StorageDevicecheckMapper.xml
  24. 36 0
      src/main/java/com/chinaitop/depot/device/mapper/StorageDevicegetMapper.java
  25. 399 0
      src/main/java/com/chinaitop/depot/device/mapper/StorageDevicegetMapper.xml
  26. 86 0
      src/main/java/com/chinaitop/depot/device/mapper/StorageDeviceinputMapper.java
  27. 733 0
      src/main/java/com/chinaitop/depot/device/mapper/StorageDeviceinputMapper.xml
  28. 32 0
      src/main/java/com/chinaitop/depot/device/mapper/StorageDevicekeepMapper.java
  29. 310 0
      src/main/java/com/chinaitop/depot/device/mapper/StorageDevicekeepMapper.xml
  30. 30 0
      src/main/java/com/chinaitop/depot/device/mapper/StorageDevicerepairMapper.java
  31. 338 0
      src/main/java/com/chinaitop/depot/device/mapper/StorageDevicerepairMapper.xml
  32. 31 0
      src/main/java/com/chinaitop/depot/device/mapper/SystemLogMapper.java
  33. 465 0
      src/main/java/com/chinaitop/depot/device/mapper/SystemLogMapper.xml
  34. 149 0
      src/main/java/com/chinaitop/depot/device/model/BasicEquipmentEquipmentPool.java
  35. 739 0
      src/main/java/com/chinaitop/depot/device/model/BasicEquipmentEquipmentPoolExample.java
  36. 62 0
      src/main/java/com/chinaitop/depot/device/model/ContentBean.java
  37. 18 0
      src/main/java/com/chinaitop/depot/device/model/HouseNameBean.java
  38. 25 0
      src/main/java/com/chinaitop/depot/device/model/HouseTypeBean.java
  39. 32 0
      src/main/java/com/chinaitop/depot/device/model/ShelfContentBean.java
  40. 167 0
      src/main/java/com/chinaitop/depot/device/model/StorageDeviceback.java
  41. 826 0
      src/main/java/com/chinaitop/depot/device/model/StorageDevicebackExample.java
  42. 250 0
      src/main/java/com/chinaitop/depot/device/model/StorageDevicecheck.java
  43. 1069 0
      src/main/java/com/chinaitop/depot/device/model/StorageDevicecheckExample.java
  44. 306 0
      src/main/java/com/chinaitop/depot/device/model/StorageDeviceget.java
  45. 1249 0
      src/main/java/com/chinaitop/depot/device/model/StorageDevicegetExample.java
  46. 458 0
      src/main/java/com/chinaitop/depot/device/model/StorageDeviceinput.java
  47. 1719 0
      src/main/java/com/chinaitop/depot/device/model/StorageDeviceinputExample.java
  48. 237 0
      src/main/java/com/chinaitop/depot/device/model/StorageDevicekeep.java
  49. 929 0
      src/main/java/com/chinaitop/depot/device/model/StorageDevicekeepExample.java
  50. 264 0
      src/main/java/com/chinaitop/depot/device/model/StorageDevicerepair.java
  51. 1059 0
      src/main/java/com/chinaitop/depot/device/model/StorageDevicerepairExample.java
  52. 383 0
      src/main/java/com/chinaitop/depot/device/model/SystemLog.java
  53. 1619 0
      src/main/java/com/chinaitop/depot/device/model/SystemLogExample.java
  54. 56 0
      src/main/java/com/chinaitop/depot/device/service/BasicEquipmentEquipmentPoolService.java
  55. 22 0
      src/main/java/com/chinaitop/depot/device/service/StorageDeviceBackService.java
  56. 48 0
      src/main/java/com/chinaitop/depot/device/service/StorageDeviceCheckService.java
  57. 28 0
      src/main/java/com/chinaitop/depot/device/service/StorageDeviceGetService.java
  58. 78 0
      src/main/java/com/chinaitop/depot/device/service/StorageDeviceInputService.java
  59. 26 0
      src/main/java/com/chinaitop/depot/device/service/StorageDeviceKeepService.java
  60. 22 0
      src/main/java/com/chinaitop/depot/device/service/StorageDeviceRepairService.java
  61. 117 0
      src/main/java/com/chinaitop/depot/device/service/impl/BasicEquipmentEquipmentPoolServiceImpl.java
  62. 161 0
      src/main/java/com/chinaitop/depot/device/service/impl/ImportServiceImpl.java
  63. 35 0
      src/main/java/com/chinaitop/depot/device/service/impl/StorageDeviceBackServiceImpl.java
  64. 139 0
      src/main/java/com/chinaitop/depot/device/service/impl/StorageDeviceCheckServiceImpl.java
  65. 67 0
      src/main/java/com/chinaitop/depot/device/service/impl/StorageDeviceGetServiceImpl.java
  66. 242 0
      src/main/java/com/chinaitop/depot/device/service/impl/StorageDeviceInputServiceImpl.java
  67. 83 0
      src/main/java/com/chinaitop/depot/device/service/impl/StorageDeviceKeepServiceImpl.java
  68. 55 0
      src/main/java/com/chinaitop/depot/device/service/impl/StorageDeviceRepairServiceImpl.java
  69. 44 0
      src/main/java/com/chinaitop/depot/utils/CustomFilter.java
  70. 61 0
      src/main/java/com/chinaitop/depot/utils/DataPolicyEngine.java
  71. 48 0
      src/main/java/com/chinaitop/depot/utils/ExcelImportUtils.java
  72. 170 0
      src/main/java/com/chinaitop/depot/utils/ParameterUtil.java
  73. 66 0
      src/main/java/com/chinaitop/depot/utils/RedisConfig.java
  74. 547 0
      src/main/java/com/chinaitop/depot/utils/RedisUtil.java
  75. 82 0
      src/main/java/com/chinaitop/depot/utils/SecurityCode.java
  76. 70 0
      src/main/java/com/chinaitop/depot/utils/SecurityImage.java
  77. 39 0
      src/main/java/com/chinaitop/depot/utils/WebConfig.java

+ 168 - 0
bin/pom.xml

@@ -0,0 +1,168 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4
+	<modelVersion>4.0.0</modelVersion>
5
+
6
+	<groupId>com.chinaitop</groupId>
7
+	<artifactId>depot-device</artifactId>
8
+	<version>0.0.1-SNAPSHOT</version>
9
+	<packaging>jar</packaging>
10
+
11
+	<name>depot-device</name>
12
+	<description>Demo project for Spring Boot</description>
13
+
14
+	<parent>
15
+		<groupId>org.springframework.boot</groupId>
16
+		<artifactId>spring-boot-starter-parent</artifactId>
17
+		<version>2.0.0.RELEASE</version>
18
+		<relativePath/> <!-- lookup parent from repository -->
19
+	</parent>
20
+
21
+	<properties>
22
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23
+		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24
+		<java.version>1.8</java.version>
25
+		<spring-cloud.version>Finchley.M8</spring-cloud.version>
26
+	</properties>
27
+
28
+	<dependencies>
29
+		<dependency>
30
+			<groupId>org.springframework.boot</groupId>
31
+			<artifactId>spring-boot-starter-web</artifactId>
32
+		</dependency>
33
+		<dependency>
34
+			<groupId>org.mybatis.spring.boot</groupId>
35
+			<artifactId>mybatis-spring-boot-starter</artifactId>
36
+			<version>1.3.1</version>
37
+		</dependency>
38
+		<!-- 引入spring boot自带的pagehelper插件 -->
39
+		<dependency>
40
+			<groupId>com.github.pagehelper</groupId>
41
+			<artifactId>pagehelper-spring-boot-starter</artifactId>
42
+			<version>1.2.3</version>
43
+		</dependency>
44
+		<dependency>
45
+			<groupId>org.springframework.cloud</groupId>
46
+			<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
47
+		</dependency>
48
+		<dependency>
49
+            <groupId>org.springframework.cloud</groupId>
50
+            <artifactId>spring-cloud-starter-config</artifactId>
51
+        </dependency>
52
+		<dependency>
53
+			<groupId>org.apache.commons</groupId>
54
+			<artifactId>commons-lang3</artifactId>
55
+			<version>3.7</version>
56
+		</dependency>
57
+
58
+		<!-- swagger2 -->
59
+		<dependency>
60
+			<groupId>io.springfox</groupId>
61
+			<artifactId>springfox-swagger2</artifactId>
62
+			<version>2.6.1</version>
63
+		</dependency>
64
+		<dependency>
65
+			<groupId>io.springfox</groupId>
66
+			<artifactId>springfox-swagger-ui</artifactId>
67
+			<version>2.6.1</version>
68
+		</dependency>
69
+
70
+		<dependency>
71
+			<groupId>mysql</groupId>
72
+			<artifactId>mysql-connector-java</artifactId>
73
+		</dependency>
74
+		<dependency>
75
+			<groupId>org.springframework.boot</groupId>
76
+			<artifactId>spring-boot-starter-test</artifactId>
77
+			<scope>test</scope>
78
+		</dependency>
79
+		
80
+		<dependency>
81
+			<groupId>org.apache.poi</groupId>
82
+			<artifactId>poi-ooxml</artifactId>
83
+			<version>3.9</version>
84
+		</dependency>
85
+		
86
+		<dependency>
87
+			<groupId>org.springframework.boot</groupId>
88
+			<artifactId>spring-boot-starter-data-redis</artifactId>
89
+		</dependency>
90
+		<dependency>  
91
+	        <groupId>org.springframework.session</groupId>  
92
+	        <artifactId>spring-session-data-redis</artifactId>  
93
+		</dependency>
94
+		
95
+		<!-- 阿里巴巴json -->
96
+		<dependency>
97
+		    <groupId>com.alibaba</groupId>
98
+		    <artifactId>fastjson</artifactId>
99
+		    <version>1.2.37</version>
100
+		</dependency>
101
+		
102
+		<!-- 调用http接口需要 -->
103
+		<dependency>
104
+            <groupId>org.apache.httpcomponents</groupId>
105
+            <artifactId>httpclient</artifactId>
106
+            <version>4.5.6</version>
107
+        </dependency>
108
+	</dependencies>
109
+
110
+	<dependencyManagement>
111
+		<dependencies>
112
+			<dependency>
113
+				<groupId>org.springframework.cloud</groupId>
114
+				<artifactId>spring-cloud-dependencies</artifactId>
115
+				<version>${spring-cloud.version}</version>
116
+				<type>pom</type>
117
+				<scope>import</scope>
118
+			</dependency>
119
+		</dependencies>
120
+	</dependencyManagement>
121
+
122
+	<build>
123
+	    <finalName>${project.artifactId}</finalName>
124
+		<plugins>
125
+			<plugin>
126
+				<groupId>org.springframework.boot</groupId>
127
+				<artifactId>spring-boot-maven-plugin</artifactId>
128
+			</plugin>
129
+			<plugin>
130
+            	<groupId>org.apache.maven.plugins</groupId>
131
+            	<artifactId>maven-war-plugin</artifactId>
132
+            	<version>2.6</version>
133
+            	<configuration>
134
+                	<failOnMissingWebXml>false</failOnMissingWebXml>
135
+            	</configuration>
136
+        	</plugin>
137
+		</plugins>
138
+		
139
+		<!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 -->
140
+        <resources>
141
+            <resource>
142
+                <directory>src/main/java</directory>
143
+                <includes>
144
+                    <include>**/*.properties</include>
145
+					<include>**/*.xml</include>
146
+					<include>**/*.store</include>
147
+                </includes>
148
+                <filtering>false</filtering>
149
+            </resource>
150
+            <resource>
151
+                <directory>src/main/resources</directory>
152
+            </resource>
153
+        </resources>
154
+	</build>
155
+
156
+	<repositories>
157
+		<repository>
158
+			<id>spring-milestones</id>
159
+			<name>Spring Milestones</name>
160
+			<url>https://repo.spring.io/milestone</url>
161
+			<snapshots>
162
+				<enabled>false</enabled>
163
+			</snapshots>
164
+		</repository>
165
+	</repositories>
166
+
167
+
168
+</project>

+ 258 - 0
bin/src/main/java/com/chinaitop/depot/device/mapper/BasicEquipmentEquipmentPoolMapper.xml

@@ -0,0 +1,258 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.device.mapper.BasicEquipmentEquipmentPoolMapper">
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool">
5
+    <id column="id" jdbcType="INTEGER" property="id" />
6
+    <result column="org_id" jdbcType="INTEGER" property="orgId" />
7
+    <result column="put_position" jdbcType="VARCHAR" property="putPosition" />
8
+    <result column="shelf_id" jdbcType="VARCHAR" property="shelfId" />
9
+    <result column="warehouse_id" jdbcType="VARCHAR" property="warehouseId" />
10
+    <result column="remark" jdbcType="VARCHAR" property="remark" />
11
+    <result column="input_person_id" jdbcType="INTEGER" property="inputPersonId" />
12
+    <result column="input_date" jdbcType="TIMESTAMP" property="inputDate" />
13
+  </resultMap>
14
+  <sql id="Example_Where_Clause">
15
+    <where>
16
+      <foreach collection="oredCriteria" item="criteria" separator="or">
17
+        <if test="criteria.valid">
18
+          <trim prefix="(" prefixOverrides="and" suffix=")">
19
+            <foreach collection="criteria.criteria" item="criterion">
20
+              <choose>
21
+                <when test="criterion.noValue">
22
+                  and ${criterion.condition}
23
+                </when>
24
+                <when test="criterion.singleValue">
25
+                  and ${criterion.condition} #{criterion.value}
26
+                </when>
27
+                <when test="criterion.betweenValue">
28
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
29
+                </when>
30
+                <when test="criterion.listValue">
31
+                  and ${criterion.condition}
32
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
33
+                    #{listItem}
34
+                  </foreach>
35
+                </when>
36
+              </choose>
37
+            </foreach>
38
+          </trim>
39
+        </if>
40
+      </foreach>
41
+    </where>
42
+  </sql>
43
+  <sql id="Update_By_Example_Where_Clause">
44
+    <where>
45
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
46
+        <if test="criteria.valid">
47
+          <trim prefix="(" prefixOverrides="and" suffix=")">
48
+            <foreach collection="criteria.criteria" item="criterion">
49
+              <choose>
50
+                <when test="criterion.noValue">
51
+                  and ${criterion.condition}
52
+                </when>
53
+                <when test="criterion.singleValue">
54
+                  and ${criterion.condition} #{criterion.value}
55
+                </when>
56
+                <when test="criterion.betweenValue">
57
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
58
+                </when>
59
+                <when test="criterion.listValue">
60
+                  and ${criterion.condition}
61
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
62
+                    #{listItem}
63
+                  </foreach>
64
+                </when>
65
+              </choose>
66
+            </foreach>
67
+          </trim>
68
+        </if>
69
+      </foreach>
70
+    </where>
71
+  </sql>
72
+  <sql id="Base_Column_List">
73
+    id, org_id, put_position, shelf_id, warehouse_id, remark, input_person_id, input_date
74
+  </sql>
75
+  <select id="selectByExample" parameterType="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPoolExample" resultMap="BaseResultMap">
76
+    select
77
+    <if test="distinct">
78
+      distinct
79
+    </if>
80
+    <include refid="Base_Column_List" />
81
+    from basic_equipment_equipment_pool
82
+    <if test="_parameter != null">
83
+      <include refid="Example_Where_Clause" />
84
+    </if>
85
+    <if test="orderByClause != null">
86
+      order by ${orderByClause}
87
+    </if>
88
+  </select>
89
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
90
+    select 
91
+    <include refid="Base_Column_List" />
92
+    from basic_equipment_equipment_pool
93
+    where id = #{id,jdbcType=INTEGER}
94
+  </select>
95
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
96
+    delete from basic_equipment_equipment_pool
97
+    where id = #{id,jdbcType=INTEGER}
98
+  </delete>
99
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPoolExample">
100
+    delete from basic_equipment_equipment_pool
101
+    <if test="_parameter != null">
102
+      <include refid="Example_Where_Clause" />
103
+    </if>
104
+  </delete>
105
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool">
106
+    insert into basic_equipment_equipment_pool (id, org_id, put_position, 
107
+      shelf_id, warehouse_id, remark, 
108
+      input_person_id, input_date)
109
+    values (#{id,jdbcType=INTEGER}, #{orgId,jdbcType=INTEGER}, #{putPosition,jdbcType=VARCHAR}, 
110
+      #{shelfId,jdbcType=VARCHAR}, #{warehouseId,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, 
111
+      #{inputPersonId,jdbcType=INTEGER}, #{inputDate,jdbcType=TIMESTAMP})
112
+  </insert>
113
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool">
114
+    insert into basic_equipment_equipment_pool
115
+    <trim prefix="(" suffix=")" suffixOverrides=",">
116
+      <if test="id != null">
117
+        id,
118
+      </if>
119
+      <if test="orgId != null">
120
+        org_id,
121
+      </if>
122
+      <if test="putPosition != null">
123
+        put_position,
124
+      </if>
125
+      <if test="shelfId != null">
126
+        shelf_id,
127
+      </if>
128
+      <if test="warehouseId != null">
129
+        warehouse_id,
130
+      </if>
131
+      <if test="remark != null">
132
+        remark,
133
+      </if>
134
+      <if test="inputPersonId != null">
135
+        input_person_id,
136
+      </if>
137
+      <if test="inputDate != null">
138
+        input_date,
139
+      </if>
140
+    </trim>
141
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
142
+      <if test="id != null">
143
+        #{id,jdbcType=INTEGER},
144
+      </if>
145
+      <if test="orgId != null">
146
+        #{orgId,jdbcType=INTEGER},
147
+      </if>
148
+      <if test="putPosition != null">
149
+        #{putPosition,jdbcType=VARCHAR},
150
+      </if>
151
+      <if test="shelfId != null">
152
+        #{shelfId,jdbcType=VARCHAR},
153
+      </if>
154
+      <if test="warehouseId != null">
155
+        #{warehouseId,jdbcType=VARCHAR},
156
+      </if>
157
+      <if test="remark != null">
158
+        #{remark,jdbcType=VARCHAR},
159
+      </if>
160
+      <if test="inputPersonId != null">
161
+        #{inputPersonId,jdbcType=INTEGER},
162
+      </if>
163
+      <if test="inputDate != null">
164
+        #{inputDate,jdbcType=TIMESTAMP},
165
+      </if>
166
+    </trim>
167
+  </insert>
168
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPoolExample" resultType="java.lang.Integer">
169
+    select count(*) from basic_equipment_equipment_pool
170
+    <if test="_parameter != null">
171
+      <include refid="Example_Where_Clause" />
172
+    </if>
173
+  </select>
174
+  <update id="updateByExampleSelective" parameterType="map">
175
+    update basic_equipment_equipment_pool
176
+    <set>
177
+      <if test="record.id != null">
178
+        id = #{record.id,jdbcType=INTEGER},
179
+      </if>
180
+      <if test="record.orgId != null">
181
+        org_id = #{record.orgId,jdbcType=INTEGER},
182
+      </if>
183
+      <if test="record.putPosition != null">
184
+        put_position = #{record.putPosition,jdbcType=VARCHAR},
185
+      </if>
186
+      <if test="record.shelfId != null">
187
+        shelf_id = #{record.shelfId,jdbcType=VARCHAR},
188
+      </if>
189
+      <if test="record.warehouseId != null">
190
+        warehouse_id = #{record.warehouseId,jdbcType=VARCHAR},
191
+      </if>
192
+      <if test="record.remark != null">
193
+        remark = #{record.remark,jdbcType=VARCHAR},
194
+      </if>
195
+      <if test="record.inputPersonId != null">
196
+        input_person_id = #{record.inputPersonId,jdbcType=INTEGER},
197
+      </if>
198
+      <if test="record.inputDate != null">
199
+        input_date = #{record.inputDate,jdbcType=TIMESTAMP},
200
+      </if>
201
+    </set>
202
+    <if test="_parameter != null">
203
+      <include refid="Update_By_Example_Where_Clause" />
204
+    </if>
205
+  </update>
206
+  <update id="updateByExample" parameterType="map">
207
+    update basic_equipment_equipment_pool
208
+    set id = #{record.id,jdbcType=INTEGER},
209
+      org_id = #{record.orgId,jdbcType=INTEGER},
210
+      put_position = #{record.putPosition,jdbcType=VARCHAR},
211
+      shelf_id = #{record.shelfId,jdbcType=VARCHAR},
212
+      warehouse_id = #{record.warehouseId,jdbcType=VARCHAR},
213
+      remark = #{record.remark,jdbcType=VARCHAR},
214
+      input_person_id = #{record.inputPersonId,jdbcType=INTEGER},
215
+      input_date = #{record.inputDate,jdbcType=TIMESTAMP}
216
+    <if test="_parameter != null">
217
+      <include refid="Update_By_Example_Where_Clause" />
218
+    </if>
219
+  </update>
220
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool">
221
+    update basic_equipment_equipment_pool
222
+    <set>
223
+      <if test="orgId != null">
224
+        org_id = #{orgId,jdbcType=INTEGER},
225
+      </if>
226
+      <if test="putPosition != null">
227
+        put_position = #{putPosition,jdbcType=VARCHAR},
228
+      </if>
229
+      <if test="shelfId != null">
230
+        shelf_id = #{shelfId,jdbcType=VARCHAR},
231
+      </if>
232
+      <if test="warehouseId != null">
233
+        warehouse_id = #{warehouseId,jdbcType=VARCHAR},
234
+      </if>
235
+      <if test="remark != null">
236
+        remark = #{remark,jdbcType=VARCHAR},
237
+      </if>
238
+      <if test="inputPersonId != null">
239
+        input_person_id = #{inputPersonId,jdbcType=INTEGER},
240
+      </if>
241
+      <if test="inputDate != null">
242
+        input_date = #{inputDate,jdbcType=TIMESTAMP},
243
+      </if>
244
+    </set>
245
+    where id = #{id,jdbcType=INTEGER}
246
+  </update>
247
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool">
248
+    update basic_equipment_equipment_pool
249
+    set org_id = #{orgId,jdbcType=INTEGER},
250
+      put_position = #{putPosition,jdbcType=VARCHAR},
251
+      shelf_id = #{shelfId,jdbcType=VARCHAR},
252
+      warehouse_id = #{warehouseId,jdbcType=VARCHAR},
253
+      remark = #{remark,jdbcType=VARCHAR},
254
+      input_person_id = #{inputPersonId,jdbcType=INTEGER},
255
+      input_date = #{inputDate,jdbcType=TIMESTAMP}
256
+    where id = #{id,jdbcType=INTEGER}
257
+  </update>
258
+</mapper>

+ 281 - 0
bin/src/main/java/com/chinaitop/depot/device/mapper/StorageDevicebackMapper.xml

@@ -0,0 +1,281 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.device.mapper.StorageDevicebackMapper">
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.StorageDeviceback">
5
+    <id column="id" jdbcType="INTEGER" property="id" />
6
+    <result column="get_id" jdbcType="INTEGER" property="getId" />
7
+    <result column="back_keeper" jdbcType="VARCHAR" property="backKeeper" />
8
+    <result column="back_handler" jdbcType="VARCHAR" property="backHandler" />
9
+    <result column="collator" jdbcType="VARCHAR" property="collator" />
10
+    <result column="back_time" jdbcType="DATE" property="backTime" />
11
+    <result column="broken_count" jdbcType="INTEGER" property="brokenCount" />
12
+    <result column="number" jdbcType="INTEGER" property="number" />
13
+    <result column="back_count" jdbcType="INTEGER" property="backCount" />
14
+  </resultMap>
15
+  <sql id="Example_Where_Clause">
16
+    <where>
17
+      <foreach collection="oredCriteria" item="criteria" separator="or">
18
+        <if test="criteria.valid">
19
+          <trim prefix="(" prefixOverrides="and" suffix=")">
20
+            <foreach collection="criteria.criteria" item="criterion">
21
+              <choose>
22
+                <when test="criterion.noValue">
23
+                  and ${criterion.condition}
24
+                </when>
25
+                <when test="criterion.singleValue">
26
+                  and ${criterion.condition} #{criterion.value}
27
+                </when>
28
+                <when test="criterion.betweenValue">
29
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
30
+                </when>
31
+                <when test="criterion.listValue">
32
+                  and ${criterion.condition}
33
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
34
+                    #{listItem}
35
+                  </foreach>
36
+                </when>
37
+              </choose>
38
+            </foreach>
39
+          </trim>
40
+        </if>
41
+      </foreach>
42
+    </where>
43
+  </sql>
44
+  <sql id="Update_By_Example_Where_Clause">
45
+    <where>
46
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
47
+        <if test="criteria.valid">
48
+          <trim prefix="(" prefixOverrides="and" suffix=")">
49
+            <foreach collection="criteria.criteria" item="criterion">
50
+              <choose>
51
+                <when test="criterion.noValue">
52
+                  and ${criterion.condition}
53
+                </when>
54
+                <when test="criterion.singleValue">
55
+                  and ${criterion.condition} #{criterion.value}
56
+                </when>
57
+                <when test="criterion.betweenValue">
58
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
59
+                </when>
60
+                <when test="criterion.listValue">
61
+                  and ${criterion.condition}
62
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
63
+                    #{listItem}
64
+                  </foreach>
65
+                </when>
66
+              </choose>
67
+            </foreach>
68
+          </trim>
69
+        </if>
70
+      </foreach>
71
+    </where>
72
+  </sql>
73
+  <sql id="Base_Column_List">
74
+    id, get_id, back_keeper, back_handler, collator, back_time, broken_count, number, 
75
+    back_count
76
+  </sql>
77
+  <select id="selectByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicebackExample" resultMap="BaseResultMap">
78
+    select
79
+    <if test="distinct">
80
+      distinct
81
+    </if>
82
+    <include refid="Base_Column_List" />
83
+    from storage_deviceback
84
+    <if test="_parameter != null">
85
+      <include refid="Example_Where_Clause" />
86
+    </if>
87
+    <if test="orderByClause != null">
88
+      order by ${orderByClause}
89
+    </if>
90
+  </select>
91
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
92
+    select 
93
+    <include refid="Base_Column_List" />
94
+    from storage_deviceback
95
+    where id = #{id,jdbcType=INTEGER}
96
+  </select>
97
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
98
+    delete from storage_deviceback
99
+    where id = #{id,jdbcType=INTEGER}
100
+  </delete>
101
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicebackExample">
102
+    delete from storage_deviceback
103
+    <if test="_parameter != null">
104
+      <include refid="Example_Where_Clause" />
105
+    </if>
106
+  </delete>
107
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.StorageDeviceback">
108
+    insert into storage_deviceback (id, get_id, back_keeper, 
109
+      back_handler, collator, back_time, 
110
+      broken_count, number, back_count
111
+      )
112
+    values (#{id,jdbcType=INTEGER}, #{getId,jdbcType=INTEGER}, #{backKeeper,jdbcType=VARCHAR}, 
113
+      #{backHandler,jdbcType=VARCHAR}, #{collator,jdbcType=VARCHAR}, #{backTime,jdbcType=DATE}, 
114
+      #{brokenCount,jdbcType=INTEGER}, #{number,jdbcType=INTEGER}, #{backCount,jdbcType=INTEGER}
115
+      )
116
+  </insert>
117
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.StorageDeviceback">
118
+    insert into storage_deviceback
119
+    <trim prefix="(" suffix=")" suffixOverrides=",">
120
+      <if test="id != null">
121
+        id,
122
+      </if>
123
+      <if test="getId != null">
124
+        get_id,
125
+      </if>
126
+      <if test="backKeeper != null">
127
+        back_keeper,
128
+      </if>
129
+      <if test="backHandler != null">
130
+        back_handler,
131
+      </if>
132
+      <if test="collator != null">
133
+        collator,
134
+      </if>
135
+      <if test="backTime != null">
136
+        back_time,
137
+      </if>
138
+      <if test="brokenCount != null">
139
+        broken_count,
140
+      </if>
141
+      <if test="number != null">
142
+        number,
143
+      </if>
144
+      <if test="backCount != null">
145
+        back_count,
146
+      </if>
147
+    </trim>
148
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
149
+      <if test="id != null">
150
+        #{id,jdbcType=INTEGER},
151
+      </if>
152
+      <if test="getId != null">
153
+        #{getId,jdbcType=INTEGER},
154
+      </if>
155
+      <if test="backKeeper != null">
156
+        #{backKeeper,jdbcType=VARCHAR},
157
+      </if>
158
+      <if test="backHandler != null">
159
+        #{backHandler,jdbcType=VARCHAR},
160
+      </if>
161
+      <if test="collator != null">
162
+        #{collator,jdbcType=VARCHAR},
163
+      </if>
164
+      <if test="backTime != null">
165
+        #{backTime,jdbcType=DATE},
166
+      </if>
167
+      <if test="brokenCount != null">
168
+        #{brokenCount,jdbcType=INTEGER},
169
+      </if>
170
+      <if test="number != null">
171
+        #{number,jdbcType=INTEGER},
172
+      </if>
173
+      <if test="backCount != null">
174
+        #{backCount,jdbcType=INTEGER},
175
+      </if>
176
+    </trim>
177
+  </insert>
178
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicebackExample" resultType="java.lang.Integer">
179
+    select count(*) from storage_deviceback
180
+    <if test="_parameter != null">
181
+      <include refid="Example_Where_Clause" />
182
+    </if>
183
+  </select>
184
+  <update id="updateByExampleSelective" parameterType="map">
185
+    update storage_deviceback
186
+    <set>
187
+      <if test="record.id != null">
188
+        id = #{record.id,jdbcType=INTEGER},
189
+      </if>
190
+      <if test="record.getId != null">
191
+        get_id = #{record.getId,jdbcType=INTEGER},
192
+      </if>
193
+      <if test="record.backKeeper != null">
194
+        back_keeper = #{record.backKeeper,jdbcType=VARCHAR},
195
+      </if>
196
+      <if test="record.backHandler != null">
197
+        back_handler = #{record.backHandler,jdbcType=VARCHAR},
198
+      </if>
199
+      <if test="record.collator != null">
200
+        collator = #{record.collator,jdbcType=VARCHAR},
201
+      </if>
202
+      <if test="record.backTime != null">
203
+        back_time = #{record.backTime,jdbcType=DATE},
204
+      </if>
205
+      <if test="record.brokenCount != null">
206
+        broken_count = #{record.brokenCount,jdbcType=INTEGER},
207
+      </if>
208
+      <if test="record.number != null">
209
+        number = #{record.number,jdbcType=INTEGER},
210
+      </if>
211
+      <if test="record.backCount != null">
212
+        back_count = #{record.backCount,jdbcType=INTEGER},
213
+      </if>
214
+    </set>
215
+    <if test="_parameter != null">
216
+      <include refid="Update_By_Example_Where_Clause" />
217
+    </if>
218
+  </update>
219
+  <update id="updateByExample" parameterType="map">
220
+    update storage_deviceback
221
+    set id = #{record.id,jdbcType=INTEGER},
222
+      get_id = #{record.getId,jdbcType=INTEGER},
223
+      back_keeper = #{record.backKeeper,jdbcType=VARCHAR},
224
+      back_handler = #{record.backHandler,jdbcType=VARCHAR},
225
+      collator = #{record.collator,jdbcType=VARCHAR},
226
+      back_time = #{record.backTime,jdbcType=DATE},
227
+      broken_count = #{record.brokenCount,jdbcType=INTEGER},
228
+      number = #{record.number,jdbcType=INTEGER},
229
+      back_count = #{record.backCount,jdbcType=INTEGER}
230
+    <if test="_parameter != null">
231
+      <include refid="Update_By_Example_Where_Clause" />
232
+    </if>
233
+  </update>
234
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.StorageDeviceback">
235
+    update storage_deviceback
236
+    <set>
237
+      <if test="getId != null">
238
+        get_id = #{getId,jdbcType=INTEGER},
239
+      </if>
240
+      <if test="backKeeper != null">
241
+        back_keeper = #{backKeeper,jdbcType=VARCHAR},
242
+      </if>
243
+      <if test="backHandler != null">
244
+        back_handler = #{backHandler,jdbcType=VARCHAR},
245
+      </if>
246
+      <if test="collator != null">
247
+        collator = #{collator,jdbcType=VARCHAR},
248
+      </if>
249
+      <if test="backTime != null">
250
+        back_time = #{backTime,jdbcType=DATE},
251
+      </if>
252
+      <if test="brokenCount != null">
253
+        broken_count = #{brokenCount,jdbcType=INTEGER},
254
+      </if>
255
+      <if test="number != null">
256
+        number = #{number,jdbcType=INTEGER},
257
+      </if>
258
+      <if test="backCount != null">
259
+        back_count = #{backCount,jdbcType=INTEGER},
260
+      </if>
261
+    </set>
262
+    where id = #{id,jdbcType=INTEGER}
263
+  </update>
264
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.StorageDeviceback">
265
+    update storage_deviceback
266
+    set get_id = #{getId,jdbcType=INTEGER},
267
+      back_keeper = #{backKeeper,jdbcType=VARCHAR},
268
+      back_handler = #{backHandler,jdbcType=VARCHAR},
269
+      collator = #{collator,jdbcType=VARCHAR},
270
+      back_time = #{backTime,jdbcType=DATE},
271
+      broken_count = #{brokenCount,jdbcType=INTEGER},
272
+      number = #{number,jdbcType=INTEGER},
273
+      back_count = #{backCount,jdbcType=INTEGER}
274
+    where id = #{id,jdbcType=INTEGER}
275
+  </update>
276
+  
277
+  <select id="selectBygetId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
278
+  	select * from storage_deviceback where get_id=#{id};
279
+  </select>
280
+  
281
+</mapper>

+ 370 - 0
bin/src/main/java/com/chinaitop/depot/device/mapper/StorageDevicecheckMapper.xml

@@ -0,0 +1,370 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.device.mapper.StorageDevicecheckMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.StorageDevicecheck" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="check_number" property="checkNumber" jdbcType="VARCHAR" />
7
+    <result column="check_date" property="checkDate" jdbcType="TIMESTAMP" />
8
+    <result column="depot_id" property="depotId" jdbcType="INTEGER" />
9
+    <result column="check_person" property="checkPerson" jdbcType="VARCHAR" />
10
+    <result column="device_type" property="deviceType" jdbcType="VARCHAR" />
11
+    <result column="device_name" property="deviceName" jdbcType="VARCHAR" />
12
+    <result column="model" property="model" jdbcType="VARCHAR" />
13
+    <result column="store_count" property="storeCount" jdbcType="INTEGER" />
14
+    <result column="really_count" property="reallyCount" jdbcType="INTEGER" />
15
+    <result column="check_result" property="checkResult" jdbcType="VARCHAR" />
16
+    <result column="reason" property="reason" jdbcType="VARCHAR" />
17
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
18
+  </resultMap>
19
+  <sql id="Example_Where_Clause" >
20
+    <where >
21
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
22
+        <if test="criteria.valid" >
23
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
24
+            <foreach collection="criteria.criteria" item="criterion" >
25
+              <choose >
26
+                <when test="criterion.noValue" >
27
+                  and ${criterion.condition}
28
+                </when>
29
+                <when test="criterion.singleValue" >
30
+                  and ${criterion.condition} #{criterion.value}
31
+                </when>
32
+                <when test="criterion.betweenValue" >
33
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
34
+                </when>
35
+                <when test="criterion.listValue" >
36
+                  and ${criterion.condition}
37
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
38
+                    #{listItem}
39
+                  </foreach>
40
+                </when>
41
+              </choose>
42
+            </foreach>
43
+          </trim>
44
+        </if>
45
+      </foreach>
46
+    </where>
47
+  </sql>
48
+  <sql id="Update_By_Example_Where_Clause" >
49
+    <where >
50
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
51
+        <if test="criteria.valid" >
52
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
53
+            <foreach collection="criteria.criteria" item="criterion" >
54
+              <choose >
55
+                <when test="criterion.noValue" >
56
+                  and ${criterion.condition}
57
+                </when>
58
+                <when test="criterion.singleValue" >
59
+                  and ${criterion.condition} #{criterion.value}
60
+                </when>
61
+                <when test="criterion.betweenValue" >
62
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
63
+                </when>
64
+                <when test="criterion.listValue" >
65
+                  and ${criterion.condition}
66
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
67
+                    #{listItem}
68
+                  </foreach>
69
+                </when>
70
+              </choose>
71
+            </foreach>
72
+          </trim>
73
+        </if>
74
+      </foreach>
75
+    </where>
76
+  </sql>
77
+  <sql id="Base_Column_List" >
78
+    id, check_number, check_date, depot_id, check_person, device_type, device_name, model, 
79
+    store_count, really_count, check_result, reason, org_id
80
+  </sql>
81
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.StorageDevicecheckExample" >
82
+    select
83
+    <if test="distinct" >
84
+      distinct
85
+    </if>
86
+    <include refid="Base_Column_List" />
87
+    from storage_devicecheck
88
+    <if test="_parameter != null" >
89
+      <include refid="Example_Where_Clause" />
90
+    </if>
91
+    <if test="orderByClause != null" >
92
+      order by ${orderByClause}
93
+    </if>
94
+  </select>
95
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
96
+    select 
97
+    <include refid="Base_Column_List" />
98
+    from storage_devicecheck
99
+    where id = #{id,jdbcType=INTEGER}
100
+  </select>
101
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
102
+    delete from storage_devicecheck
103
+    where id = #{id,jdbcType=INTEGER}
104
+  </delete>
105
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicecheckExample" >
106
+    delete from storage_devicecheck
107
+    <if test="_parameter != null" >
108
+      <include refid="Example_Where_Clause" />
109
+    </if>
110
+  </delete>
111
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.StorageDevicecheck" >
112
+    insert into storage_devicecheck (id, check_number, check_date, 
113
+      depot_id, check_person, device_type, 
114
+      device_name, model, store_count, 
115
+      really_count, check_result, reason, 
116
+      org_id)
117
+    values (#{id,jdbcType=INTEGER}, #{checkNumber,jdbcType=VARCHAR}, #{checkDate,jdbcType=TIMESTAMP}, 
118
+      #{depotId,jdbcType=INTEGER}, #{checkPerson,jdbcType=VARCHAR}, #{deviceType,jdbcType=VARCHAR}, 
119
+      #{deviceName,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{storeCount,jdbcType=INTEGER}, 
120
+      #{reallyCount,jdbcType=INTEGER}, #{checkResult,jdbcType=VARCHAR}, #{reason,jdbcType=VARCHAR}, 
121
+      #{orgId,jdbcType=INTEGER})
122
+  </insert>
123
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.StorageDevicecheck" >
124
+    insert into storage_devicecheck
125
+    <trim prefix="(" suffix=")" suffixOverrides="," >
126
+      <if test="id != null" >
127
+        id,
128
+      </if>
129
+      <if test="checkNumber != null" >
130
+        check_number,
131
+      </if>
132
+      <if test="checkDate != null" >
133
+        check_date,
134
+      </if>
135
+      <if test="depotId != null" >
136
+        depot_id,
137
+      </if>
138
+      <if test="checkPerson != null" >
139
+        check_person,
140
+      </if>
141
+      <if test="deviceType != null" >
142
+        device_type,
143
+      </if>
144
+      <if test="deviceName != null" >
145
+        device_name,
146
+      </if>
147
+      <if test="model != null" >
148
+        model,
149
+      </if>
150
+      <if test="storeCount != null" >
151
+        store_count,
152
+      </if>
153
+      <if test="reallyCount != null" >
154
+        really_count,
155
+      </if>
156
+      <if test="checkResult != null" >
157
+        check_result,
158
+      </if>
159
+      <if test="reason != null" >
160
+        reason,
161
+      </if>
162
+      <if test="orgId != null" >
163
+        org_id,
164
+      </if>
165
+    </trim>
166
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
167
+      <if test="id != null" >
168
+        #{id,jdbcType=INTEGER},
169
+      </if>
170
+      <if test="checkNumber != null" >
171
+        #{checkNumber,jdbcType=VARCHAR},
172
+      </if>
173
+      <if test="checkDate != null" >
174
+        #{checkDate,jdbcType=TIMESTAMP},
175
+      </if>
176
+      <if test="depotId != null" >
177
+        #{depotId,jdbcType=INTEGER},
178
+      </if>
179
+      <if test="checkPerson != null" >
180
+        #{checkPerson,jdbcType=VARCHAR},
181
+      </if>
182
+      <if test="deviceType != null" >
183
+        #{deviceType,jdbcType=VARCHAR},
184
+      </if>
185
+      <if test="deviceName != null" >
186
+        #{deviceName,jdbcType=VARCHAR},
187
+      </if>
188
+      <if test="model != null" >
189
+        #{model,jdbcType=VARCHAR},
190
+      </if>
191
+      <if test="storeCount != null" >
192
+        #{storeCount,jdbcType=INTEGER},
193
+      </if>
194
+      <if test="reallyCount != null" >
195
+        #{reallyCount,jdbcType=INTEGER},
196
+      </if>
197
+      <if test="checkResult != null" >
198
+        #{checkResult,jdbcType=VARCHAR},
199
+      </if>
200
+      <if test="reason != null" >
201
+        #{reason,jdbcType=VARCHAR},
202
+      </if>
203
+      <if test="orgId != null" >
204
+        #{orgId,jdbcType=INTEGER},
205
+      </if>
206
+    </trim>
207
+  </insert>
208
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicecheckExample" resultType="java.lang.Integer" >
209
+    select count(*) from storage_devicecheck
210
+    <if test="_parameter != null" >
211
+      <include refid="Example_Where_Clause" />
212
+    </if>
213
+  </select>
214
+  <update id="updateByExampleSelective" parameterType="map" >
215
+    update storage_devicecheck
216
+    <set >
217
+      <if test="record.id != null" >
218
+        id = #{record.id,jdbcType=INTEGER},
219
+      </if>
220
+      <if test="record.checkNumber != null" >
221
+        check_number = #{record.checkNumber,jdbcType=VARCHAR},
222
+      </if>
223
+      <if test="record.checkDate != null" >
224
+        check_date = #{record.checkDate,jdbcType=TIMESTAMP},
225
+      </if>
226
+      <if test="record.depotId != null" >
227
+        depot_id = #{record.depotId,jdbcType=INTEGER},
228
+      </if>
229
+      <if test="record.checkPerson != null" >
230
+        check_person = #{record.checkPerson,jdbcType=VARCHAR},
231
+      </if>
232
+      <if test="record.deviceType != null" >
233
+        device_type = #{record.deviceType,jdbcType=VARCHAR},
234
+      </if>
235
+      <if test="record.deviceName != null" >
236
+        device_name = #{record.deviceName,jdbcType=VARCHAR},
237
+      </if>
238
+      <if test="record.model != null" >
239
+        model = #{record.model,jdbcType=VARCHAR},
240
+      </if>
241
+      <if test="record.storeCount != null" >
242
+        store_count = #{record.storeCount,jdbcType=INTEGER},
243
+      </if>
244
+      <if test="record.reallyCount != null" >
245
+        really_count = #{record.reallyCount,jdbcType=INTEGER},
246
+      </if>
247
+      <if test="record.checkResult != null" >
248
+        check_result = #{record.checkResult,jdbcType=VARCHAR},
249
+      </if>
250
+      <if test="record.reason != null" >
251
+        reason = #{record.reason,jdbcType=VARCHAR},
252
+      </if>
253
+      <if test="record.orgId != null" >
254
+        org_id = #{record.orgId,jdbcType=INTEGER},
255
+      </if>
256
+    </set>
257
+    <if test="_parameter != null" >
258
+      <include refid="Update_By_Example_Where_Clause" />
259
+    </if>
260
+  </update>
261
+  <update id="updateByExample" parameterType="map" >
262
+    update storage_devicecheck
263
+    set id = #{record.id,jdbcType=INTEGER},
264
+      check_number = #{record.checkNumber,jdbcType=VARCHAR},
265
+      check_date = #{record.checkDate,jdbcType=TIMESTAMP},
266
+      depot_id = #{record.depotId,jdbcType=INTEGER},
267
+      check_person = #{record.checkPerson,jdbcType=VARCHAR},
268
+      device_type = #{record.deviceType,jdbcType=VARCHAR},
269
+      device_name = #{record.deviceName,jdbcType=VARCHAR},
270
+      model = #{record.model,jdbcType=VARCHAR},
271
+      store_count = #{record.storeCount,jdbcType=INTEGER},
272
+      really_count = #{record.reallyCount,jdbcType=INTEGER},
273
+      check_result = #{record.checkResult,jdbcType=VARCHAR},
274
+      reason = #{record.reason,jdbcType=VARCHAR},
275
+      org_id = #{record.orgId,jdbcType=INTEGER}
276
+    <if test="_parameter != null" >
277
+      <include refid="Update_By_Example_Where_Clause" />
278
+    </if>
279
+  </update>
280
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.StorageDevicecheck" >
281
+    update storage_devicecheck
282
+    <set >
283
+      <if test="checkNumber != null" >
284
+        check_number = #{checkNumber,jdbcType=VARCHAR},
285
+      </if>
286
+      <if test="checkDate != null" >
287
+        check_date = #{checkDate,jdbcType=TIMESTAMP},
288
+      </if>
289
+      <if test="depotId != null" >
290
+        depot_id = #{depotId,jdbcType=INTEGER},
291
+      </if>
292
+      <if test="checkPerson != null" >
293
+        check_person = #{checkPerson,jdbcType=VARCHAR},
294
+      </if>
295
+      <if test="deviceType != null" >
296
+        device_type = #{deviceType,jdbcType=VARCHAR},
297
+      </if>
298
+      <if test="deviceName != null" >
299
+        device_name = #{deviceName,jdbcType=VARCHAR},
300
+      </if>
301
+      <if test="model != null" >
302
+        model = #{model,jdbcType=VARCHAR},
303
+      </if>
304
+      <if test="storeCount != null" >
305
+        store_count = #{storeCount,jdbcType=INTEGER},
306
+      </if>
307
+      <if test="reallyCount != null" >
308
+        really_count = #{reallyCount,jdbcType=INTEGER},
309
+      </if>
310
+      <if test="checkResult != null" >
311
+        check_result = #{checkResult,jdbcType=VARCHAR},
312
+      </if>
313
+      <if test="reason != null" >
314
+        reason = #{reason,jdbcType=VARCHAR},
315
+      </if>
316
+      <if test="orgId != null" >
317
+        org_id = #{orgId,jdbcType=INTEGER},
318
+      </if>
319
+    </set>
320
+    where id = #{id,jdbcType=INTEGER}
321
+  </update>
322
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.StorageDevicecheck" >
323
+    update storage_devicecheck
324
+    set check_number = #{checkNumber,jdbcType=VARCHAR},
325
+      check_date = #{checkDate,jdbcType=TIMESTAMP},
326
+      depot_id = #{depotId,jdbcType=INTEGER},
327
+      check_person = #{checkPerson,jdbcType=VARCHAR},
328
+      device_type = #{deviceType,jdbcType=VARCHAR},
329
+      device_name = #{deviceName,jdbcType=VARCHAR},
330
+      model = #{model,jdbcType=VARCHAR},
331
+      store_count = #{storeCount,jdbcType=INTEGER},
332
+      really_count = #{reallyCount,jdbcType=INTEGER},
333
+      check_result = #{checkResult,jdbcType=VARCHAR},
334
+      reason = #{reason,jdbcType=VARCHAR},
335
+      org_id = #{orgId,jdbcType=INTEGER}
336
+    where id = #{id,jdbcType=INTEGER}
337
+  </update>
338
+  
339
+  <select id="getCountForDate" parameterType="java.util.Map" resultType="java.util.Map">
340
+      SELECT  * FROM storage_devicecheck WHERE check_date LIKE ${checkDate} AND  depot_id = #{depotId,jdbcType=VARCHAR} GROUP BY check_date
341
+  </select>
342
+
343
+    <select id="selectBySql" parameterType="com.chinaitop.depot.device.model.StorageDevicecheckExample" resultMap="BaseResultMap">
344
+        SELECT
345
+            id,
346
+            check_number,
347
+            check_date,
348
+            depot_id,
349
+            check_person,
350
+            device_type,
351
+            device_name,
352
+            model,
353
+            store_count,
354
+            really_count,
355
+            reason,
356
+            org_id
357
+        FROM
358
+          storage_devicecheck
359
+        <if test="_parameter != null">
360
+          <include refid="Example_Where_Clause" />
361
+        </if>
362
+        GROUP BY depot_id,
363
+          check_number
364
+        ORDER BY depot_id , check_date DESC
365
+    </select>
366
+
367
+  <insert id="insertBySql" parameterType="java.util.Map">
368
+    ${sql}
369
+  </insert>
370
+</mapper>

+ 399 - 0
bin/src/main/java/com/chinaitop/depot/device/mapper/StorageDevicegetMapper.xml

@@ -0,0 +1,399 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.device.mapper.StorageDevicegetMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.StorageDeviceget" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="device_type" property="deviceType" jdbcType="INTEGER" />
7
+    <result column="get_time" property="getTime" jdbcType="TIMESTAMP" />
8
+    <result column="device_name" property="deviceName" jdbcType="VARCHAR" />
9
+    <result column="model" property="model" jdbcType="VARCHAR" />
10
+    <result column="get_count" property="getCount" jdbcType="INTEGER" />
11
+    <result column="back_count" property="backCount" jdbcType="INTEGER" />
12
+    <result column="book_keeper" property="bookKeeper" jdbcType="VARCHAR" />
13
+    <result column="handler" property="handler" jdbcType="VARCHAR" />
14
+    <result column="house_id" property="houseId" jdbcType="INTEGER" />
15
+    <result column="number" property="number" jdbcType="VARCHAR" />
16
+    <result column="collator" property="collator" jdbcType="VARCHAR" />
17
+    <result column="use_count" property="useCount" jdbcType="INTEGER" />
18
+    <result column="remark" property="remark" jdbcType="VARCHAR" />
19
+    <result column="input_id" property="inputId" jdbcType="INTEGER" />
20
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
21
+  </resultMap>
22
+  <sql id="Example_Where_Clause" >
23
+    <where >
24
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
25
+        <if test="criteria.valid" >
26
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
27
+            <foreach collection="criteria.criteria" item="criterion" >
28
+              <choose >
29
+                <when test="criterion.noValue" >
30
+                  and ${criterion.condition}
31
+                </when>
32
+                <when test="criterion.singleValue" >
33
+                  and ${criterion.condition} #{criterion.value}
34
+                </when>
35
+                <when test="criterion.betweenValue" >
36
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
37
+                </when>
38
+                <when test="criterion.listValue" >
39
+                  and ${criterion.condition}
40
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
41
+                    #{listItem}
42
+                  </foreach>
43
+                </when>
44
+              </choose>
45
+            </foreach>
46
+          </trim>
47
+        </if>
48
+      </foreach>
49
+    </where>
50
+  </sql>
51
+  <sql id="Update_By_Example_Where_Clause" >
52
+    <where >
53
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
54
+        <if test="criteria.valid" >
55
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
56
+            <foreach collection="criteria.criteria" item="criterion" >
57
+              <choose >
58
+                <when test="criterion.noValue" >
59
+                  and ${criterion.condition}
60
+                </when>
61
+                <when test="criterion.singleValue" >
62
+                  and ${criterion.condition} #{criterion.value}
63
+                </when>
64
+                <when test="criterion.betweenValue" >
65
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
66
+                </when>
67
+                <when test="criterion.listValue" >
68
+                  and ${criterion.condition}
69
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
70
+                    #{listItem}
71
+                  </foreach>
72
+                </when>
73
+              </choose>
74
+            </foreach>
75
+          </trim>
76
+        </if>
77
+      </foreach>
78
+    </where>
79
+  </sql>
80
+  <sql id="Base_Column_List" >
81
+    id, device_type, get_time, device_name, model, get_count, back_count, book_keeper, 
82
+    handler, house_id, number, collator, use_count, remark, input_id, org_id
83
+  </sql>
84
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.StorageDevicegetExample" >
85
+    select
86
+    <if test="distinct" >
87
+      distinct
88
+    </if>
89
+    <include refid="Base_Column_List" />
90
+    from storage_deviceget
91
+    <if test="_parameter != null" >
92
+      <include refid="Example_Where_Clause" />
93
+    </if>
94
+    <if test="orderByClause != null" >
95
+      order by ${orderByClause}
96
+    </if>
97
+  </select>
98
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
99
+    select 
100
+    <include refid="Base_Column_List" />
101
+    from storage_deviceget
102
+    where id = #{id,jdbcType=INTEGER}
103
+  </select>
104
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
105
+    delete from storage_deviceget
106
+    where id = #{id,jdbcType=INTEGER}
107
+  </delete>
108
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicegetExample" >
109
+    delete from storage_deviceget
110
+    <if test="_parameter != null" >
111
+      <include refid="Example_Where_Clause" />
112
+    </if>
113
+  </delete>
114
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.StorageDeviceget" >
115
+    insert into storage_deviceget (id, device_type, get_time, 
116
+      device_name, model, get_count, 
117
+      back_count, book_keeper, handler, 
118
+      house_id, number, collator, 
119
+      use_count, remark, input_id, 
120
+      org_id)
121
+    values (#{id,jdbcType=INTEGER}, #{deviceType,jdbcType=INTEGER}, #{getTime,jdbcType=TIMESTAMP}, 
122
+      #{deviceName,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{getCount,jdbcType=INTEGER}, 
123
+      #{backCount,jdbcType=INTEGER}, #{bookKeeper,jdbcType=VARCHAR}, #{handler,jdbcType=VARCHAR}, 
124
+      #{houseId,jdbcType=INTEGER}, #{number,jdbcType=VARCHAR}, #{collator,jdbcType=VARCHAR}, 
125
+      #{useCount,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{inputId,jdbcType=INTEGER}, 
126
+      #{orgId,jdbcType=INTEGER})
127
+  </insert>
128
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.StorageDeviceget" >
129
+    insert into storage_deviceget
130
+    <trim prefix="(" suffix=")" suffixOverrides="," >
131
+      <if test="id != null" >
132
+        id,
133
+      </if>
134
+      <if test="deviceType != null" >
135
+        device_type,
136
+      </if>
137
+      <if test="getTime != null" >
138
+        get_time,
139
+      </if>
140
+      <if test="deviceName != null" >
141
+        device_name,
142
+      </if>
143
+      <if test="model != null" >
144
+        model,
145
+      </if>
146
+      <if test="getCount != null" >
147
+        get_count,
148
+      </if>
149
+      <if test="backCount != null" >
150
+        back_count,
151
+      </if>
152
+      <if test="bookKeeper != null" >
153
+        book_keeper,
154
+      </if>
155
+      <if test="handler != null" >
156
+        handler,
157
+      </if>
158
+      <if test="houseId != null" >
159
+        house_id,
160
+      </if>
161
+      <if test="number != null" >
162
+        number,
163
+      </if>
164
+      <if test="collator != null" >
165
+        collator,
166
+      </if>
167
+      <if test="useCount != null" >
168
+        use_count,
169
+      </if>
170
+      <if test="remark != null" >
171
+        remark,
172
+      </if>
173
+      <if test="inputId != null" >
174
+        input_id,
175
+      </if>
176
+      <if test="orgId != null" >
177
+        org_id,
178
+      </if>
179
+    </trim>
180
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
181
+      <if test="id != null" >
182
+        #{id,jdbcType=INTEGER},
183
+      </if>
184
+      <if test="deviceType != null" >
185
+        #{deviceType,jdbcType=INTEGER},
186
+      </if>
187
+      <if test="getTime != null" >
188
+        #{getTime,jdbcType=TIMESTAMP},
189
+      </if>
190
+      <if test="deviceName != null" >
191
+        #{deviceName,jdbcType=VARCHAR},
192
+      </if>
193
+      <if test="model != null" >
194
+        #{model,jdbcType=VARCHAR},
195
+      </if>
196
+      <if test="getCount != null" >
197
+        #{getCount,jdbcType=INTEGER},
198
+      </if>
199
+      <if test="backCount != null" >
200
+        #{backCount,jdbcType=INTEGER},
201
+      </if>
202
+      <if test="bookKeeper != null" >
203
+        #{bookKeeper,jdbcType=VARCHAR},
204
+      </if>
205
+      <if test="handler != null" >
206
+        #{handler,jdbcType=VARCHAR},
207
+      </if>
208
+      <if test="houseId != null" >
209
+        #{houseId,jdbcType=INTEGER},
210
+      </if>
211
+      <if test="number != null" >
212
+        #{number,jdbcType=VARCHAR},
213
+      </if>
214
+      <if test="collator != null" >
215
+        #{collator,jdbcType=VARCHAR},
216
+      </if>
217
+      <if test="useCount != null" >
218
+        #{useCount,jdbcType=INTEGER},
219
+      </if>
220
+      <if test="remark != null" >
221
+        #{remark,jdbcType=VARCHAR},
222
+      </if>
223
+      <if test="inputId != null" >
224
+        #{inputId,jdbcType=INTEGER},
225
+      </if>
226
+      <if test="orgId != null" >
227
+        #{orgId,jdbcType=INTEGER},
228
+      </if>
229
+    </trim>
230
+  </insert>
231
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicegetExample" resultType="java.lang.Integer" >
232
+    select count(*) from storage_deviceget
233
+    <if test="_parameter != null" >
234
+      <include refid="Example_Where_Clause" />
235
+    </if>
236
+  </select>
237
+  <update id="updateByExampleSelective" parameterType="map" >
238
+    update storage_deviceget
239
+    <set >
240
+      <if test="record.id != null" >
241
+        id = #{record.id,jdbcType=INTEGER},
242
+      </if>
243
+      <if test="record.deviceType != null" >
244
+        device_type = #{record.deviceType,jdbcType=INTEGER},
245
+      </if>
246
+      <if test="record.getTime != null" >
247
+        get_time = #{record.getTime,jdbcType=TIMESTAMP},
248
+      </if>
249
+      <if test="record.deviceName != null" >
250
+        device_name = #{record.deviceName,jdbcType=VARCHAR},
251
+      </if>
252
+      <if test="record.model != null" >
253
+        model = #{record.model,jdbcType=VARCHAR},
254
+      </if>
255
+      <if test="record.getCount != null" >
256
+        get_count = #{record.getCount,jdbcType=INTEGER},
257
+      </if>
258
+      <if test="record.backCount != null" >
259
+        back_count = #{record.backCount,jdbcType=INTEGER},
260
+      </if>
261
+      <if test="record.bookKeeper != null" >
262
+        book_keeper = #{record.bookKeeper,jdbcType=VARCHAR},
263
+      </if>
264
+      <if test="record.handler != null" >
265
+        handler = #{record.handler,jdbcType=VARCHAR},
266
+      </if>
267
+      <if test="record.houseId != null" >
268
+        house_id = #{record.houseId,jdbcType=INTEGER},
269
+      </if>
270
+      <if test="record.number != null" >
271
+        number = #{record.number,jdbcType=VARCHAR},
272
+      </if>
273
+      <if test="record.collator != null" >
274
+        collator = #{record.collator,jdbcType=VARCHAR},
275
+      </if>
276
+      <if test="record.useCount != null" >
277
+        use_count = #{record.useCount,jdbcType=INTEGER},
278
+      </if>
279
+      <if test="record.remark != null" >
280
+        remark = #{record.remark,jdbcType=VARCHAR},
281
+      </if>
282
+      <if test="record.inputId != null" >
283
+        input_id = #{record.inputId,jdbcType=INTEGER},
284
+      </if>
285
+      <if test="record.orgId != null" >
286
+        org_id = #{record.orgId,jdbcType=INTEGER},
287
+      </if>
288
+    </set>
289
+    <if test="_parameter != null" >
290
+      <include refid="Update_By_Example_Where_Clause" />
291
+    </if>
292
+  </update>
293
+  <update id="updateByExample" parameterType="map" >
294
+    update storage_deviceget
295
+    set id = #{record.id,jdbcType=INTEGER},
296
+      device_type = #{record.deviceType,jdbcType=INTEGER},
297
+      get_time = #{record.getTime,jdbcType=TIMESTAMP},
298
+      device_name = #{record.deviceName,jdbcType=VARCHAR},
299
+      model = #{record.model,jdbcType=VARCHAR},
300
+      get_count = #{record.getCount,jdbcType=INTEGER},
301
+      back_count = #{record.backCount,jdbcType=INTEGER},
302
+      book_keeper = #{record.bookKeeper,jdbcType=VARCHAR},
303
+      handler = #{record.handler,jdbcType=VARCHAR},
304
+      house_id = #{record.houseId,jdbcType=INTEGER},
305
+      number = #{record.number,jdbcType=VARCHAR},
306
+      collator = #{record.collator,jdbcType=VARCHAR},
307
+      use_count = #{record.useCount,jdbcType=INTEGER},
308
+      remark = #{record.remark,jdbcType=VARCHAR},
309
+      input_id = #{record.inputId,jdbcType=INTEGER},
310
+      org_id = #{record.orgId,jdbcType=INTEGER}
311
+    <if test="_parameter != null" >
312
+      <include refid="Update_By_Example_Where_Clause" />
313
+    </if>
314
+  </update>
315
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.StorageDeviceget" >
316
+    update storage_deviceget
317
+    <set >
318
+      <if test="deviceType != null" >
319
+        device_type = #{deviceType,jdbcType=INTEGER},
320
+      </if>
321
+      <if test="getTime != null" >
322
+        get_time = #{getTime,jdbcType=TIMESTAMP},
323
+      </if>
324
+      <if test="deviceName != null" >
325
+        device_name = #{deviceName,jdbcType=VARCHAR},
326
+      </if>
327
+      <if test="model != null" >
328
+        model = #{model,jdbcType=VARCHAR},
329
+      </if>
330
+      <if test="getCount != null" >
331
+        get_count = #{getCount,jdbcType=INTEGER},
332
+      </if>
333
+      <if test="backCount != null" >
334
+        back_count = #{backCount,jdbcType=INTEGER},
335
+      </if>
336
+      <if test="bookKeeper != null" >
337
+        book_keeper = #{bookKeeper,jdbcType=VARCHAR},
338
+      </if>
339
+      <if test="handler != null" >
340
+        handler = #{handler,jdbcType=VARCHAR},
341
+      </if>
342
+      <if test="houseId != null" >
343
+        house_id = #{houseId,jdbcType=INTEGER},
344
+      </if>
345
+      <if test="number != null" >
346
+        number = #{number,jdbcType=VARCHAR},
347
+      </if>
348
+      <if test="collator != null" >
349
+        collator = #{collator,jdbcType=VARCHAR},
350
+      </if>
351
+      <if test="useCount != null" >
352
+        use_count = #{useCount,jdbcType=INTEGER},
353
+      </if>
354
+      <if test="remark != null" >
355
+        remark = #{remark,jdbcType=VARCHAR},
356
+      </if>
357
+      <if test="inputId != null" >
358
+        input_id = #{inputId,jdbcType=INTEGER},
359
+      </if>
360
+      <if test="orgId != null" >
361
+        org_id = #{orgId,jdbcType=INTEGER},
362
+      </if>
363
+    </set>
364
+    where id = #{id,jdbcType=INTEGER}
365
+  </update>
366
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.StorageDeviceget" >
367
+    update storage_deviceget
368
+    set device_type = #{deviceType,jdbcType=INTEGER},
369
+      get_time = #{getTime,jdbcType=TIMESTAMP},
370
+      device_name = #{deviceName,jdbcType=VARCHAR},
371
+      model = #{model,jdbcType=VARCHAR},
372
+      get_count = #{getCount,jdbcType=INTEGER},
373
+      back_count = #{backCount,jdbcType=INTEGER},
374
+      book_keeper = #{bookKeeper,jdbcType=VARCHAR},
375
+      handler = #{handler,jdbcType=VARCHAR},
376
+      house_id = #{houseId,jdbcType=INTEGER},
377
+      number = #{number,jdbcType=VARCHAR},
378
+      collator = #{collator,jdbcType=VARCHAR},
379
+      use_count = #{useCount,jdbcType=INTEGER},
380
+      remark = #{remark,jdbcType=VARCHAR},
381
+      input_id = #{inputId,jdbcType=INTEGER},
382
+      org_id = #{orgId,jdbcType=INTEGER}
383
+    where id = #{id,jdbcType=INTEGER}
384
+  </update>
385
+  
386
+  <select id="selectByHouseId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
387
+    select 
388
+    house_id,device_type,device_name,model,get_count,back_count
389
+    from storage_deviceget
390
+    where house_id = #{houseId}
391
+  </select>
392
+  
393
+  <!-- 获取每个类型的使用数量  -->
394
+   <select id="queryCountByType"  resultType="java.util.Map">
395
+    select SUM(get_count) getCounts, device_type from storage_deviceget 
396
+    GROUP BY device_type 
397
+    order by device_type asc
398
+  </select>
399
+</mapper>

+ 733 - 0
bin/src/main/java/com/chinaitop/depot/device/mapper/StorageDeviceinputMapper.xml

@@ -0,0 +1,733 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.device.mapper.StorageDeviceinputMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.StorageDeviceinput" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="device_type" property="deviceType" jdbcType="INTEGER" />
7
+    <result column="device_name" property="deviceName" jdbcType="VARCHAR" />
8
+    <result column="model" property="model" jdbcType="VARCHAR" />
9
+    <result column="use_count" property="useCount" jdbcType="INTEGER" />
10
+    <result column="device_manager" property="deviceManager" jdbcType="VARCHAR" />
11
+    <result column="input_time" property="inputTime" jdbcType="TIMESTAMP" />
12
+    <result column="number" property="number" jdbcType="VARCHAR" />
13
+    <result column="unit" property="unit" jdbcType="VARCHAR" />
14
+    <result column="device_price" property="devicePrice" jdbcType="DECIMAL" />
15
+    <result column="storage_rack" property="storageRack" jdbcType="VARCHAR" />
16
+    <result column="storage_rack_cell" property="storageRackCell" jdbcType="VARCHAR" />
17
+    <result column="handler" property="handler" jdbcType="VARCHAR" />
18
+    <result column="book_keeper" property="bookKeeper" jdbcType="VARCHAR" />
19
+    <result column="producer" property="producer" jdbcType="VARCHAR" />
20
+    <result column="remark" property="remark" jdbcType="VARCHAR" />
21
+    <result column="service_life" property="serviceLife" jdbcType="DECIMAL" />
22
+    <result column="parent_id" property="parentId" jdbcType="INTEGER" />
23
+    <result column="position" property="position" jdbcType="VARCHAR" />
24
+    <result column="status" property="status" jdbcType="INTEGER" />
25
+    <result column="broken_count" property="brokenCount" jdbcType="INTEGER" />
26
+    <result column="produce_time" property="produceTime" jdbcType="TIMESTAMP" />
27
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
28
+  </resultMap>
29
+  <sql id="Example_Where_Clause" >
30
+    <where >
31
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
32
+        <if test="criteria.valid" >
33
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
34
+            <foreach collection="criteria.criteria" item="criterion" >
35
+              <choose >
36
+                <when test="criterion.noValue" >
37
+                  and ${criterion.condition}
38
+                </when>
39
+                <when test="criterion.singleValue" >
40
+                  and ${criterion.condition} #{criterion.value}
41
+                </when>
42
+                <when test="criterion.betweenValue" >
43
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
44
+                </when>
45
+                <when test="criterion.listValue" >
46
+                  and ${criterion.condition}
47
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
48
+                    #{listItem}
49
+                  </foreach>
50
+                </when>
51
+              </choose>
52
+            </foreach>
53
+          </trim>
54
+        </if>
55
+      </foreach>
56
+    </where>
57
+  </sql>
58
+  <sql id="Update_By_Example_Where_Clause" >
59
+    <where >
60
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
61
+        <if test="criteria.valid" >
62
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
63
+            <foreach collection="criteria.criteria" item="criterion" >
64
+              <choose >
65
+                <when test="criterion.noValue" >
66
+                  and ${criterion.condition}
67
+                </when>
68
+                <when test="criterion.singleValue" >
69
+                  and ${criterion.condition} #{criterion.value}
70
+                </when>
71
+                <when test="criterion.betweenValue" >
72
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
73
+                </when>
74
+                <when test="criterion.listValue" >
75
+                  and ${criterion.condition}
76
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
77
+                    #{listItem}
78
+                  </foreach>
79
+                </when>
80
+              </choose>
81
+            </foreach>
82
+          </trim>
83
+        </if>
84
+      </foreach>
85
+    </where>
86
+  </sql>
87
+  <sql id="Base_Column_List" >
88
+    id, device_type, device_name, model, use_count, device_manager, input_time, number, 
89
+    unit, device_price, storage_rack, storage_rack_cell, handler, book_keeper, producer, 
90
+    remark, service_life, parent_id, position, status, broken_count, produce_time, org_id
91
+  </sql>
92
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.StorageDeviceinputExample" >
93
+    select
94
+    <if test="distinct" >
95
+      distinct
96
+    </if>
97
+    <include refid="Base_Column_List" />
98
+    from storage_deviceinput
99
+    <if test="_parameter != null" >
100
+      <include refid="Example_Where_Clause" />
101
+    </if>
102
+    <if test="orderByClause != null" >
103
+      order by ${orderByClause}
104
+    </if>
105
+  </select>
106
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
107
+    select 
108
+    <include refid="Base_Column_List" />
109
+    from storage_deviceinput
110
+    where id = #{id,jdbcType=INTEGER}
111
+  </select>
112
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
113
+    delete from storage_deviceinput
114
+    where id = #{id,jdbcType=INTEGER}
115
+  </delete>
116
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.StorageDeviceinputExample" >
117
+    delete from storage_deviceinput
118
+    <if test="_parameter != null" >
119
+      <include refid="Example_Where_Clause" />
120
+    </if>
121
+  </delete>
122
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.StorageDeviceinput" >
123
+    insert into storage_deviceinput (id, device_type, device_name, 
124
+      model, use_count, device_manager, 
125
+      input_time, number, unit, 
126
+      device_price, storage_rack, storage_rack_cell, 
127
+      handler, book_keeper, producer, 
128
+      remark, service_life, parent_id, 
129
+      position, status, broken_count, 
130
+      produce_time, org_id)
131
+    values (#{id,jdbcType=INTEGER}, #{deviceType,jdbcType=INTEGER}, #{deviceName,jdbcType=VARCHAR}, 
132
+      #{model,jdbcType=VARCHAR}, #{useCount,jdbcType=INTEGER}, #{deviceManager,jdbcType=VARCHAR}, 
133
+      #{inputTime,jdbcType=TIMESTAMP}, #{number,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, 
134
+      #{devicePrice,jdbcType=DECIMAL}, #{storageRack,jdbcType=VARCHAR}, #{storageRackCell,jdbcType=VARCHAR}, 
135
+      #{handler,jdbcType=VARCHAR}, #{bookKeeper,jdbcType=VARCHAR}, #{producer,jdbcType=VARCHAR}, 
136
+      #{remark,jdbcType=VARCHAR}, #{serviceLife,jdbcType=DECIMAL}, #{parentId,jdbcType=INTEGER}, 
137
+      #{position,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{brokenCount,jdbcType=INTEGER}, 
138
+      #{produceTime,jdbcType=TIMESTAMP}, #{orgId,jdbcType=INTEGER})
139
+  </insert>
140
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.StorageDeviceinput" >
141
+    insert into storage_deviceinput
142
+    <trim prefix="(" suffix=")" suffixOverrides="," >
143
+      <if test="id != null" >
144
+        id,
145
+      </if>
146
+      <if test="deviceType != null" >
147
+        device_type,
148
+      </if>
149
+      <if test="deviceName != null" >
150
+        device_name,
151
+      </if>
152
+      <if test="model != null" >
153
+        model,
154
+      </if>
155
+      <if test="useCount != null" >
156
+        use_count,
157
+      </if>
158
+      <if test="deviceManager != null" >
159
+        device_manager,
160
+      </if>
161
+      <if test="inputTime != null" >
162
+        input_time,
163
+      </if>
164
+      <if test="number != null" >
165
+        number,
166
+      </if>
167
+      <if test="unit != null" >
168
+        unit,
169
+      </if>
170
+      <if test="devicePrice != null" >
171
+        device_price,
172
+      </if>
173
+      <if test="storageRack != null" >
174
+        storage_rack,
175
+      </if>
176
+      <if test="storageRackCell != null" >
177
+        storage_rack_cell,
178
+      </if>
179
+      <if test="handler != null" >
180
+        handler,
181
+      </if>
182
+      <if test="bookKeeper != null" >
183
+        book_keeper,
184
+      </if>
185
+      <if test="producer != null" >
186
+        producer,
187
+      </if>
188
+      <if test="remark != null" >
189
+        remark,
190
+      </if>
191
+      <if test="serviceLife != null" >
192
+        service_life,
193
+      </if>
194
+      <if test="parentId != null" >
195
+        parent_id,
196
+      </if>
197
+      <if test="position != null" >
198
+        position,
199
+      </if>
200
+      <if test="status != null" >
201
+        status,
202
+      </if>
203
+      <if test="brokenCount != null" >
204
+        broken_count,
205
+      </if>
206
+      <if test="produceTime != null" >
207
+        produce_time,
208
+      </if>
209
+      <if test="orgId != null" >
210
+        org_id,
211
+      </if>
212
+    </trim>
213
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
214
+      <if test="id != null" >
215
+        #{id,jdbcType=INTEGER},
216
+      </if>
217
+      <if test="deviceType != null" >
218
+        #{deviceType,jdbcType=INTEGER},
219
+      </if>
220
+      <if test="deviceName != null" >
221
+        #{deviceName,jdbcType=VARCHAR},
222
+      </if>
223
+      <if test="model != null" >
224
+        #{model,jdbcType=VARCHAR},
225
+      </if>
226
+      <if test="useCount != null" >
227
+        #{useCount,jdbcType=INTEGER},
228
+      </if>
229
+      <if test="deviceManager != null" >
230
+        #{deviceManager,jdbcType=VARCHAR},
231
+      </if>
232
+      <if test="inputTime != null" >
233
+        #{inputTime,jdbcType=TIMESTAMP},
234
+      </if>
235
+      <if test="number != null" >
236
+        #{number,jdbcType=VARCHAR},
237
+      </if>
238
+      <if test="unit != null" >
239
+        #{unit,jdbcType=VARCHAR},
240
+      </if>
241
+      <if test="devicePrice != null" >
242
+        #{devicePrice,jdbcType=DECIMAL},
243
+      </if>
244
+      <if test="storageRack != null" >
245
+        #{storageRack,jdbcType=VARCHAR},
246
+      </if>
247
+      <if test="storageRackCell != null" >
248
+        #{storageRackCell,jdbcType=VARCHAR},
249
+      </if>
250
+      <if test="handler != null" >
251
+        #{handler,jdbcType=VARCHAR},
252
+      </if>
253
+      <if test="bookKeeper != null" >
254
+        #{bookKeeper,jdbcType=VARCHAR},
255
+      </if>
256
+      <if test="producer != null" >
257
+        #{producer,jdbcType=VARCHAR},
258
+      </if>
259
+      <if test="remark != null" >
260
+        #{remark,jdbcType=VARCHAR},
261
+      </if>
262
+      <if test="serviceLife != null" >
263
+        #{serviceLife,jdbcType=DECIMAL},
264
+      </if>
265
+      <if test="parentId != null" >
266
+        #{parentId,jdbcType=INTEGER},
267
+      </if>
268
+      <if test="position != null" >
269
+        #{position,jdbcType=VARCHAR},
270
+      </if>
271
+      <if test="status != null" >
272
+        #{status,jdbcType=INTEGER},
273
+      </if>
274
+      <if test="brokenCount != null" >
275
+        #{brokenCount,jdbcType=INTEGER},
276
+      </if>
277
+      <if test="produceTime != null" >
278
+        #{produceTime,jdbcType=TIMESTAMP},
279
+      </if>
280
+      <if test="orgId != null" >
281
+        #{orgId,jdbcType=INTEGER},
282
+      </if>
283
+    </trim>
284
+  </insert>
285
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.StorageDeviceinputExample" resultType="java.lang.Integer" >
286
+    select count(*) from storage_deviceinput
287
+    <if test="_parameter != null" >
288
+      <include refid="Example_Where_Clause" />
289
+    </if>
290
+  </select>
291
+  <update id="updateByExampleSelective" parameterType="map" >
292
+    update storage_deviceinput
293
+    <set >
294
+      <if test="record.id != null" >
295
+        id = #{record.id,jdbcType=INTEGER},
296
+      </if>
297
+      <if test="record.deviceType != null" >
298
+        device_type = #{record.deviceType,jdbcType=INTEGER},
299
+      </if>
300
+      <if test="record.deviceName != null" >
301
+        device_name = #{record.deviceName,jdbcType=VARCHAR},
302
+      </if>
303
+      <if test="record.model != null" >
304
+        model = #{record.model,jdbcType=VARCHAR},
305
+      </if>
306
+      <if test="record.useCount != null" >
307
+        use_count = #{record.useCount,jdbcType=INTEGER},
308
+      </if>
309
+      <if test="record.deviceManager != null" >
310
+        device_manager = #{record.deviceManager,jdbcType=VARCHAR},
311
+      </if>
312
+      <if test="record.inputTime != null" >
313
+        input_time = #{record.inputTime,jdbcType=TIMESTAMP},
314
+      </if>
315
+      <if test="record.number != null" >
316
+        number = #{record.number,jdbcType=VARCHAR},
317
+      </if>
318
+      <if test="record.unit != null" >
319
+        unit = #{record.unit,jdbcType=VARCHAR},
320
+      </if>
321
+      <if test="record.devicePrice != null" >
322
+        device_price = #{record.devicePrice,jdbcType=DECIMAL},
323
+      </if>
324
+      <if test="record.storageRack != null" >
325
+        storage_rack = #{record.storageRack,jdbcType=VARCHAR},
326
+      </if>
327
+      <if test="record.storageRackCell != null" >
328
+        storage_rack_cell = #{record.storageRackCell,jdbcType=VARCHAR},
329
+      </if>
330
+      <if test="record.handler != null" >
331
+        handler = #{record.handler,jdbcType=VARCHAR},
332
+      </if>
333
+      <if test="record.bookKeeper != null" >
334
+        book_keeper = #{record.bookKeeper,jdbcType=VARCHAR},
335
+      </if>
336
+      <if test="record.producer != null" >
337
+        producer = #{record.producer,jdbcType=VARCHAR},
338
+      </if>
339
+      <if test="record.remark != null" >
340
+        remark = #{record.remark,jdbcType=VARCHAR},
341
+      </if>
342
+      <if test="record.serviceLife != null" >
343
+        service_life = #{record.serviceLife,jdbcType=DECIMAL},
344
+      </if>
345
+      <if test="record.parentId != null" >
346
+        parent_id = #{record.parentId,jdbcType=INTEGER},
347
+      </if>
348
+      <if test="record.position != null" >
349
+        position = #{record.position,jdbcType=VARCHAR},
350
+      </if>
351
+      <if test="record.status != null" >
352
+        status = #{record.status,jdbcType=INTEGER},
353
+      </if>
354
+      <if test="record.brokenCount != null" >
355
+        broken_count = #{record.brokenCount,jdbcType=INTEGER},
356
+      </if>
357
+      <if test="record.produceTime != null" >
358
+        produce_time = #{record.produceTime,jdbcType=TIMESTAMP},
359
+      </if>
360
+      <if test="record.orgId != null" >
361
+        org_id = #{record.orgId,jdbcType=INTEGER},
362
+      </if>
363
+    </set>
364
+    <if test="_parameter != null" >
365
+      <include refid="Update_By_Example_Where_Clause" />
366
+    </if>
367
+  </update>
368
+  <update id="updateByExample" parameterType="map" >
369
+    update storage_deviceinput
370
+    set id = #{record.id,jdbcType=INTEGER},
371
+      device_type = #{record.deviceType,jdbcType=INTEGER},
372
+      device_name = #{record.deviceName,jdbcType=VARCHAR},
373
+      model = #{record.model,jdbcType=VARCHAR},
374
+      use_count = #{record.useCount,jdbcType=INTEGER},
375
+      device_manager = #{record.deviceManager,jdbcType=VARCHAR},
376
+      input_time = #{record.inputTime,jdbcType=TIMESTAMP},
377
+      number = #{record.number,jdbcType=VARCHAR},
378
+      unit = #{record.unit,jdbcType=VARCHAR},
379
+      device_price = #{record.devicePrice,jdbcType=DECIMAL},
380
+      storage_rack = #{record.storageRack,jdbcType=VARCHAR},
381
+      storage_rack_cell = #{record.storageRackCell,jdbcType=VARCHAR},
382
+      handler = #{record.handler,jdbcType=VARCHAR},
383
+      book_keeper = #{record.bookKeeper,jdbcType=VARCHAR},
384
+      producer = #{record.producer,jdbcType=VARCHAR},
385
+      remark = #{record.remark,jdbcType=VARCHAR},
386
+      service_life = #{record.serviceLife,jdbcType=DECIMAL},
387
+      parent_id = #{record.parentId,jdbcType=INTEGER},
388
+      position = #{record.position,jdbcType=VARCHAR},
389
+      status = #{record.status,jdbcType=INTEGER},
390
+      broken_count = #{record.brokenCount,jdbcType=INTEGER},
391
+      produce_time = #{record.produceTime,jdbcType=TIMESTAMP},
392
+      org_id = #{record.orgId,jdbcType=INTEGER}
393
+    <if test="_parameter != null" >
394
+      <include refid="Update_By_Example_Where_Clause" />
395
+    </if>
396
+  </update>
397
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.StorageDeviceinput" >
398
+    update storage_deviceinput
399
+    <set >
400
+      <if test="deviceType != null" >
401
+        device_type = #{deviceType,jdbcType=INTEGER},
402
+      </if>
403
+      <if test="deviceName != null" >
404
+        device_name = #{deviceName,jdbcType=VARCHAR},
405
+      </if>
406
+      <if test="model != null" >
407
+        model = #{model,jdbcType=VARCHAR},
408
+      </if>
409
+      <if test="useCount != null" >
410
+        use_count = #{useCount,jdbcType=INTEGER},
411
+      </if>
412
+      <if test="deviceManager != null" >
413
+        device_manager = #{deviceManager,jdbcType=VARCHAR},
414
+      </if>
415
+      <if test="inputTime != null" >
416
+        input_time = #{inputTime,jdbcType=TIMESTAMP},
417
+      </if>
418
+      <if test="number != null" >
419
+        number = #{number,jdbcType=VARCHAR},
420
+      </if>
421
+      <if test="unit != null" >
422
+        unit = #{unit,jdbcType=VARCHAR},
423
+      </if>
424
+      <if test="devicePrice != null" >
425
+        device_price = #{devicePrice,jdbcType=DECIMAL},
426
+      </if>
427
+      <if test="storageRack != null" >
428
+        storage_rack = #{storageRack,jdbcType=VARCHAR},
429
+      </if>
430
+      <if test="storageRackCell != null" >
431
+        storage_rack_cell = #{storageRackCell,jdbcType=VARCHAR},
432
+      </if>
433
+      <if test="handler != null" >
434
+        handler = #{handler,jdbcType=VARCHAR},
435
+      </if>
436
+      <if test="bookKeeper != null" >
437
+        book_keeper = #{bookKeeper,jdbcType=VARCHAR},
438
+      </if>
439
+      <if test="producer != null" >
440
+        producer = #{producer,jdbcType=VARCHAR},
441
+      </if>
442
+      <if test="remark != null" >
443
+        remark = #{remark,jdbcType=VARCHAR},
444
+      </if>
445
+      <if test="serviceLife != null" >
446
+        service_life = #{serviceLife,jdbcType=DECIMAL},
447
+      </if>
448
+      <if test="parentId != null" >
449
+        parent_id = #{parentId,jdbcType=INTEGER},
450
+      </if>
451
+      <if test="position != null" >
452
+        position = #{position,jdbcType=VARCHAR},
453
+      </if>
454
+      <if test="status != null" >
455
+        status = #{status,jdbcType=INTEGER},
456
+      </if>
457
+      <if test="brokenCount != null" >
458
+        broken_count = #{brokenCount,jdbcType=INTEGER},
459
+      </if>
460
+      <if test="produceTime != null" >
461
+        produce_time = #{produceTime,jdbcType=TIMESTAMP},
462
+      </if>
463
+      <if test="orgId != null" >
464
+        org_id = #{orgId,jdbcType=INTEGER},
465
+      </if>
466
+    </set>
467
+    where id = #{id,jdbcType=INTEGER}
468
+  </update>
469
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.StorageDeviceinput" >
470
+    update storage_deviceinput
471
+    set device_type = #{deviceType,jdbcType=INTEGER},
472
+      device_name = #{deviceName,jdbcType=VARCHAR},
473
+      model = #{model,jdbcType=VARCHAR},
474
+      use_count = #{useCount,jdbcType=INTEGER},
475
+      device_manager = #{deviceManager,jdbcType=VARCHAR},
476
+      input_time = #{inputTime,jdbcType=TIMESTAMP},
477
+      number = #{number,jdbcType=VARCHAR},
478
+      unit = #{unit,jdbcType=VARCHAR},
479
+      device_price = #{devicePrice,jdbcType=DECIMAL},
480
+      storage_rack = #{storageRack,jdbcType=VARCHAR},
481
+      storage_rack_cell = #{storageRackCell,jdbcType=VARCHAR},
482
+      handler = #{handler,jdbcType=VARCHAR},
483
+      book_keeper = #{bookKeeper,jdbcType=VARCHAR},
484
+      producer = #{producer,jdbcType=VARCHAR},
485
+      remark = #{remark,jdbcType=VARCHAR},
486
+      service_life = #{serviceLife,jdbcType=DECIMAL},
487
+      parent_id = #{parentId,jdbcType=INTEGER},
488
+      position = #{position,jdbcType=VARCHAR},
489
+      status = #{status,jdbcType=INTEGER},
490
+      broken_count = #{brokenCount,jdbcType=INTEGER},
491
+      produce_time = #{produceTime,jdbcType=TIMESTAMP},
492
+      org_id = #{orgId,jdbcType=INTEGER}
493
+    where id = #{id,jdbcType=INTEGER}
494
+  </update>
495
+  
496
+  <!-- 自定义sql -->
497
+
498
+   <select id="getHouseList" resultType="com.chinaitop.depot.device.model.HouseNameBean">
499
+
500
+  	select s.depot_id depotId,b.storehouse_name storeName from storage_deviceinput s left join basic_storehouse b on s.depot_id=b.storehouse_id GROUP BY s.depot_id;
501
+
502
+   </select>
503
+
504
+  
505
+
506
+  <select id="getTypeList" parameterType="java.lang.Integer" resultType="com.chinaitop.depot.device.model.HouseTypeBean">
507
+
508
+  	select s.depot_id depotId,s.device_type deviceType,cc.enumName enumName from storage_deviceinput s left join basic_enum cc on cc.enumId = s.device_type where s.depot_id = #{depotId};
509
+
510
+  </select>
511
+
512
+  
513
+
514
+  <select id="getNameList" parameterType="java.lang.Integer" resultType="com.chinaitop.depot.device.model.ShelfContentBean">
515
+
516
+    select DISTINCT (be.enumName),sd.device_name from storage_deviceinput sd left join basic_enum be on be.enumId=sd.device_name  where device_type=#{deviceTypeId} and `status`!=1 and use_count!=0;
517
+
518
+   </select>
519
+
520
+  
521
+
522
+  <select id="getcontentGetList" parameterType="java.util.Map" resultType="com.chinaitop.depot.device.model.ContentBean">
523
+
524
+  	select s.device_type deviceType,s.device_name deviceName,s.model model,s.number number,s.use_count useCount from storage_deviceinput s where s.device_name = #{deviceName};
525
+
526
+  </select>
527
+
528
+  
529
+
530
+  <select id="getShelfGetList" parameterType="java.lang.String" resultType="com.chinaitop.depot.device.model.ContentBean">
531
+
532
+    select shelf_id shelfId,id  from basic_equipment_equipment_pool bee
533
+
534
+	where id in 
535
+
536
+	(select sd.storage_rack from storage_deviceinput sd left join basic_enum be on be.enumId=sd.device_name 
537
+
538
+	WHERE sd.device_name in (select enumId from basic_enum where enumName=#{deviceName}))
539
+
540
+  </select>
541
+
542
+  
543
+
544
+  <select id="getDeviceInputList" parameterType="java.lang.Integer" resultMap="BaseResultMap">
545
+
546
+    select  DISTINCT(device_name)  from storage_deviceinput where depot_id=#{depotId}; 
547
+
548
+  </select>
549
+
550
+  
551
+
552
+  <select id="getModelList" parameterType="java.lang.String" resultMap="BaseResultMap">
553
+
554
+   select  DISTINCT(model) from storage_deviceinput where device_name=#{deviceName};
555
+
556
+  </select>
557
+
558
+  
559
+
560
+  <select id="getNumberList" parameterType="java.lang.String" resultMap="BaseResultMap">
561
+
562
+   select number from storage_deviceinput where model=#{deviceModel};
563
+
564
+  </select>
565
+
566
+  
567
+
568
+  <select id="getCountList" parameterType="java.lang.String" resultMap="BaseResultMap">
569
+
570
+   select use_count,broken_count from storage_deviceinput where number=#{number};
571
+
572
+  </select>
573
+
574
+  
575
+
576
+   <select id="getAllList" parameterType="java.lang.String" resultMap="BaseResultMap">
577
+
578
+   select  <include refid="Base_Column_List" /> from storage_deviceinput where number=#{number};
579
+
580
+  </select>
581
+
582
+  
583
+
584
+   <select id="getModelGetList" parameterType="java.util.Map" resultMap="BaseResultMap">
585
+
586
+   select distinct sd.model from storage_deviceinput sd where device_name In (select enumId from basic_enum where  enumName=#{deviceName}) and 
587
+
588
+   storage_rack IN (select id  from basic_equipment_equipment_pool bee where shelf_id=#{storageRack}) ;
589
+
590
+  </select>
591
+
592
+  
593
+
594
+   <select id="getNumberGetList" parameterType="java.util.Map" resultMap="BaseResultMap">
595
+
596
+   select <include refid="Base_Column_List" /> from storage_deviceinput where model=#{model} and device_type=#{deviceTypeId} and
597
+    device_name In (select enumId from basic_enum where  enumName=#{deviceName}) and 
598
+    storage_rack IN (select id  from basic_equipment_equipment_pool where shelf_id=#{shelfId}) and org_id=#{orgId}; 
599
+
600
+  </select>
601
+
602
+  
603
+
604
+   <select id="getUseCountGetList" parameterType="java.lang.String" resultMap="BaseResultMap">
605
+
606
+   select <include refid="Base_Column_List" /> from storage_deviceinput where number=#{number};
607
+
608
+  </select>
609
+
610
+  
611
+
612
+   <select id="getUseCount" parameterType="java.util.Map" resultMap="BaseResultMap">
613
+
614
+   select <include refid="Base_Column_List" /> from storage_deviceinput where number=#{number} and model=#{model}
615
+    and device_type=#{deviceTypeId} and
616
+    device_name In (select enumId from basic_enum where  enumName=#{deviceName}) and 
617
+    storage_rack IN (select id  from basic_equipment_equipment_pool where shelf_id=#{shelfId}) and org_id=#{orgId};
618
+
619
+  </select>
620
+
621
+  
622
+
623
+  
624
+
625
+  
626
+
627
+  
628
+
629
+  <resultMap id="DeviceInputMap" type="com.chinaitop.depot.device.model.StorageDeviceinput">
630
+
631
+    <result column="device_name" jdbcType="VARCHAR" property="deviceName" />
632
+
633
+    <result column="inputDeviceName" jdbcType="VARCHAR" property="inputDeviceName" />
634
+
635
+    </resultMap>
636
+
637
+  
638
+
639
+  <select id="getdevieName" resultMap="DeviceInputMap">
640
+
641
+     select distinct d.device_name,d.device_type,b.enumName inputDeviceName from storage_deviceinput d left join basic_enum  b on  b.enumId=d.device_name where `status`=0 and device_type=5476 and use_count!=0
642
+
643
+  </select>
644
+
645
+  
646
+
647
+  <select id="getRepairNameList" resultMap="DeviceInputMap">
648
+
649
+	select distinct d.device_name,d.device_type,b.enumName inputDeviceName from storage_deviceinput d left join basic_enum  b on  b.enumId=d.device_name where `status`=5 and device_type=5476 and broken_count!=0
650
+
651
+  </select>
652
+
653
+  
654
+
655
+  <select id="getDeviceModelList" parameterType="java.lang.String" resultType="com.chinaitop.depot.device.model.StorageDeviceinput">
656
+
657
+    select  model,number,use_count from storage_deviceinput where device_name=#{deviceName} and `status`=0
658
+
659
+  </select>
660
+
661
+  
662
+
663
+  <select id="getDeviceModelRepair" parameterType="java.lang.String" resultType="com.chinaitop.depot.device.model.StorageDeviceinput">
664
+
665
+    select  model,number,use_count from storage_deviceinput where device_name=#{deviceName} and `status`=5
666
+
667
+  </select>
668
+
669
+  
670
+
671
+  <!-- <select id="getDeviceModelListRepair" parameterType="java.lang.String" resultType="com.chinaitop.depot.device.model.StorageDeviceinput">
672
+
673
+    select  model,number,use_count from storage_deviceinput where device_name=#{deviceName} and `status`=5
674
+
675
+  </select> -->
676
+  
677
+  
678
+  <!-- 每个类型的入库数量 -->
679
+  <select id="queryCountByType"  resultType="java.util.Map">
680
+
681
+    SELECT
682
+		SUM(use_count) userCounts,
683
+		sum(device_manager) sumCounts,
684
+		IFNULL(SUM(broken_count), 0) brokenCount,
685
+		device_type
686
+    FROM
687
+	    storage_deviceinput
688
+    GROUP BY
689
+	    device_type
690
+    ORDER BY
691
+	    device_type ASC
692
+    
693
+  </select>
694
+
695
+  
696
+
697
+   <!-- 设备数据 -->
698
+
699
+  <select id="queryDevice" resultMap="BaseResultMap" parameterType="map">
700
+
701
+		 SELECT
702
+
703
+			<include refid="Base_Column_List" />
704
+
705
+		FROM
706
+
707
+			storage_deviceinput where device_type=5476  order by status asc
708
+
709
+  </select>
710
+  
711
+  <!-- 台账 -->
712
+  <select id="queryDeviceAccount" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.StorageDeviceinputExample" >
713
+    SELECT
714
+	id,
715
+	device_type,
716
+	device_name,
717
+	model,
718
+	SUM(use_count) use_count,
719
+	SUM(broken_count) broken_count
720
+FROM
721
+	storage_deviceinput
722
+	<if test="_parameter != null" >
723
+      <include refid="Example_Where_Clause" />
724
+    </if>
725
+GROUP BY
726
+	model,
727
+	device_name,
728
+	device_type
729
+    <if test="orderByClause != null" >
730
+      order by ${orderByClause}
731
+    </if>
732
+  </select>
733
+</mapper>

+ 310 - 0
bin/src/main/java/com/chinaitop/depot/device/mapper/StorageDevicekeepMapper.xml

@@ -0,0 +1,310 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.device.mapper.StorageDevicekeepMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.StorageDevicekeep" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
7
+    <result column="device_name" property="deviceName" jdbcType="VARCHAR" />
8
+    <result column="model" property="model" jdbcType="VARCHAR" />
9
+    <result column="keep_start" property="keepStart" jdbcType="TIMESTAMP" />
10
+    <result column="keep_end" property="keepEnd" jdbcType="TIMESTAMP" />
11
+    <result column="keeper" property="keeper" jdbcType="VARCHAR" />
12
+    <result column="device_manager" property="deviceManager" jdbcType="VARCHAR" />
13
+    <result column="number" property="number" jdbcType="VARCHAR" />
14
+    <result column="keep_status" property="keepStatus" jdbcType="INTEGER" />
15
+    <result column="input_id" property="inputId" jdbcType="INTEGER" />
16
+  </resultMap>
17
+  <sql id="Example_Where_Clause" >
18
+    <where >
19
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
20
+        <if test="criteria.valid" >
21
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
22
+            <foreach collection="criteria.criteria" item="criterion" >
23
+              <choose >
24
+                <when test="criterion.noValue" >
25
+                  and ${criterion.condition}
26
+                </when>
27
+                <when test="criterion.singleValue" >
28
+                  and ${criterion.condition} #{criterion.value}
29
+                </when>
30
+                <when test="criterion.betweenValue" >
31
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
32
+                </when>
33
+                <when test="criterion.listValue" >
34
+                  and ${criterion.condition}
35
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
36
+                    #{listItem}
37
+                  </foreach>
38
+                </when>
39
+              </choose>
40
+            </foreach>
41
+          </trim>
42
+        </if>
43
+      </foreach>
44
+    </where>
45
+  </sql>
46
+  <sql id="Update_By_Example_Where_Clause" >
47
+    <where >
48
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
49
+        <if test="criteria.valid" >
50
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
51
+            <foreach collection="criteria.criteria" item="criterion" >
52
+              <choose >
53
+                <when test="criterion.noValue" >
54
+                  and ${criterion.condition}
55
+                </when>
56
+                <when test="criterion.singleValue" >
57
+                  and ${criterion.condition} #{criterion.value}
58
+                </when>
59
+                <when test="criterion.betweenValue" >
60
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
61
+                </when>
62
+                <when test="criterion.listValue" >
63
+                  and ${criterion.condition}
64
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
65
+                    #{listItem}
66
+                  </foreach>
67
+                </when>
68
+              </choose>
69
+            </foreach>
70
+          </trim>
71
+        </if>
72
+      </foreach>
73
+    </where>
74
+  </sql>
75
+  <sql id="Base_Column_List" >
76
+    id, org_id, device_name, model, keep_start, keep_end, keeper, device_manager, number, 
77
+    keep_status, input_id
78
+  </sql>
79
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.StorageDevicekeepExample" >
80
+    select
81
+    <if test="distinct" >
82
+      distinct
83
+    </if>
84
+    <include refid="Base_Column_List" />
85
+    from storage_devicekeep
86
+    <if test="_parameter != null" >
87
+      <include refid="Example_Where_Clause" />
88
+    </if>
89
+    <if test="orderByClause != null" >
90
+      order by ${orderByClause}
91
+    </if>
92
+  </select>
93
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
94
+    select 
95
+    <include refid="Base_Column_List" />
96
+    from storage_devicekeep
97
+    where id = #{id,jdbcType=INTEGER}
98
+  </select>
99
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
100
+    delete from storage_devicekeep
101
+    where id = #{id,jdbcType=INTEGER}
102
+  </delete>
103
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicekeepExample" >
104
+    delete from storage_devicekeep
105
+    <if test="_parameter != null" >
106
+      <include refid="Example_Where_Clause" />
107
+    </if>
108
+  </delete>
109
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.StorageDevicekeep" >
110
+    insert into storage_devicekeep (id, org_id, device_name, 
111
+      model, keep_start, keep_end, 
112
+      keeper, device_manager, number, 
113
+      keep_status, input_id)
114
+    values (#{id,jdbcType=INTEGER}, #{orgId,jdbcType=INTEGER}, #{deviceName,jdbcType=VARCHAR}, 
115
+      #{model,jdbcType=VARCHAR}, #{keepStart,jdbcType=TIMESTAMP}, #{keepEnd,jdbcType=TIMESTAMP}, 
116
+      #{keeper,jdbcType=VARCHAR}, #{deviceManager,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, 
117
+      #{keepStatus,jdbcType=INTEGER}, #{inputId,jdbcType=INTEGER})
118
+  </insert>
119
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.StorageDevicekeep" >
120
+    insert into storage_devicekeep
121
+    <trim prefix="(" suffix=")" suffixOverrides="," >
122
+      <if test="id != null" >
123
+        id,
124
+      </if>
125
+      <if test="orgId != null" >
126
+        org_id,
127
+      </if>
128
+      <if test="deviceName != null" >
129
+        device_name,
130
+      </if>
131
+      <if test="model != null" >
132
+        model,
133
+      </if>
134
+      <if test="keepStart != null" >
135
+        keep_start,
136
+      </if>
137
+      <if test="keepEnd != null" >
138
+        keep_end,
139
+      </if>
140
+      <if test="keeper != null" >
141
+        keeper,
142
+      </if>
143
+      <if test="deviceManager != null" >
144
+        device_manager,
145
+      </if>
146
+      <if test="number != null" >
147
+        number,
148
+      </if>
149
+      <if test="keepStatus != null" >
150
+        keep_status,
151
+      </if>
152
+      <if test="inputId != null" >
153
+        input_id,
154
+      </if>
155
+    </trim>
156
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
157
+      <if test="id != null" >
158
+        #{id,jdbcType=INTEGER},
159
+      </if>
160
+      <if test="orgId != null" >
161
+        #{orgId,jdbcType=INTEGER},
162
+      </if>
163
+      <if test="deviceName != null" >
164
+        #{deviceName,jdbcType=VARCHAR},
165
+      </if>
166
+      <if test="model != null" >
167
+        #{model,jdbcType=VARCHAR},
168
+      </if>
169
+      <if test="keepStart != null" >
170
+        #{keepStart,jdbcType=TIMESTAMP},
171
+      </if>
172
+      <if test="keepEnd != null" >
173
+        #{keepEnd,jdbcType=TIMESTAMP},
174
+      </if>
175
+      <if test="keeper != null" >
176
+        #{keeper,jdbcType=VARCHAR},
177
+      </if>
178
+      <if test="deviceManager != null" >
179
+        #{deviceManager,jdbcType=VARCHAR},
180
+      </if>
181
+      <if test="number != null" >
182
+        #{number,jdbcType=VARCHAR},
183
+      </if>
184
+      <if test="keepStatus != null" >
185
+        #{keepStatus,jdbcType=INTEGER},
186
+      </if>
187
+      <if test="inputId != null" >
188
+        #{inputId,jdbcType=INTEGER},
189
+      </if>
190
+    </trim>
191
+  </insert>
192
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicekeepExample" resultType="java.lang.Integer" >
193
+    select count(*) from storage_devicekeep
194
+    <if test="_parameter != null" >
195
+      <include refid="Example_Where_Clause" />
196
+    </if>
197
+  </select>
198
+  <update id="updateByExampleSelective" parameterType="map" >
199
+    update storage_devicekeep
200
+    <set >
201
+      <if test="record.id != null" >
202
+        id = #{record.id,jdbcType=INTEGER},
203
+      </if>
204
+      <if test="record.orgId != null" >
205
+        org_id = #{record.orgId,jdbcType=INTEGER},
206
+      </if>
207
+      <if test="record.deviceName != null" >
208
+        device_name = #{record.deviceName,jdbcType=VARCHAR},
209
+      </if>
210
+      <if test="record.model != null" >
211
+        model = #{record.model,jdbcType=VARCHAR},
212
+      </if>
213
+      <if test="record.keepStart != null" >
214
+        keep_start = #{record.keepStart,jdbcType=TIMESTAMP},
215
+      </if>
216
+      <if test="record.keepEnd != null" >
217
+        keep_end = #{record.keepEnd,jdbcType=TIMESTAMP},
218
+      </if>
219
+      <if test="record.keeper != null" >
220
+        keeper = #{record.keeper,jdbcType=VARCHAR},
221
+      </if>
222
+      <if test="record.deviceManager != null" >
223
+        device_manager = #{record.deviceManager,jdbcType=VARCHAR},
224
+      </if>
225
+      <if test="record.number != null" >
226
+        number = #{record.number,jdbcType=VARCHAR},
227
+      </if>
228
+      <if test="record.keepStatus != null" >
229
+        keep_status = #{record.keepStatus,jdbcType=INTEGER},
230
+      </if>
231
+      <if test="record.inputId != null" >
232
+        input_id = #{record.inputId,jdbcType=INTEGER},
233
+      </if>
234
+    </set>
235
+    <if test="_parameter != null" >
236
+      <include refid="Update_By_Example_Where_Clause" />
237
+    </if>
238
+  </update>
239
+  <update id="updateByExample" parameterType="map" >
240
+    update storage_devicekeep
241
+    set id = #{record.id,jdbcType=INTEGER},
242
+      org_id = #{record.orgId,jdbcType=INTEGER},
243
+      device_name = #{record.deviceName,jdbcType=VARCHAR},
244
+      model = #{record.model,jdbcType=VARCHAR},
245
+      keep_start = #{record.keepStart,jdbcType=TIMESTAMP},
246
+      keep_end = #{record.keepEnd,jdbcType=TIMESTAMP},
247
+      keeper = #{record.keeper,jdbcType=VARCHAR},
248
+      device_manager = #{record.deviceManager,jdbcType=VARCHAR},
249
+      number = #{record.number,jdbcType=VARCHAR},
250
+      keep_status = #{record.keepStatus,jdbcType=INTEGER},
251
+      input_id = #{record.inputId,jdbcType=INTEGER}
252
+    <if test="_parameter != null" >
253
+      <include refid="Update_By_Example_Where_Clause" />
254
+    </if>
255
+  </update>
256
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.StorageDevicekeep" >
257
+    update storage_devicekeep
258
+    <set >
259
+      <if test="orgId != null" >
260
+        org_id = #{orgId,jdbcType=INTEGER},
261
+      </if>
262
+      <if test="deviceName != null" >
263
+        device_name = #{deviceName,jdbcType=VARCHAR},
264
+      </if>
265
+      <if test="model != null" >
266
+        model = #{model,jdbcType=VARCHAR},
267
+      </if>
268
+      <if test="keepStart != null" >
269
+        keep_start = #{keepStart,jdbcType=TIMESTAMP},
270
+      </if>
271
+      <if test="keepEnd != null" >
272
+        keep_end = #{keepEnd,jdbcType=TIMESTAMP},
273
+      </if>
274
+      <if test="keeper != null" >
275
+        keeper = #{keeper,jdbcType=VARCHAR},
276
+      </if>
277
+      <if test="deviceManager != null" >
278
+        device_manager = #{deviceManager,jdbcType=VARCHAR},
279
+      </if>
280
+      <if test="number != null" >
281
+        number = #{number,jdbcType=VARCHAR},
282
+      </if>
283
+      <if test="keepStatus != null" >
284
+        keep_status = #{keepStatus,jdbcType=INTEGER},
285
+      </if>
286
+      <if test="inputId != null" >
287
+        input_id = #{inputId,jdbcType=INTEGER},
288
+      </if>
289
+    </set>
290
+    where id = #{id,jdbcType=INTEGER}
291
+  </update>
292
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.StorageDevicekeep" >
293
+    update storage_devicekeep
294
+    set org_id = #{orgId,jdbcType=INTEGER},
295
+      device_name = #{deviceName,jdbcType=VARCHAR},
296
+      model = #{model,jdbcType=VARCHAR},
297
+      keep_start = #{keepStart,jdbcType=TIMESTAMP},
298
+      keep_end = #{keepEnd,jdbcType=TIMESTAMP},
299
+      keeper = #{keeper,jdbcType=VARCHAR},
300
+      device_manager = #{deviceManager,jdbcType=VARCHAR},
301
+      number = #{number,jdbcType=VARCHAR},
302
+      keep_status = #{keepStatus,jdbcType=INTEGER},
303
+      input_id = #{inputId,jdbcType=INTEGER}
304
+    where id = #{id,jdbcType=INTEGER}
305
+  </update>
306
+  
307
+  <select id="selectEnumNameList" resultType="com.chinaitop.depot.device.model.StorageDevicekeep">
308
+     select enumId deviceName,enumName from basic_enum where enumId in (select device_name from storage_deviceinput);
309
+  </select>
310
+</mapper>

+ 338 - 0
bin/src/main/java/com/chinaitop/depot/device/mapper/StorageDevicerepairMapper.xml

@@ -0,0 +1,338 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.device.mapper.StorageDevicerepairMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.StorageDevicerepair" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
7
+    <result column="device_name" property="deviceName" jdbcType="VARCHAR" />
8
+    <result column="model" property="model" jdbcType="VARCHAR" />
9
+    <result column="number" property="number" jdbcType="VARCHAR" />
10
+    <result column="repair_start" property="repairStart" jdbcType="TIMESTAMP" />
11
+    <result column="repair_end" property="repairEnd" jdbcType="TIMESTAMP" />
12
+    <result column="repairer" property="repairer" jdbcType="VARCHAR" />
13
+    <result column="device_manager" property="deviceManager" jdbcType="VARCHAR" />
14
+    <result column="repair_sumnumber" property="repairSumnumber" jdbcType="INTEGER" />
15
+    <result column="repair_status" property="repairStatus" jdbcType="INTEGER" />
16
+    <result column="repair_number" property="repairNumber" jdbcType="INTEGER" />
17
+    <result column="remark" property="remark" jdbcType="VARCHAR" />
18
+  </resultMap>
19
+  <sql id="Example_Where_Clause" >
20
+    <where >
21
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
22
+        <if test="criteria.valid" >
23
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
24
+            <foreach collection="criteria.criteria" item="criterion" >
25
+              <choose >
26
+                <when test="criterion.noValue" >
27
+                  and ${criterion.condition}
28
+                </when>
29
+                <when test="criterion.singleValue" >
30
+                  and ${criterion.condition} #{criterion.value}
31
+                </when>
32
+                <when test="criterion.betweenValue" >
33
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
34
+                </when>
35
+                <when test="criterion.listValue" >
36
+                  and ${criterion.condition}
37
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
38
+                    #{listItem}
39
+                  </foreach>
40
+                </when>
41
+              </choose>
42
+            </foreach>
43
+          </trim>
44
+        </if>
45
+      </foreach>
46
+    </where>
47
+  </sql>
48
+  <sql id="Update_By_Example_Where_Clause" >
49
+    <where >
50
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
51
+        <if test="criteria.valid" >
52
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
53
+            <foreach collection="criteria.criteria" item="criterion" >
54
+              <choose >
55
+                <when test="criterion.noValue" >
56
+                  and ${criterion.condition}
57
+                </when>
58
+                <when test="criterion.singleValue" >
59
+                  and ${criterion.condition} #{criterion.value}
60
+                </when>
61
+                <when test="criterion.betweenValue" >
62
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
63
+                </when>
64
+                <when test="criterion.listValue" >
65
+                  and ${criterion.condition}
66
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
67
+                    #{listItem}
68
+                  </foreach>
69
+                </when>
70
+              </choose>
71
+            </foreach>
72
+          </trim>
73
+        </if>
74
+      </foreach>
75
+    </where>
76
+  </sql>
77
+  <sql id="Base_Column_List" >
78
+    id, org_id, device_name, model, number, repair_start, repair_end, repairer, device_manager, 
79
+    repair_sumnumber, repair_status, repair_number, remark
80
+  </sql>
81
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.StorageDevicerepairExample" >
82
+    select
83
+    <if test="distinct" >
84
+      distinct
85
+    </if>
86
+    <include refid="Base_Column_List" />
87
+    from storage_devicerepair
88
+    <if test="_parameter != null" >
89
+      <include refid="Example_Where_Clause" />
90
+    </if>
91
+    <if test="orderByClause != null" >
92
+      order by ${orderByClause}
93
+    </if>
94
+  </select>
95
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
96
+    select 
97
+    <include refid="Base_Column_List" />
98
+    from storage_devicerepair
99
+    where id = #{id,jdbcType=INTEGER}
100
+  </select>
101
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
102
+    delete from storage_devicerepair
103
+    where id = #{id,jdbcType=INTEGER}
104
+  </delete>
105
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicerepairExample" >
106
+    delete from storage_devicerepair
107
+    <if test="_parameter != null" >
108
+      <include refid="Example_Where_Clause" />
109
+    </if>
110
+  </delete>
111
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.StorageDevicerepair" >
112
+    insert into storage_devicerepair (id, org_id, device_name, 
113
+      model, number, repair_start, 
114
+      repair_end, repairer, device_manager, 
115
+      repair_sumnumber, repair_status, repair_number, 
116
+      remark)
117
+    values (#{id,jdbcType=INTEGER}, #{orgId,jdbcType=INTEGER}, #{deviceName,jdbcType=VARCHAR}, 
118
+      #{model,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, #{repairStart,jdbcType=TIMESTAMP}, 
119
+      #{repairEnd,jdbcType=TIMESTAMP}, #{repairer,jdbcType=VARCHAR}, #{deviceManager,jdbcType=VARCHAR}, 
120
+      #{repairSumnumber,jdbcType=INTEGER}, #{repairStatus,jdbcType=INTEGER}, #{repairNumber,jdbcType=INTEGER}, 
121
+      #{remark,jdbcType=VARCHAR})
122
+  </insert>
123
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.StorageDevicerepair" >
124
+    insert into storage_devicerepair
125
+    <trim prefix="(" suffix=")" suffixOverrides="," >
126
+      <if test="id != null" >
127
+        id,
128
+      </if>
129
+      <if test="orgId != null" >
130
+        org_id,
131
+      </if>
132
+      <if test="deviceName != null" >
133
+        device_name,
134
+      </if>
135
+      <if test="model != null" >
136
+        model,
137
+      </if>
138
+      <if test="number != null" >
139
+        number,
140
+      </if>
141
+      <if test="repairStart != null" >
142
+        repair_start,
143
+      </if>
144
+      <if test="repairEnd != null" >
145
+        repair_end,
146
+      </if>
147
+      <if test="repairer != null" >
148
+        repairer,
149
+      </if>
150
+      <if test="deviceManager != null" >
151
+        device_manager,
152
+      </if>
153
+      <if test="repairSumnumber != null" >
154
+        repair_sumnumber,
155
+      </if>
156
+      <if test="repairStatus != null" >
157
+        repair_status,
158
+      </if>
159
+      <if test="repairNumber != null" >
160
+        repair_number,
161
+      </if>
162
+      <if test="remark != null" >
163
+        remark,
164
+      </if>
165
+    </trim>
166
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
167
+      <if test="id != null" >
168
+        #{id,jdbcType=INTEGER},
169
+      </if>
170
+      <if test="orgId != null" >
171
+        #{orgId,jdbcType=INTEGER},
172
+      </if>
173
+      <if test="deviceName != null" >
174
+        #{deviceName,jdbcType=VARCHAR},
175
+      </if>
176
+      <if test="model != null" >
177
+        #{model,jdbcType=VARCHAR},
178
+      </if>
179
+      <if test="number != null" >
180
+        #{number,jdbcType=VARCHAR},
181
+      </if>
182
+      <if test="repairStart != null" >
183
+        #{repairStart,jdbcType=TIMESTAMP},
184
+      </if>
185
+      <if test="repairEnd != null" >
186
+        #{repairEnd,jdbcType=TIMESTAMP},
187
+      </if>
188
+      <if test="repairer != null" >
189
+        #{repairer,jdbcType=VARCHAR},
190
+      </if>
191
+      <if test="deviceManager != null" >
192
+        #{deviceManager,jdbcType=VARCHAR},
193
+      </if>
194
+      <if test="repairSumnumber != null" >
195
+        #{repairSumnumber,jdbcType=INTEGER},
196
+      </if>
197
+      <if test="repairStatus != null" >
198
+        #{repairStatus,jdbcType=INTEGER},
199
+      </if>
200
+      <if test="repairNumber != null" >
201
+        #{repairNumber,jdbcType=INTEGER},
202
+      </if>
203
+      <if test="remark != null" >
204
+        #{remark,jdbcType=VARCHAR},
205
+      </if>
206
+    </trim>
207
+  </insert>
208
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicerepairExample" resultType="java.lang.Integer" >
209
+    select count(*) from storage_devicerepair
210
+    <if test="_parameter != null" >
211
+      <include refid="Example_Where_Clause" />
212
+    </if>
213
+  </select>
214
+  <update id="updateByExampleSelective" parameterType="map" >
215
+    update storage_devicerepair
216
+    <set >
217
+      <if test="record.id != null" >
218
+        id = #{record.id,jdbcType=INTEGER},
219
+      </if>
220
+      <if test="record.orgId != null" >
221
+        org_id = #{record.orgId,jdbcType=INTEGER},
222
+      </if>
223
+      <if test="record.deviceName != null" >
224
+        device_name = #{record.deviceName,jdbcType=VARCHAR},
225
+      </if>
226
+      <if test="record.model != null" >
227
+        model = #{record.model,jdbcType=VARCHAR},
228
+      </if>
229
+      <if test="record.number != null" >
230
+        number = #{record.number,jdbcType=VARCHAR},
231
+      </if>
232
+      <if test="record.repairStart != null" >
233
+        repair_start = #{record.repairStart,jdbcType=TIMESTAMP},
234
+      </if>
235
+      <if test="record.repairEnd != null" >
236
+        repair_end = #{record.repairEnd,jdbcType=TIMESTAMP},
237
+      </if>
238
+      <if test="record.repairer != null" >
239
+        repairer = #{record.repairer,jdbcType=VARCHAR},
240
+      </if>
241
+      <if test="record.deviceManager != null" >
242
+        device_manager = #{record.deviceManager,jdbcType=VARCHAR},
243
+      </if>
244
+      <if test="record.repairSumnumber != null" >
245
+        repair_sumnumber = #{record.repairSumnumber,jdbcType=INTEGER},
246
+      </if>
247
+      <if test="record.repairStatus != null" >
248
+        repair_status = #{record.repairStatus,jdbcType=INTEGER},
249
+      </if>
250
+      <if test="record.repairNumber != null" >
251
+        repair_number = #{record.repairNumber,jdbcType=INTEGER},
252
+      </if>
253
+      <if test="record.remark != null" >
254
+        remark = #{record.remark,jdbcType=VARCHAR},
255
+      </if>
256
+    </set>
257
+    <if test="_parameter != null" >
258
+      <include refid="Update_By_Example_Where_Clause" />
259
+    </if>
260
+  </update>
261
+  <update id="updateByExample" parameterType="map" >
262
+    update storage_devicerepair
263
+    set id = #{record.id,jdbcType=INTEGER},
264
+      org_id = #{record.orgId,jdbcType=INTEGER},
265
+      device_name = #{record.deviceName,jdbcType=VARCHAR},
266
+      model = #{record.model,jdbcType=VARCHAR},
267
+      number = #{record.number,jdbcType=VARCHAR},
268
+      repair_start = #{record.repairStart,jdbcType=TIMESTAMP},
269
+      repair_end = #{record.repairEnd,jdbcType=TIMESTAMP},
270
+      repairer = #{record.repairer,jdbcType=VARCHAR},
271
+      device_manager = #{record.deviceManager,jdbcType=VARCHAR},
272
+      repair_sumnumber = #{record.repairSumnumber,jdbcType=INTEGER},
273
+      repair_status = #{record.repairStatus,jdbcType=INTEGER},
274
+      repair_number = #{record.repairNumber,jdbcType=INTEGER},
275
+      remark = #{record.remark,jdbcType=VARCHAR}
276
+    <if test="_parameter != null" >
277
+      <include refid="Update_By_Example_Where_Clause" />
278
+    </if>
279
+  </update>
280
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.StorageDevicerepair" >
281
+    update storage_devicerepair
282
+    <set >
283
+      <if test="orgId != null" >
284
+        org_id = #{orgId,jdbcType=INTEGER},
285
+      </if>
286
+      <if test="deviceName != null" >
287
+        device_name = #{deviceName,jdbcType=VARCHAR},
288
+      </if>
289
+      <if test="model != null" >
290
+        model = #{model,jdbcType=VARCHAR},
291
+      </if>
292
+      <if test="number != null" >
293
+        number = #{number,jdbcType=VARCHAR},
294
+      </if>
295
+      <if test="repairStart != null" >
296
+        repair_start = #{repairStart,jdbcType=TIMESTAMP},
297
+      </if>
298
+      <if test="repairEnd != null" >
299
+        repair_end = #{repairEnd,jdbcType=TIMESTAMP},
300
+      </if>
301
+      <if test="repairer != null" >
302
+        repairer = #{repairer,jdbcType=VARCHAR},
303
+      </if>
304
+      <if test="deviceManager != null" >
305
+        device_manager = #{deviceManager,jdbcType=VARCHAR},
306
+      </if>
307
+      <if test="repairSumnumber != null" >
308
+        repair_sumnumber = #{repairSumnumber,jdbcType=INTEGER},
309
+      </if>
310
+      <if test="repairStatus != null" >
311
+        repair_status = #{repairStatus,jdbcType=INTEGER},
312
+      </if>
313
+      <if test="repairNumber != null" >
314
+        repair_number = #{repairNumber,jdbcType=INTEGER},
315
+      </if>
316
+      <if test="remark != null" >
317
+        remark = #{remark,jdbcType=VARCHAR},
318
+      </if>
319
+    </set>
320
+    where id = #{id,jdbcType=INTEGER}
321
+  </update>
322
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.StorageDevicerepair" >
323
+    update storage_devicerepair
324
+    set org_id = #{orgId,jdbcType=INTEGER},
325
+      device_name = #{deviceName,jdbcType=VARCHAR},
326
+      model = #{model,jdbcType=VARCHAR},
327
+      number = #{number,jdbcType=VARCHAR},
328
+      repair_start = #{repairStart,jdbcType=TIMESTAMP},
329
+      repair_end = #{repairEnd,jdbcType=TIMESTAMP},
330
+      repairer = #{repairer,jdbcType=VARCHAR},
331
+      device_manager = #{deviceManager,jdbcType=VARCHAR},
332
+      repair_sumnumber = #{repairSumnumber,jdbcType=INTEGER},
333
+      repair_status = #{repairStatus,jdbcType=INTEGER},
334
+      repair_number = #{repairNumber,jdbcType=INTEGER},
335
+      remark = #{remark,jdbcType=VARCHAR}
336
+    where id = #{id,jdbcType=INTEGER}
337
+  </update>
338
+</mapper>

+ 465 - 0
bin/src/main/java/com/chinaitop/depot/device/mapper/SystemLogMapper.xml

@@ -0,0 +1,465 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.device.mapper.SystemLogMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.SystemLog" >
5
+    <id column="id" property="id" jdbcType="VARCHAR" />
6
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
7
+    <result column="user_id" property="userId" jdbcType="INTEGER" />
8
+    <result column="user_zh" property="userZh" jdbcType="VARCHAR" />
9
+    <result column="user_name" property="userName" jdbcType="VARCHAR" />
10
+    <result column="user_role" property="userRole" jdbcType="VARCHAR" />
11
+    <result column="user_address" property="userAddress" jdbcType="VARCHAR" />
12
+    <result column="dl_time" property="dlTime" jdbcType="TIMESTAMP" />
13
+    <result column="zx_time" property="zxTime" jdbcType="TIMESTAMP" />
14
+    <result column="func_id" property="funcId" jdbcType="INTEGER" />
15
+    <result column="func_name" property="funcName" jdbcType="VARCHAR" />
16
+    <result column="btn_id" property="btnId" jdbcType="INTEGER" />
17
+    <result column="method_name" property="methodName" jdbcType="VARCHAR" />
18
+    <result column="oper_result" property="operResult" jdbcType="VARCHAR" />
19
+    <result column="parameter" property="parameter" jdbcType="VARCHAR" />
20
+    <result column="rtn_param" property="rtnParam" jdbcType="VARCHAR" />
21
+    <result column="describes" property="describes" jdbcType="VARCHAR" />
22
+    <result column="type" property="type" jdbcType="VARCHAR" />
23
+    <result column="device_ip" property="deviceIp" jdbcType="VARCHAR" />
24
+    <result column="system_identify" property="systemIdentify" jdbcType="VARCHAR" />
25
+    <result column="operation_time" property="operationTime" jdbcType="TIMESTAMP" />
26
+  </resultMap>
27
+  <sql id="Example_Where_Clause" >
28
+    <where >
29
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
30
+        <if test="criteria.valid" >
31
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
32
+            <foreach collection="criteria.criteria" item="criterion" >
33
+              <choose >
34
+                <when test="criterion.noValue" >
35
+                  and ${criterion.condition}
36
+                </when>
37
+                <when test="criterion.singleValue" >
38
+                  and ${criterion.condition} #{criterion.value}
39
+                </when>
40
+                <when test="criterion.betweenValue" >
41
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
42
+                </when>
43
+                <when test="criterion.listValue" >
44
+                  and ${criterion.condition}
45
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
46
+                    #{listItem}
47
+                  </foreach>
48
+                </when>
49
+              </choose>
50
+            </foreach>
51
+          </trim>
52
+        </if>
53
+      </foreach>
54
+    </where>
55
+  </sql>
56
+  <sql id="Update_By_Example_Where_Clause" >
57
+    <where >
58
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
59
+        <if test="criteria.valid" >
60
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
61
+            <foreach collection="criteria.criteria" item="criterion" >
62
+              <choose >
63
+                <when test="criterion.noValue" >
64
+                  and ${criterion.condition}
65
+                </when>
66
+                <when test="criterion.singleValue" >
67
+                  and ${criterion.condition} #{criterion.value}
68
+                </when>
69
+                <when test="criterion.betweenValue" >
70
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
71
+                </when>
72
+                <when test="criterion.listValue" >
73
+                  and ${criterion.condition}
74
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
75
+                    #{listItem}
76
+                  </foreach>
77
+                </when>
78
+              </choose>
79
+            </foreach>
80
+          </trim>
81
+        </if>
82
+      </foreach>
83
+    </where>
84
+  </sql>
85
+  <sql id="Base_Column_List" >
86
+    id, org_id, user_id, user_zh, user_name, user_role, user_address, dl_time, zx_time, 
87
+    func_id, func_name, btn_id, method_name, oper_result, parameter, rtn_param, describes, 
88
+    type, device_ip, system_identify, operation_time
89
+  </sql>
90
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.SystemLogExample" >
91
+    select
92
+    <if test="distinct" >
93
+      distinct
94
+    </if>
95
+    <include refid="Base_Column_List" />
96
+    from system_log
97
+    <if test="_parameter != null" >
98
+      <include refid="Example_Where_Clause" />
99
+    </if>
100
+    <if test="orderByClause != null" >
101
+      order by ${orderByClause}
102
+    </if>
103
+  </select>
104
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
105
+    select 
106
+    <include refid="Base_Column_List" />
107
+    from system_log
108
+    where id = #{id,jdbcType=VARCHAR}
109
+  </select>
110
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
111
+    delete from system_log
112
+    where id = #{id,jdbcType=VARCHAR}
113
+  </delete>
114
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.SystemLogExample" >
115
+    delete from system_log
116
+    <if test="_parameter != null" >
117
+      <include refid="Example_Where_Clause" />
118
+    </if>
119
+  </delete>
120
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.SystemLog" >
121
+    insert into system_log (id, org_id, user_id, 
122
+      user_zh, user_name, user_role, 
123
+      user_address, dl_time, zx_time, 
124
+      func_id, func_name, btn_id, 
125
+      method_name, oper_result, parameter, 
126
+      rtn_param, describes, type, 
127
+      device_ip, system_identify, operation_time
128
+      )
129
+    values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, 
130
+      #{userZh,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{userRole,jdbcType=VARCHAR}, 
131
+      #{userAddress,jdbcType=VARCHAR}, #{dlTime,jdbcType=TIMESTAMP}, #{zxTime,jdbcType=TIMESTAMP}, 
132
+      #{funcId,jdbcType=INTEGER}, #{funcName,jdbcType=VARCHAR}, #{btnId,jdbcType=INTEGER}, 
133
+      #{methodName,jdbcType=VARCHAR}, #{operResult,jdbcType=VARCHAR}, #{parameter,jdbcType=VARCHAR}, 
134
+      #{rtnParam,jdbcType=VARCHAR}, #{describes,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, 
135
+      #{deviceIp,jdbcType=VARCHAR}, #{systemIdentify,jdbcType=VARCHAR}, #{operationTime,jdbcType=TIMESTAMP}
136
+      )
137
+  </insert>
138
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.SystemLog" >
139
+    insert into system_log
140
+    <trim prefix="(" suffix=")" suffixOverrides="," >
141
+      <if test="id != null" >
142
+        id,
143
+      </if>
144
+      <if test="orgId != null" >
145
+        org_id,
146
+      </if>
147
+      <if test="userId != null" >
148
+        user_id,
149
+      </if>
150
+      <if test="userZh != null" >
151
+        user_zh,
152
+      </if>
153
+      <if test="userName != null" >
154
+        user_name,
155
+      </if>
156
+      <if test="userRole != null" >
157
+        user_role,
158
+      </if>
159
+      <if test="userAddress != null" >
160
+        user_address,
161
+      </if>
162
+      <if test="dlTime != null" >
163
+        dl_time,
164
+      </if>
165
+      <if test="zxTime != null" >
166
+        zx_time,
167
+      </if>
168
+      <if test="funcId != null" >
169
+        func_id,
170
+      </if>
171
+      <if test="funcName != null" >
172
+        func_name,
173
+      </if>
174
+      <if test="btnId != null" >
175
+        btn_id,
176
+      </if>
177
+      <if test="methodName != null" >
178
+        method_name,
179
+      </if>
180
+      <if test="operResult != null" >
181
+        oper_result,
182
+      </if>
183
+      <if test="parameter != null" >
184
+        parameter,
185
+      </if>
186
+      <if test="rtnParam != null" >
187
+        rtn_param,
188
+      </if>
189
+      <if test="describes != null" >
190
+        describes,
191
+      </if>
192
+      <if test="type != null" >
193
+        type,
194
+      </if>
195
+      <if test="deviceIp != null" >
196
+        device_ip,
197
+      </if>
198
+      <if test="systemIdentify != null" >
199
+        system_identify,
200
+      </if>
201
+      <if test="operationTime != null" >
202
+        operation_time,
203
+      </if>
204
+    </trim>
205
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
206
+      <if test="id != null" >
207
+        #{id,jdbcType=VARCHAR},
208
+      </if>
209
+      <if test="orgId != null" >
210
+        #{orgId,jdbcType=INTEGER},
211
+      </if>
212
+      <if test="userId != null" >
213
+        #{userId,jdbcType=INTEGER},
214
+      </if>
215
+      <if test="userZh != null" >
216
+        #{userZh,jdbcType=VARCHAR},
217
+      </if>
218
+      <if test="userName != null" >
219
+        #{userName,jdbcType=VARCHAR},
220
+      </if>
221
+      <if test="userRole != null" >
222
+        #{userRole,jdbcType=VARCHAR},
223
+      </if>
224
+      <if test="userAddress != null" >
225
+        #{userAddress,jdbcType=VARCHAR},
226
+      </if>
227
+      <if test="dlTime != null" >
228
+        #{dlTime,jdbcType=TIMESTAMP},
229
+      </if>
230
+      <if test="zxTime != null" >
231
+        #{zxTime,jdbcType=TIMESTAMP},
232
+      </if>
233
+      <if test="funcId != null" >
234
+        #{funcId,jdbcType=INTEGER},
235
+      </if>
236
+      <if test="funcName != null" >
237
+        #{funcName,jdbcType=VARCHAR},
238
+      </if>
239
+      <if test="btnId != null" >
240
+        #{btnId,jdbcType=INTEGER},
241
+      </if>
242
+      <if test="methodName != null" >
243
+        #{methodName,jdbcType=VARCHAR},
244
+      </if>
245
+      <if test="operResult != null" >
246
+        #{operResult,jdbcType=VARCHAR},
247
+      </if>
248
+      <if test="parameter != null" >
249
+        #{parameter,jdbcType=VARCHAR},
250
+      </if>
251
+      <if test="rtnParam != null" >
252
+        #{rtnParam,jdbcType=VARCHAR},
253
+      </if>
254
+      <if test="describes != null" >
255
+        #{describes,jdbcType=VARCHAR},
256
+      </if>
257
+      <if test="type != null" >
258
+        #{type,jdbcType=VARCHAR},
259
+      </if>
260
+      <if test="deviceIp != null" >
261
+        #{deviceIp,jdbcType=VARCHAR},
262
+      </if>
263
+      <if test="systemIdentify != null" >
264
+        #{systemIdentify,jdbcType=VARCHAR},
265
+      </if>
266
+      <if test="operationTime != null" >
267
+        #{operationTime,jdbcType=TIMESTAMP},
268
+      </if>
269
+    </trim>
270
+  </insert>
271
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.SystemLogExample" resultType="java.lang.Integer" >
272
+    select count(*) from system_log
273
+    <if test="_parameter != null" >
274
+      <include refid="Example_Where_Clause" />
275
+    </if>
276
+  </select>
277
+  <update id="updateByExampleSelective" parameterType="map" >
278
+    update system_log
279
+    <set >
280
+      <if test="record.id != null" >
281
+        id = #{record.id,jdbcType=VARCHAR},
282
+      </if>
283
+      <if test="record.orgId != null" >
284
+        org_id = #{record.orgId,jdbcType=INTEGER},
285
+      </if>
286
+      <if test="record.userId != null" >
287
+        user_id = #{record.userId,jdbcType=INTEGER},
288
+      </if>
289
+      <if test="record.userZh != null" >
290
+        user_zh = #{record.userZh,jdbcType=VARCHAR},
291
+      </if>
292
+      <if test="record.userName != null" >
293
+        user_name = #{record.userName,jdbcType=VARCHAR},
294
+      </if>
295
+      <if test="record.userRole != null" >
296
+        user_role = #{record.userRole,jdbcType=VARCHAR},
297
+      </if>
298
+      <if test="record.userAddress != null" >
299
+        user_address = #{record.userAddress,jdbcType=VARCHAR},
300
+      </if>
301
+      <if test="record.dlTime != null" >
302
+        dl_time = #{record.dlTime,jdbcType=TIMESTAMP},
303
+      </if>
304
+      <if test="record.zxTime != null" >
305
+        zx_time = #{record.zxTime,jdbcType=TIMESTAMP},
306
+      </if>
307
+      <if test="record.funcId != null" >
308
+        func_id = #{record.funcId,jdbcType=INTEGER},
309
+      </if>
310
+      <if test="record.funcName != null" >
311
+        func_name = #{record.funcName,jdbcType=VARCHAR},
312
+      </if>
313
+      <if test="record.btnId != null" >
314
+        btn_id = #{record.btnId,jdbcType=INTEGER},
315
+      </if>
316
+      <if test="record.methodName != null" >
317
+        method_name = #{record.methodName,jdbcType=VARCHAR},
318
+      </if>
319
+      <if test="record.operResult != null" >
320
+        oper_result = #{record.operResult,jdbcType=VARCHAR},
321
+      </if>
322
+      <if test="record.parameter != null" >
323
+        parameter = #{record.parameter,jdbcType=VARCHAR},
324
+      </if>
325
+      <if test="record.rtnParam != null" >
326
+        rtn_param = #{record.rtnParam,jdbcType=VARCHAR},
327
+      </if>
328
+      <if test="record.describes != null" >
329
+        describes = #{record.describes,jdbcType=VARCHAR},
330
+      </if>
331
+      <if test="record.type != null" >
332
+        type = #{record.type,jdbcType=VARCHAR},
333
+      </if>
334
+      <if test="record.deviceIp != null" >
335
+        device_ip = #{record.deviceIp,jdbcType=VARCHAR},
336
+      </if>
337
+      <if test="record.systemIdentify != null" >
338
+        system_identify = #{record.systemIdentify,jdbcType=VARCHAR},
339
+      </if>
340
+      <if test="record.operationTime != null" >
341
+        operation_time = #{record.operationTime,jdbcType=TIMESTAMP},
342
+      </if>
343
+    </set>
344
+    <if test="_parameter != null" >
345
+      <include refid="Update_By_Example_Where_Clause" />
346
+    </if>
347
+  </update>
348
+  <update id="updateByExample" parameterType="map" >
349
+    update system_log
350
+    set id = #{record.id,jdbcType=VARCHAR},
351
+      org_id = #{record.orgId,jdbcType=INTEGER},
352
+      user_id = #{record.userId,jdbcType=INTEGER},
353
+      user_zh = #{record.userZh,jdbcType=VARCHAR},
354
+      user_name = #{record.userName,jdbcType=VARCHAR},
355
+      user_role = #{record.userRole,jdbcType=VARCHAR},
356
+      user_address = #{record.userAddress,jdbcType=VARCHAR},
357
+      dl_time = #{record.dlTime,jdbcType=TIMESTAMP},
358
+      zx_time = #{record.zxTime,jdbcType=TIMESTAMP},
359
+      func_id = #{record.funcId,jdbcType=INTEGER},
360
+      func_name = #{record.funcName,jdbcType=VARCHAR},
361
+      btn_id = #{record.btnId,jdbcType=INTEGER},
362
+      method_name = #{record.methodName,jdbcType=VARCHAR},
363
+      oper_result = #{record.operResult,jdbcType=VARCHAR},
364
+      parameter = #{record.parameter,jdbcType=VARCHAR},
365
+      rtn_param = #{record.rtnParam,jdbcType=VARCHAR},
366
+      describes = #{record.describes,jdbcType=VARCHAR},
367
+      type = #{record.type,jdbcType=VARCHAR},
368
+      device_ip = #{record.deviceIp,jdbcType=VARCHAR},
369
+      system_identify = #{record.systemIdentify,jdbcType=VARCHAR},
370
+      operation_time = #{record.operationTime,jdbcType=TIMESTAMP}
371
+    <if test="_parameter != null" >
372
+      <include refid="Update_By_Example_Where_Clause" />
373
+    </if>
374
+  </update>
375
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.SystemLog" >
376
+    update system_log
377
+    <set >
378
+      <if test="orgId != null" >
379
+        org_id = #{orgId,jdbcType=INTEGER},
380
+      </if>
381
+      <if test="userId != null" >
382
+        user_id = #{userId,jdbcType=INTEGER},
383
+      </if>
384
+      <if test="userZh != null" >
385
+        user_zh = #{userZh,jdbcType=VARCHAR},
386
+      </if>
387
+      <if test="userName != null" >
388
+        user_name = #{userName,jdbcType=VARCHAR},
389
+      </if>
390
+      <if test="userRole != null" >
391
+        user_role = #{userRole,jdbcType=VARCHAR},
392
+      </if>
393
+      <if test="userAddress != null" >
394
+        user_address = #{userAddress,jdbcType=VARCHAR},
395
+      </if>
396
+      <if test="dlTime != null" >
397
+        dl_time = #{dlTime,jdbcType=TIMESTAMP},
398
+      </if>
399
+      <if test="zxTime != null" >
400
+        zx_time = #{zxTime,jdbcType=TIMESTAMP},
401
+      </if>
402
+      <if test="funcId != null" >
403
+        func_id = #{funcId,jdbcType=INTEGER},
404
+      </if>
405
+      <if test="funcName != null" >
406
+        func_name = #{funcName,jdbcType=VARCHAR},
407
+      </if>
408
+      <if test="btnId != null" >
409
+        btn_id = #{btnId,jdbcType=INTEGER},
410
+      </if>
411
+      <if test="methodName != null" >
412
+        method_name = #{methodName,jdbcType=VARCHAR},
413
+      </if>
414
+      <if test="operResult != null" >
415
+        oper_result = #{operResult,jdbcType=VARCHAR},
416
+      </if>
417
+      <if test="parameter != null" >
418
+        parameter = #{parameter,jdbcType=VARCHAR},
419
+      </if>
420
+      <if test="rtnParam != null" >
421
+        rtn_param = #{rtnParam,jdbcType=VARCHAR},
422
+      </if>
423
+      <if test="describes != null" >
424
+        describes = #{describes,jdbcType=VARCHAR},
425
+      </if>
426
+      <if test="type != null" >
427
+        type = #{type,jdbcType=VARCHAR},
428
+      </if>
429
+      <if test="deviceIp != null" >
430
+        device_ip = #{deviceIp,jdbcType=VARCHAR},
431
+      </if>
432
+      <if test="systemIdentify != null" >
433
+        system_identify = #{systemIdentify,jdbcType=VARCHAR},
434
+      </if>
435
+      <if test="operationTime != null" >
436
+        operation_time = #{operationTime,jdbcType=TIMESTAMP},
437
+      </if>
438
+    </set>
439
+    where id = #{id,jdbcType=VARCHAR}
440
+  </update>
441
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.SystemLog" >
442
+    update system_log
443
+    set org_id = #{orgId,jdbcType=INTEGER},
444
+      user_id = #{userId,jdbcType=INTEGER},
445
+      user_zh = #{userZh,jdbcType=VARCHAR},
446
+      user_name = #{userName,jdbcType=VARCHAR},
447
+      user_role = #{userRole,jdbcType=VARCHAR},
448
+      user_address = #{userAddress,jdbcType=VARCHAR},
449
+      dl_time = #{dlTime,jdbcType=TIMESTAMP},
450
+      zx_time = #{zxTime,jdbcType=TIMESTAMP},
451
+      func_id = #{funcId,jdbcType=INTEGER},
452
+      func_name = #{funcName,jdbcType=VARCHAR},
453
+      btn_id = #{btnId,jdbcType=INTEGER},
454
+      method_name = #{methodName,jdbcType=VARCHAR},
455
+      oper_result = #{operResult,jdbcType=VARCHAR},
456
+      parameter = #{parameter,jdbcType=VARCHAR},
457
+      rtn_param = #{rtnParam,jdbcType=VARCHAR},
458
+      describes = #{describes,jdbcType=VARCHAR},
459
+      type = #{type,jdbcType=VARCHAR},
460
+      device_ip = #{deviceIp,jdbcType=VARCHAR},
461
+      system_identify = #{systemIdentify,jdbcType=VARCHAR},
462
+      operation_time = #{operationTime,jdbcType=TIMESTAMP}
463
+    where id = #{id,jdbcType=VARCHAR}
464
+  </update>
465
+</mapper>

+ 48 - 0
bin/src/main/resources/bootstrap.yml

@@ -0,0 +1,48 @@
1
+server:
2
+  port: 9005
3
+  tomcat:
4
+    uri-encoding: utf-8
5
+
6
+# 注册中心配置
7
+eureka:
8
+  client:
9
+    service-url:
10
+      defaultZone: http://172.16.0.46:9511/eureka/
11
+  instance:
12
+    prefer-ip-address: true
13
+
14
+spring:
15
+  application:
16
+    name: depot-device
17
+  # 数据库配置
18
+  datasource:
19
+    driver-class-name: com.mysql.jdbc.Driver
20
+    url: jdbc:mysql://172.16.0.46:3306/depot-yunnan?useUnicode=true&characterEncoding=utf-8
21
+    username: root
22
+    password: 123456
23
+  # 缓存配置
24
+  session:
25
+    store-type: redis
26
+  redis:
27
+    database: 1
28
+    host: 172.16.0.46
29
+    port: 6679
30
+    password: 123456
31
+    timeout: 3000
32
+    jedis:
33
+      pool:
34
+        max-active: 8
35
+        max-wait: -1
36
+        max-idle: 8
37
+        min-idle: 0
38
+  # 静态资源配置
39
+  resources:
40
+    static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${web.upload-path}
41
+
42
+  jackson:
43
+    date-format: yyyy-MM-dd
44
+    time-zone: GMT+8
45
+
46
+web:
47
+  upload-path: /upload
48
+

+ 204 - 0
src/main/java/com/chinaitop/depot/device/controller/BasicEquipmentEquipmentPoolController.java

@@ -0,0 +1,204 @@
1
+package com.chinaitop.depot.device.controller;
2
+
3
+import java.util.ArrayList;
4
+import java.util.Date;
5
+import java.util.HashMap;
6
+import java.util.List;
7
+import java.util.Map;
8
+
9
+import javax.annotation.Resource;
10
+import javax.servlet.http.HttpServletRequest;
11
+
12
+import org.springframework.http.MediaType;
13
+import org.springframework.web.bind.annotation.RequestMapping;
14
+import org.springframework.web.bind.annotation.RequestMethod;
15
+import org.springframework.web.bind.annotation.RestController;
16
+import org.springframework.web.multipart.MultipartFile;
17
+
18
+import com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool;
19
+import com.chinaitop.depot.device.model.BasicEquipmentEquipmentPoolExample;
20
+import com.chinaitop.depot.device.service.BasicEquipmentEquipmentPoolService;
21
+import com.chinaitop.depot.device.service.impl.ImportServiceImpl;
22
+import com.fasterxml.jackson.databind.ObjectMapper;
23
+import com.github.pagehelper.PageHelper;
24
+import com.github.pagehelper.PageInfo;
25
+
26
+import io.swagger.annotations.Api;
27
+import io.swagger.annotations.ApiImplicitParam;
28
+import io.swagger.annotations.ApiImplicitParams;
29
+import io.swagger.annotations.ApiOperation;
30
+
31
+/**
32
+ * 设备器材库Controller
33
+ * @author User
34
+ *
35
+ */
36
+@RestController
37
+@RequestMapping(value="/BasicEquipmentEquipmentPool")
38
+@Api(value= "BasicEquipmentEquipmentPoolController", description = "设备器材库")
39
+public class BasicEquipmentEquipmentPoolController {
40
+
41
+	@Resource
42
+	private BasicEquipmentEquipmentPoolService poolServivce;
43
+	@Resource
44
+	private ImportServiceImpl importService;
45
+
46
+	/**
47
+	 * 查询数据列表
48
+	 * 
49
+	 * @param request request对象
50
+	 * @param pageNum 页数
51
+	 * @param pageSize 每页显示的条数
52
+	 * @param shelfId 货架号
53
+	 * @param warehouseId 货位号
54
+	 * @return
55
+	 */
56
+	@RequestMapping(value = "/getList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
57
+    @ApiOperation(value="查询数据信息", notes = "查询数据列表,支持分页")
58
+  	@ApiImplicitParams({
59
+  			@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
60
+  			@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
61
+  			@ApiImplicitParam(name = "orgId", value = "当前登录人组织id", paramType = "query")
62
+  	})
63
+	public PageInfo<BasicEquipmentEquipmentPool> getList(HttpServletRequest request, Integer pageNum, Integer pageSize,
64
+			String shelfId, String warehouseId ,Integer orgId) {
65
+		//Integer depotId = (Integer) request.getSession().getAttribute("depotId");
66
+		BasicEquipmentEquipmentPoolExample example = new BasicEquipmentEquipmentPoolExample();
67
+		BasicEquipmentEquipmentPoolExample.Criteria criteria = example.createCriteria();
68
+
69
+		if (null != shelfId && !"".equals(shelfId)) {
70
+			criteria.andShelfIdLike("%"+shelfId+"%");
71
+		}
72
+
73
+		if (null != warehouseId && !"".equals(warehouseId)) {
74
+			criteria.andWarehouseIdLike("%"+warehouseId+"%");
75
+		}
76
+		
77
+
78
+		criteria.andOrgIdEqualTo(orgId); //只能查询当前单位的数据
79
+		example.setOrderByClause("id asc");
80
+		
81
+		if (pageNum != null && pageSize != null) {
82
+			PageHelper.startPage(pageNum, pageSize);
83
+		}
84
+		List<BasicEquipmentEquipmentPool> list = poolServivce.findByCondition(example);
85
+
86
+		PageInfo<BasicEquipmentEquipmentPool> pageInfo = new PageInfo<BasicEquipmentEquipmentPool>(list);
87
+
88
+		return pageInfo;
89
+	}
90
+
91
+	/**
92
+	 * 查询一条数据
93
+	 * 
94
+	 * @param id 数据ID
95
+	 * @return
96
+	 */
97
+	@RequestMapping(value ="/edit",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
98
+	@ApiOperation(value="根据id查询数据", notes = "根据id查询数据")
99
+	@ApiImplicitParams({
100
+		  @ApiImplicitParam(name = "id", value = "id", paramType = "query")
101
+	})
102
+	public BasicEquipmentEquipmentPool edit(Integer id) {
103
+		BasicEquipmentEquipmentPool pool = null;
104
+		if (id != null) {
105
+			pool = poolServivce.findByIdObj(id);
106
+		}
107
+		return pool;
108
+	}
109
+
110
+	/**
111
+	 * 更新数据
112
+	 * 
113
+	 * @param request request对象
114
+	 * @param poolJson 数据对象
115
+	 * @return
116
+	 */
117
+	@RequestMapping(value="/update", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
118
+	@ApiOperation(value="更新数据", notes = "修改数据")
119
+	@ApiImplicitParams({
120
+		  @ApiImplicitParam(name = "userId", value = "当前登录人id", paramType = "form"),
121
+		  @ApiImplicitParam(name = "orgId", value = "当前登录人组织id", paramType = "form"),
122
+		  @ApiImplicitParam(name = "poolJson", value = "数据对象", paramType = "form")
123
+	})
124
+	public Map<String, Object> update(String poolJson ,Integer userId ,Integer orgId) {
125
+		Map<String, Object> map = new HashMap<String, Object>();
126
+		ObjectMapper mapper = new ObjectMapper();
127
+		try {
128
+			BasicEquipmentEquipmentPool pool = mapper.readValue(poolJson, BasicEquipmentEquipmentPool.class);
129
+			if (pool.getId() == null) {
130
+				pool.setOrgId(orgId);
131
+				pool.setInputPersonId(userId);
132
+				pool.setInputDate(new Date());
133
+				poolServivce.add(pool);
134
+			} else {
135
+				poolServivce.update(pool);
136
+			}
137
+			map.put("status", "success");
138
+			map.put("msg", "保存成功!");
139
+		} catch (Exception e) {
140
+			e.printStackTrace();
141
+		}
142
+		return map;
143
+	}
144
+
145
+	/**
146
+	 * 删除
147
+	 * 
148
+	 * @param id 数据ID
149
+	 * @return
150
+	 */
151
+	@RequestMapping(value ="/remove",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
152
+	@ApiOperation(value="根据id删除数据", notes = "根据id删除数据")
153
+	@ApiImplicitParams({
154
+		  @ApiImplicitParam(name = "id", value = "id", paramType = "form")
155
+	})
156
+	public Map<String, Object> remove(Integer id) {
157
+		Map<String, Object> map = new HashMap<String, Object>();
158
+		poolServivce.remove(id);
159
+		map.put("status", "success");
160
+		map.put("msg", "删除成功!");
161
+		return map;
162
+	}
163
+
164
+	/**
165
+     * 导入excel
166
+     * @param file 文件
167
+     * @param fileType 类型:如xlsx
168
+     * @param request
169
+     * @return
170
+     */
171
+    @RequestMapping(value ="/importFile",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
172
+	@ApiOperation(value="导入Excel", notes = "导入Excel")
173
+    @ApiImplicitParams({
174
+    	@ApiImplicitParam(name = "file", value = "文件", paramType = "form"),
175
+    	@ApiImplicitParam(name = "fileType", value = "文件类型", paramType = "form"),
176
+		@ApiImplicitParam(name = "orgId", value = "当前登录人组织id", paramType = "form")
177
+	})
178
+    public String importFile(MultipartFile file, String fileType, Integer orgId , HttpServletRequest request){
179
+
180
+        String[] titleArr = {"存放区域", "货架号", "货位号", "备注"};//第一行的title
181
+        boolean[] emptyArr = {false  ,  false  ,  false , true  ,  true};//指定列可为空,不可为空值为false.
182
+
183
+        List<List<String>> list = new ArrayList<List<String>>();//该list为数据返回的list
184
+        String errormsg = null;
185
+        try {
186
+        	errormsg = importService.importFile(file, fileType, request, titleArr, emptyArr, list);
187
+        	
188
+        	if (errormsg != null && !"".equals(errormsg)) {
189
+        		return errormsg;
190
+        	}
191
+
192
+            if (list.size()>0) {
193
+            	errormsg = poolServivce.importData(list, orgId);
194
+
195
+            	System.out.println(list);
196
+            	System.out.println(errormsg);
197
+            	//errormsg = "导入成功!";
198
+            }
199
+        } catch (Exception e) {
200
+            e.printStackTrace();
201
+        }
202
+        return errormsg;
203
+    }
204
+}

+ 204 - 0
src/main/java/com/chinaitop/depot/device/controller/StorageDeviceCheckController.java

@@ -0,0 +1,204 @@
1
+package com.chinaitop.depot.device.controller;
2
+
3
+import com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool;
4
+import com.chinaitop.depot.device.service.BasicEquipmentEquipmentPoolService;
5
+import com.chinaitop.depot.device.model.StorageDevicecheck;
6
+import com.chinaitop.depot.device.model.StorageDevicecheckExample;
7
+import com.chinaitop.depot.device.model.StorageDeviceinput;
8
+import com.chinaitop.depot.device.model.StorageDeviceinputExample;
9
+import com.chinaitop.depot.device.service.StorageDeviceCheckService;
10
+import com.chinaitop.depot.utils.ParameterUtil;
11
+import com.github.pagehelper.PageHelper;
12
+import com.github.pagehelper.PageInfo;
13
+
14
+import io.swagger.annotations.Api;
15
+import io.swagger.annotations.ApiImplicitParam;
16
+import io.swagger.annotations.ApiImplicitParams;
17
+import io.swagger.annotations.ApiOperation;
18
+
19
+import org.springframework.http.MediaType;
20
+import org.springframework.web.bind.annotation.RequestMapping;
21
+import org.springframework.web.bind.annotation.RequestMethod;
22
+import org.springframework.web.bind.annotation.RestController;
23
+
24
+import javax.annotation.Resource;
25
+import java.util.HashMap;
26
+import java.util.List;
27
+import java.util.Map;
28
+
29
+@RestController
30
+@RequestMapping(value= {"/deviceCheck"})
31
+@Api(value= "StorageDeviceCheckController", description = "器材设备盘点")
32
+public class StorageDeviceCheckController {
33
+
34
+	@Resource
35
+	private StorageDeviceCheckService storageDeviceCheckService;
36
+	@Resource
37
+	private BasicEquipmentEquipmentPoolService equipmentPoolService;
38
+	
39
+	 /**
40
+     * 设备器材管理-盘点单查询
41
+	 * @throws Exception 
42
+     */
43
+    @RequestMapping(value = "/getCheckList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
44
+    @ApiOperation(value="盘点单查询", notes = "设备器材管理-盘点单查询,支持分页")
45
+  	@ApiImplicitParams({
46
+  			@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
47
+  			@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query")
48
+  	})
49
+    public PageInfo<StorageDevicecheck> listCheckPage(Integer pageNum, Integer pageSize, String pdNum,String starttime,String endtime) throws Exception{
50
+
51
+        StorageDevicecheckExample storageDevicecheckExample=new StorageDevicecheckExample();
52
+        StorageDevicecheckExample.Criteria criteria= storageDevicecheckExample.createCriteria();
53
+        if(ParameterUtil.isnotnull(pdNum)) criteria.andCheckNumberLike("%"+pdNum+"%");
54
+       if(ParameterUtil.isnotnull(starttime)) criteria.andCheckDateGreaterThanOrEqualTo(ParameterUtil.string2datetime(starttime+" 00:00:00"));
55
+       if(ParameterUtil.isnotnull(endtime)) criteria.andCheckDateLessThanOrEqualTo(ParameterUtil.string2datetime(endtime+" 00:00:00"));
56
+        //按照id进行降序
57
+        storageDevicecheckExample.setOrderByClause("id desc");
58
+        if (pageNum!=null && pageSize!=null) PageHelper.startPage(pageNum, pageSize);
59
+
60
+        List<StorageDevicecheck> list = storageDeviceCheckService.queryByExample(storageDevicecheckExample);
61
+        if(list!=null && list.size()>0){
62
+        	for (StorageDevicecheck storageDevicecheck : list) {
63
+        		if(storageDevicecheck.getDepotId()!=null){
64
+        			BasicEquipmentEquipmentPool equipmentPool=equipmentPoolService.findByIdObj(storageDevicecheck.getDepotId());
65
+        			if(equipmentPool != null) storageDevicecheck.setDepotName(equipmentPool.getPutPosition());
66
+        		}
67
+        	}
68
+        }
69
+
70
+        PageInfo<StorageDevicecheck> pageInfo = new PageInfo<StorageDevicecheck>(list);
71
+        return pageInfo;
72
+    }
73
+    /**
74
+     * 设备器材管理-盘点单查询 NoPage
75
+	 * @throws Exception
76
+     */
77
+    @RequestMapping(value = "/getCheckListNoPage",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
78
+    @ApiOperation(value="盘点单查询", notes = "设备器材管理-盘点单查询,不支持分页")
79
+    public List<StorageDevicecheck> listCheckPageNoPage() throws Exception{
80
+
81
+        StorageDevicecheckExample storageDevicecheckExample=new StorageDevicecheckExample();
82
+        storageDevicecheckExample.setOrderByClause("check_number desc");
83
+
84
+        List<StorageDevicecheck> list = storageDeviceCheckService.queryByExample(storageDevicecheckExample);
85
+
86
+        return list;
87
+    }
88
+
89
+
90
+    /**
91
+     * 根据盘点种类获取子类数据
92
+     * @return
93
+     */
94
+    @RequestMapping(value = "/childZlList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
95
+    @ApiOperation(value="根据盘点种类获取子类数据", notes = "根据盘点种类获取子类数据")
96
+  	@ApiImplicitParams({
97
+  			@ApiImplicitParam(name = "deviceType", value = "类型", paramType = "query"),
98
+  			@ApiImplicitParam(name = "position", value = "器材的存放位置", paramType = "query")
99
+  	})
100
+    public List<StorageDeviceinput> childZlList(Integer position,String deviceType){
101
+        List<StorageDeviceinput> list = null;
102
+        StorageDeviceinputExample storageDeviceinputExample=new StorageDeviceinputExample();
103
+        StorageDeviceinputExample.Criteria criteria=storageDeviceinputExample.createCriteria();
104
+        if(ParameterUtil.isnotnull(deviceType)){
105
+            criteria.andDeviceTypeEqualTo(Integer.valueOf(deviceType));
106
+        }
107
+        if(ParameterUtil.isnotnull(position)){
108
+            criteria.andPositionEqualTo(Integer.toString(position));
109
+        }
110
+        try {
111
+            list = storageDeviceCheckService.childZlList(storageDeviceinputExample);
112
+            /*for (StorageDeviceinput storageDevicecheck : list) {
113
+                if(storageDevicecheck.getPosition()!=null){
114
+                	BasicEquipmentEquipmentPool equipmentPool=equipmentPoolService.findByIdObj(position);
115
+                    if(equipmentPool != null) storageDevicecheck.(equipmentPool.getPutPosition());
116
+
117
+                }
118
+            }*/
119
+        } catch (Exception e) {
120
+            e.printStackTrace();
121
+        }
122
+        return list;
123
+    }
124
+    /**
125
+     * 根据盘点种类获取子类数据
126
+     * @return
127
+     */
128
+    @RequestMapping(value = "/getCountForDate",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
129
+    @ApiOperation(value="根据盘点种类获取子类数据", notes = "根据盘点种类获取子类数据")
130
+  	@ApiImplicitParams({
131
+  			@ApiImplicitParam(name = "depotId", value = "depotId", paramType = "query")
132
+  	})
133
+    public int getCountForDate(String depotId){
134
+        Map<String,Object> map = new HashMap<>();
135
+        map.put("checkDate","\""+ParameterUtil.getSysDate()+"%\"");
136
+        map.put("depotId",depotId);
137
+        int count  = storageDeviceCheckService.getCountForDate(map);
138
+        return count;
139
+    }
140
+
141
+    /**
142
+     * 根据depotid删除数据
143
+     */
144
+    @RequestMapping(value="/remove", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
145
+	@ApiOperation(value="删除数据", notes = "根据条件删除数据")
146
+	@ApiImplicitParams({
147
+	   	 @ApiImplicitParam(name = "depotid", value = "depotid", paramType = "form"),
148
+	   	 @ApiImplicitParam(name = "checkNum", value = "checkNum", paramType = "form")
149
+	}) 
150
+    public Map<String, Object> remove(Integer depotId,String checkNum){
151
+        Map<String,Object> retMap = new HashMap<String,Object>();
152
+        storageDeviceCheckService.remove(depotId,checkNum);
153
+        retMap.put("msg","success");
154
+        return retMap;
155
+    }
156
+
157
+    /**
158
+     * 新增
159
+     */
160
+    @RequestMapping(value="/save", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
161
+	@ApiOperation(value="保存数据", notes = "保存增加或修改的数据")
162
+    @ApiImplicitParams({
163
+	   	 @ApiImplicitParam(name = "deviceCheckJson", value = "新增数据", paramType = "form"),
164
+	   	 @ApiImplicitParam(name = "type", value = "类型", paramType = "form")
165
+	})
166
+    public Map<String, Object>  add(String deviceCheckJson,String type){
167
+        Map<String, Object> modelMap = new HashMap<>();
168
+        try {
169
+            storageDeviceCheckService.add(deviceCheckJson,type);
170
+            modelMap.put("status", "success");
171
+        } catch (Exception e) {
172
+            e.printStackTrace();
173
+            modelMap.put("status", "error");
174
+        }
175
+        return modelMap;
176
+    }
177
+
178
+      /**
179
+     * 根据id加载对应数据
180
+     * @param id
181
+     * @return
182
+     */
183
+    @RequestMapping(value ="/loadDataByDepotId",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
184
+	@ApiOperation(value="查询数据", notes = "根据条件查询数据")
185
+	@ApiImplicitParams({
186
+		 @ApiImplicitParam(name = "id", value = "id", paramType = "query"),
187
+		 @ApiImplicitParam(name = "pddh", value = "盘点单号", paramType = "query")
188
+	})
189
+    public List<StorageDevicecheck> loadDataByDepotId(Integer id,String pddh){
190
+    	List<StorageDevicecheck> storageDevicekeepList =storageDeviceCheckService.loadDataByDepotId(id,pddh);
191
+        for (StorageDevicecheck storageDeviceCheck : storageDevicekeepList) {
192
+           
193
+                if(storageDeviceCheck.getDepotId()!=null){
194
+                   /* BasicStorehouse storehouse=storehouseService.findByPrimary(storageDeviceCheck.getDepotId());
195
+                    if(storehouse != null) storageDeviceCheck.setDepotName(storehouse.getStorehouseName());*/
196
+                	BasicEquipmentEquipmentPool equipmentPool=equipmentPoolService.findByIdObj(storageDeviceCheck.getDepotId());
197
+                    if(equipmentPool != null) storageDeviceCheck.setDepotName(equipmentPool.getPutPosition());
198
+
199
+                }
200
+            } 
201
+       
202
+        return storageDevicekeepList;
203
+    }
204
+}

+ 416 - 0
src/main/java/com/chinaitop/depot/device/controller/StorageDeviceGetController.java

@@ -0,0 +1,416 @@
1
+package com.chinaitop.depot.device.controller;
2
+
3
+import java.io.IOException;
4
+import java.util.ArrayList;
5
+import java.util.HashMap;
6
+import java.util.List;
7
+import java.util.Map;
8
+
9
+import javax.annotation.Resource;
10
+import javax.servlet.http.HttpServletRequest;
11
+
12
+import org.springframework.http.MediaType;
13
+import org.springframework.web.bind.annotation.RequestMapping;
14
+import org.springframework.web.bind.annotation.RequestMethod;
15
+import org.springframework.web.bind.annotation.RestController;
16
+
17
+import com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool;
18
+import com.chinaitop.depot.device.service.BasicEquipmentEquipmentPoolService;
19
+import com.chinaitop.depot.device.model.ContentBean;
20
+import com.chinaitop.depot.device.model.HouseNameBean;
21
+import com.chinaitop.depot.device.model.HouseTypeBean;
22
+import com.chinaitop.depot.device.model.ShelfContentBean;
23
+import com.chinaitop.depot.device.model.StorageDeviceback;
24
+import com.chinaitop.depot.device.model.StorageDeviceget;
25
+import com.chinaitop.depot.device.model.StorageDevicegetExample;
26
+import com.chinaitop.depot.device.model.StorageDeviceinput;
27
+import com.chinaitop.depot.device.model.StorageDeviceinputExample;
28
+import com.chinaitop.depot.device.model.StorageDeviceinputExample.Criteria;
29
+import com.chinaitop.depot.device.service.StorageDeviceBackService;
30
+import com.chinaitop.depot.device.service.StorageDeviceGetService;
31
+import com.chinaitop.depot.device.service.StorageDeviceInputService;
32
+import com.chinaitop.depot.utils.ParameterUtil;
33
+import com.fasterxml.jackson.databind.ObjectMapper;
34
+import com.github.pagehelper.PageHelper;
35
+import com.github.pagehelper.PageInfo;
36
+
37
+import io.swagger.annotations.Api;
38
+import io.swagger.annotations.ApiImplicitParam;
39
+import io.swagger.annotations.ApiImplicitParams;
40
+import io.swagger.annotations.ApiOperation;
41
+
42
+@RestController
43
+@RequestMapping(value= {"/deviceGet"})
44
+@Api(value= "StorageDeviceGetController", description = "器材设备领用")
45
+public class StorageDeviceGetController {
46
+
47
+	@Resource
48
+	private StorageDeviceGetService deviceGetService;
49
+	
50
+	@Resource
51
+	private StorageDeviceInputService deviceInputService;
52
+	
53
+	@Resource
54
+	private StorageDeviceBackService deviceBackService;
55
+	
56
+	@Resource
57
+	private BasicEquipmentEquipmentPoolService equipmentPoolService;
58
+	
59
+	
60
+	 /**
61
+     * 分页获取器材信息
62
+     */
63
+    @RequestMapping(value = "/getDeviceList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
64
+    @ApiOperation(value="获取领用信息", notes = "领用信息查询,支持分页")
65
+  	@ApiImplicitParams({
66
+  			@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
67
+  			@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
68
+  			@ApiImplicitParam(name = "orgName", value = "当前登录人组织名称", paramType = "query")
69
+  	})
70
+    public PageInfo<StorageDeviceget> listCheckPage(HttpServletRequest request,Integer pageNum, Integer pageSize, 
71
+    		String deviceName, Integer deviceType){
72
+    	
73
+    	StorageDevicegetExample storageDevicegetExample=new StorageDevicegetExample(); 
74
+    	StorageDevicegetExample.Criteria criteria=storageDevicegetExample.createCriteria();
75
+    	
76
+    	if(ParameterUtil.isnotnull(deviceName)){
77
+            criteria.andDeviceNameLike(deviceName);
78
+        }
79
+        if(ParameterUtil.isnotnull(deviceType)){
80
+           criteria.andDeviceTypeEqualTo(deviceType);
81
+        }
82
+        
83
+    	
84
+        //按照id进行降序
85
+        storageDevicegetExample.setOrderByClause("id desc");
86
+   
87
+        PageHelper.startPage(pageNum, pageSize);
88
+        List<StorageDeviceget> list = deviceGetService.queryByDevice(storageDevicegetExample);
89
+        PageInfo<StorageDeviceget> pageInfo = new PageInfo<StorageDeviceget>(list);
90
+        return pageInfo;
91
+    }
92
+
93
+   /**
94
+     * 根据主键id删除数据
95
+     */
96
+    @RequestMapping(value="/remove",produces = MediaType.APPLICATION_JSON_VALUE,  method=RequestMethod.POST)
97
+   	@ApiOperation(value="删除数据", notes = "根据id删除数据")
98
+   	@ApiImplicitParams({
99
+   	   	 @ApiImplicitParam(name = "id", value = "id", paramType = "form")
100
+   	}) 
101
+    public Map<String, Object> remove(Integer id){
102
+        Map<String,Object> retMap = new HashMap<String,Object>();
103
+        deviceInputService.remove(id);
104
+        retMap.put("msg","success");
105
+        return retMap;
106
+    }
107
+	
108
+    /**
109
+     * 新增和修改的数据进行保存
110
+     */
111
+    @RequestMapping(value="/save", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
112
+	@ApiOperation(value="保存数据", notes = "保存增加或修改的数据")
113
+    @ApiImplicitParams({
114
+  	   	 @ApiImplicitParam(name = "deviceGetJson", value = "新增数据", paramType = "form"),
115
+  	   	 @ApiImplicitParam(name = "contentBeanJson", value = "新增数据", paramType = "form")
116
+  	})
117
+    public Map<String, Object> save(String deviceGetJson,String contentBeanJson) {
118
+        Map<String, Object> modelMap = new HashMap<>();
119
+        // JSON字符串转对象
120
+        ObjectMapper mapper = new ObjectMapper();
121
+        StorageDeviceget storageDeviceget = null;
122
+        try {
123
+        	//保存领用数据
124
+        	ContentBean cb=(ContentBean)mapper.readValue(contentBeanJson, ContentBean.class);
125
+        	storageDeviceget = (StorageDeviceget)mapper.readValue(deviceGetJson, StorageDeviceget.class);
126
+        	storageDeviceget.setDeviceName(cb.getDeviceName());
127
+        	storageDeviceget.setDeviceType(cb.getDeviceTypeId());
128
+        	storageDeviceget.setModel(cb.getModel());
129
+        	storageDeviceget.setNumber(cb.getNumber());
130
+        	storageDeviceget.setUseCount(cb.getUseCount());
131
+        	storageDeviceget.setBackCount(0);
132
+        	storageDeviceget.setHouseId(storageDeviceget.getHouseId());
133
+        	deviceGetService.save(storageDeviceget);
134
+        	
135
+        	//根据设备编号获取入库表的该设备信息
136
+        	modelMap.put("number", storageDeviceget.getNumber());
137
+        	modelMap.put("model", storageDeviceget.getModel());
138
+        	List<StorageDeviceinput> inputList=deviceInputService.getUseCount(modelMap);
139
+        	inputList.get(0).setStatus(4);//领用状态
140
+        	inputList.get(0).setUseCount(inputList.get(0).getUseCount()-storageDeviceget.getGetCount());//数量减少
141
+        	deviceInputService.updateByPrimaryKeySelective(inputList.get(0));
142
+        	//改变入库的数量
143
+        	/*StorageDeviceinputExample storageDeviceinputExample2 = new StorageDeviceinputExample();
144
+        	Criteria criteria2 = storageDeviceinputExample2.createCriteria();
145
+        	criteria2.andNumberEqualTo(cb.getNumber());
146
+        	List<StorageDeviceinput> list=deviceInputService.queryByNumber(storageDeviceinputExample2);
147
+        	StorageDeviceinputExample storageDeviceinputExample=new StorageDeviceinputExample();
148
+        	StorageDeviceinputExample.Criteria criteria=storageDeviceinputExample.createCriteria();
149
+        	criteria.andIdEqualTo(Integer.valueOf(storageDeviceget.getInputId()));
150
+        	List<StorageDeviceinput> inputlist = deviceInputService.queryByDevice(storageDeviceinputExample);
151
+            if(inputlist!=null){
152
+            	StorageDeviceinput storageDeviceinput=list.get(0);
153
+            	//使其状态改变为领用
154
+            	storageDeviceinput.setStatus(4);
155
+            	storageDeviceinput.setUseCount(storageDeviceinput.getUseCount()-storageDeviceget.getGetCount());
156
+            	deviceInputService.save(storageDeviceinput);
157
+            }*/
158
+            modelMap.put("status", "success");
159
+        } catch (IOException e) {
160
+            modelMap.put("status", "error");
161
+            e.printStackTrace();
162
+        }
163
+        return modelMap;
164
+    }
165
+
166
+    
167
+    /**
168
+     *  根据id加载对应数据
169
+     */
170
+    @RequestMapping(value ="/loadDataById",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
171
+	@ApiOperation(value="查询数据", notes = "根据id查询数据")
172
+	@ApiImplicitParams({
173
+		 @ApiImplicitParam(name = "id", value = "id", paramType = "query")
174
+	})
175
+    public StorageDeviceinput loadDataById(int id){
176
+    	if(id !=0){
177
+    		return deviceInputService.loadDataById(id);
178
+    	}
179
+        return new StorageDeviceinput();
180
+    }
181
+
182
+    /**
183
+     * 获取入库的仓房名
184
+     */
185
+    @RequestMapping(value ="/getHouseList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
186
+	@ApiOperation(value="获取入库仓房名称", notes = "获取入库仓房名称")
187
+    public List<HouseNameBean> getHouseList(){
188
+    	List<HouseNameBean> storageDeviceinput=deviceInputService.getHouseList();
189
+        return storageDeviceinput;
190
+    }
191
+    /**
192
+     * 获取仓房对应的类型
193
+     */
194
+    @RequestMapping(value ="/getTypeList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
195
+	@ApiOperation(value="获取仓房对应的类型", notes = "获取仓房对应的类型")
196
+	@ApiImplicitParams({
197
+		 @ApiImplicitParam(name = "depotId", value = "depotId", paramType = "query"),
198
+	})
199
+    public List<HouseTypeBean> getTypeList(Integer depotId){
200
+    	List<HouseTypeBean> TypeNameList=deviceInputService.getTypeList(depotId);
201
+    	return TypeNameList;
202
+    }
203
+    /**
204
+     * 获取仓房对应的类型的货架和名称getNameList
205
+     */
206
+    @RequestMapping(value ="/getNameList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
207
+	@ApiOperation(value="获取仓房对应的类型的货架和名称", notes = "获取仓房对应的类型的货架和名称")
208
+	@ApiImplicitParams({
209
+		 @ApiImplicitParam(name = "depotTypeId", value = "depotTypeId", paramType = "query"),
210
+	})
211
+    public List<ShelfContentBean> getNameList(Integer depotTypeId){
212
+    	List<ShelfContentBean> getNameList=deviceInputService.getNameList(depotTypeId);
213
+    	return getNameList;
214
+    }
215
+   
216
+    
217
+    /**
218
+     * 根据名称获取货架getShelfGetList
219
+     */
220
+    @RequestMapping(value ="/getShelfGetList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
221
+   	@ApiOperation(value="根据名称获取货架", notes = "根据名称获取货架")
222
+   	@ApiImplicitParams({
223
+   		 @ApiImplicitParam(name = "deviceName", value = "设备名称", paramType = "query"),
224
+   	})
225
+    public List<ContentBean> getShelfGetList(String deviceName){
226
+    	List<ContentBean> shelfGetList = deviceInputService.getShelfGetList(deviceName);
227
+    	return shelfGetList;
228
+    }
229
+    
230
+    /**
231
+     * 根据货架和名称获取规格型号getModelGetList
232
+     */
233
+    @RequestMapping(value ="/getModelGetList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
234
+   	@ApiOperation(value="根据货架和名称获取规格型号", notes = "根据货架和名称获取规格型号")
235
+   	@ApiImplicitParams({
236
+   		 @ApiImplicitParam(name = "shelfId", value = "货架", paramType = "query"),
237
+   		 @ApiImplicitParam(name = "deviceName", value = "设备名称", paramType = "query")
238
+   	})
239
+    public List<ContentBean> getModelGetList(String shelfId,String deviceName){
240
+    	Map<String, Object> map  = new HashMap<>();
241
+		map.put("deviceName", deviceName);
242
+		map.put("storageRack", shelfId);
243
+    	List<ContentBean> getModelList=deviceInputService.getModelGetList(map);
244
+    	return getModelList;
245
+    }
246
+    
247
+    /**
248
+     * 根据规格型号获取数量getNumberGetList
249
+     */
250
+    @RequestMapping(value ="/getNumberGetList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
251
+   	@ApiOperation(value="根据规格型号获取数量", notes = "根据规格型号获取数量")
252
+   	@ApiImplicitParams({
253
+   		 @ApiImplicitParam(name = "model", value = "规格型号", paramType = "query")
254
+   	})
255
+    public List<StorageDeviceinput> getNumberGetList(String deviceTypeId,String deviceName,String shelfId,String model,Integer orgId){
256
+    	Map<String, Object> map  = new HashMap<>();
257
+		map.put("deviceName", deviceName);
258
+		map.put("deviceTypeId", deviceTypeId);
259
+		map.put("shelfId", shelfId);
260
+		map.put("model", model);
261
+		map.put("orgId", orgId);
262
+    	List<StorageDeviceinput> getNumberList=deviceInputService.getNumberGetList(map);
263
+    	return getNumberList;
264
+    }
265
+    
266
+    /**
267
+     * 根据编号和规格获取可用数量getUseCountGetList
268
+     */
269
+    @RequestMapping(value ="/getUseCountGetList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
270
+   	@ApiOperation(value="根据编号和规格获取可用数量", notes = "根据编号和规格获取可用数量")
271
+   	@ApiImplicitParams({
272
+   		 @ApiImplicitParam(name = "model", value = "规格型号", paramType = "query"),
273
+   		 @ApiImplicitParam(name = "number", value = "编号", paramType = "query")
274
+   	})
275
+    public List<StorageDeviceinput> getUseCountGetList(String deviceTypeId,String deviceName,String shelfId,String number,String model,Integer orgId){
276
+    		Map<String,Object> map = new HashMap<String,Object>();
277
+    		map.put("deviceTypeId", deviceTypeId);
278
+    		map.put("deviceName", deviceName);
279
+    		map.put("shelfId", shelfId);
280
+    		map.put("number", number);
281
+    		map.put("model", model);
282
+    		map.put("orgId", orgId);
283
+    		List<StorageDeviceinput> getUseCountList=deviceInputService.getUseCount(map);
284
+    	return getUseCountList;
285
+    }
286
+    
287
+    
288
+    /**
289
+     * 根据ID获取借取信息
290
+     * @throws Exception 
291
+     */
292
+    @RequestMapping(value ="/getDeviceGetById",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
293
+   	@ApiOperation(value="根据ID获取借取信息", notes = "根据ID获取借取信息")
294
+   	@ApiImplicitParams({
295
+   		 @ApiImplicitParam(name = "id", value = "id", paramType = "query")
296
+   	})
297
+    public List<StorageDeviceget> getDeviceGetById(String id) throws Exception{
298
+    	StorageDeviceget storageDeviceget=null;
299
+    	if(id != null && !"".equals(id)){
300
+    		storageDeviceget=deviceGetService.selectByPrimaryKey(Integer.valueOf(id));
301
+    	}
302
+    	/*if(storageDeviceget.getDepotId()!=null){
303
+            BasicEquipmentEquipmentPool equipmentPool=equipmentPoolService.findByIdObj(storageDeviceget.getDepotId());
304
+            if(equipmentPool != null) storageDeviceget.setDepotName(equipmentPool.getPutPosition());
305
+        }*/
306
+    	List<StorageDeviceget> list =new ArrayList<StorageDeviceget>();
307
+    	list.add(storageDeviceget);
308
+        return list;
309
+    }
310
+    
311
+    /**
312
+     * 根据ID获取归还信息
313
+     * @throws Exception 
314
+     */
315
+    @RequestMapping(value ="/getDeviceBackById",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
316
+   	@ApiOperation(value="根据ID获取归还信息", notes = "根据ID获取归还信息")
317
+   	@ApiImplicitParams({
318
+   		 @ApiImplicitParam(name = "id", value = "id", paramType = "query")
319
+   	})
320
+    public List<StorageDeviceback> getDeviceBackById(Integer id) throws Exception{
321
+    	List<StorageDeviceback> backList =null;
322
+    	if(id != null && !"".equals(id)){
323
+    		backList=deviceBackService.selectBygetId(id);
324
+    	}
325
+    	return backList;
326
+    }
327
+    
328
+    /**
329
+     * 获取ID修改信息
330
+     */
331
+    @RequestMapping(value ="/updateDeviceGetById",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
332
+   	@ApiOperation(value="获取ID修改信息", notes = "获取ID修改信息")
333
+   	@ApiImplicitParams({
334
+   		 @ApiImplicitParam(name = "storageDeviceget", value = "storageDeviceget", paramType = "query")
335
+   	})
336
+    public Map<String, Object> updateDeviceGetById(StorageDeviceget storageDeviceget){
337
+    	Map<String,Object> retMap = new HashMap<String,Object>();
338
+    	if(storageDeviceget != null){
339
+    		deviceGetService.save(storageDeviceget);
340
+    		retMap.put("msg","success");
341
+    	}else{
342
+    		retMap.put("msg","error");
343
+    	}
344
+        return retMap;
345
+    }
346
+    
347
+    /*
348
+     * 增加归还信息
349
+     */
350
+    @RequestMapping(value ="/saveBack",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
351
+   	@ApiOperation(value="增加归还信息", notes = "增加归还信息")
352
+    @ApiImplicitParams({
353
+  		 @ApiImplicitParam(name = "deviceBackJson", value = "增加数据", paramType = "query")
354
+  	})
355
+    public Map<String, Object> endMore(String deviceBackJson) {
356
+    	Map<String, Object> modelMap = new HashMap<>();
357
+        // JSON字符串转对象
358
+        ObjectMapper mapper = new ObjectMapper();
359
+        StorageDeviceget storageDeviceget=null;
360
+        StorageDeviceback storageDeviceback=null;
361
+    	StorageDeviceinput storageDeviceinput=null;
362
+
363
+        try {
364
+        	//storageDeviceget = (StorageDeviceget)mapper.readValue(deviceBackJson, StorageDeviceget.class);
365
+        	storageDeviceback = (StorageDeviceback)mapper.readValue(deviceBackJson, StorageDeviceback.class);
366
+        	//增加归还信息(归还表)
367
+        	storageDeviceback.setGetId(storageDeviceback.getId());
368
+        	storageDeviceback.setId(0);
369
+        	deviceBackService.save(storageDeviceback);
370
+        	//领取表中的归还数量增加(领取时,默认归还为0)
371
+        	storageDeviceget=deviceGetService.selectByPrimaryKey(storageDeviceback.getGetId());//获取上次归还的数量
372
+        		storageDeviceget.setBackCount(storageDeviceback.getBackCount()+storageDeviceget.getBackCount());
373
+        	deviceGetService.updateByPrimaryKeySelective(storageDeviceget);
374
+        	
375
+            //入库表的数量增加
376
+       	    storageDeviceinput = deviceInputService.selectById(storageDeviceget.getInputId());//获取之前的数量
377
+       	    //修改现在入库表的数量
378
+        	storageDeviceinput.setUseCount(storageDeviceinput.getUseCount()+storageDeviceback.getBackCount()-storageDeviceback.getBrokenCount());
379
+        	storageDeviceinput.setBrokenCount(storageDeviceback.getBrokenCount());
380
+        	if(storageDeviceinput.getBrokenCount()!=0){
381
+        		storageDeviceinput.setStatus(5);//故障
382
+        	}else{
383
+        		storageDeviceinput.setStatus(0);//正常
384
+        	}
385
+        	deviceInputService.updateByPrimaryKeySelective(storageDeviceinput);
386
+            modelMap.put("status", "success");
387
+        } catch (Exception e) {
388
+            modelMap.put("status", "error");
389
+            e.printStackTrace();
390
+        }
391
+        return modelMap;
392
+    }
393
+
394
+    
395
+    /**
396
+     * 获取仓房下的器材和设备用于APP端
397
+     */
398
+    @RequestMapping(value ="/getDeviceByHouseId",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
399
+   	@ApiOperation(value="获取仓房下的器材和设备用于APP端", notes = "获取仓房下的器材和设备用于APP端")
400
+   	@ApiImplicitParams({
401
+   		 @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
402
+   		 @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
403
+   		 @ApiImplicitParam(name = "houseId", value = "仓房编号", paramType = "query")
404
+   	})
405
+    public PageInfo<StorageDeviceget> getDeviceByHouseId(Integer pageNum, Integer pageSize,Integer houseId){
406
+   
407
+        if (pageNum!=null && pageSize!=null) {
408
+            PageHelper.startPage(pageNum, pageSize);
409
+        }
410
+        
411
+        List<StorageDeviceget> list=deviceGetService.selectByHouseId(houseId);
412
+       
413
+        PageInfo<StorageDeviceget> pageInfo = new PageInfo<StorageDeviceget>(list);
414
+        return pageInfo;
415
+    }
416
+}

+ 272 - 0
src/main/java/com/chinaitop/depot/device/controller/StorageDeviceInputController.java

@@ -0,0 +1,272 @@
1
+package com.chinaitop.depot.device.controller;
2
+
3
+import java.io.IOException;
4
+import java.util.HashMap;
5
+import java.util.List;
6
+import java.util.Map;
7
+
8
+import javax.annotation.Resource;
9
+import javax.servlet.http.HttpServletRequest;
10
+
11
+import org.springframework.http.MediaType;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RequestMethod;
14
+import org.springframework.web.bind.annotation.RestController;
15
+
16
+import com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool;
17
+import com.chinaitop.depot.device.model.StorageDeviceinput;
18
+import com.chinaitop.depot.device.model.StorageDeviceinputExample;
19
+import com.chinaitop.depot.device.service.BasicEquipmentEquipmentPoolService;
20
+import com.chinaitop.depot.device.service.StorageDeviceGetService;
21
+import com.chinaitop.depot.device.service.StorageDeviceInputService;
22
+import com.chinaitop.depot.utils.ParameterUtil;
23
+import com.fasterxml.jackson.databind.ObjectMapper;
24
+import com.github.pagehelper.PageHelper;
25
+import com.github.pagehelper.PageInfo;
26
+
27
+
28
+import io.swagger.annotations.Api;
29
+import io.swagger.annotations.ApiImplicitParam;
30
+import io.swagger.annotations.ApiImplicitParams;
31
+import io.swagger.annotations.ApiOperation;
32
+
33
+/**
34
+ * 
35
+ * 
36
+ * @author gaodd
37
+ *
38
+ */
39
+
40
+@RestController
41
+@RequestMapping(value= {"/deviceInput"})
42
+@Api(value= "StorageDeviceInputController", description = "器材设备入库")
43
+public class StorageDeviceInputController {
44
+
45
+	@Resource
46
+	private StorageDeviceInputService deviceInputService;
47
+	@Resource
48
+	private BasicEquipmentEquipmentPoolService poolServivce;
49
+	@Resource
50
+	private StorageDeviceGetService deviceGetService;
51
+	
52
+	
53
+	 /**
54
+     * 分页获取器材设备信息
55
+	 * @throws Exception 
56
+     */
57
+	@RequestMapping(value = "/getDeviceList",produces = MediaType.APPLICATION_JSON_VALUE,method=RequestMethod.GET)
58
+    @ApiOperation(value="查询入库设备信息", notes = "查询入库设备列表,支持分页")
59
+  	@ApiImplicitParams({
60
+  			@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
61
+  			@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
62
+  			@ApiImplicitParam(name = "orgName", value = "当前登录人组织名称", paramType = "query")
63
+  	})
64
+    public PageInfo<StorageDeviceinput> getList(HttpServletRequest request,Integer pageNum, Integer pageSize, String deviceName, Integer deviceType) throws Exception{
65
+    	StorageDeviceinputExample storageDeviceinputExample=new StorageDeviceinputExample();
66
+    	StorageDeviceinputExample.Criteria criteria=storageDeviceinputExample.createCriteria();
67
+    	if(ParameterUtil.isnotnull(deviceType)){
68
+    		criteria.andDeviceTypeEqualTo(deviceType);
69
+    	}
70
+    	if(ParameterUtil.isnotnull(deviceName)){
71
+    		criteria.andDeviceNameLike(deviceName);
72
+    	}
73
+
74
+        //排序
75
+        //storageDeviceinputExample.setOrderByClause("FIELD(status,0,1),input_time desc,id desc");
76
+        storageDeviceinputExample.setOrderByClause("id desc");
77
+        
78
+        if (pageNum!=null && pageSize!=null) {
79
+            PageHelper.startPage(pageNum, pageSize);
80
+        }
81
+        List<StorageDeviceinput> list = deviceInputService.queryByDevice(storageDeviceinputExample);
82
+        PageInfo<StorageDeviceinput> pageInfo = new PageInfo<StorageDeviceinput>(list);
83
+        return pageInfo;
84
+    }
85
+
86
+    
87
+    /**
88
+     * 根据主键id删除数据
89
+     */
90
+	 @RequestMapping(value="/remove", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
91
+	 @ApiOperation(value="删除数据", notes = "根据id删除数据")
92
+	 @ApiImplicitParams({
93
+	   	 @ApiImplicitParam(name = "id", value = "id", paramType = "form"),
94
+	 })    
95
+	 public Map<String, Object> remove(Integer id){
96
+        Map<String,Object> retMap = new HashMap<String,Object>();
97
+        deviceInputService.remove(id);
98
+        retMap.put("msg","success");
99
+        return retMap;
100
+    }
101
+	
102
+    /**
103
+     * 新增和修改的数据进行保存
104
+     */
105
+	 @RequestMapping(value="/save",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
106
+	 @ApiOperation(value="保存数据", notes = "保存")
107
+	 @ApiImplicitParams({
108
+	    	@ApiImplicitParam(name="deviceInputJson", value="主表数据", paramType="form")
109
+	 })
110
+    public Map<String, Object> save(String deviceInputJson) {
111
+        Map<String, Object> modelMap = new HashMap<>();
112
+        // JSON字符串转对象
113
+        ObjectMapper mapper = new ObjectMapper();
114
+        try {
115
+        	StorageDeviceinput storageDeviceinput = (StorageDeviceinput)mapper.readValue(deviceInputJson, StorageDeviceinput.class);
116
+            //校验同一类型同一名称同一规格型号的编号是否重复
117
+        	StorageDeviceinputExample storageDeviceinputExample=new StorageDeviceinputExample();
118
+        	StorageDeviceinputExample.Criteria criteria=storageDeviceinputExample.createCriteria();
119
+        	criteria.andDeviceTypeEqualTo(storageDeviceinput.getDeviceType());
120
+        	criteria.andDeviceNameEqualTo(storageDeviceinput.getDeviceName());
121
+        	criteria.andModelEqualTo(storageDeviceinput.getModel());
122
+        	criteria.andNumberEqualTo(storageDeviceinput.getNumber());
123
+        	criteria.andOrgIdEqualTo(storageDeviceinput.getOrgId());
124
+        	List<StorageDeviceinput> list = deviceInputService.queryByDevice(storageDeviceinputExample);
125
+        	if (null != list && list.size() > 0) {
126
+        		// 获取自己数据的ID
127
+        		modelMap.put("status", "error");
128
+        		modelMap.put("msg", "同一类型同一名称同一规格型号的资产编号已重复!");
129
+        		return modelMap;
130
+        	}else{//新增
131
+        		storageDeviceinput.setStatus(0);
132
+            	deviceInputService.save(storageDeviceinput);
133
+                modelMap.put("status", "success");
134
+        	}
135
+        	
136
+        } catch (IOException e) {
137
+            modelMap.put("status", "error");
138
+            modelMap.put("msg", "保存失败!");
139
+            e.printStackTrace();
140
+        }
141
+        return modelMap;
142
+    }
143
+
144
+	   
145
+	 
146
+    /**
147
+     * 根据id加载对应数据
148
+     */
149
+	 @RequestMapping(value ="/loadDataById", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
150
+	 @ApiOperation(value="查询数据", notes = "根据id查询数据")
151
+	 @ApiImplicitParams({
152
+		  @ApiImplicitParam(name = "id", value = "id", paramType = "query"),
153
+	 })
154
+    public StorageDeviceinput loadDataById(int id){
155
+	   if(id != 0) {
156
+           return  deviceInputService.loadDataById(id);
157
+       }
158
+       return new StorageDeviceinput();
159
+    }
160
+   
161
+   /**
162
+    * 查询设备数据(5476)
163
+    */
164
+    @RequestMapping(value="/getDevice", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
165
+    @ApiOperation(value="查询设备信息", notes = "查询设备信息")
166
+  	@ApiImplicitParams({
167
+  			@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
168
+  			@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
169
+  	})
170
+	public PageInfo<StorageDeviceinput> getDevice(HttpServletRequest request,Integer pageNum, Integer pageSize, String deviceName, Integer deviceTypeId) {
171
+
172
+		if (pageNum!=null && pageSize!=null) {
173
+			PageHelper.startPage(pageNum, pageSize);
174
+		}
175
+		//排序
176
+		HashMap<Object, Object> map = new HashMap<Object, Object>();
177
+		map.put("deviceName", deviceName);
178
+		map.put("deviceTypeId", deviceTypeId);
179
+		List<StorageDeviceinput> list=deviceInputService.queryDevice(map);
180
+		PageInfo<StorageDeviceinput> pageInfo = new PageInfo<StorageDeviceinput>(list);
181
+		return pageInfo;
182
+	}
183
+	 
184
+    /**
185
+     * 根据类型查询数量
186
+     * @param example 粮食业务
187
+     * @return
188
+     */
189
+    @RequestMapping(value="/getDate", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
190
+    @ApiOperation(value="获取各个类型入库和使用数量", notes = "获取各个类型入库和使用数量")
191
+    public Map<String, Object> getDate() {
192
+		
193
+    	Map<String, Object> returnMap = new HashMap<String, Object>();
194
+    	//入库数量
195
+    	List<Map<String, Object>> queryCountByType = deviceInputService.queryCountByType();
196
+    	String sumCount = "";
197
+    	String useCount = "";
198
+    	if(queryCountByType.size()>0 && queryCountByType!=null){
199
+    		for (Map<String, Object> map : queryCountByType) {
200
+        		/*int useCount = Integer.parseInt(map.get("userCounts").toString());
201
+        		sumCount = sumCount + useCount+",";*/
202
+    			//入库时的数量
203
+    			//String sumCounts = map.get("sumCounts").toString();
204
+    			//int sumCounts = Integer.valueOf(map.get("sumCounts").toString());
205
+    			String a = map.get("sumCounts").toString().substring(0, map.get("sumCounts").toString().length()-2);
206
+    			int sumCounts = Integer.valueOf(a);
207
+    			
208
+    			//使用数量
209
+    			int useCounts = sumCounts-(Integer.parseInt(map.get("userCounts").toString())+Integer.parseInt(map.get("brokenCount").toString()));
210
+    			System.out.println("****"+Integer.parseInt(map.get("brokenCount").toString()));
211
+    			sumCount = sumCount + sumCounts+",";
212
+    			useCount = useCount + useCounts+",";
213
+    			
214
+    		}
215
+    		sumCount = sumCount.substring(0, sumCount.length()-1);
216
+    		useCount = useCount.substring(0, useCount.length()-1);
217
+    		System.out.println(sumCount+"****sumCount***");
218
+    		System.out.println(useCount+"****useCount***");
219
+    	}
220
+    	
221
+    	returnMap.put("sumCount", sumCount);
222
+    	
223
+    	/*//使用数量
224
+    	List<Map<String, Object>> queryUseCountByType = deviceGetService.queryCountByType();
225
+    	String useCount = "";
226
+    	if(queryUseCountByType.size()>0 && queryUseCountByType!=null){
227
+    		for (Map<String, Object> map : queryUseCountByType) {
228
+        		int getCount = Integer.parseInt(map.get("getCounts").toString());
229
+        		useCount = useCount + getCount+",";
230
+    		}
231
+        	useCount = useCount.substring(0, useCount.length()-1);
232
+    	}*/
233
+    	
234
+    	returnMap.put("useCount", useCount);
235
+        return returnMap;
236
+    }
237
+    
238
+    
239
+    /**
240
+     * 分页获取器材设备信息
241
+	 * @throws Exception 
242
+     */
243
+	@RequestMapping(value = "/getDeviceAccountList",produces = MediaType.APPLICATION_JSON_VALUE,method=RequestMethod.GET)
244
+    @ApiOperation(value="查询入库设备信息", notes = "查询入库设备列表,支持分页")
245
+  	@ApiImplicitParams({
246
+  			@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
247
+  			@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
248
+  			@ApiImplicitParam(name = "orgName", value = "当前登录人组织名称", paramType = "query")
249
+  	})
250
+    public PageInfo<StorageDeviceinput> getDeviceAccountList(HttpServletRequest request,Integer pageNum, Integer pageSize, Integer deviceType ,String orgName) throws Exception{
251
+    	StorageDeviceinputExample storageDeviceinputExample=new StorageDeviceinputExample();
252
+    	StorageDeviceinputExample.Criteria criteria=storageDeviceinputExample.createCriteria();
253
+    	if(ParameterUtil.isnotnull(deviceType)){
254
+    		criteria.andDeviceTypeEqualTo(deviceType);
255
+    	}
256
+        //排序
257
+        storageDeviceinputExample.setOrderByClause("FIELD(status,0,1),input_time desc,id desc");
258
+   
259
+        if (pageNum!=null && pageSize!=null) {
260
+            PageHelper.startPage(pageNum, pageSize);
261
+        }
262
+        
263
+        List<StorageDeviceinput> list = deviceInputService.queryDeviceAccount(storageDeviceinputExample);
264
+         for (StorageDeviceinput storageDeviceinput : list) {
265
+        	 if(orgName!=null){
266
+        		 storageDeviceinput.setOrgName(orgName);
267
+        	 }
268
+		}
269
+        PageInfo<StorageDeviceinput> pageInfo = new PageInfo<StorageDeviceinput>(list);
270
+        return pageInfo;
271
+    }
272
+}

+ 248 - 0
src/main/java/com/chinaitop/depot/device/controller/StorageDeviceKeepController.java

@@ -0,0 +1,248 @@
1
+package com.chinaitop.depot.device.controller;
2
+
3
+import java.io.IOException;
4
+import java.text.DateFormat;
5
+import java.text.SimpleDateFormat;
6
+import java.util.ArrayList;
7
+import java.util.Date;
8
+import java.util.HashMap;
9
+import java.util.List;
10
+import java.util.Map;
11
+
12
+import javax.annotation.Resource;
13
+import javax.servlet.http.HttpServletRequest;
14
+
15
+import org.springframework.http.MediaType;
16
+import org.springframework.web.bind.annotation.RequestMapping;
17
+import org.springframework.web.bind.annotation.RequestMethod;
18
+import org.springframework.web.bind.annotation.RestController;
19
+
20
+import com.alibaba.fastjson.JSONObject;
21
+import com.chinaitop.depot.device.model.StorageDeviceinput;
22
+import com.chinaitop.depot.device.model.StorageDevicekeep;
23
+import com.chinaitop.depot.device.model.StorageDevicekeepExample;
24
+import com.chinaitop.depot.device.service.StorageDeviceInputService;
25
+import com.chinaitop.depot.device.service.StorageDeviceKeepService;
26
+import com.chinaitop.depot.utils.ParameterUtil;
27
+import com.fasterxml.jackson.databind.ObjectMapper;
28
+import com.github.pagehelper.PageHelper;
29
+import com.github.pagehelper.PageInfo;
30
+
31
+import io.swagger.annotations.Api;
32
+import io.swagger.annotations.ApiImplicitParam;
33
+import io.swagger.annotations.ApiImplicitParams;
34
+import io.swagger.annotations.ApiOperation;
35
+
36
+@RestController
37
+@RequestMapping(value= {"/deviceKeep"})
38
+@Api(value= "StorageDeviceKeepController", description = "器材设备保养")
39
+public class StorageDeviceKeepController {
40
+
41
+	@Resource
42
+	private StorageDeviceKeepService deviceKeepService;
43
+	@Resource
44
+	private StorageDeviceInputService deviceInputService;
45
+	/*@Resource
46
+	private OrgInfoService orgInfoService;*/
47
+	
48
+	 /**
49
+     * 分页获取器材信息
50
+	 * @throws Exception 
51
+     */
52
+    @RequestMapping(value = "/getDeviceList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
53
+    @ApiOperation(value="查询保养信息", notes = "查询保养信息,支持分页")
54
+  	@ApiImplicitParams({
55
+  			@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
56
+  			@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
57
+  	})
58
+    public PageInfo<StorageDevicekeep> listCheckPage(HttpServletRequest request,Integer pageNum, Integer pageSize, String deviceName, 
59
+    		Integer keepStatus, Integer orgId) throws Exception{
60
+
61
+    	StorageDevicekeepExample storageDevicekeepExample=new StorageDevicekeepExample();
62
+    	StorageDevicekeepExample.Criteria criteria=storageDevicekeepExample.createCriteria();
63
+       
64
+    	if(ParameterUtil.isnotnull(deviceName)){
65
+            criteria.andDeviceNameLike(deviceName);
66
+        }
67
+        if(ParameterUtil.isnotnull(keepStatus)){
68
+           criteria.andKeepStatusEqualTo(keepStatus);
69
+        }
70
+        if(ParameterUtil.isnotnull(orgId)){
71
+        	criteria.andOrgIdEqualTo(orgId);
72
+        }
73
+    	
74
+
75
+        //排序
76
+        storageDevicekeepExample.setOrderByClause("FIELD(keep_status,1,0), keep_end desc , id desc");
77
+        
78
+   
79
+        if (pageNum!=null && pageSize!=null) {
80
+            PageHelper.startPage(pageNum, pageSize);
81
+        }
82
+        List<StorageDevicekeep> list = deviceKeepService.queryByDevice(storageDevicekeepExample);
83
+        PageInfo<StorageDevicekeep> pageInfo = new PageInfo<StorageDevicekeep>(list);
84
+        return pageInfo;
85
+    }
86
+
87
+    /**
88
+     * 根据主键id删除数据
89
+     */
90
+    @RequestMapping(value="/remove", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
91
+	@ApiOperation(value="删除数据", notes = "根据id删除数据")
92
+	@ApiImplicitParams({
93
+	   	@ApiImplicitParam(name = "id", value = "id", paramType = "form"),
94
+	}) 
95
+    public Map<String, Object> remove(Integer id){
96
+        Map<String,Object> retMap = new HashMap<String,Object>();
97
+        deviceKeepService.remove(id);
98
+        retMap.put("msg","success");
99
+        return retMap;
100
+    }
101
+	
102
+    /**
103
+     * 结束保养
104
+     */
105
+    @RequestMapping(value="/end", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
106
+	@ApiOperation(value="结束保养", notes = "结束保养")
107
+    public Map<String, Object> end(String deviceListJson) {
108
+        Map<String, Object> map = new HashMap<>();
109
+        // JSON字符串转对象
110
+        ObjectMapper mapper = new ObjectMapper();
111
+        StorageDevicekeep storageDevicekeep = null;
112
+        try {
113
+        	storageDevicekeep = (StorageDevicekeep)mapper.readValue(deviceListJson, StorageDevicekeep.class);
114
+        	storageDevicekeep.setKeepEnd(new Date());
115
+        	storageDevicekeep.setKeepStatus(0);
116
+        	deviceKeepService.updateByPrimaryKeySelective(storageDevicekeep);
117
+        	//根据id获取编号和型号
118
+        	storageDevicekeep=deviceKeepService.selectById(storageDevicekeep.getId());
119
+        	//改变入库表的状态
120
+        	map.put("number", storageDevicekeep.getNumber());
121
+        	map.put("model", storageDevicekeep.getModel());
122
+        	List<StorageDeviceinput> inputList=deviceInputService.getUseCount(map);
123
+        	inputList.get(0).setStatus(0);//正常状态
124
+        	inputList.get(0).setUseCount(inputList.get(0).getUseCount()+1);//数量增加
125
+        	deviceInputService.updateByPrimaryKeySelective(inputList.get(0));
126
+        	deviceKeepService.updateByPrimaryKeySelective(storageDevicekeep);
127
+            map.put("status", "success");
128
+        } catch (IOException e) {
129
+            map.put("status", "error");
130
+            e.printStackTrace();
131
+        }
132
+        return map;
133
+    }
134
+    
135
+    /**
136
+     * 批量结束保养
137
+     */
138
+    @RequestMapping(value="/endMore", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
139
+	@ApiOperation(value="批量结束保养", notes = "批量结束保养")
140
+    public Map<String, Object> endMore(String deviceListJson) {
141
+        Map<String, Object> modelMap = new HashMap<>();
142
+        // JSON字符串转对象
143
+        ObjectMapper mapper = new ObjectMapper();
144
+        try {
145
+        	JSONObject jsonObject = JSONObject.parseObject(deviceListJson);
146
+        	String idStr = jsonObject.getString("id");
147
+        	
148
+        	if(idStr != null && !"".equals(idStr)){
149
+        		String[] ids = idStr.split(",");
150
+        		for(int i=0; i<ids.length; i++){
151
+        			StorageDevicekeep storageDevicekeep = new StorageDevicekeep();
152
+                	storageDevicekeep.setKeepEnd(new Date());
153
+                	storageDevicekeep.setKeepStatus(0);
154
+                	storageDevicekeep.setId(Integer.parseInt(ids[i]));
155
+                	deviceKeepService.updateByPrimaryKeySelective(storageDevicekeep);
156
+        		}
157
+        	}
158
+            modelMap.put("status", "success");
159
+        } catch (Exception e) {
160
+            modelMap.put("status", "error");
161
+            e.printStackTrace();
162
+        }
163
+        return modelMap;
164
+    }
165
+
166
+
167
+	 /**
168
+     * 新增保养
169
+     */
170
+    @RequestMapping(value="/save", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
171
+   	@ApiOperation(value="新增保养", notes = "新增保养")
172
+    public Map<String, Object> save(String deviceAddJson) {
173
+        Map<String, Object> modelMap = new HashMap<>();
174
+        // JSON字符串转对象
175
+        ObjectMapper mapper = new ObjectMapper();
176
+        StorageDevicekeep storageDevicekeep = null;
177
+        try {
178
+        	storageDevicekeep = (StorageDevicekeep)mapper.readValue(deviceAddJson, StorageDevicekeep.class);
179
+        	storageDevicekeep.setKeepStatus(1);
180
+        	deviceKeepService.save(storageDevicekeep);
181
+        	//根据设备编号获取入库表的改设备信息
182
+        	modelMap.put("number", storageDevicekeep.getNumber());
183
+        	modelMap.put("model", storageDevicekeep.getModel());
184
+        	List<StorageDeviceinput> inputList=deviceInputService.getUseCount(modelMap);
185
+        	inputList.get(0).setStatus(2);//保养状态
186
+        	inputList.get(0).setUseCount(inputList.get(0).getUseCount()-1);//数量减少
187
+        	deviceInputService.updateByPrimaryKeySelective(inputList.get(0));
188
+            modelMap.put("status", "success");
189
+        } catch (IOException e) {
190
+            modelMap.put("status", "error");
191
+            e.printStackTrace();
192
+        }
193
+        return modelMap;
194
+    }
195
+
196
+    
197
+      /**
198
+     * 根据id加载对应数据
199
+     * @param id
200
+     * @return
201
+     */
202
+    @RequestMapping(value="/loadDataById", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
203
+   	@ApiOperation(value="获取数据", notes = "根据id获取数据")
204
+   	@ApiImplicitParams({
205
+   	   	@ApiImplicitParam(name = "id", value = "id", paramType = "form"),
206
+   	}) 
207
+    public List<StorageDevicekeep> loadDataById(int id){
208
+    	List<StorageDevicekeep> list=new ArrayList<StorageDevicekeep>();
209
+    	StorageDevicekeep storageDevicekeep=deviceKeepService.loadDataById(id);
210
+    	list.add(storageDevicekeep);
211
+        return list;
212
+    }
213
+    
214
+    
215
+    /**
216
+     * 获取机械及器材名称列表
217
+     */
218
+    @RequestMapping(value="/getDeviceNameList",produces = MediaType.APPLICATION_JSON_VALUE,  method=RequestMethod.GET)
219
+   	@ApiOperation(value="获取机械及器材名称列表", notes = "获取机械及器材名称列表")
220
+    public List<StorageDeviceinput> getDeviceNameList(){
221
+        return deviceInputService.getdevieName();
222
+    }
223
+    
224
+    /**
225
+     * 获取机械及器材规格型号与编号
226
+     */
227
+    @RequestMapping(value="/getDeviceModelList",produces = MediaType.APPLICATION_JSON_VALUE,  method=RequestMethod.GET)
228
+   	@ApiOperation(value="获取机械及器材规格型号与编号", notes = "获取机械及器材规格型号与编号")
229
+	@ApiImplicitParams({
230
+   	   	@ApiImplicitParam(name = "deviceName", value = "deviceName", paramType = "form"),
231
+   	}) 
232
+    public List<StorageDeviceinput> getDeviceModelList(String deviceName){
233
+    	return deviceInputService.getDeviceModelList(deviceName);
234
+    }
235
+    
236
+    /**
237
+     * 获取机械及器材规格型号与编号(维修)
238
+     */
239
+    @RequestMapping(value="/getDeviceModelListRepair",produces = MediaType.APPLICATION_JSON_VALUE,  method=RequestMethod.GET)
240
+    @ApiOperation(value="获取机械及器材规格型号与编号", notes = "获取机械及器材规格型号与编号")
241
+    @ApiImplicitParams({
242
+    	@ApiImplicitParam(name = "deviceName", value = "deviceName", paramType = "form"),
243
+    }) 
244
+    public List<StorageDeviceinput> getDeviceModelListRepair(String deviceName){
245
+    	return deviceInputService.getDeviceModelListRepair(deviceName);
246
+    }
247
+
248
+}

+ 85 - 0
src/main/java/com/chinaitop/depot/device/controller/StorageDeviceOutController.java

@@ -0,0 +1,85 @@
1
+package com.chinaitop.depot.device.controller;
2
+
3
+import java.io.IOException;
4
+import java.util.HashMap;
5
+import java.util.Map;
6
+
7
+import javax.annotation.Resource;
8
+
9
+import org.springframework.http.MediaType;
10
+import org.springframework.web.bind.annotation.RequestMapping;
11
+import org.springframework.web.bind.annotation.RequestMethod;
12
+import org.springframework.web.bind.annotation.RestController;
13
+
14
+import com.alibaba.fastjson.JSONObject;
15
+import com.chinaitop.depot.device.model.StorageDeviceinput;
16
+import com.chinaitop.depot.device.service.StorageDeviceInputService;
17
+import com.fasterxml.jackson.databind.ObjectMapper;
18
+
19
+import io.swagger.annotations.Api;
20
+import io.swagger.annotations.ApiImplicitParam;
21
+import io.swagger.annotations.ApiImplicitParams;
22
+import io.swagger.annotations.ApiOperation;
23
+
24
+@RestController
25
+@RequestMapping(value= {"/deviceOut"})
26
+@Api(value= "StorageDeviceOutController", description = "器材设备报废")
27
+public class StorageDeviceOutController {
28
+
29
+	@Resource
30
+	private StorageDeviceInputService deviceInputService;
31
+	
32
+    
33
+    /**
34
+     * 报废
35
+     */
36
+    @RequestMapping(value="/Out", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
37
+	@ApiOperation(value="报废", notes = "报废")
38
+    public Map<String, Object> out(String deviceListJson) {
39
+        Map<String, Object> modelMap = new HashMap<>();
40
+        // JSON字符串转对象
41
+        ObjectMapper mapper = new ObjectMapper();
42
+        StorageDeviceinput storageDeviceinput = null;
43
+        try {
44
+        	storageDeviceinput = (StorageDeviceinput)mapper.readValue(deviceListJson, StorageDeviceinput.class);
45
+        	storageDeviceinput.setStatus(1);
46
+        	deviceInputService.updateByPrimaryKeySelective(storageDeviceinput);
47
+            modelMap.put("status", "success");
48
+        } catch (IOException e) {
49
+            modelMap.put("status", "error");
50
+            e.printStackTrace();
51
+        }
52
+        return modelMap;
53
+    }
54
+    
55
+   /**
56
+     * 批量结束报废
57
+     */
58
+    @RequestMapping(value="/outMore", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
59
+   	@ApiOperation(value="批量报废", notes = "批量报废")
60
+    public Map<String, Object> endMore(String deviceListJson) {
61
+        Map<String, Object> modelMap = new HashMap<>();
62
+        // JSON字符串转对象
63
+        ObjectMapper mapper = new ObjectMapper();
64
+        try {
65
+        	JSONObject jsonObject = JSONObject.parseObject(deviceListJson);
66
+        	String idStr = jsonObject.getString("id");
67
+        	
68
+        	if(idStr != null && !"".equals(idStr)){
69
+        		String[] ids = idStr.split(",");
70
+        		for(int i=0; i<ids.length; i++){
71
+        			StorageDeviceinput storageDeviceinput = new StorageDeviceinput();
72
+        			storageDeviceinput.setStatus(0);
73
+        			storageDeviceinput.setId(Integer.parseInt(ids[i]));
74
+        			deviceInputService.updateByPrimaryKeySelective(storageDeviceinput);
75
+        		}
76
+        	}
77
+            modelMap.put("status", "success");
78
+        } catch (Exception e) {
79
+            modelMap.put("status", "error");
80
+            e.printStackTrace();
81
+        }
82
+        return modelMap;
83
+    }
84
+
85
+}

+ 266 - 0
src/main/java/com/chinaitop/depot/device/controller/StorageDeviceRepairController.java

@@ -0,0 +1,266 @@
1
+package com.chinaitop.depot.device.controller;
2
+
3
+import java.io.IOException;
4
+import java.util.ArrayList;
5
+import java.util.Date;
6
+import java.util.HashMap;
7
+import java.util.List;
8
+import java.util.Map;
9
+
10
+import javax.annotation.Resource;
11
+import javax.servlet.http.HttpServletRequest;
12
+
13
+import org.springframework.http.MediaType;
14
+import org.springframework.web.bind.annotation.RequestMapping;
15
+import org.springframework.web.bind.annotation.RequestMethod;
16
+import org.springframework.web.bind.annotation.RestController;
17
+
18
+import com.alibaba.fastjson.JSONObject;
19
+import com.chinaitop.depot.device.model.StorageDeviceinput;
20
+import com.chinaitop.depot.device.model.StorageDevicerepair;
21
+import com.chinaitop.depot.device.model.StorageDevicerepairExample;
22
+import com.chinaitop.depot.device.service.StorageDeviceInputService;
23
+import com.chinaitop.depot.device.service.StorageDeviceRepairService;
24
+import com.chinaitop.depot.utils.ParameterUtil;
25
+import com.fasterxml.jackson.databind.ObjectMapper;
26
+import com.github.pagehelper.PageHelper;
27
+import com.github.pagehelper.PageInfo;
28
+
29
+import io.swagger.annotations.Api;
30
+import io.swagger.annotations.ApiImplicitParam;
31
+import io.swagger.annotations.ApiImplicitParams;
32
+import io.swagger.annotations.ApiOperation;
33
+
34
+@RestController
35
+@RequestMapping(value= {"/deviceRepair"})
36
+@Api(value= "StorageDeviceRepairController", description = "器材设备维修")
37
+public class StorageDeviceRepairController {
38
+
39
+	@Resource
40
+	private StorageDeviceRepairService deviceRepairService;
41
+	@Resource
42
+	private StorageDeviceInputService deviceInputService;
43
+	/*@Resource
44
+	private OrgInfoService orgInfoService;*/
45
+	
46
+	 /**
47
+     * 分页获取器材信息
48
+	 * @throws Exception 
49
+     */
50
+    @RequestMapping(value = "/getDeviceList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
51
+    @ApiOperation(value="查询维修设备信息", notes = "查询维修设备列表,支持分页")
52
+  	@ApiImplicitParams({
53
+  			@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
54
+  			@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
55
+  	})
56
+    public PageInfo<StorageDevicerepair> listCheckPage(HttpServletRequest request,Integer pageNum, Integer pageSize ,Integer repairStatus) throws Exception{
57
+
58
+         
59
+    	StorageDevicerepairExample storageDevicerepairExample=new StorageDevicerepairExample();
60
+    	StorageDevicerepairExample.Criteria criteria=storageDevicerepairExample.createCriteria();
61
+    	
62
+    	if(ParameterUtil.isnotnull(repairStatus)){
63
+        	criteria.andRepairStatusEqualTo(repairStatus);
64
+        }
65
+
66
+        //按照id进行降序
67
+        storageDevicerepairExample.setOrderByClause("FIELD(repair_status,1,2,0),repair_end desc,id desc");
68
+   
69
+        if (pageNum!=null && pageSize!=null) {
70
+            PageHelper.startPage(pageNum, pageSize);
71
+        }
72
+        List<StorageDevicerepair> list = deviceRepairService.queryByDevice(storageDevicerepairExample);
73
+        PageInfo<StorageDevicerepair> pageInfo = new PageInfo<StorageDevicerepair>(list);
74
+        return pageInfo;
75
+    }
76
+
77
+	
78
+
79
+	 /**
80
+     * 新增维修
81
+     */
82
+    @RequestMapping(value="/save",produces = MediaType.APPLICATION_JSON_VALUE,  method=RequestMethod.POST)
83
+	@ApiOperation(value="保存数据", notes = "保存增加或修改的数据")
84
+    public Map<String, Object> save(String deviceRepairJson) {
85
+        Map<String, Object> modelMap = new HashMap<>();
86
+        // JSON字符串转对象
87
+        ObjectMapper mapper = new ObjectMapper();
88
+        StorageDevicerepair storageDevicerepair = null;
89
+        try {
90
+        	storageDevicerepair = (StorageDevicerepair)mapper.readValue(deviceRepairJson, StorageDevicerepair.class);
91
+        	storageDevicerepair.setRepairStatus(1);//改变维修表中的状态
92
+        	deviceRepairService.save(storageDevicerepair);
93
+        	//入库表中的状态改变  数量改变
94
+        	modelMap.put("number", storageDevicerepair.getNumber());
95
+        	modelMap.put("model", storageDevicerepair.getModel());
96
+        	List<StorageDeviceinput> inputList=deviceInputService.getUseCount(modelMap);//查询入库表的该信息
97
+        	inputList.get(0).setStatus(3);//维修状态
98
+        	inputList.get(0).setBrokenCount(inputList.get(0).getBrokenCount()-1);//故障数量减少
99
+        	deviceInputService.updateByPrimaryKeySelective(inputList.get(0));
100
+            modelMap.put("status", "success");
101
+        } catch (IOException e) {
102
+            modelMap.put("status", "error");
103
+            e.printStackTrace();
104
+        }
105
+        return modelMap;
106
+    }
107
+
108
+    
109
+     /**
110
+     * 查询仓房对应的设备名称
111
+     * @param id
112
+     * @return
113
+     */
114
+    @RequestMapping(value ="/getDeviceName",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
115
+	@ApiOperation(value="查询数据", notes = "根据depotId查询数据")
116
+	@ApiImplicitParams({
117
+		 @ApiImplicitParam(name = "depotId", value = "depotId", paramType = "query"),
118
+	})
119
+    public List<StorageDeviceinput> getHouseList(Integer depotId){
120
+    	List<StorageDeviceinput> storageDeviceinput=null;
121
+    	if(depotId!=0){
122
+    		storageDeviceinput=deviceInputService.getDeviceInputList(depotId);
123
+    	}
124
+        return storageDeviceinput;
125
+    }
126
+    
127
+    /**
128
+     * 查询维修的设备名称
129
+     */
130
+    @RequestMapping(value ="/getDeviceNameList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
131
+	@ApiOperation(value="查询数据", notes = "查询数据")
132
+    public List<StorageDeviceinput> getDeviceNameList(){
133
+    	return deviceInputService.getRepairNameList();
134
+    }
135
+    
136
+    /**
137
+     * 查询设备名称对应的型号
138
+     * @param id
139
+     * @return
140
+     */
141
+    @RequestMapping(value ="/getDeviceModel",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
142
+	@ApiOperation(value="查询数据根据名称", notes = "查询数据根据名称")
143
+    @ApiImplicitParams({
144
+		 @ApiImplicitParam(name = "deviceName", value = "deviceName", paramType = "query"),
145
+	})
146
+    public List<StorageDeviceinput> getModelList(String deviceName){
147
+    	List<StorageDeviceinput> storageDeviceinput=deviceInputService.getDeviceModelRepair(deviceName);
148
+    	return storageDeviceinput;
149
+    }
150
+    
151
+    /**
152
+     * 查询设备名称对应的型号
153
+     * @param id
154
+     * @return
155
+     */
156
+    @RequestMapping(value ="/getDeviceNumber",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
157
+	@ApiOperation(value="查询设备名称对应的型号", notes = "查询设备名称对应的型号")
158
+    @ApiImplicitParams({
159
+		 @ApiImplicitParam(name = "deviceModel", value = "deviceModel", paramType = "query")
160
+	})
161
+    public List<StorageDeviceinput> getDeviceNumber(String deviceModel){
162
+    	List<StorageDeviceinput> storageDeviceinput=deviceInputService.getNumberList(deviceModel);
163
+    	return storageDeviceinput;
164
+    }
165
+    
166
+    /**
167
+     * 查询型号对应的数量
168
+     * @param id
169
+     * @return
170
+     */
171
+    @RequestMapping(value ="/getDeviceCount",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
172
+   	@ApiOperation(value="查询数量", notes = "查询设备名称对应的型号")
173
+    @ApiImplicitParams({
174
+   	    @ApiImplicitParam(name = "deviceModel", value = "deviceModel", paramType = "query")
175
+   	})
176
+    public List<StorageDeviceinput> getDeviceCount(String number,String model){
177
+    	
178
+    	List<StorageDeviceinput> storageDeviceinput=deviceInputService.getCountList(number);
179
+    	return storageDeviceinput;
180
+    }
181
+    
182
+    /**
183
+     * 结束维修
184
+     */
185
+    @RequestMapping(value ="/end",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
186
+   	@ApiOperation(value="结束维修", notes = "结束维修")
187
+    public Map<String, Object> end(String deviceListJson) {
188
+        Map<String, Object> modelMap = new HashMap<>();
189
+        // JSON字符串转对象
190
+        ObjectMapper mapper = new ObjectMapper();
191
+        StorageDevicerepair storageDevicerepair = null;
192
+        try {
193
+        	storageDevicerepair = (StorageDevicerepair)mapper.readValue(deviceListJson, StorageDevicerepair.class);
194
+        	//改变维修表中的信息
195
+        	storageDevicerepair.setRepairEnd(new Date());
196
+        	storageDevicerepair.setRepairStatus(0);
197
+        	deviceRepairService.updateByPrimaryKeySelective(storageDevicerepair);
198
+        	//根据id获取编号和型号
199
+        	storageDevicerepair=deviceRepairService.loadDataById(storageDevicerepair.getId());
200
+        	//入库表中的数量增加 状态发生改变
201
+        	modelMap.put("number", storageDevicerepair.getNumber());
202
+        	modelMap.put("model", storageDevicerepair.getModel());
203
+
204
+        	List<StorageDeviceinput> inputList=deviceInputService.getUseCount(modelMap);
205
+        	inputList.get(0).setStatus(0);//正常状态
206
+        	inputList.get(0).setUseCount(inputList.get(0).getUseCount()+1);//可用数量增加
207
+        	deviceInputService.updateByPrimaryKeySelective(inputList.get(0));
208
+            modelMap.put("status", "success");
209
+        } catch (IOException e) {
210
+            modelMap.put("status", "error");
211
+            e.printStackTrace();
212
+        }
213
+        return modelMap;
214
+    }
215
+    
216
+    /**
217
+     * 批量结束维修
218
+     */
219
+    @RequestMapping(value ="/endMore",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
220
+   	@ApiOperation(value="批量结束维修", notes = "批量结束维修")
221
+    public Map<String, Object> endMore(String deviceListJson) {
222
+        Map<String, Object> modelMap = new HashMap<>();
223
+        // JSON字符串转对象
224
+        ObjectMapper mapper = new ObjectMapper();
225
+        try {
226
+        	JSONObject jsonObject = JSONObject.parseObject(deviceListJson);
227
+        	String idStr = jsonObject.getString("id");
228
+        	
229
+        	if(idStr != null && !"".equals(idStr)){
230
+        		String[] ids = idStr.split(",");
231
+        		for(int i=0; i<ids.length; i++){
232
+        			StorageDevicerepair storageDevicerepair = new StorageDevicerepair();
233
+        			storageDevicerepair.setRepairEnd(new Date());
234
+        			storageDevicerepair.setRepairStatus(0);
235
+        			storageDevicerepair.setId(Integer.parseInt(ids[i]));
236
+                	deviceRepairService.updateByPrimaryKeySelective(storageDevicerepair);
237
+        		}
238
+        	}
239
+            modelMap.put("status", "success");
240
+        } catch (Exception e) {
241
+            modelMap.put("status", "error");
242
+            e.printStackTrace();
243
+        }
244
+        return modelMap;
245
+    }
246
+
247
+    
248
+     /**
249
+     * 根据id加载对应数据
250
+     * @param id
251
+     * @return
252
+     * @throws Exception 
253
+     */
254
+    @RequestMapping(value ="/loadDataById",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
255
+   	@ApiOperation(value="根据id加载数据", notes = "根据id加载数据")
256
+    @ApiImplicitParams({
257
+   	    @ApiImplicitParam(name = "id", value = "id", paramType = "query")
258
+   	})
259
+    public List<StorageDevicerepair> loadDataById(int id) throws Exception{
260
+    	StorageDevicerepair storageDevicerepair=deviceRepairService.loadDataById(id);
261
+    	List<StorageDevicerepair> repairMassageList=new ArrayList<StorageDevicerepair>();
262
+    	repairMassageList.add(storageDevicerepair);
263
+        return repairMassageList;
264
+    }
265
+
266
+}

+ 30 - 0
src/main/java/com/chinaitop/depot/device/mapper/BasicEquipmentEquipmentPoolMapper.java

@@ -0,0 +1,30 @@
1
+package com.chinaitop.depot.device.mapper;
2
+
3
+import com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool;
4
+import com.chinaitop.depot.device.model.BasicEquipmentEquipmentPoolExample;
5
+import java.util.List;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+public interface BasicEquipmentEquipmentPoolMapper {
9
+    int countByExample(BasicEquipmentEquipmentPoolExample example);
10
+
11
+    int deleteByExample(BasicEquipmentEquipmentPoolExample example);
12
+
13
+    int deleteByPrimaryKey(Integer id);
14
+
15
+    int insert(BasicEquipmentEquipmentPool record);
16
+
17
+    int insertSelective(BasicEquipmentEquipmentPool record);
18
+
19
+    List<BasicEquipmentEquipmentPool> selectByExample(BasicEquipmentEquipmentPoolExample example);
20
+
21
+    BasicEquipmentEquipmentPool selectByPrimaryKey(Integer id);
22
+
23
+    int updateByExampleSelective(@Param("record") BasicEquipmentEquipmentPool record, @Param("example") BasicEquipmentEquipmentPoolExample example);
24
+
25
+    int updateByExample(@Param("record") BasicEquipmentEquipmentPool record, @Param("example") BasicEquipmentEquipmentPoolExample example);
26
+
27
+    int updateByPrimaryKeySelective(BasicEquipmentEquipmentPool record);
28
+
29
+    int updateByPrimaryKey(BasicEquipmentEquipmentPool record);
30
+}

+ 258 - 0
src/main/java/com/chinaitop/depot/device/mapper/BasicEquipmentEquipmentPoolMapper.xml

@@ -0,0 +1,258 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.device.mapper.BasicEquipmentEquipmentPoolMapper">
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool">
5
+    <id column="id" jdbcType="INTEGER" property="id" />
6
+    <result column="org_id" jdbcType="INTEGER" property="orgId" />
7
+    <result column="put_position" jdbcType="VARCHAR" property="putPosition" />
8
+    <result column="shelf_id" jdbcType="VARCHAR" property="shelfId" />
9
+    <result column="warehouse_id" jdbcType="VARCHAR" property="warehouseId" />
10
+    <result column="remark" jdbcType="VARCHAR" property="remark" />
11
+    <result column="input_person_id" jdbcType="INTEGER" property="inputPersonId" />
12
+    <result column="input_date" jdbcType="TIMESTAMP" property="inputDate" />
13
+  </resultMap>
14
+  <sql id="Example_Where_Clause">
15
+    <where>
16
+      <foreach collection="oredCriteria" item="criteria" separator="or">
17
+        <if test="criteria.valid">
18
+          <trim prefix="(" prefixOverrides="and" suffix=")">
19
+            <foreach collection="criteria.criteria" item="criterion">
20
+              <choose>
21
+                <when test="criterion.noValue">
22
+                  and ${criterion.condition}
23
+                </when>
24
+                <when test="criterion.singleValue">
25
+                  and ${criterion.condition} #{criterion.value}
26
+                </when>
27
+                <when test="criterion.betweenValue">
28
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
29
+                </when>
30
+                <when test="criterion.listValue">
31
+                  and ${criterion.condition}
32
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
33
+                    #{listItem}
34
+                  </foreach>
35
+                </when>
36
+              </choose>
37
+            </foreach>
38
+          </trim>
39
+        </if>
40
+      </foreach>
41
+    </where>
42
+  </sql>
43
+  <sql id="Update_By_Example_Where_Clause">
44
+    <where>
45
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
46
+        <if test="criteria.valid">
47
+          <trim prefix="(" prefixOverrides="and" suffix=")">
48
+            <foreach collection="criteria.criteria" item="criterion">
49
+              <choose>
50
+                <when test="criterion.noValue">
51
+                  and ${criterion.condition}
52
+                </when>
53
+                <when test="criterion.singleValue">
54
+                  and ${criterion.condition} #{criterion.value}
55
+                </when>
56
+                <when test="criterion.betweenValue">
57
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
58
+                </when>
59
+                <when test="criterion.listValue">
60
+                  and ${criterion.condition}
61
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
62
+                    #{listItem}
63
+                  </foreach>
64
+                </when>
65
+              </choose>
66
+            </foreach>
67
+          </trim>
68
+        </if>
69
+      </foreach>
70
+    </where>
71
+  </sql>
72
+  <sql id="Base_Column_List">
73
+    id, org_id, put_position, shelf_id, warehouse_id, remark, input_person_id, input_date
74
+  </sql>
75
+  <select id="selectByExample" parameterType="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPoolExample" resultMap="BaseResultMap">
76
+    select
77
+    <if test="distinct">
78
+      distinct
79
+    </if>
80
+    <include refid="Base_Column_List" />
81
+    from basic_equipment_equipment_pool
82
+    <if test="_parameter != null">
83
+      <include refid="Example_Where_Clause" />
84
+    </if>
85
+    <if test="orderByClause != null">
86
+      order by ${orderByClause}
87
+    </if>
88
+  </select>
89
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
90
+    select 
91
+    <include refid="Base_Column_List" />
92
+    from basic_equipment_equipment_pool
93
+    where id = #{id,jdbcType=INTEGER}
94
+  </select>
95
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
96
+    delete from basic_equipment_equipment_pool
97
+    where id = #{id,jdbcType=INTEGER}
98
+  </delete>
99
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPoolExample">
100
+    delete from basic_equipment_equipment_pool
101
+    <if test="_parameter != null">
102
+      <include refid="Example_Where_Clause" />
103
+    </if>
104
+  </delete>
105
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool">
106
+    insert into basic_equipment_equipment_pool (id, org_id, put_position, 
107
+      shelf_id, warehouse_id, remark, 
108
+      input_person_id, input_date)
109
+    values (#{id,jdbcType=INTEGER}, #{orgId,jdbcType=INTEGER}, #{putPosition,jdbcType=VARCHAR}, 
110
+      #{shelfId,jdbcType=VARCHAR}, #{warehouseId,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, 
111
+      #{inputPersonId,jdbcType=INTEGER}, #{inputDate,jdbcType=TIMESTAMP})
112
+  </insert>
113
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool">
114
+    insert into basic_equipment_equipment_pool
115
+    <trim prefix="(" suffix=")" suffixOverrides=",">
116
+      <if test="id != null">
117
+        id,
118
+      </if>
119
+      <if test="orgId != null">
120
+        org_id,
121
+      </if>
122
+      <if test="putPosition != null">
123
+        put_position,
124
+      </if>
125
+      <if test="shelfId != null">
126
+        shelf_id,
127
+      </if>
128
+      <if test="warehouseId != null">
129
+        warehouse_id,
130
+      </if>
131
+      <if test="remark != null">
132
+        remark,
133
+      </if>
134
+      <if test="inputPersonId != null">
135
+        input_person_id,
136
+      </if>
137
+      <if test="inputDate != null">
138
+        input_date,
139
+      </if>
140
+    </trim>
141
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
142
+      <if test="id != null">
143
+        #{id,jdbcType=INTEGER},
144
+      </if>
145
+      <if test="orgId != null">
146
+        #{orgId,jdbcType=INTEGER},
147
+      </if>
148
+      <if test="putPosition != null">
149
+        #{putPosition,jdbcType=VARCHAR},
150
+      </if>
151
+      <if test="shelfId != null">
152
+        #{shelfId,jdbcType=VARCHAR},
153
+      </if>
154
+      <if test="warehouseId != null">
155
+        #{warehouseId,jdbcType=VARCHAR},
156
+      </if>
157
+      <if test="remark != null">
158
+        #{remark,jdbcType=VARCHAR},
159
+      </if>
160
+      <if test="inputPersonId != null">
161
+        #{inputPersonId,jdbcType=INTEGER},
162
+      </if>
163
+      <if test="inputDate != null">
164
+        #{inputDate,jdbcType=TIMESTAMP},
165
+      </if>
166
+    </trim>
167
+  </insert>
168
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPoolExample" resultType="java.lang.Integer">
169
+    select count(*) from basic_equipment_equipment_pool
170
+    <if test="_parameter != null">
171
+      <include refid="Example_Where_Clause" />
172
+    </if>
173
+  </select>
174
+  <update id="updateByExampleSelective" parameterType="map">
175
+    update basic_equipment_equipment_pool
176
+    <set>
177
+      <if test="record.id != null">
178
+        id = #{record.id,jdbcType=INTEGER},
179
+      </if>
180
+      <if test="record.orgId != null">
181
+        org_id = #{record.orgId,jdbcType=INTEGER},
182
+      </if>
183
+      <if test="record.putPosition != null">
184
+        put_position = #{record.putPosition,jdbcType=VARCHAR},
185
+      </if>
186
+      <if test="record.shelfId != null">
187
+        shelf_id = #{record.shelfId,jdbcType=VARCHAR},
188
+      </if>
189
+      <if test="record.warehouseId != null">
190
+        warehouse_id = #{record.warehouseId,jdbcType=VARCHAR},
191
+      </if>
192
+      <if test="record.remark != null">
193
+        remark = #{record.remark,jdbcType=VARCHAR},
194
+      </if>
195
+      <if test="record.inputPersonId != null">
196
+        input_person_id = #{record.inputPersonId,jdbcType=INTEGER},
197
+      </if>
198
+      <if test="record.inputDate != null">
199
+        input_date = #{record.inputDate,jdbcType=TIMESTAMP},
200
+      </if>
201
+    </set>
202
+    <if test="_parameter != null">
203
+      <include refid="Update_By_Example_Where_Clause" />
204
+    </if>
205
+  </update>
206
+  <update id="updateByExample" parameterType="map">
207
+    update basic_equipment_equipment_pool
208
+    set id = #{record.id,jdbcType=INTEGER},
209
+      org_id = #{record.orgId,jdbcType=INTEGER},
210
+      put_position = #{record.putPosition,jdbcType=VARCHAR},
211
+      shelf_id = #{record.shelfId,jdbcType=VARCHAR},
212
+      warehouse_id = #{record.warehouseId,jdbcType=VARCHAR},
213
+      remark = #{record.remark,jdbcType=VARCHAR},
214
+      input_person_id = #{record.inputPersonId,jdbcType=INTEGER},
215
+      input_date = #{record.inputDate,jdbcType=TIMESTAMP}
216
+    <if test="_parameter != null">
217
+      <include refid="Update_By_Example_Where_Clause" />
218
+    </if>
219
+  </update>
220
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool">
221
+    update basic_equipment_equipment_pool
222
+    <set>
223
+      <if test="orgId != null">
224
+        org_id = #{orgId,jdbcType=INTEGER},
225
+      </if>
226
+      <if test="putPosition != null">
227
+        put_position = #{putPosition,jdbcType=VARCHAR},
228
+      </if>
229
+      <if test="shelfId != null">
230
+        shelf_id = #{shelfId,jdbcType=VARCHAR},
231
+      </if>
232
+      <if test="warehouseId != null">
233
+        warehouse_id = #{warehouseId,jdbcType=VARCHAR},
234
+      </if>
235
+      <if test="remark != null">
236
+        remark = #{remark,jdbcType=VARCHAR},
237
+      </if>
238
+      <if test="inputPersonId != null">
239
+        input_person_id = #{inputPersonId,jdbcType=INTEGER},
240
+      </if>
241
+      <if test="inputDate != null">
242
+        input_date = #{inputDate,jdbcType=TIMESTAMP},
243
+      </if>
244
+    </set>
245
+    where id = #{id,jdbcType=INTEGER}
246
+  </update>
247
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool">
248
+    update basic_equipment_equipment_pool
249
+    set org_id = #{orgId,jdbcType=INTEGER},
250
+      put_position = #{putPosition,jdbcType=VARCHAR},
251
+      shelf_id = #{shelfId,jdbcType=VARCHAR},
252
+      warehouse_id = #{warehouseId,jdbcType=VARCHAR},
253
+      remark = #{remark,jdbcType=VARCHAR},
254
+      input_person_id = #{inputPersonId,jdbcType=INTEGER},
255
+      input_date = #{inputDate,jdbcType=TIMESTAMP}
256
+    where id = #{id,jdbcType=INTEGER}
257
+  </update>
258
+</mapper>

+ 32 - 0
src/main/java/com/chinaitop/depot/device/mapper/StorageDevicebackMapper.java

@@ -0,0 +1,32 @@
1
+package com.chinaitop.depot.device.mapper;
2
+
3
+import com.chinaitop.depot.device.model.StorageDeviceback;
4
+import com.chinaitop.depot.device.model.StorageDevicebackExample;
5
+import java.util.List;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+public interface StorageDevicebackMapper {
9
+    int countByExample(StorageDevicebackExample example);
10
+
11
+    int deleteByExample(StorageDevicebackExample example);
12
+
13
+    int deleteByPrimaryKey(Integer id);
14
+
15
+    int insert(StorageDeviceback record);
16
+
17
+    int insertSelective(StorageDeviceback record);
18
+
19
+    List<StorageDeviceback> selectByExample(StorageDevicebackExample example);
20
+
21
+    StorageDeviceback selectByPrimaryKey(Integer id);
22
+
23
+    int updateByExampleSelective(@Param("record") StorageDeviceback record, @Param("example") StorageDevicebackExample example);
24
+
25
+    int updateByExample(@Param("record") StorageDeviceback record, @Param("example") StorageDevicebackExample example);
26
+
27
+    int updateByPrimaryKeySelective(StorageDeviceback record);
28
+
29
+    int updateByPrimaryKey(StorageDeviceback record);
30
+
31
+	List<StorageDeviceback> selectBygetId(Integer id);
32
+}

+ 281 - 0
src/main/java/com/chinaitop/depot/device/mapper/StorageDevicebackMapper.xml

@@ -0,0 +1,281 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.device.mapper.StorageDevicebackMapper">
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.StorageDeviceback">
5
+    <id column="id" jdbcType="INTEGER" property="id" />
6
+    <result column="get_id" jdbcType="INTEGER" property="getId" />
7
+    <result column="back_keeper" jdbcType="VARCHAR" property="backKeeper" />
8
+    <result column="back_handler" jdbcType="VARCHAR" property="backHandler" />
9
+    <result column="collator" jdbcType="VARCHAR" property="collator" />
10
+    <result column="back_time" jdbcType="DATE" property="backTime" />
11
+    <result column="broken_count" jdbcType="INTEGER" property="brokenCount" />
12
+    <result column="number" jdbcType="INTEGER" property="number" />
13
+    <result column="back_count" jdbcType="INTEGER" property="backCount" />
14
+  </resultMap>
15
+  <sql id="Example_Where_Clause">
16
+    <where>
17
+      <foreach collection="oredCriteria" item="criteria" separator="or">
18
+        <if test="criteria.valid">
19
+          <trim prefix="(" prefixOverrides="and" suffix=")">
20
+            <foreach collection="criteria.criteria" item="criterion">
21
+              <choose>
22
+                <when test="criterion.noValue">
23
+                  and ${criterion.condition}
24
+                </when>
25
+                <when test="criterion.singleValue">
26
+                  and ${criterion.condition} #{criterion.value}
27
+                </when>
28
+                <when test="criterion.betweenValue">
29
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
30
+                </when>
31
+                <when test="criterion.listValue">
32
+                  and ${criterion.condition}
33
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
34
+                    #{listItem}
35
+                  </foreach>
36
+                </when>
37
+              </choose>
38
+            </foreach>
39
+          </trim>
40
+        </if>
41
+      </foreach>
42
+    </where>
43
+  </sql>
44
+  <sql id="Update_By_Example_Where_Clause">
45
+    <where>
46
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
47
+        <if test="criteria.valid">
48
+          <trim prefix="(" prefixOverrides="and" suffix=")">
49
+            <foreach collection="criteria.criteria" item="criterion">
50
+              <choose>
51
+                <when test="criterion.noValue">
52
+                  and ${criterion.condition}
53
+                </when>
54
+                <when test="criterion.singleValue">
55
+                  and ${criterion.condition} #{criterion.value}
56
+                </when>
57
+                <when test="criterion.betweenValue">
58
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
59
+                </when>
60
+                <when test="criterion.listValue">
61
+                  and ${criterion.condition}
62
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
63
+                    #{listItem}
64
+                  </foreach>
65
+                </when>
66
+              </choose>
67
+            </foreach>
68
+          </trim>
69
+        </if>
70
+      </foreach>
71
+    </where>
72
+  </sql>
73
+  <sql id="Base_Column_List">
74
+    id, get_id, back_keeper, back_handler, collator, back_time, broken_count, number, 
75
+    back_count
76
+  </sql>
77
+  <select id="selectByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicebackExample" resultMap="BaseResultMap">
78
+    select
79
+    <if test="distinct">
80
+      distinct
81
+    </if>
82
+    <include refid="Base_Column_List" />
83
+    from storage_deviceback
84
+    <if test="_parameter != null">
85
+      <include refid="Example_Where_Clause" />
86
+    </if>
87
+    <if test="orderByClause != null">
88
+      order by ${orderByClause}
89
+    </if>
90
+  </select>
91
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
92
+    select 
93
+    <include refid="Base_Column_List" />
94
+    from storage_deviceback
95
+    where id = #{id,jdbcType=INTEGER}
96
+  </select>
97
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
98
+    delete from storage_deviceback
99
+    where id = #{id,jdbcType=INTEGER}
100
+  </delete>
101
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicebackExample">
102
+    delete from storage_deviceback
103
+    <if test="_parameter != null">
104
+      <include refid="Example_Where_Clause" />
105
+    </if>
106
+  </delete>
107
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.StorageDeviceback">
108
+    insert into storage_deviceback (id, get_id, back_keeper, 
109
+      back_handler, collator, back_time, 
110
+      broken_count, number, back_count
111
+      )
112
+    values (#{id,jdbcType=INTEGER}, #{getId,jdbcType=INTEGER}, #{backKeeper,jdbcType=VARCHAR}, 
113
+      #{backHandler,jdbcType=VARCHAR}, #{collator,jdbcType=VARCHAR}, #{backTime,jdbcType=DATE}, 
114
+      #{brokenCount,jdbcType=INTEGER}, #{number,jdbcType=INTEGER}, #{backCount,jdbcType=INTEGER}
115
+      )
116
+  </insert>
117
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.StorageDeviceback">
118
+    insert into storage_deviceback
119
+    <trim prefix="(" suffix=")" suffixOverrides=",">
120
+      <if test="id != null">
121
+        id,
122
+      </if>
123
+      <if test="getId != null">
124
+        get_id,
125
+      </if>
126
+      <if test="backKeeper != null">
127
+        back_keeper,
128
+      </if>
129
+      <if test="backHandler != null">
130
+        back_handler,
131
+      </if>
132
+      <if test="collator != null">
133
+        collator,
134
+      </if>
135
+      <if test="backTime != null">
136
+        back_time,
137
+      </if>
138
+      <if test="brokenCount != null">
139
+        broken_count,
140
+      </if>
141
+      <if test="number != null">
142
+        number,
143
+      </if>
144
+      <if test="backCount != null">
145
+        back_count,
146
+      </if>
147
+    </trim>
148
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
149
+      <if test="id != null">
150
+        #{id,jdbcType=INTEGER},
151
+      </if>
152
+      <if test="getId != null">
153
+        #{getId,jdbcType=INTEGER},
154
+      </if>
155
+      <if test="backKeeper != null">
156
+        #{backKeeper,jdbcType=VARCHAR},
157
+      </if>
158
+      <if test="backHandler != null">
159
+        #{backHandler,jdbcType=VARCHAR},
160
+      </if>
161
+      <if test="collator != null">
162
+        #{collator,jdbcType=VARCHAR},
163
+      </if>
164
+      <if test="backTime != null">
165
+        #{backTime,jdbcType=DATE},
166
+      </if>
167
+      <if test="brokenCount != null">
168
+        #{brokenCount,jdbcType=INTEGER},
169
+      </if>
170
+      <if test="number != null">
171
+        #{number,jdbcType=INTEGER},
172
+      </if>
173
+      <if test="backCount != null">
174
+        #{backCount,jdbcType=INTEGER},
175
+      </if>
176
+    </trim>
177
+  </insert>
178
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicebackExample" resultType="java.lang.Integer">
179
+    select count(*) from storage_deviceback
180
+    <if test="_parameter != null">
181
+      <include refid="Example_Where_Clause" />
182
+    </if>
183
+  </select>
184
+  <update id="updateByExampleSelective" parameterType="map">
185
+    update storage_deviceback
186
+    <set>
187
+      <if test="record.id != null">
188
+        id = #{record.id,jdbcType=INTEGER},
189
+      </if>
190
+      <if test="record.getId != null">
191
+        get_id = #{record.getId,jdbcType=INTEGER},
192
+      </if>
193
+      <if test="record.backKeeper != null">
194
+        back_keeper = #{record.backKeeper,jdbcType=VARCHAR},
195
+      </if>
196
+      <if test="record.backHandler != null">
197
+        back_handler = #{record.backHandler,jdbcType=VARCHAR},
198
+      </if>
199
+      <if test="record.collator != null">
200
+        collator = #{record.collator,jdbcType=VARCHAR},
201
+      </if>
202
+      <if test="record.backTime != null">
203
+        back_time = #{record.backTime,jdbcType=DATE},
204
+      </if>
205
+      <if test="record.brokenCount != null">
206
+        broken_count = #{record.brokenCount,jdbcType=INTEGER},
207
+      </if>
208
+      <if test="record.number != null">
209
+        number = #{record.number,jdbcType=INTEGER},
210
+      </if>
211
+      <if test="record.backCount != null">
212
+        back_count = #{record.backCount,jdbcType=INTEGER},
213
+      </if>
214
+    </set>
215
+    <if test="_parameter != null">
216
+      <include refid="Update_By_Example_Where_Clause" />
217
+    </if>
218
+  </update>
219
+  <update id="updateByExample" parameterType="map">
220
+    update storage_deviceback
221
+    set id = #{record.id,jdbcType=INTEGER},
222
+      get_id = #{record.getId,jdbcType=INTEGER},
223
+      back_keeper = #{record.backKeeper,jdbcType=VARCHAR},
224
+      back_handler = #{record.backHandler,jdbcType=VARCHAR},
225
+      collator = #{record.collator,jdbcType=VARCHAR},
226
+      back_time = #{record.backTime,jdbcType=DATE},
227
+      broken_count = #{record.brokenCount,jdbcType=INTEGER},
228
+      number = #{record.number,jdbcType=INTEGER},
229
+      back_count = #{record.backCount,jdbcType=INTEGER}
230
+    <if test="_parameter != null">
231
+      <include refid="Update_By_Example_Where_Clause" />
232
+    </if>
233
+  </update>
234
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.StorageDeviceback">
235
+    update storage_deviceback
236
+    <set>
237
+      <if test="getId != null">
238
+        get_id = #{getId,jdbcType=INTEGER},
239
+      </if>
240
+      <if test="backKeeper != null">
241
+        back_keeper = #{backKeeper,jdbcType=VARCHAR},
242
+      </if>
243
+      <if test="backHandler != null">
244
+        back_handler = #{backHandler,jdbcType=VARCHAR},
245
+      </if>
246
+      <if test="collator != null">
247
+        collator = #{collator,jdbcType=VARCHAR},
248
+      </if>
249
+      <if test="backTime != null">
250
+        back_time = #{backTime,jdbcType=DATE},
251
+      </if>
252
+      <if test="brokenCount != null">
253
+        broken_count = #{brokenCount,jdbcType=INTEGER},
254
+      </if>
255
+      <if test="number != null">
256
+        number = #{number,jdbcType=INTEGER},
257
+      </if>
258
+      <if test="backCount != null">
259
+        back_count = #{backCount,jdbcType=INTEGER},
260
+      </if>
261
+    </set>
262
+    where id = #{id,jdbcType=INTEGER}
263
+  </update>
264
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.StorageDeviceback">
265
+    update storage_deviceback
266
+    set get_id = #{getId,jdbcType=INTEGER},
267
+      back_keeper = #{backKeeper,jdbcType=VARCHAR},
268
+      back_handler = #{backHandler,jdbcType=VARCHAR},
269
+      collator = #{collator,jdbcType=VARCHAR},
270
+      back_time = #{backTime,jdbcType=DATE},
271
+      broken_count = #{brokenCount,jdbcType=INTEGER},
272
+      number = #{number,jdbcType=INTEGER},
273
+      back_count = #{backCount,jdbcType=INTEGER}
274
+    where id = #{id,jdbcType=INTEGER}
275
+  </update>
276
+  
277
+  <select id="selectBygetId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
278
+  	select * from storage_deviceback where get_id=#{id};
279
+  </select>
280
+  
281
+</mapper>

+ 38 - 0
src/main/java/com/chinaitop/depot/device/mapper/StorageDevicecheckMapper.java

@@ -0,0 +1,38 @@
1
+package com.chinaitop.depot.device.mapper;
2
+
3
+import com.chinaitop.depot.device.model.StorageDevicecheck;
4
+import com.chinaitop.depot.device.model.StorageDevicecheckExample;
5
+import java.util.List;
6
+import java.util.Map;
7
+
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+public interface StorageDevicecheckMapper {
11
+    int countByExample(StorageDevicecheckExample example);
12
+
13
+    int deleteByExample(StorageDevicecheckExample example);
14
+
15
+    int deleteByPrimaryKey(Integer id);
16
+
17
+    int insert(StorageDevicecheck record);
18
+
19
+    int insertSelective(StorageDevicecheck record);
20
+
21
+    List<StorageDevicecheck> selectByExample(StorageDevicecheckExample example);
22
+
23
+    StorageDevicecheck selectByPrimaryKey(Integer id);
24
+
25
+    int updateByExampleSelective(@Param("record") StorageDevicecheck record, @Param("example") StorageDevicecheckExample example);
26
+
27
+    int updateByExample(@Param("record") StorageDevicecheck record, @Param("example") StorageDevicecheckExample example);
28
+
29
+    int updateByPrimaryKeySelective(StorageDevicecheck record);
30
+
31
+    int updateByPrimaryKey(StorageDevicecheck record);
32
+    
33
+    List<Map<String,Object>> getCountForDate(Map<String,Object> map);
34
+
35
+    void insertBySql(Map<String,Object> map);
36
+
37
+	List<StorageDevicecheck> selectBySql(StorageDevicecheckExample storageDevicecheckExample);
38
+}

+ 370 - 0
src/main/java/com/chinaitop/depot/device/mapper/StorageDevicecheckMapper.xml

@@ -0,0 +1,370 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.device.mapper.StorageDevicecheckMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.StorageDevicecheck" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="check_number" property="checkNumber" jdbcType="VARCHAR" />
7
+    <result column="check_date" property="checkDate" jdbcType="TIMESTAMP" />
8
+    <result column="depot_id" property="depotId" jdbcType="INTEGER" />
9
+    <result column="check_person" property="checkPerson" jdbcType="VARCHAR" />
10
+    <result column="device_type" property="deviceType" jdbcType="VARCHAR" />
11
+    <result column="device_name" property="deviceName" jdbcType="VARCHAR" />
12
+    <result column="model" property="model" jdbcType="VARCHAR" />
13
+    <result column="store_count" property="storeCount" jdbcType="INTEGER" />
14
+    <result column="really_count" property="reallyCount" jdbcType="INTEGER" />
15
+    <result column="check_result" property="checkResult" jdbcType="VARCHAR" />
16
+    <result column="reason" property="reason" jdbcType="VARCHAR" />
17
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
18
+  </resultMap>
19
+  <sql id="Example_Where_Clause" >
20
+    <where >
21
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
22
+        <if test="criteria.valid" >
23
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
24
+            <foreach collection="criteria.criteria" item="criterion" >
25
+              <choose >
26
+                <when test="criterion.noValue" >
27
+                  and ${criterion.condition}
28
+                </when>
29
+                <when test="criterion.singleValue" >
30
+                  and ${criterion.condition} #{criterion.value}
31
+                </when>
32
+                <when test="criterion.betweenValue" >
33
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
34
+                </when>
35
+                <when test="criterion.listValue" >
36
+                  and ${criterion.condition}
37
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
38
+                    #{listItem}
39
+                  </foreach>
40
+                </when>
41
+              </choose>
42
+            </foreach>
43
+          </trim>
44
+        </if>
45
+      </foreach>
46
+    </where>
47
+  </sql>
48
+  <sql id="Update_By_Example_Where_Clause" >
49
+    <where >
50
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
51
+        <if test="criteria.valid" >
52
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
53
+            <foreach collection="criteria.criteria" item="criterion" >
54
+              <choose >
55
+                <when test="criterion.noValue" >
56
+                  and ${criterion.condition}
57
+                </when>
58
+                <when test="criterion.singleValue" >
59
+                  and ${criterion.condition} #{criterion.value}
60
+                </when>
61
+                <when test="criterion.betweenValue" >
62
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
63
+                </when>
64
+                <when test="criterion.listValue" >
65
+                  and ${criterion.condition}
66
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
67
+                    #{listItem}
68
+                  </foreach>
69
+                </when>
70
+              </choose>
71
+            </foreach>
72
+          </trim>
73
+        </if>
74
+      </foreach>
75
+    </where>
76
+  </sql>
77
+  <sql id="Base_Column_List" >
78
+    id, check_number, check_date, depot_id, check_person, device_type, device_name, model, 
79
+    store_count, really_count, check_result, reason, org_id
80
+  </sql>
81
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.StorageDevicecheckExample" >
82
+    select
83
+    <if test="distinct" >
84
+      distinct
85
+    </if>
86
+    <include refid="Base_Column_List" />
87
+    from storage_devicecheck
88
+    <if test="_parameter != null" >
89
+      <include refid="Example_Where_Clause" />
90
+    </if>
91
+    <if test="orderByClause != null" >
92
+      order by ${orderByClause}
93
+    </if>
94
+  </select>
95
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
96
+    select 
97
+    <include refid="Base_Column_List" />
98
+    from storage_devicecheck
99
+    where id = #{id,jdbcType=INTEGER}
100
+  </select>
101
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
102
+    delete from storage_devicecheck
103
+    where id = #{id,jdbcType=INTEGER}
104
+  </delete>
105
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicecheckExample" >
106
+    delete from storage_devicecheck
107
+    <if test="_parameter != null" >
108
+      <include refid="Example_Where_Clause" />
109
+    </if>
110
+  </delete>
111
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.StorageDevicecheck" >
112
+    insert into storage_devicecheck (id, check_number, check_date, 
113
+      depot_id, check_person, device_type, 
114
+      device_name, model, store_count, 
115
+      really_count, check_result, reason, 
116
+      org_id)
117
+    values (#{id,jdbcType=INTEGER}, #{checkNumber,jdbcType=VARCHAR}, #{checkDate,jdbcType=TIMESTAMP}, 
118
+      #{depotId,jdbcType=INTEGER}, #{checkPerson,jdbcType=VARCHAR}, #{deviceType,jdbcType=VARCHAR}, 
119
+      #{deviceName,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{storeCount,jdbcType=INTEGER}, 
120
+      #{reallyCount,jdbcType=INTEGER}, #{checkResult,jdbcType=VARCHAR}, #{reason,jdbcType=VARCHAR}, 
121
+      #{orgId,jdbcType=INTEGER})
122
+  </insert>
123
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.StorageDevicecheck" >
124
+    insert into storage_devicecheck
125
+    <trim prefix="(" suffix=")" suffixOverrides="," >
126
+      <if test="id != null" >
127
+        id,
128
+      </if>
129
+      <if test="checkNumber != null" >
130
+        check_number,
131
+      </if>
132
+      <if test="checkDate != null" >
133
+        check_date,
134
+      </if>
135
+      <if test="depotId != null" >
136
+        depot_id,
137
+      </if>
138
+      <if test="checkPerson != null" >
139
+        check_person,
140
+      </if>
141
+      <if test="deviceType != null" >
142
+        device_type,
143
+      </if>
144
+      <if test="deviceName != null" >
145
+        device_name,
146
+      </if>
147
+      <if test="model != null" >
148
+        model,
149
+      </if>
150
+      <if test="storeCount != null" >
151
+        store_count,
152
+      </if>
153
+      <if test="reallyCount != null" >
154
+        really_count,
155
+      </if>
156
+      <if test="checkResult != null" >
157
+        check_result,
158
+      </if>
159
+      <if test="reason != null" >
160
+        reason,
161
+      </if>
162
+      <if test="orgId != null" >
163
+        org_id,
164
+      </if>
165
+    </trim>
166
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
167
+      <if test="id != null" >
168
+        #{id,jdbcType=INTEGER},
169
+      </if>
170
+      <if test="checkNumber != null" >
171
+        #{checkNumber,jdbcType=VARCHAR},
172
+      </if>
173
+      <if test="checkDate != null" >
174
+        #{checkDate,jdbcType=TIMESTAMP},
175
+      </if>
176
+      <if test="depotId != null" >
177
+        #{depotId,jdbcType=INTEGER},
178
+      </if>
179
+      <if test="checkPerson != null" >
180
+        #{checkPerson,jdbcType=VARCHAR},
181
+      </if>
182
+      <if test="deviceType != null" >
183
+        #{deviceType,jdbcType=VARCHAR},
184
+      </if>
185
+      <if test="deviceName != null" >
186
+        #{deviceName,jdbcType=VARCHAR},
187
+      </if>
188
+      <if test="model != null" >
189
+        #{model,jdbcType=VARCHAR},
190
+      </if>
191
+      <if test="storeCount != null" >
192
+        #{storeCount,jdbcType=INTEGER},
193
+      </if>
194
+      <if test="reallyCount != null" >
195
+        #{reallyCount,jdbcType=INTEGER},
196
+      </if>
197
+      <if test="checkResult != null" >
198
+        #{checkResult,jdbcType=VARCHAR},
199
+      </if>
200
+      <if test="reason != null" >
201
+        #{reason,jdbcType=VARCHAR},
202
+      </if>
203
+      <if test="orgId != null" >
204
+        #{orgId,jdbcType=INTEGER},
205
+      </if>
206
+    </trim>
207
+  </insert>
208
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicecheckExample" resultType="java.lang.Integer" >
209
+    select count(*) from storage_devicecheck
210
+    <if test="_parameter != null" >
211
+      <include refid="Example_Where_Clause" />
212
+    </if>
213
+  </select>
214
+  <update id="updateByExampleSelective" parameterType="map" >
215
+    update storage_devicecheck
216
+    <set >
217
+      <if test="record.id != null" >
218
+        id = #{record.id,jdbcType=INTEGER},
219
+      </if>
220
+      <if test="record.checkNumber != null" >
221
+        check_number = #{record.checkNumber,jdbcType=VARCHAR},
222
+      </if>
223
+      <if test="record.checkDate != null" >
224
+        check_date = #{record.checkDate,jdbcType=TIMESTAMP},
225
+      </if>
226
+      <if test="record.depotId != null" >
227
+        depot_id = #{record.depotId,jdbcType=INTEGER},
228
+      </if>
229
+      <if test="record.checkPerson != null" >
230
+        check_person = #{record.checkPerson,jdbcType=VARCHAR},
231
+      </if>
232
+      <if test="record.deviceType != null" >
233
+        device_type = #{record.deviceType,jdbcType=VARCHAR},
234
+      </if>
235
+      <if test="record.deviceName != null" >
236
+        device_name = #{record.deviceName,jdbcType=VARCHAR},
237
+      </if>
238
+      <if test="record.model != null" >
239
+        model = #{record.model,jdbcType=VARCHAR},
240
+      </if>
241
+      <if test="record.storeCount != null" >
242
+        store_count = #{record.storeCount,jdbcType=INTEGER},
243
+      </if>
244
+      <if test="record.reallyCount != null" >
245
+        really_count = #{record.reallyCount,jdbcType=INTEGER},
246
+      </if>
247
+      <if test="record.checkResult != null" >
248
+        check_result = #{record.checkResult,jdbcType=VARCHAR},
249
+      </if>
250
+      <if test="record.reason != null" >
251
+        reason = #{record.reason,jdbcType=VARCHAR},
252
+      </if>
253
+      <if test="record.orgId != null" >
254
+        org_id = #{record.orgId,jdbcType=INTEGER},
255
+      </if>
256
+    </set>
257
+    <if test="_parameter != null" >
258
+      <include refid="Update_By_Example_Where_Clause" />
259
+    </if>
260
+  </update>
261
+  <update id="updateByExample" parameterType="map" >
262
+    update storage_devicecheck
263
+    set id = #{record.id,jdbcType=INTEGER},
264
+      check_number = #{record.checkNumber,jdbcType=VARCHAR},
265
+      check_date = #{record.checkDate,jdbcType=TIMESTAMP},
266
+      depot_id = #{record.depotId,jdbcType=INTEGER},
267
+      check_person = #{record.checkPerson,jdbcType=VARCHAR},
268
+      device_type = #{record.deviceType,jdbcType=VARCHAR},
269
+      device_name = #{record.deviceName,jdbcType=VARCHAR},
270
+      model = #{record.model,jdbcType=VARCHAR},
271
+      store_count = #{record.storeCount,jdbcType=INTEGER},
272
+      really_count = #{record.reallyCount,jdbcType=INTEGER},
273
+      check_result = #{record.checkResult,jdbcType=VARCHAR},
274
+      reason = #{record.reason,jdbcType=VARCHAR},
275
+      org_id = #{record.orgId,jdbcType=INTEGER}
276
+    <if test="_parameter != null" >
277
+      <include refid="Update_By_Example_Where_Clause" />
278
+    </if>
279
+  </update>
280
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.StorageDevicecheck" >
281
+    update storage_devicecheck
282
+    <set >
283
+      <if test="checkNumber != null" >
284
+        check_number = #{checkNumber,jdbcType=VARCHAR},
285
+      </if>
286
+      <if test="checkDate != null" >
287
+        check_date = #{checkDate,jdbcType=TIMESTAMP},
288
+      </if>
289
+      <if test="depotId != null" >
290
+        depot_id = #{depotId,jdbcType=INTEGER},
291
+      </if>
292
+      <if test="checkPerson != null" >
293
+        check_person = #{checkPerson,jdbcType=VARCHAR},
294
+      </if>
295
+      <if test="deviceType != null" >
296
+        device_type = #{deviceType,jdbcType=VARCHAR},
297
+      </if>
298
+      <if test="deviceName != null" >
299
+        device_name = #{deviceName,jdbcType=VARCHAR},
300
+      </if>
301
+      <if test="model != null" >
302
+        model = #{model,jdbcType=VARCHAR},
303
+      </if>
304
+      <if test="storeCount != null" >
305
+        store_count = #{storeCount,jdbcType=INTEGER},
306
+      </if>
307
+      <if test="reallyCount != null" >
308
+        really_count = #{reallyCount,jdbcType=INTEGER},
309
+      </if>
310
+      <if test="checkResult != null" >
311
+        check_result = #{checkResult,jdbcType=VARCHAR},
312
+      </if>
313
+      <if test="reason != null" >
314
+        reason = #{reason,jdbcType=VARCHAR},
315
+      </if>
316
+      <if test="orgId != null" >
317
+        org_id = #{orgId,jdbcType=INTEGER},
318
+      </if>
319
+    </set>
320
+    where id = #{id,jdbcType=INTEGER}
321
+  </update>
322
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.StorageDevicecheck" >
323
+    update storage_devicecheck
324
+    set check_number = #{checkNumber,jdbcType=VARCHAR},
325
+      check_date = #{checkDate,jdbcType=TIMESTAMP},
326
+      depot_id = #{depotId,jdbcType=INTEGER},
327
+      check_person = #{checkPerson,jdbcType=VARCHAR},
328
+      device_type = #{deviceType,jdbcType=VARCHAR},
329
+      device_name = #{deviceName,jdbcType=VARCHAR},
330
+      model = #{model,jdbcType=VARCHAR},
331
+      store_count = #{storeCount,jdbcType=INTEGER},
332
+      really_count = #{reallyCount,jdbcType=INTEGER},
333
+      check_result = #{checkResult,jdbcType=VARCHAR},
334
+      reason = #{reason,jdbcType=VARCHAR},
335
+      org_id = #{orgId,jdbcType=INTEGER}
336
+    where id = #{id,jdbcType=INTEGER}
337
+  </update>
338
+  
339
+  <select id="getCountForDate" parameterType="java.util.Map" resultType="java.util.Map">
340
+      SELECT  * FROM storage_devicecheck WHERE check_date LIKE ${checkDate} AND  depot_id = #{depotId,jdbcType=VARCHAR} GROUP BY check_date
341
+  </select>
342
+
343
+    <select id="selectBySql" parameterType="com.chinaitop.depot.device.model.StorageDevicecheckExample" resultMap="BaseResultMap">
344
+        SELECT
345
+            id,
346
+            check_number,
347
+            check_date,
348
+            depot_id,
349
+            check_person,
350
+            device_type,
351
+            device_name,
352
+            model,
353
+            store_count,
354
+            really_count,
355
+            reason,
356
+            org_id
357
+        FROM
358
+          storage_devicecheck
359
+        <if test="_parameter != null">
360
+          <include refid="Example_Where_Clause" />
361
+        </if>
362
+        GROUP BY depot_id,
363
+          check_number
364
+        ORDER BY depot_id , check_date DESC
365
+    </select>
366
+
367
+  <insert id="insertBySql" parameterType="java.util.Map">
368
+    ${sql}
369
+  </insert>
370
+</mapper>

+ 36 - 0
src/main/java/com/chinaitop/depot/device/mapper/StorageDevicegetMapper.java

@@ -0,0 +1,36 @@
1
+package com.chinaitop.depot.device.mapper;
2
+
3
+import com.chinaitop.depot.device.model.StorageDeviceget;
4
+import com.chinaitop.depot.device.model.StorageDevicegetExample;
5
+import java.util.List;
6
+import java.util.Map;
7
+
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+public interface StorageDevicegetMapper {
11
+    int countByExample(StorageDevicegetExample example);
12
+
13
+    int deleteByExample(StorageDevicegetExample example);
14
+
15
+    int deleteByPrimaryKey(Integer id);
16
+
17
+    int insert(StorageDeviceget record);
18
+
19
+    int insertSelective(StorageDeviceget record);
20
+
21
+    List<StorageDeviceget> selectByExample(StorageDevicegetExample example);
22
+
23
+    StorageDeviceget selectByPrimaryKey(Integer id);
24
+
25
+    int updateByExampleSelective(@Param("record") StorageDeviceget record, @Param("example") StorageDevicegetExample example);
26
+
27
+    int updateByExample(@Param("record") StorageDeviceget record, @Param("example") StorageDevicegetExample example);
28
+
29
+    int updateByPrimaryKeySelective(StorageDeviceget record);
30
+
31
+    int updateByPrimaryKey(StorageDeviceget record);
32
+    
33
+    List<StorageDeviceget> selectByHouseId(Integer houseId);
34
+
35
+	List<Map<String, Object>> queryCountByType();
36
+}

+ 399 - 0
src/main/java/com/chinaitop/depot/device/mapper/StorageDevicegetMapper.xml

@@ -0,0 +1,399 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.device.mapper.StorageDevicegetMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.StorageDeviceget" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="device_type" property="deviceType" jdbcType="INTEGER" />
7
+    <result column="get_time" property="getTime" jdbcType="TIMESTAMP" />
8
+    <result column="device_name" property="deviceName" jdbcType="VARCHAR" />
9
+    <result column="model" property="model" jdbcType="VARCHAR" />
10
+    <result column="get_count" property="getCount" jdbcType="INTEGER" />
11
+    <result column="back_count" property="backCount" jdbcType="INTEGER" />
12
+    <result column="book_keeper" property="bookKeeper" jdbcType="VARCHAR" />
13
+    <result column="handler" property="handler" jdbcType="VARCHAR" />
14
+    <result column="house_id" property="houseId" jdbcType="INTEGER" />
15
+    <result column="number" property="number" jdbcType="VARCHAR" />
16
+    <result column="collator" property="collator" jdbcType="VARCHAR" />
17
+    <result column="use_count" property="useCount" jdbcType="INTEGER" />
18
+    <result column="remark" property="remark" jdbcType="VARCHAR" />
19
+    <result column="input_id" property="inputId" jdbcType="INTEGER" />
20
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
21
+  </resultMap>
22
+  <sql id="Example_Where_Clause" >
23
+    <where >
24
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
25
+        <if test="criteria.valid" >
26
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
27
+            <foreach collection="criteria.criteria" item="criterion" >
28
+              <choose >
29
+                <when test="criterion.noValue" >
30
+                  and ${criterion.condition}
31
+                </when>
32
+                <when test="criterion.singleValue" >
33
+                  and ${criterion.condition} #{criterion.value}
34
+                </when>
35
+                <when test="criterion.betweenValue" >
36
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
37
+                </when>
38
+                <when test="criterion.listValue" >
39
+                  and ${criterion.condition}
40
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
41
+                    #{listItem}
42
+                  </foreach>
43
+                </when>
44
+              </choose>
45
+            </foreach>
46
+          </trim>
47
+        </if>
48
+      </foreach>
49
+    </where>
50
+  </sql>
51
+  <sql id="Update_By_Example_Where_Clause" >
52
+    <where >
53
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
54
+        <if test="criteria.valid" >
55
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
56
+            <foreach collection="criteria.criteria" item="criterion" >
57
+              <choose >
58
+                <when test="criterion.noValue" >
59
+                  and ${criterion.condition}
60
+                </when>
61
+                <when test="criterion.singleValue" >
62
+                  and ${criterion.condition} #{criterion.value}
63
+                </when>
64
+                <when test="criterion.betweenValue" >
65
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
66
+                </when>
67
+                <when test="criterion.listValue" >
68
+                  and ${criterion.condition}
69
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
70
+                    #{listItem}
71
+                  </foreach>
72
+                </when>
73
+              </choose>
74
+            </foreach>
75
+          </trim>
76
+        </if>
77
+      </foreach>
78
+    </where>
79
+  </sql>
80
+  <sql id="Base_Column_List" >
81
+    id, device_type, get_time, device_name, model, get_count, back_count, book_keeper, 
82
+    handler, house_id, number, collator, use_count, remark, input_id, org_id
83
+  </sql>
84
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.StorageDevicegetExample" >
85
+    select
86
+    <if test="distinct" >
87
+      distinct
88
+    </if>
89
+    <include refid="Base_Column_List" />
90
+    from storage_deviceget
91
+    <if test="_parameter != null" >
92
+      <include refid="Example_Where_Clause" />
93
+    </if>
94
+    <if test="orderByClause != null" >
95
+      order by ${orderByClause}
96
+    </if>
97
+  </select>
98
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
99
+    select 
100
+    <include refid="Base_Column_List" />
101
+    from storage_deviceget
102
+    where id = #{id,jdbcType=INTEGER}
103
+  </select>
104
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
105
+    delete from storage_deviceget
106
+    where id = #{id,jdbcType=INTEGER}
107
+  </delete>
108
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicegetExample" >
109
+    delete from storage_deviceget
110
+    <if test="_parameter != null" >
111
+      <include refid="Example_Where_Clause" />
112
+    </if>
113
+  </delete>
114
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.StorageDeviceget" >
115
+    insert into storage_deviceget (id, device_type, get_time, 
116
+      device_name, model, get_count, 
117
+      back_count, book_keeper, handler, 
118
+      house_id, number, collator, 
119
+      use_count, remark, input_id, 
120
+      org_id)
121
+    values (#{id,jdbcType=INTEGER}, #{deviceType,jdbcType=INTEGER}, #{getTime,jdbcType=TIMESTAMP}, 
122
+      #{deviceName,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{getCount,jdbcType=INTEGER}, 
123
+      #{backCount,jdbcType=INTEGER}, #{bookKeeper,jdbcType=VARCHAR}, #{handler,jdbcType=VARCHAR}, 
124
+      #{houseId,jdbcType=INTEGER}, #{number,jdbcType=VARCHAR}, #{collator,jdbcType=VARCHAR}, 
125
+      #{useCount,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{inputId,jdbcType=INTEGER}, 
126
+      #{orgId,jdbcType=INTEGER})
127
+  </insert>
128
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.StorageDeviceget" >
129
+    insert into storage_deviceget
130
+    <trim prefix="(" suffix=")" suffixOverrides="," >
131
+      <if test="id != null" >
132
+        id,
133
+      </if>
134
+      <if test="deviceType != null" >
135
+        device_type,
136
+      </if>
137
+      <if test="getTime != null" >
138
+        get_time,
139
+      </if>
140
+      <if test="deviceName != null" >
141
+        device_name,
142
+      </if>
143
+      <if test="model != null" >
144
+        model,
145
+      </if>
146
+      <if test="getCount != null" >
147
+        get_count,
148
+      </if>
149
+      <if test="backCount != null" >
150
+        back_count,
151
+      </if>
152
+      <if test="bookKeeper != null" >
153
+        book_keeper,
154
+      </if>
155
+      <if test="handler != null" >
156
+        handler,
157
+      </if>
158
+      <if test="houseId != null" >
159
+        house_id,
160
+      </if>
161
+      <if test="number != null" >
162
+        number,
163
+      </if>
164
+      <if test="collator != null" >
165
+        collator,
166
+      </if>
167
+      <if test="useCount != null" >
168
+        use_count,
169
+      </if>
170
+      <if test="remark != null" >
171
+        remark,
172
+      </if>
173
+      <if test="inputId != null" >
174
+        input_id,
175
+      </if>
176
+      <if test="orgId != null" >
177
+        org_id,
178
+      </if>
179
+    </trim>
180
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
181
+      <if test="id != null" >
182
+        #{id,jdbcType=INTEGER},
183
+      </if>
184
+      <if test="deviceType != null" >
185
+        #{deviceType,jdbcType=INTEGER},
186
+      </if>
187
+      <if test="getTime != null" >
188
+        #{getTime,jdbcType=TIMESTAMP},
189
+      </if>
190
+      <if test="deviceName != null" >
191
+        #{deviceName,jdbcType=VARCHAR},
192
+      </if>
193
+      <if test="model != null" >
194
+        #{model,jdbcType=VARCHAR},
195
+      </if>
196
+      <if test="getCount != null" >
197
+        #{getCount,jdbcType=INTEGER},
198
+      </if>
199
+      <if test="backCount != null" >
200
+        #{backCount,jdbcType=INTEGER},
201
+      </if>
202
+      <if test="bookKeeper != null" >
203
+        #{bookKeeper,jdbcType=VARCHAR},
204
+      </if>
205
+      <if test="handler != null" >
206
+        #{handler,jdbcType=VARCHAR},
207
+      </if>
208
+      <if test="houseId != null" >
209
+        #{houseId,jdbcType=INTEGER},
210
+      </if>
211
+      <if test="number != null" >
212
+        #{number,jdbcType=VARCHAR},
213
+      </if>
214
+      <if test="collator != null" >
215
+        #{collator,jdbcType=VARCHAR},
216
+      </if>
217
+      <if test="useCount != null" >
218
+        #{useCount,jdbcType=INTEGER},
219
+      </if>
220
+      <if test="remark != null" >
221
+        #{remark,jdbcType=VARCHAR},
222
+      </if>
223
+      <if test="inputId != null" >
224
+        #{inputId,jdbcType=INTEGER},
225
+      </if>
226
+      <if test="orgId != null" >
227
+        #{orgId,jdbcType=INTEGER},
228
+      </if>
229
+    </trim>
230
+  </insert>
231
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicegetExample" resultType="java.lang.Integer" >
232
+    select count(*) from storage_deviceget
233
+    <if test="_parameter != null" >
234
+      <include refid="Example_Where_Clause" />
235
+    </if>
236
+  </select>
237
+  <update id="updateByExampleSelective" parameterType="map" >
238
+    update storage_deviceget
239
+    <set >
240
+      <if test="record.id != null" >
241
+        id = #{record.id,jdbcType=INTEGER},
242
+      </if>
243
+      <if test="record.deviceType != null" >
244
+        device_type = #{record.deviceType,jdbcType=INTEGER},
245
+      </if>
246
+      <if test="record.getTime != null" >
247
+        get_time = #{record.getTime,jdbcType=TIMESTAMP},
248
+      </if>
249
+      <if test="record.deviceName != null" >
250
+        device_name = #{record.deviceName,jdbcType=VARCHAR},
251
+      </if>
252
+      <if test="record.model != null" >
253
+        model = #{record.model,jdbcType=VARCHAR},
254
+      </if>
255
+      <if test="record.getCount != null" >
256
+        get_count = #{record.getCount,jdbcType=INTEGER},
257
+      </if>
258
+      <if test="record.backCount != null" >
259
+        back_count = #{record.backCount,jdbcType=INTEGER},
260
+      </if>
261
+      <if test="record.bookKeeper != null" >
262
+        book_keeper = #{record.bookKeeper,jdbcType=VARCHAR},
263
+      </if>
264
+      <if test="record.handler != null" >
265
+        handler = #{record.handler,jdbcType=VARCHAR},
266
+      </if>
267
+      <if test="record.houseId != null" >
268
+        house_id = #{record.houseId,jdbcType=INTEGER},
269
+      </if>
270
+      <if test="record.number != null" >
271
+        number = #{record.number,jdbcType=VARCHAR},
272
+      </if>
273
+      <if test="record.collator != null" >
274
+        collator = #{record.collator,jdbcType=VARCHAR},
275
+      </if>
276
+      <if test="record.useCount != null" >
277
+        use_count = #{record.useCount,jdbcType=INTEGER},
278
+      </if>
279
+      <if test="record.remark != null" >
280
+        remark = #{record.remark,jdbcType=VARCHAR},
281
+      </if>
282
+      <if test="record.inputId != null" >
283
+        input_id = #{record.inputId,jdbcType=INTEGER},
284
+      </if>
285
+      <if test="record.orgId != null" >
286
+        org_id = #{record.orgId,jdbcType=INTEGER},
287
+      </if>
288
+    </set>
289
+    <if test="_parameter != null" >
290
+      <include refid="Update_By_Example_Where_Clause" />
291
+    </if>
292
+  </update>
293
+  <update id="updateByExample" parameterType="map" >
294
+    update storage_deviceget
295
+    set id = #{record.id,jdbcType=INTEGER},
296
+      device_type = #{record.deviceType,jdbcType=INTEGER},
297
+      get_time = #{record.getTime,jdbcType=TIMESTAMP},
298
+      device_name = #{record.deviceName,jdbcType=VARCHAR},
299
+      model = #{record.model,jdbcType=VARCHAR},
300
+      get_count = #{record.getCount,jdbcType=INTEGER},
301
+      back_count = #{record.backCount,jdbcType=INTEGER},
302
+      book_keeper = #{record.bookKeeper,jdbcType=VARCHAR},
303
+      handler = #{record.handler,jdbcType=VARCHAR},
304
+      house_id = #{record.houseId,jdbcType=INTEGER},
305
+      number = #{record.number,jdbcType=VARCHAR},
306
+      collator = #{record.collator,jdbcType=VARCHAR},
307
+      use_count = #{record.useCount,jdbcType=INTEGER},
308
+      remark = #{record.remark,jdbcType=VARCHAR},
309
+      input_id = #{record.inputId,jdbcType=INTEGER},
310
+      org_id = #{record.orgId,jdbcType=INTEGER}
311
+    <if test="_parameter != null" >
312
+      <include refid="Update_By_Example_Where_Clause" />
313
+    </if>
314
+  </update>
315
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.StorageDeviceget" >
316
+    update storage_deviceget
317
+    <set >
318
+      <if test="deviceType != null" >
319
+        device_type = #{deviceType,jdbcType=INTEGER},
320
+      </if>
321
+      <if test="getTime != null" >
322
+        get_time = #{getTime,jdbcType=TIMESTAMP},
323
+      </if>
324
+      <if test="deviceName != null" >
325
+        device_name = #{deviceName,jdbcType=VARCHAR},
326
+      </if>
327
+      <if test="model != null" >
328
+        model = #{model,jdbcType=VARCHAR},
329
+      </if>
330
+      <if test="getCount != null" >
331
+        get_count = #{getCount,jdbcType=INTEGER},
332
+      </if>
333
+      <if test="backCount != null" >
334
+        back_count = #{backCount,jdbcType=INTEGER},
335
+      </if>
336
+      <if test="bookKeeper != null" >
337
+        book_keeper = #{bookKeeper,jdbcType=VARCHAR},
338
+      </if>
339
+      <if test="handler != null" >
340
+        handler = #{handler,jdbcType=VARCHAR},
341
+      </if>
342
+      <if test="houseId != null" >
343
+        house_id = #{houseId,jdbcType=INTEGER},
344
+      </if>
345
+      <if test="number != null" >
346
+        number = #{number,jdbcType=VARCHAR},
347
+      </if>
348
+      <if test="collator != null" >
349
+        collator = #{collator,jdbcType=VARCHAR},
350
+      </if>
351
+      <if test="useCount != null" >
352
+        use_count = #{useCount,jdbcType=INTEGER},
353
+      </if>
354
+      <if test="remark != null" >
355
+        remark = #{remark,jdbcType=VARCHAR},
356
+      </if>
357
+      <if test="inputId != null" >
358
+        input_id = #{inputId,jdbcType=INTEGER},
359
+      </if>
360
+      <if test="orgId != null" >
361
+        org_id = #{orgId,jdbcType=INTEGER},
362
+      </if>
363
+    </set>
364
+    where id = #{id,jdbcType=INTEGER}
365
+  </update>
366
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.StorageDeviceget" >
367
+    update storage_deviceget
368
+    set device_type = #{deviceType,jdbcType=INTEGER},
369
+      get_time = #{getTime,jdbcType=TIMESTAMP},
370
+      device_name = #{deviceName,jdbcType=VARCHAR},
371
+      model = #{model,jdbcType=VARCHAR},
372
+      get_count = #{getCount,jdbcType=INTEGER},
373
+      back_count = #{backCount,jdbcType=INTEGER},
374
+      book_keeper = #{bookKeeper,jdbcType=VARCHAR},
375
+      handler = #{handler,jdbcType=VARCHAR},
376
+      house_id = #{houseId,jdbcType=INTEGER},
377
+      number = #{number,jdbcType=VARCHAR},
378
+      collator = #{collator,jdbcType=VARCHAR},
379
+      use_count = #{useCount,jdbcType=INTEGER},
380
+      remark = #{remark,jdbcType=VARCHAR},
381
+      input_id = #{inputId,jdbcType=INTEGER},
382
+      org_id = #{orgId,jdbcType=INTEGER}
383
+    where id = #{id,jdbcType=INTEGER}
384
+  </update>
385
+  
386
+  <select id="selectByHouseId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
387
+    select 
388
+    house_id,device_type,device_name,model,get_count,back_count
389
+    from storage_deviceget
390
+    where house_id = #{houseId}
391
+  </select>
392
+  
393
+  <!-- 获取每个类型的使用数量  -->
394
+   <select id="queryCountByType"  resultType="java.util.Map">
395
+    select SUM(get_count) getCounts, device_type from storage_deviceget 
396
+    GROUP BY device_type 
397
+    order by device_type asc
398
+  </select>
399
+</mapper>

+ 86 - 0
src/main/java/com/chinaitop/depot/device/mapper/StorageDeviceinputMapper.java

@@ -0,0 +1,86 @@
1
+package com.chinaitop.depot.device.mapper;
2
+
3
+import java.util.HashMap;
4
+import java.util.List;
5
+import java.util.Map;
6
+
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+import com.chinaitop.depot.device.model.ContentBean;
10
+import com.chinaitop.depot.device.model.HouseNameBean;
11
+import com.chinaitop.depot.device.model.HouseTypeBean;
12
+import com.chinaitop.depot.device.model.ShelfContentBean;
13
+import com.chinaitop.depot.device.model.StorageDeviceinput;
14
+import com.chinaitop.depot.device.model.StorageDeviceinputExample;
15
+
16
+public interface StorageDeviceinputMapper {
17
+    int countByExample(StorageDeviceinputExample example);
18
+
19
+    int deleteByExample(StorageDeviceinputExample example);
20
+
21
+    int deleteByPrimaryKey(Integer id);
22
+
23
+    int insert(StorageDeviceinput record);
24
+
25
+    int insertSelective(StorageDeviceinput record);
26
+
27
+    List<StorageDeviceinput> selectByExample(StorageDeviceinputExample example);
28
+
29
+    StorageDeviceinput selectByPrimaryKey(Integer id);
30
+
31
+    int updateByExampleSelective(@Param("record") StorageDeviceinput record, @Param("example") StorageDeviceinputExample example);
32
+
33
+    int updateByExample(@Param("record") StorageDeviceinput record, @Param("example") StorageDeviceinputExample example);
34
+
35
+    int updateByPrimaryKeySelective(StorageDeviceinput record);
36
+
37
+    int updateByPrimaryKey(StorageDeviceinput record);
38
+    
39
+    List<HouseNameBean> getHouseList();
40
+
41
+   	List<HouseTypeBean> getTypeList(Integer depotId);
42
+   	
43
+   	List<ShelfContentBean> getShelfList(Integer depotTypeId);
44
+
45
+   	List<ShelfContentBean> getNameList(Integer depotTypeId);
46
+
47
+   	ContentBean getcontentGetList(Map<String, Object> map);
48
+
49
+   	List<StorageDeviceinput> getDeviceInputList(Integer depotId);
50
+
51
+   	List<ContentBean> getShelfGetList(String deviceName);
52
+
53
+   	List<StorageDeviceinput> getModelList(String deviceName);
54
+
55
+   	List<StorageDeviceinput> getNumberList(String deviceModel);
56
+
57
+   	List<StorageDeviceinput> getCountList(String number);
58
+
59
+   	List<StorageDeviceinput> getAllList(String number);
60
+
61
+   	List<ContentBean> getModelGetList(Map<String, Object> map);
62
+
63
+   	List<StorageDeviceinput> getNumberGetList(Map<String, Object> map);
64
+
65
+   	List<StorageDeviceinput> getUseCountGetList(String number);
66
+
67
+   	List<StorageDeviceinput> getDeviceModelList(String deviceName);
68
+   	
69
+   	List<ContentBean> getcontentNameList(Integer depotTypeId);
70
+
71
+   	List<StorageDeviceinput> getdevieName();
72
+
73
+   	List<StorageDeviceinput> getRepairNameList();
74
+
75
+   	List<StorageDeviceinput> getUseCount(Map<String, Object> map);
76
+
77
+	List<StorageDeviceinput> queryDevice(HashMap<Object, Object> map);
78
+
79
+	List<StorageDeviceinput> getDeviceModelRepair(String deviceName);
80
+
81
+	List<StorageDeviceinput> getDeviceModelListRepair(String deviceName);
82
+
83
+	List<Map<String, Object>> queryCountByType();
84
+
85
+	List<StorageDeviceinput> queryDeviceAccount(StorageDeviceinputExample storageDeviceinputExample);
86
+}

+ 733 - 0
src/main/java/com/chinaitop/depot/device/mapper/StorageDeviceinputMapper.xml

@@ -0,0 +1,733 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.device.mapper.StorageDeviceinputMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.StorageDeviceinput" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="device_type" property="deviceType" jdbcType="INTEGER" />
7
+    <result column="device_name" property="deviceName" jdbcType="VARCHAR" />
8
+    <result column="model" property="model" jdbcType="VARCHAR" />
9
+    <result column="use_count" property="useCount" jdbcType="INTEGER" />
10
+    <result column="device_manager" property="deviceManager" jdbcType="VARCHAR" />
11
+    <result column="input_time" property="inputTime" jdbcType="TIMESTAMP" />
12
+    <result column="number" property="number" jdbcType="VARCHAR" />
13
+    <result column="unit" property="unit" jdbcType="VARCHAR" />
14
+    <result column="device_price" property="devicePrice" jdbcType="DECIMAL" />
15
+    <result column="storage_rack" property="storageRack" jdbcType="VARCHAR" />
16
+    <result column="storage_rack_cell" property="storageRackCell" jdbcType="VARCHAR" />
17
+    <result column="handler" property="handler" jdbcType="VARCHAR" />
18
+    <result column="book_keeper" property="bookKeeper" jdbcType="VARCHAR" />
19
+    <result column="producer" property="producer" jdbcType="VARCHAR" />
20
+    <result column="remark" property="remark" jdbcType="VARCHAR" />
21
+    <result column="service_life" property="serviceLife" jdbcType="DECIMAL" />
22
+    <result column="parent_id" property="parentId" jdbcType="INTEGER" />
23
+    <result column="position" property="position" jdbcType="VARCHAR" />
24
+    <result column="status" property="status" jdbcType="INTEGER" />
25
+    <result column="broken_count" property="brokenCount" jdbcType="INTEGER" />
26
+    <result column="produce_time" property="produceTime" jdbcType="TIMESTAMP" />
27
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
28
+  </resultMap>
29
+  <sql id="Example_Where_Clause" >
30
+    <where >
31
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
32
+        <if test="criteria.valid" >
33
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
34
+            <foreach collection="criteria.criteria" item="criterion" >
35
+              <choose >
36
+                <when test="criterion.noValue" >
37
+                  and ${criterion.condition}
38
+                </when>
39
+                <when test="criterion.singleValue" >
40
+                  and ${criterion.condition} #{criterion.value}
41
+                </when>
42
+                <when test="criterion.betweenValue" >
43
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
44
+                </when>
45
+                <when test="criterion.listValue" >
46
+                  and ${criterion.condition}
47
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
48
+                    #{listItem}
49
+                  </foreach>
50
+                </when>
51
+              </choose>
52
+            </foreach>
53
+          </trim>
54
+        </if>
55
+      </foreach>
56
+    </where>
57
+  </sql>
58
+  <sql id="Update_By_Example_Where_Clause" >
59
+    <where >
60
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
61
+        <if test="criteria.valid" >
62
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
63
+            <foreach collection="criteria.criteria" item="criterion" >
64
+              <choose >
65
+                <when test="criterion.noValue" >
66
+                  and ${criterion.condition}
67
+                </when>
68
+                <when test="criterion.singleValue" >
69
+                  and ${criterion.condition} #{criterion.value}
70
+                </when>
71
+                <when test="criterion.betweenValue" >
72
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
73
+                </when>
74
+                <when test="criterion.listValue" >
75
+                  and ${criterion.condition}
76
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
77
+                    #{listItem}
78
+                  </foreach>
79
+                </when>
80
+              </choose>
81
+            </foreach>
82
+          </trim>
83
+        </if>
84
+      </foreach>
85
+    </where>
86
+  </sql>
87
+  <sql id="Base_Column_List" >
88
+    id, device_type, device_name, model, use_count, device_manager, input_time, number, 
89
+    unit, device_price, storage_rack, storage_rack_cell, handler, book_keeper, producer, 
90
+    remark, service_life, parent_id, position, status, broken_count, produce_time, org_id
91
+  </sql>
92
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.StorageDeviceinputExample" >
93
+    select
94
+    <if test="distinct" >
95
+      distinct
96
+    </if>
97
+    <include refid="Base_Column_List" />
98
+    from storage_deviceinput
99
+    <if test="_parameter != null" >
100
+      <include refid="Example_Where_Clause" />
101
+    </if>
102
+    <if test="orderByClause != null" >
103
+      order by ${orderByClause}
104
+    </if>
105
+  </select>
106
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
107
+    select 
108
+    <include refid="Base_Column_List" />
109
+    from storage_deviceinput
110
+    where id = #{id,jdbcType=INTEGER}
111
+  </select>
112
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
113
+    delete from storage_deviceinput
114
+    where id = #{id,jdbcType=INTEGER}
115
+  </delete>
116
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.StorageDeviceinputExample" >
117
+    delete from storage_deviceinput
118
+    <if test="_parameter != null" >
119
+      <include refid="Example_Where_Clause" />
120
+    </if>
121
+  </delete>
122
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.StorageDeviceinput" >
123
+    insert into storage_deviceinput (id, device_type, device_name, 
124
+      model, use_count, device_manager, 
125
+      input_time, number, unit, 
126
+      device_price, storage_rack, storage_rack_cell, 
127
+      handler, book_keeper, producer, 
128
+      remark, service_life, parent_id, 
129
+      position, status, broken_count, 
130
+      produce_time, org_id)
131
+    values (#{id,jdbcType=INTEGER}, #{deviceType,jdbcType=INTEGER}, #{deviceName,jdbcType=VARCHAR}, 
132
+      #{model,jdbcType=VARCHAR}, #{useCount,jdbcType=INTEGER}, #{deviceManager,jdbcType=VARCHAR}, 
133
+      #{inputTime,jdbcType=TIMESTAMP}, #{number,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, 
134
+      #{devicePrice,jdbcType=DECIMAL}, #{storageRack,jdbcType=VARCHAR}, #{storageRackCell,jdbcType=VARCHAR}, 
135
+      #{handler,jdbcType=VARCHAR}, #{bookKeeper,jdbcType=VARCHAR}, #{producer,jdbcType=VARCHAR}, 
136
+      #{remark,jdbcType=VARCHAR}, #{serviceLife,jdbcType=DECIMAL}, #{parentId,jdbcType=INTEGER}, 
137
+      #{position,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{brokenCount,jdbcType=INTEGER}, 
138
+      #{produceTime,jdbcType=TIMESTAMP}, #{orgId,jdbcType=INTEGER})
139
+  </insert>
140
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.StorageDeviceinput" >
141
+    insert into storage_deviceinput
142
+    <trim prefix="(" suffix=")" suffixOverrides="," >
143
+      <if test="id != null" >
144
+        id,
145
+      </if>
146
+      <if test="deviceType != null" >
147
+        device_type,
148
+      </if>
149
+      <if test="deviceName != null" >
150
+        device_name,
151
+      </if>
152
+      <if test="model != null" >
153
+        model,
154
+      </if>
155
+      <if test="useCount != null" >
156
+        use_count,
157
+      </if>
158
+      <if test="deviceManager != null" >
159
+        device_manager,
160
+      </if>
161
+      <if test="inputTime != null" >
162
+        input_time,
163
+      </if>
164
+      <if test="number != null" >
165
+        number,
166
+      </if>
167
+      <if test="unit != null" >
168
+        unit,
169
+      </if>
170
+      <if test="devicePrice != null" >
171
+        device_price,
172
+      </if>
173
+      <if test="storageRack != null" >
174
+        storage_rack,
175
+      </if>
176
+      <if test="storageRackCell != null" >
177
+        storage_rack_cell,
178
+      </if>
179
+      <if test="handler != null" >
180
+        handler,
181
+      </if>
182
+      <if test="bookKeeper != null" >
183
+        book_keeper,
184
+      </if>
185
+      <if test="producer != null" >
186
+        producer,
187
+      </if>
188
+      <if test="remark != null" >
189
+        remark,
190
+      </if>
191
+      <if test="serviceLife != null" >
192
+        service_life,
193
+      </if>
194
+      <if test="parentId != null" >
195
+        parent_id,
196
+      </if>
197
+      <if test="position != null" >
198
+        position,
199
+      </if>
200
+      <if test="status != null" >
201
+        status,
202
+      </if>
203
+      <if test="brokenCount != null" >
204
+        broken_count,
205
+      </if>
206
+      <if test="produceTime != null" >
207
+        produce_time,
208
+      </if>
209
+      <if test="orgId != null" >
210
+        org_id,
211
+      </if>
212
+    </trim>
213
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
214
+      <if test="id != null" >
215
+        #{id,jdbcType=INTEGER},
216
+      </if>
217
+      <if test="deviceType != null" >
218
+        #{deviceType,jdbcType=INTEGER},
219
+      </if>
220
+      <if test="deviceName != null" >
221
+        #{deviceName,jdbcType=VARCHAR},
222
+      </if>
223
+      <if test="model != null" >
224
+        #{model,jdbcType=VARCHAR},
225
+      </if>
226
+      <if test="useCount != null" >
227
+        #{useCount,jdbcType=INTEGER},
228
+      </if>
229
+      <if test="deviceManager != null" >
230
+        #{deviceManager,jdbcType=VARCHAR},
231
+      </if>
232
+      <if test="inputTime != null" >
233
+        #{inputTime,jdbcType=TIMESTAMP},
234
+      </if>
235
+      <if test="number != null" >
236
+        #{number,jdbcType=VARCHAR},
237
+      </if>
238
+      <if test="unit != null" >
239
+        #{unit,jdbcType=VARCHAR},
240
+      </if>
241
+      <if test="devicePrice != null" >
242
+        #{devicePrice,jdbcType=DECIMAL},
243
+      </if>
244
+      <if test="storageRack != null" >
245
+        #{storageRack,jdbcType=VARCHAR},
246
+      </if>
247
+      <if test="storageRackCell != null" >
248
+        #{storageRackCell,jdbcType=VARCHAR},
249
+      </if>
250
+      <if test="handler != null" >
251
+        #{handler,jdbcType=VARCHAR},
252
+      </if>
253
+      <if test="bookKeeper != null" >
254
+        #{bookKeeper,jdbcType=VARCHAR},
255
+      </if>
256
+      <if test="producer != null" >
257
+        #{producer,jdbcType=VARCHAR},
258
+      </if>
259
+      <if test="remark != null" >
260
+        #{remark,jdbcType=VARCHAR},
261
+      </if>
262
+      <if test="serviceLife != null" >
263
+        #{serviceLife,jdbcType=DECIMAL},
264
+      </if>
265
+      <if test="parentId != null" >
266
+        #{parentId,jdbcType=INTEGER},
267
+      </if>
268
+      <if test="position != null" >
269
+        #{position,jdbcType=VARCHAR},
270
+      </if>
271
+      <if test="status != null" >
272
+        #{status,jdbcType=INTEGER},
273
+      </if>
274
+      <if test="brokenCount != null" >
275
+        #{brokenCount,jdbcType=INTEGER},
276
+      </if>
277
+      <if test="produceTime != null" >
278
+        #{produceTime,jdbcType=TIMESTAMP},
279
+      </if>
280
+      <if test="orgId != null" >
281
+        #{orgId,jdbcType=INTEGER},
282
+      </if>
283
+    </trim>
284
+  </insert>
285
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.StorageDeviceinputExample" resultType="java.lang.Integer" >
286
+    select count(*) from storage_deviceinput
287
+    <if test="_parameter != null" >
288
+      <include refid="Example_Where_Clause" />
289
+    </if>
290
+  </select>
291
+  <update id="updateByExampleSelective" parameterType="map" >
292
+    update storage_deviceinput
293
+    <set >
294
+      <if test="record.id != null" >
295
+        id = #{record.id,jdbcType=INTEGER},
296
+      </if>
297
+      <if test="record.deviceType != null" >
298
+        device_type = #{record.deviceType,jdbcType=INTEGER},
299
+      </if>
300
+      <if test="record.deviceName != null" >
301
+        device_name = #{record.deviceName,jdbcType=VARCHAR},
302
+      </if>
303
+      <if test="record.model != null" >
304
+        model = #{record.model,jdbcType=VARCHAR},
305
+      </if>
306
+      <if test="record.useCount != null" >
307
+        use_count = #{record.useCount,jdbcType=INTEGER},
308
+      </if>
309
+      <if test="record.deviceManager != null" >
310
+        device_manager = #{record.deviceManager,jdbcType=VARCHAR},
311
+      </if>
312
+      <if test="record.inputTime != null" >
313
+        input_time = #{record.inputTime,jdbcType=TIMESTAMP},
314
+      </if>
315
+      <if test="record.number != null" >
316
+        number = #{record.number,jdbcType=VARCHAR},
317
+      </if>
318
+      <if test="record.unit != null" >
319
+        unit = #{record.unit,jdbcType=VARCHAR},
320
+      </if>
321
+      <if test="record.devicePrice != null" >
322
+        device_price = #{record.devicePrice,jdbcType=DECIMAL},
323
+      </if>
324
+      <if test="record.storageRack != null" >
325
+        storage_rack = #{record.storageRack,jdbcType=VARCHAR},
326
+      </if>
327
+      <if test="record.storageRackCell != null" >
328
+        storage_rack_cell = #{record.storageRackCell,jdbcType=VARCHAR},
329
+      </if>
330
+      <if test="record.handler != null" >
331
+        handler = #{record.handler,jdbcType=VARCHAR},
332
+      </if>
333
+      <if test="record.bookKeeper != null" >
334
+        book_keeper = #{record.bookKeeper,jdbcType=VARCHAR},
335
+      </if>
336
+      <if test="record.producer != null" >
337
+        producer = #{record.producer,jdbcType=VARCHAR},
338
+      </if>
339
+      <if test="record.remark != null" >
340
+        remark = #{record.remark,jdbcType=VARCHAR},
341
+      </if>
342
+      <if test="record.serviceLife != null" >
343
+        service_life = #{record.serviceLife,jdbcType=DECIMAL},
344
+      </if>
345
+      <if test="record.parentId != null" >
346
+        parent_id = #{record.parentId,jdbcType=INTEGER},
347
+      </if>
348
+      <if test="record.position != null" >
349
+        position = #{record.position,jdbcType=VARCHAR},
350
+      </if>
351
+      <if test="record.status != null" >
352
+        status = #{record.status,jdbcType=INTEGER},
353
+      </if>
354
+      <if test="record.brokenCount != null" >
355
+        broken_count = #{record.brokenCount,jdbcType=INTEGER},
356
+      </if>
357
+      <if test="record.produceTime != null" >
358
+        produce_time = #{record.produceTime,jdbcType=TIMESTAMP},
359
+      </if>
360
+      <if test="record.orgId != null" >
361
+        org_id = #{record.orgId,jdbcType=INTEGER},
362
+      </if>
363
+    </set>
364
+    <if test="_parameter != null" >
365
+      <include refid="Update_By_Example_Where_Clause" />
366
+    </if>
367
+  </update>
368
+  <update id="updateByExample" parameterType="map" >
369
+    update storage_deviceinput
370
+    set id = #{record.id,jdbcType=INTEGER},
371
+      device_type = #{record.deviceType,jdbcType=INTEGER},
372
+      device_name = #{record.deviceName,jdbcType=VARCHAR},
373
+      model = #{record.model,jdbcType=VARCHAR},
374
+      use_count = #{record.useCount,jdbcType=INTEGER},
375
+      device_manager = #{record.deviceManager,jdbcType=VARCHAR},
376
+      input_time = #{record.inputTime,jdbcType=TIMESTAMP},
377
+      number = #{record.number,jdbcType=VARCHAR},
378
+      unit = #{record.unit,jdbcType=VARCHAR},
379
+      device_price = #{record.devicePrice,jdbcType=DECIMAL},
380
+      storage_rack = #{record.storageRack,jdbcType=VARCHAR},
381
+      storage_rack_cell = #{record.storageRackCell,jdbcType=VARCHAR},
382
+      handler = #{record.handler,jdbcType=VARCHAR},
383
+      book_keeper = #{record.bookKeeper,jdbcType=VARCHAR},
384
+      producer = #{record.producer,jdbcType=VARCHAR},
385
+      remark = #{record.remark,jdbcType=VARCHAR},
386
+      service_life = #{record.serviceLife,jdbcType=DECIMAL},
387
+      parent_id = #{record.parentId,jdbcType=INTEGER},
388
+      position = #{record.position,jdbcType=VARCHAR},
389
+      status = #{record.status,jdbcType=INTEGER},
390
+      broken_count = #{record.brokenCount,jdbcType=INTEGER},
391
+      produce_time = #{record.produceTime,jdbcType=TIMESTAMP},
392
+      org_id = #{record.orgId,jdbcType=INTEGER}
393
+    <if test="_parameter != null" >
394
+      <include refid="Update_By_Example_Where_Clause" />
395
+    </if>
396
+  </update>
397
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.StorageDeviceinput" >
398
+    update storage_deviceinput
399
+    <set >
400
+      <if test="deviceType != null" >
401
+        device_type = #{deviceType,jdbcType=INTEGER},
402
+      </if>
403
+      <if test="deviceName != null" >
404
+        device_name = #{deviceName,jdbcType=VARCHAR},
405
+      </if>
406
+      <if test="model != null" >
407
+        model = #{model,jdbcType=VARCHAR},
408
+      </if>
409
+      <if test="useCount != null" >
410
+        use_count = #{useCount,jdbcType=INTEGER},
411
+      </if>
412
+      <if test="deviceManager != null" >
413
+        device_manager = #{deviceManager,jdbcType=VARCHAR},
414
+      </if>
415
+      <if test="inputTime != null" >
416
+        input_time = #{inputTime,jdbcType=TIMESTAMP},
417
+      </if>
418
+      <if test="number != null" >
419
+        number = #{number,jdbcType=VARCHAR},
420
+      </if>
421
+      <if test="unit != null" >
422
+        unit = #{unit,jdbcType=VARCHAR},
423
+      </if>
424
+      <if test="devicePrice != null" >
425
+        device_price = #{devicePrice,jdbcType=DECIMAL},
426
+      </if>
427
+      <if test="storageRack != null" >
428
+        storage_rack = #{storageRack,jdbcType=VARCHAR},
429
+      </if>
430
+      <if test="storageRackCell != null" >
431
+        storage_rack_cell = #{storageRackCell,jdbcType=VARCHAR},
432
+      </if>
433
+      <if test="handler != null" >
434
+        handler = #{handler,jdbcType=VARCHAR},
435
+      </if>
436
+      <if test="bookKeeper != null" >
437
+        book_keeper = #{bookKeeper,jdbcType=VARCHAR},
438
+      </if>
439
+      <if test="producer != null" >
440
+        producer = #{producer,jdbcType=VARCHAR},
441
+      </if>
442
+      <if test="remark != null" >
443
+        remark = #{remark,jdbcType=VARCHAR},
444
+      </if>
445
+      <if test="serviceLife != null" >
446
+        service_life = #{serviceLife,jdbcType=DECIMAL},
447
+      </if>
448
+      <if test="parentId != null" >
449
+        parent_id = #{parentId,jdbcType=INTEGER},
450
+      </if>
451
+      <if test="position != null" >
452
+        position = #{position,jdbcType=VARCHAR},
453
+      </if>
454
+      <if test="status != null" >
455
+        status = #{status,jdbcType=INTEGER},
456
+      </if>
457
+      <if test="brokenCount != null" >
458
+        broken_count = #{brokenCount,jdbcType=INTEGER},
459
+      </if>
460
+      <if test="produceTime != null" >
461
+        produce_time = #{produceTime,jdbcType=TIMESTAMP},
462
+      </if>
463
+      <if test="orgId != null" >
464
+        org_id = #{orgId,jdbcType=INTEGER},
465
+      </if>
466
+    </set>
467
+    where id = #{id,jdbcType=INTEGER}
468
+  </update>
469
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.StorageDeviceinput" >
470
+    update storage_deviceinput
471
+    set device_type = #{deviceType,jdbcType=INTEGER},
472
+      device_name = #{deviceName,jdbcType=VARCHAR},
473
+      model = #{model,jdbcType=VARCHAR},
474
+      use_count = #{useCount,jdbcType=INTEGER},
475
+      device_manager = #{deviceManager,jdbcType=VARCHAR},
476
+      input_time = #{inputTime,jdbcType=TIMESTAMP},
477
+      number = #{number,jdbcType=VARCHAR},
478
+      unit = #{unit,jdbcType=VARCHAR},
479
+      device_price = #{devicePrice,jdbcType=DECIMAL},
480
+      storage_rack = #{storageRack,jdbcType=VARCHAR},
481
+      storage_rack_cell = #{storageRackCell,jdbcType=VARCHAR},
482
+      handler = #{handler,jdbcType=VARCHAR},
483
+      book_keeper = #{bookKeeper,jdbcType=VARCHAR},
484
+      producer = #{producer,jdbcType=VARCHAR},
485
+      remark = #{remark,jdbcType=VARCHAR},
486
+      service_life = #{serviceLife,jdbcType=DECIMAL},
487
+      parent_id = #{parentId,jdbcType=INTEGER},
488
+      position = #{position,jdbcType=VARCHAR},
489
+      status = #{status,jdbcType=INTEGER},
490
+      broken_count = #{brokenCount,jdbcType=INTEGER},
491
+      produce_time = #{produceTime,jdbcType=TIMESTAMP},
492
+      org_id = #{orgId,jdbcType=INTEGER}
493
+    where id = #{id,jdbcType=INTEGER}
494
+  </update>
495
+  
496
+  <!-- 自定义sql -->
497
+
498
+   <select id="getHouseList" resultType="com.chinaitop.depot.device.model.HouseNameBean">
499
+
500
+  	select s.depot_id depotId,b.storehouse_name storeName from storage_deviceinput s left join basic_storehouse b on s.depot_id=b.storehouse_id GROUP BY s.depot_id;
501
+
502
+   </select>
503
+
504
+  
505
+
506
+  <select id="getTypeList" parameterType="java.lang.Integer" resultType="com.chinaitop.depot.device.model.HouseTypeBean">
507
+
508
+  	select s.depot_id depotId,s.device_type deviceType,cc.enumName enumName from storage_deviceinput s left join basic_enum cc on cc.enumId = s.device_type where s.depot_id = #{depotId};
509
+
510
+  </select>
511
+
512
+  
513
+
514
+  <select id="getNameList" parameterType="java.lang.Integer" resultType="com.chinaitop.depot.device.model.ShelfContentBean">
515
+
516
+    select DISTINCT (be.enumName),sd.device_name from storage_deviceinput sd left join basic_enum be on be.enumId=sd.device_name  where device_type=#{deviceTypeId} and `status`!=1 and use_count!=0;
517
+
518
+   </select>
519
+
520
+  
521
+
522
+  <select id="getcontentGetList" parameterType="java.util.Map" resultType="com.chinaitop.depot.device.model.ContentBean">
523
+
524
+  	select s.device_type deviceType,s.device_name deviceName,s.model model,s.number number,s.use_count useCount from storage_deviceinput s where s.device_name = #{deviceName};
525
+
526
+  </select>
527
+
528
+  
529
+
530
+  <select id="getShelfGetList" parameterType="java.lang.String" resultType="com.chinaitop.depot.device.model.ContentBean">
531
+
532
+    select shelf_id shelfId,id  from basic_equipment_equipment_pool bee
533
+
534
+	where id in 
535
+
536
+	(select sd.storage_rack from storage_deviceinput sd left join basic_enum be on be.enumId=sd.device_name 
537
+
538
+	WHERE sd.device_name in (select enumId from basic_enum where enumName=#{deviceName}))
539
+
540
+  </select>
541
+
542
+  
543
+
544
+  <select id="getDeviceInputList" parameterType="java.lang.Integer" resultMap="BaseResultMap">
545
+
546
+    select  DISTINCT(device_name)  from storage_deviceinput where depot_id=#{depotId}; 
547
+
548
+  </select>
549
+
550
+  
551
+
552
+  <select id="getModelList" parameterType="java.lang.String" resultMap="BaseResultMap">
553
+
554
+   select  DISTINCT(model) from storage_deviceinput where device_name=#{deviceName};
555
+
556
+  </select>
557
+
558
+  
559
+
560
+  <select id="getNumberList" parameterType="java.lang.String" resultMap="BaseResultMap">
561
+
562
+   select number from storage_deviceinput where model=#{deviceModel};
563
+
564
+  </select>
565
+
566
+  
567
+
568
+  <select id="getCountList" parameterType="java.lang.String" resultMap="BaseResultMap">
569
+
570
+   select use_count,broken_count from storage_deviceinput where number=#{number};
571
+
572
+  </select>
573
+
574
+  
575
+
576
+   <select id="getAllList" parameterType="java.lang.String" resultMap="BaseResultMap">
577
+
578
+   select  <include refid="Base_Column_List" /> from storage_deviceinput where number=#{number};
579
+
580
+  </select>
581
+
582
+  
583
+
584
+   <select id="getModelGetList" parameterType="java.util.Map" resultMap="BaseResultMap">
585
+
586
+   select distinct sd.model from storage_deviceinput sd where device_name In (select enumId from basic_enum where  enumName=#{deviceName}) and 
587
+
588
+   storage_rack IN (select id  from basic_equipment_equipment_pool bee where shelf_id=#{storageRack}) ;
589
+
590
+  </select>
591
+
592
+  
593
+
594
+   <select id="getNumberGetList" parameterType="java.util.Map" resultMap="BaseResultMap">
595
+
596
+   select <include refid="Base_Column_List" /> from storage_deviceinput where model=#{model} and device_type=#{deviceTypeId} and
597
+    device_name In (select enumId from basic_enum where  enumName=#{deviceName}) and 
598
+    storage_rack IN (select id  from basic_equipment_equipment_pool where shelf_id=#{shelfId}) and org_id=#{orgId}; 
599
+
600
+  </select>
601
+
602
+  
603
+
604
+   <select id="getUseCountGetList" parameterType="java.lang.String" resultMap="BaseResultMap">
605
+
606
+   select <include refid="Base_Column_List" /> from storage_deviceinput where number=#{number};
607
+
608
+  </select>
609
+
610
+  
611
+
612
+   <select id="getUseCount" parameterType="java.util.Map" resultMap="BaseResultMap">
613
+
614
+   select <include refid="Base_Column_List" /> from storage_deviceinput where number=#{number} and model=#{model}
615
+    and device_type=#{deviceTypeId} and
616
+    device_name In (select enumId from basic_enum where  enumName=#{deviceName}) and 
617
+    storage_rack IN (select id  from basic_equipment_equipment_pool where shelf_id=#{shelfId}) and org_id=#{orgId};
618
+
619
+  </select>
620
+
621
+  
622
+
623
+  
624
+
625
+  
626
+
627
+  
628
+
629
+  <resultMap id="DeviceInputMap" type="com.chinaitop.depot.device.model.StorageDeviceinput">
630
+
631
+    <result column="device_name" jdbcType="VARCHAR" property="deviceName" />
632
+
633
+    <result column="inputDeviceName" jdbcType="VARCHAR" property="inputDeviceName" />
634
+
635
+    </resultMap>
636
+
637
+  
638
+
639
+  <select id="getdevieName" resultMap="DeviceInputMap">
640
+
641
+     select distinct d.device_name,d.device_type,b.enumName inputDeviceName from storage_deviceinput d left join basic_enum  b on  b.enumId=d.device_name where `status`=0 and device_type=5476 and use_count!=0
642
+
643
+  </select>
644
+
645
+  
646
+
647
+  <select id="getRepairNameList" resultMap="DeviceInputMap">
648
+
649
+	select distinct d.device_name,d.device_type,b.enumName inputDeviceName from storage_deviceinput d left join basic_enum  b on  b.enumId=d.device_name where `status`=5 and device_type=5476 and broken_count!=0
650
+
651
+  </select>
652
+
653
+  
654
+
655
+  <select id="getDeviceModelList" parameterType="java.lang.String" resultType="com.chinaitop.depot.device.model.StorageDeviceinput">
656
+
657
+    select  model,number,use_count from storage_deviceinput where device_name=#{deviceName} and `status`=0
658
+
659
+  </select>
660
+
661
+  
662
+
663
+  <select id="getDeviceModelRepair" parameterType="java.lang.String" resultType="com.chinaitop.depot.device.model.StorageDeviceinput">
664
+
665
+    select  model,number,use_count from storage_deviceinput where device_name=#{deviceName} and `status`=5
666
+
667
+  </select>
668
+
669
+  
670
+
671
+  <!-- <select id="getDeviceModelListRepair" parameterType="java.lang.String" resultType="com.chinaitop.depot.device.model.StorageDeviceinput">
672
+
673
+    select  model,number,use_count from storage_deviceinput where device_name=#{deviceName} and `status`=5
674
+
675
+  </select> -->
676
+  
677
+  
678
+  <!-- 每个类型的入库数量 -->
679
+  <select id="queryCountByType"  resultType="java.util.Map">
680
+
681
+    SELECT
682
+		SUM(use_count) userCounts,
683
+		sum(device_manager) sumCounts,
684
+		IFNULL(SUM(broken_count), 0) brokenCount,
685
+		device_type
686
+    FROM
687
+	    storage_deviceinput
688
+    GROUP BY
689
+	    device_type
690
+    ORDER BY
691
+	    device_type ASC
692
+    
693
+  </select>
694
+
695
+  
696
+
697
+   <!-- 设备数据 -->
698
+
699
+  <select id="queryDevice" resultMap="BaseResultMap" parameterType="map">
700
+
701
+		 SELECT
702
+
703
+			<include refid="Base_Column_List" />
704
+
705
+		FROM
706
+
707
+			storage_deviceinput where device_type=5476  order by status asc
708
+
709
+  </select>
710
+  
711
+  <!-- 台账 -->
712
+  <select id="queryDeviceAccount" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.StorageDeviceinputExample" >
713
+    SELECT
714
+	id,
715
+	device_type,
716
+	device_name,
717
+	model,
718
+	SUM(use_count) use_count,
719
+	SUM(broken_count) broken_count
720
+FROM
721
+	storage_deviceinput
722
+	<if test="_parameter != null" >
723
+      <include refid="Example_Where_Clause" />
724
+    </if>
725
+GROUP BY
726
+	model,
727
+	device_name,
728
+	device_type
729
+    <if test="orderByClause != null" >
730
+      order by ${orderByClause}
731
+    </if>
732
+  </select>
733
+</mapper>

+ 32 - 0
src/main/java/com/chinaitop/depot/device/mapper/StorageDevicekeepMapper.java

@@ -0,0 +1,32 @@
1
+package com.chinaitop.depot.device.mapper;
2
+
3
+import com.chinaitop.depot.device.model.StorageDevicekeep;
4
+import com.chinaitop.depot.device.model.StorageDevicekeepExample;
5
+import java.util.List;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+public interface StorageDevicekeepMapper {
9
+    int countByExample(StorageDevicekeepExample example);
10
+
11
+    int deleteByExample(StorageDevicekeepExample example);
12
+
13
+    int deleteByPrimaryKey(Integer id);
14
+
15
+    int insert(StorageDevicekeep record);
16
+
17
+    int insertSelective(StorageDevicekeep record);
18
+
19
+    List<StorageDevicekeep> selectByExample(StorageDevicekeepExample example);
20
+
21
+    StorageDevicekeep selectByPrimaryKey(Integer id);
22
+
23
+    int updateByExampleSelective(@Param("record") StorageDevicekeep record, @Param("example") StorageDevicekeepExample example);
24
+
25
+    int updateByExample(@Param("record") StorageDevicekeep record, @Param("example") StorageDevicekeepExample example);
26
+
27
+    int updateByPrimaryKeySelective(StorageDevicekeep record);
28
+
29
+    int updateByPrimaryKey(StorageDevicekeep record);
30
+    
31
+    List<StorageDevicekeep> selectEnumNameList();
32
+}

+ 310 - 0
src/main/java/com/chinaitop/depot/device/mapper/StorageDevicekeepMapper.xml

@@ -0,0 +1,310 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.device.mapper.StorageDevicekeepMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.StorageDevicekeep" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
7
+    <result column="device_name" property="deviceName" jdbcType="VARCHAR" />
8
+    <result column="model" property="model" jdbcType="VARCHAR" />
9
+    <result column="keep_start" property="keepStart" jdbcType="TIMESTAMP" />
10
+    <result column="keep_end" property="keepEnd" jdbcType="TIMESTAMP" />
11
+    <result column="keeper" property="keeper" jdbcType="VARCHAR" />
12
+    <result column="device_manager" property="deviceManager" jdbcType="VARCHAR" />
13
+    <result column="number" property="number" jdbcType="VARCHAR" />
14
+    <result column="keep_status" property="keepStatus" jdbcType="INTEGER" />
15
+    <result column="input_id" property="inputId" jdbcType="INTEGER" />
16
+  </resultMap>
17
+  <sql id="Example_Where_Clause" >
18
+    <where >
19
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
20
+        <if test="criteria.valid" >
21
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
22
+            <foreach collection="criteria.criteria" item="criterion" >
23
+              <choose >
24
+                <when test="criterion.noValue" >
25
+                  and ${criterion.condition}
26
+                </when>
27
+                <when test="criterion.singleValue" >
28
+                  and ${criterion.condition} #{criterion.value}
29
+                </when>
30
+                <when test="criterion.betweenValue" >
31
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
32
+                </when>
33
+                <when test="criterion.listValue" >
34
+                  and ${criterion.condition}
35
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
36
+                    #{listItem}
37
+                  </foreach>
38
+                </when>
39
+              </choose>
40
+            </foreach>
41
+          </trim>
42
+        </if>
43
+      </foreach>
44
+    </where>
45
+  </sql>
46
+  <sql id="Update_By_Example_Where_Clause" >
47
+    <where >
48
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
49
+        <if test="criteria.valid" >
50
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
51
+            <foreach collection="criteria.criteria" item="criterion" >
52
+              <choose >
53
+                <when test="criterion.noValue" >
54
+                  and ${criterion.condition}
55
+                </when>
56
+                <when test="criterion.singleValue" >
57
+                  and ${criterion.condition} #{criterion.value}
58
+                </when>
59
+                <when test="criterion.betweenValue" >
60
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
61
+                </when>
62
+                <when test="criterion.listValue" >
63
+                  and ${criterion.condition}
64
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
65
+                    #{listItem}
66
+                  </foreach>
67
+                </when>
68
+              </choose>
69
+            </foreach>
70
+          </trim>
71
+        </if>
72
+      </foreach>
73
+    </where>
74
+  </sql>
75
+  <sql id="Base_Column_List" >
76
+    id, org_id, device_name, model, keep_start, keep_end, keeper, device_manager, number, 
77
+    keep_status, input_id
78
+  </sql>
79
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.StorageDevicekeepExample" >
80
+    select
81
+    <if test="distinct" >
82
+      distinct
83
+    </if>
84
+    <include refid="Base_Column_List" />
85
+    from storage_devicekeep
86
+    <if test="_parameter != null" >
87
+      <include refid="Example_Where_Clause" />
88
+    </if>
89
+    <if test="orderByClause != null" >
90
+      order by ${orderByClause}
91
+    </if>
92
+  </select>
93
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
94
+    select 
95
+    <include refid="Base_Column_List" />
96
+    from storage_devicekeep
97
+    where id = #{id,jdbcType=INTEGER}
98
+  </select>
99
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
100
+    delete from storage_devicekeep
101
+    where id = #{id,jdbcType=INTEGER}
102
+  </delete>
103
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicekeepExample" >
104
+    delete from storage_devicekeep
105
+    <if test="_parameter != null" >
106
+      <include refid="Example_Where_Clause" />
107
+    </if>
108
+  </delete>
109
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.StorageDevicekeep" >
110
+    insert into storage_devicekeep (id, org_id, device_name, 
111
+      model, keep_start, keep_end, 
112
+      keeper, device_manager, number, 
113
+      keep_status, input_id)
114
+    values (#{id,jdbcType=INTEGER}, #{orgId,jdbcType=INTEGER}, #{deviceName,jdbcType=VARCHAR}, 
115
+      #{model,jdbcType=VARCHAR}, #{keepStart,jdbcType=TIMESTAMP}, #{keepEnd,jdbcType=TIMESTAMP}, 
116
+      #{keeper,jdbcType=VARCHAR}, #{deviceManager,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, 
117
+      #{keepStatus,jdbcType=INTEGER}, #{inputId,jdbcType=INTEGER})
118
+  </insert>
119
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.StorageDevicekeep" >
120
+    insert into storage_devicekeep
121
+    <trim prefix="(" suffix=")" suffixOverrides="," >
122
+      <if test="id != null" >
123
+        id,
124
+      </if>
125
+      <if test="orgId != null" >
126
+        org_id,
127
+      </if>
128
+      <if test="deviceName != null" >
129
+        device_name,
130
+      </if>
131
+      <if test="model != null" >
132
+        model,
133
+      </if>
134
+      <if test="keepStart != null" >
135
+        keep_start,
136
+      </if>
137
+      <if test="keepEnd != null" >
138
+        keep_end,
139
+      </if>
140
+      <if test="keeper != null" >
141
+        keeper,
142
+      </if>
143
+      <if test="deviceManager != null" >
144
+        device_manager,
145
+      </if>
146
+      <if test="number != null" >
147
+        number,
148
+      </if>
149
+      <if test="keepStatus != null" >
150
+        keep_status,
151
+      </if>
152
+      <if test="inputId != null" >
153
+        input_id,
154
+      </if>
155
+    </trim>
156
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
157
+      <if test="id != null" >
158
+        #{id,jdbcType=INTEGER},
159
+      </if>
160
+      <if test="orgId != null" >
161
+        #{orgId,jdbcType=INTEGER},
162
+      </if>
163
+      <if test="deviceName != null" >
164
+        #{deviceName,jdbcType=VARCHAR},
165
+      </if>
166
+      <if test="model != null" >
167
+        #{model,jdbcType=VARCHAR},
168
+      </if>
169
+      <if test="keepStart != null" >
170
+        #{keepStart,jdbcType=TIMESTAMP},
171
+      </if>
172
+      <if test="keepEnd != null" >
173
+        #{keepEnd,jdbcType=TIMESTAMP},
174
+      </if>
175
+      <if test="keeper != null" >
176
+        #{keeper,jdbcType=VARCHAR},
177
+      </if>
178
+      <if test="deviceManager != null" >
179
+        #{deviceManager,jdbcType=VARCHAR},
180
+      </if>
181
+      <if test="number != null" >
182
+        #{number,jdbcType=VARCHAR},
183
+      </if>
184
+      <if test="keepStatus != null" >
185
+        #{keepStatus,jdbcType=INTEGER},
186
+      </if>
187
+      <if test="inputId != null" >
188
+        #{inputId,jdbcType=INTEGER},
189
+      </if>
190
+    </trim>
191
+  </insert>
192
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicekeepExample" resultType="java.lang.Integer" >
193
+    select count(*) from storage_devicekeep
194
+    <if test="_parameter != null" >
195
+      <include refid="Example_Where_Clause" />
196
+    </if>
197
+  </select>
198
+  <update id="updateByExampleSelective" parameterType="map" >
199
+    update storage_devicekeep
200
+    <set >
201
+      <if test="record.id != null" >
202
+        id = #{record.id,jdbcType=INTEGER},
203
+      </if>
204
+      <if test="record.orgId != null" >
205
+        org_id = #{record.orgId,jdbcType=INTEGER},
206
+      </if>
207
+      <if test="record.deviceName != null" >
208
+        device_name = #{record.deviceName,jdbcType=VARCHAR},
209
+      </if>
210
+      <if test="record.model != null" >
211
+        model = #{record.model,jdbcType=VARCHAR},
212
+      </if>
213
+      <if test="record.keepStart != null" >
214
+        keep_start = #{record.keepStart,jdbcType=TIMESTAMP},
215
+      </if>
216
+      <if test="record.keepEnd != null" >
217
+        keep_end = #{record.keepEnd,jdbcType=TIMESTAMP},
218
+      </if>
219
+      <if test="record.keeper != null" >
220
+        keeper = #{record.keeper,jdbcType=VARCHAR},
221
+      </if>
222
+      <if test="record.deviceManager != null" >
223
+        device_manager = #{record.deviceManager,jdbcType=VARCHAR},
224
+      </if>
225
+      <if test="record.number != null" >
226
+        number = #{record.number,jdbcType=VARCHAR},
227
+      </if>
228
+      <if test="record.keepStatus != null" >
229
+        keep_status = #{record.keepStatus,jdbcType=INTEGER},
230
+      </if>
231
+      <if test="record.inputId != null" >
232
+        input_id = #{record.inputId,jdbcType=INTEGER},
233
+      </if>
234
+    </set>
235
+    <if test="_parameter != null" >
236
+      <include refid="Update_By_Example_Where_Clause" />
237
+    </if>
238
+  </update>
239
+  <update id="updateByExample" parameterType="map" >
240
+    update storage_devicekeep
241
+    set id = #{record.id,jdbcType=INTEGER},
242
+      org_id = #{record.orgId,jdbcType=INTEGER},
243
+      device_name = #{record.deviceName,jdbcType=VARCHAR},
244
+      model = #{record.model,jdbcType=VARCHAR},
245
+      keep_start = #{record.keepStart,jdbcType=TIMESTAMP},
246
+      keep_end = #{record.keepEnd,jdbcType=TIMESTAMP},
247
+      keeper = #{record.keeper,jdbcType=VARCHAR},
248
+      device_manager = #{record.deviceManager,jdbcType=VARCHAR},
249
+      number = #{record.number,jdbcType=VARCHAR},
250
+      keep_status = #{record.keepStatus,jdbcType=INTEGER},
251
+      input_id = #{record.inputId,jdbcType=INTEGER}
252
+    <if test="_parameter != null" >
253
+      <include refid="Update_By_Example_Where_Clause" />
254
+    </if>
255
+  </update>
256
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.StorageDevicekeep" >
257
+    update storage_devicekeep
258
+    <set >
259
+      <if test="orgId != null" >
260
+        org_id = #{orgId,jdbcType=INTEGER},
261
+      </if>
262
+      <if test="deviceName != null" >
263
+        device_name = #{deviceName,jdbcType=VARCHAR},
264
+      </if>
265
+      <if test="model != null" >
266
+        model = #{model,jdbcType=VARCHAR},
267
+      </if>
268
+      <if test="keepStart != null" >
269
+        keep_start = #{keepStart,jdbcType=TIMESTAMP},
270
+      </if>
271
+      <if test="keepEnd != null" >
272
+        keep_end = #{keepEnd,jdbcType=TIMESTAMP},
273
+      </if>
274
+      <if test="keeper != null" >
275
+        keeper = #{keeper,jdbcType=VARCHAR},
276
+      </if>
277
+      <if test="deviceManager != null" >
278
+        device_manager = #{deviceManager,jdbcType=VARCHAR},
279
+      </if>
280
+      <if test="number != null" >
281
+        number = #{number,jdbcType=VARCHAR},
282
+      </if>
283
+      <if test="keepStatus != null" >
284
+        keep_status = #{keepStatus,jdbcType=INTEGER},
285
+      </if>
286
+      <if test="inputId != null" >
287
+        input_id = #{inputId,jdbcType=INTEGER},
288
+      </if>
289
+    </set>
290
+    where id = #{id,jdbcType=INTEGER}
291
+  </update>
292
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.StorageDevicekeep" >
293
+    update storage_devicekeep
294
+    set org_id = #{orgId,jdbcType=INTEGER},
295
+      device_name = #{deviceName,jdbcType=VARCHAR},
296
+      model = #{model,jdbcType=VARCHAR},
297
+      keep_start = #{keepStart,jdbcType=TIMESTAMP},
298
+      keep_end = #{keepEnd,jdbcType=TIMESTAMP},
299
+      keeper = #{keeper,jdbcType=VARCHAR},
300
+      device_manager = #{deviceManager,jdbcType=VARCHAR},
301
+      number = #{number,jdbcType=VARCHAR},
302
+      keep_status = #{keepStatus,jdbcType=INTEGER},
303
+      input_id = #{inputId,jdbcType=INTEGER}
304
+    where id = #{id,jdbcType=INTEGER}
305
+  </update>
306
+  
307
+  <select id="selectEnumNameList" resultType="com.chinaitop.depot.device.model.StorageDevicekeep">
308
+     select enumId deviceName,enumName from basic_enum where enumId in (select device_name from storage_deviceinput);
309
+  </select>
310
+</mapper>

+ 30 - 0
src/main/java/com/chinaitop/depot/device/mapper/StorageDevicerepairMapper.java

@@ -0,0 +1,30 @@
1
+package com.chinaitop.depot.device.mapper;
2
+
3
+import com.chinaitop.depot.device.model.StorageDevicerepair;
4
+import com.chinaitop.depot.device.model.StorageDevicerepairExample;
5
+import java.util.List;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+public interface StorageDevicerepairMapper {
9
+    int countByExample(StorageDevicerepairExample example);
10
+
11
+    int deleteByExample(StorageDevicerepairExample example);
12
+
13
+    int deleteByPrimaryKey(Integer id);
14
+
15
+    int insert(StorageDevicerepair record);
16
+
17
+    int insertSelective(StorageDevicerepair record);
18
+
19
+    List<StorageDevicerepair> selectByExample(StorageDevicerepairExample example);
20
+
21
+    StorageDevicerepair selectByPrimaryKey(Integer id);
22
+
23
+    int updateByExampleSelective(@Param("record") StorageDevicerepair record, @Param("example") StorageDevicerepairExample example);
24
+
25
+    int updateByExample(@Param("record") StorageDevicerepair record, @Param("example") StorageDevicerepairExample example);
26
+
27
+    int updateByPrimaryKeySelective(StorageDevicerepair record);
28
+
29
+    int updateByPrimaryKey(StorageDevicerepair record);
30
+}

+ 338 - 0
src/main/java/com/chinaitop/depot/device/mapper/StorageDevicerepairMapper.xml

@@ -0,0 +1,338 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.device.mapper.StorageDevicerepairMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.StorageDevicerepair" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
7
+    <result column="device_name" property="deviceName" jdbcType="VARCHAR" />
8
+    <result column="model" property="model" jdbcType="VARCHAR" />
9
+    <result column="number" property="number" jdbcType="VARCHAR" />
10
+    <result column="repair_start" property="repairStart" jdbcType="TIMESTAMP" />
11
+    <result column="repair_end" property="repairEnd" jdbcType="TIMESTAMP" />
12
+    <result column="repairer" property="repairer" jdbcType="VARCHAR" />
13
+    <result column="device_manager" property="deviceManager" jdbcType="VARCHAR" />
14
+    <result column="repair_sumnumber" property="repairSumnumber" jdbcType="INTEGER" />
15
+    <result column="repair_status" property="repairStatus" jdbcType="INTEGER" />
16
+    <result column="repair_number" property="repairNumber" jdbcType="INTEGER" />
17
+    <result column="remark" property="remark" jdbcType="VARCHAR" />
18
+  </resultMap>
19
+  <sql id="Example_Where_Clause" >
20
+    <where >
21
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
22
+        <if test="criteria.valid" >
23
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
24
+            <foreach collection="criteria.criteria" item="criterion" >
25
+              <choose >
26
+                <when test="criterion.noValue" >
27
+                  and ${criterion.condition}
28
+                </when>
29
+                <when test="criterion.singleValue" >
30
+                  and ${criterion.condition} #{criterion.value}
31
+                </when>
32
+                <when test="criterion.betweenValue" >
33
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
34
+                </when>
35
+                <when test="criterion.listValue" >
36
+                  and ${criterion.condition}
37
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
38
+                    #{listItem}
39
+                  </foreach>
40
+                </when>
41
+              </choose>
42
+            </foreach>
43
+          </trim>
44
+        </if>
45
+      </foreach>
46
+    </where>
47
+  </sql>
48
+  <sql id="Update_By_Example_Where_Clause" >
49
+    <where >
50
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
51
+        <if test="criteria.valid" >
52
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
53
+            <foreach collection="criteria.criteria" item="criterion" >
54
+              <choose >
55
+                <when test="criterion.noValue" >
56
+                  and ${criterion.condition}
57
+                </when>
58
+                <when test="criterion.singleValue" >
59
+                  and ${criterion.condition} #{criterion.value}
60
+                </when>
61
+                <when test="criterion.betweenValue" >
62
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
63
+                </when>
64
+                <when test="criterion.listValue" >
65
+                  and ${criterion.condition}
66
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
67
+                    #{listItem}
68
+                  </foreach>
69
+                </when>
70
+              </choose>
71
+            </foreach>
72
+          </trim>
73
+        </if>
74
+      </foreach>
75
+    </where>
76
+  </sql>
77
+  <sql id="Base_Column_List" >
78
+    id, org_id, device_name, model, number, repair_start, repair_end, repairer, device_manager, 
79
+    repair_sumnumber, repair_status, repair_number, remark
80
+  </sql>
81
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.StorageDevicerepairExample" >
82
+    select
83
+    <if test="distinct" >
84
+      distinct
85
+    </if>
86
+    <include refid="Base_Column_List" />
87
+    from storage_devicerepair
88
+    <if test="_parameter != null" >
89
+      <include refid="Example_Where_Clause" />
90
+    </if>
91
+    <if test="orderByClause != null" >
92
+      order by ${orderByClause}
93
+    </if>
94
+  </select>
95
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
96
+    select 
97
+    <include refid="Base_Column_List" />
98
+    from storage_devicerepair
99
+    where id = #{id,jdbcType=INTEGER}
100
+  </select>
101
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
102
+    delete from storage_devicerepair
103
+    where id = #{id,jdbcType=INTEGER}
104
+  </delete>
105
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicerepairExample" >
106
+    delete from storage_devicerepair
107
+    <if test="_parameter != null" >
108
+      <include refid="Example_Where_Clause" />
109
+    </if>
110
+  </delete>
111
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.StorageDevicerepair" >
112
+    insert into storage_devicerepair (id, org_id, device_name, 
113
+      model, number, repair_start, 
114
+      repair_end, repairer, device_manager, 
115
+      repair_sumnumber, repair_status, repair_number, 
116
+      remark)
117
+    values (#{id,jdbcType=INTEGER}, #{orgId,jdbcType=INTEGER}, #{deviceName,jdbcType=VARCHAR}, 
118
+      #{model,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, #{repairStart,jdbcType=TIMESTAMP}, 
119
+      #{repairEnd,jdbcType=TIMESTAMP}, #{repairer,jdbcType=VARCHAR}, #{deviceManager,jdbcType=VARCHAR}, 
120
+      #{repairSumnumber,jdbcType=INTEGER}, #{repairStatus,jdbcType=INTEGER}, #{repairNumber,jdbcType=INTEGER}, 
121
+      #{remark,jdbcType=VARCHAR})
122
+  </insert>
123
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.StorageDevicerepair" >
124
+    insert into storage_devicerepair
125
+    <trim prefix="(" suffix=")" suffixOverrides="," >
126
+      <if test="id != null" >
127
+        id,
128
+      </if>
129
+      <if test="orgId != null" >
130
+        org_id,
131
+      </if>
132
+      <if test="deviceName != null" >
133
+        device_name,
134
+      </if>
135
+      <if test="model != null" >
136
+        model,
137
+      </if>
138
+      <if test="number != null" >
139
+        number,
140
+      </if>
141
+      <if test="repairStart != null" >
142
+        repair_start,
143
+      </if>
144
+      <if test="repairEnd != null" >
145
+        repair_end,
146
+      </if>
147
+      <if test="repairer != null" >
148
+        repairer,
149
+      </if>
150
+      <if test="deviceManager != null" >
151
+        device_manager,
152
+      </if>
153
+      <if test="repairSumnumber != null" >
154
+        repair_sumnumber,
155
+      </if>
156
+      <if test="repairStatus != null" >
157
+        repair_status,
158
+      </if>
159
+      <if test="repairNumber != null" >
160
+        repair_number,
161
+      </if>
162
+      <if test="remark != null" >
163
+        remark,
164
+      </if>
165
+    </trim>
166
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
167
+      <if test="id != null" >
168
+        #{id,jdbcType=INTEGER},
169
+      </if>
170
+      <if test="orgId != null" >
171
+        #{orgId,jdbcType=INTEGER},
172
+      </if>
173
+      <if test="deviceName != null" >
174
+        #{deviceName,jdbcType=VARCHAR},
175
+      </if>
176
+      <if test="model != null" >
177
+        #{model,jdbcType=VARCHAR},
178
+      </if>
179
+      <if test="number != null" >
180
+        #{number,jdbcType=VARCHAR},
181
+      </if>
182
+      <if test="repairStart != null" >
183
+        #{repairStart,jdbcType=TIMESTAMP},
184
+      </if>
185
+      <if test="repairEnd != null" >
186
+        #{repairEnd,jdbcType=TIMESTAMP},
187
+      </if>
188
+      <if test="repairer != null" >
189
+        #{repairer,jdbcType=VARCHAR},
190
+      </if>
191
+      <if test="deviceManager != null" >
192
+        #{deviceManager,jdbcType=VARCHAR},
193
+      </if>
194
+      <if test="repairSumnumber != null" >
195
+        #{repairSumnumber,jdbcType=INTEGER},
196
+      </if>
197
+      <if test="repairStatus != null" >
198
+        #{repairStatus,jdbcType=INTEGER},
199
+      </if>
200
+      <if test="repairNumber != null" >
201
+        #{repairNumber,jdbcType=INTEGER},
202
+      </if>
203
+      <if test="remark != null" >
204
+        #{remark,jdbcType=VARCHAR},
205
+      </if>
206
+    </trim>
207
+  </insert>
208
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.StorageDevicerepairExample" resultType="java.lang.Integer" >
209
+    select count(*) from storage_devicerepair
210
+    <if test="_parameter != null" >
211
+      <include refid="Example_Where_Clause" />
212
+    </if>
213
+  </select>
214
+  <update id="updateByExampleSelective" parameterType="map" >
215
+    update storage_devicerepair
216
+    <set >
217
+      <if test="record.id != null" >
218
+        id = #{record.id,jdbcType=INTEGER},
219
+      </if>
220
+      <if test="record.orgId != null" >
221
+        org_id = #{record.orgId,jdbcType=INTEGER},
222
+      </if>
223
+      <if test="record.deviceName != null" >
224
+        device_name = #{record.deviceName,jdbcType=VARCHAR},
225
+      </if>
226
+      <if test="record.model != null" >
227
+        model = #{record.model,jdbcType=VARCHAR},
228
+      </if>
229
+      <if test="record.number != null" >
230
+        number = #{record.number,jdbcType=VARCHAR},
231
+      </if>
232
+      <if test="record.repairStart != null" >
233
+        repair_start = #{record.repairStart,jdbcType=TIMESTAMP},
234
+      </if>
235
+      <if test="record.repairEnd != null" >
236
+        repair_end = #{record.repairEnd,jdbcType=TIMESTAMP},
237
+      </if>
238
+      <if test="record.repairer != null" >
239
+        repairer = #{record.repairer,jdbcType=VARCHAR},
240
+      </if>
241
+      <if test="record.deviceManager != null" >
242
+        device_manager = #{record.deviceManager,jdbcType=VARCHAR},
243
+      </if>
244
+      <if test="record.repairSumnumber != null" >
245
+        repair_sumnumber = #{record.repairSumnumber,jdbcType=INTEGER},
246
+      </if>
247
+      <if test="record.repairStatus != null" >
248
+        repair_status = #{record.repairStatus,jdbcType=INTEGER},
249
+      </if>
250
+      <if test="record.repairNumber != null" >
251
+        repair_number = #{record.repairNumber,jdbcType=INTEGER},
252
+      </if>
253
+      <if test="record.remark != null" >
254
+        remark = #{record.remark,jdbcType=VARCHAR},
255
+      </if>
256
+    </set>
257
+    <if test="_parameter != null" >
258
+      <include refid="Update_By_Example_Where_Clause" />
259
+    </if>
260
+  </update>
261
+  <update id="updateByExample" parameterType="map" >
262
+    update storage_devicerepair
263
+    set id = #{record.id,jdbcType=INTEGER},
264
+      org_id = #{record.orgId,jdbcType=INTEGER},
265
+      device_name = #{record.deviceName,jdbcType=VARCHAR},
266
+      model = #{record.model,jdbcType=VARCHAR},
267
+      number = #{record.number,jdbcType=VARCHAR},
268
+      repair_start = #{record.repairStart,jdbcType=TIMESTAMP},
269
+      repair_end = #{record.repairEnd,jdbcType=TIMESTAMP},
270
+      repairer = #{record.repairer,jdbcType=VARCHAR},
271
+      device_manager = #{record.deviceManager,jdbcType=VARCHAR},
272
+      repair_sumnumber = #{record.repairSumnumber,jdbcType=INTEGER},
273
+      repair_status = #{record.repairStatus,jdbcType=INTEGER},
274
+      repair_number = #{record.repairNumber,jdbcType=INTEGER},
275
+      remark = #{record.remark,jdbcType=VARCHAR}
276
+    <if test="_parameter != null" >
277
+      <include refid="Update_By_Example_Where_Clause" />
278
+    </if>
279
+  </update>
280
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.StorageDevicerepair" >
281
+    update storage_devicerepair
282
+    <set >
283
+      <if test="orgId != null" >
284
+        org_id = #{orgId,jdbcType=INTEGER},
285
+      </if>
286
+      <if test="deviceName != null" >
287
+        device_name = #{deviceName,jdbcType=VARCHAR},
288
+      </if>
289
+      <if test="model != null" >
290
+        model = #{model,jdbcType=VARCHAR},
291
+      </if>
292
+      <if test="number != null" >
293
+        number = #{number,jdbcType=VARCHAR},
294
+      </if>
295
+      <if test="repairStart != null" >
296
+        repair_start = #{repairStart,jdbcType=TIMESTAMP},
297
+      </if>
298
+      <if test="repairEnd != null" >
299
+        repair_end = #{repairEnd,jdbcType=TIMESTAMP},
300
+      </if>
301
+      <if test="repairer != null" >
302
+        repairer = #{repairer,jdbcType=VARCHAR},
303
+      </if>
304
+      <if test="deviceManager != null" >
305
+        device_manager = #{deviceManager,jdbcType=VARCHAR},
306
+      </if>
307
+      <if test="repairSumnumber != null" >
308
+        repair_sumnumber = #{repairSumnumber,jdbcType=INTEGER},
309
+      </if>
310
+      <if test="repairStatus != null" >
311
+        repair_status = #{repairStatus,jdbcType=INTEGER},
312
+      </if>
313
+      <if test="repairNumber != null" >
314
+        repair_number = #{repairNumber,jdbcType=INTEGER},
315
+      </if>
316
+      <if test="remark != null" >
317
+        remark = #{remark,jdbcType=VARCHAR},
318
+      </if>
319
+    </set>
320
+    where id = #{id,jdbcType=INTEGER}
321
+  </update>
322
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.StorageDevicerepair" >
323
+    update storage_devicerepair
324
+    set org_id = #{orgId,jdbcType=INTEGER},
325
+      device_name = #{deviceName,jdbcType=VARCHAR},
326
+      model = #{model,jdbcType=VARCHAR},
327
+      number = #{number,jdbcType=VARCHAR},
328
+      repair_start = #{repairStart,jdbcType=TIMESTAMP},
329
+      repair_end = #{repairEnd,jdbcType=TIMESTAMP},
330
+      repairer = #{repairer,jdbcType=VARCHAR},
331
+      device_manager = #{deviceManager,jdbcType=VARCHAR},
332
+      repair_sumnumber = #{repairSumnumber,jdbcType=INTEGER},
333
+      repair_status = #{repairStatus,jdbcType=INTEGER},
334
+      repair_number = #{repairNumber,jdbcType=INTEGER},
335
+      remark = #{remark,jdbcType=VARCHAR}
336
+    where id = #{id,jdbcType=INTEGER}
337
+  </update>
338
+</mapper>

+ 31 - 0
src/main/java/com/chinaitop/depot/device/mapper/SystemLogMapper.java

@@ -0,0 +1,31 @@
1
+package com.chinaitop.depot.device.mapper;
2
+
3
+import com.chinaitop.depot.device.model.SystemLog;
4
+import com.chinaitop.depot.device.model.SystemLogExample;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+import java.util.List;
8
+
9
+public interface SystemLogMapper {
10
+    int countByExample(SystemLogExample example);
11
+
12
+    int deleteByExample(SystemLogExample example);
13
+
14
+    int deleteByPrimaryKey(String id);
15
+
16
+    int insert(SystemLog record);
17
+
18
+    int insertSelective(SystemLog record);
19
+
20
+    List<SystemLog> selectByExample(SystemLogExample example);
21
+
22
+    SystemLog selectByPrimaryKey(String id);
23
+
24
+    int updateByExampleSelective(@Param("record") SystemLog record, @Param("example") SystemLogExample example);
25
+
26
+    int updateByExample(@Param("record") SystemLog record, @Param("example") SystemLogExample example);
27
+
28
+    int updateByPrimaryKeySelective(SystemLog record);
29
+
30
+    int updateByPrimaryKey(SystemLog record);
31
+}

+ 465 - 0
src/main/java/com/chinaitop/depot/device/mapper/SystemLogMapper.xml

@@ -0,0 +1,465 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.device.mapper.SystemLogMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.SystemLog" >
5
+    <id column="id" property="id" jdbcType="VARCHAR" />
6
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
7
+    <result column="user_id" property="userId" jdbcType="INTEGER" />
8
+    <result column="user_zh" property="userZh" jdbcType="VARCHAR" />
9
+    <result column="user_name" property="userName" jdbcType="VARCHAR" />
10
+    <result column="user_role" property="userRole" jdbcType="VARCHAR" />
11
+    <result column="user_address" property="userAddress" jdbcType="VARCHAR" />
12
+    <result column="dl_time" property="dlTime" jdbcType="TIMESTAMP" />
13
+    <result column="zx_time" property="zxTime" jdbcType="TIMESTAMP" />
14
+    <result column="func_id" property="funcId" jdbcType="INTEGER" />
15
+    <result column="func_name" property="funcName" jdbcType="VARCHAR" />
16
+    <result column="btn_id" property="btnId" jdbcType="INTEGER" />
17
+    <result column="method_name" property="methodName" jdbcType="VARCHAR" />
18
+    <result column="oper_result" property="operResult" jdbcType="VARCHAR" />
19
+    <result column="parameter" property="parameter" jdbcType="VARCHAR" />
20
+    <result column="rtn_param" property="rtnParam" jdbcType="VARCHAR" />
21
+    <result column="describes" property="describes" jdbcType="VARCHAR" />
22
+    <result column="type" property="type" jdbcType="VARCHAR" />
23
+    <result column="device_ip" property="deviceIp" jdbcType="VARCHAR" />
24
+    <result column="system_identify" property="systemIdentify" jdbcType="VARCHAR" />
25
+    <result column="operation_time" property="operationTime" jdbcType="TIMESTAMP" />
26
+  </resultMap>
27
+  <sql id="Example_Where_Clause" >
28
+    <where >
29
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
30
+        <if test="criteria.valid" >
31
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
32
+            <foreach collection="criteria.criteria" item="criterion" >
33
+              <choose >
34
+                <when test="criterion.noValue" >
35
+                  and ${criterion.condition}
36
+                </when>
37
+                <when test="criterion.singleValue" >
38
+                  and ${criterion.condition} #{criterion.value}
39
+                </when>
40
+                <when test="criterion.betweenValue" >
41
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
42
+                </when>
43
+                <when test="criterion.listValue" >
44
+                  and ${criterion.condition}
45
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
46
+                    #{listItem}
47
+                  </foreach>
48
+                </when>
49
+              </choose>
50
+            </foreach>
51
+          </trim>
52
+        </if>
53
+      </foreach>
54
+    </where>
55
+  </sql>
56
+  <sql id="Update_By_Example_Where_Clause" >
57
+    <where >
58
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
59
+        <if test="criteria.valid" >
60
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
61
+            <foreach collection="criteria.criteria" item="criterion" >
62
+              <choose >
63
+                <when test="criterion.noValue" >
64
+                  and ${criterion.condition}
65
+                </when>
66
+                <when test="criterion.singleValue" >
67
+                  and ${criterion.condition} #{criterion.value}
68
+                </when>
69
+                <when test="criterion.betweenValue" >
70
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
71
+                </when>
72
+                <when test="criterion.listValue" >
73
+                  and ${criterion.condition}
74
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
75
+                    #{listItem}
76
+                  </foreach>
77
+                </when>
78
+              </choose>
79
+            </foreach>
80
+          </trim>
81
+        </if>
82
+      </foreach>
83
+    </where>
84
+  </sql>
85
+  <sql id="Base_Column_List" >
86
+    id, org_id, user_id, user_zh, user_name, user_role, user_address, dl_time, zx_time, 
87
+    func_id, func_name, btn_id, method_name, oper_result, parameter, rtn_param, describes, 
88
+    type, device_ip, system_identify, operation_time
89
+  </sql>
90
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.SystemLogExample" >
91
+    select
92
+    <if test="distinct" >
93
+      distinct
94
+    </if>
95
+    <include refid="Base_Column_List" />
96
+    from system_log
97
+    <if test="_parameter != null" >
98
+      <include refid="Example_Where_Clause" />
99
+    </if>
100
+    <if test="orderByClause != null" >
101
+      order by ${orderByClause}
102
+    </if>
103
+  </select>
104
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
105
+    select 
106
+    <include refid="Base_Column_List" />
107
+    from system_log
108
+    where id = #{id,jdbcType=VARCHAR}
109
+  </select>
110
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
111
+    delete from system_log
112
+    where id = #{id,jdbcType=VARCHAR}
113
+  </delete>
114
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.SystemLogExample" >
115
+    delete from system_log
116
+    <if test="_parameter != null" >
117
+      <include refid="Example_Where_Clause" />
118
+    </if>
119
+  </delete>
120
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.SystemLog" >
121
+    insert into system_log (id, org_id, user_id, 
122
+      user_zh, user_name, user_role, 
123
+      user_address, dl_time, zx_time, 
124
+      func_id, func_name, btn_id, 
125
+      method_name, oper_result, parameter, 
126
+      rtn_param, describes, type, 
127
+      device_ip, system_identify, operation_time
128
+      )
129
+    values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, 
130
+      #{userZh,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{userRole,jdbcType=VARCHAR}, 
131
+      #{userAddress,jdbcType=VARCHAR}, #{dlTime,jdbcType=TIMESTAMP}, #{zxTime,jdbcType=TIMESTAMP}, 
132
+      #{funcId,jdbcType=INTEGER}, #{funcName,jdbcType=VARCHAR}, #{btnId,jdbcType=INTEGER}, 
133
+      #{methodName,jdbcType=VARCHAR}, #{operResult,jdbcType=VARCHAR}, #{parameter,jdbcType=VARCHAR}, 
134
+      #{rtnParam,jdbcType=VARCHAR}, #{describes,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, 
135
+      #{deviceIp,jdbcType=VARCHAR}, #{systemIdentify,jdbcType=VARCHAR}, #{operationTime,jdbcType=TIMESTAMP}
136
+      )
137
+  </insert>
138
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.SystemLog" >
139
+    insert into system_log
140
+    <trim prefix="(" suffix=")" suffixOverrides="," >
141
+      <if test="id != null" >
142
+        id,
143
+      </if>
144
+      <if test="orgId != null" >
145
+        org_id,
146
+      </if>
147
+      <if test="userId != null" >
148
+        user_id,
149
+      </if>
150
+      <if test="userZh != null" >
151
+        user_zh,
152
+      </if>
153
+      <if test="userName != null" >
154
+        user_name,
155
+      </if>
156
+      <if test="userRole != null" >
157
+        user_role,
158
+      </if>
159
+      <if test="userAddress != null" >
160
+        user_address,
161
+      </if>
162
+      <if test="dlTime != null" >
163
+        dl_time,
164
+      </if>
165
+      <if test="zxTime != null" >
166
+        zx_time,
167
+      </if>
168
+      <if test="funcId != null" >
169
+        func_id,
170
+      </if>
171
+      <if test="funcName != null" >
172
+        func_name,
173
+      </if>
174
+      <if test="btnId != null" >
175
+        btn_id,
176
+      </if>
177
+      <if test="methodName != null" >
178
+        method_name,
179
+      </if>
180
+      <if test="operResult != null" >
181
+        oper_result,
182
+      </if>
183
+      <if test="parameter != null" >
184
+        parameter,
185
+      </if>
186
+      <if test="rtnParam != null" >
187
+        rtn_param,
188
+      </if>
189
+      <if test="describes != null" >
190
+        describes,
191
+      </if>
192
+      <if test="type != null" >
193
+        type,
194
+      </if>
195
+      <if test="deviceIp != null" >
196
+        device_ip,
197
+      </if>
198
+      <if test="systemIdentify != null" >
199
+        system_identify,
200
+      </if>
201
+      <if test="operationTime != null" >
202
+        operation_time,
203
+      </if>
204
+    </trim>
205
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
206
+      <if test="id != null" >
207
+        #{id,jdbcType=VARCHAR},
208
+      </if>
209
+      <if test="orgId != null" >
210
+        #{orgId,jdbcType=INTEGER},
211
+      </if>
212
+      <if test="userId != null" >
213
+        #{userId,jdbcType=INTEGER},
214
+      </if>
215
+      <if test="userZh != null" >
216
+        #{userZh,jdbcType=VARCHAR},
217
+      </if>
218
+      <if test="userName != null" >
219
+        #{userName,jdbcType=VARCHAR},
220
+      </if>
221
+      <if test="userRole != null" >
222
+        #{userRole,jdbcType=VARCHAR},
223
+      </if>
224
+      <if test="userAddress != null" >
225
+        #{userAddress,jdbcType=VARCHAR},
226
+      </if>
227
+      <if test="dlTime != null" >
228
+        #{dlTime,jdbcType=TIMESTAMP},
229
+      </if>
230
+      <if test="zxTime != null" >
231
+        #{zxTime,jdbcType=TIMESTAMP},
232
+      </if>
233
+      <if test="funcId != null" >
234
+        #{funcId,jdbcType=INTEGER},
235
+      </if>
236
+      <if test="funcName != null" >
237
+        #{funcName,jdbcType=VARCHAR},
238
+      </if>
239
+      <if test="btnId != null" >
240
+        #{btnId,jdbcType=INTEGER},
241
+      </if>
242
+      <if test="methodName != null" >
243
+        #{methodName,jdbcType=VARCHAR},
244
+      </if>
245
+      <if test="operResult != null" >
246
+        #{operResult,jdbcType=VARCHAR},
247
+      </if>
248
+      <if test="parameter != null" >
249
+        #{parameter,jdbcType=VARCHAR},
250
+      </if>
251
+      <if test="rtnParam != null" >
252
+        #{rtnParam,jdbcType=VARCHAR},
253
+      </if>
254
+      <if test="describes != null" >
255
+        #{describes,jdbcType=VARCHAR},
256
+      </if>
257
+      <if test="type != null" >
258
+        #{type,jdbcType=VARCHAR},
259
+      </if>
260
+      <if test="deviceIp != null" >
261
+        #{deviceIp,jdbcType=VARCHAR},
262
+      </if>
263
+      <if test="systemIdentify != null" >
264
+        #{systemIdentify,jdbcType=VARCHAR},
265
+      </if>
266
+      <if test="operationTime != null" >
267
+        #{operationTime,jdbcType=TIMESTAMP},
268
+      </if>
269
+    </trim>
270
+  </insert>
271
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.SystemLogExample" resultType="java.lang.Integer" >
272
+    select count(*) from system_log
273
+    <if test="_parameter != null" >
274
+      <include refid="Example_Where_Clause" />
275
+    </if>
276
+  </select>
277
+  <update id="updateByExampleSelective" parameterType="map" >
278
+    update system_log
279
+    <set >
280
+      <if test="record.id != null" >
281
+        id = #{record.id,jdbcType=VARCHAR},
282
+      </if>
283
+      <if test="record.orgId != null" >
284
+        org_id = #{record.orgId,jdbcType=INTEGER},
285
+      </if>
286
+      <if test="record.userId != null" >
287
+        user_id = #{record.userId,jdbcType=INTEGER},
288
+      </if>
289
+      <if test="record.userZh != null" >
290
+        user_zh = #{record.userZh,jdbcType=VARCHAR},
291
+      </if>
292
+      <if test="record.userName != null" >
293
+        user_name = #{record.userName,jdbcType=VARCHAR},
294
+      </if>
295
+      <if test="record.userRole != null" >
296
+        user_role = #{record.userRole,jdbcType=VARCHAR},
297
+      </if>
298
+      <if test="record.userAddress != null" >
299
+        user_address = #{record.userAddress,jdbcType=VARCHAR},
300
+      </if>
301
+      <if test="record.dlTime != null" >
302
+        dl_time = #{record.dlTime,jdbcType=TIMESTAMP},
303
+      </if>
304
+      <if test="record.zxTime != null" >
305
+        zx_time = #{record.zxTime,jdbcType=TIMESTAMP},
306
+      </if>
307
+      <if test="record.funcId != null" >
308
+        func_id = #{record.funcId,jdbcType=INTEGER},
309
+      </if>
310
+      <if test="record.funcName != null" >
311
+        func_name = #{record.funcName,jdbcType=VARCHAR},
312
+      </if>
313
+      <if test="record.btnId != null" >
314
+        btn_id = #{record.btnId,jdbcType=INTEGER},
315
+      </if>
316
+      <if test="record.methodName != null" >
317
+        method_name = #{record.methodName,jdbcType=VARCHAR},
318
+      </if>
319
+      <if test="record.operResult != null" >
320
+        oper_result = #{record.operResult,jdbcType=VARCHAR},
321
+      </if>
322
+      <if test="record.parameter != null" >
323
+        parameter = #{record.parameter,jdbcType=VARCHAR},
324
+      </if>
325
+      <if test="record.rtnParam != null" >
326
+        rtn_param = #{record.rtnParam,jdbcType=VARCHAR},
327
+      </if>
328
+      <if test="record.describes != null" >
329
+        describes = #{record.describes,jdbcType=VARCHAR},
330
+      </if>
331
+      <if test="record.type != null" >
332
+        type = #{record.type,jdbcType=VARCHAR},
333
+      </if>
334
+      <if test="record.deviceIp != null" >
335
+        device_ip = #{record.deviceIp,jdbcType=VARCHAR},
336
+      </if>
337
+      <if test="record.systemIdentify != null" >
338
+        system_identify = #{record.systemIdentify,jdbcType=VARCHAR},
339
+      </if>
340
+      <if test="record.operationTime != null" >
341
+        operation_time = #{record.operationTime,jdbcType=TIMESTAMP},
342
+      </if>
343
+    </set>
344
+    <if test="_parameter != null" >
345
+      <include refid="Update_By_Example_Where_Clause" />
346
+    </if>
347
+  </update>
348
+  <update id="updateByExample" parameterType="map" >
349
+    update system_log
350
+    set id = #{record.id,jdbcType=VARCHAR},
351
+      org_id = #{record.orgId,jdbcType=INTEGER},
352
+      user_id = #{record.userId,jdbcType=INTEGER},
353
+      user_zh = #{record.userZh,jdbcType=VARCHAR},
354
+      user_name = #{record.userName,jdbcType=VARCHAR},
355
+      user_role = #{record.userRole,jdbcType=VARCHAR},
356
+      user_address = #{record.userAddress,jdbcType=VARCHAR},
357
+      dl_time = #{record.dlTime,jdbcType=TIMESTAMP},
358
+      zx_time = #{record.zxTime,jdbcType=TIMESTAMP},
359
+      func_id = #{record.funcId,jdbcType=INTEGER},
360
+      func_name = #{record.funcName,jdbcType=VARCHAR},
361
+      btn_id = #{record.btnId,jdbcType=INTEGER},
362
+      method_name = #{record.methodName,jdbcType=VARCHAR},
363
+      oper_result = #{record.operResult,jdbcType=VARCHAR},
364
+      parameter = #{record.parameter,jdbcType=VARCHAR},
365
+      rtn_param = #{record.rtnParam,jdbcType=VARCHAR},
366
+      describes = #{record.describes,jdbcType=VARCHAR},
367
+      type = #{record.type,jdbcType=VARCHAR},
368
+      device_ip = #{record.deviceIp,jdbcType=VARCHAR},
369
+      system_identify = #{record.systemIdentify,jdbcType=VARCHAR},
370
+      operation_time = #{record.operationTime,jdbcType=TIMESTAMP}
371
+    <if test="_parameter != null" >
372
+      <include refid="Update_By_Example_Where_Clause" />
373
+    </if>
374
+  </update>
375
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.SystemLog" >
376
+    update system_log
377
+    <set >
378
+      <if test="orgId != null" >
379
+        org_id = #{orgId,jdbcType=INTEGER},
380
+      </if>
381
+      <if test="userId != null" >
382
+        user_id = #{userId,jdbcType=INTEGER},
383
+      </if>
384
+      <if test="userZh != null" >
385
+        user_zh = #{userZh,jdbcType=VARCHAR},
386
+      </if>
387
+      <if test="userName != null" >
388
+        user_name = #{userName,jdbcType=VARCHAR},
389
+      </if>
390
+      <if test="userRole != null" >
391
+        user_role = #{userRole,jdbcType=VARCHAR},
392
+      </if>
393
+      <if test="userAddress != null" >
394
+        user_address = #{userAddress,jdbcType=VARCHAR},
395
+      </if>
396
+      <if test="dlTime != null" >
397
+        dl_time = #{dlTime,jdbcType=TIMESTAMP},
398
+      </if>
399
+      <if test="zxTime != null" >
400
+        zx_time = #{zxTime,jdbcType=TIMESTAMP},
401
+      </if>
402
+      <if test="funcId != null" >
403
+        func_id = #{funcId,jdbcType=INTEGER},
404
+      </if>
405
+      <if test="funcName != null" >
406
+        func_name = #{funcName,jdbcType=VARCHAR},
407
+      </if>
408
+      <if test="btnId != null" >
409
+        btn_id = #{btnId,jdbcType=INTEGER},
410
+      </if>
411
+      <if test="methodName != null" >
412
+        method_name = #{methodName,jdbcType=VARCHAR},
413
+      </if>
414
+      <if test="operResult != null" >
415
+        oper_result = #{operResult,jdbcType=VARCHAR},
416
+      </if>
417
+      <if test="parameter != null" >
418
+        parameter = #{parameter,jdbcType=VARCHAR},
419
+      </if>
420
+      <if test="rtnParam != null" >
421
+        rtn_param = #{rtnParam,jdbcType=VARCHAR},
422
+      </if>
423
+      <if test="describes != null" >
424
+        describes = #{describes,jdbcType=VARCHAR},
425
+      </if>
426
+      <if test="type != null" >
427
+        type = #{type,jdbcType=VARCHAR},
428
+      </if>
429
+      <if test="deviceIp != null" >
430
+        device_ip = #{deviceIp,jdbcType=VARCHAR},
431
+      </if>
432
+      <if test="systemIdentify != null" >
433
+        system_identify = #{systemIdentify,jdbcType=VARCHAR},
434
+      </if>
435
+      <if test="operationTime != null" >
436
+        operation_time = #{operationTime,jdbcType=TIMESTAMP},
437
+      </if>
438
+    </set>
439
+    where id = #{id,jdbcType=VARCHAR}
440
+  </update>
441
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.SystemLog" >
442
+    update system_log
443
+    set org_id = #{orgId,jdbcType=INTEGER},
444
+      user_id = #{userId,jdbcType=INTEGER},
445
+      user_zh = #{userZh,jdbcType=VARCHAR},
446
+      user_name = #{userName,jdbcType=VARCHAR},
447
+      user_role = #{userRole,jdbcType=VARCHAR},
448
+      user_address = #{userAddress,jdbcType=VARCHAR},
449
+      dl_time = #{dlTime,jdbcType=TIMESTAMP},
450
+      zx_time = #{zxTime,jdbcType=TIMESTAMP},
451
+      func_id = #{funcId,jdbcType=INTEGER},
452
+      func_name = #{funcName,jdbcType=VARCHAR},
453
+      btn_id = #{btnId,jdbcType=INTEGER},
454
+      method_name = #{methodName,jdbcType=VARCHAR},
455
+      oper_result = #{operResult,jdbcType=VARCHAR},
456
+      parameter = #{parameter,jdbcType=VARCHAR},
457
+      rtn_param = #{rtnParam,jdbcType=VARCHAR},
458
+      describes = #{describes,jdbcType=VARCHAR},
459
+      type = #{type,jdbcType=VARCHAR},
460
+      device_ip = #{deviceIp,jdbcType=VARCHAR},
461
+      system_identify = #{systemIdentify,jdbcType=VARCHAR},
462
+      operation_time = #{operationTime,jdbcType=TIMESTAMP}
463
+    where id = #{id,jdbcType=VARCHAR}
464
+  </update>
465
+</mapper>

+ 149 - 0
src/main/java/com/chinaitop/depot/device/model/BasicEquipmentEquipmentPool.java

@@ -0,0 +1,149 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+import java.util.Date;
4
+
5
+public class BasicEquipmentEquipmentPool {
6
+    private Integer id;
7
+
8
+    private Integer orgId;
9
+
10
+    private String putPosition;
11
+
12
+    private String shelfId;
13
+
14
+    private String warehouseId;
15
+
16
+    private String remark;
17
+
18
+    private Integer inputPersonId;
19
+
20
+    private Date inputDate;
21
+
22
+    /**
23
+     * 主键ID
24
+     * @return id 主键ID
25
+     */
26
+    public Integer getId() {
27
+        return id;
28
+    }
29
+
30
+    /**
31
+     * 主键ID
32
+     * @param id 主键ID
33
+     */
34
+    public void setId(Integer id) {
35
+        this.id = id;
36
+    }
37
+
38
+    /**
39
+     * 单位ID(粮库ID)
40
+     * @return org_id 单位ID(粮库ID)
41
+     */
42
+    public Integer getOrgId() {
43
+        return orgId;
44
+    }
45
+
46
+    /**
47
+     * 单位ID(粮库ID)
48
+     * @param orgId 单位ID(粮库ID)
49
+     */
50
+    public void setOrgId(Integer orgId) {
51
+        this.orgId = orgId;
52
+    }
53
+
54
+    /**
55
+     * 存放区域
56
+     * @return put_position 存放区域
57
+     */
58
+    public String getPutPosition() {
59
+        return putPosition;
60
+    }
61
+
62
+    /**
63
+     * 存放区域
64
+     * @param putPosition 存放区域
65
+     */
66
+    public void setPutPosition(String putPosition) {
67
+        this.putPosition = putPosition == null ? null : putPosition.trim();
68
+    }
69
+
70
+    /**
71
+     * 货架号
72
+     * @return shelf_id 货架号
73
+     */
74
+    public String getShelfId() {
75
+        return shelfId;
76
+    }
77
+
78
+    /**
79
+     * 货架号
80
+     * @param shelfId 货架号
81
+     */
82
+    public void setShelfId(String shelfId) {
83
+        this.shelfId = shelfId == null ? null : shelfId.trim();
84
+    }
85
+
86
+    /**
87
+     * 货位号
88
+     * @return warehouse_id 货位号
89
+     */
90
+    public String getWarehouseId() {
91
+        return warehouseId;
92
+    }
93
+
94
+    /**
95
+     * 货位号
96
+     * @param warehouseId 货位号
97
+     */
98
+    public void setWarehouseId(String warehouseId) {
99
+        this.warehouseId = warehouseId == null ? null : warehouseId.trim();
100
+    }
101
+
102
+    /**
103
+     * 备注
104
+     * @return remark 备注
105
+     */
106
+    public String getRemark() {
107
+        return remark;
108
+    }
109
+
110
+    /**
111
+     * 备注
112
+     * @param remark 备注
113
+     */
114
+    public void setRemark(String remark) {
115
+        this.remark = remark == null ? null : remark.trim();
116
+    }
117
+
118
+    /**
119
+     * 录入人
120
+     * @return input_person_id 录入人
121
+     */
122
+    public Integer getInputPersonId() {
123
+        return inputPersonId;
124
+    }
125
+
126
+    /**
127
+     * 录入人
128
+     * @param inputPersonId 录入人
129
+     */
130
+    public void setInputPersonId(Integer inputPersonId) {
131
+        this.inputPersonId = inputPersonId;
132
+    }
133
+
134
+    /**
135
+     * 录入时间
136
+     * @return input_date 录入时间
137
+     */
138
+    public Date getInputDate() {
139
+        return inputDate;
140
+    }
141
+
142
+    /**
143
+     * 录入时间
144
+     * @param inputDate 录入时间
145
+     */
146
+    public void setInputDate(Date inputDate) {
147
+        this.inputDate = inputDate;
148
+    }
149
+}

+ 739 - 0
src/main/java/com/chinaitop/depot/device/model/BasicEquipmentEquipmentPoolExample.java

@@ -0,0 +1,739 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+import java.util.ArrayList;
4
+import java.util.Date;
5
+import java.util.List;
6
+
7
+public class BasicEquipmentEquipmentPoolExample {
8
+    /**
9
+     * basic_equipment_equipment_pool
10
+     */
11
+    protected String orderByClause;
12
+
13
+    /**
14
+     * basic_equipment_equipment_pool
15
+     */
16
+    protected boolean distinct;
17
+
18
+    /**
19
+     * basic_equipment_equipment_pool
20
+     */
21
+    protected List<Criteria> oredCriteria;
22
+
23
+    public BasicEquipmentEquipmentPoolExample() {
24
+        oredCriteria = new ArrayList<Criteria>();
25
+    }
26
+
27
+    public void setOrderByClause(String orderByClause) {
28
+        this.orderByClause = orderByClause;
29
+    }
30
+
31
+    public String getOrderByClause() {
32
+        return orderByClause;
33
+    }
34
+
35
+    public void setDistinct(boolean distinct) {
36
+        this.distinct = distinct;
37
+    }
38
+
39
+    public boolean isDistinct() {
40
+        return distinct;
41
+    }
42
+
43
+    public List<Criteria> getOredCriteria() {
44
+        return oredCriteria;
45
+    }
46
+
47
+    public void or(Criteria criteria) {
48
+        oredCriteria.add(criteria);
49
+    }
50
+
51
+    public Criteria or() {
52
+        Criteria criteria = createCriteriaInternal();
53
+        oredCriteria.add(criteria);
54
+        return criteria;
55
+    }
56
+
57
+    public Criteria createCriteria() {
58
+        Criteria criteria = createCriteriaInternal();
59
+        if (oredCriteria.size() == 0) {
60
+            oredCriteria.add(criteria);
61
+        }
62
+        return criteria;
63
+    }
64
+
65
+    protected Criteria createCriteriaInternal() {
66
+        Criteria criteria = new Criteria();
67
+        return criteria;
68
+    }
69
+
70
+    public void clear() {
71
+        oredCriteria.clear();
72
+        orderByClause = null;
73
+        distinct = false;
74
+    }
75
+
76
+    /**
77
+     * basic_equipment_equipment_pool 2017-12-23
78
+     */
79
+    protected abstract static class GeneratedCriteria {
80
+        protected List<Criterion> criteria;
81
+
82
+        protected GeneratedCriteria() {
83
+            super();
84
+            criteria = new ArrayList<Criterion>();
85
+        }
86
+
87
+        public boolean isValid() {
88
+            return criteria.size() > 0;
89
+        }
90
+
91
+        public List<Criterion> getAllCriteria() {
92
+            return criteria;
93
+        }
94
+
95
+        public List<Criterion> getCriteria() {
96
+            return criteria;
97
+        }
98
+
99
+        protected void addCriterion(String condition) {
100
+            if (condition == null) {
101
+                throw new RuntimeException("Value for condition cannot be null");
102
+            }
103
+            criteria.add(new Criterion(condition));
104
+        }
105
+
106
+        protected void addCriterion(String condition, Object value, String property) {
107
+            if (value == null) {
108
+                throw new RuntimeException("Value for " + property + " cannot be null");
109
+            }
110
+            criteria.add(new Criterion(condition, value));
111
+        }
112
+
113
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
114
+            if (value1 == null || value2 == null) {
115
+                throw new RuntimeException("Between values for " + property + " cannot be null");
116
+            }
117
+            criteria.add(new Criterion(condition, value1, value2));
118
+        }
119
+
120
+        public Criteria andIdIsNull() {
121
+            addCriterion("id is null");
122
+            return (Criteria) this;
123
+        }
124
+
125
+        public Criteria andIdIsNotNull() {
126
+            addCriterion("id is not null");
127
+            return (Criteria) this;
128
+        }
129
+
130
+        public Criteria andIdEqualTo(Integer value) {
131
+            addCriterion("id =", value, "id");
132
+            return (Criteria) this;
133
+        }
134
+
135
+        public Criteria andIdNotEqualTo(Integer value) {
136
+            addCriterion("id <>", value, "id");
137
+            return (Criteria) this;
138
+        }
139
+
140
+        public Criteria andIdGreaterThan(Integer value) {
141
+            addCriterion("id >", value, "id");
142
+            return (Criteria) this;
143
+        }
144
+
145
+        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
146
+            addCriterion("id >=", value, "id");
147
+            return (Criteria) this;
148
+        }
149
+
150
+        public Criteria andIdLessThan(Integer value) {
151
+            addCriterion("id <", value, "id");
152
+            return (Criteria) this;
153
+        }
154
+
155
+        public Criteria andIdLessThanOrEqualTo(Integer value) {
156
+            addCriterion("id <=", value, "id");
157
+            return (Criteria) this;
158
+        }
159
+
160
+        public Criteria andIdIn(List<Integer> values) {
161
+            addCriterion("id in", values, "id");
162
+            return (Criteria) this;
163
+        }
164
+
165
+        public Criteria andIdNotIn(List<Integer> values) {
166
+            addCriterion("id not in", values, "id");
167
+            return (Criteria) this;
168
+        }
169
+
170
+        public Criteria andIdBetween(Integer value1, Integer value2) {
171
+            addCriterion("id between", value1, value2, "id");
172
+            return (Criteria) this;
173
+        }
174
+
175
+        public Criteria andIdNotBetween(Integer value1, Integer value2) {
176
+            addCriterion("id not between", value1, value2, "id");
177
+            return (Criteria) this;
178
+        }
179
+
180
+        public Criteria andOrgIdIsNull() {
181
+            addCriterion("org_id is null");
182
+            return (Criteria) this;
183
+        }
184
+
185
+        public Criteria andOrgIdIsNotNull() {
186
+            addCriterion("org_id is not null");
187
+            return (Criteria) this;
188
+        }
189
+
190
+        public Criteria andOrgIdEqualTo(Integer value) {
191
+            addCriterion("org_id =", value, "orgId");
192
+            return (Criteria) this;
193
+        }
194
+
195
+        public Criteria andOrgIdNotEqualTo(Integer value) {
196
+            addCriterion("org_id <>", value, "orgId");
197
+            return (Criteria) this;
198
+        }
199
+
200
+        public Criteria andOrgIdGreaterThan(Integer value) {
201
+            addCriterion("org_id >", value, "orgId");
202
+            return (Criteria) this;
203
+        }
204
+
205
+        public Criteria andOrgIdGreaterThanOrEqualTo(Integer value) {
206
+            addCriterion("org_id >=", value, "orgId");
207
+            return (Criteria) this;
208
+        }
209
+
210
+        public Criteria andOrgIdLessThan(Integer value) {
211
+            addCriterion("org_id <", value, "orgId");
212
+            return (Criteria) this;
213
+        }
214
+
215
+        public Criteria andOrgIdLessThanOrEqualTo(Integer value) {
216
+            addCriterion("org_id <=", value, "orgId");
217
+            return (Criteria) this;
218
+        }
219
+
220
+        public Criteria andOrgIdIn(List<Integer> values) {
221
+            addCriterion("org_id in", values, "orgId");
222
+            return (Criteria) this;
223
+        }
224
+
225
+        public Criteria andOrgIdNotIn(List<Integer> values) {
226
+            addCriterion("org_id not in", values, "orgId");
227
+            return (Criteria) this;
228
+        }
229
+
230
+        public Criteria andOrgIdBetween(Integer value1, Integer value2) {
231
+            addCriterion("org_id between", value1, value2, "orgId");
232
+            return (Criteria) this;
233
+        }
234
+
235
+        public Criteria andOrgIdNotBetween(Integer value1, Integer value2) {
236
+            addCriterion("org_id not between", value1, value2, "orgId");
237
+            return (Criteria) this;
238
+        }
239
+
240
+        public Criteria andPutPositionIsNull() {
241
+            addCriterion("put_position is null");
242
+            return (Criteria) this;
243
+        }
244
+
245
+        public Criteria andPutPositionIsNotNull() {
246
+            addCriterion("put_position is not null");
247
+            return (Criteria) this;
248
+        }
249
+
250
+        public Criteria andPutPositionEqualTo(String value) {
251
+            addCriterion("put_position =", value, "putPosition");
252
+            return (Criteria) this;
253
+        }
254
+
255
+        public Criteria andPutPositionNotEqualTo(String value) {
256
+            addCriterion("put_position <>", value, "putPosition");
257
+            return (Criteria) this;
258
+        }
259
+
260
+        public Criteria andPutPositionGreaterThan(String value) {
261
+            addCriterion("put_position >", value, "putPosition");
262
+            return (Criteria) this;
263
+        }
264
+
265
+        public Criteria andPutPositionGreaterThanOrEqualTo(String value) {
266
+            addCriterion("put_position >=", value, "putPosition");
267
+            return (Criteria) this;
268
+        }
269
+
270
+        public Criteria andPutPositionLessThan(String value) {
271
+            addCriterion("put_position <", value, "putPosition");
272
+            return (Criteria) this;
273
+        }
274
+
275
+        public Criteria andPutPositionLessThanOrEqualTo(String value) {
276
+            addCriterion("put_position <=", value, "putPosition");
277
+            return (Criteria) this;
278
+        }
279
+
280
+        public Criteria andPutPositionLike(String value) {
281
+            addCriterion("put_position like", value, "putPosition");
282
+            return (Criteria) this;
283
+        }
284
+
285
+        public Criteria andPutPositionNotLike(String value) {
286
+            addCriterion("put_position not like", value, "putPosition");
287
+            return (Criteria) this;
288
+        }
289
+
290
+        public Criteria andPutPositionIn(List<String> values) {
291
+            addCriterion("put_position in", values, "putPosition");
292
+            return (Criteria) this;
293
+        }
294
+
295
+        public Criteria andPutPositionNotIn(List<String> values) {
296
+            addCriterion("put_position not in", values, "putPosition");
297
+            return (Criteria) this;
298
+        }
299
+
300
+        public Criteria andPutPositionBetween(String value1, String value2) {
301
+            addCriterion("put_position between", value1, value2, "putPosition");
302
+            return (Criteria) this;
303
+        }
304
+
305
+        public Criteria andPutPositionNotBetween(String value1, String value2) {
306
+            addCriterion("put_position not between", value1, value2, "putPosition");
307
+            return (Criteria) this;
308
+        }
309
+
310
+        public Criteria andShelfIdIsNull() {
311
+            addCriterion("shelf_id is null");
312
+            return (Criteria) this;
313
+        }
314
+
315
+        public Criteria andShelfIdIsNotNull() {
316
+            addCriterion("shelf_id is not null");
317
+            return (Criteria) this;
318
+        }
319
+
320
+        public Criteria andShelfIdEqualTo(String value) {
321
+            addCriterion("shelf_id =", value, "shelfId");
322
+            return (Criteria) this;
323
+        }
324
+
325
+        public Criteria andShelfIdNotEqualTo(String value) {
326
+            addCriterion("shelf_id <>", value, "shelfId");
327
+            return (Criteria) this;
328
+        }
329
+
330
+        public Criteria andShelfIdGreaterThan(String value) {
331
+            addCriterion("shelf_id >", value, "shelfId");
332
+            return (Criteria) this;
333
+        }
334
+
335
+        public Criteria andShelfIdGreaterThanOrEqualTo(String value) {
336
+            addCriterion("shelf_id >=", value, "shelfId");
337
+            return (Criteria) this;
338
+        }
339
+
340
+        public Criteria andShelfIdLessThan(String value) {
341
+            addCriterion("shelf_id <", value, "shelfId");
342
+            return (Criteria) this;
343
+        }
344
+
345
+        public Criteria andShelfIdLessThanOrEqualTo(String value) {
346
+            addCriterion("shelf_id <=", value, "shelfId");
347
+            return (Criteria) this;
348
+        }
349
+
350
+        public Criteria andShelfIdLike(String value) {
351
+            addCriterion("shelf_id like", value, "shelfId");
352
+            return (Criteria) this;
353
+        }
354
+
355
+        public Criteria andShelfIdNotLike(String value) {
356
+            addCriterion("shelf_id not like", value, "shelfId");
357
+            return (Criteria) this;
358
+        }
359
+
360
+        public Criteria andShelfIdIn(List<String> values) {
361
+            addCriterion("shelf_id in", values, "shelfId");
362
+            return (Criteria) this;
363
+        }
364
+
365
+        public Criteria andShelfIdNotIn(List<String> values) {
366
+            addCriterion("shelf_id not in", values, "shelfId");
367
+            return (Criteria) this;
368
+        }
369
+
370
+        public Criteria andShelfIdBetween(String value1, String value2) {
371
+            addCriterion("shelf_id between", value1, value2, "shelfId");
372
+            return (Criteria) this;
373
+        }
374
+
375
+        public Criteria andShelfIdNotBetween(String value1, String value2) {
376
+            addCriterion("shelf_id not between", value1, value2, "shelfId");
377
+            return (Criteria) this;
378
+        }
379
+
380
+        public Criteria andWarehouseIdIsNull() {
381
+            addCriterion("warehouse_id is null");
382
+            return (Criteria) this;
383
+        }
384
+
385
+        public Criteria andWarehouseIdIsNotNull() {
386
+            addCriterion("warehouse_id is not null");
387
+            return (Criteria) this;
388
+        }
389
+
390
+        public Criteria andWarehouseIdEqualTo(String value) {
391
+            addCriterion("warehouse_id =", value, "warehouseId");
392
+            return (Criteria) this;
393
+        }
394
+
395
+        public Criteria andWarehouseIdNotEqualTo(String value) {
396
+            addCriterion("warehouse_id <>", value, "warehouseId");
397
+            return (Criteria) this;
398
+        }
399
+
400
+        public Criteria andWarehouseIdGreaterThan(String value) {
401
+            addCriterion("warehouse_id >", value, "warehouseId");
402
+            return (Criteria) this;
403
+        }
404
+
405
+        public Criteria andWarehouseIdGreaterThanOrEqualTo(String value) {
406
+            addCriterion("warehouse_id >=", value, "warehouseId");
407
+            return (Criteria) this;
408
+        }
409
+
410
+        public Criteria andWarehouseIdLessThan(String value) {
411
+            addCriterion("warehouse_id <", value, "warehouseId");
412
+            return (Criteria) this;
413
+        }
414
+
415
+        public Criteria andWarehouseIdLessThanOrEqualTo(String value) {
416
+            addCriterion("warehouse_id <=", value, "warehouseId");
417
+            return (Criteria) this;
418
+        }
419
+
420
+        public Criteria andWarehouseIdLike(String value) {
421
+            addCriterion("warehouse_id like", value, "warehouseId");
422
+            return (Criteria) this;
423
+        }
424
+
425
+        public Criteria andWarehouseIdNotLike(String value) {
426
+            addCriterion("warehouse_id not like", value, "warehouseId");
427
+            return (Criteria) this;
428
+        }
429
+
430
+        public Criteria andWarehouseIdIn(List<String> values) {
431
+            addCriterion("warehouse_id in", values, "warehouseId");
432
+            return (Criteria) this;
433
+        }
434
+
435
+        public Criteria andWarehouseIdNotIn(List<String> values) {
436
+            addCriterion("warehouse_id not in", values, "warehouseId");
437
+            return (Criteria) this;
438
+        }
439
+
440
+        public Criteria andWarehouseIdBetween(String value1, String value2) {
441
+            addCriterion("warehouse_id between", value1, value2, "warehouseId");
442
+            return (Criteria) this;
443
+        }
444
+
445
+        public Criteria andWarehouseIdNotBetween(String value1, String value2) {
446
+            addCriterion("warehouse_id not between", value1, value2, "warehouseId");
447
+            return (Criteria) this;
448
+        }
449
+
450
+        public Criteria andRemarkIsNull() {
451
+            addCriterion("remark is null");
452
+            return (Criteria) this;
453
+        }
454
+
455
+        public Criteria andRemarkIsNotNull() {
456
+            addCriterion("remark is not null");
457
+            return (Criteria) this;
458
+        }
459
+
460
+        public Criteria andRemarkEqualTo(String value) {
461
+            addCriterion("remark =", value, "remark");
462
+            return (Criteria) this;
463
+        }
464
+
465
+        public Criteria andRemarkNotEqualTo(String value) {
466
+            addCriterion("remark <>", value, "remark");
467
+            return (Criteria) this;
468
+        }
469
+
470
+        public Criteria andRemarkGreaterThan(String value) {
471
+            addCriterion("remark >", value, "remark");
472
+            return (Criteria) this;
473
+        }
474
+
475
+        public Criteria andRemarkGreaterThanOrEqualTo(String value) {
476
+            addCriterion("remark >=", value, "remark");
477
+            return (Criteria) this;
478
+        }
479
+
480
+        public Criteria andRemarkLessThan(String value) {
481
+            addCriterion("remark <", value, "remark");
482
+            return (Criteria) this;
483
+        }
484
+
485
+        public Criteria andRemarkLessThanOrEqualTo(String value) {
486
+            addCriterion("remark <=", value, "remark");
487
+            return (Criteria) this;
488
+        }
489
+
490
+        public Criteria andRemarkLike(String value) {
491
+            addCriterion("remark like", value, "remark");
492
+            return (Criteria) this;
493
+        }
494
+
495
+        public Criteria andRemarkNotLike(String value) {
496
+            addCriterion("remark not like", value, "remark");
497
+            return (Criteria) this;
498
+        }
499
+
500
+        public Criteria andRemarkIn(List<String> values) {
501
+            addCriterion("remark in", values, "remark");
502
+            return (Criteria) this;
503
+        }
504
+
505
+        public Criteria andRemarkNotIn(List<String> values) {
506
+            addCriterion("remark not in", values, "remark");
507
+            return (Criteria) this;
508
+        }
509
+
510
+        public Criteria andRemarkBetween(String value1, String value2) {
511
+            addCriterion("remark between", value1, value2, "remark");
512
+            return (Criteria) this;
513
+        }
514
+
515
+        public Criteria andRemarkNotBetween(String value1, String value2) {
516
+            addCriterion("remark not between", value1, value2, "remark");
517
+            return (Criteria) this;
518
+        }
519
+
520
+        public Criteria andInputPersonIdIsNull() {
521
+            addCriterion("input_person_id is null");
522
+            return (Criteria) this;
523
+        }
524
+
525
+        public Criteria andInputPersonIdIsNotNull() {
526
+            addCriterion("input_person_id is not null");
527
+            return (Criteria) this;
528
+        }
529
+
530
+        public Criteria andInputPersonIdEqualTo(Integer value) {
531
+            addCriterion("input_person_id =", value, "inputPersonId");
532
+            return (Criteria) this;
533
+        }
534
+
535
+        public Criteria andInputPersonIdNotEqualTo(Integer value) {
536
+            addCriterion("input_person_id <>", value, "inputPersonId");
537
+            return (Criteria) this;
538
+        }
539
+
540
+        public Criteria andInputPersonIdGreaterThan(Integer value) {
541
+            addCriterion("input_person_id >", value, "inputPersonId");
542
+            return (Criteria) this;
543
+        }
544
+
545
+        public Criteria andInputPersonIdGreaterThanOrEqualTo(Integer value) {
546
+            addCriterion("input_person_id >=", value, "inputPersonId");
547
+            return (Criteria) this;
548
+        }
549
+
550
+        public Criteria andInputPersonIdLessThan(Integer value) {
551
+            addCriterion("input_person_id <", value, "inputPersonId");
552
+            return (Criteria) this;
553
+        }
554
+
555
+        public Criteria andInputPersonIdLessThanOrEqualTo(Integer value) {
556
+            addCriterion("input_person_id <=", value, "inputPersonId");
557
+            return (Criteria) this;
558
+        }
559
+
560
+        public Criteria andInputPersonIdIn(List<Integer> values) {
561
+            addCriterion("input_person_id in", values, "inputPersonId");
562
+            return (Criteria) this;
563
+        }
564
+
565
+        public Criteria andInputPersonIdNotIn(List<Integer> values) {
566
+            addCriterion("input_person_id not in", values, "inputPersonId");
567
+            return (Criteria) this;
568
+        }
569
+
570
+        public Criteria andInputPersonIdBetween(Integer value1, Integer value2) {
571
+            addCriterion("input_person_id between", value1, value2, "inputPersonId");
572
+            return (Criteria) this;
573
+        }
574
+
575
+        public Criteria andInputPersonIdNotBetween(Integer value1, Integer value2) {
576
+            addCriterion("input_person_id not between", value1, value2, "inputPersonId");
577
+            return (Criteria) this;
578
+        }
579
+
580
+        public Criteria andInputDateIsNull() {
581
+            addCriterion("input_date is null");
582
+            return (Criteria) this;
583
+        }
584
+
585
+        public Criteria andInputDateIsNotNull() {
586
+            addCriterion("input_date is not null");
587
+            return (Criteria) this;
588
+        }
589
+
590
+        public Criteria andInputDateEqualTo(Date value) {
591
+            addCriterion("input_date =", value, "inputDate");
592
+            return (Criteria) this;
593
+        }
594
+
595
+        public Criteria andInputDateNotEqualTo(Date value) {
596
+            addCriterion("input_date <>", value, "inputDate");
597
+            return (Criteria) this;
598
+        }
599
+
600
+        public Criteria andInputDateGreaterThan(Date value) {
601
+            addCriterion("input_date >", value, "inputDate");
602
+            return (Criteria) this;
603
+        }
604
+
605
+        public Criteria andInputDateGreaterThanOrEqualTo(Date value) {
606
+            addCriterion("input_date >=", value, "inputDate");
607
+            return (Criteria) this;
608
+        }
609
+
610
+        public Criteria andInputDateLessThan(Date value) {
611
+            addCriterion("input_date <", value, "inputDate");
612
+            return (Criteria) this;
613
+        }
614
+
615
+        public Criteria andInputDateLessThanOrEqualTo(Date value) {
616
+            addCriterion("input_date <=", value, "inputDate");
617
+            return (Criteria) this;
618
+        }
619
+
620
+        public Criteria andInputDateIn(List<Date> values) {
621
+            addCriterion("input_date in", values, "inputDate");
622
+            return (Criteria) this;
623
+        }
624
+
625
+        public Criteria andInputDateNotIn(List<Date> values) {
626
+            addCriterion("input_date not in", values, "inputDate");
627
+            return (Criteria) this;
628
+        }
629
+
630
+        public Criteria andInputDateBetween(Date value1, Date value2) {
631
+            addCriterion("input_date between", value1, value2, "inputDate");
632
+            return (Criteria) this;
633
+        }
634
+
635
+        public Criteria andInputDateNotBetween(Date value1, Date value2) {
636
+            addCriterion("input_date not between", value1, value2, "inputDate");
637
+            return (Criteria) this;
638
+        }
639
+    }
640
+
641
+    /**
642
+     * basic_equipment_equipment_pool
643
+     */
644
+    public static class Criteria extends GeneratedCriteria {
645
+
646
+        protected Criteria() {
647
+            super();
648
+        }
649
+    }
650
+
651
+    /**
652
+     * basic_equipment_equipment_pool 2017-12-23
653
+     */
654
+    public static class Criterion {
655
+        private String condition;
656
+
657
+        private Object value;
658
+
659
+        private Object secondValue;
660
+
661
+        private boolean noValue;
662
+
663
+        private boolean singleValue;
664
+
665
+        private boolean betweenValue;
666
+
667
+        private boolean listValue;
668
+
669
+        private String typeHandler;
670
+
671
+        public String getCondition() {
672
+            return condition;
673
+        }
674
+
675
+        public Object getValue() {
676
+            return value;
677
+        }
678
+
679
+        public Object getSecondValue() {
680
+            return secondValue;
681
+        }
682
+
683
+        public boolean isNoValue() {
684
+            return noValue;
685
+        }
686
+
687
+        public boolean isSingleValue() {
688
+            return singleValue;
689
+        }
690
+
691
+        public boolean isBetweenValue() {
692
+            return betweenValue;
693
+        }
694
+
695
+        public boolean isListValue() {
696
+            return listValue;
697
+        }
698
+
699
+        public String getTypeHandler() {
700
+            return typeHandler;
701
+        }
702
+
703
+        protected Criterion(String condition) {
704
+            super();
705
+            this.condition = condition;
706
+            this.typeHandler = null;
707
+            this.noValue = true;
708
+        }
709
+
710
+        protected Criterion(String condition, Object value, String typeHandler) {
711
+            super();
712
+            this.condition = condition;
713
+            this.value = value;
714
+            this.typeHandler = typeHandler;
715
+            if (value instanceof List<?>) {
716
+                this.listValue = true;
717
+            } else {
718
+                this.singleValue = true;
719
+            }
720
+        }
721
+
722
+        protected Criterion(String condition, Object value) {
723
+            this(condition, value, null);
724
+        }
725
+
726
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
727
+            super();
728
+            this.condition = condition;
729
+            this.value = value;
730
+            this.secondValue = secondValue;
731
+            this.typeHandler = typeHandler;
732
+            this.betweenValue = true;
733
+        }
734
+
735
+        protected Criterion(String condition, Object value, Object secondValue) {
736
+            this(condition, value, secondValue, null);
737
+        }
738
+    }
739
+}

+ 62 - 0
src/main/java/com/chinaitop/depot/device/model/ContentBean.java

@@ -0,0 +1,62 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+public class ContentBean {
4
+	private Integer deviceTypeId;
5
+	private String deviceName;
6
+	private String model;
7
+	private String number;
8
+	private Integer useCount;
9
+	private String putPosition;
10
+	private String shelfId;
11
+	private int id;
12
+	
13
+	
14
+	public int getId() {
15
+		return id;
16
+	}
17
+	public void setId(int id) {
18
+		this.id = id;
19
+	}
20
+	public String getShelfId() {
21
+		return shelfId;
22
+	}
23
+	public void setShelfId(String shelfId) {
24
+		this.shelfId = shelfId;
25
+	}
26
+	public String getPutPosition() {
27
+		return putPosition;
28
+	}
29
+	public void setPutPosition(String putPosition) {
30
+		this.putPosition = putPosition;
31
+	}
32
+	public Integer getDeviceTypeId() {
33
+		return deviceTypeId;
34
+	}
35
+	public void setDeviceTypeId(Integer deviceTypeId) {
36
+		this.deviceTypeId = deviceTypeId;
37
+	}
38
+	public String getDeviceName() {
39
+		return deviceName;
40
+	}
41
+	public void setDeviceName(String deviceName) {
42
+		this.deviceName = deviceName;
43
+	}
44
+	public String getModel() {
45
+		return model;
46
+	}
47
+	public void setModel(String model) {
48
+		this.model = model;
49
+	}
50
+	public String getNumber() {
51
+		return number;
52
+	}
53
+	public void setNumber(String number) {
54
+		this.number = number;
55
+	}
56
+	public Integer getUseCount() {
57
+		return useCount;
58
+	}
59
+	public void setUseCount(Integer useCount) {
60
+		this.useCount = useCount;
61
+	}
62
+}

+ 18 - 0
src/main/java/com/chinaitop/depot/device/model/HouseNameBean.java

@@ -0,0 +1,18 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+public class HouseNameBean {
4
+	private Integer depotId;
5
+	private String storeName;
6
+	public Integer getDepotId() {
7
+		return depotId;
8
+	}
9
+	public void setDepotId(Integer depotId) {
10
+		this.depotId = depotId;
11
+	}
12
+	public String getStoreName() {
13
+		return storeName;
14
+	}
15
+	public void setStoreName(String storeName) {
16
+		this.storeName = storeName;
17
+	}
18
+}

+ 25 - 0
src/main/java/com/chinaitop/depot/device/model/HouseTypeBean.java

@@ -0,0 +1,25 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+public class HouseTypeBean {
4
+	private Integer depotId;
5
+	private Integer deviceTypeId;
6
+	private String enumName;
7
+	public Integer getDepotId() {
8
+		return depotId;
9
+	}
10
+	public void setDepotId(Integer depotId) {
11
+		this.depotId = depotId;
12
+	}
13
+	public Integer getDeviceTypeId() {
14
+		return deviceTypeId;
15
+	}
16
+	public void setDeviceTypeId(Integer deviceTypeId) {
17
+		this.deviceTypeId = deviceTypeId;
18
+	}
19
+	public String getEnumName() {
20
+		return enumName;
21
+	}
22
+	public void setEnumName(String enumName) {
23
+		this.enumName = enumName;
24
+	}
25
+}

+ 32 - 0
src/main/java/com/chinaitop/depot/device/model/ShelfContentBean.java

@@ -0,0 +1,32 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+public class ShelfContentBean {
4
+	private Integer deviceTypeId;
5
+	private Integer storageRack;
6
+	private String enumName;
7
+	private String shelfId;
8
+	public Integer getDeviceTypeId() {
9
+		return deviceTypeId;
10
+	}
11
+	public void setDeviceTypeId(Integer deviceTypeId) {
12
+		this.deviceTypeId = deviceTypeId;
13
+	}
14
+	public Integer getStorageRack() {
15
+		return storageRack;
16
+	}
17
+	public void setStorageRack(Integer storageRack) {
18
+		this.storageRack = storageRack;
19
+	}
20
+	public String getEnumName() {
21
+		return enumName;
22
+	}
23
+	public void setEnumName(String enumName) {
24
+		this.enumName = enumName;
25
+	}
26
+	public String getShelfId() {
27
+		return shelfId;
28
+	}
29
+	public void setShelfId(String shelfId) {
30
+		this.shelfId = shelfId;
31
+	}
32
+}

+ 167 - 0
src/main/java/com/chinaitop/depot/device/model/StorageDeviceback.java

@@ -0,0 +1,167 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+import java.util.Date;
4
+
5
+public class StorageDeviceback {
6
+    private Integer id;
7
+
8
+    private Integer getId;
9
+
10
+    private String backKeeper;
11
+
12
+    private String backHandler;
13
+
14
+    private String collator;
15
+
16
+    private Date backTime;
17
+
18
+    private Integer brokenCount;
19
+
20
+    private String number;
21
+
22
+    private Integer backCount;
23
+
24
+    /**
25
+     * 
26
+     * @return id 
27
+     */
28
+    public Integer getId() {
29
+        return id;
30
+    }
31
+
32
+    /**
33
+     * 
34
+     * @param id 
35
+     */
36
+    public void setId(Integer id) {
37
+        this.id = id;
38
+    }
39
+
40
+    /**
41
+     * 关联领用的id
42
+     * @return get_id 关联领用的id
43
+     */
44
+    public Integer getGetId() {
45
+        return getId;
46
+    }
47
+
48
+    /**
49
+     * 关联领用的id
50
+     * @param getId 关联领用的id
51
+     */
52
+    public void setGetId(Integer getId) {
53
+        this.getId = getId;
54
+    }
55
+
56
+    /**
57
+     * 记账人
58
+     * @return back_keeper 记账人
59
+     */
60
+    public String getBackKeeper() {
61
+        return backKeeper;
62
+    }
63
+
64
+    /**
65
+     * 记账人
66
+     * @param backKeeper 记账人
67
+     */
68
+    public void setBackKeeper(String backKeeper) {
69
+        this.backKeeper = backKeeper == null ? null : backKeeper.trim();
70
+    }
71
+
72
+    /**
73
+     * 经手人
74
+     * @return back_handler 经手人
75
+     */
76
+    public String getBackHandler() {
77
+        return backHandler;
78
+    }
79
+
80
+    /**
81
+     * 经手人
82
+     * @param backHandler 经手人
83
+     */
84
+    public void setBackHandler(String backHandler) {
85
+        this.backHandler = backHandler == null ? null : backHandler.trim();
86
+    }
87
+
88
+    /**
89
+     * 核对人
90
+     * @return collator 核对人
91
+     */
92
+    public String getCollator() {
93
+        return collator;
94
+    }
95
+
96
+    /**
97
+     * 核对人
98
+     * @param collator 核对人
99
+     */
100
+    public void setCollator(String collator) {
101
+        this.collator = collator == null ? null : collator.trim();
102
+    }
103
+
104
+    /**
105
+     * 归还时间
106
+     * @return back_time 归还时间
107
+     */
108
+    public Date getBackTime() {
109
+        return backTime;
110
+    }
111
+
112
+    /**
113
+     * 归还时间
114
+     * @param backTime 归还时间
115
+     */
116
+    public void setBackTime(Date backTime) {
117
+        this.backTime = backTime;
118
+    }
119
+
120
+    /**
121
+     * 故障数量
122
+     * @return broken_count 故障数量
123
+     */
124
+    public Integer getBrokenCount() {
125
+        return brokenCount;
126
+    }
127
+
128
+    /**
129
+     * 故障数量
130
+     * @param brokenCount 故障数量
131
+     */
132
+    public void setBrokenCount(Integer brokenCount) {
133
+        this.brokenCount = brokenCount;
134
+    }
135
+
136
+    /**
137
+     * 设备编号
138
+     * @return number 设备编号
139
+     */
140
+    public String getNumber() {
141
+        return number;
142
+    }
143
+
144
+    /**
145
+     * 设备编号
146
+     * @param number 设备编号
147
+     */
148
+    public void setNumber(String number) {
149
+        this.number = number == null ? null : number.trim();
150
+    }
151
+
152
+    /**
153
+     * 归还数量
154
+     * @return back_count 归还数量
155
+     */
156
+    public Integer getBackCount() {
157
+        return backCount;
158
+    }
159
+
160
+    /**
161
+     * 归还数量
162
+     * @param backCount 归还数量
163
+     */
164
+    public void setBackCount(Integer backCount) {
165
+        this.backCount = backCount;
166
+    }
167
+}

+ 826 - 0
src/main/java/com/chinaitop/depot/device/model/StorageDevicebackExample.java

@@ -0,0 +1,826 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+import java.util.ArrayList;
4
+import java.util.Date;
5
+import java.util.Iterator;
6
+import java.util.List;
7
+
8
+public class StorageDevicebackExample {
9
+    /**
10
+     * storage_deviceback
11
+     */
12
+    protected String orderByClause;
13
+
14
+    /**
15
+     * storage_deviceback
16
+     */
17
+    protected boolean distinct;
18
+
19
+    /**
20
+     * storage_deviceback
21
+     */
22
+    protected List<Criteria> oredCriteria;
23
+
24
+    public StorageDevicebackExample() {
25
+        oredCriteria = new ArrayList<Criteria>();
26
+    }
27
+
28
+    public void setOrderByClause(String orderByClause) {
29
+        this.orderByClause = orderByClause;
30
+    }
31
+
32
+    public String getOrderByClause() {
33
+        return orderByClause;
34
+    }
35
+
36
+    public void setDistinct(boolean distinct) {
37
+        this.distinct = distinct;
38
+    }
39
+
40
+    public boolean isDistinct() {
41
+        return distinct;
42
+    }
43
+
44
+    public List<Criteria> getOredCriteria() {
45
+        return oredCriteria;
46
+    }
47
+
48
+    public void or(Criteria criteria) {
49
+        oredCriteria.add(criteria);
50
+    }
51
+
52
+    public Criteria or() {
53
+        Criteria criteria = createCriteriaInternal();
54
+        oredCriteria.add(criteria);
55
+        return criteria;
56
+    }
57
+
58
+    public Criteria createCriteria() {
59
+        Criteria criteria = createCriteriaInternal();
60
+        if (oredCriteria.size() == 0) {
61
+            oredCriteria.add(criteria);
62
+        }
63
+        return criteria;
64
+    }
65
+
66
+    protected Criteria createCriteriaInternal() {
67
+        Criteria criteria = new Criteria();
68
+        return criteria;
69
+    }
70
+
71
+    public void clear() {
72
+        oredCriteria.clear();
73
+        orderByClause = null;
74
+        distinct = false;
75
+    }
76
+
77
+    /**
78
+     * storage_deviceback 2018-03-22
79
+     */
80
+    protected abstract static class GeneratedCriteria {
81
+        protected List<Criterion> criteria;
82
+
83
+        protected GeneratedCriteria() {
84
+            super();
85
+            criteria = new ArrayList<Criterion>();
86
+        }
87
+
88
+        public boolean isValid() {
89
+            return criteria.size() > 0;
90
+        }
91
+
92
+        public List<Criterion> getAllCriteria() {
93
+            return criteria;
94
+        }
95
+
96
+        public List<Criterion> getCriteria() {
97
+            return criteria;
98
+        }
99
+
100
+        protected void addCriterion(String condition) {
101
+            if (condition == null) {
102
+                throw new RuntimeException("Value for condition cannot be null");
103
+            }
104
+            criteria.add(new Criterion(condition));
105
+        }
106
+
107
+        protected void addCriterion(String condition, Object value, String property) {
108
+            if (value == null) {
109
+                throw new RuntimeException("Value for " + property + " cannot be null");
110
+            }
111
+            criteria.add(new Criterion(condition, value));
112
+        }
113
+
114
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
115
+            if (value1 == null || value2 == null) {
116
+                throw new RuntimeException("Between values for " + property + " cannot be null");
117
+            }
118
+            criteria.add(new Criterion(condition, value1, value2));
119
+        }
120
+
121
+        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
122
+            if (value == null) {
123
+                throw new RuntimeException("Value for " + property + " cannot be null");
124
+            }
125
+            addCriterion(condition, new java.sql.Date(value.getTime()), property);
126
+        }
127
+
128
+        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
129
+            if (values == null || values.size() == 0) {
130
+                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
131
+            }
132
+            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
133
+            Iterator<Date> iter = values.iterator();
134
+            while (iter.hasNext()) {
135
+                dateList.add(new java.sql.Date(iter.next().getTime()));
136
+            }
137
+            addCriterion(condition, dateList, property);
138
+        }
139
+
140
+        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
141
+            if (value1 == null || value2 == null) {
142
+                throw new RuntimeException("Between values for " + property + " cannot be null");
143
+            }
144
+            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
145
+        }
146
+
147
+        public Criteria andIdIsNull() {
148
+            addCriterion("id is null");
149
+            return (Criteria) this;
150
+        }
151
+
152
+        public Criteria andIdIsNotNull() {
153
+            addCriterion("id is not null");
154
+            return (Criteria) this;
155
+        }
156
+
157
+        public Criteria andIdEqualTo(Integer value) {
158
+            addCriterion("id =", value, "id");
159
+            return (Criteria) this;
160
+        }
161
+
162
+        public Criteria andIdNotEqualTo(Integer value) {
163
+            addCriterion("id <>", value, "id");
164
+            return (Criteria) this;
165
+        }
166
+
167
+        public Criteria andIdGreaterThan(Integer value) {
168
+            addCriterion("id >", value, "id");
169
+            return (Criteria) this;
170
+        }
171
+
172
+        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
173
+            addCriterion("id >=", value, "id");
174
+            return (Criteria) this;
175
+        }
176
+
177
+        public Criteria andIdLessThan(Integer value) {
178
+            addCriterion("id <", value, "id");
179
+            return (Criteria) this;
180
+        }
181
+
182
+        public Criteria andIdLessThanOrEqualTo(Integer value) {
183
+            addCriterion("id <=", value, "id");
184
+            return (Criteria) this;
185
+        }
186
+
187
+        public Criteria andIdIn(List<Integer> values) {
188
+            addCriterion("id in", values, "id");
189
+            return (Criteria) this;
190
+        }
191
+
192
+        public Criteria andIdNotIn(List<Integer> values) {
193
+            addCriterion("id not in", values, "id");
194
+            return (Criteria) this;
195
+        }
196
+
197
+        public Criteria andIdBetween(Integer value1, Integer value2) {
198
+            addCriterion("id between", value1, value2, "id");
199
+            return (Criteria) this;
200
+        }
201
+
202
+        public Criteria andIdNotBetween(Integer value1, Integer value2) {
203
+            addCriterion("id not between", value1, value2, "id");
204
+            return (Criteria) this;
205
+        }
206
+
207
+        public Criteria andGetIdIsNull() {
208
+            addCriterion("get_id is null");
209
+            return (Criteria) this;
210
+        }
211
+
212
+        public Criteria andGetIdIsNotNull() {
213
+            addCriterion("get_id is not null");
214
+            return (Criteria) this;
215
+        }
216
+
217
+        public Criteria andGetIdEqualTo(Integer value) {
218
+            addCriterion("get_id =", value, "getId");
219
+            return (Criteria) this;
220
+        }
221
+
222
+        public Criteria andGetIdNotEqualTo(Integer value) {
223
+            addCriterion("get_id <>", value, "getId");
224
+            return (Criteria) this;
225
+        }
226
+
227
+        public Criteria andGetIdGreaterThan(Integer value) {
228
+            addCriterion("get_id >", value, "getId");
229
+            return (Criteria) this;
230
+        }
231
+
232
+        public Criteria andGetIdGreaterThanOrEqualTo(Integer value) {
233
+            addCriterion("get_id >=", value, "getId");
234
+            return (Criteria) this;
235
+        }
236
+
237
+        public Criteria andGetIdLessThan(Integer value) {
238
+            addCriterion("get_id <", value, "getId");
239
+            return (Criteria) this;
240
+        }
241
+
242
+        public Criteria andGetIdLessThanOrEqualTo(Integer value) {
243
+            addCriterion("get_id <=", value, "getId");
244
+            return (Criteria) this;
245
+        }
246
+
247
+        public Criteria andGetIdIn(List<Integer> values) {
248
+            addCriterion("get_id in", values, "getId");
249
+            return (Criteria) this;
250
+        }
251
+
252
+        public Criteria andGetIdNotIn(List<Integer> values) {
253
+            addCriterion("get_id not in", values, "getId");
254
+            return (Criteria) this;
255
+        }
256
+
257
+        public Criteria andGetIdBetween(Integer value1, Integer value2) {
258
+            addCriterion("get_id between", value1, value2, "getId");
259
+            return (Criteria) this;
260
+        }
261
+
262
+        public Criteria andGetIdNotBetween(Integer value1, Integer value2) {
263
+            addCriterion("get_id not between", value1, value2, "getId");
264
+            return (Criteria) this;
265
+        }
266
+
267
+        public Criteria andBackKeeperIsNull() {
268
+            addCriterion("back_keeper is null");
269
+            return (Criteria) this;
270
+        }
271
+
272
+        public Criteria andBackKeeperIsNotNull() {
273
+            addCriterion("back_keeper is not null");
274
+            return (Criteria) this;
275
+        }
276
+
277
+        public Criteria andBackKeeperEqualTo(String value) {
278
+            addCriterion("back_keeper =", value, "backKeeper");
279
+            return (Criteria) this;
280
+        }
281
+
282
+        public Criteria andBackKeeperNotEqualTo(String value) {
283
+            addCriterion("back_keeper <>", value, "backKeeper");
284
+            return (Criteria) this;
285
+        }
286
+
287
+        public Criteria andBackKeeperGreaterThan(String value) {
288
+            addCriterion("back_keeper >", value, "backKeeper");
289
+            return (Criteria) this;
290
+        }
291
+
292
+        public Criteria andBackKeeperGreaterThanOrEqualTo(String value) {
293
+            addCriterion("back_keeper >=", value, "backKeeper");
294
+            return (Criteria) this;
295
+        }
296
+
297
+        public Criteria andBackKeeperLessThan(String value) {
298
+            addCriterion("back_keeper <", value, "backKeeper");
299
+            return (Criteria) this;
300
+        }
301
+
302
+        public Criteria andBackKeeperLessThanOrEqualTo(String value) {
303
+            addCriterion("back_keeper <=", value, "backKeeper");
304
+            return (Criteria) this;
305
+        }
306
+
307
+        public Criteria andBackKeeperLike(String value) {
308
+            addCriterion("back_keeper like", value, "backKeeper");
309
+            return (Criteria) this;
310
+        }
311
+
312
+        public Criteria andBackKeeperNotLike(String value) {
313
+            addCriterion("back_keeper not like", value, "backKeeper");
314
+            return (Criteria) this;
315
+        }
316
+
317
+        public Criteria andBackKeeperIn(List<String> values) {
318
+            addCriterion("back_keeper in", values, "backKeeper");
319
+            return (Criteria) this;
320
+        }
321
+
322
+        public Criteria andBackKeeperNotIn(List<String> values) {
323
+            addCriterion("back_keeper not in", values, "backKeeper");
324
+            return (Criteria) this;
325
+        }
326
+
327
+        public Criteria andBackKeeperBetween(String value1, String value2) {
328
+            addCriterion("back_keeper between", value1, value2, "backKeeper");
329
+            return (Criteria) this;
330
+        }
331
+
332
+        public Criteria andBackKeeperNotBetween(String value1, String value2) {
333
+            addCriterion("back_keeper not between", value1, value2, "backKeeper");
334
+            return (Criteria) this;
335
+        }
336
+
337
+        public Criteria andBackHandlerIsNull() {
338
+            addCriterion("back_handler is null");
339
+            return (Criteria) this;
340
+        }
341
+
342
+        public Criteria andBackHandlerIsNotNull() {
343
+            addCriterion("back_handler is not null");
344
+            return (Criteria) this;
345
+        }
346
+
347
+        public Criteria andBackHandlerEqualTo(String value) {
348
+            addCriterion("back_handler =", value, "backHandler");
349
+            return (Criteria) this;
350
+        }
351
+
352
+        public Criteria andBackHandlerNotEqualTo(String value) {
353
+            addCriterion("back_handler <>", value, "backHandler");
354
+            return (Criteria) this;
355
+        }
356
+
357
+        public Criteria andBackHandlerGreaterThan(String value) {
358
+            addCriterion("back_handler >", value, "backHandler");
359
+            return (Criteria) this;
360
+        }
361
+
362
+        public Criteria andBackHandlerGreaterThanOrEqualTo(String value) {
363
+            addCriterion("back_handler >=", value, "backHandler");
364
+            return (Criteria) this;
365
+        }
366
+
367
+        public Criteria andBackHandlerLessThan(String value) {
368
+            addCriterion("back_handler <", value, "backHandler");
369
+            return (Criteria) this;
370
+        }
371
+
372
+        public Criteria andBackHandlerLessThanOrEqualTo(String value) {
373
+            addCriterion("back_handler <=", value, "backHandler");
374
+            return (Criteria) this;
375
+        }
376
+
377
+        public Criteria andBackHandlerLike(String value) {
378
+            addCriterion("back_handler like", value, "backHandler");
379
+            return (Criteria) this;
380
+        }
381
+
382
+        public Criteria andBackHandlerNotLike(String value) {
383
+            addCriterion("back_handler not like", value, "backHandler");
384
+            return (Criteria) this;
385
+        }
386
+
387
+        public Criteria andBackHandlerIn(List<String> values) {
388
+            addCriterion("back_handler in", values, "backHandler");
389
+            return (Criteria) this;
390
+        }
391
+
392
+        public Criteria andBackHandlerNotIn(List<String> values) {
393
+            addCriterion("back_handler not in", values, "backHandler");
394
+            return (Criteria) this;
395
+        }
396
+
397
+        public Criteria andBackHandlerBetween(String value1, String value2) {
398
+            addCriterion("back_handler between", value1, value2, "backHandler");
399
+            return (Criteria) this;
400
+        }
401
+
402
+        public Criteria andBackHandlerNotBetween(String value1, String value2) {
403
+            addCriterion("back_handler not between", value1, value2, "backHandler");
404
+            return (Criteria) this;
405
+        }
406
+
407
+        public Criteria andCollatorIsNull() {
408
+            addCriterion("collator is null");
409
+            return (Criteria) this;
410
+        }
411
+
412
+        public Criteria andCollatorIsNotNull() {
413
+            addCriterion("collator is not null");
414
+            return (Criteria) this;
415
+        }
416
+
417
+        public Criteria andCollatorEqualTo(String value) {
418
+            addCriterion("collator =", value, "collator");
419
+            return (Criteria) this;
420
+        }
421
+
422
+        public Criteria andCollatorNotEqualTo(String value) {
423
+            addCriterion("collator <>", value, "collator");
424
+            return (Criteria) this;
425
+        }
426
+
427
+        public Criteria andCollatorGreaterThan(String value) {
428
+            addCriterion("collator >", value, "collator");
429
+            return (Criteria) this;
430
+        }
431
+
432
+        public Criteria andCollatorGreaterThanOrEqualTo(String value) {
433
+            addCriterion("collator >=", value, "collator");
434
+            return (Criteria) this;
435
+        }
436
+
437
+        public Criteria andCollatorLessThan(String value) {
438
+            addCriterion("collator <", value, "collator");
439
+            return (Criteria) this;
440
+        }
441
+
442
+        public Criteria andCollatorLessThanOrEqualTo(String value) {
443
+            addCriterion("collator <=", value, "collator");
444
+            return (Criteria) this;
445
+        }
446
+
447
+        public Criteria andCollatorLike(String value) {
448
+            addCriterion("collator like", value, "collator");
449
+            return (Criteria) this;
450
+        }
451
+
452
+        public Criteria andCollatorNotLike(String value) {
453
+            addCriterion("collator not like", value, "collator");
454
+            return (Criteria) this;
455
+        }
456
+
457
+        public Criteria andCollatorIn(List<String> values) {
458
+            addCriterion("collator in", values, "collator");
459
+            return (Criteria) this;
460
+        }
461
+
462
+        public Criteria andCollatorNotIn(List<String> values) {
463
+            addCriterion("collator not in", values, "collator");
464
+            return (Criteria) this;
465
+        }
466
+
467
+        public Criteria andCollatorBetween(String value1, String value2) {
468
+            addCriterion("collator between", value1, value2, "collator");
469
+            return (Criteria) this;
470
+        }
471
+
472
+        public Criteria andCollatorNotBetween(String value1, String value2) {
473
+            addCriterion("collator not between", value1, value2, "collator");
474
+            return (Criteria) this;
475
+        }
476
+
477
+        public Criteria andBackTimeIsNull() {
478
+            addCriterion("back_time is null");
479
+            return (Criteria) this;
480
+        }
481
+
482
+        public Criteria andBackTimeIsNotNull() {
483
+            addCriterion("back_time is not null");
484
+            return (Criteria) this;
485
+        }
486
+
487
+        public Criteria andBackTimeEqualTo(Date value) {
488
+            addCriterionForJDBCDate("back_time =", value, "backTime");
489
+            return (Criteria) this;
490
+        }
491
+
492
+        public Criteria andBackTimeNotEqualTo(Date value) {
493
+            addCriterionForJDBCDate("back_time <>", value, "backTime");
494
+            return (Criteria) this;
495
+        }
496
+
497
+        public Criteria andBackTimeGreaterThan(Date value) {
498
+            addCriterionForJDBCDate("back_time >", value, "backTime");
499
+            return (Criteria) this;
500
+        }
501
+
502
+        public Criteria andBackTimeGreaterThanOrEqualTo(Date value) {
503
+            addCriterionForJDBCDate("back_time >=", value, "backTime");
504
+            return (Criteria) this;
505
+        }
506
+
507
+        public Criteria andBackTimeLessThan(Date value) {
508
+            addCriterionForJDBCDate("back_time <", value, "backTime");
509
+            return (Criteria) this;
510
+        }
511
+
512
+        public Criteria andBackTimeLessThanOrEqualTo(Date value) {
513
+            addCriterionForJDBCDate("back_time <=", value, "backTime");
514
+            return (Criteria) this;
515
+        }
516
+
517
+        public Criteria andBackTimeIn(List<Date> values) {
518
+            addCriterionForJDBCDate("back_time in", values, "backTime");
519
+            return (Criteria) this;
520
+        }
521
+
522
+        public Criteria andBackTimeNotIn(List<Date> values) {
523
+            addCriterionForJDBCDate("back_time not in", values, "backTime");
524
+            return (Criteria) this;
525
+        }
526
+
527
+        public Criteria andBackTimeBetween(Date value1, Date value2) {
528
+            addCriterionForJDBCDate("back_time between", value1, value2, "backTime");
529
+            return (Criteria) this;
530
+        }
531
+
532
+        public Criteria andBackTimeNotBetween(Date value1, Date value2) {
533
+            addCriterionForJDBCDate("back_time not between", value1, value2, "backTime");
534
+            return (Criteria) this;
535
+        }
536
+
537
+        public Criteria andBrokenCountIsNull() {
538
+            addCriterion("broken_count is null");
539
+            return (Criteria) this;
540
+        }
541
+
542
+        public Criteria andBrokenCountIsNotNull() {
543
+            addCriterion("broken_count is not null");
544
+            return (Criteria) this;
545
+        }
546
+
547
+        public Criteria andBrokenCountEqualTo(Integer value) {
548
+            addCriterion("broken_count =", value, "brokenCount");
549
+            return (Criteria) this;
550
+        }
551
+
552
+        public Criteria andBrokenCountNotEqualTo(Integer value) {
553
+            addCriterion("broken_count <>", value, "brokenCount");
554
+            return (Criteria) this;
555
+        }
556
+
557
+        public Criteria andBrokenCountGreaterThan(Integer value) {
558
+            addCriterion("broken_count >", value, "brokenCount");
559
+            return (Criteria) this;
560
+        }
561
+
562
+        public Criteria andBrokenCountGreaterThanOrEqualTo(Integer value) {
563
+            addCriterion("broken_count >=", value, "brokenCount");
564
+            return (Criteria) this;
565
+        }
566
+
567
+        public Criteria andBrokenCountLessThan(Integer value) {
568
+            addCriterion("broken_count <", value, "brokenCount");
569
+            return (Criteria) this;
570
+        }
571
+
572
+        public Criteria andBrokenCountLessThanOrEqualTo(Integer value) {
573
+            addCriterion("broken_count <=", value, "brokenCount");
574
+            return (Criteria) this;
575
+        }
576
+
577
+        public Criteria andBrokenCountIn(List<Integer> values) {
578
+            addCriterion("broken_count in", values, "brokenCount");
579
+            return (Criteria) this;
580
+        }
581
+
582
+        public Criteria andBrokenCountNotIn(List<Integer> values) {
583
+            addCriterion("broken_count not in", values, "brokenCount");
584
+            return (Criteria) this;
585
+        }
586
+
587
+        public Criteria andBrokenCountBetween(Integer value1, Integer value2) {
588
+            addCriterion("broken_count between", value1, value2, "brokenCount");
589
+            return (Criteria) this;
590
+        }
591
+
592
+        public Criteria andBrokenCountNotBetween(Integer value1, Integer value2) {
593
+            addCriterion("broken_count not between", value1, value2, "brokenCount");
594
+            return (Criteria) this;
595
+        }
596
+
597
+        public Criteria andNumberIsNull() {
598
+            addCriterion("number is null");
599
+            return (Criteria) this;
600
+        }
601
+
602
+        public Criteria andNumberIsNotNull() {
603
+            addCriterion("number is not null");
604
+            return (Criteria) this;
605
+        }
606
+
607
+        public Criteria andNumberEqualTo(String value) {
608
+            addCriterion("number =", value, "number");
609
+            return (Criteria) this;
610
+        }
611
+
612
+        public Criteria andNumberNotEqualTo(String value) {
613
+            addCriterion("number <>", value, "number");
614
+            return (Criteria) this;
615
+        }
616
+
617
+        public Criteria andNumberGreaterThan(String value) {
618
+            addCriterion("number >", value, "number");
619
+            return (Criteria) this;
620
+        }
621
+
622
+        public Criteria andNumberGreaterThanOrEqualTo(String value) {
623
+            addCriterion("number >=", value, "number");
624
+            return (Criteria) this;
625
+        }
626
+
627
+        public Criteria andNumberLessThan(String value) {
628
+            addCriterion("number <", value, "number");
629
+            return (Criteria) this;
630
+        }
631
+
632
+        public Criteria andNumberLessThanOrEqualTo(String value) {
633
+            addCriterion("number <=", value, "number");
634
+            return (Criteria) this;
635
+        }
636
+
637
+        public Criteria andNumberLike(String value) {
638
+            addCriterion("number like", value, "number");
639
+            return (Criteria) this;
640
+        }
641
+
642
+        public Criteria andNumberNotLike(String value) {
643
+            addCriterion("number not like", value, "number");
644
+            return (Criteria) this;
645
+        }
646
+
647
+        public Criteria andNumberIn(List<String> values) {
648
+            addCriterion("number in", values, "number");
649
+            return (Criteria) this;
650
+        }
651
+
652
+        public Criteria andNumberNotIn(List<String> values) {
653
+            addCriterion("number not in", values, "number");
654
+            return (Criteria) this;
655
+        }
656
+
657
+        public Criteria andNumberBetween(String value1, String value2) {
658
+            addCriterion("number between", value1, value2, "number");
659
+            return (Criteria) this;
660
+        }
661
+
662
+        public Criteria andNumberNotBetween(String value1, String value2) {
663
+            addCriterion("number not between", value1, value2, "number");
664
+            return (Criteria) this;
665
+        }
666
+
667
+        public Criteria andBackCountIsNull() {
668
+            addCriterion("back_count is null");
669
+            return (Criteria) this;
670
+        }
671
+
672
+        public Criteria andBackCountIsNotNull() {
673
+            addCriterion("back_count is not null");
674
+            return (Criteria) this;
675
+        }
676
+
677
+        public Criteria andBackCountEqualTo(Integer value) {
678
+            addCriterion("back_count =", value, "backCount");
679
+            return (Criteria) this;
680
+        }
681
+
682
+        public Criteria andBackCountNotEqualTo(Integer value) {
683
+            addCriterion("back_count <>", value, "backCount");
684
+            return (Criteria) this;
685
+        }
686
+
687
+        public Criteria andBackCountGreaterThan(Integer value) {
688
+            addCriterion("back_count >", value, "backCount");
689
+            return (Criteria) this;
690
+        }
691
+
692
+        public Criteria andBackCountGreaterThanOrEqualTo(Integer value) {
693
+            addCriterion("back_count >=", value, "backCount");
694
+            return (Criteria) this;
695
+        }
696
+
697
+        public Criteria andBackCountLessThan(Integer value) {
698
+            addCriterion("back_count <", value, "backCount");
699
+            return (Criteria) this;
700
+        }
701
+
702
+        public Criteria andBackCountLessThanOrEqualTo(Integer value) {
703
+            addCriterion("back_count <=", value, "backCount");
704
+            return (Criteria) this;
705
+        }
706
+
707
+        public Criteria andBackCountIn(List<Integer> values) {
708
+            addCriterion("back_count in", values, "backCount");
709
+            return (Criteria) this;
710
+        }
711
+
712
+        public Criteria andBackCountNotIn(List<Integer> values) {
713
+            addCriterion("back_count not in", values, "backCount");
714
+            return (Criteria) this;
715
+        }
716
+
717
+        public Criteria andBackCountBetween(Integer value1, Integer value2) {
718
+            addCriterion("back_count between", value1, value2, "backCount");
719
+            return (Criteria) this;
720
+        }
721
+
722
+        public Criteria andBackCountNotBetween(Integer value1, Integer value2) {
723
+            addCriterion("back_count not between", value1, value2, "backCount");
724
+            return (Criteria) this;
725
+        }
726
+    }
727
+
728
+    /**
729
+     * storage_deviceback
730
+     */
731
+    public static class Criteria extends GeneratedCriteria {
732
+
733
+        protected Criteria() {
734
+            super();
735
+        }
736
+    }
737
+
738
+    /**
739
+     * storage_deviceback 2018-03-22
740
+     */
741
+    public static class Criterion {
742
+        private String condition;
743
+
744
+        private Object value;
745
+
746
+        private Object secondValue;
747
+
748
+        private boolean noValue;
749
+
750
+        private boolean singleValue;
751
+
752
+        private boolean betweenValue;
753
+
754
+        private boolean listValue;
755
+
756
+        private String typeHandler;
757
+
758
+        public String getCondition() {
759
+            return condition;
760
+        }
761
+
762
+        public Object getValue() {
763
+            return value;
764
+        }
765
+
766
+        public Object getSecondValue() {
767
+            return secondValue;
768
+        }
769
+
770
+        public boolean isNoValue() {
771
+            return noValue;
772
+        }
773
+
774
+        public boolean isSingleValue() {
775
+            return singleValue;
776
+        }
777
+
778
+        public boolean isBetweenValue() {
779
+            return betweenValue;
780
+        }
781
+
782
+        public boolean isListValue() {
783
+            return listValue;
784
+        }
785
+
786
+        public String getTypeHandler() {
787
+            return typeHandler;
788
+        }
789
+
790
+        protected Criterion(String condition) {
791
+            super();
792
+            this.condition = condition;
793
+            this.typeHandler = null;
794
+            this.noValue = true;
795
+        }
796
+
797
+        protected Criterion(String condition, Object value, String typeHandler) {
798
+            super();
799
+            this.condition = condition;
800
+            this.value = value;
801
+            this.typeHandler = typeHandler;
802
+            if (value instanceof List<?>) {
803
+                this.listValue = true;
804
+            } else {
805
+                this.singleValue = true;
806
+            }
807
+        }
808
+
809
+        protected Criterion(String condition, Object value) {
810
+            this(condition, value, null);
811
+        }
812
+
813
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
814
+            super();
815
+            this.condition = condition;
816
+            this.value = value;
817
+            this.secondValue = secondValue;
818
+            this.typeHandler = typeHandler;
819
+            this.betweenValue = true;
820
+        }
821
+
822
+        protected Criterion(String condition, Object value, Object secondValue) {
823
+            this(condition, value, secondValue, null);
824
+        }
825
+    }
826
+}

+ 250 - 0
src/main/java/com/chinaitop/depot/device/model/StorageDevicecheck.java

@@ -0,0 +1,250 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+import java.util.Date;
4
+
5
+public class StorageDevicecheck {
6
+    private Integer id;
7
+
8
+    private String checkNumber;
9
+
10
+    private Date checkDate;
11
+
12
+    private Integer depotId;
13
+
14
+    private String checkPerson;
15
+
16
+    private String deviceType;
17
+
18
+    private String deviceName;
19
+
20
+    private String model;
21
+
22
+    private Integer storeCount;
23
+
24
+    private Integer reallyCount;
25
+
26
+    private String checkResult;
27
+
28
+    private String reason;
29
+
30
+    private Integer orgId;
31
+    
32
+    //业务字段
33
+    private String DepotName;
34
+
35
+    public String getDepotName() {
36
+        return DepotName;
37
+    }
38
+
39
+    public void setDepotName(String depotName) {
40
+        DepotName = depotName;
41
+    }
42
+
43
+    /**
44
+     * 盘点单
45
+     * @return id 盘点单
46
+     */
47
+    public Integer getId() {
48
+        return id;
49
+    }
50
+
51
+    /**
52
+     * 盘点单
53
+     * @param id 盘点单
54
+     */
55
+    public void setId(Integer id) {
56
+        this.id = id;
57
+    }
58
+
59
+    /**
60
+     * 盘点单号
61
+     * @return check_number 盘点单号
62
+     */
63
+    public String getCheckNumber() {
64
+        return checkNumber;
65
+    }
66
+
67
+    /**
68
+     * 盘点单号
69
+     * @param checkNumber 盘点单号
70
+     */
71
+    public void setCheckNumber(String checkNumber) {
72
+        this.checkNumber = checkNumber == null ? null : checkNumber.trim();
73
+    }
74
+
75
+    /**
76
+     * 盘点时间
77
+     * @return check_date 盘点时间
78
+     */
79
+    public Date getCheckDate() {
80
+        return checkDate;
81
+    }
82
+
83
+    /**
84
+     * 盘点时间
85
+     * @param checkDate 盘点时间
86
+     */
87
+    public void setCheckDate(Date checkDate) {
88
+        this.checkDate = checkDate;
89
+    }
90
+
91
+    /**
92
+     * 库名称
93
+     * @return depot_id 库名称
94
+     */
95
+    public Integer getDepotId() {
96
+        return depotId;
97
+    }
98
+
99
+    /**
100
+     * 库名称
101
+     * @param depotId 库名称
102
+     */
103
+    public void setDepotId(Integer depotId) {
104
+        this.depotId = depotId;
105
+    }
106
+
107
+    /**
108
+     * 负责人
109
+     * @return check_person 负责人
110
+     */
111
+    public String getCheckPerson() {
112
+        return checkPerson;
113
+    }
114
+
115
+    /**
116
+     * 负责人
117
+     * @param checkPerson 负责人
118
+     */
119
+    public void setCheckPerson(String checkPerson) {
120
+        this.checkPerson = checkPerson == null ? null : checkPerson.trim();
121
+    }
122
+
123
+    /**
124
+     * 盘点种类
125
+     * @return device_type 盘点种类
126
+     */
127
+    public String getDeviceType() {
128
+        return deviceType;
129
+    }
130
+
131
+    /**
132
+     * 盘点种类
133
+     * @param deviceType 盘点种类
134
+     */
135
+    public void setDeviceType(String deviceType) {
136
+        this.deviceType = deviceType == null ? null : deviceType.trim();
137
+    }
138
+
139
+    /**
140
+     * 器材名称
141
+     * @return device_name 器材名称
142
+     */
143
+    public String getDeviceName() {
144
+        return deviceName;
145
+    }
146
+
147
+    /**
148
+     * 器材名称
149
+     * @param deviceName 器材名称
150
+     */
151
+    public void setDeviceName(String deviceName) {
152
+        this.deviceName = deviceName == null ? null : deviceName.trim();
153
+    }
154
+
155
+    /**
156
+     * 规格型号
157
+     * @return model 规格型号
158
+     */
159
+    public String getModel() {
160
+        return model;
161
+    }
162
+
163
+    /**
164
+     * 规格型号
165
+     * @param model 规格型号
166
+     */
167
+    public void setModel(String model) {
168
+        this.model = model == null ? null : model.trim();
169
+    }
170
+
171
+    /**
172
+     * 库存数量
173
+     * @return store_count 库存数量
174
+     */
175
+    public Integer getStoreCount() {
176
+        return storeCount;
177
+    }
178
+
179
+    /**
180
+     * 库存数量
181
+     * @param storeCount 库存数量
182
+     */
183
+    public void setStoreCount(Integer storeCount) {
184
+        this.storeCount = storeCount;
185
+    }
186
+
187
+    /**
188
+     * 实际库存数量
189
+     * @return really_count 实际库存数量
190
+     */
191
+    public Integer getReallyCount() {
192
+        return reallyCount;
193
+    }
194
+
195
+    /**
196
+     * 实际库存数量
197
+     * @param reallyCount 实际库存数量
198
+     */
199
+    public void setReallyCount(Integer reallyCount) {
200
+        this.reallyCount = reallyCount;
201
+    }
202
+
203
+    /**
204
+     * 盘点情况
205
+     * @return check_result 盘点情况
206
+     */
207
+    public String getCheckResult() {
208
+        return checkResult;
209
+    }
210
+
211
+    /**
212
+     * 盘点情况
213
+     * @param checkResult 盘点情况
214
+     */
215
+    public void setCheckResult(String checkResult) {
216
+        this.checkResult = checkResult == null ? null : checkResult.trim();
217
+    }
218
+
219
+    /**
220
+     * 原因
221
+     * @return reason 原因
222
+     */
223
+    public String getReason() {
224
+        return reason;
225
+    }
226
+
227
+    /**
228
+     * 原因
229
+     * @param reason 原因
230
+     */
231
+    public void setReason(String reason) {
232
+        this.reason = reason == null ? null : reason.trim();
233
+    }
234
+
235
+    /**
236
+     * 组织id
237
+     * @return org_id 组织id
238
+     */
239
+    public Integer getOrgId() {
240
+        return orgId;
241
+    }
242
+
243
+    /**
244
+     * 组织id
245
+     * @param orgId 组织id
246
+     */
247
+    public void setOrgId(Integer orgId) {
248
+        this.orgId = orgId;
249
+    }
250
+}

File diff suppressed because it is too large
+ 1069 - 0
src/main/java/com/chinaitop/depot/device/model/StorageDevicecheckExample.java


+ 306 - 0
src/main/java/com/chinaitop/depot/device/model/StorageDeviceget.java

@@ -0,0 +1,306 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+import java.util.Date;
4
+
5
+public class StorageDeviceget {
6
+    private Integer id;
7
+
8
+    private Integer deviceType;
9
+
10
+    private Date getTime;
11
+
12
+    private String deviceName;
13
+
14
+    private String model;
15
+
16
+    private Integer getCount;
17
+
18
+    private Integer backCount;
19
+
20
+    private String bookKeeper;
21
+
22
+    private String handler;
23
+
24
+    private Integer houseId;
25
+
26
+    private String number;
27
+
28
+    private String collator;
29
+
30
+    private Integer useCount;
31
+
32
+    private String remark;
33
+
34
+    private Integer inputId;
35
+
36
+    private Integer orgId;
37
+    
38
+    //业务字段
39
+    private String orgName;
40
+    
41
+    
42
+
43
+    public String getOrgName() {
44
+		return orgName;
45
+	}
46
+
47
+	public void setOrgName(String orgName) {
48
+		this.orgName = orgName;
49
+	}
50
+
51
+    /**
52
+     * 领用表
53
+     * @return id 领用表
54
+     */
55
+    public Integer getId() {
56
+        return id;
57
+    }
58
+
59
+    /**
60
+     * 领用表
61
+     * @param id 领用表
62
+     */
63
+    public void setId(Integer id) {
64
+        this.id = id;
65
+    }
66
+
67
+    /**
68
+     * 类型
69
+     * @return device_type 类型
70
+     */
71
+    public Integer getDeviceType() {
72
+        return deviceType;
73
+    }
74
+
75
+    /**
76
+     * 类型
77
+     * @param deviceType 类型
78
+     */
79
+    public void setDeviceType(Integer deviceType) {
80
+        this.deviceType = deviceType;
81
+    }
82
+
83
+    /**
84
+     * 领用的时间
85
+     * @return get_time 领用的时间
86
+     */
87
+    public Date getGetTime() {
88
+        return getTime;
89
+    }
90
+
91
+    /**
92
+     * 领用的时间
93
+     * @param getTime 领用的时间
94
+     */
95
+    public void setGetTime(Date getTime) {
96
+        this.getTime = getTime;
97
+    }
98
+
99
+    /**
100
+     * 器材名称
101
+     * @return device_name 器材名称
102
+     */
103
+    public String getDeviceName() {
104
+        return deviceName;
105
+    }
106
+
107
+    /**
108
+     * 器材名称
109
+     * @param deviceName 器材名称
110
+     */
111
+    public void setDeviceName(String deviceName) {
112
+        this.deviceName = deviceName == null ? null : deviceName.trim();
113
+    }
114
+
115
+    /**
116
+     * 规格型号
117
+     * @return model 规格型号
118
+     */
119
+    public String getModel() {
120
+        return model;
121
+    }
122
+
123
+    /**
124
+     * 规格型号
125
+     * @param model 规格型号
126
+     */
127
+    public void setModel(String model) {
128
+        this.model = model == null ? null : model.trim();
129
+    }
130
+
131
+    /**
132
+     * 领用数量(可用)
133
+     * @return get_count 领用数量(可用)
134
+     */
135
+    public Integer getGetCount() {
136
+        return getCount;
137
+    }
138
+
139
+    /**
140
+     * 领用数量(可用)
141
+     * @param getCount 领用数量(可用)
142
+     */
143
+    public void setGetCount(Integer getCount) {
144
+        this.getCount = getCount;
145
+    }
146
+
147
+    /**
148
+     * 归还数量
149
+     * @return back_count 归还数量
150
+     */
151
+    public Integer getBackCount() {
152
+        return backCount;
153
+    }
154
+
155
+    /**
156
+     * 归还数量
157
+     * @param backCount 归还数量
158
+     */
159
+    public void setBackCount(Integer backCount) {
160
+        this.backCount = backCount;
161
+    }
162
+
163
+    /**
164
+     * 记账人
165
+     * @return book_keeper 记账人
166
+     */
167
+    public String getBookKeeper() {
168
+        return bookKeeper;
169
+    }
170
+
171
+    /**
172
+     * 记账人
173
+     * @param bookKeeper 记账人
174
+     */
175
+    public void setBookKeeper(String bookKeeper) {
176
+        this.bookKeeper = bookKeeper == null ? null : bookKeeper.trim();
177
+    }
178
+
179
+    /**
180
+     * 经手人
181
+     * @return handler 经手人
182
+     */
183
+    public String getHandler() {
184
+        return handler;
185
+    }
186
+
187
+    /**
188
+     * 经手人
189
+     * @param handler 经手人
190
+     */
191
+    public void setHandler(String handler) {
192
+        this.handler = handler == null ? null : handler.trim();
193
+    }
194
+
195
+    /**
196
+     * 领用到的仓房
197
+     * @return house_id 领用到的仓房
198
+     */
199
+    public Integer getHouseId() {
200
+        return houseId;
201
+    }
202
+
203
+    /**
204
+     * 领用到的仓房
205
+     * @param houseId 领用到的仓房
206
+     */
207
+    public void setHouseId(Integer houseId) {
208
+        this.houseId = houseId;
209
+    }
210
+
211
+    /**
212
+     * 设备编号
213
+     * @return number 设备编号
214
+     */
215
+    public String getNumber() {
216
+        return number;
217
+    }
218
+
219
+    /**
220
+     * 设备编号
221
+     * @param number 设备编号
222
+     */
223
+    public void setNumber(String number) {
224
+        this.number = number == null ? null : number.trim();
225
+    }
226
+
227
+    /**
228
+     * 核对人
229
+     * @return collator 核对人
230
+     */
231
+    public String getCollator() {
232
+        return collator;
233
+    }
234
+
235
+    /**
236
+     * 核对人
237
+     * @param collator 核对人
238
+     */
239
+    public void setCollator(String collator) {
240
+        this.collator = collator == null ? null : collator.trim();
241
+    }
242
+
243
+    /**
244
+     * 可用的数量
245
+     * @return use_count 可用的数量
246
+     */
247
+    public Integer getUseCount() {
248
+        return useCount;
249
+    }
250
+
251
+    /**
252
+     * 可用的数量
253
+     * @param useCount 可用的数量
254
+     */
255
+    public void setUseCount(Integer useCount) {
256
+        this.useCount = useCount;
257
+    }
258
+
259
+    /**
260
+     * 备注
261
+     * @return remark 备注
262
+     */
263
+    public String getRemark() {
264
+        return remark;
265
+    }
266
+
267
+    /**
268
+     * 备注
269
+     * @param remark 备注
270
+     */
271
+    public void setRemark(String remark) {
272
+        this.remark = remark == null ? null : remark.trim();
273
+    }
274
+
275
+    /**
276
+     * 关联入库的id
277
+     * @return input_id 关联入库的id
278
+     */
279
+    public Integer getInputId() {
280
+        return inputId;
281
+    }
282
+
283
+    /**
284
+     * 关联入库的id
285
+     * @param inputId 关联入库的id
286
+     */
287
+    public void setInputId(Integer inputId) {
288
+        this.inputId = inputId;
289
+    }
290
+
291
+    /**
292
+     * 组织id
293
+     * @return org_id 组织id
294
+     */
295
+    public Integer getOrgId() {
296
+        return orgId;
297
+    }
298
+
299
+    /**
300
+     * 组织id
301
+     * @param orgId 组织id
302
+     */
303
+    public void setOrgId(Integer orgId) {
304
+        this.orgId = orgId;
305
+    }
306
+}

File diff suppressed because it is too large
+ 1249 - 0
src/main/java/com/chinaitop/depot/device/model/StorageDevicegetExample.java


+ 458 - 0
src/main/java/com/chinaitop/depot/device/model/StorageDeviceinput.java

@@ -0,0 +1,458 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+import java.util.Date;
4
+
5
+public class StorageDeviceinput {
6
+    private Integer id;
7
+
8
+    private Integer deviceType;
9
+
10
+    private String deviceName;
11
+
12
+    private String model;
13
+
14
+    private Integer useCount;
15
+
16
+    private String deviceManager;
17
+
18
+    private Date inputTime;
19
+
20
+    private String number;
21
+
22
+    private String unit;
23
+
24
+    private Long devicePrice;
25
+
26
+    private String storageRack;
27
+
28
+    private String storageRackCell;
29
+
30
+    private String handler;
31
+
32
+    private String bookKeeper;
33
+
34
+    private String producer;
35
+
36
+    private String remark;
37
+
38
+    private Long serviceLife;
39
+
40
+    private Integer parentId;
41
+
42
+    private String position;
43
+
44
+    private Integer status;
45
+
46
+    private Integer brokenCount;
47
+
48
+    private Date produceTime;
49
+
50
+    private Integer orgId;
51
+    
52
+    //业务字段
53
+    private String orgName;
54
+    
55
+    //入库的器材名称
56
+    private String inputDeviceName;
57
+    
58
+    //存放地方
59
+    private String positionName;
60
+    
61
+    
62
+    
63
+    
64
+    
65
+    
66
+
67
+    public String getPositionName() {
68
+		return positionName;
69
+	}
70
+
71
+	public void setPositionName(String positionName) {
72
+		this.positionName = positionName;
73
+	}
74
+
75
+	public String getInputDeviceName() {
76
+		return inputDeviceName;
77
+	}
78
+
79
+	public void setInputDeviceName(String inputDeviceName) {
80
+		this.inputDeviceName = inputDeviceName;
81
+	}
82
+
83
+	public String getOrgName() {
84
+		return orgName;
85
+	}
86
+
87
+	public void setOrgName(String orgName) {
88
+		this.orgName = orgName;
89
+	}
90
+
91
+	/**
92
+     * 器材入库表
93
+     * @return id 器材入库表
94
+     */
95
+    public Integer getId() {
96
+        return id;
97
+    }
98
+
99
+    /**
100
+     * 器材入库表
101
+     * @param id 器材入库表
102
+     */
103
+    public void setId(Integer id) {
104
+        this.id = id;
105
+    }
106
+
107
+    /**
108
+     * 器材类型的id(4种、用id去关联)
109
+     * @return device_type 器材类型的id(4种、用id去关联)
110
+     */
111
+    public Integer getDeviceType() {
112
+        return deviceType;
113
+    }
114
+
115
+    /**
116
+     * 器材类型的id(4种、用id去关联)
117
+     * @param deviceType 器材类型的id(4种、用id去关联)
118
+     */
119
+    public void setDeviceType(Integer deviceType) {
120
+        this.deviceType = deviceType;
121
+    }
122
+
123
+    /**
124
+     * 器材名称
125
+     * @return device_name 器材名称
126
+     */
127
+    public String getDeviceName() {
128
+        return deviceName;
129
+    }
130
+
131
+    /**
132
+     * 器材名称
133
+     * @param deviceName 器材名称
134
+     */
135
+    public void setDeviceName(String deviceName) {
136
+        this.deviceName = deviceName == null ? null : deviceName.trim();
137
+    }
138
+
139
+    /**
140
+     * 规格型号
141
+     * @return model 规格型号
142
+     */
143
+    public String getModel() {
144
+        return model;
145
+    }
146
+
147
+    /**
148
+     * 规格型号
149
+     * @param model 规格型号
150
+     */
151
+    public void setModel(String model) {
152
+        this.model = model == null ? null : model.trim();
153
+    }
154
+
155
+    /**
156
+     * 库存数量(可用数量)
157
+     * @return use_count 库存数量(可用数量)
158
+     */
159
+    public Integer getUseCount() {
160
+        return useCount;
161
+    }
162
+
163
+    /**
164
+     * 库存数量(可用数量)
165
+     * @param useCount 库存数量(可用数量)
166
+     */
167
+    public void setUseCount(Integer useCount) {
168
+        this.useCount = useCount;
169
+    }
170
+
171
+    /**
172
+     * 器材的保管员
173
+     * @return device_manager 器材的保管员
174
+     */
175
+    public String getDeviceManager() {
176
+        return deviceManager;
177
+    }
178
+
179
+    /**
180
+     * 器材的保管员
181
+     * @param deviceManager 器材的保管员
182
+     */
183
+    public void setDeviceManager(String deviceManager) {
184
+        this.deviceManager = deviceManager == null ? null : deviceManager.trim();
185
+    }
186
+
187
+    /**
188
+     * 入库时间
189
+     * @return input_time 入库时间
190
+     */
191
+    public Date getInputTime() {
192
+        return inputTime;
193
+    }
194
+
195
+    /**
196
+     * 入库时间
197
+     * @param inputTime 入库时间
198
+     */
199
+    public void setInputTime(Date inputTime) {
200
+        this.inputTime = inputTime;
201
+    }
202
+
203
+    /**
204
+     * 资产编号
205
+     * @return number 资产编号
206
+     */
207
+    public String getNumber() {
208
+        return number;
209
+    }
210
+
211
+    /**
212
+     * 资产编号
213
+     * @param number 资产编号
214
+     */
215
+    public void setNumber(String number) {
216
+        this.number = number == null ? null : number.trim();
217
+    }
218
+
219
+    /**
220
+     * 单位
221
+     * @return unit 单位
222
+     */
223
+    public String getUnit() {
224
+        return unit;
225
+    }
226
+
227
+    /**
228
+     * 单位
229
+     * @param unit 单位
230
+     */
231
+    public void setUnit(String unit) {
232
+        this.unit = unit == null ? null : unit.trim();
233
+    }
234
+
235
+    /**
236
+     * 价格
237
+     * @return device_price 价格
238
+     */
239
+    public Long getDevicePrice() {
240
+        return devicePrice;
241
+    }
242
+
243
+    /**
244
+     * 价格
245
+     * @param devicePrice 价格
246
+     */
247
+    public void setDevicePrice(Long devicePrice) {
248
+        this.devicePrice = devicePrice;
249
+    }
250
+
251
+    /**
252
+     * 货架
253
+     * @return storage_rack 货架
254
+     */
255
+    public String getStorageRack() {
256
+        return storageRack;
257
+    }
258
+
259
+    /**
260
+     * 货架
261
+     * @param storageRack 货架
262
+     */
263
+    public void setStorageRack(String storageRack) {
264
+        this.storageRack = storageRack == null ? null : storageRack.trim();
265
+    }
266
+
267
+    /**
268
+     * 货位
269
+     * @return storage_rack_cell 货位
270
+     */
271
+    public String getStorageRackCell() {
272
+        return storageRackCell;
273
+    }
274
+
275
+    /**
276
+     * 货位
277
+     * @param storageRackCell 货位
278
+     */
279
+    public void setStorageRackCell(String storageRackCell) {
280
+        this.storageRackCell = storageRackCell == null ? null : storageRackCell.trim();
281
+    }
282
+
283
+    /**
284
+     * 经手人
285
+     * @return handler 经手人
286
+     */
287
+    public String getHandler() {
288
+        return handler;
289
+    }
290
+
291
+    /**
292
+     * 经手人
293
+     * @param handler 经手人
294
+     */
295
+    public void setHandler(String handler) {
296
+        this.handler = handler == null ? null : handler.trim();
297
+    }
298
+
299
+    /**
300
+     * 记账人
301
+     * @return book_keeper 记账人
302
+     */
303
+    public String getBookKeeper() {
304
+        return bookKeeper;
305
+    }
306
+
307
+    /**
308
+     * 记账人
309
+     * @param bookKeeper 记账人
310
+     */
311
+    public void setBookKeeper(String bookKeeper) {
312
+        this.bookKeeper = bookKeeper == null ? null : bookKeeper.trim();
313
+    }
314
+
315
+    /**
316
+     * 生产厂家
317
+     * @return producer 生产厂家
318
+     */
319
+    public String getProducer() {
320
+        return producer;
321
+    }
322
+
323
+    /**
324
+     * 生产厂家
325
+     * @param producer 生产厂家
326
+     */
327
+    public void setProducer(String producer) {
328
+        this.producer = producer == null ? null : producer.trim();
329
+    }
330
+
331
+    /**
332
+     * 备注
333
+     * @return remark 备注
334
+     */
335
+    public String getRemark() {
336
+        return remark;
337
+    }
338
+
339
+    /**
340
+     * 备注
341
+     * @param remark 备注
342
+     */
343
+    public void setRemark(String remark) {
344
+        this.remark = remark == null ? null : remark.trim();
345
+    }
346
+
347
+    /**
348
+     * 器材的使用年限
349
+     * @return service_life 器材的使用年限
350
+     */
351
+    public Long getServiceLife() {
352
+        return serviceLife;
353
+    }
354
+
355
+    /**
356
+     * 器材的使用年限
357
+     * @param serviceLife 器材的使用年限
358
+     */
359
+    public void setServiceLife(Long serviceLife) {
360
+        this.serviceLife = serviceLife;
361
+    }
362
+
363
+    /**
364
+     * 零配件与设备关联的id
365
+     * @return parent_id 零配件与设备关联的id
366
+     */
367
+    public Integer getParentId() {
368
+        return parentId;
369
+    }
370
+
371
+    /**
372
+     * 零配件与设备关联的id
373
+     * @param parentId 零配件与设备关联的id
374
+     */
375
+    public void setParentId(Integer parentId) {
376
+        this.parentId = parentId;
377
+    }
378
+
379
+    /**
380
+     * 存放位置
381
+     * @return position 存放位置
382
+     */
383
+    public String getPosition() {
384
+        return position;
385
+    }
386
+
387
+    /**
388
+     * 存放位置
389
+     * @param position 存放位置
390
+     */
391
+    public void setPosition(String position) {
392
+        this.position = position == null ? null : position.trim();
393
+    }
394
+
395
+    /**
396
+     * 设备状态(0:正常;1:报废; 2:保养;3:维修;4:领用;5:故障)
397
+     * @return status 设备状态(0:正常;1:报废; 2:保养;3:维修;4:领用;5:故障)
398
+     */
399
+    public Integer getStatus() {
400
+        return status;
401
+    }
402
+
403
+    /**
404
+     * 设备状态(0:正常;1:报废; 2:保养;3:维修;4:领用;5:故障)
405
+     * @param status 设备状态(0:正常;1:报废; 2:保养;3:维修;4:领用;5:故障)
406
+     */
407
+    public void setStatus(Integer status) {
408
+        this.status = status;
409
+    }
410
+
411
+    /**
412
+     * 故障数量
413
+     * @return broken_count 故障数量
414
+     */
415
+    public Integer getBrokenCount() {
416
+        return brokenCount;
417
+    }
418
+
419
+    /**
420
+     * 故障数量
421
+     * @param brokenCount 故障数量
422
+     */
423
+    public void setBrokenCount(Integer brokenCount) {
424
+        this.brokenCount = brokenCount;
425
+    }
426
+
427
+    /**
428
+     * 生产时间
429
+     * @return produce_time 生产时间
430
+     */
431
+    public Date getProduceTime() {
432
+        return produceTime;
433
+    }
434
+
435
+    /**
436
+     * 生产时间
437
+     * @param produceTime 生产时间
438
+     */
439
+    public void setProduceTime(Date produceTime) {
440
+        this.produceTime = produceTime;
441
+    }
442
+
443
+    /**
444
+     * 组织id
445
+     * @return org_id 组织id
446
+     */
447
+    public Integer getOrgId() {
448
+        return orgId;
449
+    }
450
+
451
+    /**
452
+     * 组织id
453
+     * @param orgId 组织id
454
+     */
455
+    public void setOrgId(Integer orgId) {
456
+        this.orgId = orgId;
457
+    }
458
+}

File diff suppressed because it is too large
+ 1719 - 0
src/main/java/com/chinaitop/depot/device/model/StorageDeviceinputExample.java


+ 237 - 0
src/main/java/com/chinaitop/depot/device/model/StorageDevicekeep.java

@@ -0,0 +1,237 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+import java.util.Date;
4
+
5
+public class StorageDevicekeep {
6
+    private Integer id;
7
+
8
+    private Integer orgId;
9
+
10
+    private String deviceName;
11
+
12
+    private String model;
13
+
14
+    private Date keepStart;
15
+
16
+    private Date keepEnd;
17
+
18
+    private String keeper;
19
+
20
+    private String deviceManager;
21
+
22
+    private String number;
23
+
24
+    private Integer keepStatus;
25
+
26
+    private Integer inputId;
27
+    
28
+  //业务字段
29
+    private String depotName;
30
+    
31
+    private String enumName;
32
+    
33
+    private String orgName;
34
+
35
+    
36
+    
37
+
38
+    public String getOrgName() {
39
+		return orgName;
40
+	}
41
+
42
+	public void setOrgName(String orgName) {
43
+		this.orgName = orgName;
44
+	}
45
+
46
+	public String getEnumName() {
47
+		return enumName;
48
+	}
49
+
50
+	public void setEnumName(String enumName) {
51
+		this.enumName = enumName;
52
+	}
53
+
54
+	public String getDepotName() {
55
+		return depotName;
56
+	}
57
+
58
+	public void setDepotName(String depotName) {
59
+		this.depotName = depotName;
60
+	}
61
+
62
+    /**
63
+     * 保养表
64
+     * @return id 保养表
65
+     */
66
+    public Integer getId() {
67
+        return id;
68
+    }
69
+
70
+    /**
71
+     * 保养表
72
+     * @param id 保养表
73
+     */
74
+    public void setId(Integer id) {
75
+        this.id = id;
76
+    }
77
+
78
+    /**
79
+     * 组织id
80
+     * @return org_id 组织id
81
+     */
82
+    public Integer getOrgId() {
83
+        return orgId;
84
+    }
85
+
86
+    /**
87
+     * 组织id
88
+     * @param orgId 组织id
89
+     */
90
+    public void setOrgId(Integer orgId) {
91
+        this.orgId = orgId;
92
+    }
93
+
94
+    /**
95
+     * 器材名称
96
+     * @return device_name 器材名称
97
+     */
98
+    public String getDeviceName() {
99
+        return deviceName;
100
+    }
101
+
102
+    /**
103
+     * 器材名称
104
+     * @param deviceName 器材名称
105
+     */
106
+    public void setDeviceName(String deviceName) {
107
+        this.deviceName = deviceName == null ? null : deviceName.trim();
108
+    }
109
+
110
+    /**
111
+     * 规格型号
112
+     * @return model 规格型号
113
+     */
114
+    public String getModel() {
115
+        return model;
116
+    }
117
+
118
+    /**
119
+     * 规格型号
120
+     * @param model 规格型号
121
+     */
122
+    public void setModel(String model) {
123
+        this.model = model == null ? null : model.trim();
124
+    }
125
+
126
+    /**
127
+     * 保养开始时间
128
+     * @return keep_start 保养开始时间
129
+     */
130
+    public Date getKeepStart() {
131
+        return keepStart;
132
+    }
133
+
134
+    /**
135
+     * 保养开始时间
136
+     * @param keepStart 保养开始时间
137
+     */
138
+    public void setKeepStart(Date keepStart) {
139
+        this.keepStart = keepStart;
140
+    }
141
+
142
+    /**
143
+     * 保养结束时间
144
+     * @return keep_end 保养结束时间
145
+     */
146
+    public Date getKeepEnd() {
147
+        return keepEnd;
148
+    }
149
+
150
+    /**
151
+     * 保养结束时间
152
+     * @param keepEnd 保养结束时间
153
+     */
154
+    public void setKeepEnd(Date keepEnd) {
155
+        this.keepEnd = keepEnd;
156
+    }
157
+
158
+    /**
159
+     * 保养负责人
160
+     * @return keeper 保养负责人
161
+     */
162
+    public String getKeeper() {
163
+        return keeper;
164
+    }
165
+
166
+    /**
167
+     * 保养负责人
168
+     * @param keeper 保养负责人
169
+     */
170
+    public void setKeeper(String keeper) {
171
+        this.keeper = keeper == null ? null : keeper.trim();
172
+    }
173
+
174
+    /**
175
+     * 设备管理员
176
+     * @return device_manager 设备管理员
177
+     */
178
+    public String getDeviceManager() {
179
+        return deviceManager;
180
+    }
181
+
182
+    /**
183
+     * 设备管理员
184
+     * @param deviceManager 设备管理员
185
+     */
186
+    public void setDeviceManager(String deviceManager) {
187
+        this.deviceManager = deviceManager == null ? null : deviceManager.trim();
188
+    }
189
+
190
+    /**
191
+     * 设备编号
192
+     * @return number 设备编号
193
+     */
194
+    public String getNumber() {
195
+        return number;
196
+    }
197
+
198
+    /**
199
+     * 设备编号
200
+     * @param number 设备编号
201
+     */
202
+    public void setNumber(String number) {
203
+        this.number = number == null ? null : number.trim();
204
+    }
205
+
206
+    /**
207
+     * 保养状态(0:正常 ,1:保养中)
208
+     * @return keep_status 保养状态(0:正常 ,1:保养中)
209
+     */
210
+    public Integer getKeepStatus() {
211
+        return keepStatus;
212
+    }
213
+
214
+    /**
215
+     * 保养状态(0:正常 ,1:保养中)
216
+     * @param keepStatus 保养状态(0:正常 ,1:保养中)
217
+     */
218
+    public void setKeepStatus(Integer keepStatus) {
219
+        this.keepStatus = keepStatus;
220
+    }
221
+
222
+    /**
223
+     * 关联入库表
224
+     * @return input_id 关联入库表
225
+     */
226
+    public Integer getInputId() {
227
+        return inputId;
228
+    }
229
+
230
+    /**
231
+     * 关联入库表
232
+     * @param inputId 关联入库表
233
+     */
234
+    public void setInputId(Integer inputId) {
235
+        this.inputId = inputId;
236
+    }
237
+}

+ 929 - 0
src/main/java/com/chinaitop/depot/device/model/StorageDevicekeepExample.java

@@ -0,0 +1,929 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+import java.util.ArrayList;
4
+import java.util.Date;
5
+import java.util.List;
6
+
7
+public class StorageDevicekeepExample {
8
+    /**
9
+     * storage_devicekeep
10
+     */
11
+    protected String orderByClause;
12
+
13
+    /**
14
+     * storage_devicekeep
15
+     */
16
+    protected boolean distinct;
17
+
18
+    /**
19
+     * storage_devicekeep
20
+     */
21
+    protected List<Criteria> oredCriteria;
22
+
23
+    public StorageDevicekeepExample() {
24
+        oredCriteria = new ArrayList<Criteria>();
25
+    }
26
+
27
+    public void setOrderByClause(String orderByClause) {
28
+        this.orderByClause = orderByClause;
29
+    }
30
+
31
+    public String getOrderByClause() {
32
+        return orderByClause;
33
+    }
34
+
35
+    public void setDistinct(boolean distinct) {
36
+        this.distinct = distinct;
37
+    }
38
+
39
+    public boolean isDistinct() {
40
+        return distinct;
41
+    }
42
+
43
+    public List<Criteria> getOredCriteria() {
44
+        return oredCriteria;
45
+    }
46
+
47
+    public void or(Criteria criteria) {
48
+        oredCriteria.add(criteria);
49
+    }
50
+
51
+    public Criteria or() {
52
+        Criteria criteria = createCriteriaInternal();
53
+        oredCriteria.add(criteria);
54
+        return criteria;
55
+    }
56
+
57
+    public Criteria createCriteria() {
58
+        Criteria criteria = createCriteriaInternal();
59
+        if (oredCriteria.size() == 0) {
60
+            oredCriteria.add(criteria);
61
+        }
62
+        return criteria;
63
+    }
64
+
65
+    protected Criteria createCriteriaInternal() {
66
+        Criteria criteria = new Criteria();
67
+        return criteria;
68
+    }
69
+
70
+    public void clear() {
71
+        oredCriteria.clear();
72
+        orderByClause = null;
73
+        distinct = false;
74
+    }
75
+
76
+    /**
77
+     * storage_devicekeep 2019-03-16
78
+     */
79
+    protected abstract static class GeneratedCriteria {
80
+        protected List<Criterion> criteria;
81
+
82
+        protected GeneratedCriteria() {
83
+            super();
84
+            criteria = new ArrayList<Criterion>();
85
+        }
86
+
87
+        public boolean isValid() {
88
+            return criteria.size() > 0;
89
+        }
90
+
91
+        public List<Criterion> getAllCriteria() {
92
+            return criteria;
93
+        }
94
+
95
+        public List<Criterion> getCriteria() {
96
+            return criteria;
97
+        }
98
+
99
+        protected void addCriterion(String condition) {
100
+            if (condition == null) {
101
+                throw new RuntimeException("Value for condition cannot be null");
102
+            }
103
+            criteria.add(new Criterion(condition));
104
+        }
105
+
106
+        protected void addCriterion(String condition, Object value, String property) {
107
+            if (value == null) {
108
+                throw new RuntimeException("Value for " + property + " cannot be null");
109
+            }
110
+            criteria.add(new Criterion(condition, value));
111
+        }
112
+
113
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
114
+            if (value1 == null || value2 == null) {
115
+                throw new RuntimeException("Between values for " + property + " cannot be null");
116
+            }
117
+            criteria.add(new Criterion(condition, value1, value2));
118
+        }
119
+
120
+        public Criteria andIdIsNull() {
121
+            addCriterion("id is null");
122
+            return (Criteria) this;
123
+        }
124
+
125
+        public Criteria andIdIsNotNull() {
126
+            addCriterion("id is not null");
127
+            return (Criteria) this;
128
+        }
129
+
130
+        public Criteria andIdEqualTo(Integer value) {
131
+            addCriterion("id =", value, "id");
132
+            return (Criteria) this;
133
+        }
134
+
135
+        public Criteria andIdNotEqualTo(Integer value) {
136
+            addCriterion("id <>", value, "id");
137
+            return (Criteria) this;
138
+        }
139
+
140
+        public Criteria andIdGreaterThan(Integer value) {
141
+            addCriterion("id >", value, "id");
142
+            return (Criteria) this;
143
+        }
144
+
145
+        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
146
+            addCriterion("id >=", value, "id");
147
+            return (Criteria) this;
148
+        }
149
+
150
+        public Criteria andIdLessThan(Integer value) {
151
+            addCriterion("id <", value, "id");
152
+            return (Criteria) this;
153
+        }
154
+
155
+        public Criteria andIdLessThanOrEqualTo(Integer value) {
156
+            addCriterion("id <=", value, "id");
157
+            return (Criteria) this;
158
+        }
159
+
160
+        public Criteria andIdIn(List<Integer> values) {
161
+            addCriterion("id in", values, "id");
162
+            return (Criteria) this;
163
+        }
164
+
165
+        public Criteria andIdNotIn(List<Integer> values) {
166
+            addCriterion("id not in", values, "id");
167
+            return (Criteria) this;
168
+        }
169
+
170
+        public Criteria andIdBetween(Integer value1, Integer value2) {
171
+            addCriterion("id between", value1, value2, "id");
172
+            return (Criteria) this;
173
+        }
174
+
175
+        public Criteria andIdNotBetween(Integer value1, Integer value2) {
176
+            addCriterion("id not between", value1, value2, "id");
177
+            return (Criteria) this;
178
+        }
179
+
180
+        public Criteria andOrgIdIsNull() {
181
+            addCriterion("org_id is null");
182
+            return (Criteria) this;
183
+        }
184
+
185
+        public Criteria andOrgIdIsNotNull() {
186
+            addCriterion("org_id is not null");
187
+            return (Criteria) this;
188
+        }
189
+
190
+        public Criteria andOrgIdEqualTo(Integer value) {
191
+            addCriterion("org_id =", value, "orgId");
192
+            return (Criteria) this;
193
+        }
194
+
195
+        public Criteria andOrgIdNotEqualTo(Integer value) {
196
+            addCriterion("org_id <>", value, "orgId");
197
+            return (Criteria) this;
198
+        }
199
+
200
+        public Criteria andOrgIdGreaterThan(Integer value) {
201
+            addCriterion("org_id >", value, "orgId");
202
+            return (Criteria) this;
203
+        }
204
+
205
+        public Criteria andOrgIdGreaterThanOrEqualTo(Integer value) {
206
+            addCriterion("org_id >=", value, "orgId");
207
+            return (Criteria) this;
208
+        }
209
+
210
+        public Criteria andOrgIdLessThan(Integer value) {
211
+            addCriterion("org_id <", value, "orgId");
212
+            return (Criteria) this;
213
+        }
214
+
215
+        public Criteria andOrgIdLessThanOrEqualTo(Integer value) {
216
+            addCriterion("org_id <=", value, "orgId");
217
+            return (Criteria) this;
218
+        }
219
+
220
+        public Criteria andOrgIdIn(List<Integer> values) {
221
+            addCriterion("org_id in", values, "orgId");
222
+            return (Criteria) this;
223
+        }
224
+
225
+        public Criteria andOrgIdNotIn(List<Integer> values) {
226
+            addCriterion("org_id not in", values, "orgId");
227
+            return (Criteria) this;
228
+        }
229
+
230
+        public Criteria andOrgIdBetween(Integer value1, Integer value2) {
231
+            addCriterion("org_id between", value1, value2, "orgId");
232
+            return (Criteria) this;
233
+        }
234
+
235
+        public Criteria andOrgIdNotBetween(Integer value1, Integer value2) {
236
+            addCriterion("org_id not between", value1, value2, "orgId");
237
+            return (Criteria) this;
238
+        }
239
+
240
+        public Criteria andDeviceNameIsNull() {
241
+            addCriterion("device_name is null");
242
+            return (Criteria) this;
243
+        }
244
+
245
+        public Criteria andDeviceNameIsNotNull() {
246
+            addCriterion("device_name is not null");
247
+            return (Criteria) this;
248
+        }
249
+
250
+        public Criteria andDeviceNameEqualTo(String value) {
251
+            addCriterion("device_name =", value, "deviceName");
252
+            return (Criteria) this;
253
+        }
254
+
255
+        public Criteria andDeviceNameNotEqualTo(String value) {
256
+            addCriterion("device_name <>", value, "deviceName");
257
+            return (Criteria) this;
258
+        }
259
+
260
+        public Criteria andDeviceNameGreaterThan(String value) {
261
+            addCriterion("device_name >", value, "deviceName");
262
+            return (Criteria) this;
263
+        }
264
+
265
+        public Criteria andDeviceNameGreaterThanOrEqualTo(String value) {
266
+            addCriterion("device_name >=", value, "deviceName");
267
+            return (Criteria) this;
268
+        }
269
+
270
+        public Criteria andDeviceNameLessThan(String value) {
271
+            addCriterion("device_name <", value, "deviceName");
272
+            return (Criteria) this;
273
+        }
274
+
275
+        public Criteria andDeviceNameLessThanOrEqualTo(String value) {
276
+            addCriterion("device_name <=", value, "deviceName");
277
+            return (Criteria) this;
278
+        }
279
+
280
+        public Criteria andDeviceNameLike(String value) {
281
+            addCriterion("device_name like", value, "deviceName");
282
+            return (Criteria) this;
283
+        }
284
+
285
+        public Criteria andDeviceNameNotLike(String value) {
286
+            addCriterion("device_name not like", value, "deviceName");
287
+            return (Criteria) this;
288
+        }
289
+
290
+        public Criteria andDeviceNameIn(List<String> values) {
291
+            addCriterion("device_name in", values, "deviceName");
292
+            return (Criteria) this;
293
+        }
294
+
295
+        public Criteria andDeviceNameNotIn(List<String> values) {
296
+            addCriterion("device_name not in", values, "deviceName");
297
+            return (Criteria) this;
298
+        }
299
+
300
+        public Criteria andDeviceNameBetween(String value1, String value2) {
301
+            addCriterion("device_name between", value1, value2, "deviceName");
302
+            return (Criteria) this;
303
+        }
304
+
305
+        public Criteria andDeviceNameNotBetween(String value1, String value2) {
306
+            addCriterion("device_name not between", value1, value2, "deviceName");
307
+            return (Criteria) this;
308
+        }
309
+
310
+        public Criteria andModelIsNull() {
311
+            addCriterion("model is null");
312
+            return (Criteria) this;
313
+        }
314
+
315
+        public Criteria andModelIsNotNull() {
316
+            addCriterion("model is not null");
317
+            return (Criteria) this;
318
+        }
319
+
320
+        public Criteria andModelEqualTo(String value) {
321
+            addCriterion("model =", value, "model");
322
+            return (Criteria) this;
323
+        }
324
+
325
+        public Criteria andModelNotEqualTo(String value) {
326
+            addCriterion("model <>", value, "model");
327
+            return (Criteria) this;
328
+        }
329
+
330
+        public Criteria andModelGreaterThan(String value) {
331
+            addCriterion("model >", value, "model");
332
+            return (Criteria) this;
333
+        }
334
+
335
+        public Criteria andModelGreaterThanOrEqualTo(String value) {
336
+            addCriterion("model >=", value, "model");
337
+            return (Criteria) this;
338
+        }
339
+
340
+        public Criteria andModelLessThan(String value) {
341
+            addCriterion("model <", value, "model");
342
+            return (Criteria) this;
343
+        }
344
+
345
+        public Criteria andModelLessThanOrEqualTo(String value) {
346
+            addCriterion("model <=", value, "model");
347
+            return (Criteria) this;
348
+        }
349
+
350
+        public Criteria andModelLike(String value) {
351
+            addCriterion("model like", value, "model");
352
+            return (Criteria) this;
353
+        }
354
+
355
+        public Criteria andModelNotLike(String value) {
356
+            addCriterion("model not like", value, "model");
357
+            return (Criteria) this;
358
+        }
359
+
360
+        public Criteria andModelIn(List<String> values) {
361
+            addCriterion("model in", values, "model");
362
+            return (Criteria) this;
363
+        }
364
+
365
+        public Criteria andModelNotIn(List<String> values) {
366
+            addCriterion("model not in", values, "model");
367
+            return (Criteria) this;
368
+        }
369
+
370
+        public Criteria andModelBetween(String value1, String value2) {
371
+            addCriterion("model between", value1, value2, "model");
372
+            return (Criteria) this;
373
+        }
374
+
375
+        public Criteria andModelNotBetween(String value1, String value2) {
376
+            addCriterion("model not between", value1, value2, "model");
377
+            return (Criteria) this;
378
+        }
379
+
380
+        public Criteria andKeepStartIsNull() {
381
+            addCriterion("keep_start is null");
382
+            return (Criteria) this;
383
+        }
384
+
385
+        public Criteria andKeepStartIsNotNull() {
386
+            addCriterion("keep_start is not null");
387
+            return (Criteria) this;
388
+        }
389
+
390
+        public Criteria andKeepStartEqualTo(Date value) {
391
+            addCriterion("keep_start =", value, "keepStart");
392
+            return (Criteria) this;
393
+        }
394
+
395
+        public Criteria andKeepStartNotEqualTo(Date value) {
396
+            addCriterion("keep_start <>", value, "keepStart");
397
+            return (Criteria) this;
398
+        }
399
+
400
+        public Criteria andKeepStartGreaterThan(Date value) {
401
+            addCriterion("keep_start >", value, "keepStart");
402
+            return (Criteria) this;
403
+        }
404
+
405
+        public Criteria andKeepStartGreaterThanOrEqualTo(Date value) {
406
+            addCriterion("keep_start >=", value, "keepStart");
407
+            return (Criteria) this;
408
+        }
409
+
410
+        public Criteria andKeepStartLessThan(Date value) {
411
+            addCriterion("keep_start <", value, "keepStart");
412
+            return (Criteria) this;
413
+        }
414
+
415
+        public Criteria andKeepStartLessThanOrEqualTo(Date value) {
416
+            addCriterion("keep_start <=", value, "keepStart");
417
+            return (Criteria) this;
418
+        }
419
+
420
+        public Criteria andKeepStartIn(List<Date> values) {
421
+            addCriterion("keep_start in", values, "keepStart");
422
+            return (Criteria) this;
423
+        }
424
+
425
+        public Criteria andKeepStartNotIn(List<Date> values) {
426
+            addCriterion("keep_start not in", values, "keepStart");
427
+            return (Criteria) this;
428
+        }
429
+
430
+        public Criteria andKeepStartBetween(Date value1, Date value2) {
431
+            addCriterion("keep_start between", value1, value2, "keepStart");
432
+            return (Criteria) this;
433
+        }
434
+
435
+        public Criteria andKeepStartNotBetween(Date value1, Date value2) {
436
+            addCriterion("keep_start not between", value1, value2, "keepStart");
437
+            return (Criteria) this;
438
+        }
439
+
440
+        public Criteria andKeepEndIsNull() {
441
+            addCriterion("keep_end is null");
442
+            return (Criteria) this;
443
+        }
444
+
445
+        public Criteria andKeepEndIsNotNull() {
446
+            addCriterion("keep_end is not null");
447
+            return (Criteria) this;
448
+        }
449
+
450
+        public Criteria andKeepEndEqualTo(Date value) {
451
+            addCriterion("keep_end =", value, "keepEnd");
452
+            return (Criteria) this;
453
+        }
454
+
455
+        public Criteria andKeepEndNotEqualTo(Date value) {
456
+            addCriterion("keep_end <>", value, "keepEnd");
457
+            return (Criteria) this;
458
+        }
459
+
460
+        public Criteria andKeepEndGreaterThan(Date value) {
461
+            addCriterion("keep_end >", value, "keepEnd");
462
+            return (Criteria) this;
463
+        }
464
+
465
+        public Criteria andKeepEndGreaterThanOrEqualTo(Date value) {
466
+            addCriterion("keep_end >=", value, "keepEnd");
467
+            return (Criteria) this;
468
+        }
469
+
470
+        public Criteria andKeepEndLessThan(Date value) {
471
+            addCriterion("keep_end <", value, "keepEnd");
472
+            return (Criteria) this;
473
+        }
474
+
475
+        public Criteria andKeepEndLessThanOrEqualTo(Date value) {
476
+            addCriterion("keep_end <=", value, "keepEnd");
477
+            return (Criteria) this;
478
+        }
479
+
480
+        public Criteria andKeepEndIn(List<Date> values) {
481
+            addCriterion("keep_end in", values, "keepEnd");
482
+            return (Criteria) this;
483
+        }
484
+
485
+        public Criteria andKeepEndNotIn(List<Date> values) {
486
+            addCriterion("keep_end not in", values, "keepEnd");
487
+            return (Criteria) this;
488
+        }
489
+
490
+        public Criteria andKeepEndBetween(Date value1, Date value2) {
491
+            addCriterion("keep_end between", value1, value2, "keepEnd");
492
+            return (Criteria) this;
493
+        }
494
+
495
+        public Criteria andKeepEndNotBetween(Date value1, Date value2) {
496
+            addCriterion("keep_end not between", value1, value2, "keepEnd");
497
+            return (Criteria) this;
498
+        }
499
+
500
+        public Criteria andKeeperIsNull() {
501
+            addCriterion("keeper is null");
502
+            return (Criteria) this;
503
+        }
504
+
505
+        public Criteria andKeeperIsNotNull() {
506
+            addCriterion("keeper is not null");
507
+            return (Criteria) this;
508
+        }
509
+
510
+        public Criteria andKeeperEqualTo(String value) {
511
+            addCriterion("keeper =", value, "keeper");
512
+            return (Criteria) this;
513
+        }
514
+
515
+        public Criteria andKeeperNotEqualTo(String value) {
516
+            addCriterion("keeper <>", value, "keeper");
517
+            return (Criteria) this;
518
+        }
519
+
520
+        public Criteria andKeeperGreaterThan(String value) {
521
+            addCriterion("keeper >", value, "keeper");
522
+            return (Criteria) this;
523
+        }
524
+
525
+        public Criteria andKeeperGreaterThanOrEqualTo(String value) {
526
+            addCriterion("keeper >=", value, "keeper");
527
+            return (Criteria) this;
528
+        }
529
+
530
+        public Criteria andKeeperLessThan(String value) {
531
+            addCriterion("keeper <", value, "keeper");
532
+            return (Criteria) this;
533
+        }
534
+
535
+        public Criteria andKeeperLessThanOrEqualTo(String value) {
536
+            addCriterion("keeper <=", value, "keeper");
537
+            return (Criteria) this;
538
+        }
539
+
540
+        public Criteria andKeeperLike(String value) {
541
+            addCriterion("keeper like", value, "keeper");
542
+            return (Criteria) this;
543
+        }
544
+
545
+        public Criteria andKeeperNotLike(String value) {
546
+            addCriterion("keeper not like", value, "keeper");
547
+            return (Criteria) this;
548
+        }
549
+
550
+        public Criteria andKeeperIn(List<String> values) {
551
+            addCriterion("keeper in", values, "keeper");
552
+            return (Criteria) this;
553
+        }
554
+
555
+        public Criteria andKeeperNotIn(List<String> values) {
556
+            addCriterion("keeper not in", values, "keeper");
557
+            return (Criteria) this;
558
+        }
559
+
560
+        public Criteria andKeeperBetween(String value1, String value2) {
561
+            addCriterion("keeper between", value1, value2, "keeper");
562
+            return (Criteria) this;
563
+        }
564
+
565
+        public Criteria andKeeperNotBetween(String value1, String value2) {
566
+            addCriterion("keeper not between", value1, value2, "keeper");
567
+            return (Criteria) this;
568
+        }
569
+
570
+        public Criteria andDeviceManagerIsNull() {
571
+            addCriterion("device_manager is null");
572
+            return (Criteria) this;
573
+        }
574
+
575
+        public Criteria andDeviceManagerIsNotNull() {
576
+            addCriterion("device_manager is not null");
577
+            return (Criteria) this;
578
+        }
579
+
580
+        public Criteria andDeviceManagerEqualTo(String value) {
581
+            addCriterion("device_manager =", value, "deviceManager");
582
+            return (Criteria) this;
583
+        }
584
+
585
+        public Criteria andDeviceManagerNotEqualTo(String value) {
586
+            addCriterion("device_manager <>", value, "deviceManager");
587
+            return (Criteria) this;
588
+        }
589
+
590
+        public Criteria andDeviceManagerGreaterThan(String value) {
591
+            addCriterion("device_manager >", value, "deviceManager");
592
+            return (Criteria) this;
593
+        }
594
+
595
+        public Criteria andDeviceManagerGreaterThanOrEqualTo(String value) {
596
+            addCriterion("device_manager >=", value, "deviceManager");
597
+            return (Criteria) this;
598
+        }
599
+
600
+        public Criteria andDeviceManagerLessThan(String value) {
601
+            addCriterion("device_manager <", value, "deviceManager");
602
+            return (Criteria) this;
603
+        }
604
+
605
+        public Criteria andDeviceManagerLessThanOrEqualTo(String value) {
606
+            addCriterion("device_manager <=", value, "deviceManager");
607
+            return (Criteria) this;
608
+        }
609
+
610
+        public Criteria andDeviceManagerLike(String value) {
611
+            addCriterion("device_manager like", value, "deviceManager");
612
+            return (Criteria) this;
613
+        }
614
+
615
+        public Criteria andDeviceManagerNotLike(String value) {
616
+            addCriterion("device_manager not like", value, "deviceManager");
617
+            return (Criteria) this;
618
+        }
619
+
620
+        public Criteria andDeviceManagerIn(List<String> values) {
621
+            addCriterion("device_manager in", values, "deviceManager");
622
+            return (Criteria) this;
623
+        }
624
+
625
+        public Criteria andDeviceManagerNotIn(List<String> values) {
626
+            addCriterion("device_manager not in", values, "deviceManager");
627
+            return (Criteria) this;
628
+        }
629
+
630
+        public Criteria andDeviceManagerBetween(String value1, String value2) {
631
+            addCriterion("device_manager between", value1, value2, "deviceManager");
632
+            return (Criteria) this;
633
+        }
634
+
635
+        public Criteria andDeviceManagerNotBetween(String value1, String value2) {
636
+            addCriterion("device_manager not between", value1, value2, "deviceManager");
637
+            return (Criteria) this;
638
+        }
639
+
640
+        public Criteria andNumberIsNull() {
641
+            addCriterion("number is null");
642
+            return (Criteria) this;
643
+        }
644
+
645
+        public Criteria andNumberIsNotNull() {
646
+            addCriterion("number is not null");
647
+            return (Criteria) this;
648
+        }
649
+
650
+        public Criteria andNumberEqualTo(String value) {
651
+            addCriterion("number =", value, "number");
652
+            return (Criteria) this;
653
+        }
654
+
655
+        public Criteria andNumberNotEqualTo(String value) {
656
+            addCriterion("number <>", value, "number");
657
+            return (Criteria) this;
658
+        }
659
+
660
+        public Criteria andNumberGreaterThan(String value) {
661
+            addCriterion("number >", value, "number");
662
+            return (Criteria) this;
663
+        }
664
+
665
+        public Criteria andNumberGreaterThanOrEqualTo(String value) {
666
+            addCriterion("number >=", value, "number");
667
+            return (Criteria) this;
668
+        }
669
+
670
+        public Criteria andNumberLessThan(String value) {
671
+            addCriterion("number <", value, "number");
672
+            return (Criteria) this;
673
+        }
674
+
675
+        public Criteria andNumberLessThanOrEqualTo(String value) {
676
+            addCriterion("number <=", value, "number");
677
+            return (Criteria) this;
678
+        }
679
+
680
+        public Criteria andNumberLike(String value) {
681
+            addCriterion("number like", value, "number");
682
+            return (Criteria) this;
683
+        }
684
+
685
+        public Criteria andNumberNotLike(String value) {
686
+            addCriterion("number not like", value, "number");
687
+            return (Criteria) this;
688
+        }
689
+
690
+        public Criteria andNumberIn(List<String> values) {
691
+            addCriterion("number in", values, "number");
692
+            return (Criteria) this;
693
+        }
694
+
695
+        public Criteria andNumberNotIn(List<String> values) {
696
+            addCriterion("number not in", values, "number");
697
+            return (Criteria) this;
698
+        }
699
+
700
+        public Criteria andNumberBetween(String value1, String value2) {
701
+            addCriterion("number between", value1, value2, "number");
702
+            return (Criteria) this;
703
+        }
704
+
705
+        public Criteria andNumberNotBetween(String value1, String value2) {
706
+            addCriterion("number not between", value1, value2, "number");
707
+            return (Criteria) this;
708
+        }
709
+
710
+        public Criteria andKeepStatusIsNull() {
711
+            addCriterion("keep_status is null");
712
+            return (Criteria) this;
713
+        }
714
+
715
+        public Criteria andKeepStatusIsNotNull() {
716
+            addCriterion("keep_status is not null");
717
+            return (Criteria) this;
718
+        }
719
+
720
+        public Criteria andKeepStatusEqualTo(Integer value) {
721
+            addCriterion("keep_status =", value, "keepStatus");
722
+            return (Criteria) this;
723
+        }
724
+
725
+        public Criteria andKeepStatusNotEqualTo(Integer value) {
726
+            addCriterion("keep_status <>", value, "keepStatus");
727
+            return (Criteria) this;
728
+        }
729
+
730
+        public Criteria andKeepStatusGreaterThan(Integer value) {
731
+            addCriterion("keep_status >", value, "keepStatus");
732
+            return (Criteria) this;
733
+        }
734
+
735
+        public Criteria andKeepStatusGreaterThanOrEqualTo(Integer value) {
736
+            addCriterion("keep_status >=", value, "keepStatus");
737
+            return (Criteria) this;
738
+        }
739
+
740
+        public Criteria andKeepStatusLessThan(Integer value) {
741
+            addCriterion("keep_status <", value, "keepStatus");
742
+            return (Criteria) this;
743
+        }
744
+
745
+        public Criteria andKeepStatusLessThanOrEqualTo(Integer value) {
746
+            addCriterion("keep_status <=", value, "keepStatus");
747
+            return (Criteria) this;
748
+        }
749
+
750
+        public Criteria andKeepStatusIn(List<Integer> values) {
751
+            addCriterion("keep_status in", values, "keepStatus");
752
+            return (Criteria) this;
753
+        }
754
+
755
+        public Criteria andKeepStatusNotIn(List<Integer> values) {
756
+            addCriterion("keep_status not in", values, "keepStatus");
757
+            return (Criteria) this;
758
+        }
759
+
760
+        public Criteria andKeepStatusBetween(Integer value1, Integer value2) {
761
+            addCriterion("keep_status between", value1, value2, "keepStatus");
762
+            return (Criteria) this;
763
+        }
764
+
765
+        public Criteria andKeepStatusNotBetween(Integer value1, Integer value2) {
766
+            addCriterion("keep_status not between", value1, value2, "keepStatus");
767
+            return (Criteria) this;
768
+        }
769
+
770
+        public Criteria andInputIdIsNull() {
771
+            addCriterion("input_id is null");
772
+            return (Criteria) this;
773
+        }
774
+
775
+        public Criteria andInputIdIsNotNull() {
776
+            addCriterion("input_id is not null");
777
+            return (Criteria) this;
778
+        }
779
+
780
+        public Criteria andInputIdEqualTo(Integer value) {
781
+            addCriterion("input_id =", value, "inputId");
782
+            return (Criteria) this;
783
+        }
784
+
785
+        public Criteria andInputIdNotEqualTo(Integer value) {
786
+            addCriterion("input_id <>", value, "inputId");
787
+            return (Criteria) this;
788
+        }
789
+
790
+        public Criteria andInputIdGreaterThan(Integer value) {
791
+            addCriterion("input_id >", value, "inputId");
792
+            return (Criteria) this;
793
+        }
794
+
795
+        public Criteria andInputIdGreaterThanOrEqualTo(Integer value) {
796
+            addCriterion("input_id >=", value, "inputId");
797
+            return (Criteria) this;
798
+        }
799
+
800
+        public Criteria andInputIdLessThan(Integer value) {
801
+            addCriterion("input_id <", value, "inputId");
802
+            return (Criteria) this;
803
+        }
804
+
805
+        public Criteria andInputIdLessThanOrEqualTo(Integer value) {
806
+            addCriterion("input_id <=", value, "inputId");
807
+            return (Criteria) this;
808
+        }
809
+
810
+        public Criteria andInputIdIn(List<Integer> values) {
811
+            addCriterion("input_id in", values, "inputId");
812
+            return (Criteria) this;
813
+        }
814
+
815
+        public Criteria andInputIdNotIn(List<Integer> values) {
816
+            addCriterion("input_id not in", values, "inputId");
817
+            return (Criteria) this;
818
+        }
819
+
820
+        public Criteria andInputIdBetween(Integer value1, Integer value2) {
821
+            addCriterion("input_id between", value1, value2, "inputId");
822
+            return (Criteria) this;
823
+        }
824
+
825
+        public Criteria andInputIdNotBetween(Integer value1, Integer value2) {
826
+            addCriterion("input_id not between", value1, value2, "inputId");
827
+            return (Criteria) this;
828
+        }
829
+    }
830
+
831
+    /**
832
+     * storage_devicekeep
833
+     */
834
+    public static class Criteria extends GeneratedCriteria {
835
+
836
+        protected Criteria() {
837
+            super();
838
+        }
839
+    }
840
+
841
+    /**
842
+     * storage_devicekeep 2019-03-16
843
+     */
844
+    public static class Criterion {
845
+        private String condition;
846
+
847
+        private Object value;
848
+
849
+        private Object secondValue;
850
+
851
+        private boolean noValue;
852
+
853
+        private boolean singleValue;
854
+
855
+        private boolean betweenValue;
856
+
857
+        private boolean listValue;
858
+
859
+        private String typeHandler;
860
+
861
+        public String getCondition() {
862
+            return condition;
863
+        }
864
+
865
+        public Object getValue() {
866
+            return value;
867
+        }
868
+
869
+        public Object getSecondValue() {
870
+            return secondValue;
871
+        }
872
+
873
+        public boolean isNoValue() {
874
+            return noValue;
875
+        }
876
+
877
+        public boolean isSingleValue() {
878
+            return singleValue;
879
+        }
880
+
881
+        public boolean isBetweenValue() {
882
+            return betweenValue;
883
+        }
884
+
885
+        public boolean isListValue() {
886
+            return listValue;
887
+        }
888
+
889
+        public String getTypeHandler() {
890
+            return typeHandler;
891
+        }
892
+
893
+        protected Criterion(String condition) {
894
+            super();
895
+            this.condition = condition;
896
+            this.typeHandler = null;
897
+            this.noValue = true;
898
+        }
899
+
900
+        protected Criterion(String condition, Object value, String typeHandler) {
901
+            super();
902
+            this.condition = condition;
903
+            this.value = value;
904
+            this.typeHandler = typeHandler;
905
+            if (value instanceof List<?>) {
906
+                this.listValue = true;
907
+            } else {
908
+                this.singleValue = true;
909
+            }
910
+        }
911
+
912
+        protected Criterion(String condition, Object value) {
913
+            this(condition, value, null);
914
+        }
915
+
916
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
917
+            super();
918
+            this.condition = condition;
919
+            this.value = value;
920
+            this.secondValue = secondValue;
921
+            this.typeHandler = typeHandler;
922
+            this.betweenValue = true;
923
+        }
924
+
925
+        protected Criterion(String condition, Object value, Object secondValue) {
926
+            this(condition, value, secondValue, null);
927
+        }
928
+    }
929
+}

+ 264 - 0
src/main/java/com/chinaitop/depot/device/model/StorageDevicerepair.java

@@ -0,0 +1,264 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+import java.util.Date;
4
+
5
+public class StorageDevicerepair {
6
+    private Integer id;
7
+
8
+    private Integer orgId;
9
+
10
+    private String deviceName;
11
+
12
+    private String model;
13
+
14
+    private String number;
15
+
16
+    private Date repairStart;
17
+
18
+    private Date repairEnd;
19
+
20
+    private String repairer;
21
+
22
+    private String deviceManager;
23
+
24
+    private Integer repairSumnumber;
25
+
26
+    private Integer repairStatus;
27
+
28
+    private Integer repairNumber;
29
+
30
+    private String remark;
31
+    
32
+  //业务字段
33
+    private String depotName;
34
+    
35
+    private String orgName;
36
+
37
+    
38
+    
39
+
40
+    public String getOrgName() {
41
+		return orgName;
42
+	}
43
+
44
+	public void setOrgName(String orgName) {
45
+		this.orgName = orgName;
46
+	}
47
+
48
+	public String getDepotName() {
49
+		return depotName;
50
+	}
51
+
52
+	public void setDepotName(String depotName) {
53
+		this.depotName = depotName;
54
+	}
55
+
56
+
57
+    /**
58
+     * 维修表
59
+     * @return id 维修表
60
+     */
61
+    public Integer getId() {
62
+        return id;
63
+    }
64
+
65
+    /**
66
+     * 维修表
67
+     * @param id 维修表
68
+     */
69
+    public void setId(Integer id) {
70
+        this.id = id;
71
+    }
72
+
73
+    /**
74
+     * 组织id
75
+     * @return org_id 组织id
76
+     */
77
+    public Integer getOrgId() {
78
+        return orgId;
79
+    }
80
+
81
+    /**
82
+     * 组织id
83
+     * @param orgId 组织id
84
+     */
85
+    public void setOrgId(Integer orgId) {
86
+        this.orgId = orgId;
87
+    }
88
+
89
+    /**
90
+     * 器材名称
91
+     * @return device_name 器材名称
92
+     */
93
+    public String getDeviceName() {
94
+        return deviceName;
95
+    }
96
+
97
+    /**
98
+     * 器材名称
99
+     * @param deviceName 器材名称
100
+     */
101
+    public void setDeviceName(String deviceName) {
102
+        this.deviceName = deviceName == null ? null : deviceName.trim();
103
+    }
104
+
105
+    /**
106
+     * 规格型号
107
+     * @return model 规格型号
108
+     */
109
+    public String getModel() {
110
+        return model;
111
+    }
112
+
113
+    /**
114
+     * 规格型号
115
+     * @param model 规格型号
116
+     */
117
+    public void setModel(String model) {
118
+        this.model = model == null ? null : model.trim();
119
+    }
120
+
121
+    /**
122
+     * 设备编号
123
+     * @return number 设备编号
124
+     */
125
+    public String getNumber() {
126
+        return number;
127
+    }
128
+
129
+    /**
130
+     * 设备编号
131
+     * @param number 设备编号
132
+     */
133
+    public void setNumber(String number) {
134
+        this.number = number == null ? null : number.trim();
135
+    }
136
+
137
+    /**
138
+     * 维修开始时间
139
+     * @return repair_start 维修开始时间
140
+     */
141
+    public Date getRepairStart() {
142
+        return repairStart;
143
+    }
144
+
145
+    /**
146
+     * 维修开始时间
147
+     * @param repairStart 维修开始时间
148
+     */
149
+    public void setRepairStart(Date repairStart) {
150
+        this.repairStart = repairStart;
151
+    }
152
+
153
+    /**
154
+     * 维修结束时间
155
+     * @return repair_end 维修结束时间
156
+     */
157
+    public Date getRepairEnd() {
158
+        return repairEnd;
159
+    }
160
+
161
+    /**
162
+     * 维修结束时间
163
+     * @param repairEnd 维修结束时间
164
+     */
165
+    public void setRepairEnd(Date repairEnd) {
166
+        this.repairEnd = repairEnd;
167
+    }
168
+
169
+    /**
170
+     * 维修负责人
171
+     * @return repairer 维修负责人
172
+     */
173
+    public String getRepairer() {
174
+        return repairer;
175
+    }
176
+
177
+    /**
178
+     * 维修负责人
179
+     * @param repairer 维修负责人
180
+     */
181
+    public void setRepairer(String repairer) {
182
+        this.repairer = repairer == null ? null : repairer.trim();
183
+    }
184
+
185
+    /**
186
+     * 设备负责人
187
+     * @return device_manager 设备负责人
188
+     */
189
+    public String getDeviceManager() {
190
+        return deviceManager;
191
+    }
192
+
193
+    /**
194
+     * 设备负责人
195
+     * @param deviceManager 设备负责人
196
+     */
197
+    public void setDeviceManager(String deviceManager) {
198
+        this.deviceManager = deviceManager == null ? null : deviceManager.trim();
199
+    }
200
+
201
+    /**
202
+     * 可以维修的总数量
203
+     * @return repair_sumnumber 可以维修的总数量
204
+     */
205
+    public Integer getRepairSumnumber() {
206
+        return repairSumnumber;
207
+    }
208
+
209
+    /**
210
+     * 可以维修的总数量
211
+     * @param repairSumnumber 可以维修的总数量
212
+     */
213
+    public void setRepairSumnumber(Integer repairSumnumber) {
214
+        this.repairSumnumber = repairSumnumber;
215
+    }
216
+
217
+    /**
218
+     * 维修状态(0:正常,1:维修中,2:故障)
219
+     * @return repair_status 维修状态(0:正常,1:维修中,2:故障)
220
+     */
221
+    public Integer getRepairStatus() {
222
+        return repairStatus;
223
+    }
224
+
225
+    /**
226
+     * 维修状态(0:正常,1:维修中,2:故障)
227
+     * @param repairStatus 维修状态(0:正常,1:维修中,2:故障)
228
+     */
229
+    public void setRepairStatus(Integer repairStatus) {
230
+        this.repairStatus = repairStatus;
231
+    }
232
+
233
+    /**
234
+     * 要维修的数量
235
+     * @return repair_number 要维修的数量
236
+     */
237
+    public Integer getRepairNumber() {
238
+        return repairNumber;
239
+    }
240
+
241
+    /**
242
+     * 要维修的数量
243
+     * @param repairNumber 要维修的数量
244
+     */
245
+    public void setRepairNumber(Integer repairNumber) {
246
+        this.repairNumber = repairNumber;
247
+    }
248
+
249
+    /**
250
+     * 备注
251
+     * @return remark 备注
252
+     */
253
+    public String getRemark() {
254
+        return remark;
255
+    }
256
+
257
+    /**
258
+     * 备注
259
+     * @param remark 备注
260
+     */
261
+    public void setRemark(String remark) {
262
+        this.remark = remark == null ? null : remark.trim();
263
+    }
264
+}

File diff suppressed because it is too large
+ 1059 - 0
src/main/java/com/chinaitop/depot/device/model/StorageDevicerepairExample.java


+ 383 - 0
src/main/java/com/chinaitop/depot/device/model/SystemLog.java

@@ -0,0 +1,383 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+import java.util.Date;
4
+
5
+public class SystemLog {
6
+    private String id;
7
+
8
+    private Integer orgId;
9
+
10
+    private Integer userId;
11
+
12
+    private String userZh;
13
+
14
+    private String userName;
15
+
16
+    private String userRole;
17
+
18
+    private String userAddress;
19
+
20
+    private Date dlTime;
21
+
22
+    private Date zxTime;
23
+
24
+    private Integer funcId;
25
+
26
+    private String funcName;
27
+
28
+    private Integer btnId;
29
+
30
+    private String methodName;
31
+
32
+    private String operResult;
33
+
34
+    private String parameter;
35
+
36
+    private String rtnParam;
37
+
38
+    private String describes;
39
+
40
+    private String type;
41
+
42
+    private String deviceIp;
43
+
44
+    private String systemIdentify;
45
+
46
+    private Date operationTime;
47
+
48
+    /**
49
+     * 主键
50
+     * @return id 主键
51
+     */
52
+    public String getId() {
53
+        return id;
54
+    }
55
+
56
+    /**
57
+     * 主键
58
+     * @param id 主键
59
+     */
60
+    public void setId(String id) {
61
+        this.id = id == null ? null : id.trim();
62
+    }
63
+
64
+    /**
65
+     * 机构id
66
+     * @return org_id 机构id
67
+     */
68
+    public Integer getOrgId() {
69
+        return orgId;
70
+    }
71
+
72
+    /**
73
+     * 机构id
74
+     * @param orgId 机构id
75
+     */
76
+    public void setOrgId(Integer orgId) {
77
+        this.orgId = orgId;
78
+    }
79
+
80
+    /**
81
+     * 用户id
82
+     * @return user_id 用户id
83
+     */
84
+    public Integer getUserId() {
85
+        return userId;
86
+    }
87
+
88
+    /**
89
+     * 用户id
90
+     * @param userId 用户id
91
+     */
92
+    public void setUserId(Integer userId) {
93
+        this.userId = userId;
94
+    }
95
+
96
+    /**
97
+     * 用户账号
98
+     * @return user_zh 用户账号
99
+     */
100
+    public String getUserZh() {
101
+        return userZh;
102
+    }
103
+
104
+    /**
105
+     * 用户账号
106
+     * @param userZh 用户账号
107
+     */
108
+    public void setUserZh(String userZh) {
109
+        this.userZh = userZh == null ? null : userZh.trim();
110
+    }
111
+
112
+    /**
113
+     * 用户名称
114
+     * @return user_name 用户名称
115
+     */
116
+    public String getUserName() {
117
+        return userName;
118
+    }
119
+
120
+    /**
121
+     * 用户名称
122
+     * @param userName 用户名称
123
+     */
124
+    public void setUserName(String userName) {
125
+        this.userName = userName == null ? null : userName.trim();
126
+    }
127
+
128
+    /**
129
+     * 用户角色
130
+     * @return user_role 用户角色
131
+     */
132
+    public String getUserRole() {
133
+        return userRole;
134
+    }
135
+
136
+    /**
137
+     * 用户角色
138
+     * @param userRole 用户角色
139
+     */
140
+    public void setUserRole(String userRole) {
141
+        this.userRole = userRole == null ? null : userRole.trim();
142
+    }
143
+
144
+    /**
145
+     * 用户所属机构行政区划
146
+     * @return user_address 用户所属机构行政区划
147
+     */
148
+    public String getUserAddress() {
149
+        return userAddress;
150
+    }
151
+
152
+    /**
153
+     * 用户所属机构行政区划
154
+     * @param userAddress 用户所属机构行政区划
155
+     */
156
+    public void setUserAddress(String userAddress) {
157
+        this.userAddress = userAddress == null ? null : userAddress.trim();
158
+    }
159
+
160
+    /**
161
+     * 登录时间
162
+     * @return dl_time 登录时间
163
+     */
164
+    public Date getDlTime() {
165
+        return dlTime;
166
+    }
167
+
168
+    /**
169
+     * 登录时间
170
+     * @param dlTime 登录时间
171
+     */
172
+    public void setDlTime(Date dlTime) {
173
+        this.dlTime = dlTime;
174
+    }
175
+
176
+    /**
177
+     * 注销时间
178
+     * @return zx_time 注销时间
179
+     */
180
+    public Date getZxTime() {
181
+        return zxTime;
182
+    }
183
+
184
+    /**
185
+     * 注销时间
186
+     * @param zxTime 注销时间
187
+     */
188
+    public void setZxTime(Date zxTime) {
189
+        this.zxTime = zxTime;
190
+    }
191
+
192
+    /**
193
+     * 功能id
194
+     * @return func_id 功能id
195
+     */
196
+    public Integer getFuncId() {
197
+        return funcId;
198
+    }
199
+
200
+    /**
201
+     * 功能id
202
+     * @param funcId 功能id
203
+     */
204
+    public void setFuncId(Integer funcId) {
205
+        this.funcId = funcId;
206
+    }
207
+
208
+    /**
209
+     * 菜单名称
210
+     * @return func_name 菜单名称
211
+     */
212
+    public String getFuncName() {
213
+        return funcName;
214
+    }
215
+
216
+    /**
217
+     * 菜单名称
218
+     * @param funcName 菜单名称
219
+     */
220
+    public void setFuncName(String funcName) {
221
+        this.funcName = funcName == null ? null : funcName.trim();
222
+    }
223
+
224
+    /**
225
+     * 按钮id
226
+     * @return btn_id 按钮id
227
+     */
228
+    public Integer getBtnId() {
229
+        return btnId;
230
+    }
231
+
232
+    /**
233
+     * 按钮id
234
+     * @param btnId 按钮id
235
+     */
236
+    public void setBtnId(Integer btnId) {
237
+        this.btnId = btnId;
238
+    }
239
+
240
+    /**
241
+     * 方法名
242
+     * @return method_name 方法名
243
+     */
244
+    public String getMethodName() {
245
+        return methodName;
246
+    }
247
+
248
+    /**
249
+     * 方法名
250
+     * @param methodName 方法名
251
+     */
252
+    public void setMethodName(String methodName) {
253
+        this.methodName = methodName == null ? null : methodName.trim();
254
+    }
255
+
256
+    /**
257
+     * 操作结果
258
+     * @return oper_result 操作结果
259
+     */
260
+    public String getOperResult() {
261
+        return operResult;
262
+    }
263
+
264
+    /**
265
+     * 操作结果
266
+     * @param operResult 操作结果
267
+     */
268
+    public void setOperResult(String operResult) {
269
+        this.operResult = operResult == null ? null : operResult.trim();
270
+    }
271
+
272
+    /**
273
+     * 请求参数
274
+     * @return parameter 请求参数
275
+     */
276
+    public String getParameter() {
277
+        return parameter;
278
+    }
279
+
280
+    /**
281
+     * 请求参数
282
+     * @param parameter 请求参数
283
+     */
284
+    public void setParameter(String parameter) {
285
+        this.parameter = parameter == null ? null : parameter.trim();
286
+    }
287
+
288
+    /**
289
+     * 返回参数
290
+     * @return rtn_param 返回参数
291
+     */
292
+    public String getRtnParam() {
293
+        return rtnParam;
294
+    }
295
+
296
+    /**
297
+     * 返回参数
298
+     * @param rtnParam 返回参数
299
+     */
300
+    public void setRtnParam(String rtnParam) {
301
+        this.rtnParam = rtnParam == null ? null : rtnParam.trim();
302
+    }
303
+
304
+    /**
305
+     * 日志描述
306
+     * @return describes 日志描述
307
+     */
308
+    public String getDescribes() {
309
+        return describes;
310
+    }
311
+
312
+    /**
313
+     * 日志描述
314
+     * @param describes 日志描述
315
+     */
316
+    public void setDescribes(String describes) {
317
+        this.describes = describes == null ? null : describes.trim();
318
+    }
319
+
320
+    /**
321
+     * 日志类型:1 登录 2 访问 3 操作
322
+     * @return type 日志类型:1 登录 2 访问 3 操作
323
+     */
324
+    public String getType() {
325
+        return type;
326
+    }
327
+
328
+    /**
329
+     * 日志类型:1 登录 2 访问 3 操作
330
+     * @param type 日志类型:1 登录 2 访问 3 操作
331
+     */
332
+    public void setType(String type) {
333
+        this.type = type == null ? null : type.trim();
334
+    }
335
+
336
+    /**
337
+     * 设备ip
338
+     * @return device_ip 设备ip
339
+     */
340
+    public String getDeviceIp() {
341
+        return deviceIp;
342
+    }
343
+
344
+    /**
345
+     * 设备ip
346
+     * @param deviceIp 设备ip
347
+     */
348
+    public void setDeviceIp(String deviceIp) {
349
+        this.deviceIp = deviceIp == null ? null : deviceIp.trim();
350
+    }
351
+
352
+    /**
353
+     * 系统标识:库级系统
354
+     * @return system_identify 系统标识:库级系统
355
+     */
356
+    public String getSystemIdentify() {
357
+        return systemIdentify;
358
+    }
359
+
360
+    /**
361
+     * 系统标识:库级系统
362
+     * @param systemIdentify 系统标识:库级系统
363
+     */
364
+    public void setSystemIdentify(String systemIdentify) {
365
+        this.systemIdentify = systemIdentify == null ? null : systemIdentify.trim();
366
+    }
367
+
368
+    /**
369
+     * 操作时间
370
+     * @return operation_time 操作时间
371
+     */
372
+    public Date getOperationTime() {
373
+        return operationTime;
374
+    }
375
+
376
+    /**
377
+     * 操作时间
378
+     * @param operationTime 操作时间
379
+     */
380
+    public void setOperationTime(Date operationTime) {
381
+        this.operationTime = operationTime;
382
+    }
383
+}

File diff suppressed because it is too large
+ 1619 - 0
src/main/java/com/chinaitop/depot/device/model/SystemLogExample.java


+ 56 - 0
src/main/java/com/chinaitop/depot/device/service/BasicEquipmentEquipmentPoolService.java

@@ -0,0 +1,56 @@
1
+package com.chinaitop.depot.device.service;
2
+
3
+import java.util.List;
4
+
5
+import com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool;
6
+import com.chinaitop.depot.device.model.BasicEquipmentEquipmentPoolExample;
7
+
8
+public interface BasicEquipmentEquipmentPoolService {
9
+
10
+	/**
11
+	 * 新增
12
+	 * 
13
+	 * @param record 数据对象
14
+	 */
15
+	void add(BasicEquipmentEquipmentPool record);
16
+
17
+	/**
18
+	 * 修改
19
+	 * 
20
+	 * @param record
21
+	 *            数据对象
22
+	 */
23
+	void update(BasicEquipmentEquipmentPool record);
24
+
25
+	/**
26
+	 * 删除
27
+	 * 
28
+	 * @param id 数据ID
29
+	 */
30
+	void remove(Integer id);
31
+
32
+	/**
33
+	 * 查询一条数据
34
+	 * 
35
+	 * @param id 数据ID
36
+	 * @return
37
+	 */
38
+	BasicEquipmentEquipmentPool findByIdObj(Integer id);
39
+
40
+	/**
41
+	 * 查询一组数据
42
+	 * 
43
+	 * @param example 查询条件
44
+	 * @return
45
+	 */
46
+	List<BasicEquipmentEquipmentPool> findByCondition(BasicEquipmentEquipmentPoolExample example);
47
+
48
+	/**
49
+	 * 导入
50
+	 * 
51
+	 * @param list
52
+	 * @param depotInfo
53
+	 * @return
54
+	 */
55
+	String importData(List<List<String>> list, Integer orgId);
56
+}

+ 22 - 0
src/main/java/com/chinaitop/depot/device/service/StorageDeviceBackService.java

@@ -0,0 +1,22 @@
1
+package com.chinaitop.depot.device.service;
2
+
3
+
4
+import java.util.List;
5
+
6
+import org.springframework.stereotype.Service;
7
+
8
+import com.chinaitop.depot.device.model.StorageDeviceback;
9
+
10
+@Service
11
+public interface StorageDeviceBackService {
12
+
13
+	StorageDeviceback selectByPrimaryKey(Integer id);
14
+
15
+	void save(StorageDeviceback storageDeviceback);
16
+
17
+	List<StorageDeviceback> selectBygetId(Integer id);
18
+
19
+
20
+	
21
+
22
+}

+ 48 - 0
src/main/java/com/chinaitop/depot/device/service/StorageDeviceCheckService.java

@@ -0,0 +1,48 @@
1
+package com.chinaitop.depot.device.service;
2
+
3
+import com.chinaitop.depot.device.model.StorageDevicecheck;
4
+import com.chinaitop.depot.device.model.StorageDevicecheckExample;
5
+import com.chinaitop.depot.device.model.StorageDeviceinput;
6
+import com.chinaitop.depot.device.model.StorageDeviceinputExample;
7
+
8
+import java.util.List;
9
+import java.util.Map;
10
+
11
+public interface StorageDeviceCheckService {
12
+
13
+
14
+	/**
15
+	 * 分页查询盘点单
16
+	 * @param storageDevicecheckExample
17
+	 * @return
18
+	 */
19
+	List<StorageDevicecheck> queryByExample(StorageDevicecheckExample storageDevicecheckExample);
20
+
21
+	/**
22
+	 * 按照主键移除
23
+	 * @param depotId
24
+	 */
25
+	void remove(Integer depotId,String checkNum);
26
+
27
+    /**
28
+     * 新增
29
+     * @param json
30
+     */
31
+	void add(String json,String type);
32
+
33
+	/**
34
+	 * 根据depotId查询对应数据
35
+	 * @param depotId
36
+	 * @return
37
+	 */
38
+	List<StorageDevicecheck> loadDataByDepotId(Integer depotId,String pddh);
39
+
40
+
41
+	List<StorageDeviceinput> childZlList(StorageDeviceinputExample storageDeviceinputExample);
42
+
43
+    /**
44
+     * 获取当天的总盘点记录数
45
+     * @return
46
+     */
47
+	int getCountForDate(Map<String,Object> map);
48
+}

+ 28 - 0
src/main/java/com/chinaitop/depot/device/service/StorageDeviceGetService.java

@@ -0,0 +1,28 @@
1
+package com.chinaitop.depot.device.service;
2
+
3
+import java.util.List;
4
+import java.util.Map;
5
+
6
+import com.chinaitop.depot.device.model.StorageDeviceget;
7
+import com.chinaitop.depot.device.model.StorageDevicegetExample;
8
+
9
+
10
+public interface StorageDeviceGetService {
11
+
12
+	List<StorageDeviceget> queryByDevice(StorageDevicegetExample storageDevicegetExample);
13
+
14
+	void save(StorageDeviceget storageDeviceget);
15
+
16
+	StorageDeviceget selectByPrimaryKey(int id);
17
+
18
+	void updateByPrimaryKeySelective(StorageDeviceget storageDeviceget);
19
+
20
+	List<StorageDeviceget> selectByHouseId(Integer houseId);
21
+
22
+	List<Map<String, Object>> queryCountByType();
23
+
24
+
25
+
26
+	
27
+
28
+}

+ 78 - 0
src/main/java/com/chinaitop/depot/device/service/StorageDeviceInputService.java

@@ -0,0 +1,78 @@
1
+package com.chinaitop.depot.device.service;
2
+
3
+import java.util.HashMap;
4
+import java.util.List;
5
+import java.util.Map;
6
+
7
+import com.chinaitop.depot.device.model.ContentBean;
8
+import com.chinaitop.depot.device.model.HouseNameBean;
9
+import com.chinaitop.depot.device.model.HouseTypeBean;
10
+import com.chinaitop.depot.device.model.ShelfContentBean;
11
+import com.chinaitop.depot.device.model.StorageDeviceinput;
12
+import com.chinaitop.depot.device.model.StorageDeviceinputExample;
13
+
14
+
15
+public interface StorageDeviceInputService {
16
+
17
+	
18
+	List<StorageDeviceinput> queryByDevice(StorageDeviceinputExample storageDeviceinputExample);
19
+
20
+	void remove(Integer id);
21
+
22
+	void save(StorageDeviceinput storageDeviceinput);
23
+
24
+	StorageDeviceinput loadDataById(int id);
25
+
26
+	List<HouseNameBean> getHouseList();
27
+
28
+	List<HouseTypeBean> getTypeList(Integer depotId);
29
+
30
+	List<ShelfContentBean> getNameList(Integer depotTypeId);
31
+
32
+	ContentBean getcontentGetList(String deviceName);
33
+
34
+	List<ContentBean> getShelfGetList(String deviceName);
35
+
36
+	List<StorageDeviceinput> getDeviceInputList(Integer depotId);
37
+
38
+	List<StorageDeviceinput> getModelList(String deviceName);
39
+
40
+	List<StorageDeviceinput> getNumberList(String deviceModel);
41
+
42
+	List<StorageDeviceinput> getCountList(String number);
43
+
44
+	List<StorageDeviceinput> queryByNumber(StorageDeviceinputExample storageDeviceinputExample2);
45
+
46
+	void updateByPrimaryKeySelective(StorageDeviceinput storageDeviceinput);
47
+
48
+	List<StorageDeviceinput> getAllList(String number);
49
+
50
+	List<ContentBean> getModelGetList(Map<String, Object> map);
51
+
52
+	List<StorageDeviceinput> getNumberGetList(Map<String, Object> map);
53
+
54
+	List<StorageDeviceinput> getUseCountGetList(String number);
55
+
56
+	List<StorageDeviceinput> getDeviceModelList(String deviceName);
57
+
58
+	StorageDeviceinput selectById(Integer number);
59
+
60
+	List<StorageDeviceinput> getdevieName();
61
+
62
+	List<StorageDeviceinput> getRepairNameList();
63
+
64
+	List<StorageDeviceinput> getUseCount(Map<String, Object> map);
65
+
66
+	List<StorageDeviceinput> queryDevice(HashMap<Object, Object> map);
67
+
68
+	List<StorageDeviceinput> getDeviceModelRepair(String deviceName);
69
+
70
+	List<StorageDeviceinput> getDeviceModelListRepair(String deviceName);
71
+
72
+	List<Map<String, Object>> queryCountByType();
73
+
74
+	List<StorageDeviceinput> queryDeviceAccount(StorageDeviceinputExample storageDeviceinputExample);
75
+
76
+
77
+
78
+}

+ 26 - 0
src/main/java/com/chinaitop/depot/device/service/StorageDeviceKeepService.java

@@ -0,0 +1,26 @@
1
+package com.chinaitop.depot.device.service;
2
+
3
+import java.util.List;
4
+
5
+import com.chinaitop.depot.device.model.StorageDevicekeep;
6
+import com.chinaitop.depot.device.model.StorageDevicekeepExample;
7
+
8
+public interface StorageDeviceKeepService {
9
+
10
+	List<StorageDevicekeep> queryByDevice(StorageDevicekeepExample storageDevicekeepExample);
11
+
12
+	void remove(Integer id);
13
+
14
+	void end(StorageDevicekeep storageDevicekeep);
15
+
16
+	void save(StorageDevicekeep storageDevicekeep);
17
+
18
+	StorageDevicekeep loadDataById(int id);
19
+	
20
+	void updateByPrimaryKeySelective(StorageDevicekeep storageDevicekeep);
21
+
22
+	List<StorageDevicekeep> getDeviceNameList();
23
+
24
+	StorageDevicekeep selectById(Integer id);
25
+
26
+}

+ 22 - 0
src/main/java/com/chinaitop/depot/device/service/StorageDeviceRepairService.java

@@ -0,0 +1,22 @@
1
+package com.chinaitop.depot.device.service;
2
+
3
+import java.util.List;
4
+
5
+import com.chinaitop.depot.device.model.StorageDevicerepair;
6
+import com.chinaitop.depot.device.model.StorageDevicerepairExample;
7
+
8
+
9
+public interface StorageDeviceRepairService {
10
+
11
+	List<StorageDevicerepair> queryByDevice(StorageDevicerepairExample storageDevicerepairExample);
12
+
13
+	void save(StorageDevicerepair storageDevicerepair);
14
+
15
+	void updateByPrimaryKeySelective(StorageDevicerepair storageDevicerepair);
16
+
17
+	StorageDevicerepair loadDataById(int id);
18
+
19
+
20
+
21
+
22
+}

+ 117 - 0
src/main/java/com/chinaitop/depot/device/service/impl/BasicEquipmentEquipmentPoolServiceImpl.java

@@ -0,0 +1,117 @@
1
+package com.chinaitop.depot.device.service.impl;
2
+
3
+import java.util.Date;
4
+import java.util.List;
5
+
6
+import javax.annotation.Resource;
7
+
8
+import org.springframework.stereotype.Service;
9
+
10
+import com.chinaitop.depot.device.mapper.BasicEquipmentEquipmentPoolMapper;
11
+import com.chinaitop.depot.device.model.BasicEquipmentEquipmentPool;
12
+import com.chinaitop.depot.device.model.BasicEquipmentEquipmentPoolExample;
13
+import com.chinaitop.depot.device.service.BasicEquipmentEquipmentPoolService;
14
+
15
+@Service
16
+public class BasicEquipmentEquipmentPoolServiceImpl implements BasicEquipmentEquipmentPoolService {
17
+
18
+	@Resource
19
+	private BasicEquipmentEquipmentPoolMapper mapper;
20
+
21
+	@Override
22
+	public void add(BasicEquipmentEquipmentPool record) {
23
+		mapper.insertSelective(record);
24
+	}
25
+
26
+	@Override
27
+	public void update(BasicEquipmentEquipmentPool record) {
28
+		mapper.updateByPrimaryKeySelective(record);
29
+	}
30
+
31
+	@Override
32
+	public void remove(Integer id) {
33
+		mapper.deleteByPrimaryKey(id);
34
+	}
35
+
36
+	@Override
37
+	public BasicEquipmentEquipmentPool findByIdObj(Integer id) {
38
+		return mapper.selectByPrimaryKey(id);
39
+	}
40
+
41
+	@Override
42
+	public List<BasicEquipmentEquipmentPool> findByCondition(BasicEquipmentEquipmentPoolExample example) {
43
+		return mapper.selectByExample(example);
44
+	}
45
+
46
+	@Override
47
+	public String importData(List<List<String>> list, Integer orgId) {
48
+		Date date = new Date();
49
+		String msg = "";
50
+    	int len = 0;
51
+		BasicEquipmentEquipmentPool pool = null;
52
+        
53
+        for (int i = 0; i < list.size(); i++) {
54
+            List<String> revList = list.get(i);
55
+            
56
+            for (int j = 0; j < revList.size(); j++) {
57
+            	switch(j) {
58
+            		case 0:
59
+            			if (revList.get(j) != null && !"".equals(revList.get(j))) {
60
+            				len = revList.get(j).length();
61
+                    		if (len > 50) {
62
+                    			msg = "第 "+(i+1)+" 行第 1 列的值的长度不能超过50!";
63
+                    			return msg;
64
+                    		}
65
+            				pool = new BasicEquipmentEquipmentPool();
66
+            				pool.setPutPosition(revList.get(j));
67
+            				pool.setOrgId(orgId);
68
+            			}
69
+                		break;
70
+            		case 1:
71
+            			if (pool != null) {
72
+            				len = revList.get(j).length();
73
+                    		if (len > 50) {
74
+                    			msg = "第 "+(i+1)+" 行第 2 列的值的长度不能超过50!";
75
+                    			return msg;
76
+                    		}
77
+            				pool.setShelfId(revList.get(j));
78
+            			}
79
+            			break;
80
+            		case 2:
81
+            			if (revList.get(j) != null && !"".equals(revList.get(j))) {
82
+            				len = revList.get(j).length();
83
+                    		if (len > 50) {
84
+                    			msg = "第 "+(i+1)+" 行第 3 列的值的长度不能超过50!";
85
+                    			return msg;
86
+                    		}
87
+            				if (pool != null) {
88
+	            				pool.setWarehouseId(revList.get(j));
89
+            				}
90
+            			}
91
+            			break;
92
+            		case 3:
93
+            			if (revList.get(j) != null && !"".equals(revList.get(j))) {
94
+            				len = revList.get(j).length();
95
+                    		if (len > 255) {
96
+                    			msg = "第 "+(i+1)+" 行第 4 列的值的长度不能超过255!";
97
+                    			return msg;
98
+                    		}
99
+            				if (pool != null) {
100
+	            				pool.setRemark(revList.get(j));
101
+	            				pool.setOrgId(orgId);
102
+	            				pool.setInputDate(date);
103
+	            				mapper.insertSelective(pool);
104
+            				}
105
+            			}
106
+            			pool = null;
107
+            			break;
108
+            		default :
109
+            			break;
110
+            	}
111
+            }
112
+           
113
+        }
114
+        return msg;
115
+	}
116
+
117
+}

+ 161 - 0
src/main/java/com/chinaitop/depot/device/service/impl/ImportServiceImpl.java

@@ -0,0 +1,161 @@
1
+package com.chinaitop.depot.device.service.impl;
2
+
3
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
4
+import org.apache.poi.ss.usermodel.Cell;
5
+import org.apache.poi.ss.usermodel.Row;
6
+import org.apache.poi.ss.usermodel.Sheet;
7
+import org.apache.poi.ss.usermodel.Workbook;
8
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
9
+import org.springframework.stereotype.Service;
10
+import org.springframework.util.StringUtils;
11
+import org.springframework.web.multipart.MultipartFile;
12
+
13
+import com.chinaitop.depot.utils.ExcelImportUtils;
14
+import com.chinaitop.depot.utils.ParameterUtil;
15
+
16
+import javax.servlet.http.HttpServletRequest;
17
+import java.io.File;
18
+import java.io.FileInputStream;
19
+import java.io.IOException;
20
+import java.io.InputStream;
21
+import java.util.ArrayList;
22
+import java.util.List;
23
+
24
+/**
25
+ * @auther mafy
26
+ * @createtime 2017/10/26 0026
27
+ * 导入公共类,直接调用importFile方法即可
28
+ */
29
+@Service
30
+public class ImportServiceImpl {
31
+
32
+
33
+
34
+    public String importFile(MultipartFile file, String fileType, HttpServletRequest request,String[] titleArr,boolean[] emptyArr,List<List<String>> lists) throws Exception{
35
+
36
+        // 服务器路径
37
+        String rootPath = request.getSession().getServletContext().getRealPath("");
38
+        // 文件相对路径
39
+        String relativePath = "/upload/" + fileType;
40
+        //创建临时文件
41
+        createTemp(file,request,rootPath,relativePath);
42
+        //读取临时文件,并且返回错误信息
43
+        String fileAllpath = rootPath+relativePath+"/"+file.getOriginalFilename();
44
+
45
+        String retVal = readExcelValue(fileAllpath,titleArr,emptyArr,lists);
46
+
47
+        return retVal;
48
+    }
49
+
50
+    /**
51
+     * 创建临时文件
52
+     * @param file 上传过来的文件流
53
+     * @param request 请求
54
+     * @param rootPath 根目录
55
+     * @param relativePath 相对路径
56
+     * @throws Exception
57
+     */
58
+    public void createTemp(MultipartFile file, HttpServletRequest request,String rootPath,String relativePath) throws Exception{
59
+        // 如路径不存在,则创建它
60
+        File directory = new File(rootPath + relativePath);
61
+        if (!directory.exists()) {
62
+            directory.mkdirs();
63
+        }
64
+        String filePath = relativePath + "/" + file.getOriginalFilename();
65
+        // 复制 文件
66
+        file.transferTo(new File(rootPath + filePath));
67
+    }
68
+
69
+
70
+    /**
71
+     * 解析Excel里面的数据,目前只支持1个sheet
72
+     * @param fileName
73
+     * @return
74
+     */
75
+    public String readExcelValue(String fileName,String[] titleArr,boolean[] emptyArr,List<List<String>> list){
76
+
77
+        //获取File
78
+        File tempFile = new File(fileName);
79
+
80
+        StringBuilder errorMSG = new StringBuilder("");//错误信息收集器
81
+        int sheetNum = 1;//sheet的总数
82
+        //循环每一个sheet
83
+        for (int i = 0; i < sheetNum; i++) {
84
+            String err = everySheet(getWorkbook(tempFile,fileName).getSheetAt(i),titleArr,emptyArr,list);
85
+            if(ParameterUtil.isnotnull(err)){
86
+                errorMSG.append("第"+(i+1)+"个sheet,名称为:"+getWorkbook(tempFile,fileName).getSheetName(i)+",错误信息:"+err);
87
+            }
88
+        }
89
+
90
+        //删除临时文件
91
+        if(tempFile.exists()){ tempFile.delete(); }
92
+
93
+        return errorMSG.toString();
94
+    }
95
+
96
+
97
+    //获取workbook
98
+    private Workbook getWorkbook(File file ,String FileName){
99
+        Workbook wb = null;
100
+        try {
101
+            InputStream is = new FileInputStream(file);
102
+            if(ExcelImportUtils.isExcel2007(FileName))
103
+                wb = new XSSFWorkbook(is);
104
+            else
105
+                wb = new HSSFWorkbook(is);
106
+        } catch (IOException e) {
107
+            e.printStackTrace();
108
+        }
109
+        return wb;
110
+    }
111
+
112
+
113
+    //遍历每一个sheet,获取值和错误信息
114
+    private String  everySheet(Sheet sheet,String[] titleArr,boolean[] emptyArr,List<List<String>> list){
115
+        String errorMsg = "", br = "<br/>";
116
+        //得到当前sheet的Excel的行数
117
+        int totalRows=sheet.getPhysicalNumberOfRows();
118
+        //总列数
119
+        int totalCells = 0;
120
+        //得到Excel的列数(前提是有行数),从第二行算起
121
+        if(totalRows>=2 && sheet.getRow(1) != null){
122
+            totalCells=sheet.getRow(0).getPhysicalNumberOfCells();
123
+        }else{
124
+            return "请确认excel的数据";
125
+        }
126
+
127
+        if (!ExcelImportUtils.isSame(sheet.getRow(0),totalCells,titleArr)){ return "导入excel和模板不一致"; }//判断标题是否正确
128
+
129
+        //开始处理数据,循环Excel行数,从第二行开始。标题不入库
130
+        for(int r=1;r<totalRows;r++){
131
+            List<String> rowList = new ArrayList<String>();
132
+            String rowMessage = "";
133
+            Row row = sheet.getRow(r);
134
+            if (row == null){
135
+                errorMsg += br+"第"+(r+1)+"行数据异常,请仔细检查!";
136
+                continue;
137
+            }
138
+
139
+            //循环Excel的列
140
+            for(int c = 0; c <totalCells; c++){
141
+                Cell cell = row.getCell(c);
142
+                if(cell == null){
143
+                    rowList.add("");
144
+                }else{
145
+                    cell.setCellType(Cell.CELL_TYPE_STRING);
146
+                    String cellVal = cell.getStringCellValue();
147
+                    if((StringUtils.isEmpty(cellVal) && !emptyArr[c])){
148
+                        errorMsg+=br+"第"+(r+1)+"行,第"+(c+1)+"列数据不可为空或者数据异常";
149
+                        rowList.add("error");
150
+                    }else{
151
+                        //正常数据处理
152
+                        rowList.add(cellVal);
153
+                    }
154
+                }
155
+                if(c == totalCells-1) list.add(rowList);//将每一行的数据添加到list中
156
+            }
157
+        }
158
+        return errorMsg;
159
+    }
160
+}
161
+

+ 35 - 0
src/main/java/com/chinaitop/depot/device/service/impl/StorageDeviceBackServiceImpl.java

@@ -0,0 +1,35 @@
1
+package com.chinaitop.depot.device.service.impl;
2
+
3
+import java.util.List;
4
+
5
+import javax.annotation.Resource;
6
+
7
+import org.springframework.stereotype.Service;
8
+
9
+import com.chinaitop.depot.device.mapper.StorageDevicebackMapper;
10
+import com.chinaitop.depot.device.model.StorageDeviceback;
11
+import com.chinaitop.depot.device.service.StorageDeviceBackService;
12
+
13
+@Service
14
+public class StorageDeviceBackServiceImpl implements StorageDeviceBackService{
15
+
16
+	@Resource
17
+	private StorageDevicebackMapper deviceBackMapper;
18
+	
19
+	public StorageDeviceback selectByPrimaryKey(Integer id) {
20
+		// TODO Auto-generated method stub
21
+		return deviceBackMapper.selectByPrimaryKey(id);
22
+	}
23
+
24
+	public void save(StorageDeviceback storageDeviceback) {
25
+		// TODO Auto-generated method stub
26
+		deviceBackMapper.insertSelective(storageDeviceback);
27
+	}
28
+
29
+	@Override
30
+	public List<StorageDeviceback> selectBygetId(Integer id) {
31
+		// TODO Auto-generated method stub
32
+		return deviceBackMapper.selectBygetId(id);
33
+	}
34
+
35
+}

+ 139 - 0
src/main/java/com/chinaitop/depot/device/service/impl/StorageDeviceCheckServiceImpl.java

@@ -0,0 +1,139 @@
1
+package com.chinaitop.depot.device.service.impl;
2
+
3
+import com.alibaba.fastjson.JSONArray;
4
+import com.alibaba.fastjson.JSONObject;
5
+import com.chinaitop.depot.device.mapper.StorageDevicecheckMapper;
6
+import com.chinaitop.depot.device.mapper.StorageDeviceinputMapper;
7
+import com.chinaitop.depot.device.model.StorageDevicecheck;
8
+import com.chinaitop.depot.device.model.StorageDevicecheckExample;
9
+import com.chinaitop.depot.device.model.StorageDeviceinput;
10
+import com.chinaitop.depot.device.model.StorageDeviceinputExample;
11
+import com.chinaitop.depot.device.service.StorageDeviceCheckService;
12
+import com.chinaitop.depot.utils.ParameterUtil;
13
+import org.springframework.stereotype.Service;
14
+
15
+import javax.annotation.Resource;
16
+import java.beans.Transient;
17
+import java.util.HashMap;
18
+import java.util.List;
19
+import java.util.Map;
20
+
21
+/**
22
+ * @auther mafy
23
+ * @createtime 2018/1/3 0003
24
+ */
25
+@Service
26
+public class StorageDeviceCheckServiceImpl implements StorageDeviceCheckService {
27
+
28
+    @Resource
29
+    private StorageDevicecheckMapper storageDevicecheckMapper;
30
+
31
+    @Resource
32
+    private StorageDeviceinputMapper storageDeviceinputMapper;
33
+
34
+    /**
35
+     * 分页查询盘点单
36
+     * @param storageDevicecheckExample
37
+     * @return
38
+     */
39
+    @Override
40
+    public List<StorageDevicecheck> queryByExample(StorageDevicecheckExample storageDevicecheckExample) {
41
+        return storageDevicecheckMapper.selectBySql(storageDevicecheckExample);
42
+    }
43
+
44
+
45
+    /**
46
+     * 新增的时候查询input表里面的数据
47
+     * @param storageDeviceinputExample
48
+     * @return
49
+     */
50
+    @Override
51
+    public List<StorageDeviceinput> childZlList(StorageDeviceinputExample storageDeviceinputExample) {
52
+        return storageDeviceinputMapper.selectByExample(storageDeviceinputExample);
53
+    }
54
+
55
+    /**
56
+     * 根据depotId查询对应数据
57
+     *
58
+     * @param depotId
59
+     * @return
60
+     */
61
+    @Override
62
+    public List<StorageDevicecheck> loadDataByDepotId(Integer depotId,String pddh) {
63
+
64
+        StorageDevicecheckExample storageDevicecheckExample = new StorageDevicecheckExample();
65
+        StorageDevicecheckExample.Criteria criteria = storageDevicecheckExample.createCriteria();
66
+        criteria.andDepotIdEqualTo(depotId);
67
+        criteria.andCheckNumberEqualTo(pddh);
68
+
69
+        return storageDevicecheckMapper.selectByExample(storageDevicecheckExample);
70
+    }
71
+
72
+    /**
73
+     * 获取当天的总盘点记录数
74
+     *
75
+     * @return
76
+     */
77
+    @Override
78
+    public int getCountForDate(Map<String,Object> map) {
79
+        return storageDevicecheckMapper.getCountForDate(map).size();
80
+    }
81
+
82
+    /**
83
+     * 按照主键移除
84
+     * @param depotId
85
+     */
86
+    @Override
87
+    public void remove(Integer depotId,String checkNum) {
88
+        StorageDevicecheckExample storageDevicecheckExample = new StorageDevicecheckExample();
89
+        StorageDevicecheckExample.Criteria criteria = storageDevicecheckExample.createCriteria();
90
+        criteria.andDepotIdEqualTo(depotId);
91
+        criteria.andCheckNumberEqualTo(checkNum);
92
+        storageDevicecheckMapper.deleteByExample(storageDevicecheckExample);
93
+    }
94
+
95
+    /**
96
+     * 新增
97
+     * @param json
98
+     */
99
+    @Override
100
+    @Transient
101
+    public void add(String json,String type) {
102
+
103
+
104
+
105
+        String cfid = null,checkNum = null;
106
+        JSONArray jsonArray = JSONArray.parseArray(json);
107
+        StringBuilder sql = new StringBuilder();
108
+        sql.append("INSERT INTO storage_devicecheck(check_number,check_date,depot_id,check_person,device_type,device_name,model,store_count,really_count,check_result,reason,org_id) VALUES");
109
+        for (int i = 0; i < jsonArray.size(); i++) {
110
+            sql.append("(");
111
+                JSONObject jsonObject = JSONObject.parseObject(jsonArray.get(i).toString());
112
+                sql.append("\"").append(jsonObject.get("check_number")).append("\",");
113
+                sql.append("\"").append(jsonObject.get("check_date")).append("\",");
114
+                sql.append("\"").append(jsonObject.get("depot_id")).append("\",");
115
+                sql.append("\"").append(jsonObject.get("check_person")).append("\",");
116
+                sql.append("\"").append(jsonObject.get("device_type")).append("\",");
117
+                sql.append("\"").append(jsonObject.get("device_name")).append("\",");
118
+                sql.append("\"").append(jsonObject.get("model")).append("\",");
119
+                sql.append("\"").append(jsonObject.get("store_count")).append("\",");
120
+                sql.append("\"").append(jsonObject.get("really_count")).append("\",");
121
+                sql.append("\"").append(jsonObject.get("check_result")).append("\",");
122
+                sql.append("\"").append(jsonObject.get("reason")).append("\",");
123
+                sql.append("\"").append(jsonObject.get("org_id")).append("\"");
124
+            sql.append(")");
125
+            if (i != jsonArray.size()-1) sql.append(",");
126
+            cfid =jsonObject.get("depot_id").toString();//仓id,删数据所用
127
+            checkNum = jsonObject.get("check_number").toString();
128
+        }
129
+        System.out.println(sql.toString());
130
+
131
+        if (ParameterUtil.isequal("edit",type)){
132
+            // 新增之前,把原来的对应仓的盘点信息删掉
133
+            remove(Integer.parseInt(cfid),checkNum);
134
+        }
135
+        Map<String,Object> map = new HashMap<>();
136
+        map.put("sql",sql.toString());
137
+        storageDevicecheckMapper.insertBySql(map);
138
+    }
139
+}

+ 67 - 0
src/main/java/com/chinaitop/depot/device/service/impl/StorageDeviceGetServiceImpl.java

@@ -0,0 +1,67 @@
1
+package com.chinaitop.depot.device.service.impl;
2
+
3
+import java.util.List;
4
+import java.util.Map;
5
+
6
+import javax.annotation.Resource;
7
+
8
+import org.springframework.stereotype.Service;
9
+
10
+import com.chinaitop.depot.device.mapper.StorageDevicegetMapper;
11
+import com.chinaitop.depot.device.model.StorageDeviceback;
12
+import com.chinaitop.depot.device.model.StorageDeviceget;
13
+import com.chinaitop.depot.device.model.StorageDevicegetExample;
14
+import com.chinaitop.depot.device.service.StorageDeviceGetService;
15
+
16
+@Service
17
+public class StorageDeviceGetServiceImpl implements StorageDeviceGetService{
18
+
19
+	@Resource
20
+	private StorageDevicegetMapper deviceGetMapper;
21
+	
22
+	/**
23
+	 * 分页获取列表数据
24
+	 */
25
+	@Override
26
+	public List<StorageDeviceget> queryByDevice(StorageDevicegetExample storageDevicegetExample) {
27
+		// TODO Auto-generated method stub
28
+		return deviceGetMapper.selectByExample(storageDevicegetExample);
29
+	}
30
+
31
+	/**
32
+	 * 提交修改和新增
33
+	 */
34
+	@Override
35
+	public void save(StorageDeviceget storageDeviceget) {
36
+		// TODO Auto-generated method stub
37
+		deviceGetMapper.insert(storageDeviceget);// 新增数据
38
+	}
39
+
40
+	@Override
41
+	public StorageDeviceget selectByPrimaryKey(int id) {
42
+		// TODO Auto-generated method stub
43
+		return deviceGetMapper.selectByPrimaryKey(id);
44
+	}
45
+
46
+	//增加归还信息
47
+	@Override
48
+	public void updateByPrimaryKeySelective(StorageDeviceget storageDeviceget) {
49
+		// TODO Auto-generated method stub
50
+		deviceGetMapper.updateByPrimaryKeySelective(storageDeviceget);
51
+	}
52
+
53
+	//app端
54
+	@Override
55
+	public List<StorageDeviceget> selectByHouseId(Integer houseId) {
56
+		// TODO Auto-generated method stub
57
+		return deviceGetMapper.selectByHouseId(houseId);
58
+	}
59
+
60
+	@Override
61
+	public List<Map<String, Object>> queryCountByType() {
62
+		// TODO Auto-generated method stub
63
+		return deviceGetMapper.queryCountByType();
64
+	}
65
+
66
+	
67
+}

+ 242 - 0
src/main/java/com/chinaitop/depot/device/service/impl/StorageDeviceInputServiceImpl.java

@@ -0,0 +1,242 @@
1
+package com.chinaitop.depot.device.service.impl;
2
+import java.util.HashMap;
3
+import java.util.List;
4
+import java.util.Map;
5
+
6
+import javax.annotation.Resource;
7
+
8
+import org.springframework.stereotype.Service;
9
+
10
+import com.chinaitop.depot.device.mapper.StorageDeviceinputMapper;
11
+import com.chinaitop.depot.device.model.ContentBean;
12
+import com.chinaitop.depot.device.model.HouseNameBean;
13
+import com.chinaitop.depot.device.model.HouseTypeBean;
14
+import com.chinaitop.depot.device.model.ShelfContentBean;
15
+import com.chinaitop.depot.device.model.StorageDeviceinput;
16
+import com.chinaitop.depot.device.model.StorageDeviceinputExample;
17
+import com.chinaitop.depot.device.service.StorageDeviceInputService;
18
+
19
+
20
+@Service
21
+public class StorageDeviceInputServiceImpl implements StorageDeviceInputService{
22
+
23
+	@Resource
24
+	private StorageDeviceinputMapper deviceInputMapper;
25
+	
26
+	/**
27
+	 * 分页获取器材信息
28
+	 */
29
+	@Override
30
+	public List<StorageDeviceinput> queryByDevice(StorageDeviceinputExample storageDeviceinputExample) {
31
+		// TODO Auto-generated method stub
32
+	        return deviceInputMapper.selectByExample(storageDeviceinputExample);
33
+	}
34
+
35
+	/**
36
+	 * 根据id删除数据
37
+	 */
38
+	@Override
39
+	public void remove(Integer id) {
40
+		// TODO Auto-generated method stub
41
+		deviceInputMapper.deleteByPrimaryKey(id);
42
+	}
43
+
44
+	/**
45
+	 * 提交修改和新增
46
+	 */
47
+	@Override
48
+	public void save(StorageDeviceinput storageDeviceinput) {
49
+		// TODO Auto-generated method stub
50
+		if (storageDeviceinput.getId() == null) {
51
+			deviceInputMapper.insertSelective(storageDeviceinput);// 新增数据
52
+		} else {
53
+			deviceInputMapper.updateByPrimaryKeySelective(storageDeviceinput);// 修改数据
54
+		}
55
+	}
56
+
57
+	/**
58
+	 * 根据id查询数据
59
+	 */
60
+	@Override
61
+	public StorageDeviceinput loadDataById(int id) {
62
+		// TODO Auto-generated method stub
63
+		return deviceInputMapper.selectByPrimaryKey(id);
64
+	}
65
+
66
+	 /**
67
+     * 获取入库的仓房名
68
+     */
69
+	@Override
70
+	public List<HouseNameBean> getHouseList() {
71
+		// TODO Auto-generated method stub
72
+		
73
+		return deviceInputMapper.getHouseList();
74
+	}
75
+
76
+	@Override
77
+	public List<HouseTypeBean> getTypeList(Integer depotId) {
78
+		// TODO Auto-generated method stub
79
+		return deviceInputMapper.getTypeList(depotId);
80
+	}
81
+	
82
+	//根据类型获取名称
83
+	@Override
84
+	public List<ShelfContentBean> getNameList(Integer depotTypeId) {
85
+		// TODO Auto-generated method stub
86
+		return deviceInputMapper.getNameList(depotTypeId);
87
+	}
88
+	
89
+	@Override
90
+	public ContentBean getcontentGetList(String deviceName) {
91
+		// TODO Auto-generated method stub
92
+		Map<String, Object> map  = new HashMap<>();
93
+		map.put("deviceName", deviceName);
94
+		return deviceInputMapper.getcontentGetList(map);
95
+	}
96
+	
97
+	//根据类型获取货架
98
+	@Override
99
+	public List<ContentBean> getShelfGetList(String deviceName) {
100
+		// TODO Auto-generated method stub
101
+		return deviceInputMapper.getShelfGetList(deviceName);
102
+	}
103
+
104
+	@Override
105
+	public List<StorageDeviceinput> queryByNumber(StorageDeviceinputExample example) {
106
+		return deviceInputMapper.selectByExample(example);
107
+	}
108
+
109
+	//查询仓房对应的设备名称
110
+	@Override
111
+	public List<StorageDeviceinput> getDeviceInputList(Integer depotId) {
112
+		// TODO Auto-generated method stub
113
+		return deviceInputMapper.getDeviceInputList(depotId);
114
+	}
115
+
116
+	//查询设备名称对应的型号
117
+	@Override
118
+	public List<StorageDeviceinput> getModelList(String deviceName) {
119
+		// TODO Auto-generated method stub
120
+		return deviceInputMapper.getModelList(deviceName);
121
+	}
122
+	
123
+	//查询型号对应的编号
124
+	@Override
125
+	public List<StorageDeviceinput> getNumberList(String deviceModel) {
126
+		// TODO Auto-generated method stub
127
+		return deviceInputMapper.getNumberList(deviceModel);
128
+	}
129
+
130
+	//查询型号对应的数量
131
+	@Override
132
+	public List<StorageDeviceinput> getCountList(String number) {
133
+		// TODO Auto-generated method stub
134
+		return deviceInputMapper.getCountList(number);
135
+	}
136
+
137
+	//报废
138
+	@Override
139
+	public void updateByPrimaryKeySelective(StorageDeviceinput storageDeviceinput) {
140
+		// TODO Auto-generated method stub
141
+		deviceInputMapper.updateByPrimaryKeySelective(storageDeviceinput);
142
+	}
143
+
144
+	@Override
145
+	public List<StorageDeviceinput> getAllList(String number) {
146
+		return deviceInputMapper.getAllList(number);
147
+	}
148
+
149
+	// 获取货架获取规格型号getModelGetList
150
+	@Override
151
+	public List<ContentBean> getModelGetList(Map<String, Object> map) {
152
+		// TODO Auto-generated method stub
153
+		return deviceInputMapper.getModelGetList(map);
154
+	}
155
+
156
+	//获取规格型号对应的编号getNumberGetList
157
+	@Override
158
+	public List<StorageDeviceinput> getNumberGetList(Map<String, Object> map) {
159
+		// TODO Auto-generated method stub
160
+		return deviceInputMapper.getNumberGetList(map);
161
+	}
162
+
163
+	//根据编号获取可用数量
164
+	@Override
165
+	public List<StorageDeviceinput> getUseCountGetList(String number) {
166
+		// TODO Auto-generated method stub
167
+		return deviceInputMapper.getUseCountGetList(number);
168
+	}
169
+
170
+	//获取编号和规格型号
171
+	@Override
172
+	public List<StorageDeviceinput> getDeviceModelList(String deviceName) {
173
+		// TODO Auto-generated method stub
174
+		return deviceInputMapper.getDeviceModelList(deviceName);
175
+	}
176
+
177
+	//查询原有数量
178
+	@Override
179
+	public StorageDeviceinput selectById(Integer number) {
180
+		// TODO Auto-generated method stub
181
+		return deviceInputMapper.selectByPrimaryKey(number);
182
+	}
183
+
184
+	//获取保养名称
185
+	@Override
186
+	public List<StorageDeviceinput> getdevieName() {
187
+		// TODO Auto-generated method stub
188
+		return deviceInputMapper.getdevieName();
189
+	}
190
+
191
+	//获取维修名称
192
+	@Override
193
+	public List<StorageDeviceinput> getRepairNameList() {
194
+		// TODO Auto-generated method stub
195
+		return deviceInputMapper.getRepairNameList();
196
+	}
197
+
198
+	//领用时,根据规格型号和编号获取可用数量
199
+	@Override
200
+	public List<StorageDeviceinput> getUseCount(Map<String, Object> map) {
201
+		// TODO Auto-generated method stub
202
+		return deviceInputMapper.getUseCount(map);
203
+	}
204
+
205
+	
206
+	//获取设备数据
207
+	@Override
208
+	public List<StorageDeviceinput> queryDevice(HashMap<Object, Object> map) {
209
+		// TODO Auto-generated method stub
210
+		return deviceInputMapper.queryDevice(map);
211
+	}
212
+
213
+	//获取维修的规格型号和编号
214
+	@Override
215
+	public List<StorageDeviceinput> getDeviceModelRepair(String deviceName) {
216
+		// TODO Auto-generated method stub
217
+		return deviceInputMapper.getDeviceModelRepair(deviceName);
218
+	}
219
+
220
+	@Override
221
+	public List<StorageDeviceinput> getDeviceModelListRepair(String deviceName) {
222
+		// TODO Auto-generated method stub
223
+		return deviceInputMapper.getDeviceModelListRepair(deviceName);
224
+	}
225
+
226
+	//获取每一类型入库的总数量
227
+	@Override
228
+	public List<Map<String, Object>> queryCountByType() {
229
+		// TODO Auto-generated method stub
230
+		return deviceInputMapper.queryCountByType();
231
+	}
232
+
233
+	@Override
234
+	public List<StorageDeviceinput> queryDeviceAccount(StorageDeviceinputExample storageDeviceinputExample) {
235
+		// TODO Auto-generated method stub
236
+		return deviceInputMapper.queryDeviceAccount(storageDeviceinputExample);
237
+	}
238
+	
239
+
240
+	
241
+
242
+}

+ 83 - 0
src/main/java/com/chinaitop/depot/device/service/impl/StorageDeviceKeepServiceImpl.java

@@ -0,0 +1,83 @@
1
+package com.chinaitop.depot.device.service.impl;
2
+
3
+import java.util.List;
4
+
5
+import javax.annotation.Resource;
6
+
7
+import org.springframework.stereotype.Service;
8
+
9
+import com.chinaitop.depot.device.mapper.StorageDevicekeepMapper;
10
+import com.chinaitop.depot.device.model.StorageDevicekeep;
11
+import com.chinaitop.depot.device.model.StorageDevicekeepExample;
12
+import com.chinaitop.depot.device.model.StorageDevicekeepExample.Criteria;
13
+import com.chinaitop.depot.device.service.StorageDeviceKeepService;
14
+
15
+@Service
16
+public class StorageDeviceKeepServiceImpl implements StorageDeviceKeepService{
17
+
18
+	@Resource
19
+	private StorageDevicekeepMapper storageDeviceKeepMapper;
20
+	/**
21
+	 * 分页获取 
22
+	 */
23
+	@Override
24
+	public List<StorageDevicekeep> queryByDevice(StorageDevicekeepExample storageDevicekeepExample) {
25
+		// TODO Auto-generated method stub
26
+		return storageDeviceKeepMapper.selectByExample(storageDevicekeepExample);
27
+	}
28
+	
29
+	/**
30
+	 * 移除数据
31
+	 */
32
+	@Override
33
+	public void remove(Integer id) {
34
+		// TODO Auto-generated method stub
35
+		storageDeviceKeepMapper.deleteByPrimaryKey(id);
36
+	}
37
+
38
+	/**
39
+	 * 结束保养
40
+	 */
41
+	@Override
42
+	public void end(StorageDevicekeep storageDevicekeep) {
43
+		// TODO Auto-generated method stub
44
+		storageDeviceKeepMapper.updateByPrimaryKey(storageDevicekeep);
45
+	}
46
+
47
+	/**
48
+	 * 新增保养
49
+	 */
50
+	@Override
51
+	public void save(StorageDevicekeep storageDevicekeep) {
52
+		// TODO Auto-generated method stub
53
+		storageDeviceKeepMapper.insertSelective(storageDevicekeep);
54
+	}
55
+
56
+	/**
57
+	 * 根据id获取数据
58
+	 */
59
+	@Override
60
+	public StorageDevicekeep loadDataById(int id) {
61
+		// TODO Auto-generated method stub
62
+		return storageDeviceKeepMapper.selectByPrimaryKey(id);
63
+	}
64
+
65
+	@Override
66
+	public void updateByPrimaryKeySelective(StorageDevicekeep storageDevicekeep) {
67
+		// TODO Auto-generated method stub
68
+		storageDeviceKeepMapper.updateByPrimaryKeySelective(storageDevicekeep);
69
+	}
70
+
71
+	@Override
72
+	public List<StorageDevicekeep> getDeviceNameList() {
73
+		// TODO Auto-generated method stub
74
+		return storageDeviceKeepMapper.selectEnumNameList();
75
+	}
76
+
77
+	@Override
78
+	public StorageDevicekeep selectById(Integer id) {
79
+		// TODO Auto-generated method stub
80
+		return storageDeviceKeepMapper.selectByPrimaryKey(id);
81
+	}
82
+
83
+}

+ 55 - 0
src/main/java/com/chinaitop/depot/device/service/impl/StorageDeviceRepairServiceImpl.java

@@ -0,0 +1,55 @@
1
+package com.chinaitop.depot.device.service.impl;
2
+
3
+import java.util.List;
4
+import javax.annotation.Resource;
5
+
6
+import org.springframework.stereotype.Service;
7
+
8
+import com.chinaitop.depot.device.mapper.StorageDevicerepairMapper;
9
+import com.chinaitop.depot.device.model.StorageDevicerepair;
10
+import com.chinaitop.depot.device.model.StorageDevicerepairExample;
11
+import com.chinaitop.depot.device.service.StorageDeviceRepairService;
12
+
13
+@Service
14
+public class StorageDeviceRepairServiceImpl implements StorageDeviceRepairService{
15
+
16
+	@Resource
17
+	private StorageDevicerepairMapper deviceRepairMapper;
18
+
19
+	/**
20
+	 * 分页获取数据
21
+	 */
22
+	@Override
23
+	public List<StorageDevicerepair> queryByDevice(StorageDevicerepairExample storageDevicerepairExample) {
24
+		// TODO Auto-generated method stub
25
+		return deviceRepairMapper.selectByExample(storageDevicerepairExample);
26
+	}
27
+
28
+	/**
29
+	 * 提交新增和修改
30
+	 */
31
+	@Override
32
+	public void save(StorageDevicerepair storageDevicerepair) {
33
+		// TODO Auto-generated method stub
34
+		if (storageDevicerepair.getId() == null) {
35
+			deviceRepairMapper.insertSelective(storageDevicerepair);// 新增数据
36
+		} else {
37
+			deviceRepairMapper.updateByPrimaryKeySelective(storageDevicerepair);// 修改数据
38
+		}
39
+	}
40
+
41
+	//结束维修
42
+	@Override
43
+	public void updateByPrimaryKeySelective(StorageDevicerepair storageDevicerepair) {
44
+		// TODO Auto-generated method stub
45
+		deviceRepairMapper.updateByPrimaryKeySelective(storageDevicerepair);
46
+	}
47
+
48
+	//根据id加载对应数据
49
+	@Override
50
+	public StorageDevicerepair loadDataById(int id) {
51
+		// TODO Auto-generated method stub
52
+		return deviceRepairMapper.selectByPrimaryKey(id);
53
+	}
54
+
55
+}

+ 44 - 0
src/main/java/com/chinaitop/depot/utils/CustomFilter.java

@@ -0,0 +1,44 @@
1
+package com.chinaitop.depot.utils;
2
+
3
+import java.io.IOException;
4
+
5
+import javax.servlet.Filter;
6
+import javax.servlet.FilterChain;
7
+import javax.servlet.FilterConfig;
8
+import javax.servlet.ServletException;
9
+import javax.servlet.ServletRequest;
10
+import javax.servlet.ServletResponse;
11
+import javax.servlet.http.HttpServletRequest;
12
+import javax.servlet.http.HttpSession;
13
+
14
+import org.apache.commons.lang.ObjectUtils;
15
+
16
+public class CustomFilter implements Filter {
17
+
18
+	@Override
19
+    public void init(FilterConfig filterConfig) throws ServletException {
20
+ 
21
+    }
22
+	
23
+	@Override
24
+	public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2)
25
+			throws IOException, ServletException {
26
+		HttpServletRequest request = (HttpServletRequest) arg0;
27
+		HttpSession session = request.getSession();
28
+		String orgId = "";
29
+		if (session != null){
30
+			orgId = ObjectUtils.toString(session.getAttribute("orgId"),"");
31
+		}
32
+		if (!orgId.isEmpty()) {
33
+			DataPolicyEngine.set(orgId);
34
+		}
35
+		arg2.doFilter(arg0, arg1);
36
+		DataPolicyEngine.remove();
37
+	}
38
+	
39
+	@Override
40
+    public void destroy() {
41
+ 
42
+    }
43
+
44
+}

+ 61 - 0
src/main/java/com/chinaitop/depot/utils/DataPolicyEngine.java

@@ -0,0 +1,61 @@
1
+package com.chinaitop.depot.utils;
2
+
3
+import org.apache.commons.logging.Log;
4
+import org.apache.commons.logging.LogFactory;
5
+
6
+
7
+/**
8
+ * 
9
+ * @author hf
10
+ * 
11
+ * @description 数据策略(数据权限控制使用)
12
+ * 
13
+ * 
14
+ */
15
+public class DataPolicyEngine {
16
+	//log信息输出对象
17
+	protected static final Log log = LogFactory.getLog(DataPolicyEngine.class); 
18
+
19
+	//本地线程,用于存储线程公共对象
20
+	private static ThreadLocal threadLocalSession = new ThreadLocal();
21
+	
22
+	
23
+	/**
24
+	 * @description 获取本地执行线程
25
+	 *
26
+	 * @return ThreadLocal 
27
+	 * 
28
+	 */
29
+	public static ThreadLocal getThreadLocalSession() {
30
+		return threadLocalSession;
31
+	}
32
+	
33
+	/**
34
+	 * @description 在线程内设置存储对象
35
+	 * 
36
+	 */
37
+	public static void set(Object obj) {
38
+		threadLocalSession.set(obj);
39
+
40
+	}
41
+	
42
+	/**
43
+	 * @description 获取在线程内设置存储的对象
44
+	 * 
45
+	 */
46
+	public static Object get() {
47
+		return threadLocalSession.get();
48
+
49
+	}
50
+
51
+	/**
52
+	 * @description 移除在线程内设置存储的对象
53
+	 * 
54
+	 */
55
+	public static void remove() {
56
+		threadLocalSession.remove();
57
+
58
+	}
59
+	
60
+	
61
+}

+ 48 - 0
src/main/java/com/chinaitop/depot/utils/ExcelImportUtils.java

@@ -0,0 +1,48 @@
1
+package com.chinaitop.depot.utils;
2
+
3
+import org.apache.poi.ss.usermodel.Cell;
4
+import org.apache.poi.ss.usermodel.Row;
5
+
6
+/**
7
+ * @auther mafy
8
+ * @createtime 2017/10/26 0026
9
+ */
10
+public class ExcelImportUtils{
11
+
12
+    //是否是2003的excel,返回true是2003
13
+    public static boolean isExcel2003(String filePath)  {
14
+        return filePath.matches("^.+\\.(?i)(xls)$");
15
+    }
16
+
17
+    //是否是2007的excel,返回true是2007
18
+    public static boolean isExcel2007(String filePath)  {
19
+        return filePath.matches("^.+\\.(?i)(xlsx)$");
20
+    }
21
+
22
+    /**
23
+     * 验证EXCEL文件
24
+     * @param filePath
25
+     * @return
26
+     */
27
+    public static boolean validateExcel(String filePath){
28
+        if (filePath == null || !(isExcel2003(filePath) || isExcel2007(filePath))){
29
+            return false;
30
+        }
31
+        return true;
32
+    }
33
+
34
+    public static boolean isEmpty(String type,int index,boolean[] NotEmpty){//判断是否可为空
35
+        return NotEmpty[index];
36
+    }
37
+
38
+    //判断导入的excel是否和模板相同
39
+    public  static boolean isSame(Row row, int totalCells,String[] titleArr){
40
+        for (int i = 0; i < totalCells; i++) {
41
+            Cell cell = row.getCell(i);//第一行的每一列
42
+            if(!ParameterUtil.isequal(cell.getStringCellValue(),titleArr[i]) || (totalCells != titleArr.length)){
43
+                return false;
44
+            }
45
+        }
46
+        return true;
47
+    }
48
+}

+ 170 - 0
src/main/java/com/chinaitop/depot/utils/ParameterUtil.java

@@ -0,0 +1,170 @@
1
+package com.chinaitop.depot.utils;
2
+
3
+import java.io.BufferedInputStream;
4
+import java.io.InputStream;
5
+import java.text.ParseException;
6
+import java.text.SimpleDateFormat;
7
+import java.util.Date;
8
+import java.util.List;
9
+import java.util.Properties;
10
+
11
+public class ParameterUtil {
12
+
13
+    public static String getSysDateTime(){
14
+        String temp_str="";
15
+        Date dt = new Date();
16
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
17
+        temp_str=sdf.format(dt);
18
+        System.out.println("获取当前时间"+temp_str);
19
+        return temp_str;
20
+    }
21
+    
22
+    public static String getDateYMDHMS(Date date) {
23
+    	String str = "";
24
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
25
+        str=sdf.format(date);
26
+        System.out.println("获取当前时间"+str);
27
+        return str;
28
+    }
29
+    
30
+    public static String getSysDate(){
31
+        String temp_str="";
32
+        Date dt = new Date();
33
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
34
+        temp_str=sdf.format(dt);
35
+        return temp_str;
36
+    }
37
+
38
+    public static Date string2datetime(String dateTime){
39
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
40
+        Date date = null;
41
+        try {
42
+            date = dateFormat.parse(dateTime);
43
+        } catch (ParseException e) {
44
+            e.printStackTrace();
45
+        }
46
+        return date;
47
+    }
48
+    public static Date string2date(String dateTime){
49
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
50
+        Date date = null;
51
+        try {
52
+            date = dateFormat.parse(dateTime);
53
+        } catch (ParseException e) {
54
+            e.printStackTrace();
55
+        }
56
+        return date;
57
+    }
58
+
59
+    public static String date2string(Date date){
60
+        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
61
+        String str=sdf.format(date);
62
+        return str;
63
+    }
64
+
65
+    /**
66
+     * 获取指定时间的时间戳
67
+     * @param datatime
68
+     * @return
69
+     */
70
+    public static String getTimeStamp(String datatime){
71
+        long timeStamp = 0;
72
+        SimpleDateFormat format =  new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
73
+        try {
74
+            Date date = format.parse(datatime);
75
+            timeStamp = date.getTime();
76
+        } catch (ParseException e) {
77
+            e.printStackTrace();
78
+        }
79
+        return String.valueOf(timeStamp);
80
+    }
81
+
82
+    /*
83
+     * 将时间戳转换为时间
84
+     */
85
+    public static String stampToDate(String s){
86
+        String res;
87
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
88
+        long lt = new Long(s);
89
+        Date date = new Date(lt);
90
+        res = simpleDateFormat.format(date);
91
+        return res;
92
+    }
93
+
94
+    public static void main(String[] args) {
95
+        System.out.println(stampToDate("1504689208643"));
96
+        System.out.println(getTimeStamp(getSysDateTime()));
97
+    }
98
+    public static String getBHS(String BHS){
99
+        String[] str = BHS.split(",");
100
+        StringBuffer sb = new StringBuffer();
101
+        for(int i=0;i<str.length;i++){
102
+            sb.append("'").append(str[i]).append("'").append(",");
103
+        }
104
+        String s=sb.toString();
105
+        String t=s.substring(0,s.length()-1);
106
+        return t;
107
+    }
108
+
109
+    //判断字段值是为空 不为空返回ture
110
+    public static boolean isnotnull(Object name){
111
+        return (null!=name&&!"".equals(name) && !"null".equals(name) && "null" != name);
112
+    }
113
+    
114
+    //判断字段值是为空,为空返回ture
115
+    public static boolean isnull(Object name){
116
+        return (null==name || "".equals(name) || "null".equals(name) || "null" == name);
117
+    }
118
+
119
+    //判断字段值是相等  相等返回ture
120
+    public static boolean isequal(Object name,Object value){
121
+        if(name==value||name.equals(value)){
122
+            return true;
123
+        }
124
+        return false;
125
+    }
126
+
127
+    /**
128
+     * 判断list和str数组是否全等
129
+     * @param list
130
+     * @param str
131
+     * @return
132
+     */
133
+    public static boolean isAllequal(List<String> list,String[] str){
134
+        boolean isbz = true;
135
+        for(int z=0;z<str.length;z++){
136
+            if(!isequal(list.get(z),str[z])){
137
+                isbz = false;
138
+                break;
139
+            }
140
+        }
141
+        return !isbz || !(str.length == list.size());
142
+    }
143
+
144
+    //判断字段值是否在某个集合里  在返回ture
145
+    public static boolean isallequal(Object name,String[] value){
146
+        for(int i=0;i<value.length;i++){
147
+            if(name==value[i]||name.equals(value[i])){
148
+                return true;
149
+            }
150
+        }
151
+        return false;
152
+    }
153
+
154
+    /**
155
+     * 从properties得到路径
156
+     * @param filePath
157
+     * @return
158
+     */
159
+    public static Properties readProperties(String filePath) {
160
+        Properties props = new Properties();
161
+        try {
162
+            InputStream in = new BufferedInputStream(ParameterUtil.class.getResourceAsStream(filePath));
163
+            props.load(in);
164
+        } catch (Exception e) {
165
+            e.printStackTrace();
166
+        }
167
+        return props;
168
+    }
169
+
170
+}

+ 66 - 0
src/main/java/com/chinaitop/depot/utils/RedisConfig.java

@@ -0,0 +1,66 @@
1
+package com.chinaitop.depot.utils;
2
+
3
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
4
+import com.fasterxml.jackson.annotation.PropertyAccessor;
5
+import com.fasterxml.jackson.databind.ObjectMapper;
6
+import org.springframework.beans.factory.annotation.Autowired;
7
+import org.springframework.context.annotation.Bean;
8
+import org.springframework.context.annotation.Configuration;
9
+import org.springframework.data.redis.connection.RedisConnectionFactory;
10
+import org.springframework.data.redis.core.HashOperations;
11
+import org.springframework.data.redis.core.ListOperations;
12
+import org.springframework.data.redis.core.RedisTemplate;
13
+import org.springframework.data.redis.core.SetOperations;
14
+import org.springframework.data.redis.core.ValueOperations;
15
+import org.springframework.data.redis.core.ZSetOperations;
16
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
17
+import org.springframework.data.redis.serializer.StringRedisSerializer;
18
+
19
+@Configuration
20
+public class RedisConfig {
21
+    @Autowired
22
+    private RedisConnectionFactory factory;
23
+
24
+    @Bean
25
+    public RedisTemplate<String, Object> redisTemplate() {
26
+        Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<Object>(Object.class);
27
+        ObjectMapper om = new ObjectMapper();
28
+        om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
29
+        om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
30
+        jackson2JsonRedisSerializer.setObjectMapper(om);
31
+        RedisTemplate<String, Object> template = new RedisTemplate<String, Object>();
32
+        template.setConnectionFactory(factory);
33
+        template.setKeySerializer(new StringRedisSerializer());
34
+        template.setValueSerializer(jackson2JsonRedisSerializer);
35
+        template.setHashKeySerializer(jackson2JsonRedisSerializer);
36
+        template.setHashValueSerializer(jackson2JsonRedisSerializer);
37
+        template.setDefaultSerializer(new StringRedisSerializer());
38
+        template.afterPropertiesSet();
39
+        return template;
40
+    }
41
+
42
+    @Bean
43
+    public HashOperations<String, String, Object> hashOperations(RedisTemplate<String, Object> redisTemplate) {
44
+        return redisTemplate.opsForHash();
45
+    }
46
+
47
+    @Bean
48
+    public ValueOperations<String, String> valueOperations(RedisTemplate<String, String> redisTemplate) {
49
+        return redisTemplate.opsForValue();
50
+    }
51
+
52
+    @Bean
53
+    public ListOperations<String, Object> listOperations(RedisTemplate<String, Object> redisTemplate) {
54
+        return redisTemplate.opsForList();
55
+    }
56
+
57
+    @Bean
58
+    public SetOperations<String, Object> setOperations(RedisTemplate<String, Object> redisTemplate) {
59
+        return redisTemplate.opsForSet();
60
+    }
61
+
62
+    @Bean
63
+    public ZSetOperations<String, Object> zSetOperations(RedisTemplate<String, Object> redisTemplate) {
64
+        return redisTemplate.opsForZSet();
65
+    }
66
+}

+ 547 - 0
src/main/java/com/chinaitop/depot/utils/RedisUtil.java

@@ -0,0 +1,547 @@
1
+package com.chinaitop.depot.utils;
2
+
3
+import java.util.List;
4
+import java.util.Map;
5
+import java.util.Set;
6
+import java.util.concurrent.TimeUnit;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.data.redis.core.HashOperations;
9
+import org.springframework.data.redis.core.ListOperations;
10
+import org.springframework.data.redis.core.RedisTemplate;
11
+import org.springframework.data.redis.core.SetOperations;
12
+import org.springframework.data.redis.core.ValueOperations;
13
+import org.springframework.stereotype.Component;
14
+import org.springframework.util.CollectionUtils;
15
+
16
+@Component
17
+public class RedisUtil {
18
+
19
+    @Autowired
20
+    private RedisTemplate<String, Object> redisTemplate;
21
+    @Autowired
22
+    private ValueOperations<String, String> valueOperations;
23
+    @Autowired
24
+    private HashOperations<String, String, Object> hashOperations;
25
+    @Autowired
26
+    private ListOperations<String, Object> listOperations;
27
+    @Autowired
28
+    private SetOperations<String, Object> setOperations;
29
+
30
+    //=============================common============================
31
+    /**
32
+     * 指定缓存失效时间
33
+     * @param key 键
34
+     * @param time 时间(秒)
35
+     * @return
36
+     */
37
+    public boolean expire(String key,long time){
38
+        try {
39
+            if(time>0){
40
+                redisTemplate.expire(key, time, TimeUnit.SECONDS);
41
+            }
42
+            return true;
43
+        } catch (Exception e) {
44
+            e.printStackTrace();
45
+            return false;
46
+        }
47
+    }
48
+
49
+    /**
50
+     * 根据key 获取过期时间
51
+     * @param key 键 不能为null
52
+     * @return 时间(秒) 返回0代表为永久有效
53
+     */
54
+    public long getExpire(String key){
55
+        return redisTemplate.getExpire(key,TimeUnit.SECONDS);
56
+    }
57
+
58
+    /**
59
+     * 判断key是否存在
60
+     * @param key 键
61
+     * @return true 存在 false不存在
62
+     */
63
+    public boolean hasKey(String key){
64
+        try {
65
+            return redisTemplate.hasKey(key);
66
+        } catch (Exception e) {
67
+            e.printStackTrace();
68
+            return false;
69
+        }
70
+    }
71
+
72
+    /**
73
+     * 删除缓存
74
+     * @param key 可以传一个值 或多个
75
+     */
76
+    @SuppressWarnings("unchecked")
77
+    public void del(String ... key){
78
+        if(key!=null&&key.length>0){
79
+            if(key.length==1){
80
+                redisTemplate.delete(key[0]);
81
+            }else{
82
+                redisTemplate.delete(CollectionUtils.arrayToList(key));
83
+            }
84
+        }
85
+    }
86
+
87
+    //============================String=============================
88
+    /**
89
+     * 普通缓存获取
90
+     * @param key 键
91
+     * @return 值
92
+     */
93
+    public Object get(String key){
94
+        return key==null?null:valueOperations.get(key);
95
+    }
96
+
97
+    /**
98
+     * 普通缓存放入
99
+     * @param key 键
100
+     * @param value 值
101
+     * @return true成功 false失败
102
+     */
103
+    public boolean set(String key,String value) {
104
+        try {
105
+            valueOperations.set(key, value);
106
+            return true;
107
+        } catch (Exception e) {
108
+            e.printStackTrace();
109
+            return false;
110
+        }
111
+
112
+    }
113
+
114
+    /**
115
+     * 普通缓存放入并设置时间
116
+     * @param key 键
117
+     * @param value 值
118
+     * @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期
119
+     * @return true成功 false 失败
120
+     */
121
+    public boolean set(String key,String value,long time){
122
+        try {
123
+            if(time>0){
124
+                valueOperations.set(key, value, time, TimeUnit.SECONDS);
125
+            }else{
126
+                set(key, value);
127
+            }
128
+            return true;
129
+        } catch (Exception e) {
130
+            e.printStackTrace();
131
+            return false;
132
+        }
133
+    }
134
+
135
+    /**
136
+     * 递增
137
+     * @param key 键
138
+     * @param by 要增加几(大于0)
139
+     * @return
140
+     */
141
+    public long incr(String key, long delta){
142
+        if(delta<0){
143
+            throw new RuntimeException("递增因子必须大于0");
144
+        }
145
+        return valueOperations.increment(key, delta);
146
+    }
147
+
148
+    /**
149
+     * 递减
150
+     * @param key 键
151
+     * @param by 要减少几(小于0)
152
+     * @return
153
+     */
154
+    public long decr(String key, long delta){
155
+        if(delta<0){
156
+            throw new RuntimeException("递减因子必须大于0");
157
+        }
158
+        return valueOperations.increment(key, -delta);
159
+    }
160
+
161
+    //================================Map=================================
162
+    /**
163
+     * HashGet
164
+     * @param key 键 不能为null
165
+     * @param item 项 不能为null
166
+     * @return 值
167
+     */
168
+    public Object hget(String key,String item){
169
+        return hashOperations.get(key, item);
170
+    }
171
+
172
+    /**
173
+     * 获取hashKey对应的所有键值
174
+     * @param key 键
175
+     * @return 对应的多个键值
176
+     */
177
+    public Map<String, Object> hmget(String key){
178
+        return hashOperations.entries(key);
179
+    }
180
+
181
+    /**
182
+     * HashSet
183
+     * @param key 键
184
+     * @param map 对应多个键值
185
+     * @return true 成功 false 失败
186
+     */
187
+    public boolean hmset(String key, Map<String,Object> map){
188
+        try {
189
+            hashOperations.putAll(key, map);
190
+            return true;
191
+        } catch (Exception e) {
192
+            e.printStackTrace();
193
+            return false;
194
+        }
195
+    }
196
+
197
+    /**
198
+     * HashSet 并设置时间
199
+     * @param key 键
200
+     * @param map 对应多个键值
201
+     * @param time 时间(秒)
202
+     * @return true成功 false失败
203
+     */
204
+    public boolean hmset(String key, Map<String,Object> map, long time){
205
+        try {
206
+            hashOperations.putAll(key, map);
207
+            if(time>0){
208
+                expire(key, time);
209
+            }
210
+            return true;
211
+        } catch (Exception e) {
212
+            e.printStackTrace();
213
+            return false;
214
+        }
215
+    }
216
+
217
+    /**
218
+     * 向一张hash表中放入数据,如果不存在将创建
219
+     * @param key 键
220
+     * @param item 项
221
+     * @param value 值
222
+     * @return true 成功 false失败
223
+     */
224
+    public boolean hset(String key,String item,Object value) {
225
+        try {
226
+            hashOperations.put(key, item, value);
227
+            return true;
228
+        } catch (Exception e) {
229
+            e.printStackTrace();
230
+            return false;
231
+        }
232
+    }
233
+
234
+    /**
235
+     * 向一张hash表中放入数据,如果不存在将创建
236
+     * @param key 键
237
+     * @param item 项
238
+     * @param value 值
239
+     * @param time 时间(秒)  注意:如果已存在的hash表有时间,这里将会替换原有的时间
240
+     * @return true 成功 false失败
241
+     */
242
+    public boolean hset(String key,String item,Object value,long time) {
243
+        try {
244
+            hashOperations.put(key, item, value);
245
+            if(time>0){
246
+                expire(key, time);
247
+            }
248
+            return true;
249
+        } catch (Exception e) {
250
+            e.printStackTrace();
251
+            return false;
252
+        }
253
+    }
254
+
255
+    /**
256
+     * 删除hash表中的值
257
+     * @param key 键 不能为null
258
+     * @param item 项 可以使多个 不能为null
259
+     */
260
+    public void hdel(String key, Object... item){
261
+        hashOperations.delete(key,item);
262
+    }
263
+
264
+    /**
265
+     * 判断hash表中是否有该项的值
266
+     * @param key 键 不能为null
267
+     * @param item 项 不能为null
268
+     * @return true 存在 false不存在
269
+     */
270
+    public boolean hHasKey(String key, String item){
271
+        return hashOperations.hasKey(key, item);
272
+    }
273
+
274
+    /**
275
+     * hash递增 如果不存在,就会创建一个 并把新增后的值返回
276
+     * @param key 键
277
+     * @param item 项
278
+     * @param by 要增加几(大于0)
279
+     * @return
280
+     */
281
+    public double hincr(String key, String item,double by){
282
+        return hashOperations.increment(key, item, by);
283
+    }
284
+
285
+    /**
286
+     * hash递减
287
+     * @param key 键
288
+     * @param item 项
289
+     * @param by 要减少记(小于0)
290
+     * @return
291
+     */
292
+    public double hdecr(String key, String item,double by){
293
+        return hashOperations.increment(key, item,-by);
294
+    }
295
+
296
+    //============================set=============================
297
+    /**
298
+     * 根据key获取Set中的所有值
299
+     * @param key 键
300
+     * @return
301
+     */
302
+    public Set<Object> sGet(String key){
303
+        try {
304
+            return setOperations.members(key);
305
+        } catch (Exception e) {
306
+            e.printStackTrace();
307
+            return null;
308
+        }
309
+    }
310
+
311
+    /**
312
+     * 根据value从一个set中查询,是否存在
313
+     * @param key 键
314
+     * @param value 值
315
+     * @return true 存在 false不存在
316
+     */
317
+    public boolean sHasKey(String key,Object value){
318
+        try {
319
+            return setOperations.isMember(key, value);
320
+        } catch (Exception e) {
321
+            e.printStackTrace();
322
+            return false;
323
+        }
324
+    }
325
+
326
+    /**
327
+     * 将数据放入set缓存
328
+     * @param key 键
329
+     * @param values 值 可以是多个
330
+     * @return 成功个数
331
+     */
332
+    public long sSet(String key, Object...values) {
333
+        try {
334
+            return setOperations.add(key, values);
335
+        } catch (Exception e) {
336
+            e.printStackTrace();
337
+            return 0;
338
+        }
339
+    }
340
+
341
+    /**
342
+     * 将set数据放入缓存
343
+     * @param key 键
344
+     * @param time 时间(秒)
345
+     * @param values 值 可以是多个
346
+     * @return 成功个数
347
+     */
348
+    public long sSetAndTime(String key,long time,Object...values) {
349
+        try {
350
+            Long count = setOperations.add(key, values);
351
+            if(time>0) expire(key, time);
352
+            return count;
353
+        } catch (Exception e) {
354
+            e.printStackTrace();
355
+            return 0;
356
+        }
357
+    }
358
+
359
+    /**
360
+     * 获取set缓存的长度
361
+     * @param key 键
362
+     * @return
363
+     */
364
+    public long sGetSetSize(String key){
365
+        try {
366
+            return setOperations.size(key);
367
+        } catch (Exception e) {
368
+            e.printStackTrace();
369
+            return 0;
370
+        }
371
+    }
372
+
373
+    /**
374
+     * 移除值为value的
375
+     * @param key 键
376
+     * @param values 值 可以是多个
377
+     * @return 移除的个数
378
+     */
379
+    public long setRemove(String key, Object ...values) {
380
+        try {
381
+            Long count = setOperations.remove(key, values);
382
+            return count;
383
+        } catch (Exception e) {
384
+            e.printStackTrace();
385
+            return 0;
386
+        }
387
+    }
388
+    //===============================list=================================
389
+
390
+    /**
391
+     * 获取list缓存的内容
392
+     * @param key 键
393
+     * @param start 开始
394
+     * @param end 结束  0 到 -1代表所有值
395
+     * @return
396
+     */
397
+    public List<Object> lGet(String key, long start, long end){
398
+        try {
399
+            return listOperations.range(key, start, end);
400
+        } catch (Exception e) {
401
+            e.printStackTrace();
402
+            return null;
403
+        }
404
+    }
405
+
406
+    /**
407
+     * 获取list缓存的所有内容
408
+     * @param key
409
+     * @return
410
+     */
411
+    public List<Object> lGetAll(String key){
412
+        return lGet(key,0,-1);
413
+    }
414
+
415
+    /**
416
+     * 获取list缓存的长度
417
+     * @param key 键
418
+     * @return
419
+     */
420
+    public long lGetListSize(String key){
421
+        try {
422
+            return listOperations.size(key);
423
+        } catch (Exception e) {
424
+            e.printStackTrace();
425
+            return 0;
426
+        }
427
+    }
428
+
429
+    /**
430
+     * 通过索引 获取list中的值
431
+     * @param key 键
432
+     * @param index 索引  index>=0时, 0 表头,1 第二个元素,依次类推;index<0时,-1,表尾,-2倒数第二个元素,依次类推
433
+     * @return
434
+     */
435
+    public Object lGetIndex(String key,long index){
436
+        try {
437
+            return listOperations.index(key, index);
438
+        } catch (Exception e) {
439
+            e.printStackTrace();
440
+            return null;
441
+        }
442
+    }
443
+
444
+    /**
445
+     * 将list放入缓存
446
+     * @param key 键
447
+     * @param value 值
448
+     * @param time 时间(秒)
449
+     * @return
450
+     */
451
+    public boolean lSet(String key, Object value) {
452
+        try {
453
+            listOperations.rightPush(key, value);
454
+            return true;
455
+        } catch (Exception e) {
456
+            e.printStackTrace();
457
+            return false;
458
+        }
459
+    }
460
+
461
+    /**
462
+     * 将list放入缓存
463
+     * @param key 键
464
+     * @param value 值
465
+     * @param time 时间(秒)
466
+     * @return
467
+     */
468
+    public boolean lSet(String key, Object value, long time) {
469
+        try {
470
+            listOperations.rightPush(key, value);
471
+            if (time > 0) expire(key, time);
472
+            return true;
473
+        } catch (Exception e) {
474
+            e.printStackTrace();
475
+            return false;
476
+        }
477
+    }
478
+
479
+    /**
480
+     * 将list放入缓存
481
+     * @param key 键
482
+     * @param value 值
483
+     * @param time 时间(秒)
484
+     * @return
485
+     */
486
+    public boolean lSet(String key, List<Object> value) {
487
+        try {
488
+            listOperations.rightPushAll(key, value);
489
+            return true;
490
+        } catch (Exception e) {
491
+            e.printStackTrace();
492
+            return false;
493
+        }
494
+    }
495
+
496
+    /**
497
+     * 将list放入缓存
498
+     * @param key 键
499
+     * @param value 值
500
+     * @param time 时间(秒)
501
+     * @return
502
+     */
503
+    public boolean lSet(String key, List<Object> value, long time) {
504
+        try {
505
+            listOperations.rightPushAll(key, value);
506
+            if (time > 0) expire(key, time);
507
+            return true;
508
+        } catch (Exception e) {
509
+            e.printStackTrace();
510
+            return false;
511
+        }
512
+    }
513
+
514
+    /**
515
+     * 根据索引修改list中的某条数据
516
+     * @param key 键
517
+     * @param index 索引
518
+     * @param value 值
519
+     * @return
520
+     */
521
+    public boolean lUpdateIndex(String key, long index,Object value) {
522
+        try {
523
+            listOperations.set(key, index, value);
524
+            return true;
525
+        } catch (Exception e) {
526
+            e.printStackTrace();
527
+            return false;
528
+        }
529
+    }
530
+
531
+    /**
532
+     * 移除N个值为value
533
+     * @param key 键
534
+     * @param count 移除多少个
535
+     * @param value 值
536
+     * @return 移除的个数
537
+     */
538
+    public long lRemove(String key,long count,Object value) {
539
+        try {
540
+            Long remove = listOperations.remove(key, count, value);
541
+            return remove;
542
+        } catch (Exception e) {
543
+            e.printStackTrace();
544
+            return 0;
545
+        }
546
+    }
547
+}

+ 82 - 0
src/main/java/com/chinaitop/depot/utils/SecurityCode.java

@@ -0,0 +1,82 @@
1
+package com.chinaitop.depot.utils;
2
+  
3
+
4
+import java.util.Arrays;
5
+
6
+public class SecurityCode {
7
+    
8
+    /**
9
+     * 验证码难度级别,Simple只包含数字,Medium包含数字和小写英文,Hard包含数字和大小写英文
10
+     */
11
+    public enum SecurityCodeLevel {Simple,Medium,Hard};
12
+    
13
+    /**
14
+     * 产生默认验证码,4位中等难度
15
+     * @return  String 验证码
16
+     */
17
+    public static String getSecurityCode(){
18
+        return getSecurityCode(4,SecurityCodeLevel.Medium,false);
19
+    }
20
+    
21
+    /**
22
+     * 产生长度和难度任意的验证码
23
+     * @param length  长度
24
+     * @param level   难度级别
25
+     * @param isCanRepeat  是否能够出现重复的字符,如果为true,则可能出现 5578这样包含两个5,如果为false,则不可能出现这种情况
26
+     * @return  String 验证码
27
+     */
28
+    public static String getSecurityCode(int length,SecurityCodeLevel level,boolean isCanRepeat){
29
+        
30
+        //随机抽取len个字符
31
+        int len=length;
32
+
33
+        char[] codes={'1','2','3','4','5','6','7','8','9'};
34
+        
35
+        //根据不同的难度截取字符数组
36
+        if(level==SecurityCodeLevel.Simple){
37
+            codes=Arrays.copyOfRange(codes, 0,9);
38
+        }else if(level==SecurityCodeLevel.Medium){
39
+            codes=Arrays.copyOfRange(codes, 0,33);
40
+        }
41
+        
42
+        //字符集合长度
43
+        int n=codes.length;
44
+        
45
+        //抛出运行时异常
46
+        if(len>n&&isCanRepeat==false){
47
+            throw new RuntimeException(
48
+                    String.format("调用SecurityCode.getSecurityCode(%1$s,%2$s,%3$s)出现异常," +
49
+                                   "当isCanRepeat为%3$s时,传入参数%1$s不能大于%4$s",
50
+                                   len,level,isCanRepeat,n));
51
+        }
52
+        
53
+        //存放抽取出来的字符
54
+        char[] result=new char[len];
55
+        
56
+        //判断能否出现重复的字符
57
+        if(isCanRepeat){
58
+            for(int i=0;i<result.length;i++){
59
+                //索引 0 and n-1
60
+                int r=(int)(Math.random()*n);
61
+            
62
+                //将result中的第i个元素设置为codes[r]存放的数值
63
+                result[i]=codes[r];
64
+            }
65
+        }else{
66
+            for(int i=0;i<result.length;i++){
67
+                //索引 0 and n-1
68
+                int r=(int)(Math.random()*n);
69
+                
70
+                //将result中的第i个元素设置为codes[r]存放的数值
71
+                result[i]=codes[r];
72
+                
73
+                //必须确保不会再次抽取到那个字符,因为所有抽取的字符必须不相同。
74
+                //因此,这里用数组中的最后一个字符改写codes[r],并将n减1
75
+                codes[r]=codes[n-1];
76
+                n--;
77
+            }
78
+        }
79
+        
80
+        return String.valueOf(result);
81
+    }
82
+}

+ 70 - 0
src/main/java/com/chinaitop/depot/utils/SecurityImage.java

@@ -0,0 +1,70 @@
1
+package com.chinaitop.depot.utils;
2
+
3
+import java.awt.Color;
4
+import java.awt.Font;
5
+import java.awt.Graphics;
6
+import java.awt.image.BufferedImage;
7
+import java.util.Random;
8
+
9
+public class SecurityImage {
10
+
11
+	/**
12
+	 * 生成验证码图片
13
+	 * 
14
+	 * @param securityCode
15
+	 *            验证码字符
16
+	 * @return BufferedImage 图片
17
+	 */
18
+	public static BufferedImage createImage(String securityCode, Integer fontSize, Integer widths, Integer heigths) {
19
+
20
+		// 验证码长度
21
+		int codeLength = securityCode.length();
22
+		// 字体大小
23
+		int fSize = fontSize;
24
+		// 图片宽度
25
+		int width = widths;
26
+		// 图片高度
27
+		int height = heigths;
28
+
29
+		// 图片
30
+		BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
31
+		Graphics g = image.createGraphics();
32
+
33
+		// 设置背景色
34
+		g.setColor(Color.WHITE);
35
+		// 填充背景
36
+		g.fillRect(0, 0, width, height);
37
+
38
+		// 设置边框颜色
39
+		g.setColor(Color.LIGHT_GRAY);
40
+		// 边框字体样式
41
+		g.setFont(new Font("Arial", Font.BOLD, height - 2));
42
+		// 绘制边框
43
+		g.drawRect(0, 0, width - 1, height - 1);
44
+
45
+		// 绘制噪点
46
+		Random rand = new Random();
47
+		// 设置噪点颜色
48
+		g.setColor(Color.LIGHT_GRAY);
49
+		for (int i = 0; i < codeLength * 6; i++) {
50
+			int x = rand.nextInt(width);
51
+			int y = rand.nextInt(height);
52
+			// 绘制1*1大小的矩形
53
+			g.drawRect(x, y, 1, 1);
54
+		}
55
+
56
+		// 绘制验证码
57
+		int codeY = height - 10;
58
+		// 设置字体颜色和样式
59
+		g.setColor(new Color(19, 148, 246));
60
+		g.setFont(new Font("Georgia", Font.BOLD, fSize));
61
+		for (int i = 0; i < codeLength; i++) {
62
+			g.drawString(String.valueOf(securityCode.charAt(i)), i * 16 + 5, codeY);
63
+		}
64
+		// 关闭资源
65
+		g.dispose();
66
+
67
+		return image;
68
+	}
69
+
70
+}

+ 39 - 0
src/main/java/com/chinaitop/depot/utils/WebConfig.java

@@ -0,0 +1,39 @@
1
+package com.chinaitop.depot.utils;
2
+
3
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
4
+import org.springframework.context.annotation.Bean;
5
+import org.springframework.context.annotation.Configuration;
6
+import java.util.ArrayList;
7
+import java.util.List;
8
+
9
+/**
10
+ * @desc 注册bean, 将自定义过滤器添加到过滤器链中
11
+ * @Author hf
12
+ * @date 2019/3/11
13
+ * @return
14
+ */
15
+@Configuration
16
+public class WebConfig {
17
+
18
+   /**
19
+    * 注册过滤器,有两种方式:
20
+    * 1) 使用 @Component 注解<br>
21
+    * 2) 添加到过滤器链中,此方式适用于使用第三方的过滤器。将过滤器写到 WebConfig 类中,如下:
22
+    */
23
+   @Bean
24
+   public FilterRegistrationBean filterRegistrationBean() {
25
+
26
+      FilterRegistrationBean registrationBean = new FilterRegistrationBean();
27
+
28
+      CustomFilter filter = new CustomFilter();
29
+      registrationBean.setFilter(filter);
30
+
31
+      //设置过滤器拦截请求
32
+      List<String> urls = new ArrayList<>();
33
+      urls.add("/*");
34
+      registrationBean.setUrlPatterns(urls);
35
+
36
+      return registrationBean;
37
+   }
38
+
39
+}