Selaa lähdekoodia

熏蒸位置更改

lvzhikai 5 vuotta sitten
vanhempi
commit
2cdbc4db62
43 muutettua tiedostoa jossa 27378 lisäystä ja 9 poistoa
  1. 11 0
      pom.xml
  2. 250 0
      src/main/java/com/chinaitop/depot/fumigation/controller/FumigationAlterController.java
  3. 393 0
      src/main/java/com/chinaitop/depot/fumigation/controller/FumigationForRecordController.java
  4. 350 0
      src/main/java/com/chinaitop/depot/fumigation/controller/FumigationPlanController.java
  5. 209 0
      src/main/java/com/chinaitop/depot/fumigation/controller/FumigationProcessController.java
  6. 251 0
      src/main/java/com/chinaitop/depot/fumigation/controller/PesticidePlanController.java
  7. 37 0
      src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationAfterMapper.java
  8. 622 0
      src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationAfterMapper.xml
  9. 45 0
      src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationForrecordMapper.java
  10. 737 0
      src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationForrecordMapper.xml
  11. 30 0
      src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationPersonnelMapper.java
  12. 308 0
      src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationPersonnelMapper.xml
  13. 36 0
      src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationPesticideMapper.java
  14. 745 0
      src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationPesticideMapper.xml
  15. 43 0
      src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationPlanMapper.java
  16. 1162 0
      src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationPlanMapper.xml
  17. 36 0
      src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationProcessMapper.java
  18. 1300 0
      src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationProcessMapper.xml
  19. 491 0
      src/main/java/com/chinaitop/depot/fumigation/model/TFumigationAfter.java
  20. 2029 0
      src/main/java/com/chinaitop/depot/fumigation/model/TFumigationAfterExample.java
  21. 383 0
      src/main/java/com/chinaitop/depot/fumigation/model/TFumigationForrecord.java
  22. 1619 0
      src/main/java/com/chinaitop/depot/fumigation/model/TFumigationForrecordExample.java
  23. 203 0
      src/main/java/com/chinaitop/depot/fumigation/model/TFumigationPersonnel.java
  24. 959 0
      src/main/java/com/chinaitop/depot/fumigation/model/TFumigationPersonnelExample.java
  25. 635 0
      src/main/java/com/chinaitop/depot/fumigation/model/TFumigationPesticide.java
  26. 2539 0
      src/main/java/com/chinaitop/depot/fumigation/model/TFumigationPesticideExample.java
  27. 1013 0
      src/main/java/com/chinaitop/depot/fumigation/model/TFumigationPlan.java
  28. 3939 0
      src/main/java/com/chinaitop/depot/fumigation/model/TFumigationPlanExample.java
  29. 1247 0
      src/main/java/com/chinaitop/depot/fumigation/model/TFumigationProcess.java
  30. 4789 0
      src/main/java/com/chinaitop/depot/fumigation/model/TFumigationProcessExample.java
  31. 36 0
      src/main/java/com/chinaitop/depot/fumigation/service/FumigationAfterService.java
  32. 31 0
      src/main/java/com/chinaitop/depot/fumigation/service/FumigationForRecordService.java
  33. 64 0
      src/main/java/com/chinaitop/depot/fumigation/service/FumigationPlanService.java
  34. 28 0
      src/main/java/com/chinaitop/depot/fumigation/service/FumigationProcessService.java
  35. 37 0
      src/main/java/com/chinaitop/depot/fumigation/service/PesticidePlanService.java
  36. 66 0
      src/main/java/com/chinaitop/depot/fumigation/service/impl/FumigationAfterServiceImpl.java
  37. 144 0
      src/main/java/com/chinaitop/depot/fumigation/service/impl/FumigationForRecordServiceImpl.java
  38. 146 0
      src/main/java/com/chinaitop/depot/fumigation/service/impl/FumigationPlanServiceImpl.java
  39. 53 0
      src/main/java/com/chinaitop/depot/fumigation/service/impl/FumigationProcessServiceImpl.java
  40. 77 0
      src/main/java/com/chinaitop/depot/fumigation/service/impl/PesiticidePlanServiceImpl.java
  41. 245 0
      src/main/java/com/chinaitop/depot/utils/HttpUtil.java
  42. 33 4
      src/main/java/com/chinaitop/depot/utils/ParameterUtil.java
  43. 7 5
      src/main/resources/bootstrap.yml

+ 11 - 0
pom.xml

@@ -100,12 +100,23 @@
100 100
             <artifactId>commons-lang3</artifactId>
101 101
             <version>3.7</version>
102 102
         </dependency>
103
+        <dependency>
104
+            <groupId>org.apache.httpcomponents</groupId>
105
+            <artifactId>httpclient</artifactId>
106
+            <version>4.5.6</version>
107
+        </dependency>
103 108
         <!-- 阿里巴巴json -->
104 109
         <dependency>
105 110
             <groupId>com.alibaba</groupId>
106 111
             <artifactId>fastjson</artifactId>
107 112
             <version>1.2.37</version>
108 113
         </dependency>
114
+        <dependency>
115
+            <groupId>net.sf.json-lib</groupId>
116
+            <artifactId>json-lib</artifactId>
117
+            <version>2.4</version>
118
+            <classifier>jdk15</classifier>
119
+        </dependency>
109 120
         <!--poi-->
110 121
         <dependency>
111 122
             <groupId>org.apache.poi</groupId>

+ 250 - 0
src/main/java/com/chinaitop/depot/fumigation/controller/FumigationAlterController.java

@@ -0,0 +1,250 @@
1
+package com.chinaitop.depot.fumigation.controller;
2
+
3
+import com.alibaba.fastjson.JSON;
4
+import com.chinaitop.depot.fumigation.model.*;
5
+import com.chinaitop.depot.fumigation.service.FumigationAfterService;
6
+import com.chinaitop.depot.fumigation.service.FumigationPlanService;
7
+import com.chinaitop.depot.fumigation.service.FumigationProcessService;
8
+import com.chinaitop.depot.fumigation.service.PesticidePlanService;
9
+import com.chinaitop.depot.utils.HttpUtil;
10
+import com.chinaitop.depot.utils.JsonToObjectUtils;
11
+import com.chinaitop.depot.utils.ParameterUtil;
12
+import com.fasterxml.jackson.databind.ObjectMapper;
13
+import com.github.pagehelper.PageHelper;
14
+import com.github.pagehelper.PageInfo;
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
+import org.springframework.beans.factory.annotation.Value;
20
+import org.springframework.http.MediaType;
21
+import org.springframework.web.bind.annotation.RequestMapping;
22
+import org.springframework.web.bind.annotation.RequestMethod;
23
+import org.springframework.web.bind.annotation.RestController;
24
+
25
+import javax.annotation.Resource;
26
+import java.util.Date;
27
+import java.util.HashMap;
28
+import java.util.List;
29
+import java.util.Map;
30
+
31
+/**
32
+ * @author lvzhikai
33
+ * @description: 熏蒸作业善后
34
+ * @create 2019-1-21 10:57
35
+ */
36
+@RestController
37
+@RequestMapping(value = "/storage/fumigationAfter")
38
+@Api(value = "FumigationAfterController", description = "熏蒸作业善后类")
39
+@SuppressWarnings("all")
40
+public class FumigationAlterController {
41
+
42
+    @Resource
43
+    FumigationAfterService fumigationAfterService;
44
+
45
+    @Resource
46
+    private FumigationPlanService fumigationPlanService;
47
+
48
+    @Resource
49
+    private FumigationProcessService fumigationProcessService;
50
+
51
+    @Resource
52
+    private PesticidePlanService pesticidePlanService;
53
+
54
+    // 获取ip地址
55
+    @Value("${reportUrl}")
56
+    private String reportPath;
57
+
58
+    /**
59
+     * 列表
60
+     * @param pageNum
61
+     * @param pageSize
62
+     * @param houseId
63
+     * @param orgId
64
+     * @return
65
+     */
66
+    @RequestMapping(value = "/getFumigationAfterList", method = RequestMethod.GET)
67
+    @ApiOperation(value = "熏蒸作业善后列表", notes = "熏蒸作业善后列表,支持分页")
68
+    @ApiImplicitParams({
69
+            @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
70
+            @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
71
+            @ApiImplicitParam(name = "houseId", value = "仓房Id", paramType = "query"),
72
+            @ApiImplicitParam(name = "orgId", value = "组织机构编号", paramType = "query")
73
+    })
74
+    public PageInfo<Map<String,Object>> getFumigationAfterList(Integer pageNum, Integer pageSize, Integer houseId, Integer orgId) {
75
+        Map<String,Object> map = new HashMap<>();
76
+        List<Map<String,Object>> list = null;
77
+
78
+        if (ParameterUtil.isnotnull(orgId))//粮库查询
79
+            map.put("orgId",orgId);
80
+
81
+        if (ParameterUtil.isnotnull(houseId))//粮库查询
82
+            map.put("houseId",houseId);
83
+
84
+        if (pageNum!=null && pageSize!=null) {
85
+            PageHelper.startPage(pageNum, pageSize);
86
+        }
87
+
88
+        list = fumigationAfterService.getFumigationAfterList(map);
89
+        PageInfo<Map<String,Object>> pageInfo = new PageInfo<Map<String,Object>>(list);
90
+        return pageInfo;
91
+    }
92
+
93
+    /**
94
+     * 保存熏蒸善后信息
95
+     * @param fumigation
96
+     * @return
97
+     */
98
+    @RequestMapping(value="/saveFumigationAfterDate", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
99
+    @ApiOperation(value="保存熏蒸善后信息", notes = "保存熏蒸善后信息")
100
+    @ApiImplicitParams({
101
+            @ApiImplicitParam(name = "fumigationAfter", value = "熏蒸善后数据", paramType = "form")
102
+    })
103
+    public Map<String, Object> saveFumigationAfterDate(String fumigationAfter) throws Exception {
104
+        Map<String, Object> modelMap = new HashMap<String, Object>();
105
+        // JSON字符串转对象
106
+        ObjectMapper mapper = new ObjectMapper();
107
+        TFumigationAfter tFumigationAfter = (TFumigationAfter) JsonToObjectUtils.jsonToObject(fumigationAfter,"com.chinaitop.depot.fumigation.model.TFumigationAfter");
108
+        tFumigationAfter.setDeleteState("1");//默认设置删除标志
109
+        if (tFumigationAfter.getId() == null) {
110
+            tFumigationAfter.setCreateTime(new Date());//创建时间
111
+            tFumigationAfter.setId(ParameterUtil.getCode());
112
+            fumigationAfterService.add(tFumigationAfter);
113
+
114
+            //修改熏蒸状态
115
+            TFumigationPlanExample example = new TFumigationPlanExample();
116
+            TFumigationPlanExample.Criteria criteria = example.createCriteria();
117
+            criteria.andIdEqualTo(tFumigationAfter.getFumigationId());
118
+
119
+            TFumigationPlan tFumigationPlan = new TFumigationPlan();
120
+            tFumigationPlan.setState(10);
121
+            fumigationPlanService.updateByExample(tFumigationPlan, example);
122
+
123
+            //向市级提交数据--熏蒸计划
124
+            TFumigationPlan planData = fumigationPlanService.findById(tFumigationAfter.getFumigationId());
125
+            Map<String, Object> planMap = ParameterUtil.convertBean(planData);
126
+            //熏蒸善后
127
+            List<TFumigationAfter> afterData = fumigationAfterService.findByFumigationId(tFumigationAfter.getFumigationId());
128
+            Map<String, Object> afterMap = ParameterUtil.convertBean(afterData.get(0));
129
+            planMap.put("fumigationAfter",afterMap);
130
+            //熏蒸施药
131
+            TFumigationPesticideExample pesticideexample = new TFumigationPesticideExample();
132
+            TFumigationPesticideExample.Criteria pesticidecriteria = pesticideexample.createCriteria();
133
+            pesticidecriteria.andFumigationIdEqualTo(tFumigationAfter.getFumigationId());
134
+            List<TFumigationPesticide> pesticideData = pesticidePlanService.getFumigationPesticideList(pesticideexample);
135
+            Map<String, Object> pesticideMap = ParameterUtil.convertBean(pesticideData.get(0));
136
+            planMap.put("fumigationPesticide",pesticideMap);
137
+            //熏蒸过程
138
+            TFumigationProcessExample processExample = new TFumigationProcessExample();
139
+            TFumigationProcessExample.Criteria processcriteria = processExample.createCriteria();
140
+            processcriteria.andFumigationIdEqualTo(tFumigationAfter.getFumigationId());
141
+            List<TFumigationProcess> processData = fumigationProcessService.getDataByFumId(processExample);
142
+            Map<String, Object> processMap = ParameterUtil.convertBean(pesticideData.get(0));
143
+            planMap.put("fumigationProcess",processMap);
144
+
145
+            String url = reportPath+"/api/cbl-app/cbl/fumigation/insertFumigationPlan";//市级接口
146
+//        dataMap.put("tyshxydm","91120118712878209L");
147
+            String strResult = HttpUtil.doPost(url, JSON.toJSONString(planMap));
148
+            modelMap.put("status", "success");
149
+        } else {
150
+            tFumigationAfter.setUpdateTime(new Date());//修改时间
151
+            fumigationAfterService.update(tFumigationAfter);
152
+        }
153
+        modelMap.put("status", "success");
154
+        return modelMap;
155
+    }
156
+
157
+    /**
158
+     * 根据id查询熏蒸过程
159
+     * @param id 主键id
160
+     * @return
161
+     */
162
+    @RequestMapping(value="/getAfterDeatil", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
163
+    @ApiOperation(value="根据id查询熏蒸过程数据", notes = "根据id查询熏蒸过程数据")
164
+    @ApiImplicitParams({
165
+            @ApiImplicitParam(name = "afterId", value = "主键id", paramType = "query")
166
+    })
167
+    public Map<String, Object> getAfterDeatil(String afterId) {
168
+        Map<String, Object> modelMap = new HashMap<String, Object>();
169
+
170
+        if (afterId != null) {
171
+            TFumigationAfter tFumigationAfter = fumigationAfterService.findById(afterId);
172
+            modelMap.put("afterEdit",tFumigationAfter);//熏蒸善后数据
173
+
174
+            TFumigationProcessExample example = new TFumigationProcessExample();
175
+            TFumigationProcessExample.Criteria criteria = example.createCriteria();
176
+            criteria.andFumigationIdEqualTo(tFumigationAfter.getFumigationId());
177
+            List<TFumigationProcess> tFumigationProcess = fumigationProcessService.getDataByFumId(example);
178
+            modelMap.put("processEdit",tFumigationProcess.get(0));//熏蒸作业过程数据
179
+
180
+            TFumigationPlan tFumigationPlan = fumigationPlanService.findById(tFumigationAfter.getFumigationId());
181
+            modelMap.put("fumigationEdit",tFumigationPlan);//熏蒸方案数据
182
+        }
183
+
184
+        return modelMap;
185
+    }
186
+
187
+    /**
188
+     * 删除熏蒸善后信息
189
+     * @param fumigationId 主键id
190
+     * @return
191
+     * @throws Exception
192
+     */
193
+    @RequestMapping(value="/removeAfterPlan", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
194
+    @ApiOperation(value="删除熏蒸善后信息", notes = "删除熏蒸善后信息")
195
+    @ApiImplicitParams({
196
+            @ApiImplicitParam(name = "afterId", value = "主键id", paramType = "form"),
197
+            @ApiImplicitParam(name = "fumigationId", value = "熏蒸计划表ID", paramType = "form")
198
+    })
199
+    public Map<String, Object> removeAfterPlan(String afterId,String fumigationId) throws Exception {
200
+        Map<String, Object> modelMap = new HashMap<>();
201
+        if (afterId != null) {
202
+            TFumigationAfterExample example = new TFumigationAfterExample();
203
+            TFumigationAfterExample.Criteria criteria = example.createCriteria();
204
+            criteria.andIdEqualTo(afterId);
205
+
206
+            TFumigationAfter tFumigationAfter = new TFumigationAfter();
207
+            tFumigationAfter.setDeleteState("0");
208
+            fumigationAfterService.updateByExample(tFumigationAfter, example);
209
+
210
+            //修改熏蒸状态
211
+            TFumigationPlanExample fumExample = new TFumigationPlanExample();
212
+            TFumigationPlanExample.Criteria fumCriteria = fumExample.createCriteria();
213
+            fumCriteria.andIdEqualTo(fumigationId);
214
+
215
+            TFumigationPlan tFumigationPlan = new TFumigationPlan();
216
+            tFumigationPlan.setState(10);
217
+            fumigationPlanService.updateByExample(tFumigationPlan, fumExample);
218
+            modelMap.put("status", "success");
219
+        }
220
+        return modelMap;
221
+    }
222
+
223
+    /**
224
+     * 查询作业列表数据
225
+     * @param id 主键id
226
+     * @return
227
+     */
228
+    @RequestMapping(value="/getHomeWorkQueryList", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
229
+    @ApiOperation(value="查询作业列表数据", notes = "查询作业列表数据")
230
+    @ApiImplicitParams({
231
+            @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
232
+            @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
233
+            @ApiImplicitParam(name = "houseId", value = "仓房Id", paramType = "query"),
234
+            @ApiImplicitParam(name = "orgId", value = "组织机构编号", paramType = "query")
235
+    })
236
+    public PageInfo<Map<String,Object>> getHomeWorkQueryList(Integer pageNum, Integer pageSize, Integer houseId, String orgId) {
237
+        Map<String,Object> map = new HashMap<>();
238
+        List<Map<String,Object>> list = null;
239
+        map.put("houseId",houseId);
240
+        map.put("orgId",orgId);
241
+
242
+        if (pageNum!=null && pageSize!=null) {
243
+            PageHelper.startPage(pageNum, pageSize);
244
+        }
245
+
246
+        list = fumigationAfterService.selectHomeWorkQueryList(map);
247
+        PageInfo<Map<String,Object>> pageInfo = new PageInfo<Map<String,Object>>(list);
248
+        return pageInfo;
249
+    }
250
+}

+ 393 - 0
src/main/java/com/chinaitop/depot/fumigation/controller/FumigationForRecordController.java

@@ -0,0 +1,393 @@
1
+package com.chinaitop.depot.fumigation.controller;
2
+
3
+import com.alibaba.fastjson.JSON;
4
+import com.alibaba.fastjson.JSONObject;
5
+import com.chinaitop.depot.fumigation.model.*;
6
+import com.chinaitop.depot.fumigation.service.FumigationForRecordService;
7
+import com.chinaitop.depot.fumigation.service.FumigationPlanService;
8
+import com.chinaitop.depot.fumigation.service.PesticidePlanService;
9
+import com.chinaitop.depot.utils.HttpUtil;
10
+import com.chinaitop.depot.utils.JsonToObjectUtils;
11
+import com.chinaitop.depot.utils.ParameterUtil;
12
+import com.fasterxml.jackson.databind.ObjectMapper;
13
+import com.github.pagehelper.PageHelper;
14
+import com.github.pagehelper.PageInfo;
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
+import org.springframework.beans.factory.annotation.Value;
20
+import org.springframework.http.MediaType;
21
+import org.springframework.web.bind.annotation.RequestMapping;
22
+import org.springframework.web.bind.annotation.RequestMethod;
23
+import org.springframework.web.bind.annotation.RestController;
24
+
25
+import javax.annotation.Resource;
26
+import java.util.*;
27
+
28
+/**
29
+ * @author lvzhikai
30
+ * @description: 熏蒸作业记录
31
+ * @create 2019-1-14 10:57
32
+ */
33
+@RestController
34
+@RequestMapping(value = "/storage/fumigationFroRecord")
35
+@Api(value = "FumigationFroRecordController", description = "熏蒸备注类")
36
+@SuppressWarnings("all")
37
+public class FumigationForRecordController {
38
+
39
+    @Resource
40
+    private FumigationForRecordService fumigationFroRecordService;
41
+
42
+    @Resource
43
+    private FumigationPlanService fumigationPlanService;
44
+
45
+    @Resource
46
+    private PesticidePlanService pesticidePlanService;
47
+
48
+    // 获取ip地址
49
+    @Value("${reportUrl}")
50
+    private String reportPath;
51
+    /**
52
+     * 列表
53
+     * @param pageNum
54
+     * @param pageSize
55
+     * @param houseId
56
+     * @param orgId
57
+     * @return
58
+     */
59
+    @RequestMapping(value = "/getFumigationForRecordList", method = RequestMethod.GET)
60
+    @ApiOperation(value = "熏蒸备案列表", notes = "熏蒸备案列表,支持分页")
61
+    @ApiImplicitParams({
62
+            @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
63
+            @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
64
+            @ApiImplicitParam(name = "searchStartDate", value = "申请开始时间", paramType = "query"),
65
+            @ApiImplicitParam(name = "searchEndDate", value = "申请结束时间", paramType = "query"),
66
+            @ApiImplicitParam(name = "orgId", value = "组织机构编号", paramType = "query")
67
+    })
68
+    public PageInfo<Map<String,Object>> getFumigationForRecordList(Integer pageNum, Integer pageSize, String searchStartDate, String searchEndDate, Integer houseId, Integer orgId) throws Exception {
69
+        Map<String,Object> map = new HashMap<>();
70
+        List<Map<String,Object>> list = null;
71
+
72
+        if (ParameterUtil.isnotnull(orgId))//粮库查询
73
+            map.put("orgId",orgId);
74
+
75
+        if (ParameterUtil.isnotnull(searchStartDate))
76
+            map.put("searchStartDate",searchStartDate);
77
+
78
+        if (ParameterUtil.isnotnull(searchEndDate))
79
+            map.put("searchEndDate",searchEndDate);
80
+
81
+        if (pageNum!=null && pageSize!=null) {
82
+            PageHelper.startPage(pageNum, pageSize);
83
+        }
84
+
85
+        list = fumigationFroRecordService.getFumigationFroRecordList(map);
86
+        PageInfo<Map<String,Object>> pageInfo = new PageInfo<Map<String,Object>>(list);
87
+        return pageInfo;
88
+    }
89
+
90
+    /**
91
+     * 根据id查询熏蒸备案
92
+     * @param id 主键id
93
+     * @return
94
+     */
95
+    @RequestMapping(value="/getFroRecordDeatil", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
96
+    @ApiOperation(value="根据熏蒸id集合查询熏蒸备案数据", notes = "根据熏蒸id集合查询熏蒸备案数据")
97
+    @ApiImplicitParams({
98
+            @ApiImplicitParam(name = "planIds", value = "主键id", paramType = "query")
99
+    })
100
+    public Map<String, Object> getFroRecordDeatil(String planIds) {
101
+        Map<String, Object> modelMap = new HashMap<String, Object>();
102
+
103
+        if (planIds != null) {
104
+            String storehouseNames = "";
105
+            Map<String, Object> map = new HashMap<String, Object>();
106
+            map.put("planIds",planIds.split(","));
107
+            List<Map<String, Object>> forRecordList = fumigationFroRecordService.getFumigationDateByIds(map);
108
+            for (Map<String, Object> forRecord:forRecordList) {
109
+                storehouseNames += forRecord.get("storehousename") + ",";
110
+            }
111
+            modelMap.put("fumigationEdit",forRecordList);//熏蒸数据
112
+            modelMap.put("storehouseNames",storehouseNames.substring(0,storehouseNames.length()-1));//仓房名称集合--熏蒸作业地点
113
+        }
114
+
115
+        return modelMap;
116
+    }
117
+
118
+    /**
119
+     * 根据id查询熏蒸备案
120
+     * @param id 主键id
121
+     * @return
122
+     */
123
+    @RequestMapping(value="/getFroRecordById", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
124
+    @ApiOperation(value="根据熏蒸备案id查询熏蒸备案数据", notes = "根据熏蒸备案id查询熏蒸备案数据")
125
+    @ApiImplicitParams({
126
+            @ApiImplicitParam(name = "forRecordId", value = "主键id", paramType = "query")
127
+    })
128
+    public Map<String, Object> getFroRecordById(String forRecordId) {
129
+        Map<String, Object> modelMap = new HashMap<String, Object>();
130
+
131
+        if (forRecordId != null) {
132
+            String planIds="";
133
+            //获取备案数据
134
+            List<Map<String, Object>> forRecordData = fumigationFroRecordService.getFroRecordById(forRecordId);
135
+            for (Map<String, Object> maps:forRecordData) {
136
+                planIds+=maps.get("planids")+",";
137
+            }
138
+            planIds = planIds.substring(0,planIds.length()-1);
139
+            forRecordData.get(0).put("planIds",planIds);
140
+            modelMap.put("forRecordData",forRecordData);//熏蒸备案数据
141
+
142
+            //下边获取熏蒸数据
143
+            String storehouseNames = "";
144
+            Map<String, Object> map = new HashMap<String, Object>();
145
+            map.put("planIds",planIds.split(","));
146
+            List<Map<String, Object>> forRecordList = fumigationFroRecordService.getFumigationDateByIds(map);
147
+            for (Map<String, Object> forRecord:forRecordList) {
148
+                storehouseNames += forRecord.get("storehousename") + ",";
149
+            }
150
+            modelMap.put("fumigationEdit",forRecordList);//熏蒸数据
151
+
152
+            TFumigationPersonnelExample tFumigationPersonnelExample = new TFumigationPersonnelExample();
153
+            TFumigationPersonnelExample.Criteria criteria = tFumigationPersonnelExample.createCriteria();
154
+            criteria.andForrecordIdEqualTo(forRecordId);
155
+            List<TFumigationPersonnel> personnelList= fumigationFroRecordService.getPersonnelData(tFumigationPersonnelExample);
156
+            modelMap.put("personnelList",personnelList);//熏蒸数据
157
+            modelMap.put("storehouseNames",storehouseNames.substring(0,storehouseNames.length()-1));//仓房名称集合--熏蒸作业地点
158
+        }
159
+
160
+        return modelMap;
161
+    }
162
+
163
+    /**
164
+     * 保存熏蒸备案信息
165
+     * @param fumigation
166
+     * @return
167
+     */
168
+    @RequestMapping(value="/saveFumigationForRecordDate", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
169
+    @ApiOperation(value="保存熏蒸备案信息", notes = "保存熏蒸备案信息")
170
+    @ApiImplicitParams({
171
+            @ApiImplicitParam(name = "forRecord", value = "备案备案数据", paramType = "form"),
172
+            @ApiImplicitParam(name = "addedDetail", value = "备案熏蒸人数集合", paramType = "form"),
173
+            @ApiImplicitParam(name = "fumigation", value = "熏蒸数据集合", paramType = "form"),
174
+            @ApiImplicitParam(name = "stateType", value = "保存状态,是提交还是保存", paramType = "form")
175
+
176
+    })
177
+    public Map<String, Object> saveFumigationForRecordDate(String forRecord, String addedDetail,String fumigation,String stateType) throws Exception {
178
+        if(ParameterUtil.isequal(stateType,"getSubmit")){
179
+            stateType = "7";
180
+        }else{
181
+            stateType = "6";
182
+        }
183
+
184
+        Map<String, Object> modelMap = new HashMap<String, Object>();
185
+        // JSON字符串转对象
186
+        String uuid = ParameterUtil.getCode();
187
+        TFumigationForrecord tFumigationForrecord = (TFumigationForrecord) JsonToObjectUtils.jsonToObject(forRecord,"com.chinaitop.depot.fumigation.model.TFumigationForrecord");
188
+        if (tFumigationForrecord.getId() == null) {
189
+            //新增熏蒸备案数据
190
+            tFumigationForrecord.setDeleteState("1");//默认设置删除标志
191
+            tFumigationForrecord.setCreateTime(new Date());//创建时间
192
+            tFumigationForrecord.setId(uuid);
193
+            fumigationFroRecordService.add(tFumigationForrecord);
194
+        } else {
195
+            uuid = tFumigationForrecord.getId();
196
+            tFumigationForrecord.setUpdatetime(new Date());//修改时间
197
+            fumigationFroRecordService.update(tFumigationForrecord);
198
+        }
199
+
200
+        //熏蒸人员字段
201
+        String[] personnelDates = addedDetail.split("},");
202
+        for (String personnel:personnelDates) {
203
+            TFumigationPersonnel tFumigationPersonnel = (TFumigationPersonnel) JsonToObjectUtils.jsonToObject(personnel + "}", "com.chinaitop.depot.fumigation.model.TFumigationPersonnel");
204
+            if (tFumigationPersonnel.getId() == null) {
205
+                tFumigationPersonnel.setDeleteState("1");//默认设置删除标志
206
+                tFumigationPersonnel.setCreateTime(new Date());//创建时间
207
+                tFumigationPersonnel.setId(ParameterUtil.getCode());
208
+                tFumigationPersonnel.setForrecordId(uuid);
209
+                tFumigationPersonnel.setOrgId(tFumigationForrecord.getOrgId());
210
+                fumigationFroRecordService.addPersonnel(tFumigationPersonnel);
211
+            } else {
212
+                tFumigationPersonnel.setUpdatetime(new Date());//修改时间
213
+                fumigationFroRecordService.updatePersonnel(tFumigationPersonnel);
214
+            }
215
+        }
216
+
217
+        //熏蒸信息字段
218
+        String[] fumigationDates = fumigation.split("},");
219
+        Integer c=1;
220
+        for (String fumigations:fumigationDates) {
221
+            JSONObject fumMap = null;
222
+            if(c != fumigationDates.length){
223
+                fumMap = JSON.parseObject(fumigations+"}");
224
+            }else{
225
+                fumMap = JSON.parseObject(fumigations);
226
+            }
227
+            c++;
228
+            //修改熏蒸状态
229
+            TFumigationPlanExample example = new TFumigationPlanExample();
230
+            TFumigationPlanExample.Criteria criteria = example.createCriteria();
231
+            criteria.andIdEqualTo(fumMap.get("planid").toString());
232
+
233
+            TFumigationPlan tFumigationPlan = new TFumigationPlan();
234
+            tFumigationPlan.setState(Integer.parseInt(stateType));
235
+            tFumigationPlan.setGrainMoisture(fumMap.get("grainMoisture").toString());
236
+            tFumigationPlan.setForRecordId(uuid);
237
+            fumigationPlanService.updateByExample(tFumigationPlan, example);
238
+
239
+            //修改熏蒸施药状态
240
+            TFumigationPesticideExample pesticideExample = new TFumigationPesticideExample();
241
+            TFumigationPesticideExample.Criteria pesticideCriteria = pesticideExample.createCriteria();
242
+            pesticideCriteria.andIdEqualTo(fumMap.get("pesticideid").toString());
243
+
244
+            TFumigationPesticide tFumigationPesticide = new TFumigationPesticide();
245
+            tFumigationPesticide.setReagentType("3024");
246
+            tFumigationPesticide.setValidity(fumMap.get("validity").toString());
247
+            tFumigationPesticide.setGetNumber(fumMap.get("getNumber").toString());
248
+            tFumigationPesticide.setGetPerson(fumMap.get("getPerson").toString());
249
+            tFumigationPesticide.setGetTime(ParameterUtil.string2datetime(fumMap.get("getTime").toString()));
250
+            pesticidePlanService.updateByExample(tFumigationPesticide, pesticideExample);
251
+        }
252
+
253
+        if(ParameterUtil.isequal(stateType,"getSubmit")){
254
+            //如果是提交的话则除了保存还要把数据提交到市级来进行审批
255
+            Map<String, Object> dataMap = fumigationFroRecordService.getFroRecordByIds(uuid);
256
+            Map<String, Object> sjMap = new HashMap<String, Object>();
257
+            String url = reportPath+"/fumigation/insertFumigation";//市级接口
258
+            sjMap.put("TFumigationForrecord",JSON.toJSONString(dataMap));
259
+            String strResult = HttpUtil.doPost(url,sjMap);
260
+        }
261
+        modelMap.put("status", "success");
262
+        return modelMap;
263
+    }
264
+
265
+    /**
266
+     * 删除熏蒸申请信息
267
+     * @param forrecordId 主键id
268
+     * @return
269
+     * @throws Exception
270
+     */
271
+    @RequestMapping(value="/removeDetail", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
272
+    @ApiOperation(value="删除熏蒸备案信息", notes = "删除熏蒸备案信息")
273
+    @ApiImplicitParams({
274
+            @ApiImplicitParam(name = "planIds", value = "熏蒸主键集合", paramType = "form"),
275
+            @ApiImplicitParam(name = "forrecordId", value = "主键id", paramType = "form")
276
+    })
277
+    public Map<String, Object> removeDetail(String planIds, String forrecordId) throws Exception {
278
+        Map<String, Object> modelMap = new HashMap<>();
279
+        if (planIds != null) {
280
+            String[] planId = planIds.split(",");
281
+            for (String id:planId) {
282
+                //修改熏蒸状态
283
+                TFumigationPlanExample example = new TFumigationPlanExample();
284
+                TFumigationPlanExample.Criteria criteria = example.createCriteria();
285
+                criteria.andIdEqualTo(id);
286
+
287
+                TFumigationPlan tFumigationPlan = new TFumigationPlan();
288
+                tFumigationPlan.setState(5);
289
+                tFumigationPlan.setForRecordId("");
290
+                fumigationPlanService.updateByExample(tFumigationPlan, example);
291
+            }
292
+        }
293
+        //修改熏蒸状态
294
+        TFumigationForrecordExample tFumigationForrecordExample = new TFumigationForrecordExample();
295
+        TFumigationForrecordExample.Criteria criteria = tFumigationForrecordExample.createCriteria();
296
+        criteria.andIdEqualTo(forrecordId);
297
+
298
+        TFumigationForrecord tFumigationForrecord = new TFumigationForrecord();
299
+        tFumigationForrecord.setDeleteState("0");
300
+        fumigationFroRecordService.updateByExample(tFumigationForrecord, tFumigationForrecordExample);
301
+        modelMap.put("status", "success");
302
+        return modelMap;
303
+    }
304
+
305
+    /**
306
+     * 提交熏蒸申请信息
307
+     * @param forrecordId 主键id
308
+     * @return
309
+     * @throws Exception
310
+     */
311
+    @RequestMapping(value="/getSubmit", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
312
+    @ApiOperation(value="提交熏蒸备案信息", notes = "提交熏蒸备案信息")
313
+    @ApiImplicitParams({
314
+            @ApiImplicitParam(name = "planIds", value = "熏蒸主键集合", paramType = "form"),
315
+            @ApiImplicitParam(name = "forrecordId", value = "主键id", paramType = "form")
316
+    })
317
+    public Map<String, Object> getSubmit(String planIds, String forrecordId) throws Exception {
318
+        Map<String, Object> modelMap = new HashMap<>();
319
+        if (planIds != null) {
320
+            String[] planId = planIds.split(",");
321
+            for (String id:planId) {
322
+                //修改熏蒸状态
323
+                TFumigationPlanExample example = new TFumigationPlanExample();
324
+                TFumigationPlanExample.Criteria criteria = example.createCriteria();
325
+                criteria.andIdEqualTo(id);
326
+
327
+                TFumigationPlan tFumigationPlan = new TFumigationPlan();
328
+                tFumigationPlan.setState(7);
329
+                fumigationPlanService.updateByExample(tFumigationPlan, example);
330
+            }
331
+        }
332
+
333
+        //如果是提交的话则除了保存还要把数据提交到市级来进行审批
334
+        Map<String, Object> dataMap = fumigationFroRecordService.getFroRecordByIds(forrecordId);
335
+        Map<String, Object> sjMap = new HashMap<String, Object>();
336
+        String url = reportPath+"/api/cbl-app/cbl/fumigation/insertFumigation";//市级接口
337
+//        dataMap.put("tyshxydm","91120118712878209L");
338
+        String strResult = HttpUtil.doPost(url,JSON.toJSONString(dataMap));
339
+        modelMap.put("status", "success");
340
+        return modelMap;
341
+    }
342
+
343
+    /**
344
+     * 提交熏蒸审批信息
345
+     * @param forrecordId 主键id
346
+     * @return
347
+     * @throws Exception
348
+     */
349
+    @RequestMapping(value="/getForRecordApproval", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
350
+    @ApiOperation(value="提交熏蒸备案信息", notes = "提交熏蒸备案信息-市级用")
351
+    @ApiImplicitParams({
352
+            @ApiImplicitParam(name = "forRecord", value = "主键id", paramType = "form")
353
+    })
354
+    public void getForRecordApproval(String forRecord) throws Exception {
355
+        //市级传输过来的审批过后的备案数据
356
+        JSONObject forRecordData = JSONObject.parseObject(forRecord);
357
+        String forrecordId = forRecordData.get("forrecordId").toString();
358
+        Map<String, Object> modelMap = new HashMap<>();
359
+        if (forrecordId != null) {
360
+            //修改熏蒸备案信息
361
+            TFumigationForrecordExample tFumigationForrecordExample = new TFumigationForrecordExample();
362
+            TFumigationForrecordExample.Criteria criteria = tFumigationForrecordExample.createCriteria();
363
+            criteria.andIdEqualTo(forrecordId);
364
+
365
+            TFumigationForrecord tFumigationForrecord = new TFumigationForrecord();
366
+            tFumigationForrecord.setOrgansOpinion(forRecordData.get("organsOpinion").toString());
367
+            tFumigationForrecord.setOutPerson(forRecordData.get("outPerson").toString());
368
+            tFumigationForrecord.setOutForrecordTime(ParameterUtil.string2datetime(forRecordData.get("outForrecordTime").toString()));
369
+            fumigationFroRecordService.updateByExample(tFumigationForrecord, tFumigationForrecordExample);
370
+
371
+            //获取备案数据
372
+            List<Map<String, Object>> forRecords = fumigationFroRecordService.getFroRecordById(forrecordId);
373
+            String planIds = "";
374
+            for (Map<String, Object> maps:forRecords) {
375
+                planIds+=maps.get("planids")+",";
376
+            }
377
+            planIds = planIds.substring(0,planIds.length()-1);
378
+
379
+            //下边获取熏蒸数据
380
+            String[] planId = planIds.split(",");
381
+            for (String id:planId) {
382
+                //修改熏蒸状态
383
+                TFumigationPlanExample example = new TFumigationPlanExample();
384
+                TFumigationPlanExample.Criteria planCriteria = example.createCriteria();
385
+                planCriteria.andIdEqualTo(id);
386
+
387
+                TFumigationPlan tFumigationPlan = new TFumigationPlan();
388
+                tFumigationPlan.setState(8);
389
+                fumigationPlanService.updateByExample(tFumigationPlan, example);
390
+            }
391
+        }
392
+    }
393
+}

+ 350 - 0
src/main/java/com/chinaitop/depot/fumigation/controller/FumigationPlanController.java

@@ -0,0 +1,350 @@
1
+package com.chinaitop.depot.fumigation.controller;
2
+
3
+import com.chinaitop.depot.fumigation.model.*;
4
+import com.chinaitop.depot.fumigation.service.FumigationPlanService;
5
+import com.chinaitop.depot.fumigation.service.PesticidePlanService;
6
+import com.chinaitop.depot.utils.JsonToObjectUtils;
7
+import com.chinaitop.depot.utils.ParameterUtil;
8
+import com.fasterxml.jackson.databind.ObjectMapper;
9
+import com.github.pagehelper.PageHelper;
10
+import com.github.pagehelper.PageInfo;
11
+import io.swagger.annotations.Api;
12
+import io.swagger.annotations.ApiImplicitParam;
13
+import io.swagger.annotations.ApiImplicitParams;
14
+import io.swagger.annotations.ApiOperation;
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 javax.annotation.Resource;
21
+import java.util.Date;
22
+import java.util.HashMap;
23
+import java.util.List;
24
+import java.util.Map;
25
+
26
+/**
27
+ * @author lvzhikai
28
+ * @description: 熏蒸计划
29
+ * @create 2018-12-14 10:57
30
+ */
31
+@RestController
32
+@RequestMapping(value = "/storage/fumigationPlan")
33
+@Api(value = "FumigationPlanController", description = "熏蒸计划控制类")
34
+@SuppressWarnings("all")
35
+public class FumigationPlanController {
36
+
37
+    @Resource
38
+    private FumigationPlanService fumigationPlanService;
39
+
40
+    @Resource
41
+    private PesticidePlanService pesticidePlanService;
42
+
43
+    /**
44
+     * 列表
45
+     * @param pageNum
46
+     * @param pageSize
47
+     * @param houseId
48
+     * @param orgId
49
+     * @return
50
+     */
51
+    @RequestMapping(value = "/getFumigationPlanList", method = RequestMethod.GET)
52
+    @ApiOperation(value = "熏蒸方案申请列表", notes = "熏蒸方案申请列表,支持分页")
53
+    @ApiImplicitParams({
54
+            @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
55
+            @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
56
+            @ApiImplicitParam(name = "houseId", value = "仓房Id", paramType = "query"),
57
+            @ApiImplicitParam(name = "orgId", value = "组织机构编号", paramType = "query"),
58
+            @ApiImplicitParam(name = "queryType", value = "查询状态", paramType = "query")
59
+    })
60
+    public PageInfo<TFumigationPlan> getFumigationPlanList(Integer pageNum, Integer pageSize, Integer houseId, String orgId, String queryType) {
61
+        TFumigationPlanExample example = new TFumigationPlanExample();
62
+        TFumigationPlanExample.Criteria criteria = example.createCriteria();
63
+
64
+        Map<String,Object> map = new HashMap<>();
65
+
66
+        if (ParameterUtil.isnotnull(houseId)) {//仓房查询
67
+            criteria.andHouseIdEqualTo(houseId);
68
+            map.put("houseId", houseId);
69
+        }
70
+
71
+        if (ParameterUtil.isnotnull(orgId)) {//粮库查询
72
+            criteria.andOrgIdEqualTo(orgId);
73
+            map.put("orgId",orgId);
74
+        }
75
+
76
+        if (pageNum!=null && pageSize!=null) {
77
+            PageHelper.startPage(pageNum, pageSize);
78
+        }
79
+
80
+        //施药数据。过程数据。善后数据。备案数据
81
+        if(ParameterUtil.isequal(queryType,"XZ") || ParameterUtil.isequal(queryType,"GC")){
82
+            criteria.andStateEqualTo(8);
83
+            map.put("state",8);
84
+        }else if(ParameterUtil.isequal(queryType,"SH")){
85
+            criteria.andStateEqualTo(9);
86
+        }else if(ParameterUtil.isequal(queryType,"BA")){
87
+            criteria.andStateEqualTo(5);
88
+        }
89
+
90
+        criteria.andDeleteStateEqualTo("1");
91
+        map.put("deleteState",1);
92
+
93
+        List<TFumigationPlan> list = null;
94
+        if(ParameterUtil.isequal(queryType,"GC")){//熏蒸过程
95
+            list = fumigationPlanService.getProcessList(map);
96
+        }else{
97
+            list = fumigationPlanService.getFumigationPlanList(example);
98
+        }
99
+        PageInfo<TFumigationPlan> pageInfo = new PageInfo<TFumigationPlan>(list);
100
+        return pageInfo;
101
+    }
102
+
103
+    /**
104
+     * 根据id查询熏蒸方案申请数据
105
+     * @param id 主键id
106
+     * @return
107
+     */
108
+    @RequestMapping(value="/getFumigationPlanDeatil", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
109
+    @ApiOperation(value="根据id查询熏蒸方案申请数据", notes = "根据id查询熏蒸方案申请数据")
110
+    @ApiImplicitParams({
111
+            @ApiImplicitParam(name = "fumigationId", value = "主键id", paramType = "query")
112
+    })
113
+    public Map<String, Object> getFumigationPlanDeatil(String fumigationId) {
114
+        Map<String, Object> modelMap = new HashMap<String, Object>();
115
+
116
+        if (fumigationId != null) {
117
+            TFumigationPlan tFumigationPlan = fumigationPlanService.findById(fumigationId);
118
+            modelMap.put("fumigationEdit",tFumigationPlan);
119
+
120
+            TFumigationPesticideExample example = new TFumigationPesticideExample();
121
+            TFumigationPesticideExample.Criteria criteria = example.createCriteria();
122
+            criteria.andFumigationIdEqualTo(fumigationId);
123
+            List<TFumigationPesticide> list = pesticidePlanService.getFumigationPesticideList(example);
124
+            if(list.size() > 0)
125
+                modelMap.put("pesticideEdit",list.get(0));
126
+        }
127
+
128
+        return modelMap;
129
+    }
130
+
131
+    /**
132
+     * 保存熏蒸方案申请信息
133
+     * @param fumigation
134
+     * @return
135
+     */
136
+    @RequestMapping(value="/saveFumigationPlanDate", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
137
+    @ApiOperation(value="保存熏蒸方案申请信息", notes = "保存熏蒸方案申请信息")
138
+    @ApiImplicitParams({
139
+            @ApiImplicitParam(name = "fumigation", value = "熏蒸方案数据", paramType = "form"),
140
+            @ApiImplicitParam(name = "pesticide", value = "施药方案数据", paramType = "form"),
141
+            @ApiImplicitParam(name = "fumPlanId", value = "熏蒸方案Id", paramType = "form")
142
+    })
143
+    public Map<String, Object> saveFumigationPlanDate(String fumigation, String pesticide,String fumPlanId) throws Exception {
144
+        Map<String, Object> modelMap = new HashMap<String, Object>();
145
+        // JSON字符串转对象
146
+        ObjectMapper mapper = new ObjectMapper();
147
+        TFumigationPlan tFumigationPlan = (TFumigationPlan) JsonToObjectUtils.jsonToObject(fumigation,"com.chinaitop.depot.fumigation.model.TFumigationPlan");
148
+        TFumigationPesticide tPesticidePlan = (TFumigationPesticide) JsonToObjectUtils.jsonToObject(pesticide,"com.chinaitop.depot.fumigation.model.TFumigationPesticide");
149
+
150
+        tFumigationPlan.setDeleteState("1");//默认设置删除标志
151
+        tPesticidePlan.setDeleteState("1");//默认设置删除标志
152
+        if (tFumigationPlan.getId() == null) {
153
+            tFumigationPlan.setCreateTime(new Date());//创建时间
154
+            tFumigationPlan.setState(1);//未提交
155
+
156
+            tFumigationPlan.setId(fumPlanId);//唯一id
157
+            fumigationPlanService.add(tFumigationPlan);//熏蒸计划
158
+
159
+            tPesticidePlan.setCreateTime(new Date());//创建时间
160
+            tPesticidePlan.setState(1);//未提交
161
+            tPesticidePlan.setFumigationId(fumPlanId);
162
+            tPesticidePlan.setId(ParameterUtil.getCode());
163
+            pesticidePlanService.add(tPesticidePlan);//施药计划
164
+
165
+            modelMap.put("fumigationId", tFumigationPlan.getId());
166
+        } else {
167
+            tFumigationPlan.setState(1);//未提交
168
+            fumigationPlanService.update(tFumigationPlan);
169
+
170
+            tPesticidePlan.setState(1);//未提交
171
+            pesticidePlanService.update(tPesticidePlan);
172
+        }
173
+        modelMap.put("status", "success");
174
+        return modelMap;
175
+    }
176
+
177
+    /**
178
+     * 删除熏蒸申请信息
179
+     * @param fumigationId 主键id
180
+     * @return
181
+     * @throws Exception
182
+     */
183
+    @RequestMapping(value="/removefumigationPlan", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
184
+    @ApiOperation(value="删除熏蒸申请信息", notes = "删除熏蒸申请信息")
185
+    @ApiImplicitParams({
186
+            @ApiImplicitParam(name = "fumigationId", value = "主键id", paramType = "form")
187
+    })
188
+    public Map<String, Object> removefumigationPlan(String fumigationId) throws Exception {
189
+        Map<String, Object> modelMap = new HashMap<>();
190
+        if (fumigationId != null) {
191
+            //删除熏蒸计划
192
+            TFumigationPlanExample example = new TFumigationPlanExample();
193
+            TFumigationPlanExample.Criteria criteria = example.createCriteria();
194
+            criteria.andIdEqualTo(fumigationId);
195
+
196
+            TFumigationPlan tFumigationPlan = new TFumigationPlan();
197
+            tFumigationPlan.setDeleteState("0");
198
+            fumigationPlanService.updateByExample(tFumigationPlan, example);
199
+
200
+            //删除相关的施药计划
201
+            TFumigationPesticideExample pesticideExample = new TFumigationPesticideExample();
202
+            TFumigationPesticideExample.Criteria pesticideCriteria = pesticideExample.createCriteria();
203
+            pesticideCriteria.andFumigationIdEqualTo(fumigationId);
204
+
205
+            TFumigationPesticide TFumigationPesticide = new TFumigationPesticide();
206
+            TFumigationPesticide.setDeleteState("0");
207
+            pesticidePlanService.updateByExample(TFumigationPesticide, pesticideExample);
208
+            modelMap.put("status", "success");
209
+        }
210
+        return modelMap;
211
+    }
212
+
213
+    /**
214
+     * 列表
215
+     * @param pageNum
216
+     * @param pageSize
217
+     * @param houseId
218
+     * @param orgId
219
+     * @return
220
+     */
221
+    @RequestMapping(value = "/getFumigationApproveList", method = RequestMethod.GET)
222
+    @ApiOperation(value = "熏蒸方案审批列表", notes = "熏蒸方案审批列表,支持分页")
223
+    @ApiImplicitParams({
224
+            @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
225
+            @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
226
+            @ApiImplicitParam(name = "houseId", value = "仓房Id", paramType = "query"),
227
+            @ApiImplicitParam(name = "orgId", value = "组织机构编号", paramType = "query"),
228
+            @ApiImplicitParam(name = "userId", value = "当前登陆人id", paramType = "query")
229
+    })
230
+    public PageInfo<Map<String,Object>> getFumigationApproveList(Integer pageNum, Integer pageSize, Integer houseId, String orgId, String userId) {
231
+        Map<String,Object> map = new HashMap<>();
232
+        List<Map<String,Object>> list = null;
233
+        map.put("houseId",houseId);
234
+        map.put("orgId",orgId);
235
+        map.put("userId",userId);
236
+
237
+        if (pageNum!=null && pageSize!=null) {
238
+            PageHelper.startPage(pageNum, pageSize);
239
+        }
240
+
241
+        list = fumigationPlanService.getFumigationApproveList(map);
242
+        PageInfo<Map<String,Object>> pageInfo = new PageInfo<Map<String,Object>>(list);
243
+        return pageInfo;
244
+    }
245
+
246
+    /**
247
+     * 保存熏蒸方案审批信息
248
+     * @param fumigation
249
+     * @return
250
+     */
251
+    @RequestMapping(value="/saveFumigationApproveDate", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
252
+    @ApiOperation(value="保存熏蒸方案审批信息", notes = "保存熏蒸方案审批信息")
253
+    @ApiImplicitParams({
254
+            @ApiImplicitParam(name = "fumigation", value = "熏蒸方案数据", paramType = "form"),
255
+            @ApiImplicitParam(name = "pesticide", value = "施药方案数据", paramType = "form")
256
+    })
257
+    public Map<String, Object> saveFumigationApproveDate(String fumigation,String pesticide) throws Exception {
258
+        Map<String, Object> modelMap = new HashMap<String, Object>();
259
+        // JSON字符串转对象
260
+        ObjectMapper mapper = new ObjectMapper();
261
+        TFumigationPlan tFumigationPlan = (TFumigationPlan) JsonToObjectUtils.jsonToObject(fumigation,"com.chinaitop.depot.fumigation.model.TFumigationPlan");
262
+        TFumigationPesticide tPesticidePlan = (TFumigationPesticide) JsonToObjectUtils.jsonToObject(pesticide,"com.chinaitop.depot.fumigation.model.TFumigationPesticide");
263
+
264
+        tFumigationPlan.setApproveTime(new Date());
265
+        tPesticidePlan.setApproveTime(new Date());
266
+
267
+        fumigationPlanService.update(tFumigationPlan);
268
+        pesticidePlanService.update(tPesticidePlan);
269
+        modelMap.put("status", "success");
270
+        return modelMap;
271
+    }
272
+
273
+    /**
274
+     * 查询方案列表数据
275
+     * @param id 主键id
276
+     * @return
277
+     */
278
+    @RequestMapping(value="/getPlanQueryList", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
279
+    @ApiOperation(value="查询方案列表数据", notes = "查询方案列表数据")
280
+    @ApiImplicitParams({
281
+            @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
282
+            @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
283
+            @ApiImplicitParam(name = "houseId", value = "仓房Id", paramType = "query"),
284
+            @ApiImplicitParam(name = "orgId", value = "组织机构编号", paramType = "query")
285
+    })
286
+    public PageInfo<Map<String,Object>> getPlanQueryList(Integer pageNum, Integer pageSize, Integer houseId, String orgId) {
287
+        Map<String,Object> map = new HashMap<>();
288
+        List<Map<String,Object>> list = null;
289
+        map.put("houseId",houseId);
290
+        map.put("orgId",orgId);
291
+
292
+        if (pageNum!=null && pageSize!=null) {
293
+            PageHelper.startPage(pageNum, pageSize);
294
+        }
295
+
296
+        list = fumigationPlanService.selectPlanQueryList(map);
297
+        PageInfo<Map<String,Object>> pageInfo = new PageInfo<Map<String,Object>>(list);
298
+        return pageInfo;
299
+    }
300
+
301
+    /**
302
+     * 作业全部信息--省级平台用
303
+     * @param id 主键id
304
+     * @return
305
+     */
306
+    @RequestMapping(value="/getAllQueryList", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
307
+    @ApiOperation(value="查询方案列表数据", notes = "查询方案列表数据")
308
+    @ApiImplicitParams({
309
+            @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
310
+            @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
311
+            @ApiImplicitParam(name = "orgId", value = "组织机构编号", paramType = "query")
312
+    })
313
+    public PageInfo<Map<String,Object>> getAllQueryList(Integer pageNum, Integer pageSize, String orgId) {
314
+        Map<String,Object> map = new HashMap<>();
315
+        List<Map<String,Object>> list = null;
316
+        map.put("orgId",orgId);
317
+
318
+        if (pageNum!=null && pageSize!=null) {
319
+            PageHelper.startPage(pageNum, pageSize);
320
+        }
321
+
322
+        list = fumigationPlanService.getAllQueryList(map);
323
+        PageInfo<Map<String,Object>> pageInfo = new PageInfo<Map<String,Object>>(list);
324
+        return pageInfo;
325
+    }
326
+
327
+    /**
328
+     * 熏蒸方案状态提交
329
+     *
330
+     * @param id 数据ID
331
+     * @return
332
+     */
333
+    @RequestMapping(value="/submit",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
334
+    @ApiOperation(value="熏蒸方案提交", notes = "熏蒸方案提交")
335
+    @ApiImplicitParams({
336
+            @ApiImplicitParam(name = "id", value = "数据ID", paramType = "form"),
337
+            @ApiImplicitParam(name = "approvalStatus", value = "状态", paramType = "form")
338
+    })
339
+    public Map<String, Object> submit(String id, Integer approvalStatus) {
340
+        Map<String,Object> modelMap = new HashMap<>();
341
+        try {
342
+            fumigationPlanService.submit(id, approvalStatus);
343
+        } catch (Exception e) {
344
+            e.printStackTrace();
345
+        }
346
+
347
+        modelMap.put("status", "success");
348
+        return modelMap;
349
+    }
350
+}

+ 209 - 0
src/main/java/com/chinaitop/depot/fumigation/controller/FumigationProcessController.java

@@ -0,0 +1,209 @@
1
+package com.chinaitop.depot.fumigation.controller;
2
+
3
+import com.chinaitop.depot.fumigation.model.TFumigationPlan;
4
+import com.chinaitop.depot.fumigation.model.TFumigationPlanExample;
5
+import com.chinaitop.depot.fumigation.model.TFumigationProcess;
6
+import com.chinaitop.depot.fumigation.model.TFumigationProcessExample;
7
+import com.chinaitop.depot.fumigation.service.FumigationPlanService;
8
+import com.chinaitop.depot.fumigation.service.FumigationProcessService;
9
+import com.chinaitop.depot.fumigation.service.PesticidePlanService;
10
+import com.chinaitop.depot.utils.JsonToObjectUtils;
11
+import com.chinaitop.depot.utils.ParameterUtil;
12
+import com.fasterxml.jackson.databind.ObjectMapper;
13
+import com.github.pagehelper.PageHelper;
14
+import com.github.pagehelper.PageInfo;
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
+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.*;
26
+
27
+/**
28
+ * @author lvzhikai
29
+ * @description: 熏蒸作业记录
30
+ * @create 2019-1-14 10:57
31
+ */
32
+@RestController
33
+@RequestMapping(value = "/storage/fumigationProcess")
34
+@Api(value = "FumigationProcessController", description = "熏蒸作业控制类")
35
+@SuppressWarnings("all")
36
+public class FumigationProcessController {
37
+
38
+    @Resource
39
+    private FumigationProcessService fumigationProcessService;
40
+
41
+    @Resource
42
+    private FumigationPlanService fumigationPlanService;
43
+
44
+    @Resource
45
+    private PesticidePlanService pesticidePlanService;
46
+
47
+    /**
48
+     * 列表
49
+     * @param pageNum
50
+     * @param pageSize
51
+     * @param houseId
52
+     * @param orgId
53
+     * @return
54
+     */
55
+    @RequestMapping(value = "/getFumigationProcessList", method = RequestMethod.GET)
56
+    @ApiOperation(value = "熏蒸作业列表", notes = "熏蒸作业列表,支持分页")
57
+    @ApiImplicitParams({
58
+            @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
59
+            @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
60
+            @ApiImplicitParam(name = "houseId", value = "仓房Id", paramType = "query"),
61
+            @ApiImplicitParam(name = "orgId", value = "组织机构编号", paramType = "query")
62
+    })
63
+    public PageInfo<Map<String,Object>> getFumigationProcessList(Integer pageNum, Integer pageSize, Integer houseId, Integer orgId) {
64
+        Map<String,Object> map = new HashMap<>();
65
+        List<Map<String,Object>> list = null;
66
+
67
+        if (ParameterUtil.isnotnull(orgId))//粮库查询
68
+            map.put("orgId",orgId);
69
+
70
+        if (ParameterUtil.isnotnull(houseId))//粮库查询
71
+            map.put("houseId",houseId);
72
+
73
+        if (pageNum!=null && pageSize!=null) {
74
+            PageHelper.startPage(pageNum, pageSize);
75
+        }
76
+
77
+
78
+        list = fumigationProcessService.getFumigationProcessList(map);
79
+        PageInfo<Map<String,Object>> pageInfo = new PageInfo<Map<String,Object>>(list);
80
+        return pageInfo;
81
+    }
82
+
83
+    /**
84
+     * 保存熏蒸作业信息
85
+     * @param fumigation
86
+     * @return
87
+     */
88
+    @RequestMapping(value="/saveFumigationProcessDate", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
89
+    @ApiOperation(value="保存熏蒸作业信息", notes = "保存熏蒸作业信息")
90
+    @ApiImplicitParams({
91
+            @ApiImplicitParam(name = "fumigation", value = "熏蒸作业数据", paramType = "form")
92
+    })
93
+    public Map<String, Object> saveFumigationProcessDate(String fumigationProcess) throws Exception {
94
+        Map<String, Object> modelMap = new HashMap<String, Object>();
95
+        // JSON字符串转对象
96
+        ObjectMapper mapper = new ObjectMapper();
97
+        TFumigationProcess tFumigationProcess = (TFumigationProcess) JsonToObjectUtils.jsonToObject(fumigationProcess,"com.chinaitop.depot.fumigation.model.TFumigationProcess");
98
+        tFumigationProcess.setDeleteState("1");//默认设置删除标志
99
+        if (tFumigationProcess.getId() == null) {
100
+            tFumigationProcess.setId(ParameterUtil.getCode());
101
+            tFumigationProcess.setCreateTime(new Date());//创建时间
102
+            tFumigationProcess.setCreateTime(new Date());//创建时间
103
+            fumigationProcessService.add(tFumigationProcess);
104
+
105
+            //修改熏蒸状态
106
+            TFumigationPlanExample example = new TFumigationPlanExample();
107
+            TFumigationPlanExample.Criteria criteria = example.createCriteria();
108
+            criteria.andIdEqualTo(tFumigationProcess.getFumigationId());
109
+
110
+            TFumigationPlan tFumigationPlan = new TFumigationPlan();
111
+            tFumigationPlan.setState(9);
112
+            fumigationPlanService.updateByExample(tFumigationPlan, example);
113
+        } else {
114
+            tFumigationProcess.setUpdateTime(new Date());//修改时间
115
+            fumigationProcessService.update(tFumigationProcess);
116
+        }
117
+        modelMap.put("status", "success");
118
+        return modelMap;
119
+    }
120
+
121
+    /**
122
+     * 根据id查询熏蒸作业
123
+     * @param id 主键id
124
+     * @return
125
+     */
126
+    @RequestMapping(value="/getProcessDeatil", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
127
+    @ApiOperation(value="根据id查询熏蒸作业数据", notes = "根据id查询熏蒸作业数据")
128
+    @ApiImplicitParams({
129
+            @ApiImplicitParam(name = "processId", value = "主键id", paramType = "query")
130
+    })
131
+    public Map<String, Object> getProcessDeatil(String processId) {
132
+        Map<String, Object> modelMap = new HashMap<String, Object>();
133
+
134
+        if (processId != null) {
135
+            TFumigationProcess tFumigationProcess = fumigationProcessService.findById(processId);
136
+            modelMap.put("processEdit",tFumigationProcess);//熏蒸作业过程数据
137
+
138
+            TFumigationPlan tFumigationPlan = fumigationPlanService.findById(tFumigationProcess.getFumigationId());
139
+            modelMap.put("fumigationEdit",tFumigationPlan);//熏蒸方案数据
140
+
141
+            Map<String, Object> pesticide = pesticidePlanService.finddrugNameById(tFumigationProcess.getFumigationId());
142
+            modelMap.put("drugName",pesticide.get("drugName"));//获取药剂名称
143
+            modelMap.put("reagentType",pesticide.get("reagentType"));//获取药剂名称
144
+
145
+//            List<TQtdevinfoValue> tQtdevinfoValue = gasDetectionService.getList("","","","'"+tFumigationProcess.getDcsqtinfoId()+"'");
146
+//            modelMap.put("tQtdevinfoEdit",tQtdevinfoValue);//气体数据
147
+        }
148
+
149
+        return modelMap;
150
+    }
151
+
152
+    /**
153
+     * 删除熏蒸作业信息
154
+     * @param fumigationId 主键id
155
+     * @return
156
+     * @throws Exception
157
+     */
158
+    @RequestMapping(value="/removeProcessPlan", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
159
+    @ApiOperation(value="删除熏蒸作业信息", notes = "删除熏蒸作业信息")
160
+    @ApiImplicitParams({
161
+            @ApiImplicitParam(name = "processId", value = "主键id", paramType = "form"),
162
+            @ApiImplicitParam(name = "fumigationId", value = "熏蒸计划表ID", paramType = "form")
163
+    })
164
+    public Map<String, Object> removeProcessPlan(String processId,String fumigationId) throws Exception {
165
+        Map<String, Object> modelMap = new HashMap<>();
166
+        if (processId != null) {
167
+            TFumigationProcessExample example = new TFumigationProcessExample();
168
+            TFumigationProcessExample.Criteria criteria = example.createCriteria();
169
+            criteria.andIdEqualTo(processId);
170
+
171
+            TFumigationProcess tFumigationProcess = new TFumigationProcess();
172
+            tFumigationProcess.setDeleteState("0");
173
+            fumigationProcessService.updateByExample(tFumigationProcess, example);
174
+
175
+            //修改熏蒸状态
176
+            TFumigationPlanExample fumExample = new TFumigationPlanExample();
177
+            TFumigationPlanExample.Criteria fumCriteria = fumExample.createCriteria();
178
+            fumCriteria.andIdEqualTo(fumigationId);
179
+
180
+            TFumigationPlan tFumigationPlan = new TFumigationPlan();
181
+            tFumigationPlan.setState(5);
182
+            fumigationPlanService.updateByExample(tFumigationPlan, fumExample);
183
+            modelMap.put("status", "success");
184
+        }
185
+        return modelMap;
186
+    }
187
+
188
+    /**
189
+     * 根据熏蒸计划id查询熏蒸作业
190
+     * @param id 主键id
191
+     * @return
192
+     */
193
+    @RequestMapping(value="/getFumIdByProcessDeatil", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
194
+    @ApiOperation(value="根据熏蒸计划id查询熏蒸作业数据", notes = "根据熏蒸计划id查询熏蒸作业数据")
195
+    @ApiImplicitParams({
196
+            @ApiImplicitParam(name = "fumId", value = "熏蒸计划id", paramType = "query")
197
+    })
198
+    public Map<String, Object> getFumIdByProcessDeatil(String fumId) {
199
+        Map<String, Object> modelMap = new HashMap<String, Object>();
200
+
201
+        TFumigationProcessExample example = new TFumigationProcessExample();
202
+        TFumigationProcessExample.Criteria criteria = example.createCriteria();
203
+        criteria.andFumigationIdEqualTo(fumId);
204
+        List<TFumigationProcess> tFumigationProcess = fumigationProcessService.getDataByFumId(example);
205
+        modelMap.put("processEdit",tFumigationProcess);//熏蒸作业过程数据
206
+
207
+        return modelMap;
208
+    }
209
+}

+ 251 - 0
src/main/java/com/chinaitop/depot/fumigation/controller/PesticidePlanController.java

@@ -0,0 +1,251 @@
1
+package com.chinaitop.depot.fumigation.controller;
2
+
3
+import com.chinaitop.depot.fumigation.model.TFumigationPesticide;
4
+import com.chinaitop.depot.fumigation.model.TFumigationPesticideExample;
5
+import com.chinaitop.depot.fumigation.model.TFumigationPlan;
6
+import com.chinaitop.depot.fumigation.service.FumigationPlanService;
7
+import com.chinaitop.depot.fumigation.service.PesticidePlanService;
8
+import com.chinaitop.depot.utils.JsonToObjectUtils;
9
+import com.fasterxml.jackson.databind.ObjectMapper;
10
+import com.github.pagehelper.PageHelper;
11
+import com.github.pagehelper.PageInfo;
12
+import io.swagger.annotations.Api;
13
+import io.swagger.annotations.ApiImplicitParam;
14
+import io.swagger.annotations.ApiImplicitParams;
15
+import io.swagger.annotations.ApiOperation;
16
+import org.springframework.http.MediaType;
17
+import org.springframework.web.bind.annotation.RequestMapping;
18
+import org.springframework.web.bind.annotation.RequestMethod;
19
+import org.springframework.web.bind.annotation.RestController;
20
+
21
+import javax.annotation.Resource;
22
+import java.util.Date;
23
+import java.util.HashMap;
24
+import java.util.List;
25
+import java.util.Map;
26
+
27
+/**
28
+ * @author lvzhikai
29
+ * @description: 施药计划
30
+ * @create 2018-12-14 10:57
31
+ */
32
+@RestController
33
+@RequestMapping(value = "/storage/pesticidePlan")
34
+@Api(value = "PesticidePlanController", description = "施药计划控制类")
35
+@SuppressWarnings("all")
36
+public class PesticidePlanController {
37
+
38
+    @Resource
39
+    private PesticidePlanService pesticidePlanService;
40
+
41
+    @Resource
42
+    private FumigationPlanService fumigentionPlanService;
43
+
44
+    /**
45
+     * 列表
46
+     * @param pageNum
47
+     * @param pageSize
48
+     * @param houseId
49
+     * @param orgId
50
+     * @return
51
+     */
52
+    @RequestMapping(value = "/getPesticidePlanList", method = RequestMethod.GET)
53
+    @ApiOperation(value = "施药方案申请列表", notes = "施药方案申请列表,支持分页")
54
+    @ApiImplicitParams({
55
+            @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
56
+            @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
57
+            @ApiImplicitParam(name = "houseId", value = "仓房Id", paramType = "query"),
58
+            @ApiImplicitParam(name = "orgId", value = "组织机构编号", paramType = "query"),
59
+            @ApiImplicitParam(name = "planType", value = "查询状态", paramType = "query")
60
+    })
61
+    public PageInfo<Map<String,Object>> getPesticidePlanList(Integer pageNum, Integer pageSize, Integer houseId, Integer orgId, String planType) {
62
+        Map<String,Object> map = new HashMap<>();
63
+        List<Map<String,Object>> list = null;
64
+        map.put("houseId",houseId);
65
+        map.put("orgId",orgId);
66
+
67
+        if (pageNum!=null && pageSize!=null) {
68
+            PageHelper.startPage(pageNum, pageSize);
69
+        }
70
+
71
+        list = pesticidePlanService.getPesticidePlanList(map);
72
+        PageInfo<Map<String,Object>> pageInfo = new PageInfo<Map<String,Object>>(list);
73
+        return pageInfo;
74
+    }
75
+
76
+    /**
77
+     * 根据id查询施药方案申请数据
78
+     * @param id 主键id
79
+     * @return
80
+     */
81
+    @RequestMapping(value="/gePesticideDeatil", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
82
+    @ApiOperation(value="根据id查询施药方案申请数据", notes = "根据id查询施药方案申请数据")
83
+    @ApiImplicitParams({
84
+            @ApiImplicitParam(name = "pesticideId", value = "主键id", paramType = "query")
85
+    })
86
+    public Map<String, Object> geTFumigationPesticideDeatil(String pesticideId) {
87
+        Map<String, Object> modelMap = new HashMap<String, Object>();
88
+
89
+        if (pesticideId != null) {
90
+            TFumigationPesticide TFumigationPesticide = pesticidePlanService.findById(pesticideId);
91
+            modelMap.put("pesticideEdit",TFumigationPesticide);
92
+
93
+            TFumigationPlan tFumigationPlan = fumigentionPlanService.findById(TFumigationPesticide.getFumigationId());
94
+            modelMap.put("fumigationEdit",tFumigationPlan);
95
+        }
96
+
97
+        return modelMap;
98
+    }
99
+
100
+    /**
101
+     * 列表
102
+     * @param fumigation
103
+     * @return
104
+     */
105
+    @RequestMapping(value="/savePesticidePlanDate", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
106
+    @ApiOperation(value="保存施药方案申请信息", notes = "保存施药方案申请信息")
107
+    @ApiImplicitParams({
108
+            @ApiImplicitParam(name = "fumigation", value = "施药方案数据", paramType = "form")
109
+    })
110
+    public Map<String, Object> savePesticidePlanDate(String pesticide) throws Exception {
111
+        Map<String, Object> modelMap = new HashMap<String, Object>();
112
+        // JSON字符串转对象
113
+        ObjectMapper mapper = new ObjectMapper();
114
+        TFumigationPesticide TFumigationPesticide = (TFumigationPesticide) JsonToObjectUtils.jsonToObject(pesticide,"com.chinaitop.depot.fumigation.model.TFumigationPesticide");
115
+        TFumigationPesticide.setDeleteState("1");//默认设置删除标志
116
+        if (TFumigationPesticide.getId() == null) {
117
+            TFumigationPesticide.setCreateTime(new Date());//创建时间
118
+            TFumigationPesticide.setState(1);//待审批
119
+            pesticidePlanService.add(TFumigationPesticide);
120
+            modelMap.put("pesticideId", TFumigationPesticide.getId());
121
+        } else {
122
+            TFumigationPesticide.setState(1);//待审批
123
+            pesticidePlanService.update(TFumigationPesticide);
124
+        }
125
+        modelMap.put("status", "success");
126
+        return modelMap;
127
+    }
128
+
129
+    /**
130
+     * 删除施药申请信息
131
+     * @param fumigationId 主键id
132
+     * @return
133
+     * @throws Exception
134
+     */
135
+    @RequestMapping(value="/removePesticidePlan", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
136
+    @ApiOperation(value="删除施药申请信息", notes = "删除施药申请信息")
137
+    @ApiImplicitParams({
138
+            @ApiImplicitParam(name = "pesticideId", value = "主键id", paramType = "form")
139
+    })
140
+    public Map<String, Object> removePesticidePlan(String pesticideId) throws Exception {
141
+        Map<String, Object> modelMap = new HashMap<>();
142
+        if (pesticideId != null) {
143
+            TFumigationPesticideExample example = new TFumigationPesticideExample();
144
+            TFumigationPesticideExample.Criteria criteria = example.createCriteria();
145
+            criteria.andIdEqualTo(pesticideId);
146
+
147
+            TFumigationPesticide TFumigationPesticide = new TFumigationPesticide();
148
+            TFumigationPesticide.setDeleteState("0");
149
+            pesticidePlanService.updateByExample(TFumigationPesticide, example);
150
+            modelMap.put("status", "success");
151
+        }
152
+        return modelMap;
153
+    }
154
+
155
+    /**
156
+     * 列表
157
+     * @param pageNum
158
+     * @param pageSize
159
+     * @param houseId
160
+     * @param orgId
161
+     * @return
162
+     */
163
+    @RequestMapping(value = "/getPesticideApproveList", method = RequestMethod.GET)
164
+    @ApiOperation(value = "施药方案审批列表", notes = "施药方案审批列表,支持分页")
165
+    @ApiImplicitParams({
166
+            @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
167
+            @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
168
+            @ApiImplicitParam(name = "houseId", value = "仓房Id", paramType = "query"),
169
+            @ApiImplicitParam(name = "orgId", value = "组织机构编号", paramType = "query"),
170
+            @ApiImplicitParam(name = "userId", value = "当前登陆人id", paramType = "query")
171
+    })
172
+    public PageInfo<Map<String,Object>> getPesticideApproveList(Integer pageNum, Integer pageSize, Integer houseId, Integer orgId, String userId) {
173
+        Map<String,Object> map = new HashMap<>();
174
+        List<Map<String,Object>> list = null;
175
+        map.put("houseId",houseId);
176
+        map.put("orgId",orgId);
177
+        map.put("userId",userId);
178
+
179
+        if (pageNum!=null && pageSize!=null) {
180
+            PageHelper.startPage(pageNum, pageSize);
181
+        }
182
+
183
+        list = pesticidePlanService.getPesticidePlanLists(map);
184
+        PageInfo<Map<String,Object>> pageInfo = new PageInfo<Map<String,Object>>(list);
185
+        return pageInfo;
186
+    }
187
+
188
+    /**
189
+     * 保存施药方案审批信息
190
+     * @param fumigation
191
+     * @return
192
+     */
193
+    @RequestMapping(value="/savePesticideApproveDate", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
194
+    @ApiOperation(value="保存施药方案审批信息", notes = "保存施药方案审批信息")
195
+    @ApiImplicitParams({
196
+            @ApiImplicitParam(name = "fumigation", value = "施药方案数据", paramType = "form")
197
+    })
198
+    public Map<String, Object> savePesticideApproveDate(String pesticide) throws Exception {
199
+        Map<String, Object> modelMap = new HashMap<String, Object>();
200
+        // JSON字符串转对象
201
+        ObjectMapper mapper = new ObjectMapper();
202
+        TFumigationPesticide TFumigationPesticide = (TFumigationPesticide) JsonToObjectUtils.jsonToObject(pesticide,"com.chinaitop.depot.fumigation.model.TFumigationPesticide");
203
+        pesticidePlanService.update(TFumigationPesticide);
204
+        modelMap.put("status", "success");
205
+        return modelMap;
206
+    }
207
+
208
+    /**
209
+     * 根据熏蒸id查询施药数据
210
+     * @param id 主键id
211
+     * @return
212
+     */
213
+    @RequestMapping(value="/geByFumigationId", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
214
+    @ApiOperation(value="根据熏蒸id查询施药数据", notes = "根据熏蒸id查询施药数据")
215
+    @ApiImplicitParams({
216
+            @ApiImplicitParam(name = "fumigationId", value = "熏蒸id", paramType = "query")
217
+    })
218
+    public List<TFumigationPesticide> geByFumigationId(String fumigationId) {
219
+        TFumigationPesticideExample example = new TFumigationPesticideExample();
220
+        TFumigationPesticideExample.Criteria criteria = example.createCriteria();
221
+        criteria.andFumigationIdEqualTo(fumigationId);
222
+
223
+        List<TFumigationPesticide> tFumigationPesticides = pesticidePlanService.getFumigationPesticideList(example);
224
+
225
+        return tFumigationPesticides;
226
+    }
227
+
228
+    /**
229
+     * 施药方案状态提交
230
+     *
231
+     * @param id 数据ID
232
+     * @return
233
+     */
234
+    @RequestMapping(value="/submit",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
235
+    @ApiOperation(value="施药方案状态提交", notes = "施药方案状态提交")
236
+    @ApiImplicitParams({
237
+            @ApiImplicitParam(name = "id", value = "数据ID", paramType = "form"),
238
+            @ApiImplicitParam(name = "approvalStatus", value = "状态", paramType = "form")
239
+    })
240
+    public Map<String, Object> submit(String id, Integer approvalStatus) {
241
+        Map<String,Object> modelMap = new HashMap<>();
242
+        try {
243
+            pesticidePlanService.submit(id, approvalStatus);
244
+        } catch (Exception e) {
245
+            e.printStackTrace();
246
+        }
247
+
248
+        modelMap.put("status", "success");
249
+        return modelMap;
250
+    }
251
+}

+ 37 - 0
src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationAfterMapper.java

@@ -0,0 +1,37 @@
1
+package com.chinaitop.depot.fumigation.mapper;
2
+
3
+import com.chinaitop.depot.fumigation.model.TFumigationAfter;
4
+import com.chinaitop.depot.fumigation.model.TFumigationAfterExample;
5
+import java.util.List;
6
+import java.util.Map;
7
+
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+public interface TFumigationAfterMapper {
11
+    int countByExample(TFumigationAfterExample example);
12
+
13
+    int deleteByExample(TFumigationAfterExample example);
14
+
15
+    int deleteByPrimaryKey(String id);
16
+
17
+    int insert(TFumigationAfter record);
18
+
19
+    int insertSelective(TFumigationAfter record);
20
+
21
+    List<TFumigationAfter> selectByExample(TFumigationAfterExample example);
22
+
23
+    TFumigationAfter selectByPrimaryKey(String id);
24
+
25
+    int updateByExampleSelective(@Param("record") TFumigationAfter record, @Param("example") TFumigationAfterExample example);
26
+
27
+    int updateByExample(@Param("record") TFumigationAfter record, @Param("example") TFumigationAfterExample example);
28
+
29
+    int updateByPrimaryKeySelective(TFumigationAfter record);
30
+
31
+    int updateByPrimaryKey(TFumigationAfter record);
32
+
33
+    List<Map<String,Object>> getFumigationAfterList(Map<String, Object> map);
34
+
35
+    //获取作业列表
36
+    List<Map<String,Object>> selectHomeWorkQueryList(Map<String, Object> map);
37
+}

+ 622 - 0
src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationAfterMapper.xml

@@ -0,0 +1,622 @@
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.fumigation.mapper.TFumigationAfterMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.fumigation.model.TFumigationAfter" >
5
+    <id column="id" property="id" jdbcType="VARCHAR" />
6
+    <result column="house_id" property="houseId" jdbcType="INTEGER" />
7
+    <result column="fumigation_id" property="fumigationId" jdbcType="VARCHAR" />
8
+    <result column="residue_collection_time" property="residueCollectionTime" jdbcType="VARCHAR" />
9
+    <result column="number_operations_collected" property="numberOperationsCollected" jdbcType="VARCHAR" />
10
+    <result column="residue_collection_method" property="residueCollectionMethod" jdbcType="VARCHAR" />
11
+    <result column="collect_job_approver" property="collectJobApprover" jdbcType="VARCHAR" />
12
+    <result column="residue_treatment_measures" property="residueTreatmentMeasures" jdbcType="VARCHAR" />
13
+    <result column="number_residue_treatment" property="numberResidueTreatment" jdbcType="VARCHAR" />
14
+    <result column="residue_disposal_approver" property="residueDisposalApprover" jdbcType="VARCHAR" />
15
+    <result column="detection_live_worms" property="detectionLiveWorms" jdbcType="VARCHAR" />
16
+    <result column="population_density" property="populationDensity" jdbcType="VARCHAR" />
17
+    <result column="sampling_culture_temperature" property="samplingCultureTemperature" jdbcType="VARCHAR" />
18
+    <result column="sampling_culture_humidity" property="samplingCultureHumidity" jdbcType="VARCHAR" />
19
+    <result column="sampling_culture_half_months" property="samplingCultureHalfMonths" jdbcType="VARCHAR" />
20
+    <result column="sampling_culture_month_survival" property="samplingCultureMonthSurvival" jdbcType="INTEGER" />
21
+    <result column="sampling_culture_month_half" property="samplingCultureMonthHalf" jdbcType="VARCHAR" />
22
+    <result column="kill_insect_rate" property="killInsectRate" jdbcType="VARCHAR" />
23
+    <result column="check_insect_cage_time" property="checkInsectCageTime" jdbcType="TIMESTAMP" />
24
+    <result column="insect_cage_kill_rate" property="insectCageKillRate" jdbcType="VARCHAR" />
25
+    <result column="effect_analysis" property="effectAnalysis" jdbcType="VARCHAR" />
26
+    <result column="creater" property="creater" jdbcType="INTEGER" />
27
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
28
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
29
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
30
+    <result column="delete_state" property="deleteState" jdbcType="VARCHAR" />
31
+    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
32
+  </resultMap>
33
+  <sql id="Example_Where_Clause" >
34
+    <where >
35
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
36
+        <if test="criteria.valid" >
37
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
38
+            <foreach collection="criteria.criteria" item="criterion" >
39
+              <choose >
40
+                <when test="criterion.noValue" >
41
+                  and ${criterion.condition}
42
+                </when>
43
+                <when test="criterion.singleValue" >
44
+                  and ${criterion.condition} #{criterion.value}
45
+                </when>
46
+                <when test="criterion.betweenValue" >
47
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
48
+                </when>
49
+                <when test="criterion.listValue" >
50
+                  and ${criterion.condition}
51
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
52
+                    #{listItem}
53
+                  </foreach>
54
+                </when>
55
+              </choose>
56
+            </foreach>
57
+          </trim>
58
+        </if>
59
+      </foreach>
60
+    </where>
61
+  </sql>
62
+  <sql id="Update_By_Example_Where_Clause" >
63
+    <where >
64
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
65
+        <if test="criteria.valid" >
66
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
67
+            <foreach collection="criteria.criteria" item="criterion" >
68
+              <choose >
69
+                <when test="criterion.noValue" >
70
+                  and ${criterion.condition}
71
+                </when>
72
+                <when test="criterion.singleValue" >
73
+                  and ${criterion.condition} #{criterion.value}
74
+                </when>
75
+                <when test="criterion.betweenValue" >
76
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
77
+                </when>
78
+                <when test="criterion.listValue" >
79
+                  and ${criterion.condition}
80
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
81
+                    #{listItem}
82
+                  </foreach>
83
+                </when>
84
+              </choose>
85
+            </foreach>
86
+          </trim>
87
+        </if>
88
+      </foreach>
89
+    </where>
90
+  </sql>
91
+  <sql id="Base_Column_List" >
92
+    id, house_id, fumigation_id, residue_collection_time, number_operations_collected, 
93
+    residue_collection_method, collect_job_approver, residue_treatment_measures, number_residue_treatment, 
94
+    residue_disposal_approver, detection_live_worms, population_density, sampling_culture_temperature, 
95
+    sampling_culture_humidity, sampling_culture_half_months, sampling_culture_month_survival, 
96
+    sampling_culture_month_half, kill_insect_rate, check_insect_cage_time, insect_cage_kill_rate, 
97
+    effect_analysis, creater, create_time, update_time, org_id, delete_state, updatetime
98
+  </sql>
99
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.fumigation.model.TFumigationAfterExample" >
100
+    select
101
+    <if test="distinct" >
102
+      distinct
103
+    </if>
104
+    <include refid="Base_Column_List" />
105
+    from t_fumigation_after
106
+    <if test="_parameter != null" >
107
+      <include refid="Example_Where_Clause" />
108
+    </if>
109
+    <if test="orderByClause != null" >
110
+      order by ${orderByClause}
111
+    </if>
112
+  </select>
113
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
114
+    select 
115
+    <include refid="Base_Column_List" />
116
+    from t_fumigation_after
117
+    where id = #{id,jdbcType=VARCHAR}
118
+  </select>
119
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
120
+    delete from t_fumigation_after
121
+    where id = #{id,jdbcType=VARCHAR}
122
+  </delete>
123
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.fumigation.model.TFumigationAfterExample" >
124
+    delete from t_fumigation_after
125
+    <if test="_parameter != null" >
126
+      <include refid="Example_Where_Clause" />
127
+    </if>
128
+  </delete>
129
+  <insert id="insert" parameterType="com.chinaitop.depot.fumigation.model.TFumigationAfter" >
130
+    insert into t_fumigation_after (id, house_id, fumigation_id, 
131
+      residue_collection_time, number_operations_collected, 
132
+      residue_collection_method, collect_job_approver, 
133
+      residue_treatment_measures, number_residue_treatment, 
134
+      residue_disposal_approver, detection_live_worms, 
135
+      population_density, sampling_culture_temperature, 
136
+      sampling_culture_humidity, sampling_culture_half_months, 
137
+      sampling_culture_month_survival, sampling_culture_month_half, 
138
+      kill_insect_rate, check_insect_cage_time, 
139
+      insect_cage_kill_rate, effect_analysis, creater, 
140
+      create_time, update_time, org_id, 
141
+      delete_state, updatetime)
142
+    values (#{id,jdbcType=VARCHAR}, #{houseId,jdbcType=INTEGER}, #{fumigationId,jdbcType=VARCHAR}, 
143
+      #{residueCollectionTime,jdbcType=VARCHAR}, #{numberOperationsCollected,jdbcType=VARCHAR}, 
144
+      #{residueCollectionMethod,jdbcType=VARCHAR}, #{collectJobApprover,jdbcType=VARCHAR}, 
145
+      #{residueTreatmentMeasures,jdbcType=VARCHAR}, #{numberResidueTreatment,jdbcType=VARCHAR}, 
146
+      #{residueDisposalApprover,jdbcType=VARCHAR}, #{detectionLiveWorms,jdbcType=VARCHAR}, 
147
+      #{populationDensity,jdbcType=VARCHAR}, #{samplingCultureTemperature,jdbcType=VARCHAR}, 
148
+      #{samplingCultureHumidity,jdbcType=VARCHAR}, #{samplingCultureHalfMonths,jdbcType=VARCHAR}, 
149
+      #{samplingCultureMonthSurvival,jdbcType=INTEGER}, #{samplingCultureMonthHalf,jdbcType=VARCHAR}, 
150
+      #{killInsectRate,jdbcType=VARCHAR}, #{checkInsectCageTime,jdbcType=TIMESTAMP}, 
151
+      #{insectCageKillRate,jdbcType=VARCHAR}, #{effectAnalysis,jdbcType=VARCHAR}, #{creater,jdbcType=INTEGER}, 
152
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{orgId,jdbcType=INTEGER}, 
153
+      #{deleteState,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP})
154
+  </insert>
155
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.fumigation.model.TFumigationAfter" >
156
+    insert into t_fumigation_after
157
+    <trim prefix="(" suffix=")" suffixOverrides="," >
158
+      <if test="id != null" >
159
+        id,
160
+      </if>
161
+      <if test="houseId != null" >
162
+        house_id,
163
+      </if>
164
+      <if test="fumigationId != null" >
165
+        fumigation_id,
166
+      </if>
167
+      <if test="residueCollectionTime != null" >
168
+        residue_collection_time,
169
+      </if>
170
+      <if test="numberOperationsCollected != null" >
171
+        number_operations_collected,
172
+      </if>
173
+      <if test="residueCollectionMethod != null" >
174
+        residue_collection_method,
175
+      </if>
176
+      <if test="collectJobApprover != null" >
177
+        collect_job_approver,
178
+      </if>
179
+      <if test="residueTreatmentMeasures != null" >
180
+        residue_treatment_measures,
181
+      </if>
182
+      <if test="numberResidueTreatment != null" >
183
+        number_residue_treatment,
184
+      </if>
185
+      <if test="residueDisposalApprover != null" >
186
+        residue_disposal_approver,
187
+      </if>
188
+      <if test="detectionLiveWorms != null" >
189
+        detection_live_worms,
190
+      </if>
191
+      <if test="populationDensity != null" >
192
+        population_density,
193
+      </if>
194
+      <if test="samplingCultureTemperature != null" >
195
+        sampling_culture_temperature,
196
+      </if>
197
+      <if test="samplingCultureHumidity != null" >
198
+        sampling_culture_humidity,
199
+      </if>
200
+      <if test="samplingCultureHalfMonths != null" >
201
+        sampling_culture_half_months,
202
+      </if>
203
+      <if test="samplingCultureMonthSurvival != null" >
204
+        sampling_culture_month_survival,
205
+      </if>
206
+      <if test="samplingCultureMonthHalf != null" >
207
+        sampling_culture_month_half,
208
+      </if>
209
+      <if test="killInsectRate != null" >
210
+        kill_insect_rate,
211
+      </if>
212
+      <if test="checkInsectCageTime != null" >
213
+        check_insect_cage_time,
214
+      </if>
215
+      <if test="insectCageKillRate != null" >
216
+        insect_cage_kill_rate,
217
+      </if>
218
+      <if test="effectAnalysis != null" >
219
+        effect_analysis,
220
+      </if>
221
+      <if test="creater != null" >
222
+        creater,
223
+      </if>
224
+      <if test="createTime != null" >
225
+        create_time,
226
+      </if>
227
+      <if test="updateTime != null" >
228
+        update_time,
229
+      </if>
230
+      <if test="orgId != null" >
231
+        org_id,
232
+      </if>
233
+      <if test="deleteState != null" >
234
+        delete_state,
235
+      </if>
236
+      <if test="updatetime != null" >
237
+        updatetime,
238
+      </if>
239
+    </trim>
240
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
241
+      <if test="id != null" >
242
+        #{id,jdbcType=VARCHAR},
243
+      </if>
244
+      <if test="houseId != null" >
245
+        #{houseId,jdbcType=INTEGER},
246
+      </if>
247
+      <if test="fumigationId != null" >
248
+        #{fumigationId,jdbcType=VARCHAR},
249
+      </if>
250
+      <if test="residueCollectionTime != null" >
251
+        #{residueCollectionTime,jdbcType=VARCHAR},
252
+      </if>
253
+      <if test="numberOperationsCollected != null" >
254
+        #{numberOperationsCollected,jdbcType=VARCHAR},
255
+      </if>
256
+      <if test="residueCollectionMethod != null" >
257
+        #{residueCollectionMethod,jdbcType=VARCHAR},
258
+      </if>
259
+      <if test="collectJobApprover != null" >
260
+        #{collectJobApprover,jdbcType=VARCHAR},
261
+      </if>
262
+      <if test="residueTreatmentMeasures != null" >
263
+        #{residueTreatmentMeasures,jdbcType=VARCHAR},
264
+      </if>
265
+      <if test="numberResidueTreatment != null" >
266
+        #{numberResidueTreatment,jdbcType=VARCHAR},
267
+      </if>
268
+      <if test="residueDisposalApprover != null" >
269
+        #{residueDisposalApprover,jdbcType=VARCHAR},
270
+      </if>
271
+      <if test="detectionLiveWorms != null" >
272
+        #{detectionLiveWorms,jdbcType=VARCHAR},
273
+      </if>
274
+      <if test="populationDensity != null" >
275
+        #{populationDensity,jdbcType=VARCHAR},
276
+      </if>
277
+      <if test="samplingCultureTemperature != null" >
278
+        #{samplingCultureTemperature,jdbcType=VARCHAR},
279
+      </if>
280
+      <if test="samplingCultureHumidity != null" >
281
+        #{samplingCultureHumidity,jdbcType=VARCHAR},
282
+      </if>
283
+      <if test="samplingCultureHalfMonths != null" >
284
+        #{samplingCultureHalfMonths,jdbcType=VARCHAR},
285
+      </if>
286
+      <if test="samplingCultureMonthSurvival != null" >
287
+        #{samplingCultureMonthSurvival,jdbcType=INTEGER},
288
+      </if>
289
+      <if test="samplingCultureMonthHalf != null" >
290
+        #{samplingCultureMonthHalf,jdbcType=VARCHAR},
291
+      </if>
292
+      <if test="killInsectRate != null" >
293
+        #{killInsectRate,jdbcType=VARCHAR},
294
+      </if>
295
+      <if test="checkInsectCageTime != null" >
296
+        #{checkInsectCageTime,jdbcType=TIMESTAMP},
297
+      </if>
298
+      <if test="insectCageKillRate != null" >
299
+        #{insectCageKillRate,jdbcType=VARCHAR},
300
+      </if>
301
+      <if test="effectAnalysis != null" >
302
+        #{effectAnalysis,jdbcType=VARCHAR},
303
+      </if>
304
+      <if test="creater != null" >
305
+        #{creater,jdbcType=INTEGER},
306
+      </if>
307
+      <if test="createTime != null" >
308
+        #{createTime,jdbcType=TIMESTAMP},
309
+      </if>
310
+      <if test="updateTime != null" >
311
+        #{updateTime,jdbcType=TIMESTAMP},
312
+      </if>
313
+      <if test="orgId != null" >
314
+        #{orgId,jdbcType=INTEGER},
315
+      </if>
316
+      <if test="deleteState != null" >
317
+        #{deleteState,jdbcType=VARCHAR},
318
+      </if>
319
+      <if test="updatetime != null" >
320
+        #{updatetime,jdbcType=TIMESTAMP},
321
+      </if>
322
+    </trim>
323
+  </insert>
324
+  <select id="countByExample" parameterType="com.chinaitop.depot.fumigation.model.TFumigationAfterExample" resultType="java.lang.Integer" >
325
+    select count(*) from t_fumigation_after
326
+    <if test="_parameter != null" >
327
+      <include refid="Example_Where_Clause" />
328
+    </if>
329
+  </select>
330
+  <update id="updateByExampleSelective" parameterType="map" >
331
+    update t_fumigation_after
332
+    <set >
333
+      <if test="record.id != null" >
334
+        id = #{record.id,jdbcType=VARCHAR},
335
+      </if>
336
+      <if test="record.houseId != null" >
337
+        house_id = #{record.houseId,jdbcType=INTEGER},
338
+      </if>
339
+      <if test="record.fumigationId != null" >
340
+        fumigation_id = #{record.fumigationId,jdbcType=VARCHAR},
341
+      </if>
342
+      <if test="record.residueCollectionTime != null" >
343
+        residue_collection_time = #{record.residueCollectionTime,jdbcType=VARCHAR},
344
+      </if>
345
+      <if test="record.numberOperationsCollected != null" >
346
+        number_operations_collected = #{record.numberOperationsCollected,jdbcType=VARCHAR},
347
+      </if>
348
+      <if test="record.residueCollectionMethod != null" >
349
+        residue_collection_method = #{record.residueCollectionMethod,jdbcType=VARCHAR},
350
+      </if>
351
+      <if test="record.collectJobApprover != null" >
352
+        collect_job_approver = #{record.collectJobApprover,jdbcType=VARCHAR},
353
+      </if>
354
+      <if test="record.residueTreatmentMeasures != null" >
355
+        residue_treatment_measures = #{record.residueTreatmentMeasures,jdbcType=VARCHAR},
356
+      </if>
357
+      <if test="record.numberResidueTreatment != null" >
358
+        number_residue_treatment = #{record.numberResidueTreatment,jdbcType=VARCHAR},
359
+      </if>
360
+      <if test="record.residueDisposalApprover != null" >
361
+        residue_disposal_approver = #{record.residueDisposalApprover,jdbcType=VARCHAR},
362
+      </if>
363
+      <if test="record.detectionLiveWorms != null" >
364
+        detection_live_worms = #{record.detectionLiveWorms,jdbcType=VARCHAR},
365
+      </if>
366
+      <if test="record.populationDensity != null" >
367
+        population_density = #{record.populationDensity,jdbcType=VARCHAR},
368
+      </if>
369
+      <if test="record.samplingCultureTemperature != null" >
370
+        sampling_culture_temperature = #{record.samplingCultureTemperature,jdbcType=VARCHAR},
371
+      </if>
372
+      <if test="record.samplingCultureHumidity != null" >
373
+        sampling_culture_humidity = #{record.samplingCultureHumidity,jdbcType=VARCHAR},
374
+      </if>
375
+      <if test="record.samplingCultureHalfMonths != null" >
376
+        sampling_culture_half_months = #{record.samplingCultureHalfMonths,jdbcType=VARCHAR},
377
+      </if>
378
+      <if test="record.samplingCultureMonthSurvival != null" >
379
+        sampling_culture_month_survival = #{record.samplingCultureMonthSurvival,jdbcType=INTEGER},
380
+      </if>
381
+      <if test="record.samplingCultureMonthHalf != null" >
382
+        sampling_culture_month_half = #{record.samplingCultureMonthHalf,jdbcType=VARCHAR},
383
+      </if>
384
+      <if test="record.killInsectRate != null" >
385
+        kill_insect_rate = #{record.killInsectRate,jdbcType=VARCHAR},
386
+      </if>
387
+      <if test="record.checkInsectCageTime != null" >
388
+        check_insect_cage_time = #{record.checkInsectCageTime,jdbcType=TIMESTAMP},
389
+      </if>
390
+      <if test="record.insectCageKillRate != null" >
391
+        insect_cage_kill_rate = #{record.insectCageKillRate,jdbcType=VARCHAR},
392
+      </if>
393
+      <if test="record.effectAnalysis != null" >
394
+        effect_analysis = #{record.effectAnalysis,jdbcType=VARCHAR},
395
+      </if>
396
+      <if test="record.creater != null" >
397
+        creater = #{record.creater,jdbcType=INTEGER},
398
+      </if>
399
+      <if test="record.createTime != null" >
400
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
401
+      </if>
402
+      <if test="record.updateTime != null" >
403
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
404
+      </if>
405
+      <if test="record.orgId != null" >
406
+        org_id = #{record.orgId,jdbcType=INTEGER},
407
+      </if>
408
+      <if test="record.deleteState != null" >
409
+        delete_state = #{record.deleteState,jdbcType=VARCHAR},
410
+      </if>
411
+      <if test="record.updatetime != null" >
412
+        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
413
+      </if>
414
+    </set>
415
+    <if test="_parameter != null" >
416
+      <include refid="Update_By_Example_Where_Clause" />
417
+    </if>
418
+  </update>
419
+  <update id="updateByExample" parameterType="map" >
420
+    update t_fumigation_after
421
+    set id = #{record.id,jdbcType=VARCHAR},
422
+      house_id = #{record.houseId,jdbcType=INTEGER},
423
+      fumigation_id = #{record.fumigationId,jdbcType=VARCHAR},
424
+      residue_collection_time = #{record.residueCollectionTime,jdbcType=VARCHAR},
425
+      number_operations_collected = #{record.numberOperationsCollected,jdbcType=VARCHAR},
426
+      residue_collection_method = #{record.residueCollectionMethod,jdbcType=VARCHAR},
427
+      collect_job_approver = #{record.collectJobApprover,jdbcType=VARCHAR},
428
+      residue_treatment_measures = #{record.residueTreatmentMeasures,jdbcType=VARCHAR},
429
+      number_residue_treatment = #{record.numberResidueTreatment,jdbcType=VARCHAR},
430
+      residue_disposal_approver = #{record.residueDisposalApprover,jdbcType=VARCHAR},
431
+      detection_live_worms = #{record.detectionLiveWorms,jdbcType=VARCHAR},
432
+      population_density = #{record.populationDensity,jdbcType=VARCHAR},
433
+      sampling_culture_temperature = #{record.samplingCultureTemperature,jdbcType=VARCHAR},
434
+      sampling_culture_humidity = #{record.samplingCultureHumidity,jdbcType=VARCHAR},
435
+      sampling_culture_half_months = #{record.samplingCultureHalfMonths,jdbcType=VARCHAR},
436
+      sampling_culture_month_survival = #{record.samplingCultureMonthSurvival,jdbcType=INTEGER},
437
+      sampling_culture_month_half = #{record.samplingCultureMonthHalf,jdbcType=VARCHAR},
438
+      kill_insect_rate = #{record.killInsectRate,jdbcType=VARCHAR},
439
+      check_insect_cage_time = #{record.checkInsectCageTime,jdbcType=TIMESTAMP},
440
+      insect_cage_kill_rate = #{record.insectCageKillRate,jdbcType=VARCHAR},
441
+      effect_analysis = #{record.effectAnalysis,jdbcType=VARCHAR},
442
+      creater = #{record.creater,jdbcType=INTEGER},
443
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
444
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
445
+      org_id = #{record.orgId,jdbcType=INTEGER},
446
+      delete_state = #{record.deleteState,jdbcType=VARCHAR},
447
+      updatetime = #{record.updatetime,jdbcType=TIMESTAMP}
448
+    <if test="_parameter != null" >
449
+      <include refid="Update_By_Example_Where_Clause" />
450
+    </if>
451
+  </update>
452
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.fumigation.model.TFumigationAfter" >
453
+    update t_fumigation_after
454
+    <set >
455
+      <if test="houseId != null" >
456
+        house_id = #{houseId,jdbcType=INTEGER},
457
+      </if>
458
+      <if test="fumigationId != null" >
459
+        fumigation_id = #{fumigationId,jdbcType=VARCHAR},
460
+      </if>
461
+      <if test="residueCollectionTime != null" >
462
+        residue_collection_time = #{residueCollectionTime,jdbcType=VARCHAR},
463
+      </if>
464
+      <if test="numberOperationsCollected != null" >
465
+        number_operations_collected = #{numberOperationsCollected,jdbcType=VARCHAR},
466
+      </if>
467
+      <if test="residueCollectionMethod != null" >
468
+        residue_collection_method = #{residueCollectionMethod,jdbcType=VARCHAR},
469
+      </if>
470
+      <if test="collectJobApprover != null" >
471
+        collect_job_approver = #{collectJobApprover,jdbcType=VARCHAR},
472
+      </if>
473
+      <if test="residueTreatmentMeasures != null" >
474
+        residue_treatment_measures = #{residueTreatmentMeasures,jdbcType=VARCHAR},
475
+      </if>
476
+      <if test="numberResidueTreatment != null" >
477
+        number_residue_treatment = #{numberResidueTreatment,jdbcType=VARCHAR},
478
+      </if>
479
+      <if test="residueDisposalApprover != null" >
480
+        residue_disposal_approver = #{residueDisposalApprover,jdbcType=VARCHAR},
481
+      </if>
482
+      <if test="detectionLiveWorms != null" >
483
+        detection_live_worms = #{detectionLiveWorms,jdbcType=VARCHAR},
484
+      </if>
485
+      <if test="populationDensity != null" >
486
+        population_density = #{populationDensity,jdbcType=VARCHAR},
487
+      </if>
488
+      <if test="samplingCultureTemperature != null" >
489
+        sampling_culture_temperature = #{samplingCultureTemperature,jdbcType=VARCHAR},
490
+      </if>
491
+      <if test="samplingCultureHumidity != null" >
492
+        sampling_culture_humidity = #{samplingCultureHumidity,jdbcType=VARCHAR},
493
+      </if>
494
+      <if test="samplingCultureHalfMonths != null" >
495
+        sampling_culture_half_months = #{samplingCultureHalfMonths,jdbcType=VARCHAR},
496
+      </if>
497
+      <if test="samplingCultureMonthSurvival != null" >
498
+        sampling_culture_month_survival = #{samplingCultureMonthSurvival,jdbcType=INTEGER},
499
+      </if>
500
+      <if test="samplingCultureMonthHalf != null" >
501
+        sampling_culture_month_half = #{samplingCultureMonthHalf,jdbcType=VARCHAR},
502
+      </if>
503
+      <if test="killInsectRate != null" >
504
+        kill_insect_rate = #{killInsectRate,jdbcType=VARCHAR},
505
+      </if>
506
+      <if test="checkInsectCageTime != null" >
507
+        check_insect_cage_time = #{checkInsectCageTime,jdbcType=TIMESTAMP},
508
+      </if>
509
+      <if test="insectCageKillRate != null" >
510
+        insect_cage_kill_rate = #{insectCageKillRate,jdbcType=VARCHAR},
511
+      </if>
512
+      <if test="effectAnalysis != null" >
513
+        effect_analysis = #{effectAnalysis,jdbcType=VARCHAR},
514
+      </if>
515
+      <if test="creater != null" >
516
+        creater = #{creater,jdbcType=INTEGER},
517
+      </if>
518
+      <if test="createTime != null" >
519
+        create_time = #{createTime,jdbcType=TIMESTAMP},
520
+      </if>
521
+      <if test="updateTime != null" >
522
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
523
+      </if>
524
+      <if test="orgId != null" >
525
+        org_id = #{orgId,jdbcType=INTEGER},
526
+      </if>
527
+      <if test="deleteState != null" >
528
+        delete_state = #{deleteState,jdbcType=VARCHAR},
529
+      </if>
530
+      <if test="updatetime != null" >
531
+        updatetime = #{updatetime,jdbcType=TIMESTAMP},
532
+      </if>
533
+    </set>
534
+    where id = #{id,jdbcType=VARCHAR}
535
+  </update>
536
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.fumigation.model.TFumigationAfter" >
537
+    update t_fumigation_after
538
+    set house_id = #{houseId,jdbcType=INTEGER},
539
+      fumigation_id = #{fumigationId,jdbcType=VARCHAR},
540
+      residue_collection_time = #{residueCollectionTime,jdbcType=VARCHAR},
541
+      number_operations_collected = #{numberOperationsCollected,jdbcType=VARCHAR},
542
+      residue_collection_method = #{residueCollectionMethod,jdbcType=VARCHAR},
543
+      collect_job_approver = #{collectJobApprover,jdbcType=VARCHAR},
544
+      residue_treatment_measures = #{residueTreatmentMeasures,jdbcType=VARCHAR},
545
+      number_residue_treatment = #{numberResidueTreatment,jdbcType=VARCHAR},
546
+      residue_disposal_approver = #{residueDisposalApprover,jdbcType=VARCHAR},
547
+      detection_live_worms = #{detectionLiveWorms,jdbcType=VARCHAR},
548
+      population_density = #{populationDensity,jdbcType=VARCHAR},
549
+      sampling_culture_temperature = #{samplingCultureTemperature,jdbcType=VARCHAR},
550
+      sampling_culture_humidity = #{samplingCultureHumidity,jdbcType=VARCHAR},
551
+      sampling_culture_half_months = #{samplingCultureHalfMonths,jdbcType=VARCHAR},
552
+      sampling_culture_month_survival = #{samplingCultureMonthSurvival,jdbcType=INTEGER},
553
+      sampling_culture_month_half = #{samplingCultureMonthHalf,jdbcType=VARCHAR},
554
+      kill_insect_rate = #{killInsectRate,jdbcType=VARCHAR},
555
+      check_insect_cage_time = #{checkInsectCageTime,jdbcType=TIMESTAMP},
556
+      insect_cage_kill_rate = #{insectCageKillRate,jdbcType=VARCHAR},
557
+      effect_analysis = #{effectAnalysis,jdbcType=VARCHAR},
558
+      creater = #{creater,jdbcType=INTEGER},
559
+      create_time = #{createTime,jdbcType=TIMESTAMP},
560
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
561
+      org_id = #{orgId,jdbcType=INTEGER},
562
+      delete_state = #{deleteState,jdbcType=VARCHAR},
563
+      updatetime = #{updatetime,jdbcType=TIMESTAMP}
564
+    where id = #{id,jdbcType=VARCHAR}
565
+  </update>
566
+
567
+  <select id="getFumigationAfterList" parameterType="java.util.Map" resultType="java.util.HashMap">
568
+    SELECT
569
+    af.id,
570
+    plan.id fumigationId,
571
+    plan.house_id houseId,
572
+    plan.fumigation_type fumigationType,
573
+    pes.drug_name drugName,
574
+    af.creater,
575
+    af.create_time createTime
576
+    FROM
577
+    t_fumigation_after af
578
+    INNER JOIN t_fumigation_plan plan ON af.fumigation_id = plan.id
579
+    INNER JOIN t_fumigation_pesticide pes ON pes.fumigation_id = plan.id
580
+    WHERE af.delete_state = 1 AND af.org_id = #{orgId,jdbcType=INTEGER}
581
+    <if test="houseId != null" >
582
+      AND plan.house_id = #{houseId,jdbcType=INTEGER}
583
+    </if>
584
+  </select>
585
+  <select id="selectHomeWorkQueryList" parameterType="java.util.Map" resultType="java.util.HashMap">
586
+    SELECT
587
+    1 AS planType,
588
+    process.id,
589
+    plan.id AS fumigationId,
590
+    plan.house_id AS houseId,
591
+    process.create_time AS createTime,
592
+    process.creater,
593
+    plan.fumigation_type AS fumigationType,
594
+    pes.drug_name AS drugName
595
+    FROM
596
+    t_fumigation_process process
597
+    INNER JOIN t_fumigation_plan plan ON plan.id = process.fumigation_id
598
+    INNER JOIN t_fumigation_pesticide pes ON pes.fumigation_id = plan.id
599
+    WHERE process.delete_state = 1 AND process.org_id = #{orgId,jdbcType=INTEGER}
600
+    <if test="houseId != null" >
601
+      AND plan.house_id = #{houseId,jdbcType=INTEGER}
602
+    </if>
603
+    UNION ALL
604
+    SELECT
605
+    2 AS planType,
606
+    af.id,
607
+    plan.id AS fumigationId,
608
+    plan.house_id AS houseId,
609
+    af.create_time AS createTime,
610
+    af.creater,
611
+    plan.fumigation_type AS fumigationType,
612
+    pes.drug_name AS drugName
613
+    FROM
614
+    t_fumigation_after af
615
+    INNER JOIN t_fumigation_plan plan ON plan.id = af.fumigation_id
616
+    INNER JOIN t_fumigation_pesticide pes ON pes.fumigation_id = plan.id
617
+    WHERE af.delete_state = 1 AND af.org_id = #{orgId,jdbcType=INTEGER}
618
+    <if test="houseId != null" >
619
+      AND plan.house_id = #{houseId,jdbcType=INTEGER}
620
+    </if>
621
+  </select>
622
+</mapper>

+ 45 - 0
src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationForrecordMapper.java

@@ -0,0 +1,45 @@
1
+package com.chinaitop.depot.fumigation.mapper;
2
+
3
+import com.chinaitop.depot.fumigation.model.TFumigationForrecord;
4
+import com.chinaitop.depot.fumigation.model.TFumigationForrecordExample;
5
+import java.util.List;
6
+import java.util.Map;
7
+
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+public interface TFumigationForrecordMapper {
11
+    int countByExample(TFumigationForrecordExample example);
12
+
13
+    int deleteByExample(TFumigationForrecordExample example);
14
+
15
+    int deleteByPrimaryKey(String id);
16
+
17
+    int insert(TFumigationForrecord record);
18
+
19
+    int insertSelective(TFumigationForrecord record);
20
+
21
+    List<TFumigationForrecord> selectByExample(TFumigationForrecordExample example);
22
+
23
+    TFumigationForrecord selectByPrimaryKey(String id);
24
+
25
+    int updateByExampleSelective(@Param("record") TFumigationForrecord record, @Param("example") TFumigationForrecordExample example);
26
+
27
+    int updateByExample(@Param("record") TFumigationForrecord record, @Param("example") TFumigationForrecordExample example);
28
+
29
+    int updateByPrimaryKeySelective(TFumigationForrecord record);
30
+
31
+    int updateByPrimaryKey(TFumigationForrecord record);
32
+
33
+    List<Map<String,Object>> getFumigationForrecordList(Map<String, Object> map);
34
+
35
+    List<Map<String, Object>> getFumigationDateByIds(Map<String, Object> map);
36
+
37
+    List<Map<String, Object>> getFroRecordById(String forRecordId);//本地用备案详情
38
+    Map<String, Object> getFroRecordByIds(String forRecordId);//市级用备案数据
39
+    List<Map<String, Object>> getpersonnelByIds(String forRecordId);//市级用备案熏蒸人员数据
40
+    List<Map<String, Object>> getplanByIds(String forRecordId);//市级用熏蒸计划数据
41
+    List<Map<String, Object>> getpesticideByIds(String forRecordId);//市级用熏蒸计划数据
42
+    List<Map<String, Object>> getprocessByIds(String forRecordId);//市级用熏蒸过程数据
43
+    List<Map<String, Object>> getafterByIds(String forRecordId);//市级用熏蒸善后数据
44
+    String getLYXZ(String enumIds);//查询粮油性质
45
+}

+ 737 - 0
src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationForrecordMapper.xml

@@ -0,0 +1,737 @@
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.fumigation.mapper.TFumigationForrecordMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.fumigation.model.TFumigationForrecord" >
5
+    <id column="id" property="id" jdbcType="VARCHAR" />
6
+    <result column="operation_supervisor" property="operationSupervisor" jdbcType="VARCHAR" />
7
+    <result column="position" property="position" jdbcType="VARCHAR" />
8
+    <result column="contact_phone" property="contactPhone" jdbcType="VARCHAR" />
9
+    <result column="fumigation_start" property="fumigationStart" jdbcType="TIMESTAMP" />
10
+    <result column="fumigation_end" property="fumigationEnd" jdbcType="TIMESTAMP" />
11
+    <result column="stow_way" property="stowWay" jdbcType="VARCHAR" />
12
+    <result column="east" property="east" jdbcType="VARCHAR" />
13
+    <result column="south" property="south" jdbcType="VARCHAR" />
14
+    <result column="west" property="west" jdbcType="VARCHAR" />
15
+    <result column="north" property="north" jdbcType="VARCHAR" />
16
+    <result column="processing_instructions" property="processingInstructions" jdbcType="VARCHAR" />
17
+    <result column="enterprise_opinion" property="enterpriseOpinion" jdbcType="VARCHAR" />
18
+    <result column="organs_opinion" property="organsOpinion" jdbcType="VARCHAR" />
19
+    <result column="creater" property="creater" jdbcType="INTEGER" />
20
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
21
+    <result column="out_person" property="outPerson" jdbcType="VARCHAR" />
22
+    <result column="out_forrecord_time" property="outForrecordTime" jdbcType="TIMESTAMP" />
23
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
24
+    <result column="delete_state" property="deleteState" jdbcType="VARCHAR" />
25
+    <result column="updatetime" property="updatetime" 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, operation_supervisor, position, contact_phone, fumigation_start, fumigation_end,
87
+    stow_way, east, south, west, north, processing_instructions, enterprise_opinion,
88
+    organs_opinion, creater, create_time, out_person, out_forrecord_time, org_id, delete_state,
89
+    updatetime
90
+  </sql>
91
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.fumigation.model.TFumigationForrecordExample" >
92
+    select
93
+    <if test="distinct" >
94
+      distinct
95
+    </if>
96
+    <include refid="Base_Column_List" />
97
+    from t_fumigation_forrecord
98
+    <if test="_parameter != null" >
99
+      <include refid="Example_Where_Clause" />
100
+    </if>
101
+    <if test="orderByClause != null" >
102
+      order by ${orderByClause}
103
+    </if>
104
+  </select>
105
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
106
+    select
107
+    <include refid="Base_Column_List" />
108
+    from t_fumigation_forrecord
109
+    where id = #{id,jdbcType=VARCHAR}
110
+  </select>
111
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
112
+    delete from t_fumigation_forrecord
113
+    where id = #{id,jdbcType=VARCHAR}
114
+  </delete>
115
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.fumigation.model.TFumigationForrecordExample" >
116
+    delete from t_fumigation_forrecord
117
+    <if test="_parameter != null" >
118
+      <include refid="Example_Where_Clause" />
119
+    </if>
120
+  </delete>
121
+  <insert id="insert" parameterType="com.chinaitop.depot.fumigation.model.TFumigationForrecord" >
122
+    insert into t_fumigation_forrecord (id, operation_supervisor, position,
123
+      contact_phone, fumigation_start, fumigation_end,
124
+      stow_way, east, south,
125
+      west, north, processing_instructions,
126
+      enterprise_opinion, organs_opinion, creater,
127
+      create_time, out_person, out_forrecord_time,
128
+      org_id, delete_state, updatetime
129
+      )
130
+    values (#{id,jdbcType=VARCHAR}, #{operationSupervisor,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR},
131
+      #{contactPhone,jdbcType=VARCHAR}, #{fumigationStart,jdbcType=TIMESTAMP}, #{fumigationEnd,jdbcType=TIMESTAMP},
132
+      #{stowWay,jdbcType=VARCHAR}, #{east,jdbcType=VARCHAR}, #{south,jdbcType=VARCHAR},
133
+      #{west,jdbcType=VARCHAR}, #{north,jdbcType=VARCHAR}, #{processingInstructions,jdbcType=VARCHAR},
134
+      #{enterpriseOpinion,jdbcType=VARCHAR}, #{organsOpinion,jdbcType=VARCHAR}, #{creater,jdbcType=INTEGER},
135
+      #{createTime,jdbcType=TIMESTAMP}, #{outPerson,jdbcType=VARCHAR}, #{outForrecordTime,jdbcType=TIMESTAMP},
136
+      #{orgId,jdbcType=INTEGER}, #{deleteState,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP}
137
+      )
138
+  </insert>
139
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.fumigation.model.TFumigationForrecord" >
140
+    insert into t_fumigation_forrecord
141
+    <trim prefix="(" suffix=")" suffixOverrides="," >
142
+      <if test="id != null" >
143
+        id,
144
+      </if>
145
+      <if test="operationSupervisor != null" >
146
+        operation_supervisor,
147
+      </if>
148
+      <if test="position != null" >
149
+        position,
150
+      </if>
151
+      <if test="contactPhone != null" >
152
+        contact_phone,
153
+      </if>
154
+      <if test="fumigationStart != null" >
155
+        fumigation_start,
156
+      </if>
157
+      <if test="fumigationEnd != null" >
158
+        fumigation_end,
159
+      </if>
160
+      <if test="stowWay != null" >
161
+        stow_way,
162
+      </if>
163
+      <if test="east != null" >
164
+        east,
165
+      </if>
166
+      <if test="south != null" >
167
+        south,
168
+      </if>
169
+      <if test="west != null" >
170
+        west,
171
+      </if>
172
+      <if test="north != null" >
173
+        north,
174
+      </if>
175
+      <if test="processingInstructions != null" >
176
+        processing_instructions,
177
+      </if>
178
+      <if test="enterpriseOpinion != null" >
179
+        enterprise_opinion,
180
+      </if>
181
+      <if test="organsOpinion != null" >
182
+        organs_opinion,
183
+      </if>
184
+      <if test="creater != null" >
185
+        creater,
186
+      </if>
187
+      <if test="createTime != null" >
188
+        create_time,
189
+      </if>
190
+      <if test="outPerson != null" >
191
+        out_person,
192
+      </if>
193
+      <if test="outForrecordTime != null" >
194
+        out_forrecord_time,
195
+      </if>
196
+      <if test="orgId != null" >
197
+        org_id,
198
+      </if>
199
+      <if test="deleteState != null" >
200
+        delete_state,
201
+      </if>
202
+      <if test="updatetime != null" >
203
+        updatetime,
204
+      </if>
205
+    </trim>
206
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
207
+      <if test="id != null" >
208
+        #{id,jdbcType=VARCHAR},
209
+      </if>
210
+      <if test="operationSupervisor != null" >
211
+        #{operationSupervisor,jdbcType=VARCHAR},
212
+      </if>
213
+      <if test="position != null" >
214
+        #{position,jdbcType=VARCHAR},
215
+      </if>
216
+      <if test="contactPhone != null" >
217
+        #{contactPhone,jdbcType=VARCHAR},
218
+      </if>
219
+      <if test="fumigationStart != null" >
220
+        #{fumigationStart,jdbcType=TIMESTAMP},
221
+      </if>
222
+      <if test="fumigationEnd != null" >
223
+        #{fumigationEnd,jdbcType=TIMESTAMP},
224
+      </if>
225
+      <if test="stowWay != null" >
226
+        #{stowWay,jdbcType=VARCHAR},
227
+      </if>
228
+      <if test="east != null" >
229
+        #{east,jdbcType=VARCHAR},
230
+      </if>
231
+      <if test="south != null" >
232
+        #{south,jdbcType=VARCHAR},
233
+      </if>
234
+      <if test="west != null" >
235
+        #{west,jdbcType=VARCHAR},
236
+      </if>
237
+      <if test="north != null" >
238
+        #{north,jdbcType=VARCHAR},
239
+      </if>
240
+      <if test="processingInstructions != null" >
241
+        #{processingInstructions,jdbcType=VARCHAR},
242
+      </if>
243
+      <if test="enterpriseOpinion != null" >
244
+        #{enterpriseOpinion,jdbcType=VARCHAR},
245
+      </if>
246
+      <if test="organsOpinion != null" >
247
+        #{organsOpinion,jdbcType=VARCHAR},
248
+      </if>
249
+      <if test="creater != null" >
250
+        #{creater,jdbcType=INTEGER},
251
+      </if>
252
+      <if test="createTime != null" >
253
+        #{createTime,jdbcType=TIMESTAMP},
254
+      </if>
255
+      <if test="outPerson != null" >
256
+        #{outPerson,jdbcType=VARCHAR},
257
+      </if>
258
+      <if test="outForrecordTime != null" >
259
+        #{outForrecordTime,jdbcType=TIMESTAMP},
260
+      </if>
261
+      <if test="orgId != null" >
262
+        #{orgId,jdbcType=INTEGER},
263
+      </if>
264
+      <if test="deleteState != null" >
265
+        #{deleteState,jdbcType=VARCHAR},
266
+      </if>
267
+      <if test="updatetime != null" >
268
+        #{updatetime,jdbcType=TIMESTAMP},
269
+      </if>
270
+    </trim>
271
+  </insert>
272
+  <select id="countByExample" parameterType="com.chinaitop.depot.fumigation.model.TFumigationForrecordExample" resultType="java.lang.Integer" >
273
+    select count(*) from t_fumigation_forrecord
274
+    <if test="_parameter != null" >
275
+      <include refid="Example_Where_Clause" />
276
+    </if>
277
+  </select>
278
+  <update id="updateByExampleSelective" parameterType="map" >
279
+    update t_fumigation_forrecord
280
+    <set >
281
+      <if test="record.id != null" >
282
+        id = #{record.id,jdbcType=VARCHAR},
283
+      </if>
284
+      <if test="record.operationSupervisor != null" >
285
+        operation_supervisor = #{record.operationSupervisor,jdbcType=VARCHAR},
286
+      </if>
287
+      <if test="record.position != null" >
288
+        position = #{record.position,jdbcType=VARCHAR},
289
+      </if>
290
+      <if test="record.contactPhone != null" >
291
+        contact_phone = #{record.contactPhone,jdbcType=VARCHAR},
292
+      </if>
293
+      <if test="record.fumigationStart != null" >
294
+        fumigation_start = #{record.fumigationStart,jdbcType=TIMESTAMP},
295
+      </if>
296
+      <if test="record.fumigationEnd != null" >
297
+        fumigation_end = #{record.fumigationEnd,jdbcType=TIMESTAMP},
298
+      </if>
299
+      <if test="record.stowWay != null" >
300
+        stow_way = #{record.stowWay,jdbcType=VARCHAR},
301
+      </if>
302
+      <if test="record.east != null" >
303
+        east = #{record.east,jdbcType=VARCHAR},
304
+      </if>
305
+      <if test="record.south != null" >
306
+        south = #{record.south,jdbcType=VARCHAR},
307
+      </if>
308
+      <if test="record.west != null" >
309
+        west = #{record.west,jdbcType=VARCHAR},
310
+      </if>
311
+      <if test="record.north != null" >
312
+        north = #{record.north,jdbcType=VARCHAR},
313
+      </if>
314
+      <if test="record.processingInstructions != null" >
315
+        processing_instructions = #{record.processingInstructions,jdbcType=VARCHAR},
316
+      </if>
317
+      <if test="record.enterpriseOpinion != null" >
318
+        enterprise_opinion = #{record.enterpriseOpinion,jdbcType=VARCHAR},
319
+      </if>
320
+      <if test="record.organsOpinion != null" >
321
+        organs_opinion = #{record.organsOpinion,jdbcType=VARCHAR},
322
+      </if>
323
+      <if test="record.creater != null" >
324
+        creater = #{record.creater,jdbcType=INTEGER},
325
+      </if>
326
+      <if test="record.createTime != null" >
327
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
328
+      </if>
329
+      <if test="record.outPerson != null" >
330
+        out_person = #{record.outPerson,jdbcType=VARCHAR},
331
+      </if>
332
+      <if test="record.outForrecordTime != null" >
333
+        out_forrecord_time = #{record.outForrecordTime,jdbcType=TIMESTAMP},
334
+      </if>
335
+      <if test="record.orgId != null" >
336
+        org_id = #{record.orgId,jdbcType=INTEGER},
337
+      </if>
338
+      <if test="record.deleteState != null" >
339
+        delete_state = #{record.deleteState,jdbcType=VARCHAR},
340
+      </if>
341
+      <if test="record.updatetime != null" >
342
+        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
343
+      </if>
344
+    </set>
345
+    <if test="_parameter != null" >
346
+      <include refid="Update_By_Example_Where_Clause" />
347
+    </if>
348
+  </update>
349
+  <update id="updateByExample" parameterType="map" >
350
+    update t_fumigation_forrecord
351
+    set id = #{record.id,jdbcType=VARCHAR},
352
+      operation_supervisor = #{record.operationSupervisor,jdbcType=VARCHAR},
353
+      position = #{record.position,jdbcType=VARCHAR},
354
+      contact_phone = #{record.contactPhone,jdbcType=VARCHAR},
355
+      fumigation_start = #{record.fumigationStart,jdbcType=TIMESTAMP},
356
+      fumigation_end = #{record.fumigationEnd,jdbcType=TIMESTAMP},
357
+      stow_way = #{record.stowWay,jdbcType=VARCHAR},
358
+      east = #{record.east,jdbcType=VARCHAR},
359
+      south = #{record.south,jdbcType=VARCHAR},
360
+      west = #{record.west,jdbcType=VARCHAR},
361
+      north = #{record.north,jdbcType=VARCHAR},
362
+      processing_instructions = #{record.processingInstructions,jdbcType=VARCHAR},
363
+      enterprise_opinion = #{record.enterpriseOpinion,jdbcType=VARCHAR},
364
+      organs_opinion = #{record.organsOpinion,jdbcType=VARCHAR},
365
+      creater = #{record.creater,jdbcType=INTEGER},
366
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
367
+      out_person = #{record.outPerson,jdbcType=VARCHAR},
368
+      out_forrecord_time = #{record.outForrecordTime,jdbcType=TIMESTAMP},
369
+      org_id = #{record.orgId,jdbcType=INTEGER},
370
+      delete_state = #{record.deleteState,jdbcType=VARCHAR},
371
+      updatetime = #{record.updatetime,jdbcType=TIMESTAMP}
372
+    <if test="_parameter != null" >
373
+      <include refid="Update_By_Example_Where_Clause" />
374
+    </if>
375
+  </update>
376
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.fumigation.model.TFumigationForrecord" >
377
+    update t_fumigation_forrecord
378
+    <set >
379
+      <if test="operationSupervisor != null" >
380
+        operation_supervisor = #{operationSupervisor,jdbcType=VARCHAR},
381
+      </if>
382
+      <if test="position != null" >
383
+        position = #{position,jdbcType=VARCHAR},
384
+      </if>
385
+      <if test="contactPhone != null" >
386
+        contact_phone = #{contactPhone,jdbcType=VARCHAR},
387
+      </if>
388
+      <if test="fumigationStart != null" >
389
+        fumigation_start = #{fumigationStart,jdbcType=TIMESTAMP},
390
+      </if>
391
+      <if test="fumigationEnd != null" >
392
+        fumigation_end = #{fumigationEnd,jdbcType=TIMESTAMP},
393
+      </if>
394
+      <if test="stowWay != null" >
395
+        stow_way = #{stowWay,jdbcType=VARCHAR},
396
+      </if>
397
+      <if test="east != null" >
398
+        east = #{east,jdbcType=VARCHAR},
399
+      </if>
400
+      <if test="south != null" >
401
+        south = #{south,jdbcType=VARCHAR},
402
+      </if>
403
+      <if test="west != null" >
404
+        west = #{west,jdbcType=VARCHAR},
405
+      </if>
406
+      <if test="north != null" >
407
+        north = #{north,jdbcType=VARCHAR},
408
+      </if>
409
+      <if test="processingInstructions != null" >
410
+        processing_instructions = #{processingInstructions,jdbcType=VARCHAR},
411
+      </if>
412
+      <if test="enterpriseOpinion != null" >
413
+        enterprise_opinion = #{enterpriseOpinion,jdbcType=VARCHAR},
414
+      </if>
415
+      <if test="organsOpinion != null" >
416
+        organs_opinion = #{organsOpinion,jdbcType=VARCHAR},
417
+      </if>
418
+      <if test="creater != null" >
419
+        creater = #{creater,jdbcType=INTEGER},
420
+      </if>
421
+      <if test="createTime != null" >
422
+        create_time = #{createTime,jdbcType=TIMESTAMP},
423
+      </if>
424
+      <if test="outPerson != null" >
425
+        out_person = #{outPerson,jdbcType=VARCHAR},
426
+      </if>
427
+      <if test="outForrecordTime != null" >
428
+        out_forrecord_time = #{outForrecordTime,jdbcType=TIMESTAMP},
429
+      </if>
430
+      <if test="orgId != null" >
431
+        org_id = #{orgId,jdbcType=INTEGER},
432
+      </if>
433
+      <if test="deleteState != null" >
434
+        delete_state = #{deleteState,jdbcType=VARCHAR},
435
+      </if>
436
+      <if test="updatetime != null" >
437
+        updatetime = #{updatetime,jdbcType=TIMESTAMP},
438
+      </if>
439
+    </set>
440
+    where id = #{id,jdbcType=VARCHAR}
441
+  </update>
442
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.fumigation.model.TFumigationForrecord" >
443
+    update t_fumigation_forrecord
444
+    set operation_supervisor = #{operationSupervisor,jdbcType=VARCHAR},
445
+      position = #{position,jdbcType=VARCHAR},
446
+      contact_phone = #{contactPhone,jdbcType=VARCHAR},
447
+      fumigation_start = #{fumigationStart,jdbcType=TIMESTAMP},
448
+      fumigation_end = #{fumigationEnd,jdbcType=TIMESTAMP},
449
+      stow_way = #{stowWay,jdbcType=VARCHAR},
450
+      east = #{east,jdbcType=VARCHAR},
451
+      south = #{south,jdbcType=VARCHAR},
452
+      west = #{west,jdbcType=VARCHAR},
453
+      north = #{north,jdbcType=VARCHAR},
454
+      processing_instructions = #{processingInstructions,jdbcType=VARCHAR},
455
+      enterprise_opinion = #{enterpriseOpinion,jdbcType=VARCHAR},
456
+      organs_opinion = #{organsOpinion,jdbcType=VARCHAR},
457
+      creater = #{creater,jdbcType=INTEGER},
458
+      create_time = #{createTime,jdbcType=TIMESTAMP},
459
+      out_person = #{outPerson,jdbcType=VARCHAR},
460
+      out_forrecord_time = #{outForrecordTime,jdbcType=TIMESTAMP},
461
+      org_id = #{orgId,jdbcType=INTEGER},
462
+      delete_state = #{deleteState,jdbcType=VARCHAR},
463
+      updatetime = #{updatetime,jdbcType=TIMESTAMP}
464
+    where id = #{id,jdbcType=VARCHAR}
465
+  </update>
466
+
467
+  <select id="getFumigationForrecordList" parameterType="java.util.Map" resultType="java.util.HashMap">
468
+    SELECT
469
+    basics.storehouse_name AS houseId,
470
+    plan.id AS planIds,
471
+    (
472
+    CASE plan.state
473
+    WHEN '0' THEN
474
+    '审批驳回'
475
+    WHEN '1' THEN
476
+    '未提交'
477
+    WHEN '2' THEN
478
+    '待审批'
479
+    WHEN '3' THEN
480
+    '审批中'
481
+    WHEN '4' THEN
482
+    '审批中'
483
+    WHEN '5' THEN
484
+    '审批通过'
485
+    WHEN '6' THEN
486
+    '备案未提交'
487
+    WHEN '7' THEN
488
+    '备案中'
489
+    WHEN '8' THEN
490
+    '已备案'
491
+    WHEN '9' THEN
492
+    '作业中'
493
+    WHEN '10' THEN
494
+    '作业结束'
495
+    ELSE
496
+    '拒绝'
497
+    END
498
+    ) AS state,
499
+    plan.state stateType
500
+    FROM
501
+    t_fumigation_plan plan
502
+    LEFT JOIN basic_storehouse basics ON plan.house_id = basics.storehouse_id
503
+    WHERE
504
+    plan.for_record_id = #{forRecordId,jdbcType=VARCHAR}
505
+  </select>
506
+
507
+  <select id="getFroRecordById" resultType="java.util.HashMap" parameterType="java.lang.String" >
508
+    SELECT
509
+        plan.id planIds,
510
+        forrecord.id,
511
+        forrecord.create_time createTime,
512
+        forrecord.operation_supervisor operationSupervisor,
513
+        forrecord.position position,
514
+        forrecord.contact_phone contactPhone,
515
+        forrecord.fumigation_start fumigationStart,
516
+        forrecord.fumigation_end fumigationEnd,
517
+        forrecord.stow_way stowWay,
518
+        forrecord.east east,
519
+        forrecord.south south,
520
+        forrecord.west west,
521
+        forrecord.north north,
522
+        forrecord.processing_instructions processingInstructions,
523
+        forrecord.enterprise_opinion enterpriseOpinion,
524
+        forrecord.organs_opinion organsOpinion,
525
+        forrecord.creater creater,
526
+        forrecord.org_id orgId,
527
+        forrecord.delete_state deleteState
528
+    FROM
529
+        t_fumigation_forrecord forrecord
530
+    LEFT JOIN t_fumigation_plan plan ON plan.for_record_id = forrecord.id
531
+    WHERE
532
+        forrecord.id = #{forRecordId,jdbcType=VARCHAR}
533
+  </select>
534
+
535
+  <select id="getFroRecordByIds" resultType="java.util.Map" parameterType="java.lang.String" >
536
+    SELECT
537
+        forrecord.id,
538
+        forrecord.create_time createTime,
539
+        forrecord.operation_supervisor operationSupervisor,
540
+        forrecord.position position,
541
+        forrecord.contact_phone contactPhone,
542
+        forrecord.fumigation_start fumigationStart,
543
+        forrecord.fumigation_end fumigationEnd,
544
+        forrecord.stow_way stowWay,
545
+        forrecord.east east,
546
+        forrecord.south south,
547
+        forrecord.west west,
548
+        forrecord.north north,
549
+        forrecord.processing_instructions processingInstructions,
550
+        forrecord.enterprise_opinion enterpriseOpinion,
551
+        forrecord.organs_opinion organsOpinion,
552
+        users.real_name creater,
553
+        users.mobile createrPhone,
554
+        forrecord.org_id orgId,
555
+        forrecord.out_person outPerson,
556
+        forrecord.out_forrecord_time outForrecordTime,
557
+        forrecord.delete_state deleteState,
558
+        forrecord.updatetime updatetime
559
+    FROM
560
+        t_fumigation_forrecord forrecord
561
+    LEFT JOIN user_info users ON users.user_id = forrecord.creater
562
+    WHERE
563
+        forrecord.id = #{forRecordId,jdbcType=VARCHAR}
564
+  </select>
565
+  <select id="getpersonnelByIds" resultType="java.util.HashMap" parameterType="java.lang.String" >
566
+    SELECT
567
+        personnel.id,
568
+        personnel.forrecord_id forrecordId,
569
+        personnel.personnel_name personnelName,
570
+        personnel.professional_qualification professionalQualification,
571
+        personnel.physical_condition physicalCondition,
572
+        personnel.work_task workTask,
573
+        personnel.outside outside,
574
+        personnel.create_time createTime,
575
+        personnel.org_id orgId,
576
+        personnel.delete_state deleteState,
577
+        personnel.updatetime
578
+    FROM
579
+        t_fumigation_personnel personnel
580
+    WHERE
581
+        personnel.forrecord_id = #{forRecordId,jdbcType=VARCHAR}
582
+  </select>
583
+  <select id="getplanByIds" resultType="java.util.HashMap" parameterType="java.lang.String" >
584
+SELECT
585
+	*
586
+FROM
587
+	(
588
+		SELECT
589
+			row_number () over (PARTITION BY plan.id ORDER BY 1) rn,
590
+        plan.id, plan.for_record_id forRecordId, wares.hwbm houseId, house.storehouse_name houseName,
591
+        houstType.enumName houseType, plan.keeper, lspzenum.enumName grainKind,
592
+        plan.grain_count grainCount, plan.harvest_years harvestYears, plan.put_storage_years putStorageYears,
593
+        plan.fumigation_num fumigationNum, ones.enumName oneMethods, plan.one_dose oneDose, plan.one_date oneDate,
594
+        twos.enumName twoMethods, plan.two_dose twoDose, plan.two_date twoDate, threes.enumName threeMethods,
595
+        plan.three_dose threeDose, plan.three_date threeDate, fours.enumName fourMethods, plan.four_dose fourDose,
596
+        plan.four_date fourDate, plan.deliquescence, plan.bag_buried bagBuried, plan.test_tube testTube,
597
+        plan.applying_pesticide applyingPesticide, plan.fixed_decorate fixedDecorate, plan.mobile_decorate mobileDecorate,
598
+        plan.fixed, plan.mobile, plan.single_control singleControl, plan.double_control doubleControl, fumtype.enumName fumigationType,
599
+        plan.fumigation_number fumigationNumber, plan.fumigation_command fumigationCommand, plan.fumigation_operation fumigationOperation,
600
+        plan.fumiagtion_protective fumiagtionProtective, plan.fumiagtion_period_time fumiagtionPeriodTime, plan.fumiagtion_chief fumiagtionChief,
601
+        plan.expected, plan.points_work pointsWork, plan.note, plan.state, creater.enumName creater, plan.create_time createTime,
602
+        plan.plan_formulation planFormulation, plan.reported, plan.pesticide_qualification pesticideQualification, plan.qualification,
603
+        plan.approve_people approvePeople, plan.approve_department approveDepartment, plan.approve_note approveNote,
604
+        plan.approve_time approveTime, plan.grain_moisture grainMoisture, plan.delete_state deleteState, plan.org_id orgId,
605
+        plan.updatetime,infos.company_org_code tyshxydm
606
+    FROM
607
+        t_fumigation_plan plan
608
+    LEFT JOIN basic_enum lspzenum on lspzenum.enumId = plan.grain_kind
609
+    LEFT JOIN basic_enum fumtype on fumtype.enumId = plan.fumigation_type
610
+    LEFT JOIN basic_enum ones on ones.enumId = plan.one_methods
611
+    LEFT JOIN basic_enum twos on twos.enumId = plan.two_methods
612
+    LEFT JOIN basic_enum threes on threes.enumId = plan.three_methods
613
+    LEFT JOIN basic_enum fours on fours.enumId = plan.four_methods
614
+    LEFT JOIN basic_enum creater on creater.enumId = plan.creater
615
+    LEFT JOIN org_info infos on infos.org_id = plan.org_id
616
+    LEFT JOIN basic_warehouse wares on wares.storehouse_id = plan.house_id
617
+    LEFT JOIN basic_storehouse house on house.storehouse_id = plan.house_id
618
+    LEFT JOIN basic_enum houstType on houstType.enumId = house.storehouse_type
619
+    WHERE
620
+        plan.for_record_id = #{forRecordId,jdbcType=VARCHAR}
621
+        	) t1
622
+WHERE
623
+	t1.rn = 1
624
+  </select>
625
+  <select id="getpesticideByIds" resultType="java.util.HashMap" parameterType="java.lang.String" >
626
+    SELECT
627
+        pesticide.id, pesticide.fumigation_id fumigationId, pests.enumName majorInsectPests,pesticide.insect_density insectDensity,
628
+        pesticide.occurrence_place occurrencePlace, pesticide.insect_product_time insectProductTime, pesticide.drug_resistance drugResistance,
629
+        yjmc.enumName drugName, yjlx.enumName reagentType, pesticide.validity, pesticide.get_number getNumber,
630
+        pesticide.get_person getPerson, pesticide.get_time getTime, pesticide.drug_purity drugPurity, pesticide.use_drug_type useDrugType,
631
+        pesticide.plann_drug_start_time plannDrugStartTime, pesticide.plann_drug_use_up_time plannDrugUseUpTime, pesticide.plann_drug_count plannDrugCount,
632
+        pesticide.seal_type sealType, pesticide.setting_concentration setting_concentration, pesticide.concentration_check_type concentrationCheckType,
633
+        pesticide.bulk_gas_type bulkGasType, pesticide.drug_user_number drugUserNumber, pesticide.pesticide_operator pesticideOperator,
634
+        pesticide.creater, pesticide.create_time createTime, pesticide.state, pesticide.approve_people approvePeople,
635
+        pesticide.approve_department approveDepartment, pesticide.approve_note approveNote, pesticide.approve_time approveTime, pesticide.org_id orgId,
636
+        pesticide.delete_state deleteState, pesticide.updatetime
637
+    FROM
638
+        t_fumigation_pesticide pesticide
639
+        LEFT JOIN t_fumigation_plan plan ON plan.id = pesticide.fumigation_id
640
+        LEFT JOIN basic_enum pests on pests.enumId = pesticide.major_insect_pests
641
+        LEFT JOIN basic_enum yjmc on yjmc.enumId = pesticide.drug_name
642
+        LEFT JOIN basic_enum yjlx on yjlx.enumId = pesticide.reagent_type
643
+    WHERE
644
+        plan.for_record_id = #{forRecordId,jdbcType=VARCHAR}
645
+  </select>
646
+  <select id="getprocessByIds" resultType="java.util.HashMap" parameterType="java.lang.String" >
647
+    SELECT
648
+        process.id, process.fumigation_id fumigationId, process.concentration,
649
+        process.heap_medication heapMedication, process.space_medication spaceMedication,
650
+        process.deliquescence_method deliquescenceMethod, process.chamber_generator chamberGenerator, process.cylinders,
651
+        process.auxiliary_measures auxiliaryMeasures,process.air_respirator airRespirator, process.phosphine, process.oxygen_concentrations oxygenConcentrations,
652
+        process.phosphine_alarm_device phosphine_alarm_device, process.oxygen_alarm_device oxygen_alarm_device,
653
+        process.first_use_drug_time firstUseDrugTime, process.first_use_drug_unit firstUseDrugUnit, process.first_use_drug_count firstUseDrugCount,
654
+        process.circulation_use_time circulationUseTime,process.first_supplement_drug_time firstSupplementDrugTime, process.first_supplement_drug_count firstSupplementDrugCount,
655
+        process.last_supplement_drug_time lastSupplementDrugTime,process.last_supplement_drug_count lastSupplementDrugCount,
656
+        process.total_supplement_drug_times totalSupplementDrugTimes, process.total_supplement_drug_count totalSupplementDrugCount,
657
+        process.total_use_drug_count totalUseDrugCount, process.supplement_drug_type supplementDrugType, process.tonic_before tonicBefore,
658
+        process.target_concentration targetConcentration, process.calculate_dosage calculateDosage,process.actual_dosage actualDosage,
659
+        process.number_homework numberHomework, process.tonic_approver tonicApprover, process.field_controller fieldController,
660
+        process.peak_concentration peakConcentration,process.target_concentration_days targetConcentrationDays, process.leak_location leakLocation,
661
+        process.leak_position_remedy leakPositionRemedy, process.is_circulation_fine isCirculationFine,process.is_use_drug_equipment_fine isUseDrugEquipmentFine,
662
+        process.is_house_tightness_fine isHouseTightnessFine, process.is_aerial_work_platform_fine isAerialWorkPlatformFine,
663
+        process.is_phosphine_detector_fine isPhosphineDetectorFine, process.is_phosphine_alarm_fine isPhosphineAlarmFine, process.is_oxygen_detector_fine isOxygenDetectorFine,
664
+        process.is_air_respirator_fine isAirRespiratorFine,process.is_have_warning_sign_fine isHaveWarningSignFine, process.is_fire_extinguisher_fine isFireExtinguisherFine,
665
+        process.is_have_first_aid_kit isHaveFirstAidKit, process.bulk_start_time bulkStartTime,process.bulk_end_time bulkEndTime, process.perforated_date perforatedDate,
666
+        process.perforated_days perforatedDays, process.closed_time closedTime, process.ct_value ctValue, process.perforated_before perforatedBefore,
667
+        process.perforated_end perforated_end, process.bulk_gas_type bulkGasType, process.drug_residue_rate drugResidueRate, process.perforated_approver perforatedApprover,
668
+        process.dcsqtinfo_id dcsqtinfoId,process.task_state task_state, process.task_end_time taskEndTime, process.creater, process.create_time createTime,
669
+        process.org_id orgId, process.delete_state deleteState,process.data_source dataSource, process.updatetime
670
+    FROM
671
+        t_fumigation_process process
672
+        LEFT JOIN t_fumigation_plan plan ON plan.id = process.fumigation_id
673
+    WHERE
674
+        plan.for_record_id = #{forRecordId,jdbcType=VARCHAR}
675
+  </select>
676
+  <select id="getafterByIds" resultType="java.util.HashMap" parameterType="java.lang.String" >
677
+    SELECT
678
+        after.id, after.house_id houseId, after.fumigation_id fumigationId, after.residue_collection_time residueCollectionTime,
679
+        after.number_operations_collected numberOperations_collected,after.residue_collection_method residueCollectionMethod,
680
+        after.collect_job_approver collectJobApprover, after.residue_treatment_measures residueTreatmentMeasures,
681
+        after.number_residue_treatment numberResidueTreatment,after.residue_disposal_approver residueDisposalApprover,
682
+        after.detection_live_worms detectionLiveWorms, after.population_density populationDensity,
683
+        after.sampling_culture_temperature samplingCultureTemperature,after.sampling_culture_humidity samplingCultureHumidity,
684
+        after.sampling_culture_half_months samplingCultureHalfMonths, after.sampling_culture_month_survival samplingCultureMonthSurvival,
685
+        after.sampling_culture_month_half samplingCultureMonthHalf, after.kill_insect_rate killInsectRate,
686
+        after.check_insect_cage_time checkInsectCageTime, after.insect_cage_kill_rate insectCageKillRate,
687
+        after.effect_analysis effectAnalysis, after.creater, after.create_time createTime, after.org_id orgId,
688
+        after.delete_state deleteState, after.updatetime
689
+    FROM
690
+        t_fumigation_after after
691
+        LEFT JOIN t_fumigation_plan plan ON plan.id = after.fumigation_id
692
+    WHERE
693
+        plan.for_record_id = #{forRecordId,jdbcType=VARCHAR}
694
+  </select>
695
+
696
+  <select id="getFumigationDateByIds" resultType="java.util.Map" parameterType="java.util.Map" >
697
+    SELECT
698
+    plan.id planId,
699
+    pesticide.id pesticideId,
700
+    plan.create_time createTime,
701
+    house.storehouse_id storehouseId,
702
+    house.storehouse_name storehouseName,
703
+    house.storehouse_code storehouseCode,
704
+    plan.grain_kind grainKind,
705
+    plan.grain_count grainCount,
706
+    plan.grain_moisture grainMoisture,
707
+    pesticide.major_insect_pests majorInsectPests,
708
+    pesticide.insect_density insectDensity,
709
+    pesticide.drug_name drugName,
710
+    pesticide.plann_drug_count plannDrugCount,
711
+    pesticide.use_drug_type useDrugType,
712
+    pesticide.reagent_type reagentType,
713
+    pesticide.validity validity,
714
+    pesticide.get_number getNumber,
715
+    pesticide.get_person getPerson,
716
+    pesticide.get_time getTime
717
+    FROM
718
+    t_fumigation_plan plan
719
+    LEFT JOIN basic_storehouse house ON house.storehouse_id = plan.house_id
720
+    LEFT JOIN t_fumigation_pesticide pesticide ON pesticide.fumigation_id = plan.id
721
+    WHERE
722
+    plan.delete_state = 1
723
+    AND plan.id in
724
+    <foreach item="planId" index="index" collection="planIds" open="(" separator="," close=")">
725
+      #{planId}
726
+    </foreach>
727
+  </select>
728
+
729
+  <select id="getLYXZ" resultType="java.lang.String" parameterType="java.lang.String" >
730
+    SELECT
731
+    enums.enumName
732
+    FROM
733
+    basic_enum enums
734
+    WHERE
735
+    enums.enumId = #{enumIds,jdbcType=VARCHAR}
736
+  </select>
737
+</mapper>

+ 30 - 0
src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationPersonnelMapper.java

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

+ 308 - 0
src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationPersonnelMapper.xml

@@ -0,0 +1,308 @@
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.fumigation.mapper.TFumigationPersonnelMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.fumigation.model.TFumigationPersonnel" >
5
+    <id column="id" property="id" jdbcType="VARCHAR" />
6
+    <result column="forrecord_id" property="forrecordId" jdbcType="VARCHAR" />
7
+    <result column="personnel_name" property="personnelName" jdbcType="VARCHAR" />
8
+    <result column="professional_qualification" property="professionalQualification" jdbcType="VARCHAR" />
9
+    <result column="physical_condition" property="physicalCondition" jdbcType="VARCHAR" />
10
+    <result column="work_task" property="workTask" jdbcType="VARCHAR" />
11
+    <result column="outside" property="outside" jdbcType="VARCHAR" />
12
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
13
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
14
+    <result column="delete_state" property="deleteState" jdbcType="VARCHAR" />
15
+    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
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, forrecord_id, personnel_name, professional_qualification, physical_condition, 
77
+    work_task, outside, create_time, org_id, delete_state, updatetime
78
+  </sql>
79
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.fumigation.model.TFumigationPersonnelExample" >
80
+    select
81
+    <if test="distinct" >
82
+      distinct
83
+    </if>
84
+    <include refid="Base_Column_List" />
85
+    from t_fumigation_personnel
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.String" >
94
+    select 
95
+    <include refid="Base_Column_List" />
96
+    from t_fumigation_personnel
97
+    where id = #{id,jdbcType=VARCHAR}
98
+  </select>
99
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
100
+    delete from t_fumigation_personnel
101
+    where id = #{id,jdbcType=VARCHAR}
102
+  </delete>
103
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.fumigation.model.TFumigationPersonnelExample" >
104
+    delete from t_fumigation_personnel
105
+    <if test="_parameter != null" >
106
+      <include refid="Example_Where_Clause" />
107
+    </if>
108
+  </delete>
109
+  <insert id="insert" parameterType="com.chinaitop.depot.fumigation.model.TFumigationPersonnel" >
110
+    insert into t_fumigation_personnel (id, forrecord_id, personnel_name, 
111
+      professional_qualification, physical_condition, 
112
+      work_task, outside, create_time, 
113
+      org_id, delete_state, updatetime
114
+      )
115
+    values (#{id,jdbcType=VARCHAR}, #{forrecordId,jdbcType=VARCHAR}, #{personnelName,jdbcType=VARCHAR}, 
116
+      #{professionalQualification,jdbcType=VARCHAR}, #{physicalCondition,jdbcType=VARCHAR}, 
117
+      #{workTask,jdbcType=VARCHAR}, #{outside,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
118
+      #{orgId,jdbcType=INTEGER}, #{deleteState,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP}
119
+      )
120
+  </insert>
121
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.fumigation.model.TFumigationPersonnel" >
122
+    insert into t_fumigation_personnel
123
+    <trim prefix="(" suffix=")" suffixOverrides="," >
124
+      <if test="id != null" >
125
+        id,
126
+      </if>
127
+      <if test="forrecordId != null" >
128
+        forrecord_id,
129
+      </if>
130
+      <if test="personnelName != null" >
131
+        personnel_name,
132
+      </if>
133
+      <if test="professionalQualification != null" >
134
+        professional_qualification,
135
+      </if>
136
+      <if test="physicalCondition != null" >
137
+        physical_condition,
138
+      </if>
139
+      <if test="workTask != null" >
140
+        work_task,
141
+      </if>
142
+      <if test="outside != null" >
143
+        outside,
144
+      </if>
145
+      <if test="createTime != null" >
146
+        create_time,
147
+      </if>
148
+      <if test="orgId != null" >
149
+        org_id,
150
+      </if>
151
+      <if test="deleteState != null" >
152
+        delete_state,
153
+      </if>
154
+      <if test="updatetime != null" >
155
+        updatetime,
156
+      </if>
157
+    </trim>
158
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
159
+      <if test="id != null" >
160
+        #{id,jdbcType=VARCHAR},
161
+      </if>
162
+      <if test="forrecordId != null" >
163
+        #{forrecordId,jdbcType=VARCHAR},
164
+      </if>
165
+      <if test="personnelName != null" >
166
+        #{personnelName,jdbcType=VARCHAR},
167
+      </if>
168
+      <if test="professionalQualification != null" >
169
+        #{professionalQualification,jdbcType=VARCHAR},
170
+      </if>
171
+      <if test="physicalCondition != null" >
172
+        #{physicalCondition,jdbcType=VARCHAR},
173
+      </if>
174
+      <if test="workTask != null" >
175
+        #{workTask,jdbcType=VARCHAR},
176
+      </if>
177
+      <if test="outside != null" >
178
+        #{outside,jdbcType=VARCHAR},
179
+      </if>
180
+      <if test="createTime != null" >
181
+        #{createTime,jdbcType=TIMESTAMP},
182
+      </if>
183
+      <if test="orgId != null" >
184
+        #{orgId,jdbcType=INTEGER},
185
+      </if>
186
+      <if test="deleteState != null" >
187
+        #{deleteState,jdbcType=VARCHAR},
188
+      </if>
189
+      <if test="updatetime != null" >
190
+        #{updatetime,jdbcType=TIMESTAMP},
191
+      </if>
192
+    </trim>
193
+  </insert>
194
+  <select id="countByExample" parameterType="com.chinaitop.depot.fumigation.model.TFumigationPersonnelExample" resultType="java.lang.Integer" >
195
+    select count(*) from t_fumigation_personnel
196
+    <if test="_parameter != null" >
197
+      <include refid="Example_Where_Clause" />
198
+    </if>
199
+  </select>
200
+  <update id="updateByExampleSelective" parameterType="map" >
201
+    update t_fumigation_personnel
202
+    <set >
203
+      <if test="record.id != null" >
204
+        id = #{record.id,jdbcType=VARCHAR},
205
+      </if>
206
+      <if test="record.forrecordId != null" >
207
+        forrecord_id = #{record.forrecordId,jdbcType=VARCHAR},
208
+      </if>
209
+      <if test="record.personnelName != null" >
210
+        personnel_name = #{record.personnelName,jdbcType=VARCHAR},
211
+      </if>
212
+      <if test="record.professionalQualification != null" >
213
+        professional_qualification = #{record.professionalQualification,jdbcType=VARCHAR},
214
+      </if>
215
+      <if test="record.physicalCondition != null" >
216
+        physical_condition = #{record.physicalCondition,jdbcType=VARCHAR},
217
+      </if>
218
+      <if test="record.workTask != null" >
219
+        work_task = #{record.workTask,jdbcType=VARCHAR},
220
+      </if>
221
+      <if test="record.outside != null" >
222
+        outside = #{record.outside,jdbcType=VARCHAR},
223
+      </if>
224
+      <if test="record.createTime != null" >
225
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
226
+      </if>
227
+      <if test="record.orgId != null" >
228
+        org_id = #{record.orgId,jdbcType=INTEGER},
229
+      </if>
230
+      <if test="record.deleteState != null" >
231
+        delete_state = #{record.deleteState,jdbcType=VARCHAR},
232
+      </if>
233
+      <if test="record.updatetime != null" >
234
+        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
235
+      </if>
236
+    </set>
237
+    <if test="_parameter != null" >
238
+      <include refid="Update_By_Example_Where_Clause" />
239
+    </if>
240
+  </update>
241
+  <update id="updateByExample" parameterType="map" >
242
+    update t_fumigation_personnel
243
+    set id = #{record.id,jdbcType=VARCHAR},
244
+      forrecord_id = #{record.forrecordId,jdbcType=VARCHAR},
245
+      personnel_name = #{record.personnelName,jdbcType=VARCHAR},
246
+      professional_qualification = #{record.professionalQualification,jdbcType=VARCHAR},
247
+      physical_condition = #{record.physicalCondition,jdbcType=VARCHAR},
248
+      work_task = #{record.workTask,jdbcType=VARCHAR},
249
+      outside = #{record.outside,jdbcType=VARCHAR},
250
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
251
+      org_id = #{record.orgId,jdbcType=INTEGER},
252
+      delete_state = #{record.deleteState,jdbcType=VARCHAR},
253
+      updatetime = #{record.updatetime,jdbcType=TIMESTAMP}
254
+    <if test="_parameter != null" >
255
+      <include refid="Update_By_Example_Where_Clause" />
256
+    </if>
257
+  </update>
258
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.fumigation.model.TFumigationPersonnel" >
259
+    update t_fumigation_personnel
260
+    <set >
261
+      <if test="forrecordId != null" >
262
+        forrecord_id = #{forrecordId,jdbcType=VARCHAR},
263
+      </if>
264
+      <if test="personnelName != null" >
265
+        personnel_name = #{personnelName,jdbcType=VARCHAR},
266
+      </if>
267
+      <if test="professionalQualification != null" >
268
+        professional_qualification = #{professionalQualification,jdbcType=VARCHAR},
269
+      </if>
270
+      <if test="physicalCondition != null" >
271
+        physical_condition = #{physicalCondition,jdbcType=VARCHAR},
272
+      </if>
273
+      <if test="workTask != null" >
274
+        work_task = #{workTask,jdbcType=VARCHAR},
275
+      </if>
276
+      <if test="outside != null" >
277
+        outside = #{outside,jdbcType=VARCHAR},
278
+      </if>
279
+      <if test="createTime != null" >
280
+        create_time = #{createTime,jdbcType=TIMESTAMP},
281
+      </if>
282
+      <if test="orgId != null" >
283
+        org_id = #{orgId,jdbcType=INTEGER},
284
+      </if>
285
+      <if test="deleteState != null" >
286
+        delete_state = #{deleteState,jdbcType=VARCHAR},
287
+      </if>
288
+      <if test="updatetime != null" >
289
+        updatetime = #{updatetime,jdbcType=TIMESTAMP},
290
+      </if>
291
+    </set>
292
+    where id = #{id,jdbcType=VARCHAR}
293
+  </update>
294
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.fumigation.model.TFumigationPersonnel" >
295
+    update t_fumigation_personnel
296
+    set forrecord_id = #{forrecordId,jdbcType=VARCHAR},
297
+      personnel_name = #{personnelName,jdbcType=VARCHAR},
298
+      professional_qualification = #{professionalQualification,jdbcType=VARCHAR},
299
+      physical_condition = #{physicalCondition,jdbcType=VARCHAR},
300
+      work_task = #{workTask,jdbcType=VARCHAR},
301
+      outside = #{outside,jdbcType=VARCHAR},
302
+      create_time = #{createTime,jdbcType=TIMESTAMP},
303
+      org_id = #{orgId,jdbcType=INTEGER},
304
+      delete_state = #{deleteState,jdbcType=VARCHAR},
305
+      updatetime = #{updatetime,jdbcType=TIMESTAMP}
306
+    where id = #{id,jdbcType=VARCHAR}
307
+  </update>
308
+</mapper>

+ 36 - 0
src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationPesticideMapper.java

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

+ 745 - 0
src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationPesticideMapper.xml

@@ -0,0 +1,745 @@
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.fumigation.mapper.TFumigationPesticideMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.fumigation.model.TFumigationPesticide" >
5
+    <id column="id" property="id" jdbcType="VARCHAR" />
6
+    <result column="fumigation_id" property="fumigationId" jdbcType="VARCHAR" />
7
+    <result column="major_insect_pests" property="majorInsectPests" jdbcType="INTEGER" />
8
+    <result column="insect_density" property="insectDensity" jdbcType="VARCHAR" />
9
+    <result column="occurrence_place" property="occurrencePlace" jdbcType="VARCHAR" />
10
+    <result column="insect_product_time" property="insectProductTime" jdbcType="TIMESTAMP" />
11
+    <result column="drug_resistance" property="drugResistance" jdbcType="VARCHAR" />
12
+    <result column="drug_name" property="drugName" jdbcType="INTEGER" />
13
+    <result column="reagent_type" property="reagentType" jdbcType="VARCHAR" />
14
+    <result column="validity" property="validity" jdbcType="VARCHAR" />
15
+    <result column="get_number" property="getNumber" jdbcType="VARCHAR" />
16
+    <result column="get_person" property="getPerson" jdbcType="VARCHAR" />
17
+    <result column="get_time" property="getTime" jdbcType="TIMESTAMP" />
18
+    <result column="drug_purity" property="drugPurity" jdbcType="VARCHAR" />
19
+    <result column="use_drug_type" property="useDrugType" jdbcType="VARCHAR" />
20
+    <result column="plann_drug_start_time" property="plannDrugStartTime" jdbcType="TIMESTAMP" />
21
+    <result column="plann_drug_use_up_time" property="plannDrugUseUpTime" jdbcType="TIMESTAMP" />
22
+    <result column="plann_drug_count" property="plannDrugCount" jdbcType="VARCHAR" />
23
+    <result column="seal_type" property="sealType" jdbcType="VARCHAR" />
24
+    <result column="setting_concentration" property="settingConcentration" jdbcType="VARCHAR" />
25
+    <result column="concentration_check_type" property="concentrationCheckType" jdbcType="VARCHAR" />
26
+    <result column="bulk_gas_type" property="bulkGasType" jdbcType="VARCHAR" />
27
+    <result column="drug_user_number" property="drugUserNumber" jdbcType="INTEGER" />
28
+    <result column="pesticide_operator" property="pesticideOperator" jdbcType="VARCHAR" />
29
+    <result column="creater" property="creater" jdbcType="INTEGER" />
30
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
31
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
32
+    <result column="state" property="state" jdbcType="INTEGER" />
33
+    <result column="approve_people" property="approvePeople" jdbcType="VARCHAR" />
34
+    <result column="approve_department" property="approveDepartment" jdbcType="VARCHAR" />
35
+    <result column="approve_note" property="approveNote" jdbcType="VARCHAR" />
36
+    <result column="approve_time" property="approveTime" jdbcType="TIMESTAMP" />
37
+    <result column="org_id" property="orgId" jdbcType="VARCHAR" />
38
+    <result column="delete_state" property="deleteState" jdbcType="VARCHAR" />
39
+    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
40
+  </resultMap>
41
+  <sql id="Example_Where_Clause" >
42
+    <where >
43
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
44
+        <if test="criteria.valid" >
45
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
46
+            <foreach collection="criteria.criteria" item="criterion" >
47
+              <choose >
48
+                <when test="criterion.noValue" >
49
+                  and ${criterion.condition}
50
+                </when>
51
+                <when test="criterion.singleValue" >
52
+                  and ${criterion.condition} #{criterion.value}
53
+                </when>
54
+                <when test="criterion.betweenValue" >
55
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
56
+                </when>
57
+                <when test="criterion.listValue" >
58
+                  and ${criterion.condition}
59
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
60
+                    #{listItem}
61
+                  </foreach>
62
+                </when>
63
+              </choose>
64
+            </foreach>
65
+          </trim>
66
+        </if>
67
+      </foreach>
68
+    </where>
69
+  </sql>
70
+  <sql id="Update_By_Example_Where_Clause" >
71
+    <where >
72
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
73
+        <if test="criteria.valid" >
74
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
75
+            <foreach collection="criteria.criteria" item="criterion" >
76
+              <choose >
77
+                <when test="criterion.noValue" >
78
+                  and ${criterion.condition}
79
+                </when>
80
+                <when test="criterion.singleValue" >
81
+                  and ${criterion.condition} #{criterion.value}
82
+                </when>
83
+                <when test="criterion.betweenValue" >
84
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
85
+                </when>
86
+                <when test="criterion.listValue" >
87
+                  and ${criterion.condition}
88
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
89
+                    #{listItem}
90
+                  </foreach>
91
+                </when>
92
+              </choose>
93
+            </foreach>
94
+          </trim>
95
+        </if>
96
+      </foreach>
97
+    </where>
98
+  </sql>
99
+  <sql id="Base_Column_List" >
100
+    id, fumigation_id, major_insect_pests, insect_density, occurrence_place, insect_product_time, 
101
+    drug_resistance, drug_name, reagent_type, validity, get_number, get_person, get_time, 
102
+    drug_purity, use_drug_type, plann_drug_start_time, plann_drug_use_up_time, plann_drug_count, 
103
+    seal_type, setting_concentration, concentration_check_type, bulk_gas_type, drug_user_number, 
104
+    pesticide_operator, creater, create_time, update_time, state, approve_people, approve_department, 
105
+    approve_note, approve_time, org_id, delete_state, updatetime
106
+  </sql>
107
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.fumigation.model.TFumigationPesticideExample" >
108
+    select
109
+    <if test="distinct" >
110
+      distinct
111
+    </if>
112
+    <include refid="Base_Column_List" />
113
+    from t_fumigation_pesticide
114
+    <if test="_parameter != null" >
115
+      <include refid="Example_Where_Clause" />
116
+    </if>
117
+    <if test="orderByClause != null" >
118
+      order by ${orderByClause}
119
+    </if>
120
+  </select>
121
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
122
+    select 
123
+    <include refid="Base_Column_List" />
124
+    from t_fumigation_pesticide
125
+    where id = #{id,jdbcType=VARCHAR}
126
+  </select>
127
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
128
+    delete from t_fumigation_pesticide
129
+    where id = #{id,jdbcType=VARCHAR}
130
+  </delete>
131
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.fumigation.model.TFumigationPesticideExample" >
132
+    delete from t_fumigation_pesticide
133
+    <if test="_parameter != null" >
134
+      <include refid="Example_Where_Clause" />
135
+    </if>
136
+  </delete>
137
+  <insert id="insert" parameterType="com.chinaitop.depot.fumigation.model.TFumigationPesticide" >
138
+    insert into t_fumigation_pesticide (id, fumigation_id, major_insect_pests, 
139
+      insect_density, occurrence_place, insect_product_time, 
140
+      drug_resistance, drug_name, reagent_type, 
141
+      validity, get_number, get_person, 
142
+      get_time, drug_purity, use_drug_type, 
143
+      plann_drug_start_time, plann_drug_use_up_time, 
144
+      plann_drug_count, seal_type, setting_concentration, 
145
+      concentration_check_type, bulk_gas_type, drug_user_number, 
146
+      pesticide_operator, creater, create_time, 
147
+      update_time, state, approve_people, 
148
+      approve_department, approve_note, approve_time, 
149
+      org_id, delete_state, updatetime
150
+      )
151
+    values (#{id,jdbcType=VARCHAR}, #{fumigationId,jdbcType=VARCHAR}, #{majorInsectPests,jdbcType=INTEGER}, 
152
+      #{insectDensity,jdbcType=VARCHAR}, #{occurrencePlace,jdbcType=VARCHAR}, #{insectProductTime,jdbcType=TIMESTAMP}, 
153
+      #{drugResistance,jdbcType=VARCHAR}, #{drugName,jdbcType=INTEGER}, #{reagentType,jdbcType=VARCHAR}, 
154
+      #{validity,jdbcType=VARCHAR}, #{getNumber,jdbcType=VARCHAR}, #{getPerson,jdbcType=VARCHAR}, 
155
+      #{getTime,jdbcType=TIMESTAMP}, #{drugPurity,jdbcType=VARCHAR}, #{useDrugType,jdbcType=VARCHAR}, 
156
+      #{plannDrugStartTime,jdbcType=TIMESTAMP}, #{plannDrugUseUpTime,jdbcType=TIMESTAMP}, 
157
+      #{plannDrugCount,jdbcType=VARCHAR}, #{sealType,jdbcType=VARCHAR}, #{settingConcentration,jdbcType=VARCHAR}, 
158
+      #{concentrationCheckType,jdbcType=VARCHAR}, #{bulkGasType,jdbcType=VARCHAR}, #{drugUserNumber,jdbcType=INTEGER}, 
159
+      #{pesticideOperator,jdbcType=VARCHAR}, #{creater,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
160
+      #{updateTime,jdbcType=TIMESTAMP}, #{state,jdbcType=INTEGER}, #{approvePeople,jdbcType=VARCHAR}, 
161
+      #{approveDepartment,jdbcType=VARCHAR}, #{approveNote,jdbcType=VARCHAR}, #{approveTime,jdbcType=TIMESTAMP}, 
162
+      #{orgId,jdbcType=VARCHAR}, #{deleteState,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP}
163
+      )
164
+  </insert>
165
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.fumigation.model.TFumigationPesticide" >
166
+    insert into t_fumigation_pesticide
167
+    <trim prefix="(" suffix=")" suffixOverrides="," >
168
+      <if test="id != null" >
169
+        id,
170
+      </if>
171
+      <if test="fumigationId != null" >
172
+        fumigation_id,
173
+      </if>
174
+      <if test="majorInsectPests != null" >
175
+        major_insect_pests,
176
+      </if>
177
+      <if test="insectDensity != null" >
178
+        insect_density,
179
+      </if>
180
+      <if test="occurrencePlace != null" >
181
+        occurrence_place,
182
+      </if>
183
+      <if test="insectProductTime != null" >
184
+        insect_product_time,
185
+      </if>
186
+      <if test="drugResistance != null" >
187
+        drug_resistance,
188
+      </if>
189
+      <if test="drugName != null" >
190
+        drug_name,
191
+      </if>
192
+      <if test="reagentType != null" >
193
+        reagent_type,
194
+      </if>
195
+      <if test="validity != null" >
196
+        validity,
197
+      </if>
198
+      <if test="getNumber != null" >
199
+        get_number,
200
+      </if>
201
+      <if test="getPerson != null" >
202
+        get_person,
203
+      </if>
204
+      <if test="getTime != null" >
205
+        get_time,
206
+      </if>
207
+      <if test="drugPurity != null" >
208
+        drug_purity,
209
+      </if>
210
+      <if test="useDrugType != null" >
211
+        use_drug_type,
212
+      </if>
213
+      <if test="plannDrugStartTime != null" >
214
+        plann_drug_start_time,
215
+      </if>
216
+      <if test="plannDrugUseUpTime != null" >
217
+        plann_drug_use_up_time,
218
+      </if>
219
+      <if test="plannDrugCount != null" >
220
+        plann_drug_count,
221
+      </if>
222
+      <if test="sealType != null" >
223
+        seal_type,
224
+      </if>
225
+      <if test="settingConcentration != null" >
226
+        setting_concentration,
227
+      </if>
228
+      <if test="concentrationCheckType != null" >
229
+        concentration_check_type,
230
+      </if>
231
+      <if test="bulkGasType != null" >
232
+        bulk_gas_type,
233
+      </if>
234
+      <if test="drugUserNumber != null" >
235
+        drug_user_number,
236
+      </if>
237
+      <if test="pesticideOperator != null" >
238
+        pesticide_operator,
239
+      </if>
240
+      <if test="creater != null" >
241
+        creater,
242
+      </if>
243
+      <if test="createTime != null" >
244
+        create_time,
245
+      </if>
246
+      <if test="updateTime != null" >
247
+        update_time,
248
+      </if>
249
+      <if test="state != null" >
250
+        state,
251
+      </if>
252
+      <if test="approvePeople != null" >
253
+        approve_people,
254
+      </if>
255
+      <if test="approveDepartment != null" >
256
+        approve_department,
257
+      </if>
258
+      <if test="approveNote != null" >
259
+        approve_note,
260
+      </if>
261
+      <if test="approveTime != null" >
262
+        approve_time,
263
+      </if>
264
+      <if test="orgId != null" >
265
+        org_id,
266
+      </if>
267
+      <if test="deleteState != null" >
268
+        delete_state,
269
+      </if>
270
+      <if test="updatetime != null" >
271
+        updatetime,
272
+      </if>
273
+    </trim>
274
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
275
+      <if test="id != null" >
276
+        #{id,jdbcType=VARCHAR},
277
+      </if>
278
+      <if test="fumigationId != null" >
279
+        #{fumigationId,jdbcType=VARCHAR},
280
+      </if>
281
+      <if test="majorInsectPests != null" >
282
+        #{majorInsectPests,jdbcType=INTEGER},
283
+      </if>
284
+      <if test="insectDensity != null" >
285
+        #{insectDensity,jdbcType=VARCHAR},
286
+      </if>
287
+      <if test="occurrencePlace != null" >
288
+        #{occurrencePlace,jdbcType=VARCHAR},
289
+      </if>
290
+      <if test="insectProductTime != null" >
291
+        #{insectProductTime,jdbcType=TIMESTAMP},
292
+      </if>
293
+      <if test="drugResistance != null" >
294
+        #{drugResistance,jdbcType=VARCHAR},
295
+      </if>
296
+      <if test="drugName != null" >
297
+        #{drugName,jdbcType=INTEGER},
298
+      </if>
299
+      <if test="reagentType != null" >
300
+        #{reagentType,jdbcType=VARCHAR},
301
+      </if>
302
+      <if test="validity != null" >
303
+        #{validity,jdbcType=VARCHAR},
304
+      </if>
305
+      <if test="getNumber != null" >
306
+        #{getNumber,jdbcType=VARCHAR},
307
+      </if>
308
+      <if test="getPerson != null" >
309
+        #{getPerson,jdbcType=VARCHAR},
310
+      </if>
311
+      <if test="getTime != null" >
312
+        #{getTime,jdbcType=TIMESTAMP},
313
+      </if>
314
+      <if test="drugPurity != null" >
315
+        #{drugPurity,jdbcType=VARCHAR},
316
+      </if>
317
+      <if test="useDrugType != null" >
318
+        #{useDrugType,jdbcType=VARCHAR},
319
+      </if>
320
+      <if test="plannDrugStartTime != null" >
321
+        #{plannDrugStartTime,jdbcType=TIMESTAMP},
322
+      </if>
323
+      <if test="plannDrugUseUpTime != null" >
324
+        #{plannDrugUseUpTime,jdbcType=TIMESTAMP},
325
+      </if>
326
+      <if test="plannDrugCount != null" >
327
+        #{plannDrugCount,jdbcType=VARCHAR},
328
+      </if>
329
+      <if test="sealType != null" >
330
+        #{sealType,jdbcType=VARCHAR},
331
+      </if>
332
+      <if test="settingConcentration != null" >
333
+        #{settingConcentration,jdbcType=VARCHAR},
334
+      </if>
335
+      <if test="concentrationCheckType != null" >
336
+        #{concentrationCheckType,jdbcType=VARCHAR},
337
+      </if>
338
+      <if test="bulkGasType != null" >
339
+        #{bulkGasType,jdbcType=VARCHAR},
340
+      </if>
341
+      <if test="drugUserNumber != null" >
342
+        #{drugUserNumber,jdbcType=INTEGER},
343
+      </if>
344
+      <if test="pesticideOperator != null" >
345
+        #{pesticideOperator,jdbcType=VARCHAR},
346
+      </if>
347
+      <if test="creater != null" >
348
+        #{creater,jdbcType=INTEGER},
349
+      </if>
350
+      <if test="createTime != null" >
351
+        #{createTime,jdbcType=TIMESTAMP},
352
+      </if>
353
+      <if test="updateTime != null" >
354
+        #{updateTime,jdbcType=TIMESTAMP},
355
+      </if>
356
+      <if test="state != null" >
357
+        #{state,jdbcType=INTEGER},
358
+      </if>
359
+      <if test="approvePeople != null" >
360
+        #{approvePeople,jdbcType=VARCHAR},
361
+      </if>
362
+      <if test="approveDepartment != null" >
363
+        #{approveDepartment,jdbcType=VARCHAR},
364
+      </if>
365
+      <if test="approveNote != null" >
366
+        #{approveNote,jdbcType=VARCHAR},
367
+      </if>
368
+      <if test="approveTime != null" >
369
+        #{approveTime,jdbcType=TIMESTAMP},
370
+      </if>
371
+      <if test="orgId != null" >
372
+        #{orgId,jdbcType=VARCHAR},
373
+      </if>
374
+      <if test="deleteState != null" >
375
+        #{deleteState,jdbcType=VARCHAR},
376
+      </if>
377
+      <if test="updatetime != null" >
378
+        #{updatetime,jdbcType=TIMESTAMP},
379
+      </if>
380
+    </trim>
381
+  </insert>
382
+  <select id="countByExample" parameterType="com.chinaitop.depot.fumigation.model.TFumigationPesticideExample" resultType="java.lang.Integer" >
383
+    select count(*) from t_fumigation_pesticide
384
+    <if test="_parameter != null" >
385
+      <include refid="Example_Where_Clause" />
386
+    </if>
387
+  </select>
388
+  <update id="updateByExampleSelective" parameterType="map" >
389
+    update t_fumigation_pesticide
390
+    <set >
391
+      <if test="record.id != null" >
392
+        id = #{record.id,jdbcType=VARCHAR},
393
+      </if>
394
+      <if test="record.fumigationId != null" >
395
+        fumigation_id = #{record.fumigationId,jdbcType=VARCHAR},
396
+      </if>
397
+      <if test="record.majorInsectPests != null" >
398
+        major_insect_pests = #{record.majorInsectPests,jdbcType=INTEGER},
399
+      </if>
400
+      <if test="record.insectDensity != null" >
401
+        insect_density = #{record.insectDensity,jdbcType=VARCHAR},
402
+      </if>
403
+      <if test="record.occurrencePlace != null" >
404
+        occurrence_place = #{record.occurrencePlace,jdbcType=VARCHAR},
405
+      </if>
406
+      <if test="record.insectProductTime != null" >
407
+        insect_product_time = #{record.insectProductTime,jdbcType=TIMESTAMP},
408
+      </if>
409
+      <if test="record.drugResistance != null" >
410
+        drug_resistance = #{record.drugResistance,jdbcType=VARCHAR},
411
+      </if>
412
+      <if test="record.drugName != null" >
413
+        drug_name = #{record.drugName,jdbcType=INTEGER},
414
+      </if>
415
+      <if test="record.reagentType != null" >
416
+        reagent_type = #{record.reagentType,jdbcType=VARCHAR},
417
+      </if>
418
+      <if test="record.validity != null" >
419
+        validity = #{record.validity,jdbcType=VARCHAR},
420
+      </if>
421
+      <if test="record.getNumber != null" >
422
+        get_number = #{record.getNumber,jdbcType=VARCHAR},
423
+      </if>
424
+      <if test="record.getPerson != null" >
425
+        get_person = #{record.getPerson,jdbcType=VARCHAR},
426
+      </if>
427
+      <if test="record.getTime != null" >
428
+        get_time = #{record.getTime,jdbcType=TIMESTAMP},
429
+      </if>
430
+      <if test="record.drugPurity != null" >
431
+        drug_purity = #{record.drugPurity,jdbcType=VARCHAR},
432
+      </if>
433
+      <if test="record.useDrugType != null" >
434
+        use_drug_type = #{record.useDrugType,jdbcType=VARCHAR},
435
+      </if>
436
+      <if test="record.plannDrugStartTime != null" >
437
+        plann_drug_start_time = #{record.plannDrugStartTime,jdbcType=TIMESTAMP},
438
+      </if>
439
+      <if test="record.plannDrugUseUpTime != null" >
440
+        plann_drug_use_up_time = #{record.plannDrugUseUpTime,jdbcType=TIMESTAMP},
441
+      </if>
442
+      <if test="record.plannDrugCount != null" >
443
+        plann_drug_count = #{record.plannDrugCount,jdbcType=VARCHAR},
444
+      </if>
445
+      <if test="record.sealType != null" >
446
+        seal_type = #{record.sealType,jdbcType=VARCHAR},
447
+      </if>
448
+      <if test="record.settingConcentration != null" >
449
+        setting_concentration = #{record.settingConcentration,jdbcType=VARCHAR},
450
+      </if>
451
+      <if test="record.concentrationCheckType != null" >
452
+        concentration_check_type = #{record.concentrationCheckType,jdbcType=VARCHAR},
453
+      </if>
454
+      <if test="record.bulkGasType != null" >
455
+        bulk_gas_type = #{record.bulkGasType,jdbcType=VARCHAR},
456
+      </if>
457
+      <if test="record.drugUserNumber != null" >
458
+        drug_user_number = #{record.drugUserNumber,jdbcType=INTEGER},
459
+      </if>
460
+      <if test="record.pesticideOperator != null" >
461
+        pesticide_operator = #{record.pesticideOperator,jdbcType=VARCHAR},
462
+      </if>
463
+      <if test="record.creater != null" >
464
+        creater = #{record.creater,jdbcType=INTEGER},
465
+      </if>
466
+      <if test="record.createTime != null" >
467
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
468
+      </if>
469
+      <if test="record.updateTime != null" >
470
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
471
+      </if>
472
+      <if test="record.state != null" >
473
+        state = #{record.state,jdbcType=INTEGER},
474
+      </if>
475
+      <if test="record.approvePeople != null" >
476
+        approve_people = #{record.approvePeople,jdbcType=VARCHAR},
477
+      </if>
478
+      <if test="record.approveDepartment != null" >
479
+        approve_department = #{record.approveDepartment,jdbcType=VARCHAR},
480
+      </if>
481
+      <if test="record.approveNote != null" >
482
+        approve_note = #{record.approveNote,jdbcType=VARCHAR},
483
+      </if>
484
+      <if test="record.approveTime != null" >
485
+        approve_time = #{record.approveTime,jdbcType=TIMESTAMP},
486
+      </if>
487
+      <if test="record.orgId != null" >
488
+        org_id = #{record.orgId,jdbcType=VARCHAR},
489
+      </if>
490
+      <if test="record.deleteState != null" >
491
+        delete_state = #{record.deleteState,jdbcType=VARCHAR},
492
+      </if>
493
+      <if test="record.updatetime != null" >
494
+        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
495
+      </if>
496
+    </set>
497
+    <if test="_parameter != null" >
498
+      <include refid="Update_By_Example_Where_Clause" />
499
+    </if>
500
+  </update>
501
+  <update id="updateByExample" parameterType="map" >
502
+    update t_fumigation_pesticide
503
+    set id = #{record.id,jdbcType=VARCHAR},
504
+      fumigation_id = #{record.fumigationId,jdbcType=VARCHAR},
505
+      major_insect_pests = #{record.majorInsectPests,jdbcType=INTEGER},
506
+      insect_density = #{record.insectDensity,jdbcType=VARCHAR},
507
+      occurrence_place = #{record.occurrencePlace,jdbcType=VARCHAR},
508
+      insect_product_time = #{record.insectProductTime,jdbcType=TIMESTAMP},
509
+      drug_resistance = #{record.drugResistance,jdbcType=VARCHAR},
510
+      drug_name = #{record.drugName,jdbcType=INTEGER},
511
+      reagent_type = #{record.reagentType,jdbcType=VARCHAR},
512
+      validity = #{record.validity,jdbcType=VARCHAR},
513
+      get_number = #{record.getNumber,jdbcType=VARCHAR},
514
+      get_person = #{record.getPerson,jdbcType=VARCHAR},
515
+      get_time = #{record.getTime,jdbcType=TIMESTAMP},
516
+      drug_purity = #{record.drugPurity,jdbcType=VARCHAR},
517
+      use_drug_type = #{record.useDrugType,jdbcType=VARCHAR},
518
+      plann_drug_start_time = #{record.plannDrugStartTime,jdbcType=TIMESTAMP},
519
+      plann_drug_use_up_time = #{record.plannDrugUseUpTime,jdbcType=TIMESTAMP},
520
+      plann_drug_count = #{record.plannDrugCount,jdbcType=VARCHAR},
521
+      seal_type = #{record.sealType,jdbcType=VARCHAR},
522
+      setting_concentration = #{record.settingConcentration,jdbcType=VARCHAR},
523
+      concentration_check_type = #{record.concentrationCheckType,jdbcType=VARCHAR},
524
+      bulk_gas_type = #{record.bulkGasType,jdbcType=VARCHAR},
525
+      drug_user_number = #{record.drugUserNumber,jdbcType=INTEGER},
526
+      pesticide_operator = #{record.pesticideOperator,jdbcType=VARCHAR},
527
+      creater = #{record.creater,jdbcType=INTEGER},
528
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
529
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
530
+      state = #{record.state,jdbcType=INTEGER},
531
+      approve_people = #{record.approvePeople,jdbcType=VARCHAR},
532
+      approve_department = #{record.approveDepartment,jdbcType=VARCHAR},
533
+      approve_note = #{record.approveNote,jdbcType=VARCHAR},
534
+      approve_time = #{record.approveTime,jdbcType=TIMESTAMP},
535
+      org_id = #{record.orgId,jdbcType=VARCHAR},
536
+      delete_state = #{record.deleteState,jdbcType=VARCHAR},
537
+      updatetime = #{record.updatetime,jdbcType=TIMESTAMP}
538
+    <if test="_parameter != null" >
539
+      <include refid="Update_By_Example_Where_Clause" />
540
+    </if>
541
+  </update>
542
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.fumigation.model.TFumigationPesticide" >
543
+    update t_fumigation_pesticide
544
+    <set >
545
+      <if test="fumigationId != null" >
546
+        fumigation_id = #{fumigationId,jdbcType=VARCHAR},
547
+      </if>
548
+      <if test="majorInsectPests != null" >
549
+        major_insect_pests = #{majorInsectPests,jdbcType=INTEGER},
550
+      </if>
551
+      <if test="insectDensity != null" >
552
+        insect_density = #{insectDensity,jdbcType=VARCHAR},
553
+      </if>
554
+      <if test="occurrencePlace != null" >
555
+        occurrence_place = #{occurrencePlace,jdbcType=VARCHAR},
556
+      </if>
557
+      <if test="insectProductTime != null" >
558
+        insect_product_time = #{insectProductTime,jdbcType=TIMESTAMP},
559
+      </if>
560
+      <if test="drugResistance != null" >
561
+        drug_resistance = #{drugResistance,jdbcType=VARCHAR},
562
+      </if>
563
+      <if test="drugName != null" >
564
+        drug_name = #{drugName,jdbcType=INTEGER},
565
+      </if>
566
+      <if test="reagentType != null" >
567
+        reagent_type = #{reagentType,jdbcType=VARCHAR},
568
+      </if>
569
+      <if test="validity != null" >
570
+        validity = #{validity,jdbcType=VARCHAR},
571
+      </if>
572
+      <if test="getNumber != null" >
573
+        get_number = #{getNumber,jdbcType=VARCHAR},
574
+      </if>
575
+      <if test="getPerson != null" >
576
+        get_person = #{getPerson,jdbcType=VARCHAR},
577
+      </if>
578
+      <if test="getTime != null" >
579
+        get_time = #{getTime,jdbcType=TIMESTAMP},
580
+      </if>
581
+      <if test="drugPurity != null" >
582
+        drug_purity = #{drugPurity,jdbcType=VARCHAR},
583
+      </if>
584
+      <if test="useDrugType != null" >
585
+        use_drug_type = #{useDrugType,jdbcType=VARCHAR},
586
+      </if>
587
+      <if test="plannDrugStartTime != null" >
588
+        plann_drug_start_time = #{plannDrugStartTime,jdbcType=TIMESTAMP},
589
+      </if>
590
+      <if test="plannDrugUseUpTime != null" >
591
+        plann_drug_use_up_time = #{plannDrugUseUpTime,jdbcType=TIMESTAMP},
592
+      </if>
593
+      <if test="plannDrugCount != null" >
594
+        plann_drug_count = #{plannDrugCount,jdbcType=VARCHAR},
595
+      </if>
596
+      <if test="sealType != null" >
597
+        seal_type = #{sealType,jdbcType=VARCHAR},
598
+      </if>
599
+      <if test="settingConcentration != null" >
600
+        setting_concentration = #{settingConcentration,jdbcType=VARCHAR},
601
+      </if>
602
+      <if test="concentrationCheckType != null" >
603
+        concentration_check_type = #{concentrationCheckType,jdbcType=VARCHAR},
604
+      </if>
605
+      <if test="bulkGasType != null" >
606
+        bulk_gas_type = #{bulkGasType,jdbcType=VARCHAR},
607
+      </if>
608
+      <if test="drugUserNumber != null" >
609
+        drug_user_number = #{drugUserNumber,jdbcType=INTEGER},
610
+      </if>
611
+      <if test="pesticideOperator != null" >
612
+        pesticide_operator = #{pesticideOperator,jdbcType=VARCHAR},
613
+      </if>
614
+      <if test="creater != null" >
615
+        creater = #{creater,jdbcType=INTEGER},
616
+      </if>
617
+      <if test="createTime != null" >
618
+        create_time = #{createTime,jdbcType=TIMESTAMP},
619
+      </if>
620
+      <if test="updateTime != null" >
621
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
622
+      </if>
623
+      <if test="state != null" >
624
+        state = #{state,jdbcType=INTEGER},
625
+      </if>
626
+      <if test="approvePeople != null" >
627
+        approve_people = #{approvePeople,jdbcType=VARCHAR},
628
+      </if>
629
+      <if test="approveDepartment != null" >
630
+        approve_department = #{approveDepartment,jdbcType=VARCHAR},
631
+      </if>
632
+      <if test="approveNote != null" >
633
+        approve_note = #{approveNote,jdbcType=VARCHAR},
634
+      </if>
635
+      <if test="approveTime != null" >
636
+        approve_time = #{approveTime,jdbcType=TIMESTAMP},
637
+      </if>
638
+      <if test="orgId != null" >
639
+        org_id = #{orgId,jdbcType=VARCHAR},
640
+      </if>
641
+      <if test="deleteState != null" >
642
+        delete_state = #{deleteState,jdbcType=VARCHAR},
643
+      </if>
644
+      <if test="updatetime != null" >
645
+        updatetime = #{updatetime,jdbcType=TIMESTAMP},
646
+      </if>
647
+    </set>
648
+    where id = #{id,jdbcType=VARCHAR}
649
+  </update>
650
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.fumigation.model.TFumigationPesticide" >
651
+    update t_fumigation_pesticide
652
+    set fumigation_id = #{fumigationId,jdbcType=VARCHAR},
653
+      major_insect_pests = #{majorInsectPests,jdbcType=INTEGER},
654
+      insect_density = #{insectDensity,jdbcType=VARCHAR},
655
+      occurrence_place = #{occurrencePlace,jdbcType=VARCHAR},
656
+      insect_product_time = #{insectProductTime,jdbcType=TIMESTAMP},
657
+      drug_resistance = #{drugResistance,jdbcType=VARCHAR},
658
+      drug_name = #{drugName,jdbcType=INTEGER},
659
+      reagent_type = #{reagentType,jdbcType=VARCHAR},
660
+      validity = #{validity,jdbcType=VARCHAR},
661
+      get_number = #{getNumber,jdbcType=VARCHAR},
662
+      get_person = #{getPerson,jdbcType=VARCHAR},
663
+      get_time = #{getTime,jdbcType=TIMESTAMP},
664
+      drug_purity = #{drugPurity,jdbcType=VARCHAR},
665
+      use_drug_type = #{useDrugType,jdbcType=VARCHAR},
666
+      plann_drug_start_time = #{plannDrugStartTime,jdbcType=TIMESTAMP},
667
+      plann_drug_use_up_time = #{plannDrugUseUpTime,jdbcType=TIMESTAMP},
668
+      plann_drug_count = #{plannDrugCount,jdbcType=VARCHAR},
669
+      seal_type = #{sealType,jdbcType=VARCHAR},
670
+      setting_concentration = #{settingConcentration,jdbcType=VARCHAR},
671
+      concentration_check_type = #{concentrationCheckType,jdbcType=VARCHAR},
672
+      bulk_gas_type = #{bulkGasType,jdbcType=VARCHAR},
673
+      drug_user_number = #{drugUserNumber,jdbcType=INTEGER},
674
+      pesticide_operator = #{pesticideOperator,jdbcType=VARCHAR},
675
+      creater = #{creater,jdbcType=INTEGER},
676
+      create_time = #{createTime,jdbcType=TIMESTAMP},
677
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
678
+      state = #{state,jdbcType=INTEGER},
679
+      approve_people = #{approvePeople,jdbcType=VARCHAR},
680
+      approve_department = #{approveDepartment,jdbcType=VARCHAR},
681
+      approve_note = #{approveNote,jdbcType=VARCHAR},
682
+      approve_time = #{approveTime,jdbcType=TIMESTAMP},
683
+      org_id = #{orgId,jdbcType=VARCHAR},
684
+      delete_state = #{deleteState,jdbcType=VARCHAR},
685
+      updatetime = #{updatetime,jdbcType=TIMESTAMP}
686
+    where id = #{id,jdbcType=VARCHAR}
687
+  </update>
688
+
689
+  <select id="getPesticidePlanList" parameterType="java.util.Map" resultType="java.util.HashMap">
690
+    SELECT
691
+    pes.id,
692
+    plan.id fuigationId,
693
+    plan.house_id houseId,
694
+    pes.major_insect_pests majorInsectPests,
695
+    pes.drug_name drugName,
696
+    pes.use_drug_type useDrugType,
697
+    pes.create_time createTime,
698
+    pes.state
699
+    FROM
700
+    t_fumigation_pesticide pes
701
+    LEFT JOIN t_fumigation_plan plan ON pes.fumigation_id = plan.id
702
+    WHERE pes.delete_state = 1 AND plan.org_id = #{orgId,jdbcType=INTEGER}
703
+    <if test="houseId != null" >
704
+      AND plan.house_id = #{houseId,jdbcType=INTEGER}
705
+    </if>
706
+  </select>
707
+  <select id="getPesticidePlanLists" parameterType="java.util.Map" resultType="java.util.HashMap">
708
+    SELECT
709
+    pes.id,
710
+    plan.id fuigationId,
711
+    plan.house_id houseId,
712
+    pes.major_insect_pests majorInsectPests,
713
+    pes.drug_name drugName,
714
+    pes.use_drug_type useDrugType,
715
+    approval.create_time createTime,
716
+    pes.state, approval.id auditId,
717
+    approval.result result,
718
+    approval.task_id taskId,
719
+    approval.task_name taskName,
720
+    approval.operator operator
721
+    FROM
722
+    t_fumigation_pesticide pes
723
+    LEFT JOIN t_fumigation_plan plan ON pes.fumigation_id = plan.id
724
+    LEFT JOIN business_approval approval ON pes.id = approval.task_id
725
+    WHERE plan.org_id = #{orgId,jdbcType=INTEGER}
726
+    AND (pes.state = 2 OR pes.state = 3)
727
+    <if test="userId != null" >
728
+      AND approval.operator = #{userId}
729
+    </if>
730
+    <if test="houseId != null" >
731
+      AND plan.house_id = #{houseId,jdbcType=INTEGER}
732
+    </if>
733
+  </select>
734
+  <select id="finddrugNameById" parameterType="java.lang.String" resultType="java.util.Map">
735
+    SELECT
736
+        enums.enumName drugName,
737
+        reagent.enumName reagentType
738
+    FROM
739
+        t_fumigation_pesticide pes
740
+    LEFT JOIN t_fumigation_plan plan ON pes.fumigation_id = plan.id
741
+    LEFT JOIN basic_enum enums ON enums.enumId = pes.drug_name
742
+    LEFT JOIN basic_enum reagent ON reagent.enumId = pes.reagent_type
743
+    WHERE plan.id = #{fumigationId}
744
+  </select>
745
+</mapper>

+ 43 - 0
src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationPlanMapper.java

@@ -0,0 +1,43 @@
1
+package com.chinaitop.depot.fumigation.mapper;
2
+
3
+import com.chinaitop.depot.fumigation.model.TFumigationPlan;
4
+import com.chinaitop.depot.fumigation.model.TFumigationPlanExample;
5
+import java.util.List;
6
+import java.util.Map;
7
+
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+public interface TFumigationPlanMapper {
11
+    int countByExample(TFumigationPlanExample example);
12
+
13
+    int deleteByExample(TFumigationPlanExample example);
14
+
15
+    int deleteByPrimaryKey(String id);
16
+
17
+    int insert(TFumigationPlan record);
18
+
19
+    int insertSelective(TFumigationPlan record);
20
+
21
+    List<TFumigationPlan> selectByExample(TFumigationPlanExample example);
22
+
23
+    TFumigationPlan selectByPrimaryKey(String id);
24
+
25
+    int updateByExampleSelective(@Param("record") TFumigationPlan record, @Param("example") TFumigationPlanExample example);
26
+
27
+    int updateByExample(@Param("record") TFumigationPlan record, @Param("example") TFumigationPlanExample example);
28
+
29
+    int updateByPrimaryKeySelective(TFumigationPlan record);
30
+
31
+    int updateByPrimaryKey(TFumigationPlan record);
32
+
33
+    //获取方案列表
34
+    List<Map<String,Object>> selectPlanQueryList(Map<String, Object> map);
35
+
36
+    //作业全部信息--省级平台用
37
+    List<Map<String,Object>> getAllQueryList(Map<String, Object> map);
38
+
39
+    //获取熏蒸审批方案列表
40
+    List<Map<String,Object>> getFumigationApproveList(Map<String, Object> map);
41
+
42
+    List<TFumigationPlan> getProcessList(Map<String, Object> map);
43
+}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1162 - 0
src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationPlanMapper.xml


+ 36 - 0
src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationProcessMapper.java

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

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1300 - 0
src/main/java/com/chinaitop/depot/fumigation/mapper/TFumigationProcessMapper.xml


+ 491 - 0
src/main/java/com/chinaitop/depot/fumigation/model/TFumigationAfter.java

@@ -0,0 +1,491 @@
1
+package com.chinaitop.depot.fumigation.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TFumigationAfter {
6
+    private String id;
7
+
8
+    private Integer houseId;
9
+
10
+    private String fumigationId;
11
+
12
+    private String residueCollectionTime;
13
+
14
+    private String numberOperationsCollected;
15
+
16
+    private String residueCollectionMethod;
17
+
18
+    private String collectJobApprover;
19
+
20
+    private String residueTreatmentMeasures;
21
+
22
+    private String numberResidueTreatment;
23
+
24
+    private String residueDisposalApprover;
25
+
26
+    private String detectionLiveWorms;
27
+
28
+    private String populationDensity;
29
+
30
+    private String samplingCultureTemperature;
31
+
32
+    private String samplingCultureHumidity;
33
+
34
+    private String samplingCultureHalfMonths;
35
+
36
+    private Integer samplingCultureMonthSurvival;
37
+
38
+    private String samplingCultureMonthHalf;
39
+
40
+    private String killInsectRate;
41
+
42
+    private Date checkInsectCageTime;
43
+
44
+    private String insectCageKillRate;
45
+
46
+    private String effectAnalysis;
47
+
48
+    private Integer creater;
49
+
50
+    private Date createTime;
51
+
52
+    private Date updateTime;
53
+
54
+    private Integer orgId;
55
+
56
+    private String deleteState;
57
+
58
+    private Date updatetime;
59
+
60
+    /**
61
+     * 熏蒸善后表
62
+     * @return id 熏蒸善后表
63
+     */
64
+    public String getId() {
65
+        return id;
66
+    }
67
+
68
+    /**
69
+     * 熏蒸善后表
70
+     * @param id 熏蒸善后表
71
+     */
72
+    public void setId(String id) {
73
+        this.id = id == null ? null : id.trim();
74
+    }
75
+
76
+    /**
77
+     * 仓房名称
78
+     * @return house_id 仓房名称
79
+     */
80
+    public Integer getHouseId() {
81
+        return houseId;
82
+    }
83
+
84
+    /**
85
+     * 仓房名称
86
+     * @param houseId 仓房名称
87
+     */
88
+    public void setHouseId(Integer houseId) {
89
+        this.houseId = houseId;
90
+    }
91
+
92
+    /**
93
+     * 熏蒸方案id
94
+     * @return fumigation_id 熏蒸方案id
95
+     */
96
+    public String getFumigationId() {
97
+        return fumigationId;
98
+    }
99
+
100
+    /**
101
+     * 熏蒸方案id
102
+     * @param fumigationId 熏蒸方案id
103
+     */
104
+    public void setFumigationId(String fumigationId) {
105
+        this.fumigationId = fumigationId == null ? null : fumigationId.trim();
106
+    }
107
+
108
+    /**
109
+     * 残渣收集作业时间
110
+     * @return residue_collection_time 残渣收集作业时间
111
+     */
112
+    public String getResidueCollectionTime() {
113
+        return residueCollectionTime;
114
+    }
115
+
116
+    /**
117
+     * 残渣收集作业时间
118
+     * @param residueCollectionTime 残渣收集作业时间
119
+     */
120
+    public void setResidueCollectionTime(String residueCollectionTime) {
121
+        this.residueCollectionTime = residueCollectionTime == null ? null : residueCollectionTime.trim();
122
+    }
123
+
124
+    /**
125
+     * 收集作业人数
126
+     * @return number_operations_collected 收集作业人数
127
+     */
128
+    public String getNumberOperationsCollected() {
129
+        return numberOperationsCollected;
130
+    }
131
+
132
+    /**
133
+     * 收集作业人数
134
+     * @param numberOperationsCollected 收集作业人数
135
+     */
136
+    public void setNumberOperationsCollected(String numberOperationsCollected) {
137
+        this.numberOperationsCollected = numberOperationsCollected == null ? null : numberOperationsCollected.trim();
138
+    }
139
+
140
+    /**
141
+     * 残渣收集方法
142
+     * @return residue_collection_method 残渣收集方法
143
+     */
144
+    public String getResidueCollectionMethod() {
145
+        return residueCollectionMethod;
146
+    }
147
+
148
+    /**
149
+     * 残渣收集方法
150
+     * @param residueCollectionMethod 残渣收集方法
151
+     */
152
+    public void setResidueCollectionMethod(String residueCollectionMethod) {
153
+        this.residueCollectionMethod = residueCollectionMethod == null ? null : residueCollectionMethod.trim();
154
+    }
155
+
156
+    /**
157
+     * 收集作业批准人
158
+     * @return collect_job_approver 收集作业批准人
159
+     */
160
+    public String getCollectJobApprover() {
161
+        return collectJobApprover;
162
+    }
163
+
164
+    /**
165
+     * 收集作业批准人
166
+     * @param collectJobApprover 收集作业批准人
167
+     */
168
+    public void setCollectJobApprover(String collectJobApprover) {
169
+        this.collectJobApprover = collectJobApprover == null ? null : collectJobApprover.trim();
170
+    }
171
+
172
+    /**
173
+     * 残渣处理措施
174
+     * @return residue_treatment_measures 残渣处理措施
175
+     */
176
+    public String getResidueTreatmentMeasures() {
177
+        return residueTreatmentMeasures;
178
+    }
179
+
180
+    /**
181
+     * 残渣处理措施
182
+     * @param residueTreatmentMeasures 残渣处理措施
183
+     */
184
+    public void setResidueTreatmentMeasures(String residueTreatmentMeasures) {
185
+        this.residueTreatmentMeasures = residueTreatmentMeasures == null ? null : residueTreatmentMeasures.trim();
186
+    }
187
+
188
+    /**
189
+     * 残渣处理作业人数
190
+     * @return number_residue_treatment 残渣处理作业人数
191
+     */
192
+    public String getNumberResidueTreatment() {
193
+        return numberResidueTreatment;
194
+    }
195
+
196
+    /**
197
+     * 残渣处理作业人数
198
+     * @param numberResidueTreatment 残渣处理作业人数
199
+     */
200
+    public void setNumberResidueTreatment(String numberResidueTreatment) {
201
+        this.numberResidueTreatment = numberResidueTreatment == null ? null : numberResidueTreatment.trim();
202
+    }
203
+
204
+    /**
205
+     * 残渣处理批准人
206
+     * @return residue_disposal_approver 残渣处理批准人
207
+     */
208
+    public String getResidueDisposalApprover() {
209
+        return residueDisposalApprover;
210
+    }
211
+
212
+    /**
213
+     * 残渣处理批准人
214
+     * @param residueDisposalApprover 残渣处理批准人
215
+     */
216
+    public void setResidueDisposalApprover(String residueDisposalApprover) {
217
+        this.residueDisposalApprover = residueDisposalApprover == null ? null : residueDisposalApprover.trim();
218
+    }
219
+
220
+    /**
221
+     * 熏蒸后活虫检出情况
222
+     * @return detection_live_worms 熏蒸后活虫检出情况
223
+     */
224
+    public String getDetectionLiveWorms() {
225
+        return detectionLiveWorms;
226
+    }
227
+
228
+    /**
229
+     * 熏蒸后活虫检出情况
230
+     * @param detectionLiveWorms 熏蒸后活虫检出情况
231
+     */
232
+    public void setDetectionLiveWorms(String detectionLiveWorms) {
233
+        this.detectionLiveWorms = detectionLiveWorms == null ? null : detectionLiveWorms.trim();
234
+    }
235
+
236
+    /**
237
+     * 熏蒸后虫口密度(头/公斤)
238
+     * @return population_density 熏蒸后虫口密度(头/公斤)
239
+     */
240
+    public String getPopulationDensity() {
241
+        return populationDensity;
242
+    }
243
+
244
+    /**
245
+     * 熏蒸后虫口密度(头/公斤)
246
+     * @param populationDensity 熏蒸后虫口密度(头/公斤)
247
+     */
248
+    public void setPopulationDensity(String populationDensity) {
249
+        this.populationDensity = populationDensity == null ? null : populationDensity.trim();
250
+    }
251
+
252
+    /**
253
+     * 取样培养温度
254
+     * @return sampling_culture_temperature 取样培养温度
255
+     */
256
+    public String getSamplingCultureTemperature() {
257
+        return samplingCultureTemperature;
258
+    }
259
+
260
+    /**
261
+     * 取样培养温度
262
+     * @param samplingCultureTemperature 取样培养温度
263
+     */
264
+    public void setSamplingCultureTemperature(String samplingCultureTemperature) {
265
+        this.samplingCultureTemperature = samplingCultureTemperature == null ? null : samplingCultureTemperature.trim();
266
+    }
267
+
268
+    /**
269
+     * 取样培养湿度
270
+     * @return sampling_culture_humidity 取样培养湿度
271
+     */
272
+    public String getSamplingCultureHumidity() {
273
+        return samplingCultureHumidity;
274
+    }
275
+
276
+    /**
277
+     * 取样培养湿度
278
+     * @param samplingCultureHumidity 取样培养湿度
279
+     */
280
+    public void setSamplingCultureHumidity(String samplingCultureHumidity) {
281
+        this.samplingCultureHumidity = samplingCultureHumidity == null ? null : samplingCultureHumidity.trim();
282
+    }
283
+
284
+    /**
285
+     * 培养15天后活虫数(头/公斤)*
286
+     * @return sampling_culture_half_months 培养15天后活虫数(头/公斤)*
287
+     */
288
+    public String getSamplingCultureHalfMonths() {
289
+        return samplingCultureHalfMonths;
290
+    }
291
+
292
+    /**
293
+     * 培养15天后活虫数(头/公斤)*
294
+     * @param samplingCultureHalfMonths 培养15天后活虫数(头/公斤)*
295
+     */
296
+    public void setSamplingCultureHalfMonths(String samplingCultureHalfMonths) {
297
+        this.samplingCultureHalfMonths = samplingCultureHalfMonths == null ? null : samplingCultureHalfMonths.trim();
298
+    }
299
+
300
+    /**
301
+     * 取样培养30天后活虫数
302
+     * @return sampling_culture_month_survival 取样培养30天后活虫数
303
+     */
304
+    public Integer getSamplingCultureMonthSurvival() {
305
+        return samplingCultureMonthSurvival;
306
+    }
307
+
308
+    /**
309
+     * 取样培养30天后活虫数
310
+     * @param samplingCultureMonthSurvival 取样培养30天后活虫数
311
+     */
312
+    public void setSamplingCultureMonthSurvival(Integer samplingCultureMonthSurvival) {
313
+        this.samplingCultureMonthSurvival = samplingCultureMonthSurvival;
314
+    }
315
+
316
+    /**
317
+     * 培养45天后活虫数(头/公斤)
318
+     * @return sampling_culture_month_half 培养45天后活虫数(头/公斤)
319
+     */
320
+    public String getSamplingCultureMonthHalf() {
321
+        return samplingCultureMonthHalf;
322
+    }
323
+
324
+    /**
325
+     * 培养45天后活虫数(头/公斤)
326
+     * @param samplingCultureMonthHalf 培养45天后活虫数(头/公斤)
327
+     */
328
+    public void setSamplingCultureMonthHalf(String samplingCultureMonthHalf) {
329
+        this.samplingCultureMonthHalf = samplingCultureMonthHalf == null ? null : samplingCultureMonthHalf.trim();
330
+    }
331
+
332
+    /**
333
+     * 粮堆杀虫效果或杀虫率
334
+     * @return kill_insect_rate 粮堆杀虫效果或杀虫率
335
+     */
336
+    public String getKillInsectRate() {
337
+        return killInsectRate;
338
+    }
339
+
340
+    /**
341
+     * 粮堆杀虫效果或杀虫率
342
+     * @param killInsectRate 粮堆杀虫效果或杀虫率
343
+     */
344
+    public void setKillInsectRate(String killInsectRate) {
345
+        this.killInsectRate = killInsectRate == null ? null : killInsectRate.trim();
346
+    }
347
+
348
+    /**
349
+     * 检查虫笼时间
350
+     * @return check_insect_cage_time 检查虫笼时间
351
+     */
352
+    public Date getCheckInsectCageTime() {
353
+        return checkInsectCageTime;
354
+    }
355
+
356
+    /**
357
+     * 检查虫笼时间
358
+     * @param checkInsectCageTime 检查虫笼时间
359
+     */
360
+    public void setCheckInsectCageTime(Date checkInsectCageTime) {
361
+        this.checkInsectCageTime = checkInsectCageTime;
362
+    }
363
+
364
+    /**
365
+     * 虫笼害虫死亡率(%)
366
+     * @return insect_cage_kill_rate 虫笼害虫死亡率(%)
367
+     */
368
+    public String getInsectCageKillRate() {
369
+        return insectCageKillRate;
370
+    }
371
+
372
+    /**
373
+     * 虫笼害虫死亡率(%)
374
+     * @param insectCageKillRate 虫笼害虫死亡率(%)
375
+     */
376
+    public void setInsectCageKillRate(String insectCageKillRate) {
377
+        this.insectCageKillRate = insectCageKillRate == null ? null : insectCageKillRate.trim();
378
+    }
379
+
380
+    /**
381
+     * 效果分析
382
+     * @return effect_analysis 效果分析
383
+     */
384
+    public String getEffectAnalysis() {
385
+        return effectAnalysis;
386
+    }
387
+
388
+    /**
389
+     * 效果分析
390
+     * @param effectAnalysis 效果分析
391
+     */
392
+    public void setEffectAnalysis(String effectAnalysis) {
393
+        this.effectAnalysis = effectAnalysis == null ? null : effectAnalysis.trim();
394
+    }
395
+
396
+    /**
397
+     * 创建人
398
+     * @return creater 创建人
399
+     */
400
+    public Integer getCreater() {
401
+        return creater;
402
+    }
403
+
404
+    /**
405
+     * 创建人
406
+     * @param creater 创建人
407
+     */
408
+    public void setCreater(Integer creater) {
409
+        this.creater = creater;
410
+    }
411
+
412
+    /**
413
+     * 创建日期
414
+     * @return create_time 创建日期
415
+     */
416
+    public Date getCreateTime() {
417
+        return createTime;
418
+    }
419
+
420
+    /**
421
+     * 创建日期
422
+     * @param createTime 创建日期
423
+     */
424
+    public void setCreateTime(Date createTime) {
425
+        this.createTime = createTime;
426
+    }
427
+
428
+    /**
429
+     * 
430
+     * @return update_time 
431
+     */
432
+    public Date getUpdateTime() {
433
+        return updateTime;
434
+    }
435
+
436
+    /**
437
+     * 
438
+     * @param updateTime 
439
+     */
440
+    public void setUpdateTime(Date updateTime) {
441
+        this.updateTime = updateTime;
442
+    }
443
+
444
+    /**
445
+     * 
446
+     * @return org_id 
447
+     */
448
+    public Integer getOrgId() {
449
+        return orgId;
450
+    }
451
+
452
+    /**
453
+     * 
454
+     * @param orgId 
455
+     */
456
+    public void setOrgId(Integer orgId) {
457
+        this.orgId = orgId;
458
+    }
459
+
460
+    /**
461
+     * 删除标志,0是删除,1是未删除
462
+     * @return delete_state 删除标志,0是删除,1是未删除
463
+     */
464
+    public String getDeleteState() {
465
+        return deleteState;
466
+    }
467
+
468
+    /**
469
+     * 删除标志,0是删除,1是未删除
470
+     * @param deleteState 删除标志,0是删除,1是未删除
471
+     */
472
+    public void setDeleteState(String deleteState) {
473
+        this.deleteState = deleteState == null ? null : deleteState.trim();
474
+    }
475
+
476
+    /**
477
+     * 
478
+     * @return updatetime 
479
+     */
480
+    public Date getUpdatetime() {
481
+        return updatetime;
482
+    }
483
+
484
+    /**
485
+     * 
486
+     * @param updatetime 
487
+     */
488
+    public void setUpdatetime(Date updatetime) {
489
+        this.updatetime = updatetime;
490
+    }
491
+}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2029 - 0
src/main/java/com/chinaitop/depot/fumigation/model/TFumigationAfterExample.java


+ 383 - 0
src/main/java/com/chinaitop/depot/fumigation/model/TFumigationForrecord.java

@@ -0,0 +1,383 @@
1
+package com.chinaitop.depot.fumigation.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TFumigationForrecord {
6
+    private String id;
7
+
8
+    private String operationSupervisor;
9
+
10
+    private String position;
11
+
12
+    private String contactPhone;
13
+
14
+    private Date fumigationStart;
15
+
16
+    private Date fumigationEnd;
17
+
18
+    private String stowWay;
19
+
20
+    private String east;
21
+
22
+    private String south;
23
+
24
+    private String west;
25
+
26
+    private String north;
27
+
28
+    private String processingInstructions;
29
+
30
+    private String enterpriseOpinion;
31
+
32
+    private String organsOpinion;
33
+
34
+    private Integer creater;
35
+
36
+    private Date createTime;
37
+
38
+    private String outPerson;
39
+
40
+    private Date outForrecordTime;
41
+
42
+    private Integer orgId;
43
+
44
+    private String deleteState;
45
+
46
+    private Date updatetime;
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
+     * 熏蒸作业负责人
66
+     * @return operation_supervisor 熏蒸作业负责人
67
+     */
68
+    public String getOperationSupervisor() {
69
+        return operationSupervisor;
70
+    }
71
+
72
+    /**
73
+     * 熏蒸作业负责人
74
+     * @param operationSupervisor 熏蒸作业负责人
75
+     */
76
+    public void setOperationSupervisor(String operationSupervisor) {
77
+        this.operationSupervisor = operationSupervisor == null ? null : operationSupervisor.trim();
78
+    }
79
+
80
+    /**
81
+     * 职务
82
+     * @return position 职务
83
+     */
84
+    public String getPosition() {
85
+        return position;
86
+    }
87
+
88
+    /**
89
+     * 职务
90
+     * @param position 职务
91
+     */
92
+    public void setPosition(String position) {
93
+        this.position = position == null ? null : position.trim();
94
+    }
95
+
96
+    /**
97
+     * 联系电话
98
+     * @return contact_phone 联系电话
99
+     */
100
+    public String getContactPhone() {
101
+        return contactPhone;
102
+    }
103
+
104
+    /**
105
+     * 联系电话
106
+     * @param contactPhone 联系电话
107
+     */
108
+    public void setContactPhone(String contactPhone) {
109
+        this.contactPhone = contactPhone == null ? null : contactPhone.trim();
110
+    }
111
+
112
+    /**
113
+     * 熏蒸开始时间
114
+     * @return fumigation_start 熏蒸开始时间
115
+     */
116
+    public Date getFumigationStart() {
117
+        return fumigationStart;
118
+    }
119
+
120
+    /**
121
+     * 熏蒸开始时间
122
+     * @param fumigationStart 熏蒸开始时间
123
+     */
124
+    public void setFumigationStart(Date fumigationStart) {
125
+        this.fumigationStart = fumigationStart;
126
+    }
127
+
128
+    /**
129
+     * 熏蒸结束时间
130
+     * @return fumigation_end 熏蒸结束时间
131
+     */
132
+    public Date getFumigationEnd() {
133
+        return fumigationEnd;
134
+    }
135
+
136
+    /**
137
+     * 熏蒸结束时间
138
+     * @param fumigationEnd 熏蒸结束时间
139
+     */
140
+    public void setFumigationEnd(Date fumigationEnd) {
141
+        this.fumigationEnd = fumigationEnd;
142
+    }
143
+
144
+    /**
145
+     * 堆装方式
146
+     * @return stow_way 堆装方式
147
+     */
148
+    public String getStowWay() {
149
+        return stowWay;
150
+    }
151
+
152
+    /**
153
+     * 堆装方式
154
+     * @param stowWay 堆装方式
155
+     */
156
+    public void setStowWay(String stowWay) {
157
+        this.stowWay = stowWay == null ? null : stowWay.trim();
158
+    }
159
+
160
+    /**
161
+     * 东
162
+     * @return east 东
163
+     */
164
+    public String getEast() {
165
+        return east;
166
+    }
167
+
168
+    /**
169
+     * 东
170
+     * @param east 东
171
+     */
172
+    public void setEast(String east) {
173
+        this.east = east == null ? null : east.trim();
174
+    }
175
+
176
+    /**
177
+     * 南
178
+     * @return south 南
179
+     */
180
+    public String getSouth() {
181
+        return south;
182
+    }
183
+
184
+    /**
185
+     * 南
186
+     * @param south 南
187
+     */
188
+    public void setSouth(String south) {
189
+        this.south = south == null ? null : south.trim();
190
+    }
191
+
192
+    /**
193
+     * 西
194
+     * @return west 西
195
+     */
196
+    public String getWest() {
197
+        return west;
198
+    }
199
+
200
+    /**
201
+     * 西
202
+     * @param west 西
203
+     */
204
+    public void setWest(String west) {
205
+        this.west = west == null ? null : west.trim();
206
+    }
207
+
208
+    /**
209
+     * 北
210
+     * @return north 北
211
+     */
212
+    public String getNorth() {
213
+        return north;
214
+    }
215
+
216
+    /**
217
+     * 北
218
+     * @param north 北
219
+     */
220
+    public void setNorth(String north) {
221
+        this.north = north == null ? null : north.trim();
222
+    }
223
+
224
+    /**
225
+     * 包装物及药剂残渣处理说明
226
+     * @return processing_instructions 包装物及药剂残渣处理说明
227
+     */
228
+    public String getProcessingInstructions() {
229
+        return processingInstructions;
230
+    }
231
+
232
+    /**
233
+     * 包装物及药剂残渣处理说明
234
+     * @param processingInstructions 包装物及药剂残渣处理说明
235
+     */
236
+    public void setProcessingInstructions(String processingInstructions) {
237
+        this.processingInstructions = processingInstructions == null ? null : processingInstructions.trim();
238
+    }
239
+
240
+    /**
241
+     * 申请企业意见
242
+     * @return enterprise_opinion 申请企业意见
243
+     */
244
+    public String getEnterpriseOpinion() {
245
+        return enterpriseOpinion;
246
+    }
247
+
248
+    /**
249
+     * 申请企业意见
250
+     * @param enterpriseOpinion 申请企业意见
251
+     */
252
+    public void setEnterpriseOpinion(String enterpriseOpinion) {
253
+        this.enterpriseOpinion = enterpriseOpinion == null ? null : enterpriseOpinion.trim();
254
+    }
255
+
256
+    /**
257
+     * 备案机关意见
258
+     * @return organs_opinion 备案机关意见
259
+     */
260
+    public String getOrgansOpinion() {
261
+        return organsOpinion;
262
+    }
263
+
264
+    /**
265
+     * 备案机关意见
266
+     * @param organsOpinion 备案机关意见
267
+     */
268
+    public void setOrgansOpinion(String organsOpinion) {
269
+        this.organsOpinion = organsOpinion == null ? null : organsOpinion.trim();
270
+    }
271
+
272
+    /**
273
+     * 创建人
274
+     * @return creater 创建人
275
+     */
276
+    public Integer getCreater() {
277
+        return creater;
278
+    }
279
+
280
+    /**
281
+     * 创建人
282
+     * @param creater 创建人
283
+     */
284
+    public void setCreater(Integer creater) {
285
+        this.creater = creater;
286
+    }
287
+
288
+    /**
289
+     * 创建日期
290
+     * @return create_time 创建日期
291
+     */
292
+    public Date getCreateTime() {
293
+        return createTime;
294
+    }
295
+
296
+    /**
297
+     * 创建日期
298
+     * @param createTime 创建日期
299
+     */
300
+    public void setCreateTime(Date createTime) {
301
+        this.createTime = createTime;
302
+    }
303
+
304
+    /**
305
+     * 带出登录人
306
+     * @return out_person 带出登录人
307
+     */
308
+    public String getOutPerson() {
309
+        return outPerson;
310
+    }
311
+
312
+    /**
313
+     * 带出登录人
314
+     * @param outPerson 带出登录人
315
+     */
316
+    public void setOutPerson(String outPerson) {
317
+        this.outPerson = outPerson == null ? null : outPerson.trim();
318
+    }
319
+
320
+    /**
321
+     * 带出备案时间
322
+     * @return out_forrecord_time 带出备案时间
323
+     */
324
+    public Date getOutForrecordTime() {
325
+        return outForrecordTime;
326
+    }
327
+
328
+    /**
329
+     * 带出备案时间
330
+     * @param outForrecordTime 带出备案时间
331
+     */
332
+    public void setOutForrecordTime(Date outForrecordTime) {
333
+        this.outForrecordTime = outForrecordTime;
334
+    }
335
+
336
+    /**
337
+     * 
338
+     * @return org_id 
339
+     */
340
+    public Integer getOrgId() {
341
+        return orgId;
342
+    }
343
+
344
+    /**
345
+     * 
346
+     * @param orgId 
347
+     */
348
+    public void setOrgId(Integer orgId) {
349
+        this.orgId = orgId;
350
+    }
351
+
352
+    /**
353
+     * 删除标志,0是删除,1是未删除
354
+     * @return delete_state 删除标志,0是删除,1是未删除
355
+     */
356
+    public String getDeleteState() {
357
+        return deleteState;
358
+    }
359
+
360
+    /**
361
+     * 删除标志,0是删除,1是未删除
362
+     * @param deleteState 删除标志,0是删除,1是未删除
363
+     */
364
+    public void setDeleteState(String deleteState) {
365
+        this.deleteState = deleteState == null ? null : deleteState.trim();
366
+    }
367
+
368
+    /**
369
+     * 
370
+     * @return updatetime 
371
+     */
372
+    public Date getUpdatetime() {
373
+        return updatetime;
374
+    }
375
+
376
+    /**
377
+     * 
378
+     * @param updatetime 
379
+     */
380
+    public void setUpdatetime(Date updatetime) {
381
+        this.updatetime = updatetime;
382
+    }
383
+}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1619 - 0
src/main/java/com/chinaitop/depot/fumigation/model/TFumigationForrecordExample.java


+ 203 - 0
src/main/java/com/chinaitop/depot/fumigation/model/TFumigationPersonnel.java

@@ -0,0 +1,203 @@
1
+package com.chinaitop.depot.fumigation.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TFumigationPersonnel {
6
+    private String id;
7
+
8
+    private String forrecordId;
9
+
10
+    private String personnelName;
11
+
12
+    private String professionalQualification;
13
+
14
+    private String physicalCondition;
15
+
16
+    private String workTask;
17
+
18
+    private String outside;
19
+
20
+    private Date createTime;
21
+
22
+    private Integer orgId;
23
+
24
+    private String deleteState;
25
+
26
+    private Date updatetime;
27
+
28
+    /**
29
+     * 熏蒸备注表-熏蒸人员字段
30
+     * @return id 熏蒸备注表-熏蒸人员字段
31
+     */
32
+    public String getId() {
33
+        return id;
34
+    }
35
+
36
+    /**
37
+     * 熏蒸备注表-熏蒸人员字段
38
+     * @param id 熏蒸备注表-熏蒸人员字段
39
+     */
40
+    public void setId(String id) {
41
+        this.id = id == null ? null : id.trim();
42
+    }
43
+
44
+    /**
45
+     * 备案表id
46
+     * @return forrecord_id 备案表id
47
+     */
48
+    public String getForrecordId() {
49
+        return forrecordId;
50
+    }
51
+
52
+    /**
53
+     * 备案表id
54
+     * @param forrecordId 备案表id
55
+     */
56
+    public void setForrecordId(String forrecordId) {
57
+        this.forrecordId = forrecordId == null ? null : forrecordId.trim();
58
+    }
59
+
60
+    /**
61
+     * 姓名
62
+     * @return personnel_name 姓名
63
+     */
64
+    public String getPersonnelName() {
65
+        return personnelName;
66
+    }
67
+
68
+    /**
69
+     * 姓名
70
+     * @param personnelName 姓名
71
+     */
72
+    public void setPersonnelName(String personnelName) {
73
+        this.personnelName = personnelName == null ? null : personnelName.trim();
74
+    }
75
+
76
+    /**
77
+     * 职业资格
78
+     * @return professional_qualification 职业资格
79
+     */
80
+    public String getProfessionalQualification() {
81
+        return professionalQualification;
82
+    }
83
+
84
+    /**
85
+     * 职业资格
86
+     * @param professionalQualification 职业资格
87
+     */
88
+    public void setProfessionalQualification(String professionalQualification) {
89
+        this.professionalQualification = professionalQualification == null ? null : professionalQualification.trim();
90
+    }
91
+
92
+    /**
93
+     * 身体状况
94
+     * @return physical_condition 身体状况
95
+     */
96
+    public String getPhysicalCondition() {
97
+        return physicalCondition;
98
+    }
99
+
100
+    /**
101
+     * 身体状况
102
+     * @param physicalCondition 身体状况
103
+     */
104
+    public void setPhysicalCondition(String physicalCondition) {
105
+        this.physicalCondition = physicalCondition == null ? null : physicalCondition.trim();
106
+    }
107
+
108
+    /**
109
+     * 工作任务
110
+     * @return work_task 工作任务
111
+     */
112
+    public String getWorkTask() {
113
+        return workTask;
114
+    }
115
+
116
+    /**
117
+     * 工作任务
118
+     * @param workTask 工作任务
119
+     */
120
+    public void setWorkTask(String workTask) {
121
+        this.workTask = workTask == null ? null : workTask.trim();
122
+    }
123
+
124
+    /**
125
+     * 是否为外请
126
+     * @return outside 是否为外请
127
+     */
128
+    public String getOutside() {
129
+        return outside;
130
+    }
131
+
132
+    /**
133
+     * 是否为外请
134
+     * @param outside 是否为外请
135
+     */
136
+    public void setOutside(String outside) {
137
+        this.outside = outside == null ? null : outside.trim();
138
+    }
139
+
140
+    /**
141
+     * 创建日期
142
+     * @return create_time 创建日期
143
+     */
144
+    public Date getCreateTime() {
145
+        return createTime;
146
+    }
147
+
148
+    /**
149
+     * 创建日期
150
+     * @param createTime 创建日期
151
+     */
152
+    public void setCreateTime(Date createTime) {
153
+        this.createTime = createTime;
154
+    }
155
+
156
+    /**
157
+     * 
158
+     * @return org_id 
159
+     */
160
+    public Integer getOrgId() {
161
+        return orgId;
162
+    }
163
+
164
+    /**
165
+     * 
166
+     * @param orgId 
167
+     */
168
+    public void setOrgId(Integer orgId) {
169
+        this.orgId = orgId;
170
+    }
171
+
172
+    /**
173
+     * 删除标志,0是删除,1是未删除
174
+     * @return delete_state 删除标志,0是删除,1是未删除
175
+     */
176
+    public String getDeleteState() {
177
+        return deleteState;
178
+    }
179
+
180
+    /**
181
+     * 删除标志,0是删除,1是未删除
182
+     * @param deleteState 删除标志,0是删除,1是未删除
183
+     */
184
+    public void setDeleteState(String deleteState) {
185
+        this.deleteState = deleteState == null ? null : deleteState.trim();
186
+    }
187
+
188
+    /**
189
+     * 
190
+     * @return updatetime 
191
+     */
192
+    public Date getUpdatetime() {
193
+        return updatetime;
194
+    }
195
+
196
+    /**
197
+     * 
198
+     * @param updatetime 
199
+     */
200
+    public void setUpdatetime(Date updatetime) {
201
+        this.updatetime = updatetime;
202
+    }
203
+}

+ 959 - 0
src/main/java/com/chinaitop/depot/fumigation/model/TFumigationPersonnelExample.java

@@ -0,0 +1,959 @@
1
+package com.chinaitop.depot.fumigation.model;
2
+
3
+import java.util.ArrayList;
4
+import java.util.Date;
5
+import java.util.List;
6
+
7
+public class TFumigationPersonnelExample {
8
+    /**
9
+     * t_fumigation_personnel
10
+     */
11
+    protected String orderByClause;
12
+
13
+    /**
14
+     * t_fumigation_personnel
15
+     */
16
+    protected boolean distinct;
17
+
18
+    /**
19
+     * t_fumigation_personnel
20
+     */
21
+    protected List<Criteria> oredCriteria;
22
+
23
+    public TFumigationPersonnelExample() {
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
+     * t_fumigation_personnel 2020-07-01
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(String value) {
131
+            addCriterion("id =", value, "id");
132
+            return (Criteria) this;
133
+        }
134
+
135
+        public Criteria andIdNotEqualTo(String value) {
136
+            addCriterion("id <>", value, "id");
137
+            return (Criteria) this;
138
+        }
139
+
140
+        public Criteria andIdGreaterThan(String value) {
141
+            addCriterion("id >", value, "id");
142
+            return (Criteria) this;
143
+        }
144
+
145
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
146
+            addCriterion("id >=", value, "id");
147
+            return (Criteria) this;
148
+        }
149
+
150
+        public Criteria andIdLessThan(String value) {
151
+            addCriterion("id <", value, "id");
152
+            return (Criteria) this;
153
+        }
154
+
155
+        public Criteria andIdLessThanOrEqualTo(String value) {
156
+            addCriterion("id <=", value, "id");
157
+            return (Criteria) this;
158
+        }
159
+
160
+        public Criteria andIdLike(String value) {
161
+            addCriterion("id like", value, "id");
162
+            return (Criteria) this;
163
+        }
164
+
165
+        public Criteria andIdNotLike(String value) {
166
+            addCriterion("id not like", value, "id");
167
+            return (Criteria) this;
168
+        }
169
+
170
+        public Criteria andIdIn(List<String> values) {
171
+            addCriterion("id in", values, "id");
172
+            return (Criteria) this;
173
+        }
174
+
175
+        public Criteria andIdNotIn(List<String> values) {
176
+            addCriterion("id not in", values, "id");
177
+            return (Criteria) this;
178
+        }
179
+
180
+        public Criteria andIdBetween(String value1, String value2) {
181
+            addCriterion("id between", value1, value2, "id");
182
+            return (Criteria) this;
183
+        }
184
+
185
+        public Criteria andIdNotBetween(String value1, String value2) {
186
+            addCriterion("id not between", value1, value2, "id");
187
+            return (Criteria) this;
188
+        }
189
+
190
+        public Criteria andForrecordIdIsNull() {
191
+            addCriterion("forrecord_id is null");
192
+            return (Criteria) this;
193
+        }
194
+
195
+        public Criteria andForrecordIdIsNotNull() {
196
+            addCriterion("forrecord_id is not null");
197
+            return (Criteria) this;
198
+        }
199
+
200
+        public Criteria andForrecordIdEqualTo(String value) {
201
+            addCriterion("forrecord_id =", value, "forrecordId");
202
+            return (Criteria) this;
203
+        }
204
+
205
+        public Criteria andForrecordIdNotEqualTo(String value) {
206
+            addCriterion("forrecord_id <>", value, "forrecordId");
207
+            return (Criteria) this;
208
+        }
209
+
210
+        public Criteria andForrecordIdGreaterThan(String value) {
211
+            addCriterion("forrecord_id >", value, "forrecordId");
212
+            return (Criteria) this;
213
+        }
214
+
215
+        public Criteria andForrecordIdGreaterThanOrEqualTo(String value) {
216
+            addCriterion("forrecord_id >=", value, "forrecordId");
217
+            return (Criteria) this;
218
+        }
219
+
220
+        public Criteria andForrecordIdLessThan(String value) {
221
+            addCriterion("forrecord_id <", value, "forrecordId");
222
+            return (Criteria) this;
223
+        }
224
+
225
+        public Criteria andForrecordIdLessThanOrEqualTo(String value) {
226
+            addCriterion("forrecord_id <=", value, "forrecordId");
227
+            return (Criteria) this;
228
+        }
229
+
230
+        public Criteria andForrecordIdLike(String value) {
231
+            addCriterion("forrecord_id like", value, "forrecordId");
232
+            return (Criteria) this;
233
+        }
234
+
235
+        public Criteria andForrecordIdNotLike(String value) {
236
+            addCriterion("forrecord_id not like", value, "forrecordId");
237
+            return (Criteria) this;
238
+        }
239
+
240
+        public Criteria andForrecordIdIn(List<String> values) {
241
+            addCriterion("forrecord_id in", values, "forrecordId");
242
+            return (Criteria) this;
243
+        }
244
+
245
+        public Criteria andForrecordIdNotIn(List<String> values) {
246
+            addCriterion("forrecord_id not in", values, "forrecordId");
247
+            return (Criteria) this;
248
+        }
249
+
250
+        public Criteria andForrecordIdBetween(String value1, String value2) {
251
+            addCriterion("forrecord_id between", value1, value2, "forrecordId");
252
+            return (Criteria) this;
253
+        }
254
+
255
+        public Criteria andForrecordIdNotBetween(String value1, String value2) {
256
+            addCriterion("forrecord_id not between", value1, value2, "forrecordId");
257
+            return (Criteria) this;
258
+        }
259
+
260
+        public Criteria andPersonnelNameIsNull() {
261
+            addCriterion("personnel_name is null");
262
+            return (Criteria) this;
263
+        }
264
+
265
+        public Criteria andPersonnelNameIsNotNull() {
266
+            addCriterion("personnel_name is not null");
267
+            return (Criteria) this;
268
+        }
269
+
270
+        public Criteria andPersonnelNameEqualTo(String value) {
271
+            addCriterion("personnel_name =", value, "personnelName");
272
+            return (Criteria) this;
273
+        }
274
+
275
+        public Criteria andPersonnelNameNotEqualTo(String value) {
276
+            addCriterion("personnel_name <>", value, "personnelName");
277
+            return (Criteria) this;
278
+        }
279
+
280
+        public Criteria andPersonnelNameGreaterThan(String value) {
281
+            addCriterion("personnel_name >", value, "personnelName");
282
+            return (Criteria) this;
283
+        }
284
+
285
+        public Criteria andPersonnelNameGreaterThanOrEqualTo(String value) {
286
+            addCriterion("personnel_name >=", value, "personnelName");
287
+            return (Criteria) this;
288
+        }
289
+
290
+        public Criteria andPersonnelNameLessThan(String value) {
291
+            addCriterion("personnel_name <", value, "personnelName");
292
+            return (Criteria) this;
293
+        }
294
+
295
+        public Criteria andPersonnelNameLessThanOrEqualTo(String value) {
296
+            addCriterion("personnel_name <=", value, "personnelName");
297
+            return (Criteria) this;
298
+        }
299
+
300
+        public Criteria andPersonnelNameLike(String value) {
301
+            addCriterion("personnel_name like", value, "personnelName");
302
+            return (Criteria) this;
303
+        }
304
+
305
+        public Criteria andPersonnelNameNotLike(String value) {
306
+            addCriterion("personnel_name not like", value, "personnelName");
307
+            return (Criteria) this;
308
+        }
309
+
310
+        public Criteria andPersonnelNameIn(List<String> values) {
311
+            addCriterion("personnel_name in", values, "personnelName");
312
+            return (Criteria) this;
313
+        }
314
+
315
+        public Criteria andPersonnelNameNotIn(List<String> values) {
316
+            addCriterion("personnel_name not in", values, "personnelName");
317
+            return (Criteria) this;
318
+        }
319
+
320
+        public Criteria andPersonnelNameBetween(String value1, String value2) {
321
+            addCriterion("personnel_name between", value1, value2, "personnelName");
322
+            return (Criteria) this;
323
+        }
324
+
325
+        public Criteria andPersonnelNameNotBetween(String value1, String value2) {
326
+            addCriterion("personnel_name not between", value1, value2, "personnelName");
327
+            return (Criteria) this;
328
+        }
329
+
330
+        public Criteria andProfessionalQualificationIsNull() {
331
+            addCriterion("professional_qualification is null");
332
+            return (Criteria) this;
333
+        }
334
+
335
+        public Criteria andProfessionalQualificationIsNotNull() {
336
+            addCriterion("professional_qualification is not null");
337
+            return (Criteria) this;
338
+        }
339
+
340
+        public Criteria andProfessionalQualificationEqualTo(String value) {
341
+            addCriterion("professional_qualification =", value, "professionalQualification");
342
+            return (Criteria) this;
343
+        }
344
+
345
+        public Criteria andProfessionalQualificationNotEqualTo(String value) {
346
+            addCriterion("professional_qualification <>", value, "professionalQualification");
347
+            return (Criteria) this;
348
+        }
349
+
350
+        public Criteria andProfessionalQualificationGreaterThan(String value) {
351
+            addCriterion("professional_qualification >", value, "professionalQualification");
352
+            return (Criteria) this;
353
+        }
354
+
355
+        public Criteria andProfessionalQualificationGreaterThanOrEqualTo(String value) {
356
+            addCriterion("professional_qualification >=", value, "professionalQualification");
357
+            return (Criteria) this;
358
+        }
359
+
360
+        public Criteria andProfessionalQualificationLessThan(String value) {
361
+            addCriterion("professional_qualification <", value, "professionalQualification");
362
+            return (Criteria) this;
363
+        }
364
+
365
+        public Criteria andProfessionalQualificationLessThanOrEqualTo(String value) {
366
+            addCriterion("professional_qualification <=", value, "professionalQualification");
367
+            return (Criteria) this;
368
+        }
369
+
370
+        public Criteria andProfessionalQualificationLike(String value) {
371
+            addCriterion("professional_qualification like", value, "professionalQualification");
372
+            return (Criteria) this;
373
+        }
374
+
375
+        public Criteria andProfessionalQualificationNotLike(String value) {
376
+            addCriterion("professional_qualification not like", value, "professionalQualification");
377
+            return (Criteria) this;
378
+        }
379
+
380
+        public Criteria andProfessionalQualificationIn(List<String> values) {
381
+            addCriterion("professional_qualification in", values, "professionalQualification");
382
+            return (Criteria) this;
383
+        }
384
+
385
+        public Criteria andProfessionalQualificationNotIn(List<String> values) {
386
+            addCriterion("professional_qualification not in", values, "professionalQualification");
387
+            return (Criteria) this;
388
+        }
389
+
390
+        public Criteria andProfessionalQualificationBetween(String value1, String value2) {
391
+            addCriterion("professional_qualification between", value1, value2, "professionalQualification");
392
+            return (Criteria) this;
393
+        }
394
+
395
+        public Criteria andProfessionalQualificationNotBetween(String value1, String value2) {
396
+            addCriterion("professional_qualification not between", value1, value2, "professionalQualification");
397
+            return (Criteria) this;
398
+        }
399
+
400
+        public Criteria andPhysicalConditionIsNull() {
401
+            addCriterion("physical_condition is null");
402
+            return (Criteria) this;
403
+        }
404
+
405
+        public Criteria andPhysicalConditionIsNotNull() {
406
+            addCriterion("physical_condition is not null");
407
+            return (Criteria) this;
408
+        }
409
+
410
+        public Criteria andPhysicalConditionEqualTo(String value) {
411
+            addCriterion("physical_condition =", value, "physicalCondition");
412
+            return (Criteria) this;
413
+        }
414
+
415
+        public Criteria andPhysicalConditionNotEqualTo(String value) {
416
+            addCriterion("physical_condition <>", value, "physicalCondition");
417
+            return (Criteria) this;
418
+        }
419
+
420
+        public Criteria andPhysicalConditionGreaterThan(String value) {
421
+            addCriterion("physical_condition >", value, "physicalCondition");
422
+            return (Criteria) this;
423
+        }
424
+
425
+        public Criteria andPhysicalConditionGreaterThanOrEqualTo(String value) {
426
+            addCriterion("physical_condition >=", value, "physicalCondition");
427
+            return (Criteria) this;
428
+        }
429
+
430
+        public Criteria andPhysicalConditionLessThan(String value) {
431
+            addCriterion("physical_condition <", value, "physicalCondition");
432
+            return (Criteria) this;
433
+        }
434
+
435
+        public Criteria andPhysicalConditionLessThanOrEqualTo(String value) {
436
+            addCriterion("physical_condition <=", value, "physicalCondition");
437
+            return (Criteria) this;
438
+        }
439
+
440
+        public Criteria andPhysicalConditionLike(String value) {
441
+            addCriterion("physical_condition like", value, "physicalCondition");
442
+            return (Criteria) this;
443
+        }
444
+
445
+        public Criteria andPhysicalConditionNotLike(String value) {
446
+            addCriterion("physical_condition not like", value, "physicalCondition");
447
+            return (Criteria) this;
448
+        }
449
+
450
+        public Criteria andPhysicalConditionIn(List<String> values) {
451
+            addCriterion("physical_condition in", values, "physicalCondition");
452
+            return (Criteria) this;
453
+        }
454
+
455
+        public Criteria andPhysicalConditionNotIn(List<String> values) {
456
+            addCriterion("physical_condition not in", values, "physicalCondition");
457
+            return (Criteria) this;
458
+        }
459
+
460
+        public Criteria andPhysicalConditionBetween(String value1, String value2) {
461
+            addCriterion("physical_condition between", value1, value2, "physicalCondition");
462
+            return (Criteria) this;
463
+        }
464
+
465
+        public Criteria andPhysicalConditionNotBetween(String value1, String value2) {
466
+            addCriterion("physical_condition not between", value1, value2, "physicalCondition");
467
+            return (Criteria) this;
468
+        }
469
+
470
+        public Criteria andWorkTaskIsNull() {
471
+            addCriterion("work_task is null");
472
+            return (Criteria) this;
473
+        }
474
+
475
+        public Criteria andWorkTaskIsNotNull() {
476
+            addCriterion("work_task is not null");
477
+            return (Criteria) this;
478
+        }
479
+
480
+        public Criteria andWorkTaskEqualTo(String value) {
481
+            addCriterion("work_task =", value, "workTask");
482
+            return (Criteria) this;
483
+        }
484
+
485
+        public Criteria andWorkTaskNotEqualTo(String value) {
486
+            addCriterion("work_task <>", value, "workTask");
487
+            return (Criteria) this;
488
+        }
489
+
490
+        public Criteria andWorkTaskGreaterThan(String value) {
491
+            addCriterion("work_task >", value, "workTask");
492
+            return (Criteria) this;
493
+        }
494
+
495
+        public Criteria andWorkTaskGreaterThanOrEqualTo(String value) {
496
+            addCriterion("work_task >=", value, "workTask");
497
+            return (Criteria) this;
498
+        }
499
+
500
+        public Criteria andWorkTaskLessThan(String value) {
501
+            addCriterion("work_task <", value, "workTask");
502
+            return (Criteria) this;
503
+        }
504
+
505
+        public Criteria andWorkTaskLessThanOrEqualTo(String value) {
506
+            addCriterion("work_task <=", value, "workTask");
507
+            return (Criteria) this;
508
+        }
509
+
510
+        public Criteria andWorkTaskLike(String value) {
511
+            addCriterion("work_task like", value, "workTask");
512
+            return (Criteria) this;
513
+        }
514
+
515
+        public Criteria andWorkTaskNotLike(String value) {
516
+            addCriterion("work_task not like", value, "workTask");
517
+            return (Criteria) this;
518
+        }
519
+
520
+        public Criteria andWorkTaskIn(List<String> values) {
521
+            addCriterion("work_task in", values, "workTask");
522
+            return (Criteria) this;
523
+        }
524
+
525
+        public Criteria andWorkTaskNotIn(List<String> values) {
526
+            addCriterion("work_task not in", values, "workTask");
527
+            return (Criteria) this;
528
+        }
529
+
530
+        public Criteria andWorkTaskBetween(String value1, String value2) {
531
+            addCriterion("work_task between", value1, value2, "workTask");
532
+            return (Criteria) this;
533
+        }
534
+
535
+        public Criteria andWorkTaskNotBetween(String value1, String value2) {
536
+            addCriterion("work_task not between", value1, value2, "workTask");
537
+            return (Criteria) this;
538
+        }
539
+
540
+        public Criteria andOutsideIsNull() {
541
+            addCriterion("outside is null");
542
+            return (Criteria) this;
543
+        }
544
+
545
+        public Criteria andOutsideIsNotNull() {
546
+            addCriterion("outside is not null");
547
+            return (Criteria) this;
548
+        }
549
+
550
+        public Criteria andOutsideEqualTo(String value) {
551
+            addCriterion("outside =", value, "outside");
552
+            return (Criteria) this;
553
+        }
554
+
555
+        public Criteria andOutsideNotEqualTo(String value) {
556
+            addCriterion("outside <>", value, "outside");
557
+            return (Criteria) this;
558
+        }
559
+
560
+        public Criteria andOutsideGreaterThan(String value) {
561
+            addCriterion("outside >", value, "outside");
562
+            return (Criteria) this;
563
+        }
564
+
565
+        public Criteria andOutsideGreaterThanOrEqualTo(String value) {
566
+            addCriterion("outside >=", value, "outside");
567
+            return (Criteria) this;
568
+        }
569
+
570
+        public Criteria andOutsideLessThan(String value) {
571
+            addCriterion("outside <", value, "outside");
572
+            return (Criteria) this;
573
+        }
574
+
575
+        public Criteria andOutsideLessThanOrEqualTo(String value) {
576
+            addCriterion("outside <=", value, "outside");
577
+            return (Criteria) this;
578
+        }
579
+
580
+        public Criteria andOutsideLike(String value) {
581
+            addCriterion("outside like", value, "outside");
582
+            return (Criteria) this;
583
+        }
584
+
585
+        public Criteria andOutsideNotLike(String value) {
586
+            addCriterion("outside not like", value, "outside");
587
+            return (Criteria) this;
588
+        }
589
+
590
+        public Criteria andOutsideIn(List<String> values) {
591
+            addCriterion("outside in", values, "outside");
592
+            return (Criteria) this;
593
+        }
594
+
595
+        public Criteria andOutsideNotIn(List<String> values) {
596
+            addCriterion("outside not in", values, "outside");
597
+            return (Criteria) this;
598
+        }
599
+
600
+        public Criteria andOutsideBetween(String value1, String value2) {
601
+            addCriterion("outside between", value1, value2, "outside");
602
+            return (Criteria) this;
603
+        }
604
+
605
+        public Criteria andOutsideNotBetween(String value1, String value2) {
606
+            addCriterion("outside not between", value1, value2, "outside");
607
+            return (Criteria) this;
608
+        }
609
+
610
+        public Criteria andCreateTimeIsNull() {
611
+            addCriterion("create_time is null");
612
+            return (Criteria) this;
613
+        }
614
+
615
+        public Criteria andCreateTimeIsNotNull() {
616
+            addCriterion("create_time is not null");
617
+            return (Criteria) this;
618
+        }
619
+
620
+        public Criteria andCreateTimeEqualTo(Date value) {
621
+            addCriterion("create_time =", value, "createTime");
622
+            return (Criteria) this;
623
+        }
624
+
625
+        public Criteria andCreateTimeNotEqualTo(Date value) {
626
+            addCriterion("create_time <>", value, "createTime");
627
+            return (Criteria) this;
628
+        }
629
+
630
+        public Criteria andCreateTimeGreaterThan(Date value) {
631
+            addCriterion("create_time >", value, "createTime");
632
+            return (Criteria) this;
633
+        }
634
+
635
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
636
+            addCriterion("create_time >=", value, "createTime");
637
+            return (Criteria) this;
638
+        }
639
+
640
+        public Criteria andCreateTimeLessThan(Date value) {
641
+            addCriterion("create_time <", value, "createTime");
642
+            return (Criteria) this;
643
+        }
644
+
645
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
646
+            addCriterion("create_time <=", value, "createTime");
647
+            return (Criteria) this;
648
+        }
649
+
650
+        public Criteria andCreateTimeIn(List<Date> values) {
651
+            addCriterion("create_time in", values, "createTime");
652
+            return (Criteria) this;
653
+        }
654
+
655
+        public Criteria andCreateTimeNotIn(List<Date> values) {
656
+            addCriterion("create_time not in", values, "createTime");
657
+            return (Criteria) this;
658
+        }
659
+
660
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
661
+            addCriterion("create_time between", value1, value2, "createTime");
662
+            return (Criteria) this;
663
+        }
664
+
665
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
666
+            addCriterion("create_time not between", value1, value2, "createTime");
667
+            return (Criteria) this;
668
+        }
669
+
670
+        public Criteria andOrgIdIsNull() {
671
+            addCriterion("org_id is null");
672
+            return (Criteria) this;
673
+        }
674
+
675
+        public Criteria andOrgIdIsNotNull() {
676
+            addCriterion("org_id is not null");
677
+            return (Criteria) this;
678
+        }
679
+
680
+        public Criteria andOrgIdEqualTo(Integer value) {
681
+            addCriterion("org_id =", value, "orgId");
682
+            return (Criteria) this;
683
+        }
684
+
685
+        public Criteria andOrgIdNotEqualTo(Integer value) {
686
+            addCriterion("org_id <>", value, "orgId");
687
+            return (Criteria) this;
688
+        }
689
+
690
+        public Criteria andOrgIdGreaterThan(Integer value) {
691
+            addCriterion("org_id >", value, "orgId");
692
+            return (Criteria) this;
693
+        }
694
+
695
+        public Criteria andOrgIdGreaterThanOrEqualTo(Integer value) {
696
+            addCriterion("org_id >=", value, "orgId");
697
+            return (Criteria) this;
698
+        }
699
+
700
+        public Criteria andOrgIdLessThan(Integer value) {
701
+            addCriterion("org_id <", value, "orgId");
702
+            return (Criteria) this;
703
+        }
704
+
705
+        public Criteria andOrgIdLessThanOrEqualTo(Integer value) {
706
+            addCriterion("org_id <=", value, "orgId");
707
+            return (Criteria) this;
708
+        }
709
+
710
+        public Criteria andOrgIdIn(List<Integer> values) {
711
+            addCriterion("org_id in", values, "orgId");
712
+            return (Criteria) this;
713
+        }
714
+
715
+        public Criteria andOrgIdNotIn(List<Integer> values) {
716
+            addCriterion("org_id not in", values, "orgId");
717
+            return (Criteria) this;
718
+        }
719
+
720
+        public Criteria andOrgIdBetween(Integer value1, Integer value2) {
721
+            addCriterion("org_id between", value1, value2, "orgId");
722
+            return (Criteria) this;
723
+        }
724
+
725
+        public Criteria andOrgIdNotBetween(Integer value1, Integer value2) {
726
+            addCriterion("org_id not between", value1, value2, "orgId");
727
+            return (Criteria) this;
728
+        }
729
+
730
+        public Criteria andDeleteStateIsNull() {
731
+            addCriterion("delete_state is null");
732
+            return (Criteria) this;
733
+        }
734
+
735
+        public Criteria andDeleteStateIsNotNull() {
736
+            addCriterion("delete_state is not null");
737
+            return (Criteria) this;
738
+        }
739
+
740
+        public Criteria andDeleteStateEqualTo(String value) {
741
+            addCriterion("delete_state =", value, "deleteState");
742
+            return (Criteria) this;
743
+        }
744
+
745
+        public Criteria andDeleteStateNotEqualTo(String value) {
746
+            addCriterion("delete_state <>", value, "deleteState");
747
+            return (Criteria) this;
748
+        }
749
+
750
+        public Criteria andDeleteStateGreaterThan(String value) {
751
+            addCriterion("delete_state >", value, "deleteState");
752
+            return (Criteria) this;
753
+        }
754
+
755
+        public Criteria andDeleteStateGreaterThanOrEqualTo(String value) {
756
+            addCriterion("delete_state >=", value, "deleteState");
757
+            return (Criteria) this;
758
+        }
759
+
760
+        public Criteria andDeleteStateLessThan(String value) {
761
+            addCriterion("delete_state <", value, "deleteState");
762
+            return (Criteria) this;
763
+        }
764
+
765
+        public Criteria andDeleteStateLessThanOrEqualTo(String value) {
766
+            addCriterion("delete_state <=", value, "deleteState");
767
+            return (Criteria) this;
768
+        }
769
+
770
+        public Criteria andDeleteStateLike(String value) {
771
+            addCriterion("delete_state like", value, "deleteState");
772
+            return (Criteria) this;
773
+        }
774
+
775
+        public Criteria andDeleteStateNotLike(String value) {
776
+            addCriterion("delete_state not like", value, "deleteState");
777
+            return (Criteria) this;
778
+        }
779
+
780
+        public Criteria andDeleteStateIn(List<String> values) {
781
+            addCriterion("delete_state in", values, "deleteState");
782
+            return (Criteria) this;
783
+        }
784
+
785
+        public Criteria andDeleteStateNotIn(List<String> values) {
786
+            addCriterion("delete_state not in", values, "deleteState");
787
+            return (Criteria) this;
788
+        }
789
+
790
+        public Criteria andDeleteStateBetween(String value1, String value2) {
791
+            addCriterion("delete_state between", value1, value2, "deleteState");
792
+            return (Criteria) this;
793
+        }
794
+
795
+        public Criteria andDeleteStateNotBetween(String value1, String value2) {
796
+            addCriterion("delete_state not between", value1, value2, "deleteState");
797
+            return (Criteria) this;
798
+        }
799
+
800
+        public Criteria andUpdatetimeIsNull() {
801
+            addCriterion("updatetime is null");
802
+            return (Criteria) this;
803
+        }
804
+
805
+        public Criteria andUpdatetimeIsNotNull() {
806
+            addCriterion("updatetime is not null");
807
+            return (Criteria) this;
808
+        }
809
+
810
+        public Criteria andUpdatetimeEqualTo(Date value) {
811
+            addCriterion("updatetime =", value, "updatetime");
812
+            return (Criteria) this;
813
+        }
814
+
815
+        public Criteria andUpdatetimeNotEqualTo(Date value) {
816
+            addCriterion("updatetime <>", value, "updatetime");
817
+            return (Criteria) this;
818
+        }
819
+
820
+        public Criteria andUpdatetimeGreaterThan(Date value) {
821
+            addCriterion("updatetime >", value, "updatetime");
822
+            return (Criteria) this;
823
+        }
824
+
825
+        public Criteria andUpdatetimeGreaterThanOrEqualTo(Date value) {
826
+            addCriterion("updatetime >=", value, "updatetime");
827
+            return (Criteria) this;
828
+        }
829
+
830
+        public Criteria andUpdatetimeLessThan(Date value) {
831
+            addCriterion("updatetime <", value, "updatetime");
832
+            return (Criteria) this;
833
+        }
834
+
835
+        public Criteria andUpdatetimeLessThanOrEqualTo(Date value) {
836
+            addCriterion("updatetime <=", value, "updatetime");
837
+            return (Criteria) this;
838
+        }
839
+
840
+        public Criteria andUpdatetimeIn(List<Date> values) {
841
+            addCriterion("updatetime in", values, "updatetime");
842
+            return (Criteria) this;
843
+        }
844
+
845
+        public Criteria andUpdatetimeNotIn(List<Date> values) {
846
+            addCriterion("updatetime not in", values, "updatetime");
847
+            return (Criteria) this;
848
+        }
849
+
850
+        public Criteria andUpdatetimeBetween(Date value1, Date value2) {
851
+            addCriterion("updatetime between", value1, value2, "updatetime");
852
+            return (Criteria) this;
853
+        }
854
+
855
+        public Criteria andUpdatetimeNotBetween(Date value1, Date value2) {
856
+            addCriterion("updatetime not between", value1, value2, "updatetime");
857
+            return (Criteria) this;
858
+        }
859
+    }
860
+
861
+    /**
862
+     * t_fumigation_personnel
863
+     */
864
+    public static class Criteria extends GeneratedCriteria {
865
+
866
+        protected Criteria() {
867
+            super();
868
+        }
869
+    }
870
+
871
+    /**
872
+     * t_fumigation_personnel 2020-07-01
873
+     */
874
+    public static class Criterion {
875
+        private String condition;
876
+
877
+        private Object value;
878
+
879
+        private Object secondValue;
880
+
881
+        private boolean noValue;
882
+
883
+        private boolean singleValue;
884
+
885
+        private boolean betweenValue;
886
+
887
+        private boolean listValue;
888
+
889
+        private String typeHandler;
890
+
891
+        public String getCondition() {
892
+            return condition;
893
+        }
894
+
895
+        public Object getValue() {
896
+            return value;
897
+        }
898
+
899
+        public Object getSecondValue() {
900
+            return secondValue;
901
+        }
902
+
903
+        public boolean isNoValue() {
904
+            return noValue;
905
+        }
906
+
907
+        public boolean isSingleValue() {
908
+            return singleValue;
909
+        }
910
+
911
+        public boolean isBetweenValue() {
912
+            return betweenValue;
913
+        }
914
+
915
+        public boolean isListValue() {
916
+            return listValue;
917
+        }
918
+
919
+        public String getTypeHandler() {
920
+            return typeHandler;
921
+        }
922
+
923
+        protected Criterion(String condition) {
924
+            super();
925
+            this.condition = condition;
926
+            this.typeHandler = null;
927
+            this.noValue = true;
928
+        }
929
+
930
+        protected Criterion(String condition, Object value, String typeHandler) {
931
+            super();
932
+            this.condition = condition;
933
+            this.value = value;
934
+            this.typeHandler = typeHandler;
935
+            if (value instanceof List<?>) {
936
+                this.listValue = true;
937
+            } else {
938
+                this.singleValue = true;
939
+            }
940
+        }
941
+
942
+        protected Criterion(String condition, Object value) {
943
+            this(condition, value, null);
944
+        }
945
+
946
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
947
+            super();
948
+            this.condition = condition;
949
+            this.value = value;
950
+            this.secondValue = secondValue;
951
+            this.typeHandler = typeHandler;
952
+            this.betweenValue = true;
953
+        }
954
+
955
+        protected Criterion(String condition, Object value, Object secondValue) {
956
+            this(condition, value, secondValue, null);
957
+        }
958
+    }
959
+}

+ 635 - 0
src/main/java/com/chinaitop/depot/fumigation/model/TFumigationPesticide.java

@@ -0,0 +1,635 @@
1
+package com.chinaitop.depot.fumigation.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TFumigationPesticide {
6
+    private String id;
7
+
8
+    private String fumigationId;
9
+
10
+    private Integer majorInsectPests;
11
+
12
+    private String insectDensity;
13
+
14
+    private String occurrencePlace;
15
+
16
+    private Date insectProductTime;
17
+
18
+    private String drugResistance;
19
+
20
+    private Integer drugName;
21
+
22
+    private String reagentType;
23
+
24
+    private String validity;
25
+
26
+    private String getNumber;
27
+
28
+    private String getPerson;
29
+
30
+    private Date getTime;
31
+
32
+    private String drugPurity;
33
+
34
+    private String useDrugType;
35
+
36
+    private Date plannDrugStartTime;
37
+
38
+    private Date plannDrugUseUpTime;
39
+
40
+    private String plannDrugCount;
41
+
42
+    private String sealType;
43
+
44
+    private String settingConcentration;
45
+
46
+    private String concentrationCheckType;
47
+
48
+    private String bulkGasType;
49
+
50
+    private Integer drugUserNumber;
51
+
52
+    private String pesticideOperator;
53
+
54
+    private Integer creater;
55
+
56
+    private Date createTime;
57
+
58
+    private Date updateTime;
59
+
60
+    private Integer state;
61
+
62
+    private String approvePeople;
63
+
64
+    private String approveDepartment;
65
+
66
+    private String approveNote;
67
+
68
+    private Date approveTime;
69
+
70
+    private String orgId;
71
+
72
+    private String deleteState;
73
+
74
+    private Date updatetime;
75
+
76
+    /**
77
+     * 施药任务表
78
+     * @return id 施药任务表
79
+     */
80
+    public String getId() {
81
+        return id;
82
+    }
83
+
84
+    /**
85
+     * 施药任务表
86
+     * @param id 施药任务表
87
+     */
88
+    public void setId(String id) {
89
+        this.id = id == null ? null : id.trim();
90
+    }
91
+
92
+    /**
93
+     * 熏蒸计划ID
94
+     * @return fumigation_id 熏蒸计划ID
95
+     */
96
+    public String getFumigationId() {
97
+        return fumigationId;
98
+    }
99
+
100
+    /**
101
+     * 熏蒸计划ID
102
+     * @param fumigationId 熏蒸计划ID
103
+     */
104
+    public void setFumigationId(String fumigationId) {
105
+        this.fumigationId = fumigationId == null ? null : fumigationId.trim();
106
+    }
107
+
108
+    /**
109
+     * 主要虫害
110
+     * @return major_insect_pests 主要虫害
111
+     */
112
+    public Integer getMajorInsectPests() {
113
+        return majorInsectPests;
114
+    }
115
+
116
+    /**
117
+     * 主要虫害
118
+     * @param majorInsectPests 主要虫害
119
+     */
120
+    public void setMajorInsectPests(Integer majorInsectPests) {
121
+        this.majorInsectPests = majorInsectPests;
122
+    }
123
+
124
+    /**
125
+     * 虫口密度(头/公斤)
126
+     * @return insect_density 虫口密度(头/公斤)
127
+     */
128
+    public String getInsectDensity() {
129
+        return insectDensity;
130
+    }
131
+
132
+    /**
133
+     * 虫口密度(头/公斤)
134
+     * @param insectDensity 虫口密度(头/公斤)
135
+     */
136
+    public void setInsectDensity(String insectDensity) {
137
+        this.insectDensity = insectDensity == null ? null : insectDensity.trim();
138
+    }
139
+
140
+    /**
141
+     * 发生部位
142
+     * @return occurrence_place 发生部位
143
+     */
144
+    public String getOccurrencePlace() {
145
+        return occurrencePlace;
146
+    }
147
+
148
+    /**
149
+     * 发生部位
150
+     * @param occurrencePlace 发生部位
151
+     */
152
+    public void setOccurrencePlace(String occurrencePlace) {
153
+        this.occurrencePlace = occurrencePlace == null ? null : occurrencePlace.trim();
154
+    }
155
+
156
+    /**
157
+     * 发现虫害日期
158
+     * @return insect_product_time 发现虫害日期
159
+     */
160
+    public Date getInsectProductTime() {
161
+        return insectProductTime;
162
+    }
163
+
164
+    /**
165
+     * 发现虫害日期
166
+     * @param insectProductTime 发现虫害日期
167
+     */
168
+    public void setInsectProductTime(Date insectProductTime) {
169
+        this.insectProductTime = insectProductTime;
170
+    }
171
+
172
+    /**
173
+     * 害虫抗药性分析
174
+     * @return drug_resistance 害虫抗药性分析
175
+     */
176
+    public String getDrugResistance() {
177
+        return drugResistance;
178
+    }
179
+
180
+    /**
181
+     * 害虫抗药性分析
182
+     * @param drugResistance 害虫抗药性分析
183
+     */
184
+    public void setDrugResistance(String drugResistance) {
185
+        this.drugResistance = drugResistance == null ? null : drugResistance.trim();
186
+    }
187
+
188
+    /**
189
+     * 药剂名称
190
+     * @return drug_name 药剂名称
191
+     */
192
+    public Integer getDrugName() {
193
+        return drugName;
194
+    }
195
+
196
+    /**
197
+     * 药剂名称
198
+     * @param drugName 药剂名称
199
+     */
200
+    public void setDrugName(Integer drugName) {
201
+        this.drugName = drugName;
202
+    }
203
+
204
+    /**
205
+     * 类型/型号
206
+     * @return reagent_type 类型/型号
207
+     */
208
+    public String getReagentType() {
209
+        return reagentType;
210
+    }
211
+
212
+    /**
213
+     * 类型/型号
214
+     * @param reagentType 类型/型号
215
+     */
216
+    public void setReagentType(String reagentType) {
217
+        this.reagentType = reagentType == null ? null : reagentType.trim();
218
+    }
219
+
220
+    /**
221
+     * 有效期
222
+     * @return validity 有效期
223
+     */
224
+    public String getValidity() {
225
+        return validity;
226
+    }
227
+
228
+    /**
229
+     * 有效期
230
+     * @param validity 有效期
231
+     */
232
+    public void setValidity(String validity) {
233
+        this.validity = validity == null ? null : validity.trim();
234
+    }
235
+
236
+    /**
237
+     * 领取数量(g)
238
+     * @return get_number 领取数量(g)
239
+     */
240
+    public String getGetNumber() {
241
+        return getNumber;
242
+    }
243
+
244
+    /**
245
+     * 领取数量(g)
246
+     * @param getNumber 领取数量(g)
247
+     */
248
+    public void setGetNumber(String getNumber) {
249
+        this.getNumber = getNumber == null ? null : getNumber.trim();
250
+    }
251
+
252
+    /**
253
+     * 领取人
254
+     * @return get_person 领取人
255
+     */
256
+    public String getGetPerson() {
257
+        return getPerson;
258
+    }
259
+
260
+    /**
261
+     * 领取人
262
+     * @param getPerson 领取人
263
+     */
264
+    public void setGetPerson(String getPerson) {
265
+        this.getPerson = getPerson == null ? null : getPerson.trim();
266
+    }
267
+
268
+    /**
269
+     * 领取时间
270
+     * @return get_time 领取时间
271
+     */
272
+    public Date getGetTime() {
273
+        return getTime;
274
+    }
275
+
276
+    /**
277
+     * 领取时间
278
+     * @param getTime 领取时间
279
+     */
280
+    public void setGetTime(Date getTime) {
281
+        this.getTime = getTime;
282
+    }
283
+
284
+    /**
285
+     * 药剂纯度(%)
286
+     * @return drug_purity 药剂纯度(%)
287
+     */
288
+    public String getDrugPurity() {
289
+        return drugPurity;
290
+    }
291
+
292
+    /**
293
+     * 药剂纯度(%)
294
+     * @param drugPurity 药剂纯度(%)
295
+     */
296
+    public void setDrugPurity(String drugPurity) {
297
+        this.drugPurity = drugPurity == null ? null : drugPurity.trim();
298
+    }
299
+
300
+    /**
301
+     * 施药方法
302
+     * @return use_drug_type 施药方法
303
+     */
304
+    public String getUseDrugType() {
305
+        return useDrugType;
306
+    }
307
+
308
+    /**
309
+     * 施药方法
310
+     * @param useDrugType 施药方法
311
+     */
312
+    public void setUseDrugType(String useDrugType) {
313
+        this.useDrugType = useDrugType == null ? null : useDrugType.trim();
314
+    }
315
+
316
+    /**
317
+     * 计划施药开始时间
318
+     * @return plann_drug_start_time 计划施药开始时间
319
+     */
320
+    public Date getPlannDrugStartTime() {
321
+        return plannDrugStartTime;
322
+    }
323
+
324
+    /**
325
+     * 计划施药开始时间
326
+     * @param plannDrugStartTime 计划施药开始时间
327
+     */
328
+    public void setPlannDrugStartTime(Date plannDrugStartTime) {
329
+        this.plannDrugStartTime = plannDrugStartTime;
330
+    }
331
+
332
+    /**
333
+     * 计划施药截至时间
334
+     * @return plann_drug_use_up_time 计划施药截至时间
335
+     */
336
+    public Date getPlannDrugUseUpTime() {
337
+        return plannDrugUseUpTime;
338
+    }
339
+
340
+    /**
341
+     * 计划施药截至时间
342
+     * @param plannDrugUseUpTime 计划施药截至时间
343
+     */
344
+    public void setPlannDrugUseUpTime(Date plannDrugUseUpTime) {
345
+        this.plannDrugUseUpTime = plannDrugUseUpTime;
346
+    }
347
+
348
+    /**
349
+     * 计划用药量
350
+     * @return plann_drug_count 计划用药量
351
+     */
352
+    public String getPlannDrugCount() {
353
+        return plannDrugCount;
354
+    }
355
+
356
+    /**
357
+     * 计划用药量
358
+     * @param plannDrugCount 计划用药量
359
+     */
360
+    public void setPlannDrugCount(String plannDrugCount) {
361
+        this.plannDrugCount = plannDrugCount == null ? null : plannDrugCount.trim();
362
+    }
363
+
364
+    /**
365
+     * 密闭方法
366
+     * @return seal_type 密闭方法
367
+     */
368
+    public String getSealType() {
369
+        return sealType;
370
+    }
371
+
372
+    /**
373
+     * 密闭方法
374
+     * @param sealType 密闭方法
375
+     */
376
+    public void setSealType(String sealType) {
377
+        this.sealType = sealType == null ? null : sealType.trim();
378
+    }
379
+
380
+    /**
381
+     * 设定浓度
382
+     * @return setting_concentration 设定浓度
383
+     */
384
+    public String getSettingConcentration() {
385
+        return settingConcentration;
386
+    }
387
+
388
+    /**
389
+     * 设定浓度
390
+     * @param settingConcentration 设定浓度
391
+     */
392
+    public void setSettingConcentration(String settingConcentration) {
393
+        this.settingConcentration = settingConcentration == null ? null : settingConcentration.trim();
394
+    }
395
+
396
+    /**
397
+     * 浓度检测方法
398
+     * @return concentration_check_type 浓度检测方法
399
+     */
400
+    public String getConcentrationCheckType() {
401
+        return concentrationCheckType;
402
+    }
403
+
404
+    /**
405
+     * 浓度检测方法
406
+     * @param concentrationCheckType 浓度检测方法
407
+     */
408
+    public void setConcentrationCheckType(String concentrationCheckType) {
409
+        this.concentrationCheckType = concentrationCheckType == null ? null : concentrationCheckType.trim();
410
+    }
411
+
412
+    /**
413
+     * 散气方法
414
+     * @return bulk_gas_type 散气方法
415
+     */
416
+    public String getBulkGasType() {
417
+        return bulkGasType;
418
+    }
419
+
420
+    /**
421
+     * 散气方法
422
+     * @param bulkGasType 散气方法
423
+     */
424
+    public void setBulkGasType(String bulkGasType) {
425
+        this.bulkGasType = bulkGasType == null ? null : bulkGasType.trim();
426
+    }
427
+
428
+    /**
429
+     * 施药人数
430
+     * @return drug_user_number 施药人数
431
+     */
432
+    public Integer getDrugUserNumber() {
433
+        return drugUserNumber;
434
+    }
435
+
436
+    /**
437
+     * 施药人数
438
+     * @param drugUserNumber 施药人数
439
+     */
440
+    public void setDrugUserNumber(Integer drugUserNumber) {
441
+        this.drugUserNumber = drugUserNumber;
442
+    }
443
+
444
+    /**
445
+     * 施药操作人员
446
+     * @return pesticide_operator 施药操作人员
447
+     */
448
+    public String getPesticideOperator() {
449
+        return pesticideOperator;
450
+    }
451
+
452
+    /**
453
+     * 施药操作人员
454
+     * @param pesticideOperator 施药操作人员
455
+     */
456
+    public void setPesticideOperator(String pesticideOperator) {
457
+        this.pesticideOperator = pesticideOperator == null ? null : pesticideOperator.trim();
458
+    }
459
+
460
+    /**
461
+     * 创建人id
462
+     * @return creater 创建人id
463
+     */
464
+    public Integer getCreater() {
465
+        return creater;
466
+    }
467
+
468
+    /**
469
+     * 创建人id
470
+     * @param creater 创建人id
471
+     */
472
+    public void setCreater(Integer creater) {
473
+        this.creater = creater;
474
+    }
475
+
476
+    /**
477
+     * 创建时间
478
+     * @return create_time 创建时间
479
+     */
480
+    public Date getCreateTime() {
481
+        return createTime;
482
+    }
483
+
484
+    /**
485
+     * 创建时间
486
+     * @param createTime 创建时间
487
+     */
488
+    public void setCreateTime(Date createTime) {
489
+        this.createTime = createTime;
490
+    }
491
+
492
+    /**
493
+     * 修改时间
494
+     * @return update_time 修改时间
495
+     */
496
+    public Date getUpdateTime() {
497
+        return updateTime;
498
+    }
499
+
500
+    /**
501
+     * 修改时间
502
+     * @param updateTime 修改时间
503
+     */
504
+    public void setUpdateTime(Date updateTime) {
505
+        this.updateTime = updateTime;
506
+    }
507
+
508
+    /**
509
+     * 0审批驳回,1未提交,2待审批,3审批中,4审批中,5审批通过,6备案未提交,7备案中,8已备案,9作业中,10作业结束,11拒绝
510
+     * @return state 0审批驳回,1未提交,2待审批,3审批中,4审批中,5审批通过,6备案未提交,7备案中,8已备案,9作业中,10作业结束,11拒绝
511
+     */
512
+    public Integer getState() {
513
+        return state;
514
+    }
515
+
516
+    /**
517
+     * 0审批驳回,1未提交,2待审批,3审批中,4审批中,5审批通过,6备案未提交,7备案中,8已备案,9作业中,10作业结束,11拒绝
518
+     * @param state 0审批驳回,1未提交,2待审批,3审批中,4审批中,5审批通过,6备案未提交,7备案中,8已备案,9作业中,10作业结束,11拒绝
519
+     */
520
+    public void setState(Integer state) {
521
+        this.state = state;
522
+    }
523
+
524
+    /**
525
+     * 审批工作人员
526
+     * @return approve_people 审批工作人员
527
+     */
528
+    public String getApprovePeople() {
529
+        return approvePeople;
530
+    }
531
+
532
+    /**
533
+     * 审批工作人员
534
+     * @param approvePeople 审批工作人员
535
+     */
536
+    public void setApprovePeople(String approvePeople) {
537
+        this.approvePeople = approvePeople == null ? null : approvePeople.trim();
538
+    }
539
+
540
+    /**
541
+     * 审批部门
542
+     * @return approve_department 审批部门
543
+     */
544
+    public String getApproveDepartment() {
545
+        return approveDepartment;
546
+    }
547
+
548
+    /**
549
+     * 审批部门
550
+     * @param approveDepartment 审批部门
551
+     */
552
+    public void setApproveDepartment(String approveDepartment) {
553
+        this.approveDepartment = approveDepartment == null ? null : approveDepartment.trim();
554
+    }
555
+
556
+    /**
557
+     * 审批意见
558
+     * @return approve_note 审批意见
559
+     */
560
+    public String getApproveNote() {
561
+        return approveNote;
562
+    }
563
+
564
+    /**
565
+     * 审批意见
566
+     * @param approveNote 审批意见
567
+     */
568
+    public void setApproveNote(String approveNote) {
569
+        this.approveNote = approveNote == null ? null : approveNote.trim();
570
+    }
571
+
572
+    /**
573
+     * 审批时间
574
+     * @return approve_time 审批时间
575
+     */
576
+    public Date getApproveTime() {
577
+        return approveTime;
578
+    }
579
+
580
+    /**
581
+     * 审批时间
582
+     * @param approveTime 审批时间
583
+     */
584
+    public void setApproveTime(Date approveTime) {
585
+        this.approveTime = approveTime;
586
+    }
587
+
588
+    /**
589
+     * 粮库id
590
+     * @return org_id 粮库id
591
+     */
592
+    public String getOrgId() {
593
+        return orgId;
594
+    }
595
+
596
+    /**
597
+     * 粮库id
598
+     * @param orgId 粮库id
599
+     */
600
+    public void setOrgId(String orgId) {
601
+        this.orgId = orgId == null ? null : orgId.trim();
602
+    }
603
+
604
+    /**
605
+     * 删除标志
606
+     * @return delete_state 删除标志
607
+     */
608
+    public String getDeleteState() {
609
+        return deleteState;
610
+    }
611
+
612
+    /**
613
+     * 删除标志
614
+     * @param deleteState 删除标志
615
+     */
616
+    public void setDeleteState(String deleteState) {
617
+        this.deleteState = deleteState == null ? null : deleteState.trim();
618
+    }
619
+
620
+    /**
621
+     * 
622
+     * @return updatetime 
623
+     */
624
+    public Date getUpdatetime() {
625
+        return updatetime;
626
+    }
627
+
628
+    /**
629
+     * 
630
+     * @param updatetime 
631
+     */
632
+    public void setUpdatetime(Date updatetime) {
633
+        this.updatetime = updatetime;
634
+    }
635
+}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2539 - 0
src/main/java/com/chinaitop/depot/fumigation/model/TFumigationPesticideExample.java


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1013 - 0
src/main/java/com/chinaitop/depot/fumigation/model/TFumigationPlan.java


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 3939 - 0
src/main/java/com/chinaitop/depot/fumigation/model/TFumigationPlanExample.java


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1247 - 0
src/main/java/com/chinaitop/depot/fumigation/model/TFumigationProcess.java


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 4789 - 0
src/main/java/com/chinaitop/depot/fumigation/model/TFumigationProcessExample.java


+ 36 - 0
src/main/java/com/chinaitop/depot/fumigation/service/FumigationAfterService.java

@@ -0,0 +1,36 @@
1
+package com.chinaitop.depot.fumigation.service;
2
+
3
+import com.chinaitop.depot.fumigation.model.TFumigationAfter;
4
+import com.chinaitop.depot.fumigation.model.TFumigationAfterExample;
5
+import com.chinaitop.depot.fumigation.model.TFumigationProcess;
6
+import com.chinaitop.depot.fumigation.model.TFumigationProcessExample;
7
+
8
+import java.util.List;
9
+import java.util.Map;
10
+
11
+/**
12
+ * @author lvzhikai
13
+ * @description: 熏蒸作业善后
14
+ * @create 2019-1-21 11:00
15
+ */
16
+public interface FumigationAfterService {
17
+
18
+    List<Map<String,Object>> getFumigationAfterList(Map<String, Object> map);
19
+
20
+    void add(TFumigationAfter tFumigationAfter);
21
+
22
+    void update(TFumigationAfter tFumigationAfter);
23
+
24
+    TFumigationAfter findById(String afterId);
25
+
26
+    void updateByExample(TFumigationAfter tFumigationAfter, TFumigationAfterExample example);
27
+
28
+    /**
29
+     * 获取作业列表
30
+     * @param map
31
+     * @return
32
+     */
33
+    List<Map<String,Object>> selectHomeWorkQueryList(Map<String, Object> map);
34
+
35
+    List<TFumigationAfter> findByFumigationId(String fumigationId);
36
+}

+ 31 - 0
src/main/java/com/chinaitop/depot/fumigation/service/FumigationForRecordService.java

@@ -0,0 +1,31 @@
1
+package com.chinaitop.depot.fumigation.service;
2
+
3
+import com.chinaitop.depot.fumigation.model.*;
4
+
5
+import java.util.List;
6
+import java.util.Map;
7
+
8
+/**
9
+ * @author lvzhikai
10
+ * @description: 熏蒸作业
11
+ * @create 2019-1-15 11:00
12
+ */
13
+public interface FumigationForRecordService {
14
+
15
+    List<Map<String,Object>> getFumigationFroRecordList(Map<String, Object> map) throws Exception;
16
+
17
+    List<Map<String, Object>> getFumigationDateByIds(Map<String, Object> map);
18
+
19
+    List<Map<String, Object>> getFroRecordById(String forRecordId);
20
+    Map<String, Object> getFroRecordByIds(String forRecordId);
21
+
22
+    void add(TFumigationForrecord tFumigationForrecord);
23
+    void addPersonnel(TFumigationPersonnel tFumigationPersonnel);
24
+
25
+    void update(TFumigationForrecord tFumigationForrecord);
26
+    void updatePersonnel(TFumigationPersonnel tFumigationPersonnel);
27
+
28
+    List<TFumigationPersonnel> getPersonnelData(TFumigationPersonnelExample tFumigationPersonnelExample);
29
+
30
+    void updateByExample(TFumigationForrecord tFumigationForrecord,TFumigationForrecordExample tFumigationForrecordExample);
31
+}

+ 64 - 0
src/main/java/com/chinaitop/depot/fumigation/service/FumigationPlanService.java

@@ -0,0 +1,64 @@
1
+package com.chinaitop.depot.fumigation.service;
2
+
3
+import com.chinaitop.depot.fumigation.model.*;
4
+
5
+import java.util.Date;
6
+import java.util.List;
7
+import java.util.Map;
8
+
9
+/**
10
+ * @author lvzhikai
11
+ * @description: 熏蒸管理
12
+ * @create 2018-12-15 11:00
13
+ */
14
+public interface FumigationPlanService {
15
+
16
+    /**
17
+     * 列表
18
+     * @param example
19
+     * @return
20
+     */
21
+    List<TFumigationPlan> getFumigationPlanList(TFumigationPlanExample example);
22
+    //作业过程--新增时用到的熏蒸列表
23
+    List<TFumigationPlan> getProcessList(Map<String, Object> map);
24
+
25
+    /**
26
+     * 根据id查询熏蒸方案申请数据
27
+     * @param fumigationId
28
+     * @return
29
+     */
30
+    TFumigationPlan findById(String fumigationId);
31
+
32
+    void add(TFumigationPlan tFumigationPlan);
33
+
34
+    void update(TFumigationPlan tFumigationPlan);
35
+
36
+    void updateByExample(TFumigationPlan tFumigationPlan,TFumigationPlanExample example);
37
+
38
+    /**
39
+     * 获取方案列表
40
+     * @param map
41
+     * @return
42
+     */
43
+    List<Map<String,Object>> selectPlanQueryList(Map<String, Object> map);
44
+
45
+    /**
46
+     * 作业全部信息--省级平台用
47
+     * @param map
48
+     * @return
49
+     */
50
+    List<Map<String,Object>> getAllQueryList(Map<String, Object> map);
51
+
52
+    /**
53
+     * 获取熏蒸审批方案列表
54
+     * @param map
55
+     * @return
56
+     */
57
+    List<Map<String,Object>> getFumigationApproveList(Map<String, Object> map);
58
+
59
+    void insertBatch(List<TFumigationProcess> fumigations);
60
+
61
+    List<TFumigationProcess> getByCodeAndTimes(List<String> cDcsCodes,List<Date> cTimes);
62
+
63
+    void submit(String id, Integer approvalStatus);
64
+}

+ 28 - 0
src/main/java/com/chinaitop/depot/fumigation/service/FumigationProcessService.java

@@ -0,0 +1,28 @@
1
+package com.chinaitop.depot.fumigation.service;
2
+
3
+import com.chinaitop.depot.fumigation.model.TFumigationProcess;
4
+import com.chinaitop.depot.fumigation.model.TFumigationProcessExample;
5
+
6
+import java.util.List;
7
+import java.util.Map;
8
+
9
+/**
10
+ * @author lvzhikai
11
+ * @description: 熏蒸作业
12
+ * @create 2019-1-15 11:00
13
+ */
14
+public interface FumigationProcessService {
15
+
16
+    List<Map<String,Object>> getFumigationProcessList(Map<String, Object> map);
17
+
18
+    void add(TFumigationProcess tFumigationProcess);
19
+
20
+    void update(TFumigationProcess tFumigationProcess);
21
+
22
+    TFumigationProcess findById(String processId);
23
+
24
+    void updateByExample(TFumigationProcess tFumigationProcess, TFumigationProcessExample example);
25
+
26
+    //根据熏蒸方案id查询熏蒸作业过程数据
27
+    List<TFumigationProcess> getDataByFumId(TFumigationProcessExample example);
28
+}

+ 37 - 0
src/main/java/com/chinaitop/depot/fumigation/service/PesticidePlanService.java

@@ -0,0 +1,37 @@
1
+package com.chinaitop.depot.fumigation.service;
2
+
3
+import com.chinaitop.depot.fumigation.model.TFumigationPesticide;
4
+import com.chinaitop.depot.fumigation.model.TFumigationPesticideExample;
5
+
6
+import java.util.List;
7
+import java.util.Map;
8
+
9
+/**
10
+ * @author lvzhikai
11
+ * @description: 施药管理
12
+ * @create 2018-12-15 11:00
13
+ */
14
+public interface PesticidePlanService {
15
+
16
+    List<Map<String,Object>> getPesticidePlanList(Map<String, Object> map);
17
+    List<Map<String,Object>> getPesticidePlanLists(Map<String, Object> map);
18
+
19
+    List<TFumigationPesticide> getFumigationPesticideList(TFumigationPesticideExample example);
20
+
21
+    /**
22
+     * 根据id查询施药方案申请数据
23
+     * @param pesticideId
24
+     * @return
25
+     */
26
+    TFumigationPesticide findById(String pesticideId);
27
+
28
+    Map<String, Object> finddrugNameById(String fumigationId);
29
+
30
+    void add(TFumigationPesticide tFumigationPesticide);
31
+
32
+    void update(TFumigationPesticide tFumigationPesticide);
33
+
34
+    void updateByExample(TFumigationPesticide tFumigationPesticide, TFumigationPesticideExample example);
35
+
36
+    void submit(String id, Integer approvalStatus);
37
+}

+ 66 - 0
src/main/java/com/chinaitop/depot/fumigation/service/impl/FumigationAfterServiceImpl.java

@@ -0,0 +1,66 @@
1
+package com.chinaitop.depot.fumigation.service.impl;
2
+
3
+import com.chinaitop.depot.fumigation.mapper.TFumigationAfterMapper;
4
+import com.chinaitop.depot.fumigation.model.TFumigationAfter;
5
+import com.chinaitop.depot.fumigation.model.TFumigationAfterExample;
6
+import com.chinaitop.depot.fumigation.service.FumigationAfterService;
7
+import org.springframework.stereotype.Service;
8
+
9
+import javax.annotation.Resource;
10
+import java.util.List;
11
+import java.util.Map;
12
+
13
+/**
14
+ * @author lvzhikai
15
+ * @description: 熏蒸作业
16
+ * @create 2019-1-15 11:00
17
+ */
18
+@Service
19
+public class FumigationAfterServiceImpl implements FumigationAfterService {
20
+
21
+    @Resource
22
+    private TFumigationAfterMapper tFumigationAfterMapper;
23
+
24
+    @Override
25
+    public List<Map<String,Object>> getFumigationAfterList(Map<String, Object> map) {
26
+        return tFumigationAfterMapper.getFumigationAfterList(map);
27
+    }
28
+
29
+    @Override
30
+    public void add(TFumigationAfter tFumigationAfter) {
31
+        tFumigationAfterMapper.insert(tFumigationAfter);
32
+    }
33
+
34
+    @Override
35
+    public void update(TFumigationAfter tFumigationAfter) {
36
+        tFumigationAfterMapper.updateByPrimaryKey(tFumigationAfter);
37
+    }
38
+
39
+    @Override
40
+    public TFumigationAfter findById(String afterId) {
41
+        return tFumigationAfterMapper.selectByPrimaryKey(afterId);
42
+    }
43
+
44
+    @Override
45
+    public void updateByExample(TFumigationAfter tFumigationAfter, TFumigationAfterExample example) {
46
+        tFumigationAfterMapper.updateByExampleSelective(tFumigationAfter, example);
47
+    }
48
+
49
+    @Override
50
+    public List<TFumigationAfter> findByFumigationId(String fumigationId) {
51
+        TFumigationAfterExample example = new TFumigationAfterExample();
52
+        TFumigationAfterExample.Criteria criteria = example.createCriteria();
53
+        criteria.andFumigationIdEqualTo(fumigationId);
54
+        return tFumigationAfterMapper.selectByExample(example);
55
+    }
56
+
57
+    /**
58
+     * 获取作业列表
59
+     * @param map
60
+     * @return
61
+     */
62
+    @Override
63
+    public List<Map<String,Object>> selectHomeWorkQueryList(Map<String, Object> map) {
64
+        return tFumigationAfterMapper.selectHomeWorkQueryList(map);
65
+    }
66
+}

+ 144 - 0
src/main/java/com/chinaitop/depot/fumigation/service/impl/FumigationForRecordServiceImpl.java

@@ -0,0 +1,144 @@
1
+package com.chinaitop.depot.fumigation.service.impl;
2
+
3
+import com.alibaba.fastjson.JSON;
4
+import com.chinaitop.depot.fumigation.mapper.TFumigationForrecordMapper;
5
+import com.chinaitop.depot.fumigation.mapper.TFumigationPersonnelMapper;
6
+import com.chinaitop.depot.fumigation.mapper.TFumigationProcessMapper;
7
+import com.chinaitop.depot.fumigation.model.*;
8
+import com.chinaitop.depot.fumigation.service.FumigationForRecordService;
9
+import com.chinaitop.depot.fumigation.service.FumigationProcessService;
10
+import com.chinaitop.depot.utils.HttpUtil;
11
+import com.chinaitop.depot.utils.ParameterUtil;
12
+import io.swagger.models.auth.In;
13
+import net.sf.json.JSONObject;
14
+import org.springframework.stereotype.Service;
15
+
16
+import javax.annotation.Resource;
17
+import java.util.ArrayList;
18
+import java.util.HashMap;
19
+import java.util.List;
20
+import java.util.Map;
21
+import net.sf.json.JSONArray;
22
+
23
+/**
24
+ * @author lvzhikai
25
+ * @description: 熏蒸作业
26
+ * @create 2019-1-15 11:00
27
+ */
28
+@Service
29
+public class FumigationForRecordServiceImpl implements FumigationForRecordService {
30
+
31
+    @Resource
32
+    private TFumigationForrecordMapper tFumigationForrecordMapper;
33
+    @Resource
34
+    private TFumigationPersonnelMapper tFumigationPersonnelMapper;
35
+
36
+    @Override
37
+    public List<Map<String,Object>> getFumigationFroRecordList(Map<String, Object> map) throws Exception {
38
+        TFumigationForrecordExample example = new TFumigationForrecordExample();
39
+        TFumigationForrecordExample.Criteria criteria = example.createCriteria();
40
+        criteria.andOrgIdEqualTo(Integer.parseInt(map.get("orgId").toString()));
41
+        criteria.andDeleteStateEqualTo("1");
42
+        if(ParameterUtil.isnotnull(map.get("searchStartDate")) && ParameterUtil.isnotnull(map.get("searchEndDate"))){
43
+            criteria.andCreateTimeBetween(ParameterUtil.string2datetime(map.get("searchStartDate").toString()),ParameterUtil.string2datetime(map.get("searchEndDate").toString()));
44
+        }
45
+        List<Map<String,Object>> tfList = new ArrayList<Map<String,Object>>();;
46
+        List<TFumigationForrecord> tFumigationForrecords = tFumigationForrecordMapper.selectByExample(example);
47
+        for (TFumigationForrecord tf:tFumigationForrecords) {
48
+            //根据熏蒸备案id获取熏蒸数据
49
+            map.put("forRecordId",tf.getId());
50
+            List<Map<String,Object>> planData = tFumigationForrecordMapper.getFumigationForrecordList(map);
51
+            Map<String,Object> tfMap = ParameterUtil.convertBean(tf);
52
+            if(planData.size() != 0){
53
+                String planIds = "",houseId = "";//获取熏蒸计划表id集合和仓房名称集合
54
+                for (Map<String,Object> plan:planData) {
55
+                    planIds += plan.get("planids")+",";
56
+                    houseId += plan.get("houseid")+",";
57
+                }
58
+                tfMap.put("planIds",planIds.substring(0,planIds.length()-1));
59
+                tfMap.put("houseId",houseId.substring(0,houseId.length()-1));
60
+                tfMap.put("state",planData.get(0).get("state"));
61
+                tfMap.put("stateType",planData.get(0).get("stateType"));
62
+
63
+            }
64
+            tfList.add(tfMap);
65
+        }
66
+        return tfList;
67
+    }
68
+
69
+    @Override
70
+    public List<Map<String, Object>> getFroRecordById(String forRecordId) {
71
+        return tFumigationForrecordMapper.getFroRecordById(forRecordId);
72
+    }
73
+
74
+    @Override
75
+    public Map<String, Object> getFroRecordByIds(String forRecordId) {
76
+        Map<String, Object> FroRecordMap = tFumigationForrecordMapper.getFroRecordByIds(forRecordId);
77
+        List<Map<String, Object>> personnelMap = tFumigationForrecordMapper.getpersonnelByIds(forRecordId);
78
+        List<Map<String, Object>> planMap = tFumigationForrecordMapper.getplanByIds(forRecordId);
79
+        List<Map<String, Object>> pesticideMap = tFumigationForrecordMapper.getpesticideByIds(forRecordId);
80
+        FroRecordMap.put("fumigationPersonnels",personnelMap);
81
+
82
+        String url = "http://localhost:9026/agile/kcsw/queryLKNewData?orgId="+FroRecordMap.get("orgId");;//粮油性质
83
+        String strResult = HttpUtil.doGet(url);
84
+        JSONArray json = JSONArray.fromObject(strResult);
85
+
86
+        for (Map<String, Object> plans:planMap) {
87
+            for (Map<String, Object> pesticide:pesticideMap) {
88
+                if(ParameterUtil.isequal(plans.get("id"),pesticide.get("fumigationId"))){
89
+                    plans.put("fumigationPesticide",pesticide);
90
+                }
91
+            }
92
+            if (json.size() > 0) {//循环添加粮油性质
93
+                for (int i = 0; i < json.size(); i++) {
94
+                    JSONObject job = json.getJSONObject(i);
95
+                    if(ParameterUtil.isequal(plans.get("houseId"),job.get("ch"))){
96
+                        String lyxz = tFumigationForrecordMapper.getLYXZ(job.get("hwxz").toString());
97
+                        plans.put("grainNature",lyxz);
98
+                        String dj = tFumigationForrecordMapper.getLYXZ(job.get("dj").toString());
99
+                        plans.put("grainGrade",dj);
100
+                        plans.remove("rn");
101
+                    }
102
+                }
103
+            }
104
+        }
105
+
106
+        FroRecordMap.put("fumigationPlans",planMap);
107
+        return FroRecordMap;
108
+    }
109
+
110
+    @Override
111
+    public List<Map<String, Object>> getFumigationDateByIds(Map<String, Object> map) {
112
+        return tFumigationForrecordMapper.getFumigationDateByIds(map);
113
+    }
114
+
115
+    @Override
116
+    public void add(TFumigationForrecord tFumigationForrecord) {
117
+        tFumigationForrecordMapper.insert(tFumigationForrecord);
118
+    }
119
+
120
+    @Override
121
+    public void addPersonnel(TFumigationPersonnel tFumigationPersonnel) {
122
+        tFumigationPersonnelMapper.insert(tFumigationPersonnel);
123
+    }
124
+
125
+    @Override
126
+    public void update(TFumigationForrecord tFumigationForrecord) {
127
+        tFumigationForrecordMapper.updateByPrimaryKey(tFumigationForrecord);
128
+    }
129
+
130
+    @Override
131
+    public void updatePersonnel(TFumigationPersonnel tFumigationPersonnel) {
132
+        tFumigationPersonnelMapper.updateByPrimaryKey(tFumigationPersonnel);
133
+    }
134
+
135
+    @Override
136
+    public List<TFumigationPersonnel> getPersonnelData(TFumigationPersonnelExample tFumigationPersonnelExample) {
137
+        return tFumigationPersonnelMapper.selectByExample(tFumigationPersonnelExample);
138
+    }
139
+
140
+    @Override
141
+    public void updateByExample(TFumigationForrecord tFumigationForrecord,TFumigationForrecordExample tFumigationForrecordExample) {
142
+        tFumigationForrecordMapper.updateByExampleSelective(tFumigationForrecord,tFumigationForrecordExample);
143
+    }
144
+}

+ 146 - 0
src/main/java/com/chinaitop/depot/fumigation/service/impl/FumigationPlanServiceImpl.java

@@ -0,0 +1,146 @@
1
+package com.chinaitop.depot.fumigation.service.impl;
2
+
3
+import com.chinaitop.depot.fumigation.mapper.TFumigationPesticideMapper;
4
+import com.chinaitop.depot.fumigation.mapper.TFumigationPlanMapper;
5
+import com.chinaitop.depot.fumigation.mapper.TFumigationProcessMapper;
6
+import com.chinaitop.depot.fumigation.model.*;
7
+import com.chinaitop.depot.fumigation.service.FumigationPlanService;
8
+import org.apache.commons.lang3.StringUtils;
9
+import org.springframework.stereotype.Service;
10
+import org.springframework.transaction.annotation.Transactional;
11
+
12
+import javax.annotation.Resource;
13
+import java.util.Date;
14
+import java.util.List;
15
+import java.util.Map;
16
+
17
+/**
18
+ * @author lvzhikai
19
+ * @description: 熏蒸管理
20
+ * @create 2018-12-15 11:00
21
+ */
22
+@Service
23
+public class FumigationPlanServiceImpl implements FumigationPlanService {
24
+    @Resource
25
+    private TFumigationProcessMapper tFumigationProcessMapper;
26
+
27
+    @Resource
28
+    private TFumigationPlanMapper tFumigationPlanMapper;
29
+
30
+    @Resource
31
+    private TFumigationPesticideMapper tFumigationPesticideMapper;
32
+
33
+    /**
34
+     * 列表
35
+     * @param example
36
+     * @return
37
+     */
38
+    @Override
39
+    public List<TFumigationPlan> getFumigationPlanList(TFumigationPlanExample example) {
40
+        return tFumigationPlanMapper.selectByExample(example);
41
+    }
42
+
43
+    @Override
44
+    public List<TFumigationPlan> getProcessList(Map<String, Object> map) {
45
+        return tFumigationPlanMapper.getProcessList(map);
46
+    }
47
+
48
+    @Override
49
+    public TFumigationPlan findById(String fumigationId) {
50
+        return tFumigationPlanMapper.selectByPrimaryKey(fumigationId);
51
+    }
52
+
53
+    @Override
54
+    public void add(TFumigationPlan tFumigationPlan) {
55
+        tFumigationPlanMapper.insert(tFumigationPlan);
56
+    }
57
+
58
+    @Override
59
+    public void update(TFumigationPlan tFumigationPlan) {
60
+        tFumigationPlanMapper.updateByPrimaryKey(tFumigationPlan);
61
+    }
62
+
63
+    @Override
64
+    public void updateByExample(TFumigationPlan tFumigationPlan, TFumigationPlanExample example) {
65
+        tFumigationPlanMapper.updateByExampleSelective(tFumigationPlan, example);
66
+    }
67
+
68
+    /**
69
+     * 获取方案列表
70
+     * @param map
71
+     * @return
72
+     */
73
+    @Override
74
+    public List<Map<String,Object>> selectPlanQueryList(Map<String, Object> map) {
75
+        return tFumigationPlanMapper.selectPlanQueryList(map);
76
+    }
77
+
78
+    /**
79
+     * 作业全部信息--省级平台用
80
+     * @param map
81
+     * @return
82
+     */
83
+    @Override
84
+    public List<Map<String,Object>> getAllQueryList(Map<String, Object> map) {
85
+        return tFumigationPlanMapper.getAllQueryList(map);
86
+    }
87
+
88
+    /**
89
+     * 获取熏蒸审批方案列表
90
+     * @param map
91
+     * @return
92
+     */
93
+    @Override
94
+    public List<Map<String,Object>> getFumigationApproveList(Map<String, Object> map) {
95
+        return tFumigationPlanMapper.getFumigationApproveList(map);
96
+    }
97
+
98
+    @Transactional
99
+    @Override
100
+    public void insertBatch(List<TFumigationProcess> fumigations) {
101
+        tFumigationProcessMapper.insertBatch(fumigations);
102
+    }
103
+
104
+    @Override
105
+    public List<TFumigationProcess> getByCodeAndTimes(List<String> cDcsCodes, List<Date> cTimes) {
106
+        TFumigationProcessExample example = new TFumigationProcessExample();
107
+        TFumigationProcessExample.Criteria criteria = example.createCriteria();
108
+        if ((cDcsCodes != null && cDcsCodes.size() > 0) && (cTimes != null && cTimes.size() > 0)) {
109
+            criteria.andFumigationIdIn(cDcsCodes);
110
+            criteria.andCreateTimeIn(cTimes);
111
+            List<TFumigationProcess> tFumigationProcesses = tFumigationProcessMapper.selectByExample(example);
112
+            return tFumigationProcesses;
113
+        }
114
+        return null;
115
+    }
116
+
117
+    /**
118
+     * 提交
119
+     */
120
+    @Override
121
+    public void submit(String id, Integer approvalStatus) {
122
+        //熏蒸修改审批状态
123
+        TFumigationPlan tFumigationPlan = tFumigationPlanMapper.selectByPrimaryKey(id);
124
+        if (tFumigationPlan == null) {
125
+            throw new RuntimeException("没有找到相应的数据");
126
+        }
127
+
128
+        // 设置审批状态为,保管科长审批中.
129
+        tFumigationPlan.setState(approvalStatus);
130
+        tFumigationPlan.setApproveTime(new Date());
131
+        tFumigationPlanMapper.updateByPrimaryKey(tFumigationPlan);
132
+
133
+        //施药修改审批状态
134
+        TFumigationPesticideExample example = new TFumigationPesticideExample();
135
+        TFumigationPesticideExample.Criteria criteria = example.createCriteria();
136
+        criteria.andFumigationIdEqualTo(id);
137
+        List<TFumigationPesticide> list = tFumigationPesticideMapper.selectByExample(example);
138
+
139
+        for (TFumigationPesticide tfp:list) {
140
+            tfp.setState(approvalStatus);
141
+            tfp.setApproveTime(new Date());
142
+            // 修改.
143
+            tFumigationPesticideMapper.updateByPrimaryKey(list.get(0));
144
+        }
145
+    }
146
+}

+ 53 - 0
src/main/java/com/chinaitop/depot/fumigation/service/impl/FumigationProcessServiceImpl.java

@@ -0,0 +1,53 @@
1
+package com.chinaitop.depot.fumigation.service.impl;
2
+
3
+import com.chinaitop.depot.fumigation.mapper.TFumigationProcessMapper;
4
+import com.chinaitop.depot.fumigation.model.TFumigationProcess;
5
+import com.chinaitop.depot.fumigation.model.TFumigationProcessExample;
6
+import com.chinaitop.depot.fumigation.service.FumigationProcessService;
7
+import org.springframework.stereotype.Service;
8
+
9
+import javax.annotation.Resource;
10
+import java.util.List;
11
+import java.util.Map;
12
+
13
+/**
14
+ * @author lvzhikai
15
+ * @description: 熏蒸作业
16
+ * @create 2019-1-15 11:00
17
+ */
18
+@Service
19
+public class FumigationProcessServiceImpl implements FumigationProcessService {
20
+
21
+    @Resource
22
+    private TFumigationProcessMapper tFumigationProcessMapper;
23
+
24
+    @Override
25
+    public List<Map<String,Object>> getFumigationProcessList(Map<String, Object> map) {
26
+        return tFumigationProcessMapper.getPesticideProcessList(map);
27
+    }
28
+
29
+    @Override
30
+    public void add(TFumigationProcess tFumigationProcess) {
31
+        tFumigationProcessMapper.insert(tFumigationProcess);
32
+    }
33
+
34
+    @Override
35
+    public void update(TFumigationProcess tFumigationProcess) {
36
+        tFumigationProcessMapper.updateByPrimaryKey(tFumigationProcess);
37
+    }
38
+
39
+    @Override
40
+    public TFumigationProcess findById(String processId) {
41
+        return tFumigationProcessMapper.selectByPrimaryKey(processId);
42
+    }
43
+
44
+    @Override
45
+    public void updateByExample(TFumigationProcess tFumigationProcess, TFumigationProcessExample example) {
46
+        tFumigationProcessMapper.updateByExampleSelective(tFumigationProcess, example);
47
+    }
48
+
49
+    @Override
50
+    public List<TFumigationProcess> getDataByFumId(TFumigationProcessExample example) {
51
+        return tFumigationProcessMapper.selectByExample(example);
52
+    }
53
+}

+ 77 - 0
src/main/java/com/chinaitop/depot/fumigation/service/impl/PesiticidePlanServiceImpl.java

@@ -0,0 +1,77 @@
1
+package com.chinaitop.depot.fumigation.service.impl;
2
+
3
+import com.chinaitop.depot.fumigation.mapper.TFumigationPesticideMapper;
4
+import com.chinaitop.depot.fumigation.model.TFumigationPesticide;
5
+import com.chinaitop.depot.fumigation.model.TFumigationPesticideExample;
6
+import com.chinaitop.depot.fumigation.service.PesticidePlanService;
7
+import org.springframework.stereotype.Service;
8
+
9
+import javax.annotation.Resource;
10
+import java.util.Date;
11
+import java.util.List;
12
+import java.util.Map;
13
+
14
+/**
15
+ * @author lvzhikai
16
+ * @description: 施药管理
17
+ * @create 2018-12-15 11:00
18
+ */
19
+@Service
20
+public class PesiticidePlanServiceImpl implements PesticidePlanService {
21
+
22
+    @Resource
23
+    private TFumigationPesticideMapper tFumigationPesticideMapper;
24
+
25
+    public List<Map<String,Object>> getPesticidePlanList(Map<String, Object> map) {
26
+        return tFumigationPesticideMapper.getPesticidePlanList(map);
27
+    }
28
+
29
+    public List<Map<String,Object>> getPesticidePlanLists(Map<String, Object> map) {
30
+        return tFumigationPesticideMapper.getPesticidePlanLists(map);
31
+    }
32
+
33
+    @Override
34
+    public List<TFumigationPesticide> getFumigationPesticideList(TFumigationPesticideExample example) {
35
+        return tFumigationPesticideMapper.selectByExample(example);
36
+    }
37
+
38
+    @Override
39
+    public TFumigationPesticide findById(String pesticideId) {
40
+        return tFumigationPesticideMapper.selectByPrimaryKey(pesticideId);
41
+    }
42
+
43
+    @Override
44
+    public Map<String, Object> finddrugNameById(String fumigationId) {
45
+        return tFumigationPesticideMapper.finddrugNameById(fumigationId);
46
+    }
47
+
48
+    @Override
49
+    public void add(TFumigationPesticide tFumigationPesticide) {
50
+        tFumigationPesticideMapper.insert(tFumigationPesticide);
51
+    }
52
+
53
+    @Override
54
+    public void update(TFumigationPesticide tFumigationPesticide) {
55
+        tFumigationPesticideMapper.updateByPrimaryKey(tFumigationPesticide);
56
+    }
57
+
58
+    @Override
59
+    public void updateByExample(TFumigationPesticide tFumigationPesticide, TFumigationPesticideExample example) {
60
+        tFumigationPesticideMapper.updateByExampleSelective(tFumigationPesticide, example);
61
+    }
62
+
63
+    /**
64
+     * 提交
65
+     */
66
+    @Override
67
+    public void submit(String id, Integer approvalStatus) {
68
+        //施药修改审批状态
69
+        TFumigationPesticide tFumigationPesticide = new TFumigationPesticide();
70
+
71
+        tFumigationPesticide.setApproveTime(new Date());
72
+        tFumigationPesticide.setState(approvalStatus);
73
+        tFumigationPesticide.setId(id);
74
+        // 修改.
75
+        tFumigationPesticideMapper.updateByPrimaryKeySelective(tFumigationPesticide);
76
+    }
77
+}

+ 245 - 0
src/main/java/com/chinaitop/depot/utils/HttpUtil.java

@@ -0,0 +1,245 @@
1
+package com.chinaitop.depot.utils;
2
+
3
+import org.apache.http.*;
4
+import org.apache.http.client.HttpClient;
5
+import org.apache.http.client.entity.UrlEncodedFormEntity;
6
+import org.apache.http.client.methods.CloseableHttpResponse;
7
+import org.apache.http.client.methods.HttpGet;
8
+import org.apache.http.client.methods.HttpPost;
9
+import org.apache.http.entity.StringEntity;
10
+import org.apache.http.impl.client.CloseableHttpClient;
11
+import org.apache.http.impl.client.DefaultHttpClient;
12
+import org.apache.http.impl.client.HttpClientBuilder;
13
+import org.apache.http.impl.client.HttpClients;
14
+import org.apache.http.message.BasicNameValuePair;
15
+import org.apache.http.protocol.HTTP;
16
+import org.apache.http.util.EntityUtils;
17
+import org.springframework.http.HttpHeaders;
18
+import org.springframework.http.converter.HttpMessageConverter;
19
+import org.springframework.http.converter.StringHttpMessageConverter;
20
+import org.springframework.web.client.RestTemplate;
21
+
22
+import java.io.BufferedReader;
23
+import java.io.IOException;
24
+import java.io.InputStreamReader;
25
+import java.net.URI;
26
+import java.nio.charset.StandardCharsets;
27
+import java.util.ArrayList;
28
+import java.util.Iterator;
29
+import java.util.List;
30
+import java.util.Map;
31
+
32
+/**
33
+ * @author qingsong.han
34
+ * @description: http工具类
35
+ * @create 2020-04-19 12:48
36
+ */
37
+public class HttpUtil {
38
+
39
+    /**
40
+     * 使用apache的HttpClient发送http
41
+     *
42
+     * @param wsdlURL
43
+     *            请求URL
44
+     * @param contentType
45
+     *            如:application/json;charset=utf8
46
+     * @param content
47
+     *            数据内容
48
+     * @DATE 2018年9月22日 下午10:29:17
49
+     */
50
+    public static String doHttpPostByHttpClient(final String wsdlURL, final String contentType, final String content) throws IOException {
51
+        // 获得Http客户端(可以理解为:你得先有一个浏览器;注意:实际上HttpClient与浏览器是不一样的)
52
+        CloseableHttpClient httpClient = HttpClientBuilder.create().build();
53
+        // 创建Post请求
54
+//        HttpPost httpPost = new HttpPost(wsdlURL);
55
+        HttpGet httpGet = new HttpGet(wsdlURL);
56
+        /*StringEntity entity = new StringEntity(content, "UTF-8");
57
+        // 将数据放入entity中
58
+        httpPost.setEntity(entity);
59
+        httpPost.setHeader("Content-Type", contentType);*/
60
+        // 响应模型
61
+        CloseableHttpResponse response = null;
62
+        String result = "";
63
+        try {
64
+            // 由客户端执行(发送)Post请求
65
+//            response = httpClient.execute(httpPost);
66
+            response = httpClient.execute(httpGet);
67
+            // 从响应模型中获取响应实体
68
+            // 注意:和doHttpPostByRestTemplate方法用的不是同一个HttpEntity
69
+            org.apache.http.HttpEntity responseEntity = response.getEntity();
70
+            System.out.println("响应ContentType为:" + responseEntity.getContentType());
71
+            System.out.println("响应状态为:" + response.getStatusLine());
72
+            if (responseEntity != null) {
73
+                result = EntityUtils.toString(responseEntity);
74
+                System.out.println("响应内容为:" + result);
75
+            }
76
+        } finally {
77
+            // 释放资源
78
+            if (httpClient != null) {
79
+                httpClient.close();
80
+            }
81
+            if (response != null) {
82
+                response.close();
83
+            }
84
+        }
85
+        return result;
86
+    }
87
+
88
+    /**
89
+     * 使用springframework的RestTemplate发送http
90
+     *
91
+     * @param wsdlURL
92
+     *            请求URL
93
+     * @param contentType
94
+     *            如:application/json;charset=utf8
95
+     * @param content
96
+     *            数据内容
97
+     * @DATE 2018年9月22日 下午10:30:48
98
+     */
99
+    public static String doHttpPostByRestTemplate(final String wsdlURL, final String contentType, final String content) {
100
+        // http使用无参构造;https需要使用有参构造
101
+        RestTemplate restTemplate = new RestTemplate();
102
+        // 解决中文乱码
103
+        List<HttpMessageConverter<?>> converterList = restTemplate.getMessageConverters();
104
+        converterList.remove(1);
105
+        HttpMessageConverter<?> converter = new StringHttpMessageConverter(StandardCharsets.UTF_8);
106
+        converterList.add(1, converter);
107
+        restTemplate.setMessageConverters(converterList);
108
+        // 设置Content-Type
109
+        HttpHeaders headers = new HttpHeaders();
110
+        headers.remove("Content-Type");
111
+        headers.add("Content-Type", contentType);
112
+        // 数据信息封装
113
+        // 注意:和doHttpPostByHttpClient方法用的不是同一个HttpEntity
114
+        org.springframework.http.HttpEntity<String> formEntity = new org.springframework.http.HttpEntity<String>(
115
+                content, headers);
116
+        String result = restTemplate.postForObject(wsdlURL, formEntity, String.class);
117
+        return result;
118
+    }
119
+
120
+    /**
121
+     * post请求(用于key-value格式的参数)
122
+     * @param url
123
+     * @param params
124
+     * @return
125
+     */
126
+    public static String doPost(String url, Map params){
127
+
128
+        BufferedReader in = null;
129
+        try {
130
+            // 定义HttpClient
131
+            HttpClient client = new DefaultHttpClient();
132
+            // 实例化HTTP方法
133
+            HttpPost request = new HttpPost();
134
+            request.setURI(new URI(url));
135
+            //设置参数
136
+            List<NameValuePair> nvps = new ArrayList<NameValuePair>();
137
+            for (Iterator iter = params.keySet().iterator(); iter.hasNext();) {
138
+                String name = (String) iter.next();
139
+                String value = String.valueOf(params.get(name));
140
+                nvps.add(new BasicNameValuePair(name, value));
141
+
142
+                //System.out.println(name +"-"+value);
143
+            }
144
+            request.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
145
+
146
+            HttpResponse response = client.execute(request);
147
+            int code = response.getStatusLine().getStatusCode();
148
+            if(code == 200){	//请求成功
149
+                in = new BufferedReader(new InputStreamReader(response.getEntity()
150
+                        .getContent(),"utf-8"));
151
+                StringBuffer sb = new StringBuffer("");
152
+                String line = "";
153
+                String NL = System.getProperty("line.separator");
154
+                while ((line = in.readLine()) != null) {
155
+                    sb.append(line + NL);
156
+                }
157
+
158
+                in.close();
159
+
160
+                return sb.toString();
161
+            }
162
+            else{	//
163
+                System.out.println("状态码:" + code);
164
+                return null;
165
+            }
166
+        }
167
+        catch(Exception e){
168
+            e.printStackTrace();
169
+
170
+            return null;
171
+        }
172
+    }
173
+
174
+    /**
175
+     * get请求
176
+     * @return
177
+     */
178
+    public static String doGet(String url) {
179
+        try {
180
+            HttpClient client = new DefaultHttpClient();
181
+            //发送get请求
182
+            HttpGet request = new HttpGet(url);
183
+            HttpResponse response = client.execute(request);
184
+
185
+            /**请求发送成功,并得到响应**/
186
+            if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
187
+                /**读取服务器返回过来的json字符串数据**/
188
+                String strResult = EntityUtils.toString(response.getEntity());
189
+
190
+                return strResult;
191
+            }
192
+        }
193
+        catch (IOException e) {
194
+            e.printStackTrace();
195
+        }
196
+
197
+        return null;
198
+    }
199
+
200
+    /**
201
+     * post请求(用于请求json格式的参数)
202
+     * @param url
203
+     * @param params
204
+     * @return
205
+     */
206
+    public static String doPost(String url, String params) throws Exception {
207
+
208
+        CloseableHttpClient httpclient = HttpClients.createDefault();
209
+        HttpPost httpPost = new HttpPost(url);// 创建httpPost
210
+        httpPost.setHeader("Accept", "application/json");
211
+//        httpPost.setHeader("Content-Type", "application/x-www-form-urlencoded");
212
+        httpPost.setHeader("Content-Type", "application/json");
213
+        String charSet = "UTF-8";
214
+        StringEntity entity = new StringEntity(params, charSet);
215
+        httpPost.setEntity(entity);
216
+        CloseableHttpResponse response = null;
217
+
218
+        try {
219
+
220
+            response = httpclient.execute(httpPost);
221
+            StatusLine status = response.getStatusLine();
222
+            int state = status.getStatusCode();
223
+            if (state == HttpStatus.SC_OK) {
224
+                HttpEntity responseEntity = response.getEntity();
225
+                String jsonString = EntityUtils.toString(responseEntity);
226
+                return jsonString;
227
+            }
228
+        }
229
+        finally {
230
+            if (response != null) {
231
+                try {
232
+                    response.close();
233
+                } catch (IOException e) {
234
+                    e.printStackTrace();
235
+                }
236
+            }
237
+            try {
238
+                httpclient.close();
239
+            } catch (IOException e) {
240
+                e.printStackTrace();
241
+            }
242
+        }
243
+        return null;
244
+    }
245
+}

+ 33 - 4
src/main/java/com/chinaitop/depot/utils/ParameterUtil.java

@@ -1,13 +1,14 @@
1 1
 package com.chinaitop.depot.utils;
2 2
 
3
+import java.beans.BeanInfo;
4
+import java.beans.Introspector;
5
+import java.beans.PropertyDescriptor;
3 6
 import java.io.BufferedInputStream;
4 7
 import java.io.InputStream;
8
+import java.lang.reflect.Method;
5 9
 import java.text.ParseException;
6 10
 import java.text.SimpleDateFormat;
7
-import java.util.Date;
8
-import java.util.List;
9
-import java.util.Properties;
10
-import java.util.UUID;
11
+import java.util.*;
11 12
 
12 13
 public class ParameterUtil {
13 14
 
@@ -177,4 +178,32 @@ public class ParameterUtil {
177 178
         UUID uuid = UUID.randomUUID();
178 179
         return uuid.toString().replace("-", "");
179 180
     }
181
+
182
+
183
+    /**
184
+     * 实体类转Map共通方法
185
+     *
186
+     * @param bean 实体类
187
+     * @return Map
188
+     * @throws Exception
189
+     */
190
+    public static Map convertBean(Object bean) throws Exception {
191
+        Class type = bean.getClass();
192
+        Map returnMap = new HashMap();
193
+        BeanInfo beanInfo = Introspector.getBeanInfo(type);
194
+        PropertyDescriptor[] propertyDescriptors =  beanInfo.getPropertyDescriptors();
195
+        for (PropertyDescriptor descriptor : propertyDescriptors) {
196
+            String propertyName = descriptor.getName();
197
+            if (!propertyName.equals("class")) {
198
+                Method readMethod = descriptor.getReadMethod();
199
+                Object result = readMethod.invoke(bean);
200
+                if (result != null) {
201
+                    returnMap.put(propertyName, result);
202
+                } else {
203
+                    returnMap.put(propertyName, "");
204
+                }
205
+            }
206
+        }
207
+        return returnMap;
208
+    }
180 209
 }

+ 7 - 5
src/main/resources/bootstrap.yml

@@ -8,7 +8,7 @@ server:
8 8
 eureka:
9 9
   client:
10 10
     service-url:
11
-      defaultZone: http://eureka-depot-tj:9001/eureka/
11
+      defaultZone: http://localhost:9001/eureka/
12 12
   instance:
13 13
     prefer-ip-address: true
14 14
     lease-renewal-interval-in-seconds: 10
@@ -29,9 +29,9 @@ spring:
29 29
     store-type: redis
30 30
   redis:
31 31
     database: 2
32
-    host: 192.168.123.98
33
-    port: 6666
34
-    password: depotredis
32
+    host: localhost
33
+    port: 6379
34
+    password:
35 35
     timeout: 3000
36 36
     jedis:
37 37
       pool:
@@ -49,4 +49,6 @@ spring:
49 49
 mybatis:
50 50
   config-location: classpath:mybatis/mybatis-config.xml
51 51
 web:
52
-  upload-path: /home
52
+  upload-path: /home
53
+
54
+reportUrl: http://101.36.160.140:8097