Przeglądaj źródła

Merge branch 'dev' of trick9191/jw2.0 into dev

trick9191 6 lat temu
rodzic
commit
7c9eab8db2
100 zmienionych plików z 333 dodań i 601 usunięć
  1. 1 0
      .gitignore
  2. 46 150
      app/app-iot-server/pom.xml
  3. 21 0
      app/app-iot-server/src/main/java/com/yihu/AppIotServer.java
  4. 0 35
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/AppIotServer.java
  5. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/config/SwaggerConfig.java
  6. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/constant/AuthorityKey.java
  7. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/constant/Constants.java
  8. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/constant/ServiceApi.java
  9. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/common/BaseController.java
  10. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/common/ErrorController.java
  11. 14 14
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/common/FileUploadController.java
  12. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/controller/common/IndexController.java
  13. 2 2
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/common/IotSystemDictController.java
  14. 5 5
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/common/LoginController.java
  15. 3 3
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/company/IotCompanyController.java
  16. 3 3
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/device/IotDeviceController.java
  17. 3 3
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/device/IotDeviceOrderController.java
  18. 3 3
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/device/IotDeviceQualityController.java
  19. 4 4
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/product/IotProductController.java
  20. 3 3
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/third/wlyy/MonitoringHealthPlatformController.java
  21. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/model/AccessToken.java
  22. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/ListResult.java
  23. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/MenuResult.java
  24. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/model/ObjectResult.java
  25. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/Result.java
  26. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/ehr/MRsMetadata.java
  27. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/ehr/MStdDataSet.java
  28. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/user/UserModel.java
  29. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/config/EhrWebHttpSessionConfiguration.java
  30. 3 3
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/config/EhrWebSecurityConfiguration.java
  31. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebAccessDecisionManager.java
  32. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebAuthenticationFailureHandler.java
  33. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebAuthenticationProvider.java
  34. 1 3
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebAuthenticationSuccessHandler.java
  35. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebAuthenticationToken.java
  36. 1 16
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebContextLogoutHandler.java
  37. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebUserDetails.java
  38. 3 6
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebUserDetailsService.java
  39. 3 3
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebUsernamePasswordAuthenticationFilter.java
  40. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/entryPoint/LoginEntryPoint.java
  41. 10 10
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/common/BaseService.java
  42. 2 2
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/common/FileUploadService.java
  43. 7 7
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/common/LoginService.java
  44. 5 5
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/common/SystemDictService.java
  45. 8 8
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/company/CompanyService.java
  46. 6 6
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/device/DeviceOrderService.java
  47. 12 12
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/device/DeviceService.java
  48. 6 6
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/device/IotDeviceQualityService.java
  49. 7 7
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/product/ProductService.java
  50. 8 8
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/third/wlyy/MonitoringHealthService.java
  51. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/ControllerTools.java
  52. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/util/CurrentRequest.java
  53. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/ObjectMapperUtil.java
  54. 4 4
      app/public-health-server/src/main/java/com/yihu/ehr/health/util/encode/AES.java
  55. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/util/encode/Base64.java
  56. 3 3
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/encode/DES.java
  57. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/encode/HexEncode.java
  58. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/util/encode/RSA.java
  59. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/excel/AExcelReader.java
  60. 2 2
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/excel/reader/IotDeviceImportVOReader.java
  61. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/util/file/FileUtil.java
  62. 3 3
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/http/HttpClientUtil.java
  63. 2 2
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/http/HttpHelper.java
  64. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/http/HttpResponse.java
  65. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/http/HttpUtil.java
  66. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/operator/CollectionUtil.java
  67. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/operator/DateUtil.java
  68. 2 2
      app/public-health-server/src/main/java/com/yihu/ehr/health/util/operator/MD5.java
  69. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/util/operator/StringUtil.java
  70. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/spring/SpringContextHolder.java
  71. 10 9
      app/app-iot-server/src/main/resources/application.yml
  72. 0 0
      app/app-iot-server/src/main/resources/logback.xml.bak
  73. 33 142
      app/public-health-server/pom.xml
  74. 20 0
      app/public-health-server/src/main/java/com/yihu/AppHealthServer.java
  75. 0 34
      app/public-health-server/src/main/java/com/yihu/ehr/health/AppHealthServer.java
  76. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/config/SwaggerConfig.java
  77. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/constant/Constants.java
  78. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/constant/ServiceApi.java
  79. 2 6
      app/public-health-server/src/main/java/com/yihu/ehr/health/controller/archives/ArchivesController.java
  80. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/controller/common/BaseController.java
  81. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/controller/common/ErrorController.java
  82. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/common/IndexController.java
  83. 3 4
      app/public-health-server/src/main/java/com/yihu/ehr/health/controller/dictionary/SystemDictController.java
  84. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/AccessToken.java
  85. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/model/ListResult.java
  86. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/model/MenuResult.java
  87. 1 1
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/ObjectResult.java
  88. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/model/Result.java
  89. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/model/user/UserModel.java
  90. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/security/config/EhrWebHttpSessionConfiguration.java
  91. 0 0
      app/public-health-server/src/main/java/com/yihu/health/security/config/EhrWebSecurityConfiguration.java
  92. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebAccessDecisionManager.java
  93. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebAuthenticationFailureHandler.java
  94. 1 5
      app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebAuthenticationProvider.java
  95. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebAuthenticationSuccessHandler.java
  96. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebAuthenticationToken.java
  97. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebContextLogoutHandler.java
  98. 1 1
      app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebUserDetails.java
  99. 3 3
      app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebUserDetailsService.java
  100. 0 0
      app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebUsernamePasswordAuthenticationFilter.java

+ 1 - 0
.gitignore

@ -8,6 +8,7 @@
*.pyc
*.pyo
.idea/
data/*
.idea_modules/
build/*.jar
.settings

+ 46 - 150
app/app-iot-server/pom.xml

@ -4,9 +4,9 @@
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.2</version>
        <relativePath>../../svr-lib-parent-pom/pom.xml</relativePath>
        <artifactId>wlyy-parent-pom</artifactId>
        <version>2.0.0</version>
        <relativePath>../../wlyy-parent-pom/pom.xml</relativePath>
    </parent>
    <groupId>com.yihu.ehr.iot</groupId>
@ -14,53 +14,36 @@
    <packaging>war</packaging>
    <version>${parent.version}</version>
    <!-- 依赖包 -->
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>log4j-over-slf4j</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>us.codecraft</groupId>
            <artifactId>webmagic-core</artifactId>
            <version>0.4.2</version>
            <exclusions>
                <exclusion>
                    <artifactId>log4j</artifactId>
                    <groupId>log4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>us.codecraft</groupId>
            <artifactId>webmagic-extension</artifactId>
            <version>0.4.2</version>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-starter-client</artifactId>
            <version>1.3.3</version>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <!-- 使用intellij作为集成开发环境 -->
        <!--<dependency>-->
        <!--<groupId>org.springframework.session</groupId>-->
        <!--<artifactId>spring-session-data-redis</artifactId>-->
        <!--</dependency>-->
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
@ -71,185 +54,99 @@
            <artifactId>jstl</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!--<dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
            <version>4.0.0.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <version>4.0.0.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-taglibs</artifactId>
            <version>4.0.0.RELEASE</version>
        </dependency>-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-extras</artifactId>
            <version>3.0.5</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.4.0</version>
            <exclusions>
                <exclusion>
                    <artifactId>classmate</artifactId>
                    <groupId>com.fasterxml</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.4.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>4.0</version>
        </dependency>
        <dependency>
            <groupId>eu.medsea.mimeutil</groupId>
            <artifactId>mime-util</artifactId>
            <version>2.1.3</version>
            <exclusions>
                <exclusion>
                    <artifactId>slf4j-log4j12</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.sun.jna</groupId>
            <artifactId>jna</artifactId>
            <version>3.0.9</version>
            <groupId>io.searchbox</groupId>
            <artifactId>jest</artifactId>
            <version>2.4.0</version>
        </dependency>
        <!--<dependency>-->
            <!--<groupId>org.springframework.session</groupId>-->
            <!--<artifactId>spring-session-data-redis</artifactId>-->
        <!--</dependency>-->
        <dependency>
            <groupId>net.lingala.zip4j</groupId>
            <artifactId>zip4j</artifactId>
            <version>1.3.2</version>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.4</version>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <version>4.5.1</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20151123</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.jexcelapi</groupId>
            <artifactId>jxl</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>com.sun.jna</groupId>
            <artifactId>jna</artifactId>
            <version>3.0.9</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.ehr</groupId>
            <artifactId>commons-admin-gateway-model</artifactId>
            <version>1.1.0</version>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-request-mapping</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.ehr</groupId>
            <artifactId>commons-util</artifactId>
            <version>1.1.0</version>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>log4j-core</artifactId>
                    <groupId>org.apache.logging.log4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>log4j-api</artifactId>
                    <groupId>org.apache.logging.log4j</groupId>
                    <groupId>org.slf4j</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.yihu.ehr</groupId>
            <artifactId>commons-rest-model</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-request-mapping</artifactId>
            <artifactId>common-rest-model-es</artifactId>
        </dependency>
        <!-- ehr -->
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model</artifactId>
            <groupId>com.yihu.ehr</groupId>
            <artifactId>commons-admin-gateway-model</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.base</groupId>
            <artifactId>common-data-fastdfs</artifactId>
            <version>1.0.0</version>
            <groupId>com.yihu.ehr</groupId>
            <artifactId>commons-util</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-logging</artifactId>
            <groupId>com.yihu.ehr</groupId>
            <artifactId>commons-rest-model</artifactId>
            <version>1.1.0</version>
        </dependency>
        <!-- jkzl starter -->
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model-es</artifactId>
            <groupId>com.yihu</groupId>
            <artifactId>fastdfs-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
    </dependencies>
@ -268,7 +165,6 @@
                </configuration>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <!--打包的时候把resources下的资源移到classpath下-->

+ 21 - 0
app/app-iot-server/src/main/java/com/yihu/AppIotServer.java

@ -0,0 +1,21 @@
package com.yihu;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
@SpringBootApplication
public class AppIotServer extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(AppIotServer.class);
        app.run(args);
    }
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(AppIotServer.class);
    }
}

+ 0 - 35
app/app-iot-server/src/main/java/com/yihu/ehr/iot/AppIotServer.java

@ -1,35 +0,0 @@
package com.yihu.ehr.iot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.ManagementWebSecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@EnableAutoConfiguration(exclude = {
        SecurityAutoConfiguration.class,
        ManagementWebSecurityAutoConfiguration.class,
        DataSourceAutoConfiguration.class,
        HibernateJpaAutoConfiguration.class,
        DataSourceTransactionManagerAutoConfiguration.class})
@ComponentScan(basePackages={"com.yihu.base","com.yihu.ehr.iot"})
//@EnableRedisHttpSession
public class AppIotServer extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(AppIotServer.class);
    }
	public static void main(String[] args) {
        SpringApplication app = new SpringApplication(AppIotServer.class);
        app.run(args);
	}
}

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/config/SwaggerConfig.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.config;
package com.yihu.iot.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/constant/AuthorityKey.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.constant;
package com.yihu.iot.constant;
/**
 * Created by janseny on 2017/9/30.

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/constant/Constants.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.constant;
package com.yihu.iot.constant;
/**
 * Created by lingfeng on 2015/6/23.

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/constant/ServiceApi.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.constant;
package com.yihu.iot.constant;
/**
 * @author yeshijie on 2018/1/22.

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/common/BaseController.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.controller.common;
package com.yihu.iot.controller.common;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.ehr.util.rest.Envelop;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/common/ErrorController.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.controller.common;
package com.yihu.iot.controller.common;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

+ 14 - 14
app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/common/FileUploadController.java

@ -1,8 +1,8 @@
package com.yihu.ehr.iot.controller.common;
package com.yihu.iot.controller.common;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yihu.base.fastdfs.FastDFSHelper;
import com.yihu.ehr.iot.service.common.FileUploadService;
import com.yihu.fastdfs.FastDFSUtil;
import com.yihu.iot.service.common.FileUploadService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.common.UploadVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
@ -31,7 +31,7 @@ import java.util.Map;
public class FileUploadController extends BaseController {
    @Autowired
    private FastDFSHelper fastDFSHelper;
    private FastDFSUtil fastDFSHelper;
    @Value("${fast-dfs.public-server}")
    private String fastdfs_file_url;
    @Autowired
@ -71,8 +71,8 @@ public class FileUploadController extends BaseController {
                uploadVO = new UploadVO();
                uploadVO.setFileName(fileName);
                uploadVO.setFileType(fileType);
                uploadVO.setFullUri(objectNode.get("fid").toString().replaceAll("\"", ""));
                uploadVO.setFullUrl(fastdfs_file_url + objectNode.get("fid").toString().replaceAll("\"", ""));
                uploadVO.setFullUri(objectNode.get("fileId").toString().replaceAll("\"", ""));
                uploadVO.setFullUrl(fastdfs_file_url + objectNode.get("fileId").toString().replaceAll("\"", ""));
            }else {
                uploadVO = fileUploadService.request(request,file.getInputStream(),fullName);
                if(uploadVO==null){
@ -119,8 +119,8 @@ public class FileUploadController extends BaseController {
                uploadVO = new UploadVO();
                uploadVO.setFileName(fileName);
                uploadVO.setFileType(fileType);
                uploadVO.setFullUri(objectNode.get("fid").toString().replaceAll("\"", ""));
                uploadVO.setFullUrl(fastdfs_file_url + objectNode.get("fid").toString().replaceAll("\"", ""));
                uploadVO.setFullUri(objectNode.get("fileId").toString().replaceAll("\"", ""));
                uploadVO.setFullUrl(fastdfs_file_url + objectNode.get("fileId").toString().replaceAll("\"", ""));
            }else {
                uploadVO = fileUploadService.request(request,file.getInputStream(),fullName);
                if(uploadVO==null){
@ -153,8 +153,8 @@ public class FileUploadController extends BaseController {
                uploadVO = new UploadVO();
                uploadVO.setFileName(fileName);
                uploadVO.setFileType(fileType);
                uploadVO.setFullUri(objectNode.get("fid").toString().replaceAll("\"", ""));
                uploadVO.setFullUrl(fastdfs_file_url + objectNode.get("fid").toString().replaceAll("\"", ""));
                uploadVO.setFullUri(objectNode.get("fileId").toString().replaceAll("\"", ""));
                uploadVO.setFullUrl(fastdfs_file_url + objectNode.get("fileId").toString().replaceAll("\"", ""));
            }else {
                uploadVO = fileUploadService.request(request,file.getInputStream(),fullName);
                if(uploadVO==null){
@ -192,8 +192,8 @@ public class FileUploadController extends BaseController {
                uploadVO = new UploadVO();
                uploadVO.setFileName(remoteFileName);
                uploadVO.setFileType(groupName);
                uploadVO.setFullUri(objectNode.get("fid").toString().replaceAll("\"", ""));
                uploadVO.setFullUrl(fastdfs_file_url + objectNode.get("fid").toString().replaceAll("\"", ""));
                uploadVO.setFullUri(objectNode.get("fileId").toString().replaceAll("\"", ""));
                uploadVO.setFullUrl(fastdfs_file_url + objectNode.get("fileId").toString().replaceAll("\"", ""));
            }else {
                uploadVO = fileUploadService.request(request,inputStream,"");
                if(uploadVO ==null){
@ -245,8 +245,8 @@ public class FileUploadController extends BaseController {
            }
            //解析返回的objectNode
            UploadVO uploadVO = new UploadVO();
            uploadVO.setFullUri(result.get("fid").toString().replaceAll("\"", ""));
            uploadVO.setFullUrl(fastdfs_file_url + result.get("fid").toString().replaceAll("\"", ""));
            uploadVO.setFullUri(result.get("fileId").toString().replaceAll("\"", ""));
            uploadVO.setFullUrl(fastdfs_file_url + result.get("fileId").toString().replaceAll("\"", ""));
            return Envelop.getSuccess(IotRequestMapping.FileUpload.message_success_upload, result);
        } catch (Exception e) {
            e.printStackTrace();

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/controller/common/IndexController.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.controller.common;
package com.yihu.iot.controller.common;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

+ 2 - 2
app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/common/IotSystemDictController.java

@ -1,6 +1,6 @@
package com.yihu.ehr.iot.controller.common;
package com.yihu.iot.controller.common;
import com.yihu.ehr.iot.service.common.SystemDictService;
import com.yihu.iot.service.common.SystemDictService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.dict.IotSystemDictVO;
import com.yihu.jw.rm.iot.IotRequestMapping;

+ 5 - 5
app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/common/LoginController.java

@ -1,7 +1,7 @@
package com.yihu.ehr.iot.controller.common;
package com.yihu.iot.controller.common;
import com.yihu.ehr.iot.model.Result;
import com.yihu.ehr.iot.service.common.LoginService;
import com.yihu.iot.model.Result;
import com.yihu.iot.service.common.LoginService;
import com.yihu.ehr.util.rest.Envelop;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -51,9 +51,9 @@ public class LoginController extends BaseController{
    @ResponseBody
    @ApiOperation(value = "登录验证")
    public Result login(HttpServletRequest request,
            @ApiParam(name = "userName", value = "登录账号")
                        @ApiParam(name = "userName", value = "登录账号")
            @RequestParam(value = "userName") String userName,
            @ApiParam(name = "password", value = "密码")
                        @ApiParam(name = "password", value = "密码")
            @RequestParam(value = "password") String password) {
            return loginService.login(request, userName, password);
    }

+ 3 - 3
app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/company/IotCompanyController.java

@ -1,7 +1,7 @@
package com.yihu.ehr.iot.controller.company;
package com.yihu.iot.controller.company;
import com.yihu.ehr.iot.controller.common.BaseController;
import com.yihu.ehr.iot.service.company.CompanyService;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.company.CompanyService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.company.IotCompanyCertificateVO;
import com.yihu.jw.restmodel.iot.company.IotCompanyVO;

+ 3 - 3
app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/device/IotDeviceController.java

@ -1,7 +1,7 @@
package com.yihu.ehr.iot.controller.device;
package com.yihu.iot.controller.device;
import com.yihu.ehr.iot.controller.common.BaseController;
import com.yihu.ehr.iot.service.device.DeviceService;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.device.DeviceService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
import com.yihu.jw.restmodel.iot.common.ExistVO;

+ 3 - 3
app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/device/IotDeviceOrderController.java

@ -1,7 +1,7 @@
package com.yihu.ehr.iot.controller.device;
package com.yihu.iot.controller.device;
import com.yihu.ehr.iot.controller.common.BaseController;
import com.yihu.ehr.iot.service.device.DeviceOrderService;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.device.DeviceOrderService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceOrderVO;
import com.yihu.jw.restmodel.iot.device.IotOrderPurchaseVO;

+ 3 - 3
app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/device/IotDeviceQualityController.java

@ -1,7 +1,7 @@
package com.yihu.ehr.iot.controller.device;
package com.yihu.iot.controller.device;
import com.yihu.ehr.iot.controller.common.BaseController;
import com.yihu.ehr.iot.service.device.IotDeviceQualityService;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.device.IotDeviceQualityService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceQualityInspectionPlanVO;
import com.yihu.jw.rm.iot.IotRequestMapping;

+ 4 - 4
app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/product/IotProductController.java

@ -1,8 +1,8 @@
package com.yihu.ehr.iot.controller.product;
package com.yihu.iot.controller.product;
import com.yihu.ehr.iot.controller.common.BaseController;
import com.yihu.ehr.iot.model.ehr.MStdDataSet;
import com.yihu.ehr.iot.service.product.ProductService;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.model.ehr.MStdDataSet;
import com.yihu.iot.service.product.ProductService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.product.IotMaintenanceUnitVO;
import com.yihu.jw.restmodel.iot.product.IotProductBaseInfoVO;

+ 3 - 3
app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/third/wlyy/MonitoringHealthPlatformController.java

@ -1,7 +1,7 @@
package com.yihu.ehr.iot.controller.third.wlyy;
package com.yihu.iot.controller.third.wlyy;
import com.yihu.ehr.iot.controller.common.BaseController;
import com.yihu.ehr.iot.service.third.wlyy.MonitoringHealthService;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.third.wlyy.MonitoringHealthService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.rm.iot.IotRequestMapping;
import io.swagger.annotations.Api;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/model/AccessToken.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.model;
package com.yihu.iot.model;
/**
 * Created by zhenglingfeng on 2017/3/8.

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/ListResult.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.model;
package com.yihu.iot.model;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/MenuResult.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.model;
package com.yihu.iot.model;
import java.util.ArrayList;
import java.util.List;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/model/ObjectResult.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.model;
package com.yihu.iot.model;
/**

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/Result.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.model;
package com.yihu.iot.model;
import java.lang.reflect.Field;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/ehr/MRsMetadata.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.model.ehr;
package com.yihu.iot.model.ehr;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/ehr/MStdDataSet.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.model.ehr;
package com.yihu.iot.model.ehr;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/user/UserModel.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.model.user;
package com.yihu.iot.model.user;
import java.io.Serializable;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/config/EhrWebHttpSessionConfiguration.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.security.config;
package com.yihu.iot.security.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

+ 3 - 3
app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/config/EhrWebSecurityConfiguration.java

@ -1,7 +1,7 @@
package com.yihu.ehr.iot.security.config;
package com.yihu.iot.security.config;
import com.yihu.ehr.iot.security.core.*;
import com.yihu.ehr.iot.security.entryPoint.LoginEntryPoint;
import com.yihu.iot.security.entryPoint.LoginEntryPoint;
import com.yihu.iot.security.core.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebAccessDecisionManager.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.security.core;
package com.yihu.iot.security.core;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebAuthenticationFailureHandler.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.security.core;
package com.yihu.iot.security.core;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.ehr.util.rest.Envelop;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebAuthenticationProvider.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.security.core;
package com.yihu.iot.security.core;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.InternalAuthenticationServiceException;

+ 1 - 3
app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebAuthenticationSuccessHandler.java

@ -1,14 +1,12 @@
package com.yihu.ehr.iot.security.core;
package com.yihu.iot.security.core;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.ehr.agModel.user.UserDetailModel;
import com.yihu.ehr.iot.util.CurrentRequest;
import com.yihu.ehr.util.rest.Envelop;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.session.SessionRegistry;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import javax.servlet.ServletException;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebAuthenticationToken.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.security.core;
package com.yihu.iot.security.core;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

+ 1 - 16
app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebContextLogoutHandler.java

@ -1,31 +1,16 @@
package com.yihu.ehr.iot.security.core;
package com.yihu.iot.security.core;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.ehr.agModel.user.UserDetailModel;
import com.yihu.ehr.iot.util.CurrentRequest;
import com.yihu.ehr.util.rest.Envelop;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.session.SessionRegistry;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.springframework.security.web.authentication.logout.LogoutHandler;
import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;
import org.springframework.util.Assert;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * Created by progr1mmer on 2018/1/26.

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebUserDetails.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.security.core;
package com.yihu.iot.security.core;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

+ 3 - 6
app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebUserDetailsService.java

@ -1,17 +1,14 @@
package com.yihu.ehr.iot.security.core;
package com.yihu.iot.security.core;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.ehr.agModel.user.UserDetailModel;
import com.yihu.ehr.iot.util.http.HttpHelper;
import com.yihu.ehr.iot.util.http.HttpResponse;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.ehr.util.rest.Envelop;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.session.SessionRegistry;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;

+ 3 - 3
app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebUsernamePasswordAuthenticationFilter.java

@ -1,9 +1,9 @@
package com.yihu.ehr.iot.security.core;
package com.yihu.iot.security.core;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.ehr.agModel.user.UserDetailModel;
import com.yihu.ehr.iot.util.http.HttpHelper;
import com.yihu.ehr.iot.util.http.HttpResponse;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.ehr.util.rest.Envelop;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/entryPoint/LoginEntryPoint.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.security.entryPoint;
package com.yihu.iot.security.entryPoint;
import com.alibaba.fastjson.JSONObject;
import org.springframework.security.core.AuthenticationException;

+ 10 - 10
app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/common/BaseService.java

@ -1,18 +1,18 @@
package com.yihu.ehr.iot.service.common;
package com.yihu.iot.service.common;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.ehr.agModel.user.UserDetailModel;
import com.yihu.ehr.iot.model.AccessToken;
import com.yihu.ehr.iot.model.ListResult;
import com.yihu.ehr.iot.model.ObjectResult;
import com.yihu.ehr.iot.model.Result;
import com.yihu.ehr.iot.util.encode.AES;
import com.yihu.ehr.iot.util.encode.Base64;
import com.yihu.ehr.iot.util.http.HttpHelper;
import com.yihu.ehr.iot.util.http.HttpResponse;
import com.yihu.ehr.iot.util.operator.StringUtil;
import com.yihu.iot.model.AccessToken;
import com.yihu.iot.model.ListResult;
import com.yihu.iot.model.ObjectResult;
import com.yihu.iot.model.Result;
import com.yihu.iot.util.encode.AES;
import com.yihu.iot.util.encode.Base64;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.iot.util.operator.StringUtil;
import com.yihu.ehr.util.rest.Envelop;
import org.apache.commons.lang.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;

+ 2 - 2
app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/common/FileUploadService.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.service.common;
package com.yihu.iot.service.common;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.restmodel.iot.common.UploadVO;
@ -63,7 +63,7 @@ public class FileUploadService extends BaseService{
                uploadVO = new UploadVO();
                uploadVO.setFileName(obj.getString("groupName"));
                uploadVO.setFileType(obj.getString("remoteFileName"));
                uploadVO.setFullUri(obj.getString("fid"));
                uploadVO.setFullUri(obj.getString("fileId"));
                uploadVO.setFullUrl(obj.getString("fileUrl"));
            }
        } catch (IOException e) {

+ 7 - 7
app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/common/LoginService.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.service.common;
package com.yihu.iot.service.common;
import com.yihu.ehr.agModel.user.RoleOrgModel;
import com.yihu.ehr.agModel.user.UserDetailModel;
@ -8,12 +8,12 @@ import com.yihu.ehr.model.geography.MGeographyDict;
import com.yihu.ehr.model.org.MOrganization;
import com.yihu.ehr.model.resource.MRsRolesResource;
import com.yihu.ehr.model.user.MRoles;
import com.yihu.ehr.iot.constant.AuthorityKey;
import com.yihu.ehr.iot.util.http.HttpHelper;
import com.yihu.ehr.iot.util.http.HttpResponse;
import com.yihu.ehr.iot.model.AccessToken;
import com.yihu.ehr.iot.model.ObjectResult;
import com.yihu.ehr.iot.model.Result;
import com.yihu.iot.constant.AuthorityKey;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.iot.model.AccessToken;
import com.yihu.iot.model.ObjectResult;
import com.yihu.iot.model.Result;
import com.yihu.ehr.util.log.LogService;
import com.yihu.ehr.util.rest.Envelop;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;

+ 5 - 5
app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/common/SystemDictService.java

@ -1,10 +1,10 @@
package com.yihu.ehr.iot.service.common;
package com.yihu.iot.service.common;
import com.yihu.ehr.constants.ErrorCode;
import com.yihu.ehr.iot.constant.ServiceApi;
import com.yihu.ehr.iot.model.ObjectResult;
import com.yihu.ehr.iot.util.http.HttpHelper;
import com.yihu.ehr.iot.util.http.HttpResponse;
import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.model.ObjectResult;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.dict.IotSystemDictVO;
import org.springframework.stereotype.Service;

+ 8 - 8
app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/company/CompanyService.java

@ -1,13 +1,13 @@
package com.yihu.ehr.iot.service.company;
package com.yihu.iot.service.company;
import com.yihu.ehr.constants.ErrorCode;
import com.yihu.ehr.iot.constant.ServiceApi;
import com.yihu.ehr.iot.model.ObjectResult;
import com.yihu.ehr.iot.model.Result;
import com.yihu.ehr.iot.model.user.UserModel;
import com.yihu.ehr.iot.service.common.BaseService;
import com.yihu.ehr.iot.util.http.HttpHelper;
import com.yihu.ehr.iot.util.http.HttpResponse;
import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.model.ObjectResult;
import com.yihu.iot.model.Result;
import com.yihu.iot.model.user.UserModel;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.company.IotCompanyCertificateVO;
import com.yihu.jw.restmodel.iot.company.IotCompanyVO;

+ 6 - 6
app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/device/DeviceOrderService.java

@ -1,9 +1,9 @@
package com.yihu.ehr.iot.service.device;
package com.yihu.iot.service.device;
import com.yihu.ehr.iot.constant.ServiceApi;
import com.yihu.ehr.iot.service.common.BaseService;
import com.yihu.ehr.iot.util.http.HttpHelper;
import com.yihu.ehr.iot.util.http.HttpResponse;
import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceOrderVO;
import com.yihu.jw.restmodel.iot.device.IotOrderPurchaseVO;
@ -18,7 +18,7 @@ import java.util.Map;
 * @author yeshijie on 2017/12/8.
 */
@Service
public class DeviceOrderService extends BaseService{
public class DeviceOrderService extends BaseService {
    /**
     * 创建设备订单

+ 12 - 12
app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/device/DeviceService.java

@ -1,16 +1,16 @@
package com.yihu.ehr.iot.service.device;
package com.yihu.iot.service.device;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yihu.base.fastdfs.FastDFSHelper;
import com.yihu.ehr.iot.constant.ServiceApi;
import com.yihu.ehr.iot.service.common.BaseService;
import com.yihu.ehr.iot.service.common.FileUploadService;
import com.yihu.ehr.iot.util.excel.AExcelReader;
import com.yihu.ehr.iot.util.excel.reader.IotDeviceImportVOReader;
import com.yihu.ehr.iot.util.http.HttpHelper;
import com.yihu.ehr.iot.util.http.HttpResponse;
import com.yihu.fastdfs.FastDFSUtil;
import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.service.common.FileUploadService;
import com.yihu.iot.util.excel.AExcelReader;
import com.yihu.iot.util.excel.reader.IotDeviceImportVOReader;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
import com.yihu.jw.restmodel.iot.common.ExistVO;
@ -33,10 +33,10 @@ import java.util.Map;
 * @author yeshijie on 2017/12/8.
 */
@Service
public class DeviceService extends BaseService{
public class DeviceService extends BaseService {
    @Autowired
    private FastDFSHelper fastDFSHelper;
    private FastDFSUtil fastDFSHelper;
    @Value("${neiwang.enable}")
    private Boolean isneiwang;  //如果不是内网项目要转到到内网在上传
    @Autowired
@ -222,7 +222,7 @@ public class DeviceService extends BaseService{
        if(isneiwang){
            objectNode = fastDFSHelper.upload(file.getInputStream(), fileType, "");
            params.put("url", objectNode.get("fid").toString().replaceAll("\"", ""));
            params.put("url", objectNode.get("fileId").toString().replaceAll("\"", ""));
        }else {
            UploadVO uploadVO = fileUploadService.request(request,file.getInputStream(),fullName);
            if(uploadVO==null){

+ 6 - 6
app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/device/IotDeviceQualityService.java

@ -1,9 +1,9 @@
package com.yihu.ehr.iot.service.device;
package com.yihu.iot.service.device;
import com.yihu.ehr.iot.constant.ServiceApi;
import com.yihu.ehr.iot.service.common.BaseService;
import com.yihu.ehr.iot.util.http.HttpHelper;
import com.yihu.ehr.iot.util.http.HttpResponse;
import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceQualityInspectionPlanVO;
import org.springframework.stereotype.Service;
@ -16,7 +16,7 @@ import java.util.Map;
 * @author yeshijie on 2018/01/24.
 */
@Service
public class IotDeviceQualityService extends BaseService{
public class IotDeviceQualityService extends BaseService {
    /**
     * 创建设备质检

+ 7 - 7
app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/product/ProductService.java

@ -1,12 +1,12 @@
package com.yihu.ehr.iot.service.product;
package com.yihu.iot.service.product;
import com.yihu.ehr.constants.ErrorCode;
import com.yihu.ehr.iot.constant.ServiceApi;
import com.yihu.ehr.iot.model.ObjectResult;
import com.yihu.ehr.iot.model.ehr.MStdDataSet;
import com.yihu.ehr.iot.service.common.BaseService;
import com.yihu.ehr.iot.util.http.HttpHelper;
import com.yihu.ehr.iot.util.http.HttpResponse;
import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.model.ObjectResult;
import com.yihu.iot.model.ehr.MStdDataSet;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.iot.product.IotMaintenanceUnitVO;
import com.yihu.jw.restmodel.iot.product.IotProductBaseInfoVO;

+ 8 - 8
app/app-iot-server/src/main/java/com/yihu/ehr/iot/service/third/wlyy/MonitoringHealthService.java

@ -1,14 +1,14 @@
package com.yihu.ehr.iot.service.third.wlyy;
package com.yihu.iot.service.third.wlyy;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.ehr.iot.constant.ServiceApi;
import com.yihu.ehr.iot.service.common.BaseService;
import com.yihu.ehr.iot.util.http.HttpHelper;
import com.yihu.ehr.iot.util.http.HttpResponse;
import com.yihu.ehr.util.datetime.DateUtil;
import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.util.date.DateUtil;
import io.swagger.annotations.ApiOperation;
import iot.device.LocationDataVO;
import org.apache.commons.lang.StringUtils;
@ -28,7 +28,7 @@ import java.util.Map;
 * @author yeshijie on 2018/2/11.
 */
@Service
public class MonitoringHealthService extends BaseService{
public class MonitoringHealthService extends BaseService {
    private Logger logger = LoggerFactory.getLogger(MonitoringHealthService.class);
    @Value("${third.wlyy.url}")
@ -150,7 +150,7 @@ public class MonitoringHealthService extends BaseService{
        if(jsonObject.getInteger("status")==10000){
            String accesstoken = jsonObject.getJSONObject("result").getString("accesstoken");
            tokenMap.put("token",accesstoken);
            tokenMap.put("time",DateUtil.getStringDate());
            tokenMap.put("time", DateUtil.toString(new Date(), DateUtil.DEFAULT_YMDHMSDATE_FORMAT));
            return accesstoken;
        }
        return null;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/ControllerTools.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.util;
package com.yihu.iot.util;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.ehr.util.rest.Envelop;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/util/CurrentRequest.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.util;
package com.yihu.iot.util;
import com.yihu.ehr.agModel.user.UserDetailModel;
import org.springframework.beans.factory.annotation.Autowired;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/ObjectMapperUtil.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.util;
package com.yihu.iot.util;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;

+ 4 - 4
app/public-health-server/src/main/java/com/yihu/ehr/health/util/encode/AES.java

@ -1,9 +1,9 @@
package com.yihu.ehr.health.util.encode;
package com.yihu.iot.util.encode;
import com.yihu.ehr.health.util.operator.DateUtil;
import com.yihu.ehr.health.util.operator.MD5;
import com.yihu.ehr.health.util.operator.StringUtil;
import com.yihu.iot.util.operator.DateUtil;
import com.yihu.iot.util.operator.MD5;
import com.yihu.iot.util.operator.StringUtil;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/util/encode/Base64.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.util.encode;
package com.yihu.iot.util.encode;
/**

+ 3 - 3
app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/encode/DES.java

@ -1,8 +1,8 @@
package com.yihu.ehr.iot.util.encode;
package com.yihu.iot.util.encode;
import com.yihu.ehr.iot.util.operator.DateUtil;
import com.yihu.ehr.iot.util.operator.StringUtil;
import com.yihu.iot.util.operator.DateUtil;
import com.yihu.iot.util.operator.StringUtil;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/encode/HexEncode.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.util.encode;
package com.yihu.iot.util.encode;
/**
 * @created Created by Air on 2015/6/2.

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/util/encode/RSA.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.util.encode;
package com.yihu.iot.util.encode;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/excel/AExcelReader.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.util.excel;
package com.yihu.iot.util.excel;
import jxl.Sheet;
import jxl.Workbook;

+ 2 - 2
app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/excel/reader/IotDeviceImportVOReader.java

@ -1,6 +1,6 @@
package com.yihu.ehr.iot.util.excel.reader;
package com.yihu.iot.util.excel.reader;
import com.yihu.ehr.iot.util.excel.AExcelReader;
import com.yihu.iot.util.excel.AExcelReader;
import com.yihu.jw.restmodel.iot.device.IotDeviceImportVO;
import jxl.Sheet;
import jxl.Workbook;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/util/file/FileUtil.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.util.file;
package com.yihu.iot.util.file;
import eu.medsea.mimeutil.MimeUtil;

+ 3 - 3
app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/http/HttpClientUtil.java

@ -1,7 +1,7 @@
package com.yihu.ehr.iot.util.http;
package com.yihu.iot.util.http;
import com.yihu.ehr.iot.util.encode.Base64;
import com.yihu.ehr.iot.util.operator.StringUtil;
import com.yihu.iot.util.encode.Base64;
import com.yihu.iot.util.operator.StringUtil;
import org.apache.http.Consts;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;

+ 2 - 2
app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/http/HttpHelper.java

@ -1,6 +1,6 @@
package com.yihu.ehr.iot.util.http;
package com.yihu.iot.util.http;
import com.yihu.ehr.iot.constant.Constants;
import com.yihu.iot.constant.Constants;
import org.apache.http.NameValuePair;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.TrustSelfSignedStrategy;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/http/HttpResponse.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.util.http;
package com.yihu.iot.util.http;
/**
 * add by hzp at 2016-3-10

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/http/HttpUtil.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.util.http;
package com.yihu.iot.util.http;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/operator/CollectionUtil.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.util.operator;
package com.yihu.iot.util.operator;
import org.apache.commons.collections.CollectionUtils;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/operator/DateUtil.java

@ -12,7 +12,7 @@
 * -------------------------------------------------------------------------
 * 1.0    2010/07/12    tuchengye              New Making
 ***************************************************************************/
package com.yihu.ehr.iot.util.operator;
package com.yihu.iot.util.operator;
import java.sql.Date;
import java.sql.Time;

+ 2 - 2
app/public-health-server/src/main/java/com/yihu/ehr/health/util/operator/MD5.java

@ -1,7 +1,7 @@
package com.yihu.ehr.health.util.operator;
package com.yihu.iot.util.operator;
import com.yihu.ehr.health.util.encode.HexEncode;
import com.yihu.iot.util.encode.HexEncode;
import java.io.File;
import java.io.FileInputStream;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/util/operator/StringUtil.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.util.operator;
package com.yihu.iot.util.operator;
import org.apache.commons.lang3.StringUtils;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/util/spring/SpringContextHolder.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.util.spring;
package com.yihu.iot.util.spring;
import org.springframework.beans.BeansException;

+ 10 - 9
app/app-iot-server/src/main/resources/application.yml

@ -78,13 +78,14 @@ ehr:
fast-dfs:
  tracker-server: 172.19.103.54:22122
  public-server: http://172.19.103.54:80/
logging:
  path: /data/logger
  file: app-iot-server
#logging:
#  path: /data/logger
#  file: app-iot-server
##如果是外网项目就是flase 内网是true
neiwang:
  enable: true
  wlyy: http://localhost:9099/iot/
---
spring:
  profiles: jwtest
@ -116,9 +117,9 @@ ehr:
fast-dfs:
  tracker-server: 172.19.103.54:22122
  public-server: http://172.19.103.54:80/
logging:
  path: /data/logger
  file: app-iot-server
#logging:
#  path: /data/logger
#  file: app-iot-server
##如果是外网项目就是flase,false会调用内网http接口项目提交  内网是true直接上传fastDfs
neiwang:
  enable: true
@ -153,9 +154,9 @@ ehr:
fast-dfs:
  tracker-server: 11.1.2.9:22122
  accessUrl: http://11.1.2.9
logging:
  path: /data/logger
  file: app-iot-server
#logging:
#  path: /data/logger
#  file: app-iot-server
##如果是外网项目就是flase 内网是true
neiwang:
  enable: false

app/app-iot-server/src/main/resources/logback.xml → app/app-iot-server/src/main/resources/logback.xml.bak


+ 33 - 142
app/public-health-server/pom.xml

@ -8,21 +8,18 @@
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>svr-lib-parent-pom</artifactId>
        <version>1.0.2</version>
        <relativePath>../../svr-lib-parent-pom/pom.xml</relativePath>
        <artifactId>wlyy-parent-pom</artifactId>
        <version>2.0.0</version>
        <relativePath>../../wlyy-parent-pom/pom.xml</relativePath>
    </parent>
    <!-- 依赖包 -->
    <dependencies>
        <!-- 支持Tomcat启动 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>log4j-over-slf4j</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
@ -34,152 +31,53 @@
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>us.codecraft</groupId>
            <artifactId>webmagic-core</artifactId>
            <version>0.4.2</version>
            <exclusions>
                <exclusion>
                    <artifactId>log4j</artifactId>
                    <groupId>log4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>us.codecraft</groupId>
            <artifactId>webmagic-extension</artifactId>
            <version>0.4.2</version>
        </dependency>
        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-starter-client</artifactId>
            <version>1.3.3</version>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <!-- 使用intellij作为集成开发环境 -->
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <scope>compile</scope>
        </dependency>
        <!-- 支持Tomcat启动 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
            <version>4.0.0.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <version>4.0.0.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-taglibs</artifactId>
            <version>4.0.0.RELEASE</version>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-extras</artifactId>
            <version>3.0.5</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.4.0</version>
            <exclusions>
                <exclusion>
                    <artifactId>classmate</artifactId>
                    <groupId>com.fasterxml</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <groupId>io.searchbox</groupId>
            <artifactId>jest</artifactId>
            <version>2.4.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>4.0</version>
        </dependency>
        <dependency>
            <groupId>eu.medsea.mimeutil</groupId>
            <artifactId>mime-util</artifactId>
            <version>2.1.3</version>
            <exclusions>
                <exclusion>
                    <artifactId>slf4j-log4j12</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>net.lingala.zip4j</groupId>
            <artifactId>zip4j</artifactId>
            <version>1.3.2</version>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.4</version>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <version>4.5.1</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20151123</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.jexcelapi</groupId>
            <artifactId>jxl</artifactId>
@ -187,49 +85,42 @@
        </dependency>
        <dependency>
            <groupId>com.yihu.ehr</groupId>
            <artifactId>commons-admin-gateway-model</artifactId>
            <version>1.1.0</version>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-request-mapping</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.ehr</groupId>
            <artifactId>commons-util</artifactId>
            <version>1.1.0</version>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>log4j-core</artifactId>
                    <groupId>org.apache.logging.log4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>log4j-api</artifactId>
                    <groupId>org.apache.logging.log4j</groupId>
                    <groupId>org.slf4j</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- ehr -->
        <dependency>
            <groupId>com.yihu.ehr</groupId>
            <artifactId>commons-rest-model</artifactId>
            <artifactId>commons-admin-gateway-model</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-request-mapping</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model</artifactId>
            <version>1.0.0</version>
            <groupId>com.yihu.ehr</groupId>
            <artifactId>commons-util</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.base</groupId>
            <artifactId>common-data-fastdfs</artifactId>
            <version>1.0.0</version>
            <groupId>com.yihu.ehr</groupId>
            <artifactId>commons-rest-model</artifactId>
            <version>1.1.0</version>
        </dependency>
        <!-- jkzl starter -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-logging</artifactId>
            <groupId>com.yihu</groupId>
            <artifactId>fastdfs-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
    </dependencies>

+ 20 - 0
app/public-health-server/src/main/java/com/yihu/AppHealthServer.java

@ -0,0 +1,20 @@
package com.yihu;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
@SpringBootApplication
public class AppHealthServer extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(AppHealthServer.class);
    }
	public static void main(String[] args) {
        SpringApplication app = new SpringApplication(AppHealthServer.class);
        app.run(args);
	}
}

+ 0 - 34
app/public-health-server/src/main/java/com/yihu/ehr/health/AppHealthServer.java

@ -1,34 +0,0 @@
package com.yihu.ehr.health;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.ManagementWebSecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@EnableAutoConfiguration(exclude = {
        SecurityAutoConfiguration.class,
        ManagementWebSecurityAutoConfiguration.class,
        DataSourceAutoConfiguration.class,
        HibernateJpaAutoConfiguration.class,
        DataSourceTransactionManagerAutoConfiguration.class})
@ComponentScan(basePackages={"com.yihu.base", "com.yihu.ehr.health"})
public class AppHealthServer extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(AppHealthServer.class);
    }
	public static void main(String[] args) {
        SpringApplication app = new SpringApplication(AppHealthServer.class);
        app.run(args);
	}
}

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/config/SwaggerConfig.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.config;
package com.yihu.health.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/constant/Constants.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.constant;
package com.yihu.health.constant;
/**
 * Created by lingfeng on 2015/6/23.

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/constant/ServiceApi.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.constant;
package com.yihu.health.constant;
/**
 * @author yeshijie on 2018/1/22.

+ 2 - 6
app/public-health-server/src/main/java/com/yihu/ehr/health/controller/archives/ArchivesController.java

@ -1,9 +1,7 @@
package com.yihu.ehr.health.controller.archives;
package com.yihu.health.controller.archives;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.ehr.health.service.archives.ArchivesService;
import com.yihu.health.service.archives.ArchivesService;
import com.yihu.jw.restmodel.archives.PatientArchivesInfoVO;
import com.yihu.jw.restmodel.archives.PatientArchivesVO;
import com.yihu.jw.restmodel.common.Envelop;
@ -14,8 +12,6 @@ import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * Created by Trick on 2018/2/22.
 */

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/controller/common/BaseController.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.controller.common;
package com.yihu.health.controller.common;
import com.yihu.ehr.util.rest.Envelop;
import org.springframework.beans.factory.annotation.Value;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/controller/common/ErrorController.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.controller.common;
package com.yihu.health.controller.common;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/controller/common/IndexController.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.controller.common;
package com.yihu.health.controller.common;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

+ 3 - 4
app/public-health-server/src/main/java/com/yihu/ehr/health/controller/dictionary/SystemDictController.java

@ -1,9 +1,8 @@
package com.yihu.ehr.health.controller.dictionary;
package com.yihu.health.controller.dictionary;
import com.yihu.ehr.health.controller.common.BaseController;
import com.yihu.ehr.health.service.dictionary.SystemDictService;
import com.yihu.health.controller.common.BaseController;
import com.yihu.health.service.dictionary.SystemDictService;
import com.yihu.jw.restmodel.archives.dict.SystemDictVO;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.rm.iot.IotRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/AccessToken.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.model;
package com.yihu.health.model;
/**
 * Created by zhenglingfeng on 2017/3/8.

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/model/ListResult.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.model;
package com.yihu.health.model;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/model/MenuResult.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.model;
package com.yihu.health.model;
import java.util.ArrayList;
import java.util.List;

+ 1 - 1
app/app-iot-server/src/main/java/com/yihu/ehr/iot/model/ObjectResult.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.model;
package com.yihu.health.model;
/**

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/model/Result.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.model;
package com.yihu.health.model;
import java.lang.reflect.Field;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/model/user/UserModel.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.model.user;
package com.yihu.health.model.user;
import java.io.Serializable;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/security/config/EhrWebHttpSessionConfiguration.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.security.config;
package com.yihu.health.security.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

app/public-health-server/src/main/java/com/yihu/ehr/health/security/config/EhrWebSecurityConfiguration.java → app/public-health-server/src/main/java/com/yihu/health/security/config/EhrWebSecurityConfiguration.java


+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebAccessDecisionManager.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.security.core;
package com.yihu.health.security.core;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebAuthenticationFailureHandler.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.security.core;
package com.yihu.health.security.core;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.ehr.util.rest.Envelop;

+ 1 - 5
app/app-iot-server/src/main/java/com/yihu/ehr/iot/security/core/EhrWebAuthenticationProvider.java

@ -1,4 +1,4 @@
package com.yihu.ehr.iot.security.core;
package com.yihu.health.security.core;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.InternalAuthenticationServiceException;
@ -13,10 +13,6 @@ import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.util.Assert;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
 * Created by progr1mmer on 2018/1/26.

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebAuthenticationSuccessHandler.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.security.core;
package com.yihu.health.security.core;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.ehr.agModel.user.UserDetailModel;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebAuthenticationToken.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.security.core;
package com.yihu.health.security.core;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.SpringSecurityCoreVersion;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebContextLogoutHandler.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.security.core;
package com.yihu.health.security.core;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

+ 1 - 1
app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebUserDetails.java

@ -1,4 +1,4 @@
package com.yihu.ehr.health.security.core;
package com.yihu.health.security.core;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

+ 3 - 3
app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebUserDetailsService.java

@ -1,9 +1,9 @@
package com.yihu.ehr.health.security.core;
package com.yihu.health.security.core;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.ehr.agModel.user.UserDetailModel;
import com.yihu.ehr.health.util.http.HttpHelper;
import com.yihu.ehr.health.util.http.HttpResponse;
import com.yihu.health.util.http.HttpHelper;
import com.yihu.health.util.http.HttpResponse;
import com.yihu.ehr.util.rest.Envelop;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

+ 0 - 0
app/public-health-server/src/main/java/com/yihu/ehr/health/security/core/EhrWebUsernamePasswordAuthenticationFilter.java


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików