Ver código fonte

添加查询条件-代码优化-01

hanqingsong 5 anos atrás
pai
commit
5d364125d5

+ 20 - 0
depot-intelligent/src/main/java/com/chinaitop/depot/intelligent/common/ConstantCommon.java

@@ -0,0 +1,20 @@
1
+package com.chinaitop.depot.intelligent.common;
2
+
3
+/**
4
+ * @author qingsong.han
5
+ * @description: 公共常量
6
+ * @create 2020-12-24 9:37
7
+ */
8
+public class ConstantCommon {
9
+
10
+    /**
11
+     * 检测类型
12
+     * 0:粮情;1:油情;2:水分
13
+     */
14
+    public static final String CHECK_TYPE = "检测类型不能为空!";
15
+    /**
16
+     * 库点编码
17
+     */
18
+    public static final String ORGID_NOT_NULL = "组织机构编码不能为空!";
19
+
20
+}

+ 2 - 1
depot-web/src/main/resources/static/app/intelligent/grainDetection/controller/humitureDetectionCtrl.js

@@ -115,7 +115,8 @@ angular.module('app.intelligent').controller("humitureDetectionCtrl", function (
115
 
115
 
116
     // 清空搜索时间
116
     // 清空搜索时间
117
     $scope.emptyTime = function () {
117
     $scope.emptyTime = function () {
118
-        $scope.search.time = '';
118
+        $scope.search.startTime = '';
119
+        $scope.search.endTime = '';
119
         $scope.search.vCfCode = '';
120
         $scope.search.vCfCode = '';
120
         $scope.loadData();
121
         $scope.loadData();
121
     };
122
     };

+ 3 - 2
depot-web/src/main/resources/static/app/intelligent/grainDetection/service/temperatureRecordService.js

@@ -1,5 +1,5 @@
1
 "use strict";
1
 "use strict";
2
-angular.module('app.intelligent').service("temperatureRecordService", function($http, $q, APP_CONFIG) {
2
+angular.module('app.intelligent').service("temperatureRecordService", function($http, $q, APP_CONFIG, $rootScope) {
3
     // 测温记录
3
     // 测温记录
4
     // 分页列表数据
4
     // 分页列表数据
5
     this.getTemperatureRecordPageInfo = function (pageInfo,search,tType) {
5
     this.getTemperatureRecordPageInfo = function (pageInfo,search,tType) {
@@ -14,7 +14,8 @@ angular.module('app.intelligent').service("temperatureRecordService", function($
14
                 startTime : search == undefined ? "":search.startTime,
14
                 startTime : search == undefined ? "":search.startTime,
15
                 endTime : search == undefined ? "":search.endTime,
15
                 endTime : search == undefined ? "":search.endTime,
16
                 vCfCode : search == undefined ? "":search.vCfCode,
16
                 vCfCode : search == undefined ? "":search.vCfCode,
17
-                tType: tType
17
+                tType: tType,
18
+                orgId : $rootScope.orgInfo.orgId
18
             }
19
             }
19
         }).then(function successCallback(response) {
20
         }).then(function successCallback(response) {
20
             // 请求成功执行代码
21
             // 请求成功执行代码

+ 2 - 1
depot-web/src/main/resources/static/app/intelligent/grainDetection/views/humitureDetection-list.html

@@ -26,7 +26,8 @@
26
                                             </select>&emsp;
26
                                             </select>&emsp;
27
                                         </label>
27
                                         </label>
28
                                         <label>检测时间:
28
                                         <label>检测时间:
29
-                                            <input style="width: 100px;" type="text" ng-model="search.time" name="time" class="form-control" data-smart-datepicker>&nbsp;
29
+                                            <input style="width: 100px;" type="text" ng-model="search.startTime" name="startTime" class="form-control" data-smart-datepicker>
30
+                                            --<input style="width: 100px;" type="text" ng-model="search.endTime" name="endTime" class="form-control" data-smart-datepicker>&nbsp;
30
                                             <a class="btn btn-default btn-sm" ng-click="loadData()"> <i class="fa fa-search"></i>&nbsp;查&nbsp;询</a>
31
                                             <a class="btn btn-default btn-sm" ng-click="loadData()"> <i class="fa fa-search"></i>&nbsp;查&nbsp;询</a>
31
                                             <a class="btn btn-default btn-sm" ng-click="emptyTime()"> <i class=""></i>&nbsp;清&nbsp;空</a>
32
                                             <a class="btn btn-default btn-sm" ng-click="emptyTime()"> <i class=""></i>&nbsp;清&nbsp;空</a>
32
                                         </label>
33
                                         </label>

+ 2 - 1
depot-web/src/main/resources/static/app/intelligent/grainInspect/controller/grainAnalyzeCtrl.js

@@ -95,7 +95,8 @@ angular.module('app.intelligent').controller("grainAnalyzeCtrl", function($scope
95
     };
95
     };
96
     // 清空
96
     // 清空
97
     $scope.emptyTime = function() {
97
     $scope.emptyTime = function() {
98
-        $scope.search.time = '';
98
+        $scope.search.startTime = '';
99
+        $scope.search.endTime = '';
99
         $scope.search.vCfCode = '';
100
         $scope.search.vCfCode = '';
100
         $scope.loadData();
101
         $scope.loadData();
101
     };
102
     };

+ 14 - 16
depot-web/src/main/resources/static/app/intelligent/grainInspect/views/grainAnalyze-list.html

@@ -14,25 +14,23 @@
14
                         <div class="widget-body no-padding">
14
                         <div class="widget-body no-padding">
15
                             <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper form-inline no-footer">
15
                             <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper form-inline no-footer">
16
                                 <div class="dt-toolbar">
16
                                 <div class="dt-toolbar">
17
-                                    <div class="col-xs-12 col-sm-4">
17
+                                    <div class="col-xs-12 col-sm-10">
18
                                         <a class="btn btn-default btn-sm" ng-click="grainSituationTrend()"> <i class="fa fa-search"></i>&nbsp;粮情趋势</a>
18
                                         <a class="btn btn-default btn-sm" ng-click="grainSituationTrend()"> <i class="fa fa-search"></i>&nbsp;粮情趋势</a>
19
                                         <a class="btn btn-default btn-sm" ng-click="grainSituationComparison()"> <i class="fa fa-search"></i>&nbsp;粮情对比</a>
19
                                         <a class="btn btn-default btn-sm" ng-click="grainSituationComparison()"> <i class="fa fa-search"></i>&nbsp;粮情对比</a>
20
                                       <!--  <a class="btn btn-default btn-sm" ng-click="PointAllGrainComparison()"> <i class="fa fa-search"></i>&nbsp;所有点粮情对比</a>-->
20
                                       <!--  <a class="btn btn-default btn-sm" ng-click="PointAllGrainComparison()"> <i class="fa fa-search"></i>&nbsp;所有点粮情对比</a>-->
21
-                                    </div>
22
-                                    <div class="col-xs-12 col-sm-6">
23
-                                        <div class="form-group">
24
-                                            <label> 仓房名称:
25
-                                                <select ng-model="search.vCfCode" class="form-control input-sm"
26
-                                                        ng-options="store.storehouseCode as store.storehouseName for store in storelist">
27
-                                                    <option value="">请选择</option>
28
-                                                </select>&emsp;
29
-                                            </label>
30
-                                            <label>
31
-                                                检测时间:<input style="width: 100px;" type="text" ng-model="search.time" name="time" class="form-control" data-smart-datepicker>&nbsp;
32
-                                                <a class="btn btn-default btn-sm" ng-click="loadData()"> <i class="fa fa-search"></i>&nbsp;查&nbsp;询</a>
33
-                                                <a class="btn btn-default btn-sm" ng-click="emptyTime()"> <i class=""></i>&nbsp;清&nbsp;空</a>
34
-                                            </label>
35
-                                        </div>
21
+                                        <label> 仓房名称:
22
+                                            <select ng-model="search.vCfCode" class="form-control input-sm"
23
+                                                    ng-options="store.storehouseCode as store.storehouseName for store in storelist">
24
+                                                <option value="">请选择</option>
25
+                                            </select>&emsp;
26
+                                        </label>
27
+                                        <label>
28
+                                            检测时间:
29
+                                            <input style="width: 100px;" type="text" ng-model="search.startTime" name="startTime" class="form-control" data-smart-datepicker>
30
+                                            --<input style="width: 100px;" type="text" ng-model="search.endTime" name="endTime" class="form-control" data-smart-datepicker>&nbsp;
31
+                                            <a class="btn btn-default btn-sm" ng-click="loadData()"> <i class="fa fa-search"></i>&nbsp;查&nbsp;询</a>
32
+                                            <a class="btn btn-default btn-sm" ng-click="emptyTime()"> <i class=""></i>&nbsp;清&nbsp;空</a>
33
+                                        </label>
36
                                     </div>
34
                                     </div>
37
                                     <div class="col-sm-2 col-xs-2 hidden-xs">
35
                                     <div class="col-sm-2 col-xs-2 hidden-xs">
38
                                         <div class="dataTables_length">
36
                                         <div class="dataTables_length">