diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 03ca955..b2b4ac0 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -12,6 +12,7 @@ + @@ -19,6 +20,7 @@ diff --git a/deviceboard/deviceboard.iml b/deviceboard/deviceboard.iml index 8e1c90e..338e2af 100644 --- a/deviceboard/deviceboard.iml +++ b/deviceboard/deviceboard.iml @@ -116,5 +116,6 @@ + \ No newline at end of file diff --git a/pom.xml b/pom.xml index dc74c8c..62fbdf9 100644 --- a/pom.xml +++ b/pom.xml @@ -101,6 +101,12 @@ 5.8.0.M4 + + com.roufid.tutorials + config + 1.1 + + diff --git a/productionboard/productionboard.iml b/productionboard/productionboard.iml index 8e1c90e..338e2af 100644 --- a/productionboard/productionboard.iml +++ b/productionboard/productionboard.iml @@ -116,5 +116,6 @@ + \ No newline at end of file diff --git a/productionboard/src/main/java/com/productionboard/config/InterceptorConfig.java b/productionboard/src/main/java/com/productionboard/config/InterceptorConfig.java new file mode 100644 index 0000000..2f44efc --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/config/InterceptorConfig.java @@ -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("/**"); + } +} diff --git a/productionboard/src/main/java/com/productionboard/service/impl/FoamBoxDeviceInfoServiceImpl.java b/productionboard/src/main/java/com/productionboard/service/impl/FoamBoxDeviceInfoServiceImpl.java index 82f3ee8..c3f94be 100644 --- a/productionboard/src/main/java/com/productionboard/service/impl/FoamBoxDeviceInfoServiceImpl.java +++ b/productionboard/src/main/java/com/productionboard/service/impl/FoamBoxDeviceInfoServiceImpl.java @@ -197,10 +197,14 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService { case "0": List deviceId = new ArrayList(){ { - if(number == 0){ - this.add("FPX001"); - }else{ - this.add("FPX002"); + if(in_id == 1){ + if(number == 0){ + this.add("FPX001"); + }else{ + this.add("FPX002"); + } + }else if(in_id == 2){ + this.add("FPX201"); } } }; @@ -210,10 +214,14 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService { case "1": List deviceId2 = new ArrayList(){ { - if(number == 0){ - this.add("FPX003"); - }else{ - this.add("FPX004"); + if(in_id == 1){ + if(number == 0){ + this.add("FPX003"); + }else{ + this.add("FPX004"); + } + }else if(in_id == 2){ + this.add("FPX202"); } } }; @@ -230,21 +238,25 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService { for (int i = 0; i + @@ -116,5 +117,6 @@ + \ No newline at end of file