ソースを参照

通风 增加记录

gaodandan 5 年 前
コミット
42e787aca5
共有15 個のファイルを変更した2136 個の追加38 個の削除を含む
  1. 51 2
      src/main/java/com/chinaitop/depot/intelligent/ventilation/controller/AerationRecordController.java
  2. 45 0
      src/main/java/com/chinaitop/depot/intelligent/ventilation/controller/KcswController.java
  3. 15 0
      src/main/java/com/chinaitop/depot/intelligent/ventilation/mapper/DataKcglKcswDefaultMapper.java
  4. 103 0
      src/main/java/com/chinaitop/depot/intelligent/ventilation/mapper/DataKcglKcswDefaultMapper.xml
  5. 16 5
      src/main/java/com/chinaitop/depot/intelligent/ventilation/mapper/TJobApplicationMapper.xml
  6. 14 14
      src/main/java/com/chinaitop/depot/intelligent/ventilation/mapper/TVentilationMapper.xml
  7. 340 0
      src/main/java/com/chinaitop/depot/intelligent/ventilation/model/DataKcglKcswDefault.java
  8. 1399 0
      src/main/java/com/chinaitop/depot/intelligent/ventilation/model/DataKcglKcswDefaultExample.java
  9. 14 1
      src/main/java/com/chinaitop/depot/intelligent/ventilation/model/TJobApplication.java
  10. 11 8
      src/main/java/com/chinaitop/depot/intelligent/ventilation/model/TVentilation.java
  11. 7 1
      src/main/java/com/chinaitop/depot/intelligent/ventilation/service/AerationRecordService.java
  12. 19 0
      src/main/java/com/chinaitop/depot/intelligent/ventilation/service/KcswService.java
  13. 39 1
      src/main/java/com/chinaitop/depot/intelligent/ventilation/service/impl/AerationRecordServiceImpl.java
  14. 10 6
      src/main/java/com/chinaitop/depot/intelligent/ventilation/service/impl/AerationTaskServiceImpl.java
  15. 53 0
      src/main/java/com/chinaitop/depot/intelligent/ventilation/service/impl/KcswServiceImpl.java

+ 51 - 2
src/main/java/com/chinaitop/depot/intelligent/ventilation/controller/AerationRecordController.java

@@ -47,13 +47,13 @@ public class AerationRecordController {
47 47
             @ApiImplicitParam(name = "vDevKindCode", value = "设备类型", paramType = "query"),
48 48
             @ApiImplicitParam(name = "vCfCode", value = "仓库名称", paramType = "query")
49 49
     })
50
-    public ResponseEntity<PageInfo<TVentilation>> getList(Integer pageNum, Integer pageSize, String vCfCode, String vDevKindCode) {
50
+    public ResponseEntity<PageInfo<TVentilation>> getList(Integer pageNum, Integer pageSize, String vCfCode, String vDevKindCode,String type) {
51 51
         List<TVentilation> list = null;
52 52
         try {
53 53
             if (null != pageNum && null != pageSize) {
54 54
                 PageHelper.startPage(pageNum, pageSize);
55 55
             }
56
-            list = aerationRecordService.getList(vCfCode, vDevKindCode);
56
+            list = aerationRecordService.getList(vCfCode, vDevKindCode,type);
57 57
         } catch (Exception e) {
58 58
             e.printStackTrace();
59 59
             ResponseEntity.failed(e.getMessage());
@@ -137,4 +137,53 @@ public class AerationRecordController {
137 137
         return ResponseEntity.ok(tVentilation);
138 138
     }
139 139
 
140
+    
141
+    @RequestMapping(value = "/add", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
142
+    @ApiOperation(value = "数据更新与添加", notes = "数据更新与添加")
143
+    @ApiImplicitParams({
144
+            @ApiImplicitParam(name = "tVentilationJson", value = "表数据json串", paramType = "form")
145
+    })
146
+    public ResponseEntity add(String tVentilationJson,Integer orgId) {
147
+        try {
148
+        	aerationRecordService.add(tVentilationJson,orgId);
149
+        } catch (Exception e) {
150
+            e.printStackTrace();
151
+            ResponseEntity.failed(e.getMessage());
152
+        }
153
+        return ResponseEntity.ok();
154
+    }
155
+    
156
+    
157
+    @RequestMapping(value = "/deleteById", method = RequestMethod.POST)
158
+    @ApiOperation(value = "根据粮情id删除信息", notes = "根据粮情id删除信息")
159
+    @ApiImplicitParams({
160
+            @ApiImplicitParam(name = "id", value = "粮情id", paramType = "query"),
161
+            @ApiImplicitParam(name = "aerationParamJson", value = "通风参数json字符串", paramType = "query")
162
+    })
163
+    public ResponseEntity deleteById(String id) {
164
+        if (StringUtils.isNotBlank(id)) {
165
+            int count = aerationRecordService.deleteById(id);
166
+            if (count > 0) {
167
+                return ResponseEntity.ok();
168
+            } else {
169
+                return ResponseEntity.failed("删除失败!");
170
+            }
171
+        }
172
+        return ResponseEntity.failed("ID数据有误!");
173
+    }
174
+    
175
+    @RequestMapping(value = "/getById", method = RequestMethod.POST)
176
+    @ApiOperation(value = "根据id查询信息", notes = "根据id查询信息")
177
+    @ApiImplicitParams({
178
+            @ApiImplicitParam(name = "id", value = "id", paramType = "query")
179
+    })
180
+    public ResponseEntity<TVentilation> getById(String id) {
181
+    	TVentilation tVentilation = null;
182
+        if (StringUtils.isNotBlank(id)) {
183
+        	tVentilation = aerationRecordService.getById(id);
184
+        } else {
185
+            return ResponseEntity.failed("ID数据有误!");
186
+        }
187
+        return ResponseEntity.ok(tVentilation);
188
+    }
140 189
 }

+ 45 - 0
src/main/java/com/chinaitop/depot/intelligent/ventilation/controller/KcswController.java

@@ -0,0 +1,45 @@
1
+package com.chinaitop.depot.intelligent.ventilation.controller;
2
+
3
+import java.util.List;
4
+
5
+import javax.annotation.Resource;
6
+
7
+import org.springframework.http.MediaType;
8
+import org.springframework.web.bind.annotation.RequestMapping;
9
+import org.springframework.web.bind.annotation.RequestMethod;
10
+import org.springframework.web.bind.annotation.RestController;
11
+
12
+import com.chinaitop.depot.intelligent.ventilation.model.DataKcglKcswDefault;
13
+import com.chinaitop.depot.intelligent.ventilation.service.KcswService;
14
+
15
+import io.swagger.annotations.Api;
16
+import io.swagger.annotations.ApiImplicitParam;
17
+import io.swagger.annotations.ApiImplicitParams;
18
+import io.swagger.annotations.ApiOperation;
19
+
20
+@RestController
21
+@RequestMapping(value="/agile/kcsw")
22
+@Api(value= "KcswController", description = "库存实物控制类")
23
+public class KcswController {
24
+
25
+	@Resource
26
+	private KcswService kcswService;
27
+	
28
+	
29
+	
30
+	/**
31
+	 * 销售计划 查询当前组织的库存信息
32
+	 */
33
+	@RequestMapping(value="/queryKcData",produces=MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
34
+	@ApiOperation(value="查询当前组织的库存信息", notes = "查询当前组织的库存信息")
35
+	@ApiImplicitParams({
36
+		@ApiImplicitParam(name = "orgId", value = "登录对象", paramType = "form")
37
+	})
38
+	public List<DataKcglKcswDefault> queryKcData(Integer orgId, String houseId, String warehouseId){
39
+		return kcswService.queryKcData(orgId,houseId,warehouseId);
40
+	}
41
+
42
+	
43
+	
44
+
45
+}

+ 15 - 0
src/main/java/com/chinaitop/depot/intelligent/ventilation/mapper/DataKcglKcswDefaultMapper.java

@@ -0,0 +1,15 @@
1
+package com.chinaitop.depot.intelligent.ventilation.mapper;
2
+
3
+
4
+import java.util.List;
5
+
6
+
7
+import com.chinaitop.depot.intelligent.ventilation.model.DataKcglKcswDefault;
8
+import com.chinaitop.depot.intelligent.ventilation.model.DataKcglKcswDefaultExample;
9
+
10
+public interface DataKcglKcswDefaultMapper {
11
+
12
+    List<DataKcglKcswDefault> selectByExample(DataKcglKcswDefaultExample example);
13
+
14
+    
15
+}

+ 103 - 0
src/main/java/com/chinaitop/depot/intelligent/ventilation/mapper/DataKcglKcswDefaultMapper.xml

@@ -0,0 +1,103 @@
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.intelligent.ventilation.mapper.DataKcglKcswDefaultMapper">
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.ventilation.model.DataKcglKcswDefault">
5
+    <id column="DataID" jdbcType="CHAR" property="dataid" />
6
+    <result column="UnitID" jdbcType="CHAR" property="unitid" />
7
+    <result column="PeriodID" jdbcType="CHAR" property="periodid" />
8
+    <result column="RoundID" jdbcType="TINYINT" property="roundid" />
9
+    <result column="ModifyDate" jdbcType="TIMESTAMP" property="modifydate" />
10
+    <result column="builder" jdbcType="CHAR" property="builder" />
11
+    <result column="lkmc" jdbcType="VARCHAR" property="lkmc" />
12
+    <result column="lkbm" jdbcType="VARCHAR" property="lkbm" />
13
+    <result column="hwxz" jdbcType="CHAR" property="hwxz" />
14
+    <result column="ch" jdbcType="INTEGER" property="ch" />
15
+    <result column="hwh" jdbcType="INTEGER" property="hwh" />
16
+    <result column="pz" jdbcType="CHAR" property="pz" />
17
+    <result column="mxpz" jdbcType="CHAR" property="mxpz" />
18
+    <result column="dj" jdbcType="CHAR" property="dj" />
19
+    <result column="rq" jdbcType="TIMESTAMP" property="rq" />
20
+    <result column="wjh" jdbcType="VARCHAR" property="wjh" />
21
+    <result column="kcsl" jdbcType="DOUBLE" property="kcsl" />
22
+    <result column="cjsj" jdbcType="TIMESTAMP" property="cjsj" />
23
+  </resultMap>
24
+  <sql id="Example_Where_Clause">
25
+    <where>
26
+      <foreach collection="oredCriteria" item="criteria" separator="or">
27
+        <if test="criteria.valid">
28
+          <trim prefix="(" prefixOverrides="and" suffix=")">
29
+            <foreach collection="criteria.criteria" item="criterion">
30
+              <choose>
31
+                <when test="criterion.noValue">
32
+                  and ${criterion.condition}
33
+                </when>
34
+                <when test="criterion.singleValue">
35
+                  and ${criterion.condition} #{criterion.value}
36
+                </when>
37
+                <when test="criterion.betweenValue">
38
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
39
+                </when>
40
+                <when test="criterion.listValue">
41
+                  and ${criterion.condition}
42
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
43
+                    #{listItem}
44
+                  </foreach>
45
+                </when>
46
+              </choose>
47
+            </foreach>
48
+          </trim>
49
+        </if>
50
+      </foreach>
51
+    </where>
52
+  </sql>
53
+  <sql id="Update_By_Example_Where_Clause">
54
+    <where>
55
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
56
+        <if test="criteria.valid">
57
+          <trim prefix="(" prefixOverrides="and" suffix=")">
58
+            <foreach collection="criteria.criteria" item="criterion">
59
+              <choose>
60
+                <when test="criterion.noValue">
61
+                  and ${criterion.condition}
62
+                </when>
63
+                <when test="criterion.singleValue">
64
+                  and ${criterion.condition} #{criterion.value}
65
+                </when>
66
+                <when test="criterion.betweenValue">
67
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
68
+                </when>
69
+                <when test="criterion.listValue">
70
+                  and ${criterion.condition}
71
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
72
+                    #{listItem}
73
+                  </foreach>
74
+                </when>
75
+              </choose>
76
+            </foreach>
77
+          </trim>
78
+        </if>
79
+      </foreach>
80
+    </where>
81
+  </sql>
82
+  <sql id="Base_Column_List">
83
+    DataID, UnitID, PeriodID, RoundID, ModifyDate, builder, lkmc, lkbm, hwxz, ch, hwh, 
84
+    pz, mxpz, dj, rq, wjh, kcsl, cjsj
85
+  </sql>
86
+  
87
+  <select id="selectByExample" parameterType="com.chinaitop.depot.intelligent.ventilation.model.DataKcglKcswDefaultExample" resultMap="BaseResultMap">
88
+    select
89
+    <if test="distinct">
90
+      distinct
91
+    </if>
92
+    <include refid="Base_Column_List" />
93
+    from lsreport_ts.data_kcgl_kcsw_default
94
+    <if test="_parameter != null">
95
+      <include refid="Example_Where_Clause" />
96
+    </if>
97
+    <if test="orderByClause != null">
98
+      order by ${orderByClause}
99
+    </if>
100
+  </select>
101
+  
102
+  
103
+</mapper>

+ 16 - 5
src/main/java/com/chinaitop/depot/intelligent/ventilation/mapper/TJobApplicationMapper.xml

@@ -132,7 +132,7 @@
132 132
     aeration_target, state, remark, packingmode, max_ater, min_water, avg_water, areation_plan_number, 
133 133
     org_id, updatetime, ldkxd, tflx, fwlx, fwszfs, zfdjmj, fwkkl, kqtjb, tfkszgs, tfjxh, 
134 134
     tfjts, dtfjedqy, dtfjedfl, dtfjedgl, sffs, dtfjscfl, dtfjzgl, zfl, dwtfl, scxtzl, 
135
-    tfzyfzr
135
+    tfzyfzr,tfzyry
136 136
   </sql>
137 137
   <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TJobApplicationExample" >
138 138
     <!--
@@ -202,7 +202,7 @@
202 202
       tfjts, dtfjedqy, dtfjedfl, 
203 203
       dtfjedgl, sffs, dtfjscfl, 
204 204
       dtfjzgl, zfl, dwtfl, 
205
-      scxtzl, tfzyfzr)
205
+      scxtzl, tfzyfzr,tfzyry)
206 206
     values (#{id,jdbcType=VARCHAR}, #{vCfCode,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
207 207
       #{applyPerson,jdbcType=VARCHAR}, #{applyTime,jdbcType=TIMESTAMP}, #{testTime,jdbcType=TIMESTAMP}, 
208 208
       #{endTime,jdbcType=TIMESTAMP}, #{ventilationMode,jdbcType=VARCHAR}, #{aerationTarget,jdbcType=VARCHAR}, 
@@ -215,7 +215,7 @@
215 215
       #{tfjts,jdbcType=VARCHAR}, #{dtfjedqy,jdbcType=VARCHAR}, #{dtfjedfl,jdbcType=VARCHAR}, 
216 216
       #{dtfjedgl,jdbcType=VARCHAR}, #{sffs,jdbcType=VARCHAR}, #{dtfjscfl,jdbcType=VARCHAR}, 
217 217
       #{dtfjzgl,jdbcType=VARCHAR}, #{zfl,jdbcType=VARCHAR}, #{dwtfl,jdbcType=VARCHAR}, 
218
-      #{scxtzl,jdbcType=VARCHAR}, #{tfzyfzr,jdbcType=VARCHAR})
218
+      #{scxtzl,jdbcType=VARCHAR}, #{tfzyfzr,jdbcType=VARCHAR},#{tfzyry,jdbcType=VARCHAR})
219 219
   </insert>
220 220
   <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.ventilation.model.TJobApplication" >
221 221
     <!--
@@ -339,6 +339,9 @@
339 339
       <if test="tfzyfzr != null" >
340 340
         tfzyfzr,
341 341
       </if>
342
+      <if test="tfzyry != null" >
343
+        tfzyry,
344
+      </if>
342 345
     </trim>
343 346
     <trim prefix="values (" suffix=")" suffixOverrides="," >
344 347
       <if test="id != null" >
@@ -590,6 +593,9 @@
590 593
       <if test="record.tfzyfzr != null" >
591 594
         tfzyfzr = #{record.tfzyfzr,jdbcType=VARCHAR},
592 595
       </if>
596
+      <if test="record.tfzyry != null" >
597
+        tfzyfzr = #{record.tfzyry,jdbcType=VARCHAR},
598
+      </if>
593 599
     </set>
594 600
     <if test="_parameter != null" >
595 601
       <include refid="Update_By_Example_Where_Clause" />
@@ -639,7 +645,8 @@
639 645
       zfl = #{record.zfl,jdbcType=VARCHAR},
640 646
       dwtfl = #{record.dwtfl,jdbcType=VARCHAR},
641 647
       scxtzl = #{record.scxtzl,jdbcType=VARCHAR},
642
-      tfzyfzr = #{record.tfzyfzr,jdbcType=VARCHAR}
648
+      tfzyfzr = #{record.tfzyfzr,jdbcType=VARCHAR},
649
+      tfzyry = #{record.tfzyry,jdbcType=VARCHAR}
643 650
     <if test="_parameter != null" >
644 651
       <include refid="Update_By_Example_Where_Clause" />
645 652
     </if>
@@ -763,6 +770,9 @@
763 770
       <if test="tfzyfzr != null" >
764 771
         tfzyfzr = #{tfzyfzr,jdbcType=VARCHAR},
765 772
       </if>
773
+      <if test="tfzyry != null" >
774
+        tfzyry = #{tfzyry,jdbcType=VARCHAR},
775
+      </if>
766 776
     </set>
767 777
     where id = #{id,jdbcType=VARCHAR}
768 778
   </update>
@@ -809,7 +819,8 @@
809 819
       zfl = #{zfl,jdbcType=VARCHAR},
810 820
       dwtfl = #{dwtfl,jdbcType=VARCHAR},
811 821
       scxtzl = #{scxtzl,jdbcType=VARCHAR},
812
-      tfzyfzr = #{tfzyfzr,jdbcType=VARCHAR}
822
+      tfzyfzr = #{tfzyfzr,jdbcType=VARCHAR},
823
+      tfzyry = #{tfzyry,jdbcType=VARCHAR}
813 824
     where id = #{id,jdbcType=VARCHAR}
814 825
   </update>
815 826
   

+ 14 - 14
src/main/java/com/chinaitop/depot/intelligent/ventilation/mapper/TVentilationMapper.xml

@@ -43,7 +43,7 @@
43 43
     <result column="jshpjlw" property="jshpjlw" jdbcType="VARCHAR" />
44 44
     <result column="jwfd" property="jwfd" jdbcType="VARCHAR" />
45 45
     <result column="dljwnh" property="dljwnh" jdbcType="VARCHAR" />
46
-    <result column="ssl" property="ssl" jdbcType="VARCHAR" />
46
+    <result column="sslssl" property="sslssl" jdbcType="VARCHAR" />
47 47
     <result column="bsxgpjjg" property="bsxgpjjg" jdbcType="VARCHAR" />
48 48
     <result column="tfjwjyxpjzc" property="tfjwjyxpjzc" jdbcType="VARCHAR" />
49 49
     <result column="tfjwjyxpjsc" property="tfjwjyxpjsc" jdbcType="VARCHAR" />
@@ -136,7 +136,7 @@
136 136
     v_end_time, v_distinguish_state, v_state, v_update_person, data_source, v_update_time, 
137 137
     updatetime, zhdl, zydyjdqw, zydyjdpjqs, zydyjdtfqpjlw, zydyjdzysc, zydejdqw, zydejdpjqs, 
138 138
     zydejdtfqpjlw, zydejdzysc, zydsjdqw, zydsjdpjqs, zydsjdtfqpjlw, zydsjdzysc, zydsijdqw, 
139
-    zydsijdpjqs, zydsijdtfqpjlw, zydsijdzysc, zyqpjlw, jshpjlw, jwfd, dljwnh, ssl, bsxgpjjg, 
139
+    zydsijdpjqs, zydsijdtfqpjlw, zydsijdzysc, zyqpjlw, jshpjlw, jwfd, dljwnh, sslssl, bsxgpjjg, 
140 140
     tfjwjyxpjzc, tfjwjyxpjsc, tfjwjyxpjzjc, tfjwjyxpjxc, zyqpjsf, zyhpjsf, jsfd, dljsnh, 
141 141
     tfjsjyxfxzc, tfjsjyxfxsc, tfjsjyxfxzjc, tfjsjyxfxxc
142 142
   </sql>
@@ -208,7 +208,7 @@
208 208
       zydsjdzysc, zydsijdqw, zydsijdpjqs, 
209 209
       zydsijdtfqpjlw, zydsijdzysc, zyqpjlw, 
210 210
       jshpjlw, jwfd, dljwnh, 
211
-      ssl, bsxgpjjg, tfjwjyxpjzc, 
211
+      sslssl, bsxgpjjg, tfjwjyxpjzc, 
212 212
       tfjwjyxpjsc, tfjwjyxpjzjc, tfjwjyxpjxc, 
213 213
       zyqpjsf, zyhpjsf, jsfd, 
214 214
       dljsnh, tfjsjyxfxzc, tfjsjyxfxsc, 
@@ -225,7 +225,7 @@
225 225
       #{zydsjdzysc,jdbcType=VARCHAR}, #{zydsijdqw,jdbcType=VARCHAR}, #{zydsijdpjqs,jdbcType=VARCHAR}, 
226 226
       #{zydsijdtfqpjlw,jdbcType=VARCHAR}, #{zydsijdzysc,jdbcType=VARCHAR}, #{zyqpjlw,jdbcType=VARCHAR}, 
227 227
       #{jshpjlw,jdbcType=VARCHAR}, #{jwfd,jdbcType=VARCHAR}, #{dljwnh,jdbcType=VARCHAR}, 
228
-      #{ssl,jdbcType=VARCHAR}, #{bsxgpjjg,jdbcType=VARCHAR}, #{tfjwjyxpjzc,jdbcType=VARCHAR}, 
228
+      #{sslssl,jdbcType=VARCHAR}, #{bsxgpjjg,jdbcType=VARCHAR}, #{tfjwjyxpjzc,jdbcType=VARCHAR}, 
229 229
       #{tfjwjyxpjsc,jdbcType=VARCHAR}, #{tfjwjyxpjzjc,jdbcType=VARCHAR}, #{tfjwjyxpjxc,jdbcType=VARCHAR}, 
230 230
       #{zyqpjsf,jdbcType=VARCHAR}, #{zyhpjsf,jdbcType=VARCHAR}, #{jsfd,jdbcType=VARCHAR}, 
231 231
       #{dljsnh,jdbcType=VARCHAR}, #{tfjsjyxfxzc,jdbcType=VARCHAR}, #{tfjsjyxfxsc,jdbcType=VARCHAR}, 
@@ -347,8 +347,8 @@
347 347
       <if test="dljwnh != null" >
348 348
         dljwnh,
349 349
       </if>
350
-      <if test="ssl != null" >
351
-        ssl,
350
+      <if test="sslssl != null" >
351
+        sslssl,
352 352
       </if>
353 353
       <if test="bsxgpjjg != null" >
354 354
         bsxgpjjg,
@@ -499,8 +499,8 @@
499 499
       <if test="dljwnh != null" >
500 500
         #{dljwnh,jdbcType=VARCHAR},
501 501
       </if>
502
-      <if test="ssl != null" >
503
-        #{ssl,jdbcType=VARCHAR},
502
+      <if test="sslssl != null" >
503
+        #{sslssl,jdbcType=VARCHAR},
504 504
       </if>
505 505
       <if test="bsxgpjjg != null" >
506 506
         #{bsxgpjjg,jdbcType=VARCHAR},
@@ -670,8 +670,8 @@
670 670
       <if test="record.dljwnh != null" >
671 671
         dljwnh = #{record.dljwnh,jdbcType=VARCHAR},
672 672
       </if>
673
-      <if test="record.ssl != null" >
674
-        ssl = #{record.ssl,jdbcType=VARCHAR},
673
+      <if test="record.sslssl != null" >
674
+        sslssl = #{record.sslssl,jdbcType=VARCHAR},
675 675
       </if>
676 676
       <if test="record.bsxgpjjg != null" >
677 677
         bsxgpjjg = #{record.bsxgpjjg,jdbcType=VARCHAR},
@@ -760,7 +760,7 @@
760 760
       jshpjlw = #{record.jshpjlw,jdbcType=VARCHAR},
761 761
       jwfd = #{record.jwfd,jdbcType=VARCHAR},
762 762
       dljwnh = #{record.dljwnh,jdbcType=VARCHAR},
763
-      ssl = #{record.ssl,jdbcType=VARCHAR},
763
+      sslssl = #{record.sslssl,jdbcType=VARCHAR},
764 764
       bsxgpjjg = #{record.bsxgpjjg,jdbcType=VARCHAR},
765 765
       tfjwjyxpjzc = #{record.tfjwjyxpjzc,jdbcType=VARCHAR},
766 766
       tfjwjyxpjsc = #{record.tfjwjyxpjsc,jdbcType=VARCHAR},
@@ -891,8 +891,8 @@
891 891
       <if test="dljwnh != null" >
892 892
         dljwnh = #{dljwnh,jdbcType=VARCHAR},
893 893
       </if>
894
-      <if test="ssl != null" >
895
-        ssl = #{ssl,jdbcType=VARCHAR},
894
+      <if test="sslssl != null" >
895
+        sslssl = #{sslssl,jdbcType=VARCHAR},
896 896
       </if>
897 897
       <if test="bsxgpjjg != null" >
898 898
         bsxgpjjg = #{bsxgpjjg,jdbcType=VARCHAR},
@@ -978,7 +978,7 @@
978 978
       jshpjlw = #{jshpjlw,jdbcType=VARCHAR},
979 979
       jwfd = #{jwfd,jdbcType=VARCHAR},
980 980
       dljwnh = #{dljwnh,jdbcType=VARCHAR},
981
-      ssl = #{ssl,jdbcType=VARCHAR},
981
+      sslssl = #{sslssl,jdbcType=VARCHAR},
982 982
       bsxgpjjg = #{bsxgpjjg,jdbcType=VARCHAR},
983 983
       tfjwjyxpjzc = #{tfjwjyxpjzc,jdbcType=VARCHAR},
984 984
       tfjwjyxpjsc = #{tfjwjyxpjsc,jdbcType=VARCHAR},

+ 340 - 0
src/main/java/com/chinaitop/depot/intelligent/ventilation/model/DataKcglKcswDefault.java

@@ -0,0 +1,340 @@
1
+package com.chinaitop.depot.intelligent.ventilation.model;
2
+
3
+import java.util.Date;
4
+
5
+public class DataKcglKcswDefault {
6
+    private String dataid;
7
+
8
+    private String unitid;
9
+
10
+    private String periodid;
11
+
12
+    private Byte roundid;
13
+
14
+    private Date modifydate;
15
+
16
+    private String builder;
17
+
18
+    private String lkmc;
19
+
20
+    private String lkbm;
21
+
22
+    private String hwxz;
23
+
24
+    private String ch;
25
+
26
+    private String hwh;
27
+
28
+    private String pz;
29
+
30
+    private String mxpz;
31
+
32
+    private String dj;
33
+
34
+    private Date rq;
35
+
36
+    private String wjh;
37
+
38
+    private Double kcsl;
39
+
40
+    private Date cjsj;
41
+
42
+    /**
43
+     * 数据记录ID
44
+     * @return DataID 数据记录ID
45
+     */
46
+    public String getDataid() {
47
+        return dataid;
48
+    }
49
+
50
+    /**
51
+     * 数据记录ID
52
+     * @param dataid 数据记录ID
53
+     */
54
+    public void setDataid(String dataid) {
55
+        this.dataid = dataid == null ? null : dataid.trim();
56
+    }
57
+
58
+    /**
59
+     * 单位ID
60
+     * @return UnitID 单位ID
61
+     */
62
+    public String getUnitid() {
63
+        return unitid;
64
+    }
65
+
66
+    /**
67
+     * 单位ID
68
+     * @param unitid 单位ID
69
+     */
70
+    public void setUnitid(String unitid) {
71
+        this.unitid = unitid == null ? null : unitid.trim();
72
+    }
73
+
74
+    /**
75
+     * 期间ID
76
+     * @return PeriodID 期间ID
77
+     */
78
+    public String getPeriodid() {
79
+        return periodid;
80
+    }
81
+
82
+    /**
83
+     * 期间ID
84
+     * @param periodid 期间ID
85
+     */
86
+    public void setPeriodid(String periodid) {
87
+        this.periodid = periodid == null ? null : periodid.trim();
88
+    }
89
+
90
+    /**
91
+     * 舍位ID
92
+     * @return RoundID 舍位ID
93
+     */
94
+    public Byte getRoundid() {
95
+        return roundid;
96
+    }
97
+
98
+    /**
99
+     * 舍位ID
100
+     * @param roundid 舍位ID
101
+     */
102
+    public void setRoundid(Byte roundid) {
103
+        this.roundid = roundid;
104
+    }
105
+
106
+    /**
107
+     * 最后一次编辑时间
108
+     * @return ModifyDate 最后一次编辑时间
109
+     */
110
+    public Date getModifydate() {
111
+        return modifydate;
112
+    }
113
+
114
+    /**
115
+     * 最后一次编辑时间
116
+     * @param modifydate 最后一次编辑时间
117
+     */
118
+    public void setModifydate(Date modifydate) {
119
+        this.modifydate = modifydate;
120
+    }
121
+
122
+    /**
123
+     * 条目创建人
124
+     * @return builder 条目创建人
125
+     */
126
+    public String getBuilder() {
127
+        return builder;
128
+    }
129
+
130
+    /**
131
+     * 条目创建人
132
+     * @param builder 条目创建人
133
+     */
134
+    public void setBuilder(String builder) {
135
+        this.builder = builder == null ? null : builder.trim();
136
+    }
137
+
138
+    /**
139
+     * 粮库名称
140
+     * @return lkmc 粮库名称
141
+     */
142
+    public String getLkmc() {
143
+        return lkmc;
144
+    }
145
+
146
+    /**
147
+     * 粮库名称
148
+     * @param lkmc 粮库名称
149
+     */
150
+    public void setLkmc(String lkmc) {
151
+        this.lkmc = lkmc == null ? null : lkmc.trim();
152
+    }
153
+
154
+    /**
155
+     * 粮库编码
156
+     * @return lkbm 粮库编码
157
+     */
158
+    public String getLkbm() {
159
+        return lkbm;
160
+    }
161
+
162
+    /**
163
+     * 粮库编码
164
+     * @param lkbm 粮库编码
165
+     */
166
+    public void setLkbm(String lkbm) {
167
+        this.lkbm = lkbm == null ? null : lkbm.trim();
168
+    }
169
+
170
+    /**
171
+     * 货物性质
172
+     * @return hwxz 货物性质
173
+     */
174
+    public String getHwxz() {
175
+        return hwxz;
176
+    }
177
+
178
+    /**
179
+     * 货物性质
180
+     * @param hwxz 货物性质
181
+     */
182
+    public void setHwxz(String hwxz) {
183
+        this.hwxz = hwxz == null ? null : hwxz.trim();
184
+    }
185
+
186
+    /**
187
+     * 仓号ID
188
+     * @return ch 仓号ID
189
+     */
190
+    public String getCh() {
191
+        return ch;
192
+    }
193
+
194
+    /**
195
+     * 仓号ID
196
+     * @param ch 仓号ID
197
+     */
198
+    public void setCh(String ch) {
199
+        this.ch = ch == null ? null : ch.trim();
200
+    }
201
+
202
+    /**
203
+     * 货位号ID
204
+     * @return hwh 货位号ID
205
+     */
206
+    public String getHwh() {
207
+        return hwh;
208
+    }
209
+
210
+    /**
211
+     * 货位号ID
212
+     * @param hwh 货位号ID
213
+     */
214
+    public void setHwh(String hwh) {
215
+        this.hwh = hwh == null ? null : hwh.trim();
216
+    }
217
+
218
+    /**
219
+     * 品种
220
+     * @return pz 品种
221
+     */
222
+    public String getPz() {
223
+        return pz;
224
+    }
225
+
226
+    /**
227
+     * 品种
228
+     * @param pz 品种
229
+     */
230
+    public void setPz(String pz) {
231
+        this.pz = pz == null ? null : pz.trim();
232
+    }
233
+
234
+    /**
235
+     * 明细品种
236
+     * @return mxpz 明细品种
237
+     */
238
+    public String getMxpz() {
239
+        return mxpz;
240
+    }
241
+
242
+    /**
243
+     * 明细品种
244
+     * @param mxpz 明细品种
245
+     */
246
+    public void setMxpz(String mxpz) {
247
+        this.mxpz = mxpz == null ? null : mxpz.trim();
248
+    }
249
+
250
+    /**
251
+     * 等级
252
+     * @return dj 等级
253
+     */
254
+    public String getDj() {
255
+        return dj;
256
+    }
257
+
258
+    /**
259
+     * 等级
260
+     * @param dj 等级
261
+     */
262
+    public void setDj(String dj) {
263
+        this.dj = dj == null ? null : dj.trim();
264
+    }
265
+
266
+    /**
267
+     * 日期
268
+     * @return rq 日期
269
+     */
270
+    public Date getRq() {
271
+        return rq;
272
+    }
273
+
274
+    /**
275
+     * 日期
276
+     * @param rq 日期
277
+     */
278
+    public void setRq(Date rq) {
279
+        this.rq = rq;
280
+    }
281
+
282
+    /**
283
+     * 文件号ID
284
+     * @return wjh 文件号ID
285
+     */
286
+    public String getWjh() {
287
+        return wjh;
288
+    }
289
+
290
+    /**
291
+     * 文件号ID
292
+     * @param wjh 文件号ID
293
+     */
294
+    public void setWjh(String wjh) {
295
+        this.wjh = wjh == null ? null : wjh.trim();
296
+    }
297
+
298
+    /**
299
+     * 库存数量
300
+     * @return kcsl 库存数量
301
+     */
302
+    public Double getKcsl() {
303
+        return kcsl;
304
+    }
305
+
306
+    /**
307
+     * 库存数量
308
+     * @param kcsl 库存数量
309
+     */
310
+    public void setKcsl(Double kcsl) {
311
+        this.kcsl = kcsl;
312
+    }
313
+
314
+    /**
315
+     * 创建时间
316
+     * @return cjsj 创建时间
317
+     */
318
+    public Date getCjsj() {
319
+        return cjsj;
320
+    }
321
+
322
+    /**
323
+     * 创建时间
324
+     * @param cjsj 创建时间
325
+     */
326
+    public void setCjsj(Date cjsj) {
327
+        this.cjsj = cjsj;
328
+    }
329
+    
330
+    private String scnf; //生产年份
331
+
332
+	public String getScnf() {
333
+		return scnf;
334
+	}
335
+
336
+	public void setScnf(String scnf) {
337
+		this.scnf = scnf;
338
+	}
339
+
340
+}

File diff suppressed because it is too large
+ 1399 - 0
src/main/java/com/chinaitop/depot/intelligent/ventilation/model/DataKcglKcswDefaultExample.java


+ 14 - 1
src/main/java/com/chinaitop/depot/intelligent/ventilation/model/TJobApplication.java

@@ -7,7 +7,19 @@ import com.fasterxml.jackson.annotation.JsonFormat;
7 7
 
8 8
 
9 9
 public class TJobApplication {
10
-    /**
10
+	
11
+	//手动增加 通风作业人员
12
+	private String tfzyry;
13
+	
14
+    public String getTfzyry() {
15
+		return tfzyry;
16
+	}
17
+
18
+	public void setTfzyry(String tfzyry) {
19
+		this.tfzyry = tfzyry;
20
+	}
21
+
22
+	/**
11 23
      * This field was generated by MyBatis Generator.
12 24
      * This field corresponds to the database column t_job_application.id
13 25
      *
@@ -152,6 +164,7 @@ public class TJobApplication {
152 164
      *
153 165
      * @mbggenerated Tue Jun 09 10:55:51 CST 2020
154 166
      */
167
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
155 168
     private Date updatetime;
156 169
 
157 170
     /**

+ 11 - 8
src/main/java/com/chinaitop/depot/intelligent/ventilation/model/TVentilation.java

@@ -2,6 +2,8 @@ package com.chinaitop.depot.intelligent.ventilation.model;
2 2
 
3 3
 import java.util.Date;
4 4
 
5
+import com.fasterxml.jackson.annotation.JsonFormat;
6
+
5 7
 public class TVentilation {
6 8
     /**
7 9
      * This field was generated by MyBatis Generator.
@@ -121,6 +123,7 @@ public class TVentilation {
121 123
      *
122 124
      * @mbggenerated Tue Jun 09 10:55:51 CST 2020
123 125
      */
126
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
124 127
     private Date updatetime;
125 128
 
126 129
     /**
@@ -293,11 +296,11 @@ public class TVentilation {
293 296
 
294 297
     /**
295 298
      * This field was generated by MyBatis Generator.
296
-     * This field corresponds to the database column t_ventilation.ssl
299
+     * This field corresponds to the database column t_ventilation.sslssl
297 300
      *
298 301
      * @mbggenerated Tue Jun 09 10:55:51 CST 2020
299 302
      */
300
-    private String ssl;
303
+    private String sslssl;
301 304
 
302 305
     /**
303 306
      * This field was generated by MyBatis Generator.
@@ -1275,20 +1278,20 @@ public class TVentilation {
1275 1278
      *
1276 1279
      * @mbggenerated Tue Jun 09 10:55:51 CST 2020
1277 1280
      */
1278
-    public String getSsl() {
1279
-        return ssl;
1281
+    public String getSslssl() {
1282
+        return sslssl;
1280 1283
     }
1281 1284
 
1282 1285
     /**
1283 1286
      * This method was generated by MyBatis Generator.
1284
-     * This method sets the value of the database column t_ventilation.ssl
1287
+     * This method sets the value of the database column t_ventilation.sslssl
1285 1288
      *
1286
-     * @param ssl the value for t_ventilation.ssl
1289
+     * @param sslssl the value for t_ventilation.sslssl
1287 1290
      *
1288 1291
      * @mbggenerated Tue Jun 09 10:55:51 CST 2020
1289 1292
      */
1290
-    public void setSsl(String ssl) {
1291
-        this.ssl = ssl == null ? null : ssl.trim();
1293
+    public void setSslssl(String sslssl) {
1294
+        this.sslssl = sslssl == null ? null : sslssl.trim();
1292 1295
     }
1293 1296
 
1294 1297
     /**

+ 7 - 1
src/main/java/com/chinaitop/depot/intelligent/ventilation/service/AerationRecordService.java

@@ -8,7 +8,7 @@ import java.util.Date;
8 8
 import java.util.List;
9 9
 
10 10
 public interface AerationRecordService {
11
-    List<TVentilation> getList(String vCfCode, String vDevKindCode);
11
+    List<TVentilation> getList(String vCfCode, String vDevKindCode,String type);
12 12
 
13 13
 	void save(TCtldevinfo tCtldevinfo, String aerationTaskControl, Integer orgId);
14 14
 
@@ -20,4 +20,10 @@ public interface AerationRecordService {
20 20
 	 
21 21
     List<TVentilation> getByCodeAndTimes(List<String> cDcsCodes,List<Date> cTimes);
22 22
 
23
+	void add(String tVentilationJson, Integer orgId);
24
+
25
+	int deleteById(String id);
26
+
27
+	TVentilation getById(String id);
28
+
23 29
 }

+ 19 - 0
src/main/java/com/chinaitop/depot/intelligent/ventilation/service/KcswService.java

@@ -0,0 +1,19 @@
1
+package com.chinaitop.depot.intelligent.ventilation.service;
2
+
3
+import java.util.List;
4
+
5
+import com.chinaitop.depot.intelligent.ventilation.model.DataKcglKcswDefault;
6
+
7
+
8
+public interface KcswService {
9
+	
10
+
11
+	/**
12
+	 * 根据orgId查询库存数量
13
+	 * @param orgId
14
+	 * @return
15
+	 */
16
+	List<DataKcglKcswDefault> queryKcData(Integer orgId, String houseId, String warehouseId);
17
+
18
+
19
+}

+ 39 - 1
src/main/java/com/chinaitop/depot/intelligent/ventilation/service/impl/AerationRecordServiceImpl.java

@@ -36,7 +36,7 @@ public class AerationRecordServiceImpl implements AerationRecordService {
36 36
    
37 37
 
38 38
     @Override
39
-    public List<TVentilation> getList(String vCfCode, String vDevKindCode) {
39
+    public List<TVentilation> getList(String vCfCode, String vDevKindCode,String type) {
40 40
     	TVentilationExample tVentilationExample = new TVentilationExample();
41 41
     	tVentilationExample.setDistinct(true);
42 42
     	TVentilationExample.Criteria criteria = tVentilationExample.createCriteria();
@@ -46,6 +46,9 @@ public class AerationRecordServiceImpl implements AerationRecordService {
46 46
         if (StringUtils.isNotEmpty(vDevKindCode)) {
47 47
         	criteria.andVDeviceCodeEqualTo(vDevKindCode);
48 48
         }
49
+        if(type!=null && type.equals("0")){
50
+        	criteria.andVDevNameEqualTo("0");//手动增加的记录
51
+        }
49 52
         tVentilationExample.setOrderByClause("v_update_time desc");
50 53
         return tVentilationMapper.selectByExample(tVentilationExample);
51 54
     }
@@ -238,4 +241,39 @@ public class AerationRecordServiceImpl implements AerationRecordService {
238 241
 
239 242
 
240 243
 
244
+	@Override
245
+	public void add(String tVentilationJson, Integer orgId) {
246
+		// TODO Auto-generated method stub
247
+		if (StringUtils.isNotBlank(tVentilationJson)) {
248
+			TVentilation tVentilation = (TVentilation) JsonToObjectUtils.jsonToObject(tVentilationJson, "com.chinaitop.depot.intelligent.ventilation.model.TVentilation");
249
+			
250
+			if (StringUtils.isNotBlank(tVentilation.getId())) {
251
+				tVentilationMapper.updateByPrimaryKey(tVentilation);
252
+            } else {
253
+            	tVentilation.setId(UuidUtils.getCode());
254
+            	tVentilation.setvDevName("0");//只是记录 作业前后的温湿度  不是设备通风的记录
255
+            	tVentilationMapper.insert(tVentilation);
256
+            }
257
+        }
258
+	}
259
+
260
+
261
+
262
+	@Override
263
+	public int deleteById(String id) {
264
+		// TODO Auto-generated method stub
265
+		int i = tVentilationMapper.deleteByPrimaryKey(id);
266
+		return i;
267
+	}
268
+
269
+
270
+
271
+	@Override
272
+	public TVentilation getById(String id) {
273
+		// TODO Auto-generated method stub
274
+		return tVentilationMapper.selectByPrimaryKey(id);
275
+	}
276
+
277
+
278
+
241 279
 }

+ 10 - 6
src/main/java/com/chinaitop/depot/intelligent/ventilation/service/impl/AerationTaskServiceImpl.java

@@ -40,13 +40,17 @@ public class AerationTaskServiceImpl implements AerationTaskService {
40 40
         if(tJobApplication.getvCfCode()!=null){
41 41
         	criteria.andVCfCodeEqualTo(tJobApplication.getvCfCode());
42 42
         }
43
-        if(userId!=null){
44
-        	criteria.andAidEqualTo(String.valueOf(userId));
45
-        }
46
-        if(approvalState==4){//审批结束:4
47
-        	criteria.andStateEqualTo(4);
43
+        if(tJobApplication.getAreationPlanNumber()!=null){ //通风记录新增时 ,只通过计划编号获取仓房编号,不做其他操作
44
+        	criteria.andAreationPlanNumberEqualTo(tJobApplication.getAreationPlanNumber());
48 45
         }else{
49
-        	criteria.andStateNotEqualTo(4);
46
+        	if(userId!=null){
47
+        		criteria.andAidEqualTo(String.valueOf(userId));
48
+        	}
49
+        	if(null != approvalState && approvalState==4){//审批结束:4
50
+        		criteria.andStateEqualTo(4);
51
+        	}else{
52
+        		criteria.andStateNotEqualTo(4);
53
+        	}
50 54
         }
51 55
         tJobApplicationExample.setOrderByClause("apply_time desc");
52 56
         return tJobApplicationMapper.selectByExample(tJobApplicationExample);

+ 53 - 0
src/main/java/com/chinaitop/depot/intelligent/ventilation/service/impl/KcswServiceImpl.java

@@ -0,0 +1,53 @@
1
+package com.chinaitop.depot.intelligent.ventilation.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.intelligent.ventilation.mapper.DataKcglKcswDefaultMapper;
10
+import com.chinaitop.depot.intelligent.ventilation.model.DataKcglKcswDefault;
11
+import com.chinaitop.depot.intelligent.ventilation.model.DataKcglKcswDefaultExample;
12
+import com.chinaitop.depot.intelligent.ventilation.model.DataKcglKcswDefaultExample.Criteria;
13
+import com.chinaitop.depot.intelligent.ventilation.service.KcswService;
14
+
15
+@Service
16
+public class KcswServiceImpl implements KcswService{
17
+
18
+	@Resource
19
+	private DataKcglKcswDefaultMapper dataKcglKcswDefaultMapper;
20
+
21
+	
22
+	/**
23
+	 * 根据orgId查询库存数量
24
+	 */
25
+	@Override
26
+	public List<DataKcglKcswDefault> queryKcData(Integer orgId, String houseId, String warehouseId) {
27
+		// TODO Auto-generated method stub
28
+		DataKcglKcswDefaultExample example = new DataKcglKcswDefaultExample();
29
+        Criteria createCriteria = example.createCriteria();
30
+        if(warehouseId!=null && warehouseId.equals("0")){//油料(仓房号和货位号是一样的)(品种是油的,7031,7036)
31
+        	if(orgId!=null){
32
+        		createCriteria.andUnitidEqualTo(String.valueOf(orgId));
33
+        	}
34
+        	if(houseId!=null){
35
+        		createCriteria.andChEqualTo(houseId);
36
+        	}
37
+        	createCriteria.andPzBetween("7031", "7036");
38
+        }else{//粮食的
39
+        	if(orgId!=null){
40
+        		createCriteria.andUnitidEqualTo(String.valueOf(orgId));
41
+        	}
42
+        	if(houseId!=null){
43
+        		createCriteria.andChEqualTo(houseId);
44
+        	}
45
+        	if(warehouseId!=null){
46
+        		createCriteria.andHwhEqualTo(warehouseId);
47
+        	}
48
+        }
49
+		return dataKcglKcswDefaultMapper.selectByExample(example);
50
+	}
51
+
52
+	
53
+}