Quellcode durchsuchen

设备模块管理修改

wangchao vor 4 Jahren
Ursprung
Commit
bd0198b380

+ 185 - 0
location-rescue-service/location-rescue-service.iml

@ -0,0 +1,185 @@
1
<?xml version="1.0" encoding="UTF-8"?>
2
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" version="4">
3
  <component name="FacetManager">
4
    <facet type="jpa" name="JPA">
5
      <configuration>
6
        <setting name="validation-enabled" value="true" />
7
        <setting name="provider-name" value="Hibernate" />
8
        <datasource-mapping>
9
          <factory-entry name="Entities" />
10
          <factory-entry name="entityManagerFactory" />
11
        </datasource-mapping>
12
        <naming-strategy-map />
13
      </configuration>
14
    </facet>
15
    <facet type="Spring" name="Spring">
16
      <configuration />
17
    </facet>
18
    <facet type="web" name="Web">
19
      <configuration>
20
        <webroots />
21
      </configuration>
22
    </facet>
23
  </component>
24
  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
25
    <output url="file://$MODULE_DIR$/target/classes" />
26
    <output-test url="file://$MODULE_DIR$/target/test-classes" />
27
    <content url="file://$MODULE_DIR$">
28
      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
29
      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
30
      <excludeFolder url="file://$MODULE_DIR$/target" />
31
    </content>
32
    <orderEntry type="inheritedJdk" />
33
    <orderEntry type="sourceFolder" forTests="false" />
34
    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.0.3" level="project" />
35
    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.0" level="project" />
36
    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.11" level="project" />
37
    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.8" level="project" />
38
    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
39
    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.8" level="project" />
40
    <orderEntry type="library" name="Maven: com.ai.bss:work-tool-service-api:2.1-SNAPSHOT" level="project" />
41
    <orderEntry type="library" name="Maven: com.ai.bss:work-tool-model:2.1-SNAPSHOT" level="project" />
42
    <orderEntry type="library" name="Maven: com.ai.abc:persistence-mysql8:2.1-SNAPSHOT" level="project" />
43
    <orderEntry type="library" name="Maven: com.ai.abc:persistence-api:2.1-SNAPSHOT" level="project" />
44
    <orderEntry type="library" name="Maven: com.ai.abc:core:2.1-SNAPSHOT" level="project" />
45
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:2.1.5.RELEASE" level="project" />
46
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.1.5.RELEASE" level="project" />
47
    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.4" level="project" />
48
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.5.RELEASE" level="project" />
49
    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
50
    <orderEntry type="library" name="Maven: javax.transaction:javax.transaction-api:1.3" level="project" />
51
    <orderEntry type="library" name="Maven: org.springframework:spring-aspects:5.1.7.RELEASE" level="project" />
52
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.5.RELEASE" level="project" />
53
    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.1.8.RELEASE" level="project" />
54
    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.1.8.RELEASE" level="project" />
55
    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.1.7.RELEASE" level="project" />
56
    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.1.6.RELEASE" level="project" />
57
    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.36.Final" level="project" />
58
    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.36.Final" level="project" />
59
    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.36.Final" level="project" />
60
    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.36.Final" level="project" />
61
    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.36.Final" level="project" />
62
    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.36.Final" level="project" />
63
    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.2.9.RELEASE" level="project" />
64
    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
65
    <orderEntry type="library" name="Maven: redis.clients:jedis:2.9.3" level="project" />
66
    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.6.2" level="project" />
67
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.5.RELEASE" level="project" />
68
    <orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final" level="project" />
69
    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:2.1.8.RELEASE" level="project" />
70
    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.8.RELEASE" level="project" />
71
    <orderEntry type="library" name="Maven: org.springframework:spring-orm:5.1.7.RELEASE" level="project" />
72
    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.7.RELEASE" level="project" />
73
    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.7.RELEASE" level="project" />
74
    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.7.RELEASE" level="project" />
75
    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.7.RELEASE" level="project" />
76
    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.7.RELEASE" level="project" />
77
    <orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.9.4" level="project" />
78
    <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.10.Final" level="project" />
79
    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
80
    <orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
81
    <orderEntry type="library" name="Maven: org.javassist:javassist:3.23.2-GA" level="project" />
82
    <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
83
    <orderEntry type="library" name="Maven: org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final" level="project" />
84
    <orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
85
    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
86
    <orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
87
    <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
88
    <orderEntry type="library" name="Maven: org.hibernate:hibernate-envers:5.3.10.Final" level="project" />
89
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.1.5.RELEASE" level="project" />
90
    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.7.RELEASE" level="project" />
91
    <orderEntry type="library" name="Maven: net.sf.ehcache:ehcache-core:2.6.9" level="project" />
92
    <orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:8.0.16" level="project" />
93
    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.protobuf:protobuf-java:3.6.1" level="project" />
94
    <orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.17" level="project" />
95
    <orderEntry type="library" name="Maven: com.alibaba:druid:1.1.17" level="project" />
96
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.5.RELEASE" level="project" />
97
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.5.RELEASE" level="project" />
98
    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.8" level="project" />
99
    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.8" level="project" />
100
    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.8" level="project" />
101
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.5.RELEASE" level="project" />
102
    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.19" level="project" />
103
    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.19" level="project" />
104
    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.19" level="project" />
105
    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.16.Final" level="project" />
106
    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
107
    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.7.RELEASE" level="project" />
108
    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.7.RELEASE" level="project" />
109
    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.7.RELEASE" level="project" />
110
    <orderEntry type="library" name="Maven: com.ai.bss:components-common:2.1-SNAPSHOT" level="project" />
111
    <orderEntry type="library" name="Maven: com.ai.abc:api-common:2.1-SNAPSHOT" level="project" />
112
    <orderEntry type="library" name="Maven: com.ai.abc:exception:2.1-SNAPSHOT" level="project" />
113
    <orderEntry type="library" name="Maven: com.ai.abc:utils:2.1-SNAPSHOT" level="project" />
114
    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
115
    <orderEntry type="library" name="Maven: org.json:json:20180130" level="project" />
116
    <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
117
    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.69" level="project" />
118
    <orderEntry type="library" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
119
    <orderEntry type="library" name="Maven: net.minidev:json-smart:2.3" level="project" />
120
    <orderEntry type="library" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
121
    <orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
122
    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" />
123
    <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
124
    <orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.3.2" level="project" />
125
    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
126
    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
127
    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" />
128
    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
129
    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
130
    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
131
    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
132
    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
133
    <orderEntry type="library" name="Maven: com.google.guava:guava:27.1-jre" level="project" />
134
    <orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
135
    <orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
136
    <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
137
    <orderEntry type="library" name="Maven: org.checkerframework:checker-qual:2.5.2" level="project" />
138
    <orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.2.0" level="project" />
139
    <orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.1" level="project" />
140
    <orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.17" level="project" />
141
    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
142
    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
143
    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
144
    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
145
    <orderEntry type="library" name="Maven: com.ai.bss:work-tool-service:2.1-SNAPSHOT" level="project" />
146
    <orderEntry type="library" name="Maven: com.ai.bss:system-user-service:2.1-SNAPSHOT" level="project" />
147
    <orderEntry type="library" name="Maven: com.ai.bss:system-user-model:2.1-SNAPSHOT" level="project" />
148
    <orderEntry type="library" name="Maven: com.ai.bss:person-model:2.1-SNAPSHOT" level="project" />
149
    <orderEntry type="library" name="Maven: com.ai.bss:system-user-service-api:2.1-SNAPSHOT" level="project" />
150
    <orderEntry type="library" name="Maven: com.ai.bss:person-service:2.1-SNAPSHOT" level="project" />
151
    <orderEntry type="library" name="Maven: com.ai.bss:person-service-api:2.1-SNAPSHOT" level="project" />
152
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.5.RELEASE" level="project" />
153
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.5.RELEASE" level="project" />
154
    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
155
    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
156
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-test:2.1.5.RELEASE" level="project" />
157
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.5.RELEASE" level="project" />
158
    <orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
159
    <orderEntry type="library" name="Maven: org.assertj:assertj-core:3.11.1" level="project" />
160
    <orderEntry type="library" name="Maven: org.mockito:mockito-core:2.23.4" level="project" />
161
    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.12" level="project" />
162
    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.12" level="project" />
163
    <orderEntry type="library" name="Maven: org.objenesis:objenesis:2.6" level="project" />
164
    <orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
165
    <orderEntry type="library" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
166
    <orderEntry type="library" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
167
    <orderEntry type="library" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
168
    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.7.RELEASE" level="project" />
169
    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.7.RELEASE" level="project" />
170
    <orderEntry type="library" name="Maven: org.springframework:spring-test:5.1.7.RELEASE" level="project" />
171
    <orderEntry type="library" name="Maven: org.xmlunit:xmlunit-core:2.6.2" level="project" />
172
    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
173
    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.8" level="project" />
174
    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.8" level="project" />
175
    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
176
    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.8" level="project" />
177
    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.5.RELEASE" level="project" />
178
    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
179
    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
180
    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.26" level="project" />
181
    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" />
182
    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" />
183
    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.26" level="project" />
184
  </component>
185
</module>

+ 13 - 0
location-rescue-service/pom.xml

@ -50,6 +50,19 @@
50 50
            <groupId>org.apache.httpcomponents</groupId>
51 51
            <artifactId>httpmime</artifactId>
52 52
        </dependency>
53
54
        <dependency>
55
            <groupId>com.ai.bss</groupId>
56
            <artifactId>work-tool-service-api</artifactId>
57
            <version>2.1-SNAPSHOT</version>
58
        </dependency>
59
60
        <dependency>
61
            <groupId>com.ai.bss</groupId>
62
            <artifactId>work-tool-service</artifactId>
63
            <version>2.1-SNAPSHOT</version>
64
        </dependency>
65
53 66
        <!-- <dependency>
54 67
            <groupId>com.ai.ipu</groupId>
55 68
            <artifactId>ipu-common</artifactId>

+ 37 - 34
location-rescue-service/src/main/java/com/ai/bss/location/rescue/controller/EquipmentManageController.java

@ -4,15 +4,20 @@ import java.util.HashMap;
4 4
import java.util.List;
5 5
import java.util.Map;
6 6
7
import com.ai.abc.api.model.CommonRequest;
8
import com.ai.abc.api.model.CommonResponse;
9
import com.ai.bss.components.common.model.PageInfo;
10
import com.ai.bss.work.tool.model.ResourceTool;
11
import com.ai.bss.work.tool.model.ResourceToolType;
7 12
import org.slf4j.Logger;
8 13
import org.slf4j.LoggerFactory;
9 14
import org.springframework.beans.factory.annotation.Autowired;
10 15
import org.springframework.stereotype.Controller;
16
import org.springframework.web.bind.annotation.RequestBody;
11 17
import org.springframework.web.bind.annotation.RequestMapping;
12 18
import org.springframework.web.bind.annotation.ResponseBody;
13 19
14 20
import com.ai.bss.location.rescue.service.interfaces.EquipmentManageService;
15
import com.github.pagehelper.PageInfo;
16 21
17 22
/**
18 23
 * 设备管理
@ -27,14 +32,13 @@ public class EquipmentManageController {
27 32
28 33
	/**
29 34
	 * 分页查询设备信息
35
	 * @return
30 36
	 */
31 37
	@ResponseBody
32 38
	@RequestMapping("/queryEquipmentInfo")
33
	public Map<String, Object> queryEquipmentInfo(Map<String, Object> params) throws Exception {
34
		PageInfo equipmentList = equipmentManageService.queryEquipmentInfo(params);
35
		Map<String, Object> result = new HashMap<String, Object>();
36
		result.put("result", equipmentList);
37
		return result;
39
	public CommonResponse<PageInfo<Map<String, Object>>> queryEquipmentInfo(CommonRequest<HashMap<String, Object>> conditionMap) throws Exception {
40
		conditionMap.getData().put("workOrgId","0000");
41
		return equipmentManageService.queryEquipmentInfo(conditionMap);
38 42
	}
39 43
40 44
	/**
@ -77,29 +81,23 @@ public class EquipmentManageController {
77 81
	}
78 82
79 83
	/**
80
	 * 编辑设备信息、新增设备信息
84
	 * 编辑设备信息
81 85
	 */
82 86
	@ResponseBody
83 87
	@RequestMapping("/modifyEquipmentInfo")
84
	public Map<String,Object> modifyEquipmentInfo(Map<String,Object> params) throws Exception {
85
		int num = 0;
86
		// 取值判断如果有当前id则为修改,否则为新增
87
		try {
88
			if (Integer.parseInt(String.valueOf(params.get("FACILITY_ID"))) != 0) {
89
				num = equipmentManageService.modifyEquipmentInfo(params);
90
			} else {
91
				num = equipmentManageService.addEquipmentInfo(params);
92
			}
93
		} catch (Exception e) {
94
			logger.error("异常,原因为:" + e.getMessage());
95
		}
96
		Map<String,Object> result = new HashMap<String,Object>();
97
		if (num > 0) {
98
			result.put("result", true);
99
		} else {
100
			result.put("result", false);
101
		}
102
		return result;
88
	public CommonResponse<ResourceTool> modifyEquipmentInfo(@RequestBody CommonRequest<ResourceTool> resourceToolCommonRequest) throws Exception {
89
			return equipmentManageService.modifyEquipmentInfo(resourceToolCommonRequest);
90
	}
91
92
	/**
93
	 * 新增设备信息
94
	 */
95
	@ResponseBody
96
	@RequestMapping("/createEquipmentInfo")
97
	public CommonResponse<ResourceTool> createEquipmentInfo(@RequestBody CommonRequest<ResourceTool> resourceToolCommonRequest) throws Exception {
98
		resourceToolCommonRequest.getData().setWorkOrgId("0000");
99
		CommonResponse<ResourceTool> commonResponse	= equipmentManageService.createEquipmentInfo(resourceToolCommonRequest);
100
		return commonResponse;
103 101
	}
104 102
105 103
	/**
@ -107,14 +105,19 @@ public class EquipmentManageController {
107 105
	 */
108 106
	@ResponseBody
109 107
	@RequestMapping("/deleteEquipmentInfo")
110
	public Map<String,Object> deleteEquipmentInfo(Map<String,Object> params) throws Exception {
111
		boolean flag = false;
112
		if (Integer.parseInt(String.valueOf(params.get("FACILITY_ID"))) != 0) {
113
			flag = equipmentManageService.deleteEquipmentInfo(params);
114
		}
115
		Map<String,Object> result = new HashMap<String,Object>();
116
		result.put("result", flag);
117
		return result;
108
	public CommonResponse<ResourceTool> deleteEquipmentInfo(@RequestBody CommonRequest<List<String>> resourceToolCommonRequest) throws Exception {
109
110
		return	 equipmentManageService.deleteEquipmentInfo(resourceToolCommonRequest);
111
	}
112
113
	/**
114
	 * 获取所有设备类型
115
	 */
116
	@ResponseBody
117
	@RequestMapping("/loadAllResourceToolType")
118
	public CommonResponse<List<ResourceToolType>>  loadAllResourceToolType(@RequestBody CommonRequest commonRequest) throws Exception {
119
120
		return	 equipmentManageService.loadAllResourceToolType(commonRequest);
118 121
	}
119 122
120 123
	/**

+ 5 - 0
location-rescue-service/src/main/java/com/ai/bss/location/rescue/dao/interfaces/EquipmentManageDao.java

@ -3,6 +3,9 @@ package com.ai.bss.location.rescue.dao.interfaces;
3 3
import java.util.List;
4 4
import java.util.Map;
5 5
6
import com.ai.abc.api.model.CommonRequest;
7
import com.ai.abc.api.model.CommonResponse;
8
import com.ai.bss.work.tool.model.ResourceTool;
6 9
import com.github.pagehelper.PageInfo;
7 10
8 11
public interface EquipmentManageDao {
@ -24,4 +27,6 @@ public interface EquipmentManageDao {
24 27
    List<Map<String, Object>> queryAllEquipmentInfo(Map<String,Object> params) throws Exception;
25 28
26 29
    Map<String, Object> verifyEquipmentInfoRepetition(Map<String,Object> params) throws Exception;
30
31
27 32
}

+ 33 - 12
location-rescue-service/src/main/java/com/ai/bss/location/rescue/service/impl/EquipmentManageServiceImpl.java

@ -1,18 +1,24 @@
1 1
package com.ai.bss.location.rescue.service.impl;
2 2
3 3
4
import com.ai.abc.api.model.CommonRequest;
5
import com.ai.abc.api.model.CommonResponse;
6
import com.ai.bss.components.common.model.PageInfo;
4 7
import com.ai.bss.location.rescue.dao.interfaces.DeviceManageDao;
5 8
import com.ai.bss.location.rescue.dao.interfaces.EquipmentManageDao;
6 9
import com.ai.bss.location.rescue.service.interfaces.EquipmentManageService;
7
import java.util.Map;
8
import com.github.pagehelper.PageInfo;
10
11
import java.util.*;
12
13
import com.ai.bss.work.tool.model.ResourceTool;
14
import com.ai.bss.work.tool.model.ResourceToolType;
15
import com.ai.bss.work.tool.service.api.ResourceToolCommand;
16
import com.ai.bss.work.tool.service.api.ResourceToolQuery;
9 17
import org.slf4j.Logger;
10 18
import org.slf4j.LoggerFactory;
11 19
import org.springframework.beans.factory.annotation.Autowired;
12 20
import org.springframework.stereotype.Service;
13 21
14
import java.util.ArrayList;
15
import java.util.List;
16 22
import java.util.Map;
17 23
18 24
@Service
@ -25,9 +31,17 @@ public class EquipmentManageServiceImpl implements EquipmentManageService {
25 31
	@Autowired
26 32
	DeviceManageDao deviceManageDao;
27 33
34
	@Autowired
35
	ResourceToolCommand resourceToolCommand;
36
37
	@Autowired
38
	ResourceToolQuery resourceToolQuery;
39
28 40
	@Override
29
	public PageInfo queryEquipmentInfo(Map<String,Object> params) throws Exception {
30
		return equipmentManageDao.queryEquipmentInfo(params);
41
	public CommonResponse<PageInfo<Map<String, Object>>> queryEquipmentInfo(CommonRequest<HashMap<String, Object>> conditionMap) throws Exception {
42
43
44
		return resourceToolQuery.queryWorkToolByOrg(conditionMap);
31 45
	}
32 46
33 47
	@Override
@ -36,18 +50,23 @@ public class EquipmentManageServiceImpl implements EquipmentManageService {
36 50
	}
37 51
	
38 52
	@Override
39
	public int modifyEquipmentInfo(Map<String,Object> params) throws Exception {
40
		return equipmentManageDao.modifyEquipmentInfo(params);
53
	public CommonResponse<ResourceTool> modifyEquipmentInfo(CommonRequest<ResourceTool> resourceToolCommonRequest) throws Exception {
54
		return resourceToolCommand.createWorkTool(resourceToolCommonRequest);
41 55
	}
42 56
43 57
	@Override
44
	public int addEquipmentInfo(Map<String,Object> params) throws Exception {
45
		return equipmentManageDao.addEquipmentInfo(params);
58
	public CommonResponse<ResourceTool> createEquipmentInfo(CommonRequest<ResourceTool> resourceToolCommonRequest) {
59
		return resourceToolCommand.createWorkTool(resourceToolCommonRequest);
46 60
	}
47 61
48 62
	@Override
49
	public boolean deleteEquipmentInfo(Map<String,Object> params) throws Exception {
50
		return equipmentManageDao.deleteEquipmentInfo(params);
63
	public CommonResponse<List<ResourceToolType>> loadAllResourceToolType(CommonRequest commonRequest) {
64
		return resourceToolQuery.loadAllResourceToolType(commonRequest);
65
	}
66
67
	@Override
68
	public CommonResponse<ResourceTool> deleteEquipmentInfo(CommonRequest<List<String>> resourceToolCommonRequest) throws Exception {
69
		return resourceToolCommand.deleteWorkTool(resourceToolCommonRequest);
51 70
	}
52 71
53 72
	@Override
@ -111,4 +130,6 @@ public class EquipmentManageServiceImpl implements EquipmentManageService {
111 130
		return equipmentManageDao.verifyEquipmentInfoRepetition(params);
112 131
	}
113 132
133
134
114 135
}

+ 13 - 6
location-rescue-service/src/main/java/com/ai/bss/location/rescue/service/interfaces/EquipmentManageService.java

@ -1,21 +1,24 @@
1 1
package com.ai.bss.location.rescue.service.interfaces;
2 2
3
import java.util.HashMap;
3 4
import java.util.List;
4 5
import java.util.Map;
5 6
6
import com.github.pagehelper.PageInfo;
7
import com.ai.abc.api.model.CommonRequest;
8
import com.ai.abc.api.model.CommonResponse;
9
import com.ai.bss.components.common.model.PageInfo;
10
import com.ai.bss.work.tool.model.ResourceTool;
11
import com.ai.bss.work.tool.model.ResourceToolType;
7 12
8 13
public interface EquipmentManageService {
9 14
10
    PageInfo queryEquipmentInfo(Map<String,Object> params) throws Exception;
15
    CommonResponse<PageInfo<Map<String, Object>>> queryEquipmentInfo(CommonRequest<HashMap<String, Object>> conditionMap) throws Exception;
11 16
    
12 17
    Map<String, Object> queryOneEquipmentInfo(Map<String,Object> params) throws Exception;
13 18
14
    int modifyEquipmentInfo(Map<String,Object> params) throws Exception;
19
    CommonResponse<ResourceTool> modifyEquipmentInfo(CommonRequest<ResourceTool> resourceToolCommonRequest) throws Exception;
15 20
16
    int addEquipmentInfo(Map<String,Object> params) throws Exception;
17
18
    boolean deleteEquipmentInfo(Map<String,Object> params) throws Exception;
21
    CommonResponse<ResourceTool> deleteEquipmentInfo(CommonRequest<List<String>> resourceToolCommonRequest) throws Exception;
19 22
20 23
    boolean deleteEquipmentsInfo(List<Map<String, Object>> paramsList) throws Exception;
21 24
@ -24,4 +27,8 @@ public interface EquipmentManageService {
24 27
    List<Map<String, Object>> queryCurrentEquipmentLocationInfo(Map<String,Object> params) throws Exception;
25 28
    
26 29
    Map<String, Object> verifyEquipmentInfoRepetition(Map<String,Object> params) throws Exception;
30
31
    CommonResponse<ResourceTool> createEquipmentInfo(CommonRequest<ResourceTool> resourceToolCommonRequest);
32
33
    CommonResponse<List<ResourceToolType>> loadAllResourceToolType(CommonRequest commonRequest);
27 34
}