Kaynağa Gözat

Merge remote-tracking branch 'origin/master' into master

mengy 5 yıl önce
ebeveyn
işleme
ae450087c6

+ 32 - 0
.classpath

@@ -0,0 +1,32 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<classpath>
3
+	<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">
4
+		<attributes>
5
+			<attribute name="optional" value="true"/>
6
+			<attribute name="maven.pomderived" value="true"/>
7
+		</attributes>
8
+	</classpathentry>
9
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
10
+		<attributes>
11
+			<attribute name="maven.pomderived" value="true"/>
12
+		</attributes>
13
+	</classpathentry>
14
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
15
+		<attributes>
16
+			<attribute name="optional" value="true"/>
17
+			<attribute name="maven.pomderived" value="true"/>
18
+			<attribute name="test" value="true"/>
19
+		</attributes>
20
+	</classpathentry>
21
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
22
+		<attributes>
23
+			<attribute name="maven.pomderived" value="true"/>
24
+		</attributes>
25
+	</classpathentry>
26
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
27
+		<attributes>
28
+			<attribute name="maven.pomderived" value="true"/>
29
+		</attributes>
30
+	</classpathentry>
31
+	<classpathentry kind="output" path="target/classes"/>
32
+</classpath>

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
1
+/target/

+ 23 - 0
.project

@@ -0,0 +1,23 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<projectDescription>
3
+	<name>depot-web</name>
4
+	<comment></comment>
5
+	<projects>
6
+	</projects>
7
+	<buildSpec>
8
+		<buildCommand>
9
+			<name>org.eclipse.jdt.core.javabuilder</name>
10
+			<arguments>
11
+			</arguments>
12
+		</buildCommand>
13
+		<buildCommand>
14
+			<name>org.eclipse.m2e.core.maven2Builder</name>
15
+			<arguments>
16
+			</arguments>
17
+		</buildCommand>
18
+	</buildSpec>
19
+	<natures>
20
+		<nature>org.eclipse.jdt.core.javanature</nature>
21
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
22
+	</natures>
23
+</projectDescription>

+ 4 - 0
.settings/org.eclipse.core.resources.prefs

@@ -0,0 +1,4 @@
1
+eclipse.preferences.version=1
2
+encoding//src/main/java=UTF-8
3
+encoding//src/main/resources=UTF-8
4
+encoding/<project>=UTF-8

+ 9 - 0
.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,9 @@
1
+eclipse.preferences.version=1
2
+org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
3
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4
+org.eclipse.jdt.core.compiler.compliance=1.8
5
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
6
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
7
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
8
+org.eclipse.jdt.core.compiler.release=disabled
9
+org.eclipse.jdt.core.compiler.source=1.8

+ 4 - 0
.settings/org.eclipse.m2e.core.prefs

@@ -0,0 +1,4 @@
1
+activeProfiles=
2
+eclipse.preferences.version=1
3
+resolveWorkspaceProjects=true
4
+version=1

+ 6 - 0
README.md

@@ -1,4 +1,10 @@
1
+<<<<<<< HEAD
1 2
 ## depot-web-yunnan
2 3
 
3 4
 云南项目
4 5
 
6
+=======
7
+# depot-web-yunnan
8
+
9
+云南项目--初始化web前端
10
+>>>>>>> ad0adf2cee271cbf9f6d2aaba351644305c3b5bd

+ 6 - 6
src/main/resources/application.properties

@@ -7,11 +7,11 @@ eureka.instance.lease-expiration-duration-in-seconds=30
7 7
 
8 8
 #数据库驱动
9 9
 spring.datasource.driverClassName = com.mysql.jdbc.Driver
10
-spring.datasource.url = jdbc:mysql://localhost:3306/depot_yunnan?useUnicode=true&characterEncoding=utf-8&useSSL=false
10
+spring.datasource.url = jdbc:mysql://172.16.0.46:3306/depot-yunnan?useUnicode=true&characterEncoding=utf-8&useSSL=false
11 11
 spring.datasource.username = root
12 12
 spring.datasource.password = 123456
13 13
 
14
-eureka.client.serviceUrl.defaultZone=http://localhost:9001/eureka/
14
+eureka.client.serviceUrl.defaultZone=http://172.16.0.46:9511/eureka/
15 15
 
16 16
 spring.application.name=depot-web
17 17
 
@@ -20,13 +20,13 @@ spring.application.name=depot-web
20 20
 #eureka.client.fetch-registry=false
21 21
 
22 22
 # Redis数据库索引(默认为0)
23
-spring.redis.database=0
23
+spring.redis.database=1
24 24
 # Redis服务器地址
25
-spring.redis.host=localhost
25
+spring.redis.host=172.16.0.46
26 26
 # Redis服务器连接端口
27
-spring.redis.port=6379
27
+spring.redis.port=6679
28 28
 # Redis服务器连接密码(默认为空)
29
-spring.redis.password=
29
+spring.redis.password=123456
30 30
 # 连接池最大连接数(使用负值表示没有限制)
31 31
 spring.redis.jedis.pool.max-active=8
32 32
 # 连接池最大阻塞等待时间(使用负值表示没有限制)

+ 42 - 0
src/main/resources/static/app/agile/service/kcswService.js

@@ -178,4 +178,46 @@ angular.module('app.agile').service("kcswService", function($rootScope,$http, $q
178 178
         });
179 179
         return d.promise;
180 180
     };
181
+    this.getFoodStatistics = function(pageNum, pageSize, houseId, pz) {
182
+        var orgId = $rootScope.orgInfo.orgId;
183
+        var d = $q.defer();
184
+        $http({
185
+            method : 'GET',
186
+            url : APP_CONFIG.agileUrl + '/agile/kcsw/getFoodStatistics',
187
+            params : {
188
+                pageNum : pageNum,
189
+                pageSize : pageSize,
190
+                orgId : orgId,
191
+                houseId : houseId,
192
+                pz : pz
193
+            }
194
+        }).then(function successCallback(response) {
195
+            // 请求成功执行代码
196
+            d.resolve(response.data);
197
+        }, function errorCallback(response) {
198
+            // 请求失败执行代码
199
+            d.reject("error");
200
+        });
201
+        return d.promise;
202
+    };
203
+    this.getFoodExport = function(houseId, pz) {
204
+        var orgId = $rootScope.orgInfo.orgId;
205
+        var d = $q.defer();
206
+        $http({
207
+            method : 'GET',
208
+            url : APP_CONFIG.agileUrl + '/agile/kcsw/getExport',
209
+            params : {
210
+                orgId : orgId,
211
+                houseId : houseId,
212
+                pz : pz
213
+            }
214
+        }).then(function successCallback(response) {
215
+            // 请求成功执行代码
216
+            d.resolve(response.data);
217
+        }, function errorCallback(response) {
218
+            // 请求失败执行代码
219
+            d.reject("error");
220
+        });
221
+        return d.promise;
222
+    };
181 223
 });

+ 3 - 13
src/main/resources/static/app/home/controller/daibsxCtrl.js

@@ -1,20 +1,10 @@
1 1
 "use strict";
2 2
 angular.module('app.system')
3
-	.controller("daibsxCtrl", function($scope, $stateParams, $rootScope,$timeout, $uibModal, selectService, safeProduceNotifyService,fumigationPlanService, APP_CONFIG) {
3
+	.controller("daibsxCtrl", function($scope, $stateParams, $rootScope,$timeout, $uibModal, selectService, safeProduceNotifyService) {
4 4
 		// 获取代办事项数据
5 5
 		$scope.loadTodoData = function() {
6
-			 selectService.getloadTodoData().then(function(data) {
7
-			        $scope.TodoSize = data;
8
-			    },function(data){
9
-			        console.log(data);
10
-			    });
11
-
12
-			// 默认分页
13
-			$scope.pageInfo = {pageNum : 1, pageSize : 10};
14
-
15
-			// 加载列表
16
-			fumigationPlanService.getFumigationApproveList($scope.pageInfo, "", $rootScope.depotInfo.orgId, $rootScope.userInfo.userId, 1).then(function(data){
17
-				$scope.fumigationTotal = data.total;
6
+			selectService.getloadTodoData().then(function(data) {
7
+				$scope.TodoSize = data;
18 8
 			},function(data){
19 9
 				console.log(data);
20 10
 			});

+ 0 - 1
src/main/resources/static/app/home/views/daibsx.html

@@ -5,7 +5,6 @@
5 5
         <div class="home-module-content">
6 6
             <ul class="list-group">
7 7
               <li class="list-group-item daib-li"><img alt="!" src="styles/img/home-1/icon1.png"/>&nbsp;<a href-void  ng-click="moreTodo()"><span style='color:white;'>智能粮库待办事项&nbsp;<span style='color:red;'>&nbsp;{{TodoSize==null?0:TodoSize}}</span>&nbsp;&nbsp;条</span></a><div class="daib-line"></div></li>
8
-              <li class="list-group-item daib-li"><img alt="!" src="styles/img/home-1/icon1.png"/>&nbsp;<a href-void  ng-click="moreTodo()"><span style='color:white;'>熏蒸作业待办事项&nbsp;<span style='color:red;'>&nbsp;{{fumigationTotal==null?0:fumigationTotal}}</span>&nbsp;&nbsp;条</span></a><div class="daib-line"></div></li>
9 8
               <li class="list-group-item daib-li"><img alt="!" src="styles/img/home-1/icon2.png"/>&nbsp;<a href-void  ng-click="safeProduceNotifyTodo()"><span style='color:white;'>安全生产通知事项&nbsp;<span style='color:red;'>&nbsp;{{totalSize==null?0:totalSize}}</span>&nbsp;&nbsp;条</span></a><div class="daib-line"></div></li>
10 9
             </ul>
11 10
         </div>

+ 14 - 13
src/main/resources/static/app/intelligent/fumigation/views/plan/fumigationList-approval.html

@@ -20,8 +20,8 @@
20 20
                                     <div ng-hide="!isNotEdit" class="form-group has-feedback"  >
21 21
 		                                <table class="table table-striped table-bordered table-hover" ng-repeat="audit in auditList" >
22 22
 		                                	<tr>
23
-		                                		<td  rowspan="3" width='10%'  >
24
-		                                			<label class="label"  style="margin-top: 45%;text-align: center;">{{audit.taskName}}</label>
23
+		                                		<td  rowspan="2" width='10%'  >
24
+		                                			<label class="label"  style="margin-top: 35%;text-align: center;">{{audit.taskName}}</label>
25 25
 		                                		</td>
26 26
 		                                		<td>
27 27
 		                                			<label class="label" style="margin-top: 9px;text-align: center;">处理人</label>
@@ -32,26 +32,26 @@
32 32
 		                                		<td >
33 33
 		                                			<label class="label" style="margin-top: 9px;text-align: center;">提交部门</label>
34 34
 		                                		</td>
35
-		                                		<td colspan="2" width='30%' style="margin-top: 9px;text-align: center;">
35
+		                                		<td width='30%' style="margin-top: 9px;text-align: center;">
36 36
 		                                			<label class="label" style="margin-top: 9px;text-align: center;">{{audit.fromDepartment}}</label>
37 37
 		                                		</td>
38 38
 		                                	</tr>
39 39
 		                                	<tr>
40
-		                                		<td rowspan="2">
40
+		                                		<td>
41 41
 		                                			<label class="label" style="margin-top: 20px;text-align: center;">审批意见</label>
42 42
 		                                		</td>
43
-		                                		<td colspan="4" style="margin-top: 9px;text-align: center;">
43
+		                                		<td colspan="3" style="margin-top: 9px;text-align: center;">
44 44
 		                                			<label class="label" style="margin-top: 9px;text-align: center;">{{audit.content}}</label>
45 45
 		                                		</td>
46 46
 		                                	</tr>
47
-		                                	<tr>
48
-		                                		<td colspan="3" style="border-top: 0px;border-right: 0px;">
49
-		                                			<!-- 签字前面 -->
50
-		                                		</td>
51
-		                                		<td width='30%' style="border-top: 0px;border-left: 0px;">
52
-		                                		电子签名
53
-		                                		</td>
54
-		                                	</tr>
47
+<!--		                                	<tr>-->
48
+<!--		                                		<td colspan="3" style="border-top: 0px;border-right: 0px;">-->
49
+<!--		                                			&lt;!&ndash; 签字前面 &ndash;&gt;-->
50
+<!--		                                		</td>-->
51
+<!--		                                		<td width='30%' style="border-top: 0px;border-left: 0px;">-->
52
+<!--		                                		电子签名-->
53
+<!--		                                		</td>-->
54
+<!--		                                	</tr>-->
55 55
 		                                </table>
56 56
 		                                <input type="text" ng-model="state" ng-hide="false" name="state" hidden="true">
57 57
                                     </div>
@@ -74,6 +74,7 @@
74 74
                             </form>
75 75
                         </div>
76 76
                     </div>
77
+				</div>
77 78
             </article>
78 79
         </div>
79 80
     </section>

+ 1 - 1
src/main/resources/static/app/layout/partials/navigation.tpl.html

@@ -700,7 +700,7 @@
700 700
                         <a has-func="197" href="#"><i class="fa fa-fw fa-folder-open"></i>决策支持</a>
701 701
                         <ul>
702 702
                             <li has-func="198">
703
-                                <a data-ui-sref="app.supervise.decisionSupport.storeSuperviseList">库存监管统计</a>
703
+                                <a data-ui-sref="app.supervise.decisionSupport.foodStatisticsList">粮食品种统计</a>
704 704
                             </li>
705 705
                             <!--粮食购销统计-->
706 706
                             <li has-func="199" data-menu-collapse>

BIN
src/main/resources/static/app/mould/粮食品种统计模板.xlsx


+ 39 - 0
src/main/resources/static/app/supervise/controller/foodStatisticsCtrl.js

@@ -0,0 +1,39 @@
1
+"use strict";
2
+
3
+angular.module('app.supervise')
4
+.controller("foodStatisticsCtrl", function($scope, $rootScope, $state, $timeout, kcswService) {
5
+
6
+    // 获取列表数据
7
+    $scope.pageInfo = {pageNum : 1, pageSize : 10};
8
+    $scope.searchCondition = {houseId : "", pz : ""};
9
+
10
+    $scope.loadData = function() {
11
+        kcswService.getFoodStatistics($scope.pageInfo.pageNum, $scope.pageInfo.pageSize, $scope.searchCondition.houseId, $scope.searchCondition.pz).then(function(data){
12
+            $scope.pageInfo = data.pageInfo;
13
+            $scope.foodStatistics = data.foodStatistics;
14
+        },function(data){
15
+            console.log(data);
16
+        });
17
+    };
18
+    $scope.loadData();
19
+
20
+    $scope.getFoodExport = function() {
21
+        kcswService.getFoodExport($scope.searchCondition.houseId, $scope.searchCondition.pz).then(function(data){
22
+            $scope.fileAllpath = data.fileAllpath;
23
+            // $scope.fileAllpath = "app/agile/service/粮食品种统计模板.xlsx";
24
+            $timeout(function () {
25
+                document.getElementById("foodExport").click();
26
+            },100)
27
+        },function(data){
28
+            console.log(data);
29
+        });
30
+    };
31
+
32
+    // 翻页
33
+    $scope.goPage = function(pageNum) {
34
+        if ($scope.pageInfo.pageNum != pageNum && pageNum > 0) {
35
+            $scope.pageInfo.pageNum = pageNum;
36
+            $scope.loadData();
37
+        }
38
+    }
39
+});

+ 6 - 9
src/main/resources/static/app/supervise/module.js

@@ -508,19 +508,16 @@ angular.module('app.supervise', ['ui.router','app.basic','app.business','app.ala
508 508
                     }
509 509
                 }
510 510
             })
511
-            // 库存监管统计
512
-            .state('app.supervise.decisionSupport.storeSuperviseList', {
513
-                    url: '/decisionSupport/storeSuperviseList/:id',
511
+            // 库存粮食品种统计
512
+            .state('app.supervise.decisionSupport.foodStatisticsList', {
513
+                    url: '/decisionSupport/foodStatisticsList',
514 514
                     data: {
515
-                        title: '库存监管统计'
516
-                    },
517
-                    params:{
518
-                        isNotEdit : true
515
+                        title: '粮食品种统计'
519 516
                     },
520 517
                     views: {
521 518
                         "content@app": {
522
-                            controller: 'numberManageCtrl',
523
-                            templateUrl: 'app/storage/views/numberManage/numberManage-list.html'
519
+                            controller: 'foodStatisticsCtrl',
520
+                            templateUrl: 'app/supervise/views/foodStatistical-list.html'
524 521
                         }
525 522
                     }
526 523
                 }

+ 109 - 0
src/main/resources/static/app/supervise/views/foodStatistical-list.html

@@ -0,0 +1,109 @@
1
+<!-- MAIN CONTENT -->
2
+<div id="content">
3
+    <!-- widget grid -->
4
+    <section widget-grid id="widget-grid">
5
+        <div class="row">
6
+            <article class="col-sm-12">
7
+                <div jarvis-widget id="standard-datatable-widget" data-widget-color="darken" data-widget-editbutton="false">
8
+                    <div>
9
+                        <div class="widget-body no-padding">
10
+                            <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper form-inline no-footer">
11
+                                <div class="dt-toolbar">
12
+                                    <div class="col-xs-12 col-sm-8">
13
+                                        <div class="form-group">
14
+                                            <label> 仓房名称:&emsp;
15
+                                                <select ng-model="searchCondition.houseId" class="form-control input-sm"
16
+                                                        ng-options="store.storehouseId as store.storehouseName for store in storelist">
17
+                                                    <option value="">请选择</option>
18
+                                                </select>&emsp;
19
+                                            </label>
20
+                                            <label> 粮油品种:
21
+                                                <select ng-model="searchCondition.pz" class="form-control input-sm"
22
+                                                        ng-options="enum.enumid as enum.enumname for enum in dicDataList[1061]">
23
+                                                    <option value="">请选择</option>
24
+                                                </select>&emsp;
25
+                                            </label>
26
+                                            <a class="btn btn-default btn-sm"  ng-click="loadData()">
27
+                                                <i class="fa fa-search"></i>&nbsp;查&nbsp;询
28
+                                            </a>
29
+                                            <a class="btn btn-default btn-sm"  ng-click="getFoodExport()">
30
+                                                <i class="fa fa-search"></i>&nbsp;导&nbsp;出
31
+                                            </a>
32
+                                            <a ng-href="{{fileAllpath}}" id="foodExport" ng-hide="true"></a>
33
+                                        </div>
34
+                                    </div>
35
+
36
+                                    <div class="col-sm-3 col-xs-4 hidden-xs">
37
+                                        <div class="dataTables_length">
38
+                                            <label>每页显示 <select ng-model="pageInfo.pageSize" ng-change="loadData()"
39
+                                                                ng-options="num as num for num in [10,25,50,100]"
40
+                                                                class="form-control input-sm"></select> 条
41
+                                            </label>
42
+                                        </div>
43
+                                    </div>
44
+                                </div>
45
+
46
+                                <table class="table table-striped table-bordered table-hover" width="100%">
47
+                                    <thead>
48
+                                    <tr>
49
+                                        <th rowspan="3" style="text-align:center;vertical-align:middle;">仓号</th>
50
+                                        <th colspan="5" style="text-align:center;">品种</th>
51
+                                        <th rowspan="3" style="text-align:center;vertical-align:middle;">品种合计(KG)</th>
52
+                                    </tr>
53
+                                    <tr>
54
+                                        <th rowspan="2" style="text-align:center;vertical-align:middle;">小麦(KG)</th>
55
+                                        <th rowspan="2" style="text-align:center;vertical-align:middle;">稻谷小计(KG)</th>
56
+                                        <th colspan="2" style="text-align:center;">稻谷(KG)</th>
57
+                                        <th rowspan="2" style="text-align:center;vertical-align:middle;">玉米(KG)</th>
58
+                                    </tr>
59
+                                    <tr>
60
+                                        <th style="text-align:center;">中晚籼稻(KG)</th>
61
+                                        <th style="text-align:center;">粳稻(KG)</th>
62
+                                    </tr>
63
+                                    <tr>
64
+                                        <th style="text-align:center;">总计(KG)</th>
65
+                                        <th style="text-align:center;">{{foodStatistics.xm}}</th>
66
+                                        <th style="text-align:center;">{{foodStatistics.dg}}</th>
67
+                                        <th style="text-align:center;">{{foodStatistics.xd}}</th>
68
+                                        <th style="text-align:center;">{{foodStatistics.jd}}</th>
69
+                                        <th style="text-align:center;">{{foodStatistics.ym}}</th>
70
+                                        <th style="text-align:center;">{{foodStatistics.totalNumber}}</th>
71
+                                    </tr>
72
+                                    </thead>
73
+
74
+                                    <tbody>
75
+                                    <tr ng-repeat="foodSpecies in pageInfo.list">
76
+                                        <td style="text-align:center;">{{storehouseObj[foodSpecies.ch].storehouseName}}</td>
77
+                                        <td style="text-align:center;">
78
+                                            <span ng-if="foodSpecies.pz==3164">{{ foodSpecies.kcsl }}</span>
79
+                                            <span ng-if="foodSpecies.pz!=3164"></span>
80
+                                        </td>
81
+                                        <td></td>
82
+                                        <td style="text-align:center;">
83
+                                            <span ng-if="foodSpecies.pz==3218 || foodSpecies.pz==3219">{{ foodSpecies.kcsl }}</span>
84
+                                            <span ng-if="foodSpecies.pz!=3218 && foodSpecies.pz!=3219"></span>
85
+                                        </td>
86
+                                        <td style="text-align:center;">
87
+                                            <span ng-if="foodSpecies.pz==3220 || foodSpecies.pz==3221">{{ foodSpecies.kcsl }}</span>
88
+                                            <span ng-if="foodSpecies.pz!=3220 && foodSpecies.pz!=3221"></span>
89
+                                        </td>
90
+                                        <td style="text-align:center;">
91
+                                            <span ng-if="foodSpecies.pz==3165">{{ foodSpecies.kcsl }}</span>
92
+                                            <span ng-if="foodSpecies.pz!=3165"></span>
93
+                                        </td>
94
+                                        <td></td>
95
+                                    </tr>
96
+                                    </tbody>
97
+
98
+                                </table>
99
+                                <div smart-include="app/layout/partials/page.tpl.html"></div>
100
+                            </div>
101
+                        </div>
102
+                    </div>
103
+                </div>
104
+            </article>
105
+        </div>
106
+
107
+    </section>
108
+
109
+</div>