Browse Source

增加orgId

gaodd 3 years ago
parent
commit
6e73c13640

+ 6 - 4
src/main/java/com/chinaitop/depot/intelligent/IntelligentDetection/controller/IntelligentBatchDetectionController.java

@@ -53,15 +53,16 @@ public class IntelligentBatchDetectionController {
53
             @ApiImplicitParam(name = "pageSize", defaultValue = "10", value = "每页条数", paramType = "query"),
53
             @ApiImplicitParam(name = "pageSize", defaultValue = "10", value = "每页条数", paramType = "query"),
54
             @ApiImplicitParam(name = "tName", value = "机构id", paramType = "query"),
54
             @ApiImplicitParam(name = "tName", value = "机构id", paramType = "query"),
55
             @ApiImplicitParam(name = "tState", value = "是否开启", paramType = "query"),
55
             @ApiImplicitParam(name = "tState", value = "是否开启", paramType = "query"),
56
+            @ApiImplicitParam(name = "orgId", value = "库id", paramType = "query"),
56
             @ApiImplicitParam(name = "tCategory", value = "检测类型", paramType = "query")
57
             @ApiImplicitParam(name = "tCategory", value = "检测类型", paramType = "query")
57
     })
58
     })
58
-    public ResponseEntity<PageInfo<TTimingTask>> getList(Integer pageNum, Integer pageSize, String tName, String tState, String tCategory) {
59
+    public ResponseEntity<PageInfo<TTimingTask>> getList(Integer pageNum, Integer pageSize, String tName, String tState, String tCategory,String orgId) {
59
         List<TTimingTask> list = null;
60
         List<TTimingTask> list = null;
60
         try {
61
         try {
61
             if (null != pageNum && null != pageSize) {
62
             if (null != pageNum && null != pageSize) {
62
                 PageHelper.startPage(pageNum, pageSize);
63
                 PageHelper.startPage(pageNum, pageSize);
63
             }
64
             }
64
-            list = tTimingTaskService.getList(tName,tState,tCategory);
65
+            list = tTimingTaskService.getList(tName,tState,tCategory,orgId);
65
         } catch (Exception e) {
66
         } catch (Exception e) {
66
             e.printStackTrace();
67
             e.printStackTrace();
67
             return ResponseEntity.failed(e.getMessage());
68
             return ResponseEntity.failed(e.getMessage());
@@ -134,15 +135,16 @@ public class IntelligentBatchDetectionController {
134
             @ApiImplicitParam(name = "vcfcode", value = "仓房code", paramType = "query"),
135
             @ApiImplicitParam(name = "vcfcode", value = "仓房code", paramType = "query"),
135
             @ApiImplicitParam(name = "time", value = "更新时间", paramType = "query"),
136
             @ApiImplicitParam(name = "time", value = "更新时间", paramType = "query"),
136
             @ApiImplicitParam(name = "tid", value = "检测id", paramType = "query"),
137
             @ApiImplicitParam(name = "tid", value = "检测id", paramType = "query"),
138
+            @ApiImplicitParam(name = "orgId", value = "库id", paramType = "query"),
137
             @ApiImplicitParam(name = "type", value = "所属类型", paramType = "query")
139
             @ApiImplicitParam(name = "type", value = "所属类型", paramType = "query")
138
     })
140
     })
139
-    public ResponseEntity<PageInfo<TTimingTaskHistory>> getDetectionHistory(Integer pageNum, Integer pageSize, String vcfcode, String time, String tid,String type) {
141
+    public ResponseEntity<PageInfo<TTimingTaskHistory>> getDetectionHistory(Integer pageNum, Integer pageSize, String vcfcode, String time, String tid,String type,String orgId) {
140
         List<TTimingTaskHistory> list = null;
142
         List<TTimingTaskHistory> list = null;
141
         try {
143
         try {
142
             if (null != pageNum && null != pageSize) {
144
             if (null != pageNum && null != pageSize) {
143
                 PageHelper.startPage(pageNum, pageSize);
145
                 PageHelper.startPage(pageNum, pageSize);
144
             }
146
             }
145
-            list = tTimingTaskService.getDetectionHistory(vcfcode,time,tid,type);
147
+            list = tTimingTaskService.getDetectionHistory(vcfcode,time,tid,type,orgId);
146
         } catch (Exception e) {
148
         } catch (Exception e) {
147
             e.printStackTrace();
149
             e.printStackTrace();
148
             return ResponseEntity.failed(e.getMessage());
150
             return ResponseEntity.failed(e.getMessage());

+ 2 - 2
src/main/java/com/chinaitop/depot/intelligent/IntelligentDetection/service/TTimingTaskService.java

@@ -12,7 +12,7 @@ import java.util.List;
12
  */
12
  */
13
 public interface TTimingTaskService {
13
 public interface TTimingTaskService {
14
 
14
 
15
-    List<TTimingTask> getList(String tName, String tState, String tCategory);
15
+    List<TTimingTask> getList(String tName, String tState, String tCategory,String orgId);
16
 
16
 
17
     void save(String taskSchemaJson);
17
     void save(String taskSchemaJson);
18
 
18
 
@@ -20,5 +20,5 @@ public interface TTimingTaskService {
20
 
20
 
21
     TTimingTask getById(String id);
21
     TTimingTask getById(String id);
22
 
22
 
23
-    List<TTimingTaskHistory> getDetectionHistory(String vcfcode, String time, String tid,String type);
23
+    List<TTimingTaskHistory> getDetectionHistory(String vcfcode, String time, String tid,String type,String orgId);
24
 }
24
 }

+ 8 - 2
src/main/java/com/chinaitop/depot/intelligent/IntelligentDetection/service/impl/TTimingTaskServiceImpl.java

@@ -40,7 +40,7 @@ public class TTimingTaskServiceImpl implements TTimingTaskService {
40
 
40
 
41
 
41
 
42
     @Override
42
     @Override
43
-    public List<TTimingTask> getList(String tName, String tState, String tCategory) {
43
+    public List<TTimingTask> getList(String tName, String tState, String tCategory,String orgId) {
44
         TTimingTaskExample example = new TTimingTaskExample();
44
         TTimingTaskExample example = new TTimingTaskExample();
45
         TTimingTaskExample.Criteria criteria = example.createCriteria();
45
         TTimingTaskExample.Criteria criteria = example.createCriteria();
46
         if (StringUtils.isNotBlank(tName)) {
46
         if (StringUtils.isNotBlank(tName)) {
@@ -52,6 +52,9 @@ public class TTimingTaskServiceImpl implements TTimingTaskService {
52
         if (StringUtils.isNotBlank(tCategory)) {
52
         if (StringUtils.isNotBlank(tCategory)) {
53
             criteria.andTCategoryEqualTo(tCategory);
53
             criteria.andTCategoryEqualTo(tCategory);
54
         }
54
         }
55
+        if (StringUtils.isNotBlank(orgId)) {
56
+            criteria.andOrgIdEqualTo(orgId);
57
+        }
55
         example.setOrderByClause("t_update_time desc");
58
         example.setOrderByClause("t_update_time desc");
56
         return tTimingTaskMapper.selectByExample(example);
59
         return tTimingTaskMapper.selectByExample(example);
57
     }
60
     }
@@ -104,7 +107,7 @@ public class TTimingTaskServiceImpl implements TTimingTaskService {
104
     }
107
     }
105
 
108
 
106
     @Override
109
     @Override
107
-    public List<TTimingTaskHistory> getDetectionHistory(String vcfcode, String time, String tid, String type) {
110
+    public List<TTimingTaskHistory> getDetectionHistory(String vcfcode, String time, String tid, String type,String orgId) {
108
         TTimingTaskHistoryExample example = new TTimingTaskHistoryExample();
111
         TTimingTaskHistoryExample example = new TTimingTaskHistoryExample();
109
         TTimingTaskHistoryExample.Criteria criteria = example.createCriteria();
112
         TTimingTaskHistoryExample.Criteria criteria = example.createCriteria();
110
         if (StringUtils.isNotBlank(vcfcode)){
113
         if (StringUtils.isNotBlank(vcfcode)){
@@ -119,6 +122,9 @@ public class TTimingTaskServiceImpl implements TTimingTaskService {
119
         if (StringUtils.isNotBlank(type)){
122
         if (StringUtils.isNotBlank(type)){
120
             criteria.andTCategoryEqualTo(type);
123
             criteria.andTCategoryEqualTo(type);
121
         }
124
         }
125
+        if (StringUtils.isNotBlank(orgId)){
126
+            criteria.andOrgIdEqualTo(orgId);
127
+        }
122
         example.setOrderByClause("t_update_time desc");
128
         example.setOrderByClause("t_update_time desc");
123
         List<TTimingTaskHistory> tTimingTaskHistories = tTimingTaskHistoryMapper.selectByExample(example);
129
         List<TTimingTaskHistory> tTimingTaskHistories = tTimingTaskHistoryMapper.selectByExample(example);
124
         return tTimingTaskHistories;
130
         return tTimingTaskHistories;