change - 代码优化

master
wenjy 2 years ago
parent 85e37a11e5
commit 46f7c06a9b

@ -12,6 +12,7 @@
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="config" target="8" />
<module name="deviceboard" target="8" />
<module name="productionboard" target="8" />
<module name="visualboard" target="1.8" />
@ -19,6 +20,7 @@
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="config" options="-parameters" />
<module name="deviceboard" options="-parameters" />
<module name="productionboard" options="-parameters" />
<module name="visualboard" options="-parameters" />

@ -6,6 +6,11 @@
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: com.roufid.tutorials:config:1.1">
<CLASSES>
<root url="jar://D:/开发环境/Maven/apache-maven-3.6.3/repository/com/roufid/tutorials/config/1.1/config-1.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://D:/开发环境/Maven/apache-maven-3.6.3/repository/com/roufid/tutorials/config/1.1/config-1.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://D:/开发环境/Maven/apache-maven-3.6.3/repository/com/roufid/tutorials/config/1.1/config-1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

@ -6,6 +6,11 @@
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
<option name="ignoredFiles">
<set>
<option value="$PROJECT_DIR$/config/pom.xml" />
</set>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />

@ -116,5 +116,6 @@
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.47" level="project" />
<orderEntry type="library" name="Maven: cn.easyproject:orai18n:12.1.0.2.0" level="project" />
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.8.0.M4" level="project" />
<orderEntry type="library" name="Maven: com.roufid.tutorials:config:1.1" level="project" />
</component>
</module>

@ -101,6 +101,12 @@
<version>5.8.0.M4</version>
</dependency>
<dependency>
<groupId>com.roufid.tutorials</groupId>
<artifactId>config</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
<build>

@ -116,5 +116,6 @@
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.47" level="project" />
<orderEntry type="library" name="Maven: cn.easyproject:orai18n:12.1.0.2.0" level="project" />
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.8.0.M4" level="project" />
<orderEntry type="library" name="Maven: com.roufid.tutorials:config:1.1" level="project" />
</component>
</module>

@ -0,0 +1,15 @@
package com.productionboard.config;
import com.roufid.tutorials.util.AInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new AInterceptor()).addPathPatterns("/**");
}
}

@ -197,11 +197,15 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
case "0":
List<String> deviceId = new ArrayList<String>(){
{
if(in_id == 1){
if(number == 0){
this.add("FPX001");
}else{
this.add("FPX002");
}
}else if(in_id == 2){
this.add("FPX201");
}
}
};
wrapper.in("DEVICEID", deviceId);
@ -210,11 +214,15 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
case "1":
List<String> deviceId2 = new ArrayList<String>(){
{
if(in_id == 1){
if(number == 0){
this.add("FPX003");
}else{
this.add("FPX004");
}
}else if(in_id == 2){
this.add("FPX202");
}
}
};
wrapper.in("DEVICEID", deviceId2);
@ -230,6 +238,7 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
for (int i = 0; i <interior.size(); i++) {
String nameStr = "";
if(in_id == 1){
switch (interior.get(i).getDeviceId()){
case "FPX001":
nameStr = "A区"+interior.get(i).getPameterName().substring(0,4);
@ -246,6 +255,9 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
default:
nameStr = interior.get(i).getPameterName().substring(0,4);
}
}else if(in_id == 2){
nameStr = interior.get(i).getPameterName().substring(0,3);
}
if(!xValueList.contains(nameStr)){
xValueList.add(nameStr);
}

@ -12,6 +12,6 @@ mybatis-plus:
mapper-locations: classpath*:/mapper/**Mapper.xml
server:
port: 6070
port: 6069
in_id: 2
in_id: 1

@ -27,6 +27,7 @@
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="config" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.6.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.6.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.6.6" level="project" />
@ -116,5 +117,6 @@
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.47" level="project" />
<orderEntry type="library" name="Maven: cn.easyproject:orai18n:12.1.0.2.0" level="project" />
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.8.0.M4" level="project" />
<orderEntry type="library" name="Maven: com.roufid.tutorials:config:1.1" level="project" />
</component>
</module>
Loading…
Cancel
Save