Jelajahi Sumber

朗国传送物料,bom资料项目

zhoudw 7 tahun lalu
induk
melakukan
2e11d21124
100 mengubah file dengan 4642 tambahan dan 0 penghapusan
  1. 96 0
      eis-api/pom.xml
  2. 26 0
      eis-api/src/main/java/com/uas/eis/UasApiApplication.java
  3. 13 0
      eis-api/src/main/java/com/uas/eis/controller/dao/ApiLogDao.java
  4. 54 0
      eis-api/src/main/java/com/uas/eis/controller/dao/CommonDao.java
  5. 97 0
      eis-api/src/main/java/com/uas/eis/controller/entity/ApiLog.java
  6. 33 0
      eis-api/src/main/java/com/uas/eis/controller/pm/BOMController.java
  7. 25 0
      eis-api/src/main/java/com/uas/eis/controller/scm/ProductController.java
  8. 35 0
      eis-api/src/main/java/com/uas/eis/controller/test/TestController.java
  9. 14 0
      eis-api/src/main/java/com/uas/eis/service/plm/BOMService.java
  10. 198 0
      eis-api/src/main/java/com/uas/eis/service/plm/impl/BOMServiceImpl.java
  11. 14 0
      eis-api/src/main/java/com/uas/eis/service/scm/ProductService.java
  12. 109 0
      eis-api/src/main/java/com/uas/eis/service/scm/impl/ProductServiceImpl.java
  13. 15 0
      eis-api/src/main/java/com/uas/eis/service/test/TestService.java
  14. 30 0
      eis-api/src/main/java/com/uas/eis/service/test/impl/TestServiceImpl.java
  15. 54 0
      eis-api/src/main/java/com/uas/eis/util/LogUtil.java
  16. 184 0
      eis-api/src/main/java/com/uas/eis/util/MasterManager.java
  17. 43 0
      eis-api/src/main/resources/META-INF/MANIFEST.MF
  18. 52 0
      eis-api/src/main/resources/application.yml
  19. 44 0
      eis-api/src/main/resources/logback.xml
  20. 2 0
      eis-api/src/main/resources/token.properties
  21. 136 0
      eis-api/src/test/java/com/api/HttpClient.java
  22. 107 0
      eis-api/src/test/java/com/api/HttpClient1.java
  23. 102 0
      eis-api/src/test/java/com/api/Test.java
  24. 45 0
      eis-api/src/test/java/com/api/UasEisApplicationTests.java
  25. 124 0
      eis-common/pom.xml
  26. 70 0
      eis-common/src/main/java/com/uas/eis/controller/UserController.java
  27. 65 0
      eis-common/src/main/java/com/uas/eis/core/WebSecurityConfig.java
  28. 31 0
      eis-common/src/main/java/com/uas/eis/core/config/PropConfig.java
  29. 67 0
      eis-common/src/main/java/com/uas/eis/core/config/YmlConfig.java
  30. 60 0
      eis-common/src/main/java/com/uas/eis/core/filter/JWTAuthenticationFilter.java
  31. 73 0
      eis-common/src/main/java/com/uas/eis/core/filter/JWTLoginFilter.java
  32. 14 0
      eis-common/src/main/java/com/uas/eis/dao/UserRepository.java
  33. 68 0
      eis-common/src/main/java/com/uas/eis/service/impl/CustomAuthenticationProvider.java
  34. 26 0
      eis-common/src/main/java/com/uas/eis/service/impl/GrantedAuthorityImpl.java
  35. 249 0
      eis-common/src/main/java/com/uas/eis/service/impl/QueryServiceImpl.java
  36. 41 0
      eis-common/src/main/java/com/uas/eis/service/impl/UserDetailsServiceImpl.java
  37. 7 0
      eis-common/src/main/java/com/uas/eis/util/ConstantKey.java
  38. 184 0
      eis-common/src/main/java/com/uas/eis/util/MasterManager.java
  39. 88 0
      eis-common/src/main/java/com/uas/eis/util/StringUtils.java
  40. 384 0
      eis-dingzhi/logs/log.2018-07-10.log
  41. 139 0
      eis-dingzhi/src/main/java/com/uas/eis/service/impl/ReqServiceImpl.java
  42. 55 0
      eis-wms/src/main/java/com/uas/eiswms/controller/ProdIOController.java
  43. 126 0
      eis-yunding/src/main/java/com/uas/eis/service/Impl/ProductServiceImpl.java
  44. 126 0
      eis-yunding/src/main/java/com/uas/eis/service/Impl/SaleReturnServiceImpl.java
  45. 277 0
      eis-yunding/src/main/java/com/uas/eis/service/Impl/YundingServiceImpl.java
  46. 123 0
      eis-yunding/src/main/java/com/uas/eis/service/impl/SaleServiceImpl.java
  47. 341 0
      eis-yunding/src/main/java/com/uas/eis/service/impl/StockServiceImpl.java
  48. 48 0
      eis-yunding/src/main/resources/config/application.yml
  49. 197 0
      logs/log.2018-10-10.log
  50. 131 0
      logs/log.log
  51. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/accessors-smart-1.1.jar
  52. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/android-json-0.0.20131108.vaadin1.jar
  53. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/antlr-2.7.7.jar
  54. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/asm-5.0.3.jar
  55. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/aspectjweaver-1.8.13.jar
  56. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/assertj-core-2.6.0.jar
  57. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/classmate-1.3.1.jar
  58. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/commons-beanutils-1.8.0.jar
  59. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/commons-codec-1.10.jar
  60. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/commons-collections-3.2.1.jar
  61. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/commons-lang-2.5.jar
  62. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/commons-logging-1.1.1.jar
  63. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/dom4j-1.6.1.jar
  64. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/druid-1.0.26.jar
  65. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/eis-api.jar
  66. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/ezmorph-1.0.6.jar
  67. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/fastjson-1.2.15.jar
  68. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/flexjson-2.1.jar
  69. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/hamcrest-core-1.3.jar
  70. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/hamcrest-library-1.3.jar
  71. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/hibernate-commons-annotations-5.0.1.Final.jar
  72. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/hibernate-core-5.0.12.Final.jar
  73. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/hibernate-entitymanager-5.0.12.Final.jar
  74. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/hibernate-jpa-2.1-api-1.0.0.Final.jar
  75. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/hibernate-validator-5.3.6.Final.jar
  76. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/httpclient-4.5.5.jar
  77. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/httpcore-4.4.9.jar
  78. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/httpmime-4.5.5.jar
  79. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/jackson-annotations-2.8.0.jar
  80. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/jackson-core-2.8.10.jar
  81. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/jackson-core-asl-1.9.13.jar
  82. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/jackson-databind-2.8.10.jar
  83. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/jackson-mapper-asl-1.9.13.jar
  84. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/jandex-2.0.0.Final.jar
  85. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/javassist-3.18.1-GA.jar
  86. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/javax.transaction-api-1.2.jar
  87. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/jboss-logging-3.3.0.Final.jar
  88. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/jcl-over-slf4j-1.7.25.jar
  89. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/jconsole.jar
  90. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/jjwt-0.6.0.jar
  91. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/json-lib-2.4-jdk15.jar
  92. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/json-path-2.2.0.jar
  93. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/json-smart-2.2.1.jar
  94. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/jsonassert-1.4.0.jar
  95. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/jul-to-slf4j-1.7.25.jar
  96. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/junit-4.12.jar
  97. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/log4j-over-slf4j-1.7.25.jar
  98. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/logback-classic-1.1.11.jar
  99. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/logback-core-1.1.11.jar
  100. TEMPAT SAMPAH
      out/artifacts/eis_api_jar/mockito-core-1.10.19.jar

+ 96 - 0
eis-api/pom.xml

@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>uas-eis</artifactId>
+        <groupId>com.uas</groupId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>eis-api</artifactId>
+    <name>eis-api</name>
+    <url>http://maven.apache.org</url>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.uas</groupId>
+            <artifactId>eis-common</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+            <version>4.0.2.RELEASE</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <!-- 指定SpringBoot程序的main函数入口类 -->
+                    <mainClass>com.uas.eis.UasApiApplication</mainClass>
+                    <includeSystemScope>true</includeSystemScope>
+                </configuration>
+
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+
+                <groupId>org.apache.maven.plugins</groupId>
+
+                <artifactId>maven-compiler-plugin</artifactId>
+
+                <configuration>
+
+                    <source>1.7</source>
+                    <target>1.7</target>
+
+                    <compilerArguments>
+                        <!-- 打包本地jar包 -->
+                        <extdirs>${project.basedir}/lib</extdirs>
+                    </compilerArguments>
+                </configuration>
+
+            </plugin>
+
+        </plugins>
+
+
+        <!-- 打包所有jar包 -->
+        <resources>
+            <resource>
+                <directory>lib</directory>
+                <targetPath>BOOT-INF/lib/</targetPath>
+                <includes>
+                    <include>**/*.jar</include>
+                </includes>
+            </resource>
+
+            <!-- 某些情况下,打包后运行不起来需要打开注释 -->
+            <!-- <resource>
+                <directory>src/main/resources</directory>
+                <targetPath>BOOT-INF/classes/</targetPath>
+            </resource> -->
+        </resources>
+
+    </build>
+
+
+</project>

+ 26 - 0
eis-api/src/main/java/com/uas/eis/UasApiApplication.java

@@ -0,0 +1,26 @@
+package com.uas.eis;
+
+
+import com.uas.eis.core.config.DynamicDataSourceRegister;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Import;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+
+@SpringBootApplication
+@Import({DynamicDataSourceRegister.class})
+public class UasApiApplication {
+
+	@Bean
+	public BCryptPasswordEncoder bCryptPasswordEncoder(){
+		return new BCryptPasswordEncoder();
+	}
+
+
+	public static void main(String[] args) {
+		SpringApplication application = new SpringApplication(UasApiApplication.class);
+		application.run(args);
+	}
+	
+}

+ 13 - 0
eis-api/src/main/java/com/uas/eis/controller/dao/ApiLogDao.java

@@ -0,0 +1,13 @@
+package com.uas.eis.controller.dao;
+
+import com.uas.eis.controller.entity.ApiLog;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+/**
+ * Created by zdw
+ * 2018-09-19 17:07.
+ */
+@Repository
+public interface ApiLogDao extends JpaRepository<ApiLog,Long>{
+}

+ 54 - 0
eis-api/src/main/java/com/uas/eis/controller/dao/CommonDao.java

@@ -0,0 +1,54 @@
+package com.uas.eis.controller.dao;
+
+import com.uas.eis.dao.BaseDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import java.util.Map;
+
+/**
+ * Created by zdw
+ * 2018-09-21 08:38.
+ */
+
+@Repository
+public class CommonDao {
+
+    @Autowired
+    BaseDao baseDao;
+
+    //判断form:下拉框,YN字段数据有效
+    public String checkFormDataValid(Map<Object, Object> data, String table){
+        StringBuilder sb = new StringBuilder();
+        for (Map.Entry<Object, Object> entry : data.entrySet()) {
+            int count =  baseDao.getCount("select count(*) from FORMFIELDVALUE_VIEW where fo_caller='"+table+"' and fd_field='"+entry.getKey()+"'");
+            if(count>0){
+                count = baseDao.getCount("select count(*) from FORMFIELDVALUE_VIEW where fo_caller='"+table+"' and fd_field='"+entry.getKey()+"' and dlc_display='"+entry.getValue()+"'");
+                if (count==0){
+                    sb.append(entry.getKey()+"数据无效;");
+                }
+            }
+
+        }
+        return sb.toString();
+    }
+
+    //判断Grid:combo,YN字段数据有效
+    public String checkGridDataValid(Map<Object, Object> data, String table){
+        StringBuilder sb = new StringBuilder();
+        for (Map.Entry<Object, Object> entry : data.entrySet()) {
+            int count =  baseDao.getCount("select count(*) from GRIDFIELDVALUE_VIEW where DG_CALLER='"+table+"' and DG_FIELD='"+entry.getKey()+"'");
+            if(count>0){
+                count = baseDao.getCount("select count(*) from GRIDFIELDVALUE_VIEW where DG_CALLER='"+table+"' and DG_FIELD='"+entry.getKey()+"' and dlc_display='"+entry.getValue()+"'");
+                if (count==0){
+                    sb.append(entry.getKey()+"数据无效;");
+                }
+            }
+
+        }
+        return sb.toString();
+    }
+
+
+
+}

+ 97 - 0
eis-api/src/main/java/com/uas/eis/controller/entity/ApiLog.java

@@ -0,0 +1,97 @@
+package com.uas.eis.controller.entity;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Created by zdw
+ * 2018-09-19 17:03.
+ */
+@Entity
+@Table(name = "api_log")
+public class ApiLog implements Serializable{
+
+
+    private static final long serialVersionUID = 7765877251951713670L;
+
+    @Id
+    @GeneratedValue(strategy =GenerationType.SEQUENCE,generator = "apiseq")
+    @SequenceGenerator(name="apiseq",sequenceName="api_log_seq",allocationSize=1)
+    @Column(name = "ap_id")
+    private Long id;
+
+    @Column(name = "ap_data")
+    private String data;
+
+    @Column(name = "ap_status")
+    private String status;
+
+    @Column(name = "ap_date")
+    private Date date = new Date();
+
+    @Column(name = "ap_type")
+    private String type;
+
+    @Column(name = "ap_error_code")
+    private String errorCode;
+
+    @Column(name = "ap_error_msg")
+    private String errorMsg;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getData() {
+        return data;
+    }
+
+    public void setData(String data) {
+        this.data = data;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getErrorCode() {
+        return errorCode;
+    }
+
+    public void setErrorCode(String errorCode) {
+        this.errorCode = errorCode;
+    }
+
+    public String getErrorMsg() {
+        return errorMsg;
+    }
+
+    public void setErrorMsg(String errorMsg) {
+        this.errorMsg = errorMsg;
+    }
+}

+ 33 - 0
eis-api/src/main/java/com/uas/eis/controller/pm/BOMController.java

@@ -0,0 +1,33 @@
+package com.uas.eis.controller.pm;
+
+import com.uas.eis.service.plm.BOMService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+/**
+ * Created by zdw
+ * 2018-09-19 09:37.
+ */
+@RestController
+@RequestMapping("/pm")
+public class BOMController {
+
+    @Autowired
+    private BOMService bomService;
+
+
+    @PostMapping("/postBOM")
+    public Map<String,Object> postBOM(@RequestBody String Data){
+        return bomService.postBOM(Data);
+    }
+
+
+
+
+
+}

+ 25 - 0
eis-api/src/main/java/com/uas/eis/controller/scm/ProductController.java

@@ -0,0 +1,25 @@
+package com.uas.eis.controller.scm;
+
+import com.uas.eis.service.scm.ProductService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+/**
+ * Created by zdw
+ * 2018-09-19 09:37.
+ */
+@RestController
+@RequestMapping("/scm")
+public class ProductController {
+    @Autowired
+    private ProductService productService;
+
+
+    @PostMapping("/postProduct")
+    public Map<String,Object> postProduct(@RequestBody String Data){
+        return productService.postProduct(Data);
+    }
+
+}

+ 35 - 0
eis-api/src/main/java/com/uas/eis/controller/test/TestController.java

@@ -0,0 +1,35 @@
+package com.uas.eis.controller.test;
+
+import com.uas.eis.service.test.TestService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Created by zdw
+ * 2018-09-18 18:47.
+ */
+
+
+@RestController
+@RequestMapping("/test")
+public class TestController {
+
+    @Autowired
+    private TestService testService;
+
+    @RequestMapping(value = "/master")
+    public String test(String master){
+        testService.t2(master);
+
+        return "ssss";
+    }
+
+    @RequestMapping(value = "/test")
+    public String test1(){
+
+
+        return testService.t3();
+    }
+
+}

+ 14 - 0
eis-api/src/main/java/com/uas/eis/service/plm/BOMService.java

@@ -0,0 +1,14 @@
+package com.uas.eis.service.plm;
+
+import java.util.Map;
+
+/**
+ * Created by zdw
+ * 2018-09-21 08:45.
+ */
+public interface BOMService {
+
+    Map<String,Object> postBOM(String Data);
+
+
+}

+ 198 - 0
eis-api/src/main/java/com/uas/eis/service/plm/impl/BOMServiceImpl.java

@@ -0,0 +1,198 @@
+package com.uas.eis.service.plm.impl;
+
+import com.uas.eis.controller.dao.ApiLogDao;
+import com.uas.eis.controller.dao.CommonDao;
+import com.uas.eis.core.config.SpObserver;
+import com.uas.eis.dao.BaseDao;
+import com.uas.eis.dao.SqlRowList;
+import com.uas.eis.service.plm.BOMService;
+import com.uas.eis.util.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by zdw
+ * 2018-09-21 08:45.
+ */
+@Service
+public class BOMServiceImpl implements BOMService {
+
+    @Autowired
+    private ApiLogDao apiLogDao;
+
+    @Autowired
+    private BaseDao baseDao;
+
+    @Autowired
+    private CommonDao commonDao;
+
+
+
+    @Override
+    public Map<String, Object> postBOM(String Data) {
+        Map<String,Object> jsonMap = JacksonUtil.fromJson(Data);
+        Map<String,Object> modelMap = new HashMap();
+        Map<Object,Object> data = (Map<Object, Object>) jsonMap.get("data");
+        Object master = jsonMap.get("master");
+        SpObserver.putSp(master.toString());
+
+        if (data==null){
+            BaseUtil.showError("数据为空");
+        }
+        String error = checkBOM(data);
+
+        String mothercode = data.get("bo_mothercode").toString();
+        if (error.length()>0) {
+            apiLogDao.save(LogUtil.getBomFailLog(mothercode,error));
+            modelMap.put("message",error);
+            modelMap.put("success",false);
+        }else {
+            saveBOM(data);
+            apiLogDao.save(LogUtil.getBomSuccessLog(mothercode));
+            modelMap.put("message",error);
+            modelMap.put("success",true);
+        }
+        return modelMap;
+    }
+
+    private String checkBOM(Map<Object, Object> data) {
+        StringBuilder sb = new StringBuilder();
+        List<Map<String,Object>> detail   = (List<Map<String, Object>>) data.get("detail");
+        //判断必须数据(主表)
+        if (data.get("bo_ispast")==null)
+            sb.append("是否跳层为空;");
+        if (data.get("bo_mothercode")==null)
+            sb.append("母件编号为空;");
+        if (data.get("bo_wccode")==null)
+            sb.append("工作中心编号为空;");
+        if (data.get("bo_wcname")==null)
+            sb.append("工作中心名称为空;");
+        if (data.get("bo_level")==null)
+            sb.append("工作中心名称为空;");
+        //判断必须数据(从表)
+        if (detail==null)
+            sb.append("BOM明细数据为空;");
+        //校验主表数据
+        sb.append(commonDao.checkGridDataValid(data,"BOM"));
+
+        String mothercode = data.get("bo_mothercode").toString();
+
+        //判断是否已经存在相同母件的BOM
+        SqlRowList rs = baseDao.queryForRowSet("SELECT  bo_id FROM bom where bo_mothercode='"+mothercode+"'  and bo_mothercode<>' '");
+        if (rs.next()) {
+            sb.append("此母件料号"+mothercode+"已存在其他BOM:不能重复录入;");
+        }
+
+        //判断是否已经存在相同母件的BOM
+        int count = baseDao.getCountByCondition("product", "pr_code='"+mothercode+"'  and pr_statuscode='AUDITED'  ");
+        if(count==0){
+            sb.append("不存在已审核的母件物料!");
+        }
+        for (Map<String, Object> objDet : detail) {
+            if (objDet.get("bd_detno")==null)
+                sb.append("明细:序号为空;");
+            if (objDet.get("bd_soncode")==null)
+                sb.append("明细:子件编号为空;");
+            if (objDet.get("bd_baseqty")==null)
+                sb.append("明细:单位用量为空;");
+            if (mothercode.equals(objDet.get("bd_soncode"))) {
+                sb.append("BOM清单里面不允许出现母件编号(" + mothercode + "),明细行:" + objDet.get("bd_detno"));
+            }
+            count = baseDao.getCountByCondition("product", "pr_code='"+objDet.get("bd_soncode")+"'  and pr_statuscode='AUDITED'  ");
+            if(count==0){
+                sb.append("不存在已审核的子件物料"+objDet.get("bd_soncode")+"!");
+            }
+            Object rep_code = objDet.get("bd_repcode");
+            if(StringUtil.hasText(rep_code)){
+                for(String repcode : rep_code.toString().split(",")){
+                    rs = baseDao.queryForRowSet("select pr_code from product where pr_code=? and pr_statuscode='AUDITED'", repcode);
+                    if(!rs.next()){
+                        sb.append("行:"+objDet.get("bd_detno")+",替代料号:"+repcode+",不存在或者未审核!");
+                    }
+                }
+            }
+            //校验从表数据
+            sb.append(commonDao.checkGridDataValid(data,"BOM"));
+        }
+        return sb.toString();
+    }
+
+    @Transactional
+    private void saveBOM(Map<Object, Object> data) {
+        List<Map<Object, Object>> grid = (List<Map<Object, Object>>) data.get("detail");
+        data.remove("detail");
+        Map<Object, Object> store = data;
+        String mothercode = store.get("bo_mothercode").toString();
+        int bo_id = baseDao.getSeqId("BOM_SEQ");
+        store.put("bo_id",bo_id);
+        store.put("bo_status","在录入");
+        store.put("bo_statuscode","ENTERING");
+        List<String> repSql = new ArrayList<String>();
+        for (Map<Object, Object> map : grid) {
+            map.put("bd_id", baseDao.getSeqId("BOMDETAIL_SEQ"));
+            map.put("bd_bomid", store.get("bo_id"));
+            map.put("bd_mothercode", store.get("bo_mothercode"));
+            map.put("bd_motherid", store.get("bo_id"));
+            //判断是否存在bd_repcode 替代料编号,如果有,判断是否替代料编号是否存在
+            Object rep_code = map.get("bd_repcode");
+            if(StringUtil.hasText(rep_code)){
+                rep_code = rep_code.toString().replace(",", ",").replace(" ", "");
+                checkRepCode(rep_code.toString().split(","),map,repSql);
+                map.remove("bd_repcode");
+                map.put("bd_repcode",rep_code);
+            }
+            Object bd_location=map.get("bd_location");
+            if (bd_location!=null){
+                bd_location=bd_location.toString().replace(",", ",").replace(" ", "");//替换位号的全角逗号为半角,空格替换
+            }
+            map.remove("bd_location");
+            map.put("bd_location",bd_location);
+        }
+        List<String> gridSql = SqlUtil.getInsertSqlbyGridStore(grid, "BOMDetail");
+        baseDao.execute(gridSql);
+        // 保存
+        String formSql = SqlUtil.getInsertSqlByFormStore(store, "BOM", new String[] {}, new Object[] {});
+        baseDao.execute(formSql);
+        //插入替代料
+        baseDao.execute(repSql);
+        //设置从表倒数
+        baseDao.execute("update bomdetail set bd_baseqtyback=(case when nvl(bd_baseqty,0)<>0 then 1/bd_baseqty else 0 end) where bd_bomid=? and bd_baseqtyback<>(case when nvl(bd_baseqty,0)<>0 then 1/bd_baseqty else 0 end) ", store.get("bo_id"));
+        sortBomdetailDetno(store.get("bo_id"));
+    }
+
+    private void checkRepCode(String [] strs,Map<Object, Object> map,List<String> repSql){
+        int detno = 1 ;
+        for(String repcode : strs){
+            SqlRowList rs = baseDao.queryForRowSet("select pr_code from product where pr_code=? and pr_statuscode='AUDITED'", repcode);
+            repSql.add("insert into prodreplace (pre_id,pre_detno,pre_prodcode,pre_bomid,pre_bddetno,pre_soncode,pre_repcode,pre_bdid,"+
+                    " pre_rate ,pre_reprate ,pre_level ,pre_startdate,pre_enddate ,pre_validdate)values("+
+                    " PRODREPLACE_SEQ.nextval,"+detno+",'"+map.get("bd_mothercode")+"','"+map.get("bd_bomid")+"','"+map.get("bd_detno")+"','"+map.get("bd_soncode")+"','"+repcode+"','"+map.get("bd_id")+"',"
+                    + " 0, 0,0 ,sysdate,sysdate,sysdate)");
+            detno ++;
+        }
+        repSql.add(repSql.size()-detno+1, "delete from prodreplace where pre_bdid="+map.get("bd_id")+" and pre_bddetno='"+map.get("bd_detno")+"'");
+        repSql.add("update bomdetail set bd_ifrep=-1 where bd_id="+map.get("bd_id")+" and bd_detno="+map.get("bd_detno"));
+    }
+
+
+    private void sortBomdetailDetno(Object bo_id){
+        int a = 0;
+        SqlRowList rs1 = baseDao.queryForRowSet("select * from bomdetail where bd_bomid="+bo_id+" order by bd_detno");
+        while(rs1.next()){
+            a++;
+            baseDao.execute("update bomdetail set bd_detno="+a+" where  bd_id="+rs1.getInt("bd_id"));
+            baseDao.execute("update prodreplace set pre_bddetno="+a+" where pre_bdid="+rs1.getInt("bd_id"));
+        }
+    }
+
+
+
+
+
+}

+ 14 - 0
eis-api/src/main/java/com/uas/eis/service/scm/ProductService.java

@@ -0,0 +1,14 @@
+package com.uas.eis.service.scm;
+
+import java.util.Map;
+
+/**
+ * Created by zdw
+ * 2018-09-19 11:55.
+ */
+public interface ProductService {
+
+    Map<String,Object> postProduct(String Data);
+
+
+}

+ 109 - 0
eis-api/src/main/java/com/uas/eis/service/scm/impl/ProductServiceImpl.java

@@ -0,0 +1,109 @@
+package com.uas.eis.service.scm.impl;
+
+import com.uas.eis.controller.dao.ApiLogDao;
+import com.uas.eis.controller.dao.CommonDao;
+import com.uas.eis.core.config.SpObserver;
+import com.uas.eis.dao.BaseDao;
+import com.uas.eis.service.scm.ProductService;
+import com.uas.eis.util.BaseUtil;
+import com.uas.eis.util.JacksonUtil;
+import com.uas.eis.util.LogUtil;
+import com.uas.eis.util.SqlUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Created by zdw
+ * 2018-09-19 12:31.
+ */
+@Service
+public class ProductServiceImpl implements ProductService{
+    @Autowired
+    private BaseDao baseDao;
+
+    @Autowired
+    private ApiLogDao apiLogDao;
+
+    @Autowired
+    private CommonDao commonDao;
+
+
+
+
+
+    @Override
+    public Map<String,Object> postProduct(String Data) {
+        Map<String,Object> jsonMap = JacksonUtil.fromJson(Data);
+        Map<String,Object> modelMap = new HashMap();
+        Map<Object,Object> data = (Map<Object, Object>) jsonMap.get("data");
+        Object master = jsonMap.get("master");
+        SpObserver.putSp(master.toString());
+
+
+        if (data==null){
+            BaseUtil.showError("数据为空");
+        }
+        String error = checkProduct(data);
+        if (error.length()>0) {
+            apiLogDao.save(LogUtil.getProductFailLog(data.toString(),error));
+            modelMap.put("message",error);
+            modelMap.put("success",false);
+        }else {
+            saveProduct(data);
+            apiLogDao.save(LogUtil.getProductSuccessLog(data.toString()));
+            modelMap.put("message","成功");
+            modelMap.put("success",true);
+        }
+        return modelMap;
+    }
+
+    private String checkProduct(Map<Object, Object> data) {
+
+        StringBuilder sb = new StringBuilder();
+        //判断必须数据
+        if (data.get("pr_code")==null)
+            sb.append("物料编号为空;");
+        if (data.get("pr_detail")==null)
+            sb.append("物料名称为空;");
+        if (data.get("pr_spec")==null)
+            sb.append("规格为空;");
+        if (data.get("pr_unit")==null)
+            sb.append("物料单位为空;");
+        if (data.get("pr_manutype")==null)
+            sb.append("生产类型为空;");
+        if (data.get("pr_dhzc")==null)
+            sb.append("计划类型为空;");
+        if (data.get("pr_supplytype")==null)
+            sb.append("供应类型为空;");
+        if (data.get("pr_acceptmethod")==null)
+            sb.append("接收方式为空;");
+
+
+        //判断唯一
+        boolean bool = baseDao.checkByCondition("Product", "pr_code='" + data.get("pr_code") + "'");
+        if (!bool) {
+            sb.append("物料编号已存在;");
+        }
+        //校验数据
+        sb.append(commonDao.checkFormDataValid(data,"Product"));
+
+        return sb.toString();
+    }
+
+    @Transactional
+    private void saveProduct(Map<Object, Object> data) {
+
+        data.put("pr_id",baseDao.getSeqId("Product_SEQ"));
+        data.put("pr_status","在录入");
+        data.put("pr_statuscode","ENTERING");
+
+        String formSql = SqlUtil.getInsertSqlByFormStore(data, "Product", new String[] {}, new Object[] {});
+        System.out.println(formSql);
+        baseDao.execute(formSql);
+    }
+
+}

+ 15 - 0
eis-api/src/main/java/com/uas/eis/service/test/TestService.java

@@ -0,0 +1,15 @@
+package com.uas.eis.service.test;
+
+/**
+ * Created by zdw
+ * 2018-09-19 08:41.
+ */
+
+
+public interface TestService {
+
+
+    void t2(String master);
+    String t3();
+
+}

+ 30 - 0
eis-api/src/main/java/com/uas/eis/service/test/impl/TestServiceImpl.java

@@ -0,0 +1,30 @@
+package com.uas.eis.service.test.impl;
+
+import com.uas.eis.service.test.TestService;
+import com.uas.eis.dao.BaseDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * Created by zdw
+ * 2018-09-19 08:44.
+ */
+@Service
+public class TestServiceImpl implements TestService{
+    @Autowired
+    BaseDao baseDao;
+
+    public void t2(String master){
+        baseDao.setJdbcTemplate(master);
+    }
+
+
+    @Override
+    public String t3() {
+        Object id =   baseDao.getFieldDataByCondition("employee","em_id","em_code='U0809'");
+
+       return  id.toString();
+    }
+
+
+}

+ 54 - 0
eis-api/src/main/java/com/uas/eis/util/LogUtil.java

@@ -0,0 +1,54 @@
+package com.uas.eis.util;
+
+import com.uas.eis.controller.entity.ApiLog;
+
+import java.util.Date;
+
+/**
+ * Created by zdw
+ * 2018-09-19 17:13.
+ */
+public class LogUtil {
+
+    public static ApiLog getProductFailLog(String data,String errMsg){
+        ApiLog apiLog = new ApiLog();
+        apiLog.setData(data);
+        apiLog.setDate(new Date());
+        apiLog.setErrorCode("uas create product fail");
+        apiLog.setErrorMsg(errMsg);
+        apiLog.setStatus("fail");
+        apiLog.setType("product");
+        return apiLog;
+    }
+
+    public static ApiLog getProductSuccessLog(String data){
+        ApiLog apiLog = new ApiLog();
+        apiLog.setData(data);
+        apiLog.setDate(new Date());
+        apiLog.setStatus("success");
+        apiLog.setType("product");
+        return apiLog;
+    }
+
+    public static ApiLog getBomFailLog(String code,String errMsg){
+        ApiLog apiLog = new ApiLog();
+        apiLog.setData(code);
+        apiLog.setDate(new Date());
+        apiLog.setErrorCode("uas create product fail");
+        apiLog.setErrorMsg(errMsg);
+        apiLog.setStatus("fail");
+        apiLog.setType("Bom");
+        return apiLog;
+    }
+
+    public static ApiLog getBomSuccessLog(String code){
+        ApiLog apiLog = new ApiLog();
+        apiLog.setData(code);
+        apiLog.setDate(new Date());
+        apiLog.setStatus("success");
+        apiLog.setType("Bom");
+        return apiLog;
+    }
+
+
+}

+ 184 - 0
eis-api/src/main/java/com/uas/eis/util/MasterManager.java

@@ -0,0 +1,184 @@
+package com.uas.eis.util;
+
+import com.alibaba.druid.pool.DruidDataSource;
+import com.alibaba.fastjson.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
+import java.net.URL;
+import java.sql.SQLException;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class MasterManager {
+    /**
+     * 数据源
+     */
+    private static Map<String, DruidDataSource> dataSources = new ConcurrentHashMap<>();
+
+    /**
+     * 账套
+     */
+    private static Set<String> masters = new HashSet<>();
+
+    private static Logger logger = LoggerFactory.getLogger(MasterManager.class);
+
+    static {
+        init();
+    }
+    /**
+     * 初始化所有数据源
+     */
+    public static void init() {
+        clear();
+        logger.info("数据源初始化......");
+        // 从配置中获取数据源信息
+        File propertyFile = new File("application.properties");
+        Properties properties = new Properties();
+        if (!propertyFile.exists() || !propertyFile.isFile()) {
+            try {
+                logger.info("配置文件再次读取......");
+                // 是否以 spring boot jar 形式运行
+                URL location = MasterManager.class.getProtectionDomain().getCodeSource().getLocation();
+                if (org.springframework.util.ResourceUtils.isJarURL(location)) {
+                    // 以 spring boot jar 形式运行时,不能直接复制默认配置文件,需以输入流的方式读取默认配置
+                    InputStream inputStream = MasterManager.class.getResourceAsStream("/" + "application.properties");
+                    byte[] data = new byte[inputStream.available()];
+                    inputStream.read(data);
+                    logger.info("配置文件路径:"+ propertyFile.getPath());
+                    write(propertyFile.getPath(), data, false);
+                    logger.info("读取成功......");
+                }else{
+                    logger.info("非jar包运行......");
+                    propertyFile = BaseUtil.getFile("application.properties");
+                }
+                properties.load(new FileInputStream(propertyFile));
+            }catch (Exception e){
+                e.printStackTrace();
+                BaseUtil.showError("读取配置文件失败");
+            }
+        }
+        String datasourceConfig = properties.getProperty("datasourceConfig");
+        logger.info("datasourceConfig:" + datasourceConfig);
+        JSONObject jsonObject = JSONObject.parseObject(datasourceConfig);
+        Set<Map.Entry<String, Object>> entrySet = jsonObject.entrySet();
+        for (Map.Entry<String, Object> entry : entrySet) {
+            DruidDataSource dataSource = JSONObject.parseObject(entry.getValue().toString(), DruidDataSource.class);
+            dataSources.put(entry.getKey().toUpperCase(), dataSource);
+            masters.add(entry.getKey().toUpperCase());
+        }
+    }
+
+    /**
+     * 清除旧的数据源
+     */
+    private static void clear(){
+        Set<Map.Entry<String, DruidDataSource>> entrySet = dataSources.entrySet();
+        for(Map.Entry<String, DruidDataSource> entry : entrySet){
+            DruidDataSource dataSource = entry.getValue();
+            try {
+                dataSource.close();
+            } catch (Exception e) {
+                logger.error("数据源关闭失败", e);
+            }
+        }
+        dataSources = new ConcurrentHashMap<>();
+    }
+
+    /**
+     * 获取账套对应的数据源
+     *
+     * @param userName
+     *            账套名称
+     *            用于识别B2B、B2C账套的环境(dev、test、prod)
+     * @return 数据源
+     * @throws SQLException
+     */
+    public static DruidDataSource getDataSource(String userName) {
+        if (StringUtils.isEmpty(userName)) {
+            return null;
+        }
+        userName = userName.toUpperCase();
+        DruidDataSource dataSource = dataSources.get(userName);
+        if (dataSource == null) {
+            BaseUtil.showError("数据源为空,请检查账套名称是否正确");
+        }
+        return dataSource;
+    }
+
+    /**
+     * 写入文件
+     *
+     * @param filePath
+     *            文件路径
+     * @param data
+     *            数据
+     * @param allowNoData
+     *            是否允许数据为空(文件无内容)
+     * @throws IOException
+     */
+    public static void write(String filePath, byte[] data, boolean allowNoData) throws IOException {
+        if (StringUtils.isEmpty(filePath)) {
+            throw new IllegalArgumentException("参数不能为空:filePath");
+        }
+        if (!allowNoData && StringUtils.isEmpty(data)) {
+            throw new IllegalArgumentException("参数不能为空:data");
+        }
+
+        File file = new File(filePath);
+        if (file.getParentFile() != null && !file.getParentFile().exists()) {
+            file.getParentFile().mkdirs();
+        }
+        FileOutputStream fos = new FileOutputStream(file);
+        fos.write(data);
+        fos.flush();
+        logger.info("Writed... " + file.getPath());
+        fos.close();
+    }
+
+   /* *//**
+     * 复制文件(夹)
+     *
+     * @param src
+     *            源文件(夹)
+     * @param dest
+     *            目的文件(夹)
+     * @throws IOException
+     *//*
+    public static void copy(File src, File dest) throws IOException {
+        if (src.equals(dest)) {
+            throw new IOException("不可置于相同路径下");
+        }
+        if (!src.isFile() && !dest.isFile() && isSub(src, dest)) {
+            throw new IOException("不可置于子路径下");
+        }
+        if (src.isFile()) {
+            if (dest.exists() && dest.isDirectory()) {
+                dest = new File(dest, src.getName());
+                copy(src, dest);
+                return;
+            }
+            ReadableByteChannel in = Channels.newChannel(new FileInputStream(src));
+            WritableByteChannel out = Channels.newChannel(new FileOutputStream(dest));
+            copyChannel(in, out);
+            in.close();
+            out.close();
+        } else {
+            if (dest.exists() && dest.isFile()) {
+                throw new IOException("不可将文件夹置于文件下");
+            }
+            if (!dest.exists()) {
+                dest.mkdirs();
+            }
+            File[] files = src.listFiles();
+            for (File file : files) {
+                copy(file, new File(dest, file.getName()));
+            }
+        }
+    }*/
+
+}

+ 43 - 0
eis-api/src/main/resources/META-INF/MANIFEST.MF

@@ -0,0 +1,43 @@
+Manifest-Version: 1.0
+Class-Path: accessors-smart-1.1.jar tools.jar spring-test-4.3.14.RELEA
+ SE.jar spring-boot-starter-aop-1.5.10.RELEASE.jar spring-boot-autocon
+ figure-1.5.10.RELEASE.jar hamcrest-library-1.3.jar spring-webmvc-4.3.
+ 14.RELEASE.jar spring-boot-starter-logging-1.5.10.RELEASE.jar spring-
+ boot-starter-data-jpa-1.5.10.RELEASE.jar spring-context-4.3.14.RELEAS
+ E.jar commons-logging-1.1.1.jar spring-boot-test-autoconfigure-1.5.10
+ .RELEASE.jar spring-boot-starter-1.5.10.RELEASE.jar spring-security-c
+ ore-4.2.4.RELEASE.jar tomcat-embed-websocket-8.5.27.jar jcl-over-slf4
+ j-1.7.25.jar spring-web-4.3.14.RELEASE.jar snakeyaml-1.17.jar hiberna
+ te-entitymanager-5.0.12.Final.jar tomcat-annotations-api-8.5.27.jar d
+ om4j-1.6.1.jar spring-aop-4.3.14.RELEASE.jar fastjson-1.2.15.jar spri
+ ng-boot-test-1.5.10.RELEASE.jar tomcat-embed-el-8.5.27.jar spring-bea
+ ns-4.3.14.RELEASE.jar asm-5.0.3.jar objenesis-2.1.jar junit-4.12.jar 
+ json-path-2.2.0.jar spring-boot-starter-jdbc-1.5.10.RELEASE.jar json-
+ lib-2.4-jdk15.jar commons-beanutils-1.8.0.jar jandex-2.0.0.Final.jar 
+ druid-1.0.26.jar jboss-logging-3.3.0.Final.jar spring-boot-starter-te
+ st-1.5.10.RELEASE.jar httpclient-4.5.5.jar json-smart-2.2.1.jar commo
+ ns-collections-3.2.1.jar hibernate-jpa-2.1-api-1.0.0.Final.jar tomcat
+ -juli-8.5.27.jar jackson-annotations-2.8.0.jar log4j-over-slf4j-1.7.2
+ 5.jar aspectjweaver-1.8.13.jar logback-core-1.1.11.jar slf4j-api-1.7.
+ 16.jar spring-boot-configuration-processor-1.5.10.RELEASE.jar httpcor
+ e-4.4.9.jar spring-boot-1.5.10.RELEASE.jar spring-core-4.3.14.RELEASE
+ .jar ezmorph-1.0.6.jar jsonassert-1.4.0.jar spring-security-web-4.2.4
+ .RELEASE.jar mockito-core-1.10.19.jar android-json-0.0.20131108.vaadi
+ n1.jar tomcat-jdbc-8.5.27.jar httpmime-4.5.5.jar classmate-1.3.1.jar 
+ hibernate-commons-annotations-5.0.1.Final.jar spring-boot-starter-web
+ -1.5.10.RELEASE.jar jackson-databind-2.8.10.jar commons-lang-2.5.jar 
+ spring-expression-4.3.14.RELEASE.jar spring-jdbc-4.3.14.RELEASE.jar s
+ pring-boot-starter-security-1.5.10.RELEASE.jar antlr-2.7.7.jar logbac
+ k-classic-1.1.11.jar spring-data-jpa-1.11.10.RELEASE.jar jackson-core
+ -2.8.10.jar flexjson-2.1.jar jconsole.jar jjwt-0.6.0.jar javassist-3.
+ 18.1-GA.jar xml-apis-1.0.b2.jar jackson-mapper-asl-1.9.13.jar validat
+ ion-api-1.1.0.Final.jar hibernate-validator-5.3.6.Final.jar spring-da
+ ta-commons-1.13.10.RELEASE.jar ojdbc7.jar assertj-core-2.6.0.jar tomc
+ at-embed-core-8.5.27.jar hibernate-core-5.0.12.Final.jar spring-aspec
+ ts-4.3.14.RELEASE.jar javax.transaction-api-1.2.jar spring-tx-4.3.14.
+ RELEASE.jar hamcrest-core-1.3.jar commons-codec-1.10.jar spring-orm-4
+ .3.14.RELEASE.jar spring-boot-starter-tomcat-1.5.10.RELEASE.jar jul-t
+ o-slf4j-1.7.25.jar jackson-core-asl-1.9.13.jar spring-security-config
+ -4.2.4.RELEASE.jar
+Main-Class: com.uas.eis.UasApiApplication
+

+ 52 - 0
eis-api/src/main/resources/application.yml

@@ -0,0 +1,52 @@
+spring:
+    datasource:
+        type: com.alibaba.druid.pool.DruidDataSource
+        driverClassName: oracle.jdbc.OracleDriver
+        username: LANGGUO
+        password: select!#%*(
+#        url: jdbc:oracle:thin:@183.63.83.188:1521:orcl
+        url: jdbc:oracle:thin:@127.0.0.1:1521:orcl
+        initialSize: 10
+        maxActive: 80
+        minIdle: 10
+        maxWait: 60000
+        testOnBorrow: true
+        testOnReturn: false
+        testWhileIdle: true
+        validationQuery: SELECT 1 FROM DUAL
+        timeBetweenEvictionRunsMillis: 60000
+        minEvictableIdleTimeMillis: 300000
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 80
+        filters: stat
+        removeAbandoned: true
+        removeAbandonedTimeout: 1800
+    http:
+        encoding:
+            force: true
+            charset: UTF-8
+            enabled: true
+    message:
+        encoding: UTF-8
+    jpa:
+      show-sql: false
+      hibernate:
+        ddl-auto: update
+      database: oracle
+
+server:
+    tomcat:
+        uri_encoding: UTF-8
+    port: 8008
+    context-path: /API
+logging:
+  level:
+    org:
+      hibernate:
+        type: trace
+
+SECURITY_KEY: 435aMe9L5itTrckY35kfcOQvPkBGZtGo
+KEEP: 86400000
+
+myYml:
+  simpleProp: simplePropValue

+ 44 - 0
eis-api/src/main/resources/logback.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+	<appender name="FILE"
+		class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<File>logs/log.log</File>
+		<encoder>
+			<pattern>
+				%date{yyyy-MM-dd HH:mm:ss:SSS} [%relative ms] %-5level [%50.50(%logger{36}.%method:%line)] ---- %msg%n
+			</pattern>
+			<charset>UTF-8</charset> <!-- 此处设置字符集 -->
+		</encoder>
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+			<!-- daily rollover -->
+			<FileNamePattern>logs/log.%d{yyyy-MM-dd}.log</FileNamePattern>
+			<!-- keep 10 days' worth of history -->
+			<maxHistory>10</maxHistory>
+		</rollingPolicy>
+		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+			<level>INFO</level>
+		</filter>
+	</appender>
+
+	<!-- Console output -->
+	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+		<!-- encoder defaults to ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+		<encoder>
+			<pattern>
+				%date{yyyy-MM-dd HH:mm:ss:SSS} [%relative ms] %-5level [%50.50(%logger{36}.%method:%line)] ---- %msg%n
+			</pattern>
+			<charset>UTF-8</charset> <!-- 此处设置字符集 -->
+		</encoder>
+		<!-- Only log level WARN and above -->
+		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+			<level>INFO</level>
+		</filter>
+	</appender>
+
+	<!-- Enable FILE and STDOUT appenders for all log messages. By default, 
+		only log at level INFO and above. -->
+	<root level="INFO">
+		<appender-ref ref="FILE" />
+		<appender-ref ref="STDOUT" />
+	</root>
+</configuration>

+ 2 - 0
eis-api/src/main/resources/token.properties

@@ -0,0 +1,2 @@
+SECURITY_KEY=435aMe9L5itTrckY35kfcOQvPkBGZtGo
+KEEP=86400000

+ 136 - 0
eis-api/src/test/java/com/api/HttpClient.java

@@ -0,0 +1,136 @@
+package com.api;
+
+import com.uas.eis.util.JacksonUtil;
+
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Created by zdw
+ * 2018-10-16 09:41.
+ */
+public class HttpClient {
+
+
+    public static void main(String[] args) throws IOException {
+
+
+//        String httpUrl="http://us.lango-tech.cn/API/scm/postProduct";
+//        String httpUrl="http://us.lango-tech.cn/API/test/test1";
+//        String httpUrl="http://us.lango-tech.cn/API/test/test1";
+//        String httpUrl="http://localhost:8008/API/test/test1";
+        String httpUrl="http://localhost:8008/API/scm/postProduct";
+
+String
+        aut="Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTUzOTY2NDc5NH0.wioPI2C7bsSYCgAVCCtN9JIWhlo8aSDS8peEw7GbNdqGMm78Xk_fO47NKqzKd3SiNCg5RGnotCPiEQXKsfYjWQ";
+
+        Map<String,Object> data = new HashMap<>();
+        Map<String,Object> postMapData = new HashMap<>();
+        Map<String,Object> postMapData1 = new HashMap<>();
+        data.put("pr_code","test1");
+        data.put("pr_detail","物料1");
+        data.put("pr_spec","规格1");
+        data.put("pr_unit","升");
+        data.put("pr_manutype","MAKE");
+        data.put("pr_dhzc","MRP");
+        data.put("pr_supplytype","PUSH");
+        data.put("pr_acceptmethod","1");
+        postMapData.put("data",data);
+        postMapData.put("master","LANGGUO_TEST");
+        postMapData1.put("jsonData",postMapData);
+
+        String param = JacksonUtil.toSortJson(postMapData1);
+        System.out.println(param);
+
+        HttpURLConnection connection = null;
+        InputStream is = null;
+        OutputStream os = null;
+        BufferedReader br = null;
+        String result = null;
+        try {
+            URL url = new URL(httpUrl);
+            // 通过远程url连接对象打开连接
+            connection = (HttpURLConnection) url.openConnection();
+            // 设置连接请求方式
+            connection.setRequestMethod("POST");
+            // 设置连接主机服务器超时时间:15000毫秒
+            connection.setConnectTimeout(15000);
+            // 设置读取主机服务器返回数据超时时间:60000毫秒
+            connection.setReadTimeout(60000);
+
+            // 默认值为:false,当向远程服务器传送数据/写数据时,需要设置为true
+            connection.setDoOutput(true);
+            // 默认值为:true,当前向远程服务读取数据时,设置为true,该参数可有可无
+            connection.setDoInput(true);
+            // 设置鉴权信息:Authorization: Bearer da3efcbf-0845-4fe3-8aba-ee040be542c0
+            connection.setRequestProperty("Authorization",aut);
+            // 通过连接对象获取一个输出流
+            os = connection.getOutputStream();
+            // 通过输出流对象将参数写出去/传输出去,它是通过字节数组写出的
+            os.write(param.getBytes());
+            // 通过连接对象获取一个输入流,向远程读取
+
+            System.out.println("ResponseCode:"+connection.getResponseCode());
+
+
+                is = connection.getInputStream();
+                // 对输入流对象进行包装:charset根据工作项目组的要求来设置
+                br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+
+                StringBuffer sbf = new StringBuffer();
+                String temp = null;
+                // 循环遍历一行一行读取数据
+                while ((temp = br.readLine()) != null) {
+                    sbf.append(temp);
+                    sbf.append("\r\n");
+                }
+                result = sbf.toString();
+
+        } catch (Exception e) {
+            is = connection.getInputStream();
+            // 对输入流对象进行包装:charset根据工作项目组的要求来设置
+            br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+
+            StringBuffer sbf = new StringBuffer();
+            String temp = null;
+            // 循环遍历一行一行读取数据
+            while ((temp = br.readLine()) != null) {
+                sbf.append(temp);
+                sbf.append("\r\n");
+            }
+            result = sbf.toString();
+            System.out.println(result);
+
+        }  finally {
+            // 关闭资源
+            if (null != br) {
+                try {
+                    br.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+            if (null != os) {
+                try {
+                    os.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+            if (null != is) {
+                try {
+                    is.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+            // 断开与远程地址url的连接
+            connection.disconnect();
+        }
+    }
+
+
+}

+ 107 - 0
eis-api/src/test/java/com/api/HttpClient1.java

@@ -0,0 +1,107 @@
+package com.api;
+
+import com.uas.eis.util.HttpUtil;
+import org.apache.http.HttpResponse;
+
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+/**
+ * Created by zdw
+ * 2018-10-16 09:41.
+ */
+public class HttpClient1 {
+
+
+
+
+    public static Response doPost(String postUrl, String formData,  boolean sign, String signKey, int timeout) throws Exception {
+        URL url = new URL(postUrl);
+        HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();
+        try {
+            urlConn.setDoOutput(true);
+            urlConn.setDoInput(true);
+            urlConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
+            urlConn.setUseCaches(false);
+            urlConn.setInstanceFollowRedirects(true);
+            urlConn.setRequestMethod("POST");
+            urlConn.setConnectTimeout(timeout);
+            urlConn.setReadTimeout(timeout);
+            if (null != formData) {
+                OutputStreamWriter osw = new OutputStreamWriter(urlConn.getOutputStream(), "UTF-8");
+                osw.write(formData);
+                osw.flush();
+                osw.close();
+            }
+            return new Response(urlConn.getResponseCode() == 200, streamToString(urlConn.getInputStream()));
+        } catch (Exception e) {
+            return new Response(false, e.getMessage());
+        } finally {
+            if (urlConn != null) {
+                urlConn.disconnect();
+            }
+        }
+    }
+    public static class Response {
+        private int statusCode;
+        private String responseText;
+
+        public int getStatusCode() {
+            return statusCode;
+        }
+
+        public void setStatusCode(int statusCode) {
+            this.statusCode = statusCode;
+        }
+
+        public String getResponseText() {
+            return responseText;
+        }
+
+        public void setResponseText(String responseText) {
+            this.responseText = responseText;
+        }
+
+        public Response() {
+        }
+
+        public Response(boolean success, String content) {
+            super();
+            this.statusCode = success ? 200 : 404;
+            this.responseText = content;
+        }
+
+        public Response(HttpResponse response) throws IllegalStateException, IOException, Exception {
+            this.statusCode = response.getStatusLine().getStatusCode();
+            this.responseText = HttpUtil.read2String(response.getEntity().getContent());
+        }
+
+        public static Response getResponse(HttpResponse response) throws IllegalStateException, IOException, Exception {
+            if (response != null)
+                return new Response(response);
+            return null;
+        }
+    }
+
+    public static String streamToString(InputStream in) throws Exception {
+        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+        StringBuilder buf = new StringBuilder();
+
+        try {
+            char[] chars = new char[2048];
+            for (;;) {
+                int len = reader.read(chars, 0, chars.length);
+                if (len < 0) {
+                    break;
+                }
+                buf.append(chars, 0, len);
+            }
+        } catch (Exception ex) {
+            throw new Exception("read string from reader error", ex);
+        }
+
+        return buf.toString();
+    }
+
+}

+ 102 - 0
eis-api/src/test/java/com/api/Test.java

@@ -0,0 +1,102 @@
+package com.api;
+
+import com.uas.eis.util.JacksonUtil;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by zdw
+ * 2018-09-19 00:27.
+ */
+public class Test {
+
+
+    public static void main(String[] args) {
+        Map<String,Object> postMapData = new HashMap<>();
+        String SECURITY_KEY = "435aMe9L5itTrckY35kfcOQvPkBGZtGo";
+        String timestamp = String.valueOf(System.currentTimeMillis()/1000);
+
+/*        postMapData.put("app_key",SECURITY_KEY);
+        postMapData.put("time_stamp",timestamp);
+
+        postMapData.put("sign","");
+//        postMapData.put("data",buildData());*/
+//        postMapData.put("data",buildData());
+        postMapData.put("data",buildData2());
+        postMapData.put("master"," LANGGUO_TEST");
+        String jsonData = JacksonUtil.toJson(postMapData);
+        jsonData = JacksonUtil.toJson(postMapData);
+        System.out.println(jsonData);
+
+
+/*        try{
+            HttpUtil.Response response =   HttpUtil.doPost("http://localhost:8008/EIS/test",jsonData,false,timestamp);
+            String responseText = response.getResponseText();
+            System.out.println(responseText);
+        }catch (Exception e){
+
+        }*/
+
+    }
+
+    public static Map<String,Object>  buildData(){
+        List<Map<String,Object>> list = new ArrayList<>();
+        Map<String,Object> data1 = new HashMap<>();
+        data1.put("pr_code","test1");
+        data1.put("pr_detail","物料1");
+        data1.put("pr_spec","规格1");
+        data1.put("pr_unit","升");
+        data1.put("pr_manutype","MAKE");
+        data1.put("pr_dhzc","MRP");
+        data1.put("pr_supplytype","PUSH");
+        data1.put("pr_acceptmethod","1");
+
+        Map<String,Object> data2 = new HashMap<>();
+        data2.put("pr_code","test2");
+//        data2.put("pr_detail","物料1");
+        data2.put("pr_spec","规格2");
+        data2.put("pr_unit","单位2");
+        data2.put("pr_manutype","生产类型2");
+        data2.put("pr_dhzc","计划类型2");
+        data2.put("pr_supplytype","供应类型2");
+        data2.put("pr_acceptmethod","接收方式2");
+
+        return data2;
+    }
+
+    public static Map<String,Object>  buildData2(){
+        List<Map<String,Object>> list = new ArrayList<>();
+        Map<String,Object> data1 = new HashMap<>();
+
+        List<Map<String,Object>> detail = new ArrayList<>();
+        Map<String,Object> det1 = new HashMap<>();
+        Map<String,Object> det2 = new HashMap<>();
+
+
+        data1.put("bo_mothercode","201809050001");
+        data1.put("bo_ispast",-1);
+        data1.put("bo_level","标准");
+        data1.put("bo_wccode","组装");
+        data1.put("bo_wcname","组装");
+        data1.put("bo_date","2018-09-21");
+
+
+        det1.put("bd_detno",1);
+        det1.put("bd_soncode","TEST2018080647_02");
+        det1.put("bd_repcode","20180522001");
+        det1.put("bd_baseqty",0);
+        detail.add(det1);
+
+        data1.put("detail",detail);
+
+
+        return data1;
+    }
+
+
+
+
+}

+ 45 - 0
eis-api/src/test/java/com/api/UasEisApplicationTests.java

@@ -0,0 +1,45 @@
+package com.api;
+
+import com.uas.eis.UasApiApplication;
+import com.uas.eis.core.config.SpObserver;
+import com.uas.eis.dao.BaseDao;
+import com.uas.eis.service.test.TestService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = UasApiApplication.class)
+public class UasEisApplicationTests {
+
+	@Value("${SECURITY_KEY}")
+	String SECURITY_KEY;
+
+	@Autowired
+	private TestService testService;
+	@Autowired
+	private BaseDao baseDao;
+
+
+	@Test
+	public void contextLoads() {
+
+
+
+		SpObserver.putSp("LANGGUO_TEST");
+		Object id =   baseDao.getFieldDataByCondition("product","pr_id","pr_code='1BA00142043801'");
+		System.out.println("LANGGUO_TEST:"+id);
+		System.out.println(SpObserver.getSp());
+		SpObserver.putSp("LANGGUO");
+		id =   baseDao.getFieldDataByCondition("product","pr_id","pr_code='1BA00142043801'");
+		System.out.println("LANGGUO:"+id);
+
+	}
+
+
+
+
+}

+ 124 - 0
eis-common/pom.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0"?>
+<project
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>com.uas</groupId>
+		<artifactId>uas-eis</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
+	</parent>
+	
+	<packaging>jar</packaging>
+	
+	<artifactId>eis-common</artifactId>
+	<name>eis-common</name>
+	<url>http://maven.apache.org</url>
+
+	<properties>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+	</properties>
+
+	<dependencies>
+
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-web</artifactId>
+			<version>1.5.10.RELEASE</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-test</artifactId>
+			<version>1.5.10.RELEASE</version>
+		</dependency>
+
+
+		<dependency>  
+            <groupId>org.springframework.boot</groupId>  
+            <artifactId>spring-boot-starter-data-jpa</artifactId>  
+            <version>1.5.10.RELEASE</version>
+        </dependency>
+
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-configuration-processor</artifactId>
+			<version>1.5.10.RELEASE</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-security</artifactId>
+			<version>1.5.10.RELEASE</version>
+		</dependency>
+
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>druid</artifactId>
+			<version>1.0.26</version>
+		</dependency>
+		
+		<dependency>
+		    <groupId>io.jsonwebtoken</groupId>
+		    <artifactId>jjwt</artifactId>
+		    <version>0.6.0</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>fastjson</artifactId>
+			<version>1.2.15</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>net.sf.json-lib</groupId>
+			<artifactId>json-lib</artifactId>
+			<version>2.4</version>
+			<classifier>jdk15</classifier>
+		</dependency>
+		
+		<dependency>
+		    <groupId>net.sf.flexjson</groupId>
+		    <artifactId>flexjson</artifactId>
+		    <version>2.1</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpcore</artifactId>
+			<version>4.4.9</version>
+			</dependency>
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpclient</artifactId>
+			<version>4.5.5</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpmime</artifactId>
+			<version>4.5.5</version>
+		</dependency>
+		
+		<dependency>
+		    <groupId>org.codehaus.jackson</groupId>
+		    <artifactId>jackson-core-asl</artifactId>
+		    <version>1.9.13</version>
+		</dependency>
+		
+		<dependency>
+		    <groupId>org.codehaus.jackson</groupId>
+		    <artifactId>jackson-mapper-asl</artifactId>
+		    <version>1.9.13</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>org.oracle</groupId>
+			<artifactId>oracle</artifactId>
+			<version>1.0.0</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/lib/ojdbc7.jar</systemPath>
+		</dependency>
+
+	</dependencies>
+	
+</project>

+ 70 - 0
eis-common/src/main/java/com/uas/eis/controller/UserController.java

@@ -0,0 +1,70 @@
+package com.uas.eis.controller;
+
+import com.uas.eis.core.config.YmlConfig;
+import com.uas.eis.dao.UserRepository;
+import com.uas.eis.entity.User;
+import com.uas.eis.util.BaseUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.DigestUtils;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author zhaoxinguo on 2017/9/13.
+ */
+@RestController
+@RequestMapping("/users")
+public class UserController {
+
+    private Logger logger = LoggerFactory.getLogger(UserController.class);
+
+    @Autowired
+    private YmlConfig ymlConfig;
+
+    @Autowired
+    private UserRepository userRepository;
+
+    /**
+     * 获取用户列表
+     * @return
+     */
+    @GetMapping("/userList")
+    public Map<String, Object> userList(){
+        List<User> users = userRepository.findAll();
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("users",users);
+        return map;
+    }
+
+    @GetMapping("/test")
+    public Map<String, Object> test(){
+        Map<String, Object> map = new HashMap<String, Object>();
+        logger.info("msg");
+        map.put("msg","test");
+        return map;
+    }
+
+
+
+    /**
+     * 注册用户 默认开启白名单
+     * @param user
+     */
+    @PostMapping("/signup")
+    public User signup(@RequestBody User user) {
+        System.out.println(ymlConfig.getSimpleProp());
+
+        User bizUser = userRepository.findByUsername(user.getUsername());
+        if(null != bizUser){
+            BaseUtil.showError("用户名已存在!");
+        }
+        user.setPassword(DigestUtils.md5DigestAsHex((user.getPassword()).getBytes()));
+        return userRepository.save(user);
+    }
+
+}

+ 65 - 0
eis-common/src/main/java/com/uas/eis/core/WebSecurityConfig.java

@@ -0,0 +1,65 @@
+package com.uas.eis.core;
+
+
+import com.uas.eis.core.filter.JWTAuthenticationFilter;
+import com.uas.eis.core.filter.JWTLoginFilter;
+import com.uas.eis.service.impl.CustomAuthenticationProvider;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.HttpMethod;
+import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
+import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+import org.springframework.security.config.http.SessionCreationPolicy;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+
+/**
+ * SpringSecurity的配置
+ * 通过SpringSecurity的配置,将JWTLoginFilter,JWTAuthenticationFilter组合在一起
+ * @author zhaoxinguo on 2017/9/13.
+ */
+@Configuration
+@EnableWebSecurity
+@EnableGlobalMethodSecurity(prePostEnabled = true)
+public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
+
+    private UserDetailsService userDetailsService;
+
+    private BCryptPasswordEncoder bCryptPasswordEncoder;
+
+    /**
+     *
+     configure(WebSecurity) 通过重载,配置Spring Security的Filter链
+     configure(HttpSecurity) 通过重载,配置如何通过拦截器保护请求
+     configure(AuthenticationManagerBuilder) 通过重载,配置user-detail服务
+     */
+
+
+    public WebSecurityConfig(UserDetailsService userDetailsService, BCryptPasswordEncoder bCryptPasswordEncoder) {
+        this.userDetailsService = userDetailsService;
+        this.bCryptPasswordEncoder = bCryptPasswordEncoder;
+    }
+
+    // 设置 HTTP 验证规则
+    @Override
+    protected void configure(HttpSecurity http) throws Exception {
+        http.cors().and().csrf().disable()
+                .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
+                .authorizeRequests()
+                // 所有 /users/signup 的POST请求 都放行
+                .antMatchers(HttpMethod.POST, "/users/signup").permitAll()
+                .antMatchers(HttpMethod.GET,"/users/test").permitAll()
+                .anyRequest().authenticated()  // 所有请求需要身份认证
+                .and()
+                .addFilter(new JWTLoginFilter(authenticationManager()))
+                .addFilter(new JWTAuthenticationFilter(authenticationManager()));
+    }
+
+    @Override
+    public void configure(AuthenticationManagerBuilder auth) throws Exception {
+        // 使用自定义身份验证组件
+        auth.authenticationProvider(new CustomAuthenticationProvider(userDetailsService,bCryptPasswordEncoder));
+    }
+}

+ 31 - 0
eis-common/src/main/java/com/uas/eis/core/config/PropConfig.java

@@ -0,0 +1,31 @@
+package com.uas.eis.core.config;
+
+/**
+ * Created by zdw
+ * 2018-09-19 00:19.
+ */
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
+
+/**
+ * 加载properties配置文件,在方法中可以获取(官网:www.fhadmin.org)
+ * abc.properties文件不存在,验证ignoreReso(官网:www.fhadmin.org)urceNotFound属性
+ * 加上encoding = "utf-8"属性防止中文乱码,不能为大写的"UTF-8"
+ * Created by sun on 2017-3-30.
+ */
+@Configuration
+@PropertySource(value = {"classpath:/config/token.properties","classpath:/config/abc.properties"},
+        ignoreResourceNotFound = true,encoding = "utf-8")
+public class PropConfig {
+
+    // PropertySourcesPlaceholderConfigurer这个bean,
+    // 这个bean主要用于解决@value中使用的${…}占位符。
+    // 假如你不使用${…}占位符的话,可以不使用这个bean。
+    @Bean
+    public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
+        return new PropertySourcesPlaceholderConfigurer();
+    }
+}

+ 67 - 0
eis-common/src/main/java/com/uas/eis/core/config/YmlConfig.java

@@ -0,0 +1,67 @@
+package com.uas.eis.core.config;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by zdw
+ * 2018-09-18 23:20.
+ */
+
+
+@Component
+@ConfigurationProperties(prefix = "myYml")
+public class YmlConfig {
+
+    String simpleProp;
+    private String[] arrayProps;
+    private List<Map<String, String>> listProp1 = new ArrayList<>(); //接收prop1里面的属性值
+    private List<String> listProp2 = new ArrayList<>(); //接收prop2里面的属性值
+    private Map<String, String> mapProps = new HashMap<>(); //接收prop1里面的属性值
+
+    public String getSimpleProp() {
+        return simpleProp;
+    }
+
+    //String类型的一定需要setter来接收属性值;maps, collections, 和 arrays 不需要
+    public void setSimpleProp(String simpleProp) {
+        this.simpleProp = simpleProp;
+    }
+
+    public String[] getArrayProps() {
+        return arrayProps;
+    }
+
+    public void setArrayProps(String[] arrayProps) {
+        this.arrayProps = arrayProps;
+    }
+
+    public List<Map<String, String>> getListProp1() {
+        return listProp1;
+    }
+
+    public void setListProp1(List<Map<String, String>> listProp1) {
+        this.listProp1 = listProp1;
+    }
+
+    public List<String> getListProp2() {
+        return listProp2;
+    }
+
+    public void setListProp2(List<String> listProp2) {
+        this.listProp2 = listProp2;
+    }
+
+    public Map<String, String> getMapProps() {
+        return mapProps;
+    }
+
+    public void setMapProps(Map<String, String> mapProps) {
+        this.mapProps = mapProps;
+    }
+}

+ 60 - 0
eis-common/src/main/java/com/uas/eis/core/filter/JWTAuthenticationFilter.java

@@ -0,0 +1,60 @@
+package com.uas.eis.core.filter;
+
+import com.uas.eis.util.ConstantKey;
+import io.jsonwebtoken.Jwts;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.ArrayList;
+
+/**
+ * token的校验用户一旦登录成功后,会拿到token,后续的请求都会带着这个token,服务端会验证token的合法性。
+ * 该类继承自BasicAuthenticationFilter,在doFilterInternal方法中,
+ * 从http头的Authorization 项读取token数据,然后用Jwts包提供的方法校验token的合法性。
+ * 如果校验通过,就认为这是一个取得授权的合法请求
+ *
+ */
+public class JWTAuthenticationFilter extends BasicAuthenticationFilter {
+
+    public JWTAuthenticationFilter(AuthenticationManager authenticationManager) {
+        super(authenticationManager);
+    }
+
+    @Override
+    protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {
+        String header = request.getHeader("Authorization");
+        if (header == null || !header.startsWith("Bearer ")) {
+            chain.doFilter(request, response);
+            return;
+        }
+        UsernamePasswordAuthenticationToken authentication = getAuthentication(request);
+        SecurityContextHolder.getContext().setAuthentication(authentication);
+        chain.doFilter(request, response);
+    }
+
+    private UsernamePasswordAuthenticationToken getAuthentication(HttpServletRequest request) {
+        String token = request.getHeader("Authorization");
+        if (token != null) {
+            // parse the token.
+            String user = Jwts.parser()
+                    .setSigningKey(ConstantKey.SIGNING_KEY)
+                    .parseClaimsJws(token.replace("Bearer ", ""))
+                    .getBody()
+                    .getSubject();
+            if (user != null) {
+                return new UsernamePasswordAuthenticationToken(user, null, new ArrayList<GrantedAuthority>());
+            }
+            return null;
+        }
+        return null;
+    }
+
+}

+ 73 - 0
eis-common/src/main/java/com/uas/eis/core/filter/JWTLoginFilter.java

@@ -0,0 +1,73 @@
+package com.uas.eis.core.filter;
+
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.uas.eis.entity.User;
+import com.uas.eis.util.Constant;
+import com.uas.eis.util.ConstantKey;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.SignatureAlgorithm;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Date;
+
+/**
+ * 创建一个类JWTLoginFilter,核心功能是在验证用户名密码正确后,生成一个token,并将token返回给客户端
+ * 验证用户名密码正确后,生成一个token,并将token返回给客户端
+ * 该类继承自UsernamePasswordAuthenticationFilter,重写了其中的2个方法
+ * attemptAuthentication :接收并解析用户凭证。
+ * successfulAuthentication :用户成功登录后,这个方法会被调用,我们在这个方法里生成token。
+ *
+ */
+public class JWTLoginFilter extends UsernamePasswordAuthenticationFilter {
+
+    private AuthenticationManager authenticationManager;
+
+    public JWTLoginFilter(AuthenticationManager authenticationManager) {
+        this.authenticationManager = authenticationManager;
+    }
+
+    // 接收并解析用户凭证,attemptAuthentication :接收并解析用户凭证。
+    @Override
+    public Authentication attemptAuthentication(HttpServletRequest req, HttpServletResponse res) throws AuthenticationException {
+        try {
+            User user = new ObjectMapper().readValue(req.getInputStream(), User.class);
+            return authenticationManager.authenticate(
+                    new UsernamePasswordAuthenticationToken(
+                            user.getUsername(),
+                            user.getPassword(),
+                            new ArrayList<GrantedAuthority>()
+                    )
+            );
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    // successfulAuthentication : 用户成功登录后,这个方法会被调用,我们在这个方法里生成token
+    @Override
+    protected void successfulAuthentication(HttpServletRequest req,
+                                            HttpServletResponse res,
+                                            FilterChain chain,
+                                            Authentication auth) throws IOException, ServletException {
+        String token = Jwts.builder()
+                .setSubject(auth.getName())
+//                .setExpiration(new Date(System.currentTimeMillis() + 60 * 60 * 24 * 1000))
+                .setExpiration(new Date(System.currentTimeMillis() + 60 * Constant.tokenKeepTime * 1000))
+                .signWith(SignatureAlgorithm.HS512, ConstantKey.SIGNING_KEY) //采用什么算法是可以自己选择的,不一定非要采用HS512
+                .compact();
+        res.addHeader("Authorization", "Bearer " + token);
+    }
+
+}

+ 14 - 0
eis-common/src/main/java/com/uas/eis/dao/UserRepository.java

@@ -0,0 +1,14 @@
+package com.uas.eis.dao;
+
+
+import com.uas.eis.entity.User;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * @author zhaoxinguo on 2017/9/13.
+ */
+public interface UserRepository extends JpaRepository<User, Long> {
+
+    User findByUsername(String username);
+
+}

+ 68 - 0
eis-common/src/main/java/com/uas/eis/service/impl/CustomAuthenticationProvider.java

@@ -0,0 +1,68 @@
+package com.uas.eis.service.impl;
+
+import org.springframework.security.authentication.AuthenticationProvider;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+
+import java.util.ArrayList;
+
+/**
+ * 自定义身份认证验证组件
+ *
+ * @author zhaoxinguo on 2017/9/12.
+ */
+public class CustomAuthenticationProvider implements AuthenticationProvider {
+
+    private UserDetailsService userDetailsService;
+
+    private BCryptPasswordEncoder bCryptPasswordEncoder;
+
+    public CustomAuthenticationProvider(UserDetailsService userDetailsService, BCryptPasswordEncoder bCryptPasswordEncoder){
+        this.userDetailsService = userDetailsService;
+        this.bCryptPasswordEncoder = bCryptPasswordEncoder;
+    }
+
+    @Override
+    public Authentication authenticate(Authentication authentication) throws AuthenticationException {
+        // 获取认证的用户名 & 密码
+        String name = authentication.getName();
+        String password = authentication.getCredentials().toString();
+        // 认证逻辑
+        UserDetails userDetails = userDetailsService.loadUserByUsername(name);
+        if(null != userDetails){
+//            String encodePassword = DigestUtils.md5DigestAsHex((password).getBytes());
+            String encodePassword = password;
+            if(userDetails.getPassword().equals(encodePassword)){
+                // 这里设置权限和角色
+                ArrayList<GrantedAuthority> authorities = new ArrayList<>();
+                authorities.add( new GrantedAuthorityImpl("ROLE_ADMIN") );
+                authorities.add( new GrantedAuthorityImpl("AUTH_WRITE") );
+                // 生成令牌 这里令牌里面存入了:name,password,authorities, 当然你也可以放其他内容
+                Authentication auth = new UsernamePasswordAuthenticationToken(name, password, authorities);
+                return auth;
+            }else {
+                throw new BadCredentialsException("密码错误");
+            }
+        }else {
+            throw new UsernameNotFoundException("用户不存在");
+        }
+    }
+
+    /**
+     * 是否可以提供输入类型的认证服务
+     * @param authentication
+     * @return
+     */
+    @Override
+    public boolean supports(Class<?> authentication) {
+        return authentication.equals(UsernamePasswordAuthenticationToken.class);
+    }
+
+}

+ 26 - 0
eis-common/src/main/java/com/uas/eis/service/impl/GrantedAuthorityImpl.java

@@ -0,0 +1,26 @@
+package com.uas.eis.service.impl;
+
+import org.springframework.security.core.GrantedAuthority;
+
+/**
+ * 权限类型,负责存储权限和角色
+ *
+ * @author zhaoxinguo on 2017/9/12.
+ */
+public class GrantedAuthorityImpl implements GrantedAuthority {
+
+    private String authority;
+
+    public GrantedAuthorityImpl(String authority) {
+        this.authority = authority;
+    }
+
+    public void setAuthority(String authority) {
+        this.authority = authority;
+    }
+
+    @Override
+    public String getAuthority() {
+        return this.authority;
+    }
+}

+ 249 - 0
eis-common/src/main/java/com/uas/eis/service/impl/QueryServiceImpl.java

@@ -0,0 +1,249 @@
+package com.uas.eis.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.uas.eis.core.support.TokenHandler;
+import com.uas.eis.dao.BaseDao;
+import com.uas.eis.entity.*;
+import com.uas.eis.exception.SystemException;
+import com.uas.eis.service.QueryService;
+import com.uas.eis.util.BaseUtil;
+import net.sf.json.JSONObject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+@Service
+public class QueryServiceImpl implements QueryService {
+
+	@Autowired
+	private BaseDao baseDao;
+	@Autowired
+	private ActionConfig actionConfig;
+	
+	@Override
+	public String login(String username, String password) {
+		if(checkUser(username, password)) {
+			return TokenHandler.createToken(username, password);
+		}else {
+			return null;
+		}
+	}
+	
+	@Override
+	@Cacheable(value="userEnableCache")
+	public boolean checkUser(String username, String password) {
+		return baseDao.checkIf("EIS_USER", "eu_enable=-1 and " + "eu_name='" + username + "' and eu_password='" + password + "'");
+	}
+
+	@Override
+	@Cacheable(value="userActionEnableCache")
+	public boolean checkAction(String username, String action) {
+		boolean flag = false;
+		
+		String roles = baseDao.queryForObject("select eu_role from eis_user where eu_name='" + username + "'", String.class);
+		if(roles == null) {
+			return false;
+		}
+		// 开放公共API的权限
+		String apiAction = actionConfig.getApiAction();
+		if(action.startsWith(apiAction)) {
+			return true;
+		}
+		// 判断是否在不需要权限控制的请求配置中
+		String[] publicActions = actionConfig.getPublicActions();
+		for(String publicAction : publicActions) {
+			if(publicAction.equals(action)) {
+				return true;
+			}
+		}
+		String[] fields = {"er_reg","er_action"};
+		List<JSONObject> res = baseDao.getFieldsJSONDatasByCondition("EIS_ROLE", fields, "er_id in (" + roles + ")");
+		for(int o = 0; o< res.size(); o++) {
+			JSONObject data = res.get(o);
+			String reg = data.containsKey("er_reg") ? data.getString("er_reg") : "(\\S)*";
+			String act = data.containsKey("er_action") ? data.getString("er_action") : "";
+			// 通过正则和预设接口校验请求权限
+			if(action.matches(reg) || act.indexOf(action) != -1) {
+				flag = true;
+				break;
+			}
+		}
+		return flag;
+	}
+	public String getUsers(){
+		String sql = "SELECT EM_NAME,EM_CODE,TO_CHAR(EM_INDATE,'yyyy-MM-dd hh24:mm:ss') EM_INDATE FROM EMPLOYEE WHERE EM_CODE = 'U0818'";
+		Map<String, Object> map = baseDao.getJdbcTemplate().queryForMap(sql);
+		List<Map<String,Object>> list = baseDao.queryForList("SELECT * FROM UPLOADDOCDETAIL WHERE UDD_UDID=284");
+		return BaseUtil.parseDataToJson(map,list);
+	}
+	
+	/**
+	 * 标准查询API
+	 * @param code		查询方案Code
+	 * @param param		参数
+	 * @return
+	 */
+	public Object query(String code, String param){
+		Map<String, Object> resultmap = new HashMap<String, Object>();
+		List<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>();
+		com.alibaba.fastjson.JSONObject json = JSON.parseObject(param);
+		//查询参数配置表
+		String getInOutParamsSql = "select * from queryArgs where qa_qccode = ?";
+		List<QueryArgs> inOutParamList = baseDao.query(getInOutParamsSql,  QueryArgs.class, code);
+		Map<String, String> argsMap = new HashMap<String, String>();	//存参数名对应的参数值
+		Map<String, String> argsTypeMap = new HashMap<String, String>();		//存参数名对应的参数类型
+		for(QueryArgs args : inOutParamList){
+			argsMap.put(args.getQa_param(),json.getString(args.getQa_param()));
+			argsTypeMap.put(args.getQa_param(), args.getQa_paramtype());
+		}
+		//校验查询方案传入的参数是否正确
+		checkParam(code, param);
+		//code对应的查询方案
+		String getQueryConfigsql = "select * from queryconfig where qc_code=? order by qc_detno"; 
+		List<QueryConfig> queryConfigList = baseDao.query(getQueryConfigsql, QueryConfig.class, code);
+		if(queryConfigList != null){
+			List<String> valueList = new ArrayList<String>();
+			Object mainField = baseDao.getFieldDataByCondition("queryArgs", "qa_param", "qa_qccode='"+code+"' and qa_ismainfield=1");
+			if(mainField != null && "array".equals(argsTypeMap.get(mainField))){
+				String argValue = argsMap.get(mainField);
+				String[] valueArray = argValue.replace("[", "").replace("]", "").replaceAll("\"", "").split(",");
+				valueList = new ArrayList<String>(Arrays.asList(valueArray));
+			}else{
+				valueList.add(argsMap.get(mainField));
+			}
+			for(int i = 0; i < valueList.size(); i++){
+				Map<String, Object> map = new HashMap<String, Object>();
+				for(QueryConfig queryConfig : queryConfigList){
+					StringBuilder inParam = new StringBuilder();
+					StringBuilder outParam = new StringBuilder();
+					//查询方案明细表,得到要查询的字段
+					String getQueryFieldssql = "select * from queryConfigDetail where qcd_qcid = ?";
+					List<QueryConfigDetail> queryFieldsList = baseDao.query(getQueryFieldssql, QueryConfigDetail.class, queryConfig.getQc_id());
+					StringBuilder sb = new StringBuilder();
+					sb.append("select ");
+					for(QueryConfigDetail field : queryFieldsList){
+						sb.append(field.getQcd_field() + " \"" + field.getQcd_mappingkey() + "\",");
+					}
+					sb.deleteCharAt(sb.length()-1);			//去掉最后一个 ,
+					sb.append(" from " + queryConfig.getQc_table());
+					//拼接condition
+					String condition = queryConfig.getQc_condition();
+					Pattern pattern = Pattern.compile("@[\\w]+");		//通过正则替换@变量
+					Matcher m = pattern.matcher(condition);
+					List<String> matchList = new ArrayList<String>();
+					while(m.find()){
+						matchList.add(m.group());
+					}
+					for(String match : matchList){
+						/*if("array".equals(argsTypeMap.get(match.replace("@", "")))){
+							String value = argsMap.get(match.replace("@", ""));
+							value = value.replaceAll("\"", "'");
+							condition = condition.replaceAll(match, value);
+						}else{
+							condition = condition.replaceAll(match, "'"+argsMap.get(match.replace("@", ""))+"'");
+						}*/
+						if(match.equals("@"+mainField)){
+							condition = condition.replaceAll(match, "'"+valueList.get(i)+"'");
+							inParam.append(mainField+"="+valueList.get(i)+";");
+						}else{
+							condition = condition.replaceAll(match, "'"+argsMap.get(match.replace("@", ""))+"'");
+							inParam.append(match.replace("@","")+"="+argsMap.get(match.replace("@", ""))+";");
+						}
+					}
+					sb.append(" " + condition);		//append where条件
+					//append order by语句
+					if(!StringUtils.isEmpty(queryConfig.getQc_orderby())){
+						sb.append(" " + queryConfig.getQc_orderby());
+					}
+					if(queryFieldsList != null && queryFieldsList.size()>0){
+						if(queryConfig.getQc_isArray() != null && queryConfig.getQc_isArray() == 0){
+							map.put(queryConfig.getQc_mapkey(), baseDao.getJdbcTemplate().queryForMap(sb.toString()));
+						}else{
+							map.put(queryConfig.getQc_mapkey(), baseDao.queryForList(sb.toString()));
+						}
+					}
+					
+					//获取额外返回值
+					if(!StringUtils.isEmpty(queryConfig.getQc_return())){
+						String getReturnSql = "select " + queryConfig.getQc_return() + " from " + queryConfig.getQc_table() + " " + condition;
+						Map<String, Object> returnMap = baseDao.getJdbcTemplate().queryForMap(getReturnSql);
+						List<Object> list = baseDao.getFieldDatasByCondition("queryArgs", "qa_param", "qa_qccode='"+queryConfig.getQc_code()+"' and qa_relation="+queryConfig.getQc_id()+" order by qa_detno");
+						Iterator<Object> it = returnMap.values().iterator();
+						int j = 0;
+						while(it.hasNext()){
+							String value = String.valueOf(it.next());
+							argsMap.put(String.valueOf(list.get(j)), value);
+							outParam.append(String.valueOf(list.get(j))+"="+value+";");
+							j++;
+						}
+					}
+					//记录日志
+					String insertSql = "INSERT INTO QUERYLOG(QL_ID,QL_QCCODE,QL_PARAM,QL_RETURN,QL_DATE) VALUES(QUERYLOG_SEQ.NEXTVAL,'"+queryConfig.getQc_code()+"','"+inParam.toString()+"','"+outParam.toString()+"',SYSDATE)";
+					baseDao.execute(insertSql);
+				}
+				if(valueList.size() > 1){
+					resultList.add(map);
+				}else{
+					resultmap.putAll(map);
+				}
+			}
+			if(valueList.size() > 1)
+				return resultList;
+			else
+				return resultmap;
+		}else{
+			return resultmap;
+		}
+		
+	}
+	
+	public Object doAction() {
+		return null;
+	}
+	
+	/**
+	 * 传入参数的合法性校验
+	 * @param code
+	 * @param param
+	 */
+	private void checkParam(String code, String param){
+		com.alibaba.fastjson.JSONObject json = JSON.parseObject(param);
+		if(StringUtils.isEmpty(code)){
+			throw new SystemException(ErrorMsg.NULL_QUERY_CODE);
+		}
+		if(json == null){
+			throw new SystemException(ErrorMsg.PARAM_AMOUNT_ERROR);
+		}
+		String getInParamsSql = "select * from queryArgs where qa_qccode = ? and qa_relation is null";
+		List<QueryArgs> inParamList = baseDao.query(getInParamsSql,  QueryArgs.class, code);
+		if(inParamList.size() != json.size()){
+			throw new SystemException(ErrorMsg.PARAM_AMOUNT_ERROR);
+		}else{
+			 for(QueryArgs queryArgs : inParamList){
+				 if(json.getString(queryArgs.getQa_param()) == null){
+					 throw new SystemException(ErrorMsg.PARAM_NAME_ERROR);
+				 }else{
+					 if("array".equals(queryArgs.getQa_paramtype())){
+						 String stringArray = json.getString(queryArgs.getQa_param());
+						 if(!(stringArray.contains("[") && stringArray.contains("]"))){
+							 BaseUtil.showError(ErrorMsg.PARAM_FORMAT_ERROR,"传入的参数:"+queryArgs.getQa_param()+"格式不正确");
+						 }
+					 }
+				 }
+			 }
+		}
+	}
+
+	@Override
+	public Object doAction(String code, String param) {
+		return null;
+	}
+	
+	
+	
+}

+ 41 - 0
eis-common/src/main/java/com/uas/eis/service/impl/UserDetailsServiceImpl.java

@@ -0,0 +1,41 @@
+package com.uas.eis.service.impl;
+
+
+import com.uas.eis.dao.UserRepository;
+import com.uas.eis.entity.User;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.stereotype.Service;
+
+import java.util.Collections;
+
+/**
+ * @author zhaoxinguo on 2017/9/13.
+ */
+@Service
+public class UserDetailsServiceImpl implements UserDetailsService {
+
+    private UserRepository userRepository;
+
+    /**
+     * 通过构造器注入UserRepository
+     * @param userRepository
+     */
+    public UserDetailsServiceImpl(UserRepository userRepository) {
+        this.userRepository = userRepository;
+    }
+
+    @Override
+    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
+//        User user = userRepository.findByUsername(username);
+        User user = new User();
+        if (!username.equals("admin"))
+            throw new UsernameNotFoundException(username);
+        user.setUsername(username);
+        user.setPassword("111111");
+        return new org.springframework.security.core.userdetails.User(user.getUsername(),user.getPassword(), Collections.<GrantedAuthority>emptyList());
+    }
+
+}

+ 7 - 0
eis-common/src/main/java/com/uas/eis/util/ConstantKey.java

@@ -0,0 +1,7 @@
+package com.uas.eis.util;
+
+
+public class ConstantKey {
+
+    public static final String SIGNING_KEY = "Boss@Jwt!&Secret^#";
+}

+ 184 - 0
eis-common/src/main/java/com/uas/eis/util/MasterManager.java

@@ -0,0 +1,184 @@
+package com.uas.eis.util;
+
+import com.alibaba.druid.pool.DruidDataSource;
+import com.alibaba.fastjson.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
+import java.net.URL;
+import java.sql.SQLException;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class MasterManager {
+    /**
+     * 数据源
+     */
+    private static Map<String, DruidDataSource> dataSources = new ConcurrentHashMap<>();
+
+    /**
+     * 账套
+     */
+    private static Set<String> masters = new HashSet<>();
+
+    private static Logger logger = LoggerFactory.getLogger(MasterManager.class);
+
+    static {
+        init();
+    }
+    /**
+     * 初始化所有数据源
+     */
+    public static void init() {
+        clear();
+        logger.info("数据源初始化......");
+        // 从配置中获取数据源信息
+        File propertyFile = new File("application.properties");
+        Properties properties = new Properties();
+        if (!propertyFile.exists() || !propertyFile.isFile()) {
+            try {
+                logger.info("配置文件再次读取......");
+                // 是否以 spring boot jar 形式运行
+                URL location = MasterManager.class.getProtectionDomain().getCodeSource().getLocation();
+                if (org.springframework.util.ResourceUtils.isJarURL(location)) {
+                    // 以 spring boot jar 形式运行时,不能直接复制默认配置文件,需以输入流的方式读取默认配置
+                    InputStream inputStream = MasterManager.class.getResourceAsStream("/" + "application.properties");
+                    byte[] data = new byte[inputStream.available()];
+                    inputStream.read(data);
+                    logger.info("配置文件路径:"+ propertyFile.getPath());
+                    write(propertyFile.getPath(), data, false);
+                    logger.info("读取成功......");
+                }else{
+                    logger.info("非jar包运行......");
+                    propertyFile = BaseUtil.getFile("application.properties");
+                }
+                properties.load(new FileInputStream(propertyFile));
+            }catch (Exception e){
+                e.printStackTrace();
+                BaseUtil.showError("读取配置文件失败");
+            }
+        }
+        String datasourceConfig = properties.getProperty("datasourceConfig");
+        logger.info("datasourceConfig:" + datasourceConfig);
+        JSONObject jsonObject = JSONObject.parseObject(datasourceConfig);
+        Set<Map.Entry<String, Object>> entrySet = jsonObject.entrySet();
+        for (Map.Entry<String, Object> entry : entrySet) {
+            DruidDataSource dataSource = JSONObject.parseObject(entry.getValue().toString(), DruidDataSource.class);
+            dataSources.put(entry.getKey().toUpperCase(), dataSource);
+            masters.add(entry.getKey().toUpperCase());
+        }
+    }
+
+    /**
+     * 清除旧的数据源
+     */
+    private static void clear(){
+        Set<Map.Entry<String, DruidDataSource>> entrySet = dataSources.entrySet();
+        for(Map.Entry<String, DruidDataSource> entry : entrySet){
+            DruidDataSource dataSource = entry.getValue();
+            try {
+                dataSource.close();
+            } catch (Exception e) {
+                logger.error("数据源关闭失败", e);
+            }
+        }
+        dataSources = new ConcurrentHashMap<>();
+    }
+
+    /**
+     * 获取账套对应的数据源
+     *
+     * @param userName
+     *            账套名称
+     *            用于识别B2B、B2C账套的环境(dev、test、prod)
+     * @return 数据源
+     * @throws SQLException
+     */
+    public static DruidDataSource getDataSource(String userName) {
+        if (StringUtils.isEmpty(userName)) {
+            return null;
+        }
+        userName = userName.toUpperCase();
+        DruidDataSource dataSource = dataSources.get(userName);
+        if (dataSource == null) {
+            BaseUtil.showError("数据源为空,请检查账套名称是否正确");
+        }
+        return dataSource;
+    }
+
+    /**
+     * 写入文件
+     *
+     * @param filePath
+     *            文件路径
+     * @param data
+     *            数据
+     * @param allowNoData
+     *            是否允许数据为空(文件无内容)
+     * @throws IOException
+     */
+    public static void write(String filePath, byte[] data, boolean allowNoData) throws IOException {
+        if (StringUtils.isEmpty(filePath)) {
+            throw new IllegalArgumentException("参数不能为空:filePath");
+        }
+        if (!allowNoData && StringUtils.isEmpty(data)) {
+            throw new IllegalArgumentException("参数不能为空:data");
+        }
+
+        File file = new File(filePath);
+        if (file.getParentFile() != null && !file.getParentFile().exists()) {
+            file.getParentFile().mkdirs();
+        }
+        FileOutputStream fos = new FileOutputStream(file);
+        fos.write(data);
+        fos.flush();
+        logger.info("Writed... " + file.getPath());
+        fos.close();
+    }
+
+   /* *//**
+     * 复制文件(夹)
+     *
+     * @param src
+     *            源文件(夹)
+     * @param dest
+     *            目的文件(夹)
+     * @throws IOException
+     *//*
+    public static void copy(File src, File dest) throws IOException {
+        if (src.equals(dest)) {
+            throw new IOException("不可置于相同路径下");
+        }
+        if (!src.isFile() && !dest.isFile() && isSub(src, dest)) {
+            throw new IOException("不可置于子路径下");
+        }
+        if (src.isFile()) {
+            if (dest.exists() && dest.isDirectory()) {
+                dest = new File(dest, src.getName());
+                copy(src, dest);
+                return;
+            }
+            ReadableByteChannel in = Channels.newChannel(new FileInputStream(src));
+            WritableByteChannel out = Channels.newChannel(new FileOutputStream(dest));
+            copyChannel(in, out);
+            in.close();
+            out.close();
+        } else {
+            if (dest.exists() && dest.isFile()) {
+                throw new IOException("不可将文件夹置于文件下");
+            }
+            if (!dest.exists()) {
+                dest.mkdirs();
+            }
+            File[] files = src.listFiles();
+            for (File file : files) {
+                copy(file, new File(dest, file.getName()));
+            }
+        }
+    }*/
+
+}

+ 88 - 0
eis-common/src/main/java/com/uas/eis/util/StringUtils.java

@@ -0,0 +1,88 @@
+package com.uas.eis.util;
+
+public class StringUtils {
+
+    public static boolean isEmpty(Object str) {
+        return (str == null || !hasText(str.toString()));
+    }
+
+    /**
+     * Check that the given {@code CharSequence} is neither {@code null} nor
+     * of length 0.
+     * <p>Note: this method returns {@code true} for a {@code CharSequence}
+     * that purely consists of whitespace.
+     * <p><pre class="code">
+     * StringUtils.hasLength(null) = false
+     * StringUtils.hasLength("") = false
+     * StringUtils.hasLength(" ") = true
+     * StringUtils.hasLength("Hello") = true
+     * </pre>
+     *
+     * @param str the {@code CharSequence} to check (may be {@code null})
+     * @return {@code true} if the {@code CharSequence} is not {@code null} and has length
+     * @see #hasText(String)
+     */
+    public static boolean hasLength(CharSequence str) {
+        return (str != null && str.length() > 0);
+    }
+
+    /**
+     * Check that the given {@code String} is neither {@code null} nor of length 0.
+     * <p>Note: this method returns {@code true} for a {@code String} that
+     * purely consists of whitespace.
+     *
+     * @param str the {@code String} to check (may be {@code null})
+     * @return {@code true} if the {@code String} is not {@code null} and has length
+     * @see #hasLength(CharSequence)
+     * @see #hasText(String)
+     */
+    public static boolean hasLength(String str) {
+        return hasLength((CharSequence) str);
+    }
+
+    /**
+     * Check whether the given {@code CharSequence} contains actual <em>text</em>.
+     * <p>More specifically, this method returns {@code true} if the
+     * {@code CharSequence} is not {@code null}, its length is greater than
+     * 0, and it contains at least one non-whitespace character.
+     * <p><pre class="code">
+     * StringUtils.hasText(null) = false
+     * StringUtils.hasText("") = false
+     * StringUtils.hasText(" ") = false
+     * StringUtils.hasText("12345") = true
+     * StringUtils.hasText(" 12345 ") = true
+     * </pre>
+     *
+     * @param str the {@code CharSequence} to check (may be {@code null})
+     * @return {@code true} if the {@code CharSequence} is not {@code null},
+     * its length is greater than 0, and it does not contain whitespace only
+     * @see Character#isWhitespace
+     */
+    public static boolean hasText(CharSequence str) {
+        if (!hasLength(str)) {
+            return false;
+        }
+        int strLen = str.length();
+        for (int i = 0; i < strLen; i++) {
+            if (!Character.isWhitespace(str.charAt(i))) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Check whether the given {@code String} contains actual <em>text</em>.
+     * <p>More specifically, this method returns {@code true} if the
+     * {@code String} is not {@code null}, its length is greater than 0,
+     * and it contains at least one non-whitespace character.
+     *
+     * @param str the {@code String} to check (may be {@code null})
+     * @return {@code true} if the {@code String} is not {@code null}, its
+     * length is greater than 0, and it does not contain whitespace only
+     * @see #hasText(CharSequence)
+     */
+    public static boolean hasText(String str) {
+        return hasText((CharSequence) str);
+    }
+}

+ 384 - 0
eis-dingzhi/logs/log.2018-07-10.log

@@ -0,0 +1,384 @@
+2018-07-10 19:22:16:180 [166 ms] INFO  [        com.uas.eis.DingzikaifaApplication.main:38] ---- 开始启动了哈哈哈
+2018-07-10 19:22:16:521 [507 ms] INFO  [ com.uas.eis.DingzikaifaApplication.logStarting:48] ---- Starting DingzikaifaApplication on UAS-PC with PID 9392 (C:\Work\WorkSpace\EclipseWorkSpace\eis-parent\eis-dingzhi\target\classes started by 1 in C:\Work\WorkSpace\EclipseWorkSpace\eis-parent\eis-dingzhi)
+2018-07-10 19:22:16:521 [507 ms] INFO  [s.DingzikaifaApplication.logStartupProfileInfo:593] ---- No active profile set, falling back to default profiles: default
+2018-07-10 19:22:16:568 [554 ms] INFO  [igEmbeddedWebApplicationContext.prepareRefresh:583] ---- Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@70be0a2b: startup date [Tue Jul 10 19:22:16 CST 2018]; root of context hierarchy
+2018-07-10 19:22:16:740 [726 ms] WARN  [ionConfigEmbeddedWebApplicationContext.refresh:551] ---- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.uas.eis.DingzikaifaApplication]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'exceptionHandlerAdvice' for bean class [com.uas.eis.exception.ExceptionHandlerAdvice] conflicts with existing, non-compatible bean definition of same name and class [com.uas.eis.aop.ExceptionHandlerAdvice]
+2018-07-10 19:22:16:796 [782 ms] INFO  [   o.h.validator.internal.util.Version.<clinit>:30] ---- HV000001: Hibernate Validator 5.3.6.Final
+2018-07-10 19:22:16:879 [865 ms] ERROR [      o.s.boot.SpringApplication.reportFailure:771] ---- Application startup failed
+org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.uas.eis.DingzikaifaApplication]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'exceptionHandlerAdvice' for bean class [com.uas.eis.exception.ExceptionHandlerAdvice] conflicts with existing, non-compatible bean definition of same name and class [com.uas.eis.aop.ExceptionHandlerAdvice]
+	at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:181)
+	at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:308)
+	at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:228)
+	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:272)
+	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:92)
+	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687)
+	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525)
+	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
+	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
+	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
+	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
+	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
+	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
+	at com.uas.eis.DingzikaifaApplication.main(DingzikaifaApplication.java:39)
+Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'exceptionHandlerAdvice' for bean class [com.uas.eis.exception.ExceptionHandlerAdvice] conflicts with existing, non-compatible bean definition of same name and class [com.uas.eis.aop.ExceptionHandlerAdvice]
+	at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.checkCandidate(ClassPathBeanDefinitionScanner.java:345)
+	at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:283)
+	at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:135)
+	at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:287)
+	at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245)
+	at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:198)
+	at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:167)
+	... 13 common frames omitted
+2018-07-10 19:23:46:123 [158 ms] INFO  [        com.uas.eis.DingzikaifaApplication.main:38] ---- 开始启动了哈哈哈
+2018-07-10 19:23:46:460 [495 ms] INFO  [ com.uas.eis.DingzikaifaApplication.logStarting:48] ---- Starting DingzikaifaApplication on UAS-PC with PID 7884 (C:\Work\WorkSpace\EclipseWorkSpace\eis-parent\eis-dingzhi\target\classes started by 1 in C:\Work\WorkSpace\EclipseWorkSpace\eis-parent\eis-dingzhi)
+2018-07-10 19:23:46:460 [495 ms] INFO  [s.DingzikaifaApplication.logStartupProfileInfo:593] ---- No active profile set, falling back to default profiles: default
+2018-07-10 19:23:46:509 [544 ms] INFO  [igEmbeddedWebApplicationContext.prepareRefresh:583] ---- Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@70be0a2b: startup date [Tue Jul 10 19:23:46 CST 2018]; root of context hierarchy
+2018-07-10 19:23:46:757 [792 ms] INFO  [   o.h.validator.internal.util.Version.<clinit>:30] ---- HV000001: Hibernate Validator 5.3.6.Final
+2018-07-10 19:23:47:492 [1527 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$97c748fd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-07-10 19:23:47:942 [1977 ms] INFO  [c.e.t.TomcatEmbeddedServletContainer.initialize:89] ---- Tomcat initialized with port(s): 8673 (http)
+2018-07-10 19:23:47:953 [1988 ms] INFO  [         o.a.catalina.core.StandardService.log:180] ---- Starting service [Tomcat]
+2018-07-10 19:23:47:954 [1989 ms] INFO  [          o.a.catalina.core.StandardEngine.log:180] ---- Starting Servlet Engine: Apache Tomcat/8.5.27
+2018-07-10 19:23:48:057 [2092 ms] INFO  [        o.a.c.c.C.[Tomcat].[localhost].[/].log:180] ---- Initializing Spring embedded WebApplicationContext
+2018-07-10 19:23:48:058 [2093 ms] INFO  [extLoader.prepareEmbeddedWebApplicationContext:276] ---- Root WebApplicationContext: initialization completed in 1549 ms
+2018-07-10 19:23:48:152 [2187 ms] INFO  [   o.s.b.w.s.ServletRegistrationBean.onStartup:190] ---- Mapping servlet: 'dispatcherServlet' to [/]
+2018-07-10 19:23:48:156 [2191 ms] INFO  [    o.s.b.w.s.FilterRegistrationBean.configure:258] ---- Mapping filter: 'characterEncodingFilter' to: [/*]
+2018-07-10 19:23:48:189 [2224 ms] WARN  [ionConfigEmbeddedWebApplicationContext.refresh:551] ---- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'druidDBConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.driverClassName' in value "${spring.datasource.driverClassName}"
+2018-07-10 19:23:48:191 [2226 ms] INFO  [         o.a.catalina.core.StandardService.log:180] ---- Stopping service [Tomcat]
+2018-07-10 19:23:48:258 [2293 ms] INFO  [tLoggingInitializer.logAutoConfigurationReport:101] ---- 
+
+Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
+2018-07-10 19:23:48:263 [2298 ms] ERROR [      o.s.boot.SpringApplication.reportFailure:771] ---- Application startup failed
+org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'druidDBConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.driverClassName' in value "${spring.datasource.driverClassName}"
+	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)
+	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
+	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
+	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
+	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
+	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
+	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
+	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1080)
+	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:857)
+	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
+	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
+	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
+	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
+	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
+	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
+	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
+	at com.uas.eis.DingzikaifaApplication.main(DingzikaifaApplication.java:39)
+Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'druidDBConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.driverClassName' in value "${spring.datasource.driverClassName}"
+	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
+	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
+	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
+	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
+	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
+	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
+	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
+	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
+	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
+	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
+	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
+	... 28 common frames omitted
+Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.driverClassName' in value "${spring.datasource.driverClassName}"
+	at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174)
+	at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
+	at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:236)
+	at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:210)
+	at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$2.resolveStringValue(PropertySourcesPlaceholderConfigurer.java:172)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:831)
+	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1086)
+	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
+	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
+	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
+	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
+	... 49 common frames omitted
+2018-07-10 19:24:36:273 [163 ms] INFO  [        com.uas.eis.DingzikaifaApplication.main:38] ---- 开始启动了哈哈哈
+2018-07-10 19:24:36:615 [505 ms] INFO  [ com.uas.eis.DingzikaifaApplication.logStarting:48] ---- Starting DingzikaifaApplication on UAS-PC with PID 8408 (C:\Work\WorkSpace\EclipseWorkSpace\eis-parent\eis-dingzhi\target\classes started by 1 in C:\Work\WorkSpace\EclipseWorkSpace\eis-parent\eis-dingzhi)
+2018-07-10 19:24:36:616 [506 ms] INFO  [s.DingzikaifaApplication.logStartupProfileInfo:593] ---- No active profile set, falling back to default profiles: default
+2018-07-10 19:24:36:661 [551 ms] INFO  [igEmbeddedWebApplicationContext.prepareRefresh:583] ---- Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@70be0a2b: startup date [Tue Jul 10 19:24:36 CST 2018]; root of context hierarchy
+2018-07-10 19:24:36:968 [858 ms] INFO  [   o.h.validator.internal.util.Version.<clinit>:30] ---- HV000001: Hibernate Validator 5.3.6.Final
+2018-07-10 19:24:37:643 [1533 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$4239b46f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-07-10 19:24:38:107 [1997 ms] INFO  [c.e.t.TomcatEmbeddedServletContainer.initialize:89] ---- Tomcat initialized with port(s): 8673 (http)
+2018-07-10 19:24:38:117 [2007 ms] INFO  [         o.a.catalina.core.StandardService.log:180] ---- Starting service [Tomcat]
+2018-07-10 19:24:38:118 [2008 ms] INFO  [          o.a.catalina.core.StandardEngine.log:180] ---- Starting Servlet Engine: Apache Tomcat/8.5.27
+2018-07-10 19:24:38:224 [2114 ms] INFO  [        o.a.c.c.C.[Tomcat].[localhost].[/].log:180] ---- Initializing Spring embedded WebApplicationContext
+2018-07-10 19:24:38:224 [2114 ms] INFO  [extLoader.prepareEmbeddedWebApplicationContext:276] ---- Root WebApplicationContext: initialization completed in 1563 ms
+2018-07-10 19:24:38:323 [2213 ms] INFO  [   o.s.b.w.s.ServletRegistrationBean.onStartup:190] ---- Mapping servlet: 'dispatcherServlet' to [/]
+2018-07-10 19:24:38:327 [2217 ms] INFO  [    o.s.b.w.s.FilterRegistrationBean.configure:258] ---- Mapping filter: 'characterEncodingFilter' to: [/*]
+2018-07-10 19:24:38:364 [2254 ms] WARN  [ionConfigEmbeddedWebApplicationContext.refresh:551] ---- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'druidDBConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.initialSize' in value "${spring.datasource.initialSize}"
+2018-07-10 19:24:38:366 [2256 ms] INFO  [         o.a.catalina.core.StandardService.log:180] ---- Stopping service [Tomcat]
+2018-07-10 19:24:38:408 [2298 ms] INFO  [tLoggingInitializer.logAutoConfigurationReport:101] ---- 
+
+Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
+2018-07-10 19:24:38:414 [2304 ms] ERROR [      o.s.boot.SpringApplication.reportFailure:771] ---- Application startup failed
+org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'druidDBConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.initialSize' in value "${spring.datasource.initialSize}"
+	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)
+	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
+	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
+	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
+	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
+	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
+	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
+	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1080)
+	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:857)
+	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
+	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
+	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
+	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
+	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
+	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
+	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
+	at com.uas.eis.DingzikaifaApplication.main(DingzikaifaApplication.java:39)
+Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'druidDBConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.initialSize' in value "${spring.datasource.initialSize}"
+	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
+	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
+	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
+	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
+	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
+	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
+	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
+	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
+	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
+	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
+	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
+	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
+	... 28 common frames omitted
+Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.initialSize' in value "${spring.datasource.initialSize}"
+	at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174)
+	at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
+	at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:236)
+	at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:210)
+	at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$2.resolveStringValue(PropertySourcesPlaceholderConfigurer.java:172)
+	at org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:831)
+	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1086)
+	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
+	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
+	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
+	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
+	... 49 common frames omitted
+2018-07-10 19:29:32:026 [160 ms] INFO  [        com.uas.eis.DingzikaifaApplication.main:38] ---- 开始启动了哈哈哈
+2018-07-10 19:29:32:372 [506 ms] INFO  [ com.uas.eis.DingzikaifaApplication.logStarting:48] ---- Starting DingzikaifaApplication on UAS-PC with PID 6364 (C:\Work\WorkSpace\EclipseWorkSpace\eis-parent\eis-dingzhi\target\classes started by 1 in C:\Work\WorkSpace\EclipseWorkSpace\eis-parent\eis-dingzhi)
+2018-07-10 19:29:32:372 [506 ms] INFO  [s.DingzikaifaApplication.logStartupProfileInfo:593] ---- No active profile set, falling back to default profiles: default
+2018-07-10 19:29:32:414 [548 ms] INFO  [igEmbeddedWebApplicationContext.prepareRefresh:583] ---- Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@70be0a2b: startup date [Tue Jul 10 19:29:32 CST 2018]; root of context hierarchy
+2018-07-10 19:29:32:655 [789 ms] INFO  [   o.h.validator.internal.util.Version.<clinit>:30] ---- HV000001: Hibernate Validator 5.3.6.Final
+2018-07-10 19:29:33:386 [1520 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$f5e77375] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-07-10 19:29:33:830 [1964 ms] INFO  [c.e.t.TomcatEmbeddedServletContainer.initialize:89] ---- Tomcat initialized with port(s): 8673 (http)
+2018-07-10 19:29:33:841 [1975 ms] INFO  [         o.a.catalina.core.StandardService.log:180] ---- Starting service [Tomcat]
+2018-07-10 19:29:33:842 [1976 ms] INFO  [          o.a.catalina.core.StandardEngine.log:180] ---- Starting Servlet Engine: Apache Tomcat/8.5.27
+2018-07-10 19:29:33:951 [2085 ms] INFO  [        o.a.c.c.C.[Tomcat].[localhost].[/].log:180] ---- Initializing Spring embedded WebApplicationContext
+2018-07-10 19:29:33:951 [2085 ms] INFO  [extLoader.prepareEmbeddedWebApplicationContext:276] ---- Root WebApplicationContext: initialization completed in 1537 ms
+2018-07-10 19:29:34:047 [2181 ms] INFO  [   o.s.b.w.s.ServletRegistrationBean.onStartup:190] ---- Mapping servlet: 'dispatcherServlet' to [/]
+2018-07-10 19:29:34:050 [2184 ms] INFO  [    o.s.b.w.s.FilterRegistrationBean.configure:258] ---- Mapping filter: 'characterEncodingFilter' to: [/*]
+2018-07-10 19:29:34:286 [2420 ms] INFO  [erFactoryBean.createNativeEntityManagerFactory:356] ---- Building JPA container EntityManagerFactory for persistence unit 'default'
+2018-07-10 19:29:34:301 [2435 ms] INFO  [al.util.LogHelper.logPersistenceUnitInformation:31] ---- HHH000204: Processing PersistenceUnitInfo [
+	name: default
+	...]
+2018-07-10 19:29:34:377 [2511 ms] INFO  [               org.hibernate.Version.logVersion:37] ---- HHH000412: Hibernate Core {5.0.12.Final}
+2018-07-10 19:29:34:379 [2513 ms] INFO  [        org.hibernate.cfg.Environment.<clinit>:213] ---- HHH000206: hibernate.properties not found
+2018-07-10 19:29:34:381 [2515 ms] INFO  [ibernate.cfg.Environment.buildBytecodeProvider:317] ---- HHH000021: Bytecode provider name : javassist
+2018-07-10 19:29:34:425 [2559 ms] INFO  [        o.h.annotations.common.Version.<clinit>:66] ---- HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
+2018-07-10 19:29:35:921 [4055 ms] INFO  [     c.alibaba.druid.pool.DruidDataSource.init:715] ---- {dataSource-1} inited
+2018-07-10 19:29:35:960 [4094 ms] INFO  [          org.hibernate.dialect.Dialect.<init>:156] ---- HHH000400: Using dialect: org.hibernate.dialect.Oracle9iDialect
+2018-07-10 19:29:36:212 [4346 ms] INFO  [         o.h.tool.hbm2ddl.SchemaUpdate.execute:105] ---- HHH000228: Running hbm2ddl schema update
+2018-07-10 19:29:37:550 [5684 ms] INFO  [gerFactoryBean.buildNativeEntityManagerFactory:392] ---- Initialized JPA EntityManagerFactory for persistence unit 'default'
+2018-07-10 19:29:37:755 [5889 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/dingzikaifa/getVersion]}" onto public java.lang.String com.uas.eis.controller.ReqController.getVersion()
+2018-07-10 19:29:37:756 [5890 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/dingzikaifa/getProductWH.action]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.ReqController.getProductWH(java.lang.String,java.lang.String)
+2018-07-10 19:29:37:757 [5891 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/dingzikaifa/toProdOut.action]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.ReqController.toProdOut(java.lang.String,java.lang.String) throws java.lang.IllegalAccessException
+2018-07-10 19:29:37:758 [5892 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/login]}" onto public java.lang.Object com.uas.eis.controller.LoginController.login(javax.servlet.http.HttpServletRequest,java.lang.String,java.lang.String)
+2018-07-10 19:29:37:758 [5892 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/logout]}" onto public java.lang.Object com.uas.eis.controller.LoginController.logout(javax.servlet.http.HttpServletRequest)
+2018-07-10 19:29:37:759 [5893 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/api/query]}" onto public java.lang.Object com.uas.eis.controller.QueryController.query(java.lang.String,java.lang.String)
+2018-07-10 19:29:37:759 [5893 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/api/doAction]}" onto public java.lang.Object com.uas.eis.controller.QueryController.doAction(java.lang.String,java.lang.String)
+2018-07-10 19:29:37:761 [5895 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
+2018-07-10 19:29:37:762 [5896 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
+2018-07-10 19:29:37:819 [5953 ms] INFO  [appingHandlerAdapter.initControllerAdviceCache:534] ---- Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@70be0a2b: startup date [Tue Jul 10 19:29:32 CST 2018]; root of context hierarchy
+2018-07-10 19:29:37:864 [5998 ms] INFO  [eptionResolver.initExceptionHandlerAdviceCache:273] ---- Detected @ExceptionHandler methods in exceptionHandlerAdvice
+2018-07-10 19:29:38:252 [6386 ms] INFO  [ationMBeanExporter.afterSingletonsInstantiated:431] ---- Registering beans for JMX exposure on startup
+2018-07-10 19:29:38:254 [6388 ms] INFO  [  o.s.j.e.a.AnnotationMBeanExporter.autodetect:916] ---- Bean with name 'dataSource' has been autodetected for JMX exposure
+2018-07-10 19:29:38:257 [6391 ms] INFO  [a.AnnotationMBeanExporter.registerBeanInstance:671] ---- Located MBean 'dataSource': registering with JMX server as MBean [com.alibaba.druid.pool:name=dataSource,type=DruidDataSource]
+2018-07-10 19:29:38:266 [6400 ms] INFO  [       o.a.coyote.http11.Http11NioProtocol.log:180] ---- Initializing ProtocolHandler ["http-nio-8673"]
+2018-07-10 19:29:38:277 [6411 ms] INFO  [       o.a.coyote.http11.Http11NioProtocol.log:180] ---- Starting ProtocolHandler ["http-nio-8673"]
+2018-07-10 19:29:38:288 [6422 ms] INFO  [       o.a.tomcat.util.net.NioSelectorPool.log:180] ---- Using a shared selector for servlet write/read
+2018-07-10 19:29:38:305 [6439 ms] INFO  [s.b.c.e.t.TomcatEmbeddedServletContainer.start:201] ---- Tomcat started on port(s): 8673 (http)
+2018-07-10 19:29:38:309 [6443 ms] INFO  [  com.uas.eis.DingzikaifaApplication.logStarted:57] ---- Started DingzikaifaApplication in 6.177 seconds (JVM running for 6.589)
+2018-07-10 19:29:38:309 [6443 ms] INFO  [        com.uas.eis.DingzikaifaApplication.main:40] ---- 开始结束了哈哈哈
+2018-07-10 19:34:40:678 [308812 ms] INFO  [        o.a.c.c.C.[Tomcat].[localhost].[/].log:180] ---- Initializing Spring FrameworkServlet 'dispatcherServlet'
+2018-07-10 19:34:40:678 [308812 ms] INFO  [.web.servlet.DispatcherServlet.initServletBean:489] ---- FrameworkServlet 'dispatcherServlet': initialization started
+2018-07-10 19:34:40:696 [308830 ms] INFO  [.web.servlet.DispatcherServlet.initServletBean:508] ---- FrameworkServlet 'dispatcherServlet': initialization completed in 18 ms
+2018-07-10 19:34:40:713 [308847 ms] WARN  [  o.s.web.servlet.PageNotFound.noHandlerFound:1176] ---- No mapping found for HTTP request with URI [/] in DispatcherServlet with name 'dispatcherServlet'
+2018-07-10 19:34:40:871 [309005 ms] WARN  [  o.s.web.servlet.PageNotFound.noHandlerFound:1176] ---- No mapping found for HTTP request with URI [/favicon.ico] in DispatcherServlet with name 'dispatcherServlet'
+2018-07-10 19:39:15:770 [158 ms] INFO  [        com.uas.eis.DingzikaifaApplication.main:38] ---- 开始启动了哈哈哈
+2018-07-10 19:39:16:118 [506 ms] INFO  [ com.uas.eis.DingzikaifaApplication.logStarting:48] ---- Starting DingzikaifaApplication on UAS-PC with PID 9544 (C:\Work\WorkSpace\EclipseWorkSpace\eis-parent\eis-dingzhi\target\classes started by 1 in C:\Work\WorkSpace\EclipseWorkSpace\eis-parent\eis-dingzhi)
+2018-07-10 19:39:16:119 [507 ms] INFO  [s.DingzikaifaApplication.logStartupProfileInfo:593] ---- No active profile set, falling back to default profiles: default
+2018-07-10 19:39:16:162 [550 ms] INFO  [igEmbeddedWebApplicationContext.prepareRefresh:583] ---- Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@70be0a2b: startup date [Tue Jul 10 19:39:16 CST 2018]; root of context hierarchy
+2018-07-10 19:39:16:427 [815 ms] INFO  [   o.h.validator.internal.util.Version.<clinit>:30] ---- HV000001: Hibernate Validator 5.3.6.Final
+2018-07-10 19:39:17:113 [1501 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$97c748fd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-07-10 19:39:17:583 [1971 ms] INFO  [c.e.t.TomcatEmbeddedServletContainer.initialize:89] ---- Tomcat initialized with port(s): 8673 (http)
+2018-07-10 19:39:17:595 [1983 ms] INFO  [         o.a.catalina.core.StandardService.log:180] ---- Starting service [Tomcat]
+2018-07-10 19:39:17:596 [1984 ms] INFO  [          o.a.catalina.core.StandardEngine.log:180] ---- Starting Servlet Engine: Apache Tomcat/8.5.27
+2018-07-10 19:39:17:714 [2102 ms] INFO  [        o.a.c.c.C.[Tomcat].[localhost].[/].log:180] ---- Initializing Spring embedded WebApplicationContext
+2018-07-10 19:39:17:715 [2103 ms] INFO  [extLoader.prepareEmbeddedWebApplicationContext:276] ---- Root WebApplicationContext: initialization completed in 1553 ms
+2018-07-10 19:39:17:823 [2211 ms] INFO  [   o.s.b.w.s.ServletRegistrationBean.onStartup:190] ---- Mapping servlet: 'dispatcherServlet' to [/]
+2018-07-10 19:39:17:828 [2216 ms] INFO  [    o.s.b.w.s.FilterRegistrationBean.configure:258] ---- Mapping filter: 'characterEncodingFilter' to: [/*]
+2018-07-10 19:39:18:074 [2462 ms] INFO  [erFactoryBean.createNativeEntityManagerFactory:356] ---- Building JPA container EntityManagerFactory for persistence unit 'default'
+2018-07-10 19:39:18:088 [2476 ms] INFO  [al.util.LogHelper.logPersistenceUnitInformation:31] ---- HHH000204: Processing PersistenceUnitInfo [
+	name: default
+	...]
+2018-07-10 19:39:18:159 [2547 ms] INFO  [               org.hibernate.Version.logVersion:37] ---- HHH000412: Hibernate Core {5.0.12.Final}
+2018-07-10 19:39:18:161 [2549 ms] INFO  [        org.hibernate.cfg.Environment.<clinit>:213] ---- HHH000206: hibernate.properties not found
+2018-07-10 19:39:18:163 [2551 ms] INFO  [ibernate.cfg.Environment.buildBytecodeProvider:317] ---- HHH000021: Bytecode provider name : javassist
+2018-07-10 19:39:18:211 [2599 ms] INFO  [        o.h.annotations.common.Version.<clinit>:66] ---- HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
+2018-07-10 19:39:19:570 [3958 ms] INFO  [     c.alibaba.druid.pool.DruidDataSource.init:715] ---- {dataSource-1} inited
+2018-07-10 19:39:19:607 [3995 ms] INFO  [          org.hibernate.dialect.Dialect.<init>:156] ---- HHH000400: Using dialect: org.hibernate.dialect.Oracle9iDialect
+2018-07-10 19:39:19:846 [4234 ms] INFO  [         o.h.tool.hbm2ddl.SchemaUpdate.execute:105] ---- HHH000228: Running hbm2ddl schema update
+2018-07-10 19:39:20:884 [5272 ms] INFO  [gerFactoryBean.buildNativeEntityManagerFactory:392] ---- Initialized JPA EntityManagerFactory for persistence unit 'default'
+2018-07-10 19:39:21:078 [5466 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/dingzikaifa/getVersion]}" onto public java.lang.String com.uas.eis.controller.ReqController.getVersion()
+2018-07-10 19:39:21:080 [5468 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/dingzikaifa/getProductWH.action]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.ReqController.getProductWH(java.lang.String,java.lang.String)
+2018-07-10 19:39:21:081 [5469 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/dingzikaifa/toProdOut.action]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.ReqController.toProdOut(java.lang.String,java.lang.String) throws java.lang.IllegalAccessException
+2018-07-10 19:39:21:081 [5469 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/login]}" onto public java.lang.Object com.uas.eis.controller.LoginController.login(javax.servlet.http.HttpServletRequest,java.lang.String,java.lang.String)
+2018-07-10 19:39:21:082 [5470 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/logout]}" onto public java.lang.Object com.uas.eis.controller.LoginController.logout(javax.servlet.http.HttpServletRequest)
+2018-07-10 19:39:21:082 [5470 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/api/query]}" onto public java.lang.Object com.uas.eis.controller.QueryController.query(java.lang.String,java.lang.String)
+2018-07-10 19:39:21:082 [5470 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/api/doAction]}" onto public java.lang.Object com.uas.eis.controller.QueryController.doAction(java.lang.String,java.lang.String)
+2018-07-10 19:39:21:084 [5472 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
+2018-07-10 19:39:21:085 [5473 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
+2018-07-10 19:39:21:138 [5526 ms] INFO  [appingHandlerAdapter.initControllerAdviceCache:534] ---- Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@70be0a2b: startup date [Tue Jul 10 19:39:16 CST 2018]; root of context hierarchy
+2018-07-10 19:39:21:178 [5566 ms] INFO  [eptionResolver.initExceptionHandlerAdviceCache:273] ---- Detected @ExceptionHandler methods in exceptionHandlerAdvice
+2018-07-10 19:39:21:564 [5952 ms] INFO  [ationMBeanExporter.afterSingletonsInstantiated:431] ---- Registering beans for JMX exposure on startup
+2018-07-10 19:39:21:565 [5953 ms] INFO  [  o.s.j.e.a.AnnotationMBeanExporter.autodetect:916] ---- Bean with name 'dataSource' has been autodetected for JMX exposure
+2018-07-10 19:39:21:569 [5957 ms] INFO  [a.AnnotationMBeanExporter.registerBeanInstance:671] ---- Located MBean 'dataSource': registering with JMX server as MBean [com.alibaba.druid.pool:name=dataSource,type=DruidDataSource]
+2018-07-10 19:39:21:580 [5968 ms] INFO  [       o.a.coyote.http11.Http11NioProtocol.log:180] ---- Initializing ProtocolHandler ["http-nio-8673"]
+2018-07-10 19:39:21:591 [5979 ms] INFO  [       o.a.coyote.http11.Http11NioProtocol.log:180] ---- Starting ProtocolHandler ["http-nio-8673"]
+2018-07-10 19:39:21:602 [5990 ms] INFO  [       o.a.tomcat.util.net.NioSelectorPool.log:180] ---- Using a shared selector for servlet write/read
+2018-07-10 19:39:21:621 [6009 ms] INFO  [s.b.c.e.t.TomcatEmbeddedServletContainer.start:201] ---- Tomcat started on port(s): 8673 (http)
+2018-07-10 19:39:21:625 [6013 ms] INFO  [  com.uas.eis.DingzikaifaApplication.logStarted:57] ---- Started DingzikaifaApplication in 5.751 seconds (JVM running for 6.158)
+2018-07-10 19:39:21:625 [6013 ms] INFO  [        com.uas.eis.DingzikaifaApplication.main:40] ---- 开始结束了哈哈哈
+2018-07-10 19:39:58:717 [43105 ms] INFO  [        o.a.c.c.C.[Tomcat].[localhost].[/].log:180] ---- Initializing Spring FrameworkServlet 'dispatcherServlet'
+2018-07-10 19:39:58:718 [43106 ms] INFO  [.web.servlet.DispatcherServlet.initServletBean:489] ---- FrameworkServlet 'dispatcherServlet': initialization started
+2018-07-10 19:39:58:735 [43123 ms] INFO  [.web.servlet.DispatcherServlet.initServletBean:508] ---- FrameworkServlet 'dispatcherServlet': initialization completed in 17 ms
+2018-07-10 19:39:58:757 [43145 ms] ERROR [.u.e.e.ExceptionHandlerAdvice.handleSystemError:53] ---- error
+com.uas.eis.exception.SystemException: 缺失token,请把token做为参数传入
+	at com.uas.eis.core.support.SignInterceptor.parseToken(LoginInterceptor.java:41)
+	at com.uas.eis.core.support.SignInterceptor.preHandle(LoginInterceptor.java:22)
+	at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:133)
+	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:962)
+	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
+	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
+	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
+	at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
+	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
+	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
+	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
+	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
+	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
+	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
+	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
+	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
+	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
+	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
+	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
+	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
+	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
+	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
+	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
+	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
+	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
+	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
+	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
+	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
+	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
+	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
+	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
+	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
+	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
+	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
+	at java.lang.Thread.run(Unknown Source)
+2018-07-10 19:41:35:625 [498 ms] INFO  [ com.uas.eis.DingzikaifaApplication.logStarting:48] ---- Starting DingzikaifaApplication on UAS-PC with PID 8020 (C:\Work\WorkSpace\EclipseWorkSpace\eis-parent\eis-dingzhi\target\classes started by 1 in C:\Work\WorkSpace\EclipseWorkSpace\eis-parent\eis-dingzhi)
+2018-07-10 19:41:35:628 [501 ms] INFO  [s.DingzikaifaApplication.logStartupProfileInfo:593] ---- No active profile set, falling back to default profiles: default
+2018-07-10 19:41:35:669 [542 ms] INFO  [igEmbeddedWebApplicationContext.prepareRefresh:583] ---- Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@78dd667e: startup date [Tue Jul 10 19:41:35 CST 2018]; root of context hierarchy
+2018-07-10 19:41:35:910 [783 ms] INFO  [   o.h.validator.internal.util.Version.<clinit>:30] ---- HV000001: Hibernate Validator 5.3.6.Final
+2018-07-10 19:41:36:614 [1487 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$4239b46f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-07-10 19:41:37:087 [1960 ms] INFO  [c.e.t.TomcatEmbeddedServletContainer.initialize:89] ---- Tomcat initialized with port(s): 8673 (http)
+2018-07-10 19:41:37:100 [1973 ms] INFO  [         o.a.catalina.core.StandardService.log:180] ---- Starting service [Tomcat]
+2018-07-10 19:41:37:101 [1974 ms] INFO  [          o.a.catalina.core.StandardEngine.log:180] ---- Starting Servlet Engine: Apache Tomcat/8.5.27
+2018-07-10 19:41:37:214 [2087 ms] INFO  [        o.a.c.c.C.[Tomcat].[localhost].[/].log:180] ---- Initializing Spring embedded WebApplicationContext
+2018-07-10 19:41:37:215 [2088 ms] INFO  [extLoader.prepareEmbeddedWebApplicationContext:276] ---- Root WebApplicationContext: initialization completed in 1546 ms
+2018-07-10 19:41:37:310 [2183 ms] INFO  [   o.s.b.w.s.ServletRegistrationBean.onStartup:190] ---- Mapping servlet: 'dispatcherServlet' to [/]
+2018-07-10 19:41:37:318 [2191 ms] INFO  [    o.s.b.w.s.FilterRegistrationBean.configure:258] ---- Mapping filter: 'characterEncodingFilter' to: [/*]
+2018-07-10 19:41:37:581 [2454 ms] INFO  [erFactoryBean.createNativeEntityManagerFactory:356] ---- Building JPA container EntityManagerFactory for persistence unit 'default'
+2018-07-10 19:41:37:596 [2469 ms] INFO  [al.util.LogHelper.logPersistenceUnitInformation:31] ---- HHH000204: Processing PersistenceUnitInfo [
+	name: default
+	...]
+2018-07-10 19:41:37:664 [2537 ms] INFO  [               org.hibernate.Version.logVersion:37] ---- HHH000412: Hibernate Core {5.0.12.Final}
+2018-07-10 19:41:37:666 [2539 ms] INFO  [        org.hibernate.cfg.Environment.<clinit>:213] ---- HHH000206: hibernate.properties not found
+2018-07-10 19:41:37:668 [2541 ms] INFO  [ibernate.cfg.Environment.buildBytecodeProvider:317] ---- HHH000021: Bytecode provider name : javassist
+2018-07-10 19:41:37:712 [2585 ms] INFO  [        o.h.annotations.common.Version.<clinit>:66] ---- HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
+2018-07-10 19:41:38:986 [3859 ms] INFO  [     c.alibaba.druid.pool.DruidDataSource.init:715] ---- {dataSource-1} inited
+2018-07-10 19:41:39:006 [3879 ms] INFO  [          org.hibernate.dialect.Dialect.<init>:156] ---- HHH000400: Using dialect: org.hibernate.dialect.Oracle9iDialect
+2018-07-10 19:41:39:262 [4135 ms] INFO  [         o.h.tool.hbm2ddl.SchemaUpdate.execute:105] ---- HHH000228: Running hbm2ddl schema update
+2018-07-10 19:41:40:310 [5183 ms] INFO  [gerFactoryBean.buildNativeEntityManagerFactory:392] ---- Initialized JPA EntityManagerFactory for persistence unit 'default'
+2018-07-10 19:41:40:547 [5420 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/dingzikaifa/getVersion]}" onto public java.lang.String com.uas.eis.controller.ReqController.getVersion()
+2018-07-10 19:41:40:548 [5421 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/dingzikaifa/getProductWH.action]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.ReqController.getProductWH(java.lang.String,java.lang.String)
+2018-07-10 19:41:40:548 [5421 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/dingzikaifa/toProdOut.action]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.ReqController.toProdOut(java.lang.String,java.lang.String) throws java.lang.IllegalAccessException
+2018-07-10 19:41:40:549 [5422 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/login]}" onto public java.lang.Object com.uas.eis.controller.LoginController.login(javax.servlet.http.HttpServletRequest,java.lang.String,java.lang.String)
+2018-07-10 19:41:40:549 [5422 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/logout]}" onto public java.lang.Object com.uas.eis.controller.LoginController.logout(javax.servlet.http.HttpServletRequest)
+2018-07-10 19:41:40:550 [5423 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/api/query]}" onto public java.lang.Object com.uas.eis.controller.QueryController.query(java.lang.String,java.lang.String)
+2018-07-10 19:41:40:550 [5423 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/api/doAction]}" onto public java.lang.Object com.uas.eis.controller.QueryController.doAction(java.lang.String,java.lang.String)
+2018-07-10 19:41:40:552 [5425 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
+2018-07-10 19:41:40:552 [5425 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
+2018-07-10 19:41:40:604 [5477 ms] INFO  [appingHandlerAdapter.initControllerAdviceCache:534] ---- Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@78dd667e: startup date [Tue Jul 10 19:41:35 CST 2018]; root of context hierarchy
+2018-07-10 19:41:40:667 [5540 ms] INFO  [eptionResolver.initExceptionHandlerAdviceCache:273] ---- Detected @ExceptionHandler methods in exceptionHandlerAdvice
+2018-07-10 19:41:41:148 [6021 ms] INFO  [ationMBeanExporter.afterSingletonsInstantiated:431] ---- Registering beans for JMX exposure on startup
+2018-07-10 19:41:41:149 [6022 ms] INFO  [  o.s.j.e.a.AnnotationMBeanExporter.autodetect:916] ---- Bean with name 'dataSource' has been autodetected for JMX exposure
+2018-07-10 19:41:41:153 [6026 ms] INFO  [a.AnnotationMBeanExporter.registerBeanInstance:671] ---- Located MBean 'dataSource': registering with JMX server as MBean [com.alibaba.druid.pool:name=dataSource,type=DruidDataSource]
+2018-07-10 19:41:41:163 [6036 ms] INFO  [       o.a.coyote.http11.Http11NioProtocol.log:180] ---- Initializing ProtocolHandler ["http-nio-8673"]
+2018-07-10 19:41:41:175 [6048 ms] INFO  [       o.a.coyote.http11.Http11NioProtocol.log:180] ---- Starting ProtocolHandler ["http-nio-8673"]
+2018-07-10 19:41:41:186 [6059 ms] INFO  [       o.a.tomcat.util.net.NioSelectorPool.log:180] ---- Using a shared selector for servlet write/read
+2018-07-10 19:41:41:204 [6077 ms] INFO  [s.b.c.e.t.TomcatEmbeddedServletContainer.start:201] ---- Tomcat started on port(s): 8673 (http)
+2018-07-10 19:41:41:208 [6081 ms] INFO  [  com.uas.eis.DingzikaifaApplication.logStarted:57] ---- Started DingzikaifaApplication in 5.82 seconds (JVM running for 6.225)
+2018-07-10 19:41:45:273 [10146 ms] INFO  [        o.a.c.c.C.[Tomcat].[localhost].[/].log:180] ---- Initializing Spring FrameworkServlet 'dispatcherServlet'
+2018-07-10 19:41:45:275 [10148 ms] INFO  [.web.servlet.DispatcherServlet.initServletBean:489] ---- FrameworkServlet 'dispatcherServlet': initialization started
+2018-07-10 19:41:45:298 [10171 ms] INFO  [.web.servlet.DispatcherServlet.initServletBean:508] ---- FrameworkServlet 'dispatcherServlet': initialization completed in 23 ms

+ 139 - 0
eis-dingzhi/src/main/java/com/uas/eis/service/impl/ReqServiceImpl.java

@@ -0,0 +1,139 @@
+package com.uas.eis.service.impl;
+
+import com.uas.eis.dao.BaseDao;
+import com.uas.eis.service.ReqService;
+import com.uas.eis.util.BaseUtil;
+import com.uas.eis.util.JSONUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+@Service
+public class ReqServiceImpl implements ReqService {
+
+    @Autowired
+    private BaseDao baseDao;
+
+    public Map<String, Object> toProdOut(String jsons) throws IllegalAccessException {
+        List<Map<Object, Object>> maps = JSONUtil.toMapList(jsons);
+        List<String> insertSql = new ArrayList<String>();
+        Map<String, Object> res = new HashMap<String, Object>();
+        int detno = 1;
+        int tn_id = baseDao.getSeqId("TOPWISECONNECT_seq");
+        int id = baseDao.getSeqId("ProdInOut_seq");
+        String code = baseDao.sGetMaxNumber("ProdInOut!AppropriationOut", 2);
+        String pi_code = null;//最终的拨出单单号
+        //记录上传数据
+        Save(jsons, tn_id);
+        //对接ERP
+        for (Map<Object, Object> map : maps) {
+            Object prcode = map.get("prcode");
+            Object outwhcode = map.get("outwhcode");
+            Object inwhcode = map.get("inwhcode");
+            Object emname = map.get("emname");
+            Object remark = map.get("remark") == null ? "" : map.get("remark").toString().replace("'","''") ;
+            Date date = BaseUtil.parseStringToDate(map.get("date"), "yyyy-MM-dd");
+            if (!StringUtils.isEmpty(prcode) && !StringUtils.isEmpty(outwhcode) && !StringUtils.isEmpty(inwhcode) && !StringUtils.isEmpty(emname)) {
+                //检测必填项是否存在
+                String check = check(prcode, outwhcode, inwhcode, emname, tn_id);
+                if (check != null) {
+                    res.put("success", false);
+                    res.put("result", check);
+                    return res;
+                }
+                Object outname = baseDao.getFieldDataByCondition("warehouse", "WH_DESCRIPTION", "wh_code='" + outwhcode + "'");
+                Object inname = baseDao.getFieldDataByCondition("warehouse", "WH_DESCRIPTION", "wh_code='" + inwhcode + "'");
+                Object emcode = baseDao.getFieldDataByCondition("employee", "em_code", "em_name='" + emname + "'");
+                //插入主表
+                if (detno == 1) {
+                    pi_code = code;
+                    insertSql.add("insert into prodinout (pi_id,pi_inoutno,pi_class,pi_date,pi_type,pi_teamcode_user,pi_sourcecode," +
+                            "pi_custname2,pi_ntbamount,pi_emname,pi_emcode,pi_departmentcode,pi_departmentname,pi_status,pi_invostatus,pi_printstatus,pi_recordman,pi_recorddate," +
+                            "pi_invostatuscode,pi_statuscode,pi_whcode,pi_whname,pi_purpose,pi_purposename,pi_remark) select " + id + ",'" + code + "','拨出单',to_date('" + BaseUtil.parseDateToString(date, "yyyy-MM-dd") + "','yyyy-mm-dd')," +
+                            "'库存转移',' ',' ',' ',0,'" + emname + "','" + emcode + "','15','售后部','未过账','在录入','未打印','" + emname + "',to_date('" + BaseUtil.parseDateToString(date, "yyyy-MM-dd") + "','yyyy-MM-dd')," +
+                            "'ENTERING','UNPOST','" + outwhcode + "','" + outname + "','" + inwhcode + "','" + inname + "','" + remark + "' from dual");
+                }
+                //插入从表
+                insertSql.add("insert into PRODIODETAIL (pd_id,pd_piid,pd_inoutno,pd_piclass,pd_pdno,pd_prodcode," +
+                        "pd_outqty,pd_whcode,pd_whname,pd_inwhcode,pd_inwhname) select PRODIODETAIL_seq.nextval," + id + ",'" + code + "','拨出单'," + detno + ",'" + prcode + "'," +
+                        "" + map.get("outnum") + ",'" + outwhcode + "','" + outname + "','"+ inwhcode +"','" + inname + "' from dual");
+                detno ++;
+            } else {
+                baseDao.execute("update TOPWISECONNECT set tn_status=1 where tn_id=" + tn_id);res.put("success", false);
+                res.put("result", "必填项为空,插入失败");
+                return res;
+            }
+
+        }
+        insertSql.add("update TOPWISECONNECT set tn_status=-1 where tn_id=" + tn_id);
+        baseDao.execute(insertSql);
+        res.put("success", pi_code == null ? false : true);
+        res.put("result", pi_code == null ? "无效json" : pi_code);
+        return res;
+    }
+
+    public Map<String, Object> getWarehouse(String info) {
+        Map<Object, Object> map = JSONUtil.toMap(info);
+        Map<String, Object> resMap = new HashMap<String, Object>();
+        String success = "success";
+        String result = "";
+        if (map != null) {
+            Object whcode = map.get("wh_code");
+            Object prcode = map.get("pr_code");
+            if (!StringUtils.isEmpty(whcode) && !StringUtils.isEmpty(prcode)) {
+                String[] codes = prcode.toString().split(",");
+                StringBuffer con = new StringBuffer("pw_prodcode in ( ");
+                StringBuffer res = new StringBuffer();
+                for (String code : codes) {
+                    con.append("'" + code + "',");
+                }
+                List<Object[]> datas = baseDao.getFieldsDatasByCondition("productwh", new String[]{"pw_onhand", "pw_prodcode"},
+                        con.substring(0, con.length() - 1) + " ) and pw_whcode='" + whcode + "'");
+                for (Object[] data : datas) {
+                    res.append(data[1] + ":" + (data[0] == null ? 0 : data[0]) + ";");
+                }
+                result = res.toString().length() >0 ? res.toString().substring(0, res.length() - 1) : res.toString();
+            }else {
+                success = "fail";
+                result = "json中库存编号或者物料编号不存在!";
+            }
+        }else {
+            success = "fail";
+            result = "json数据无法解析!";
+        }
+
+        resMap.put("success", success);
+        resMap.put("result", result);
+        return resMap;
+    }
+
+    private String check(Object prcode, Object outwhcode, Object inwhcode, Object emname, int tn_id) {
+        int count = 0;
+         count = baseDao.getCount("select count(1) from product where pr_code=?", prcode);
+        if (count != 1) {
+            baseDao.execute("update TOPWISECONNECT set tn_status=3 where tn_id=" + tn_id);
+            return "物料编号:" + prcode + " 在erp系统不存在,插入失败";
+        }
+        count = baseDao.getCount("select count(1) from warehouse where wh_code=?", outwhcode);
+        if (count != 1) {
+            baseDao.execute("update TOPWISECONNECT set tn_status=4 where tn_id=" + tn_id);
+            return "拨出仓编号:" + outwhcode + " 在erp系统不存在,插入失败";
+        }
+        count = baseDao.getCount("select count(1) from warehouse where wh_code=?", inwhcode);
+        if (count != 1) {
+            baseDao.execute("update TOPWISECONNECT set tn_status=4 where tn_id=" + tn_id);
+            return "拨入仓编号:" + inwhcode + " 在erp系统不存在,插入失败";
+        }
+        count = baseDao.getCount("select count(1) from employee where em_name=?", emname);
+        if (count != 1) {
+            baseDao.execute("update TOPWISECONNECT set tn_status=2 where tn_id=" + tn_id);
+            return "erp接管人:" + emname + " 在erp系统不存在,插入失败";
+        }
+        return null;
+    }
+
+    private void Save(String jsons, int id) {
+        jsons = jsons.replace("'", "''");
+        baseDao.execute("insert into TOPWISECONNECT select "+ id + ",'" + jsons + "',sysdate,0 from dual");
+    }
+}

+ 55 - 0
eis-wms/src/main/java/com/uas/eiswms/controller/ProdIOController.java

@@ -0,0 +1,55 @@
+package com.uas.eiswms.controller;
+
+
+import com.uas.eiswms.service.LoginService;
+import com.uas.eiswms.service.ProdIOService;
+import com.uas.eiswms.util.BaseUtil;
+import com.uas.eiswms.util.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/XKN")
+public class ProdIOController {
+
+    @Autowired
+    private ProdIOService prodIOService;
+    @Autowired
+    private LoginService loginService;
+
+    @RequestMapping("/productio/getBill.action")
+    public Map<String, Object> getBill(String master, String pi_class, String lastUpdateTime, String condition,
+                                       String token, Long timestamp, String sign, HttpServletRequest request) {
+        Map<String, Object> resultMap = loginService.checkSign(request);
+        if (!resultMap.get("resCode").equals("00")) {
+            return resultMap;
+        }
+        return prodIOService.getBill(pi_class, lastUpdateTime, condition);
+    }
+
+    @RequestMapping("/porductio/post.action")
+    public Map<String, Object> post(String master, String data, String token, Long timestamp,
+                                    String sign, HttpServletRequest request){
+        Map<String, Object> resultMap = loginService.checkSign(request);
+        if (!resultMap.get("resCode").equals("00")) {
+            return resultMap;
+        }
+        if(StringUtils.isEmpty(data)) {
+            BaseUtil.showError("空数据,请检查后进行请求!");
+        }
+        resultMap.put("result", prodIOService.prePost(data));
+        return resultMap;
+    }
+
+    @RequestMapping("/productio/test.action")
+    public Map<String, Object> test(String master, String pi_class, String lastUpdateTime, String condition,
+                                       String token, Long timestamp, String sign) {
+        System.out.println("进入");
+        return prodIOService.test(pi_class, lastUpdateTime, condition, master);
+    }
+
+}

+ 126 - 0
eis-yunding/src/main/java/com/uas/eis/service/Impl/ProductServiceImpl.java

@@ -0,0 +1,126 @@
+package com.uas.eis.service.impl;
+
+import com.uas.eis.dao.BaseDao;
+import com.uas.eis.dao.EdiLogDao;
+import com.uas.eis.dao.EdiSuccessLogDao;
+import com.uas.eis.service.ProductService;
+import com.uas.eis.util.Constant;
+import com.uas.eis.util.HttpUtil;
+import com.uas.eis.util.JacksonUtil;
+import com.uas.eis.util.LogUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jdbc.support.rowset.SqlRowSet;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by zdw
+ * 2018-05-15 08:29.
+ */
+@Service
+public class ProductServiceImpl implements ProductService{
+
+    private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    private static final String sendProductToYundingUrl = "http://dc.oclean.com/putstorespec?sign";
+
+    @Autowired
+    BaseDao baseDao;
+    @Autowired
+    EdiLogDao ediLogDao;
+    @Autowired
+    EdiSuccessLogDao ediSuccessLogDao;
+
+
+    @Override
+    public Map<String, Object> postProductToYunding(Integer id) {
+        Map<String,Object> data = getMainData(id);
+        List<Map<String,Object>> datas = new LinkedList<Map<String,Object>>();
+        datas.add(data);
+
+        String timestamp = String.valueOf(System.currentTimeMillis()/1000);
+        String outerNo = String.valueOf(data.get("goods_no"));
+
+        Map<String,Object> postMapData = new HashMap<String,Object>();
+        postMapData.put("app_key", Constant.yundingAppKey);
+        postMapData.put("time_stamp",timestamp);
+        postMapData.put("spec_list",datas);
+
+        return postData(outerNo,postMapData,timestamp);
+    }
+
+    private Map<String,Object> postData(String outerNo,Map<String,Object> data,String timestamp){
+        Map<String,Object> res = new HashMap<String,Object>();
+        String jsonData = JacksonUtil.toSortJson(data);
+        System.out.println(jsonData);
+        try{
+
+            HttpUtil.Response response = HttpUtil.doPostToYunding(sendProductToYundingUrl,jsonData,timestamp);
+
+            String responseText = response.getResponseText();
+
+            logger.info("responseText:" + responseText);
+            logger.info("responseCode:" + response.getStatusCode());
+
+            if(response.getStatusCode()!=200){
+                throw new RuntimeException("yunding server error:" + responseText);
+            }
+
+            Map<String,Object> responseMap = JacksonUtil.fromJson(response.getResponseText());
+
+            if(!"0".equals(String.valueOf(responseMap.get("code")))){
+                res.put("success",false);
+                res.put("remark",responseMap.get("message"));
+            }else{
+                Map<String,Object> msgJson = (Map<String,Object>) responseMap.get("msg_json");
+                List<String> successCodes = (List<String>)msgJson.get("s_no");
+                if(successCodes.contains(outerNo)){
+                    res.put("success",true);
+                    ediLogDao.save(LogUtil.getSendSuccessLog(outerNo,jsonData,"send success"));
+                }else{
+                    res.put("success",false);
+                    res.put("remark","云顶数据中心处理失败!");
+                }
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+            logger.error("error",e);
+
+            res.put("success",false);
+            res.put("remark",e.getMessage());
+        }
+        return res;
+    }
+
+    private Map<String,Object> getMainData(Integer id){
+        Map<String,Object> data = new HashMap<String,Object>();
+        SqlRowSet rs = baseDao.getJdbcTemplate().queryForRowSet("select pr_code,pr_detail,pr_brand,pr_unit,pr_code,pr_spec,pr_description from Product where pr_id=" + id);
+        if(rs.next()){
+            data.put("goods_no",rs.getString("pr_code"));
+            data.put("goods_name",rs.getString("pr_detail"));
+            data.put("goods_type",1);
+            data.put("class_name","");
+            data.put("brand_name",rs.getString("pr_brand"));
+            data.put("unit_name",rs.getString("pr_unit"));
+            data.put("spec_no",rs.getString("pr_code"));
+            data.put("spec_code","");
+            data.put("spec_name",rs.getString("pr_spec"));
+            data.put("bar_code","");
+            data.put("price","");
+            data.put("guarantee","");
+            data.put("description",rs.getString("pr_description"));
+        }
+        return data;
+    }
+
+
+
+
+
+}

+ 126 - 0
eis-yunding/src/main/java/com/uas/eis/service/Impl/SaleReturnServiceImpl.java

@@ -0,0 +1,126 @@
+package com.uas.eis.service.impl;
+
+import com.uas.eis.dao.*;
+import com.uas.eis.entity.EdiSuccessLog;
+import com.uas.eis.entity.SaleReturn;
+import com.uas.eis.service.SaleReturnService;
+import com.uas.eis.service.StockService;
+import com.uas.eis.util.Constant;
+import com.uas.eis.util.HttpUtil;
+import com.uas.eis.util.JacksonUtil;
+import com.uas.eis.util.LogUtil;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by luhg on 2018/4/26.
+ * 销售退货单
+ */
+@Service
+public class SaleReturnServiceImpl implements SaleReturnService{
+    private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    public static final String getSaleReturnFromYundingUrl = "http://dc.oclean.com/getoutrefund";
+    //public static final String getSaleReturnFromYundingUrl = "http://127.0.0.1:8008/test/getoutrefund";
+
+    @Autowired
+    BaseDao baseDao;
+    @Autowired
+    EdiLogDao ediLogDao;
+    @Autowired
+    SaleReturnDao saleReturnDao;
+    @Autowired
+    EdiSuccessLogDao ediSuccessLogDao;
+    @Autowired
+    StockService stockService;
+
+    @Override
+    public void getSaleReturn() {
+        String timestamp = String.valueOf(System.currentTimeMillis()/1000);
+
+        Map<String,Object> postMapData = new HashMap<String,Object>();
+        postMapData.put("app_key", Constant.yundingAppKey);
+        postMapData.put("time_stamp",timestamp);
+        postMapData.put("start_time","1970-01-01 00:00:00");
+        postMapData.put("end_time","2099-01-01 00:00:00");
+        postMapData.put("page_size",100);
+        postMapData.put("page_index",0);
+
+        String jsonData = JacksonUtil.toSortJson(postMapData);
+        String responseText = null;
+        try {
+            HttpUtil.Response response = HttpUtil.doPostToYunding(getSaleReturnFromYundingUrl,jsonData,timestamp);
+
+            System.out.println("responseText:" + response.getResponseText());
+
+            if(response.getStatusCode()!=200){
+                responseText = "yunding server error";
+                throw new RuntimeException(response.getResponseText());
+            }
+
+            responseText = response.getResponseText();
+            Map<String,Object> responseMap = JacksonUtil.fromJson(response.getResponseText());
+
+            if(!"0".equals(String.valueOf(responseMap.get("code")))){
+                ediLogDao.save(LogUtil.getRequestFailLog(responseText));
+                return;
+            }
+
+            if(responseMap.get("data")==null){
+                return;
+            }
+
+            @SuppressWarnings("unchecked")
+			List<Map<String,Object>> datas = (List<Map<String,Object>>) responseMap.get("data");
+            if(datas.size()>0){
+                execCreateSaleReturnProcedure(datas,responseText);
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+            logger.error("error",e);
+            ediLogDao.save(LogUtil.getSaleFailLog(responseText,e.getMessage()));
+        }
+    }
+
+    public void execCreateSaleReturnProcedure(List<Map<String,Object>> datas,String responseText){
+        String code = null;
+        String out = null;
+        EdiSuccessLog postSuccessHist = null;
+        String type = "sale_return";
+        for(Map<String,Object> data:datas){
+            code = String.valueOf(data.get("refund_no"));
+
+            postSuccessHist = null;
+            postSuccessHist = ediSuccessLogDao.findByCodeAndType(code,type);
+            if(postSuccessHist!=null){
+                stockService.postConfirmToYunding(code,3);
+                continue;
+            }
+
+            try {
+                SaleReturn saleReturn = JacksonUtil.fromJson(data, SaleReturn.class);
+                saleReturn = saleReturnDao.save(saleReturn);
+
+                out = baseDao.callProcedure("SP_YUNDING_SALERETURN",new Object[]{saleReturn.getId()});
+                if (out!=null){
+                    ediLogDao.save(LogUtil.getSaleReturnFailLog(code,responseText,out));
+                }else{
+                    ediLogDao.save(LogUtil.getSaleReturnSuccessLog(code,responseText));
+                    ediSuccessLogDao.save(LogUtil.getLogToAvoidRepeatPost(code,type));
+                    stockService.postConfirmToYunding(code,3);
+                }
+            }catch (Exception e){
+                e.printStackTrace();
+                logger.error("error",e);
+                ediLogDao.save(LogUtil.getSaleReturnFailLog(code,responseText,e.getMessage()));
+            }
+        }
+    }
+}

+ 277 - 0
eis-yunding/src/main/java/com/uas/eis/service/Impl/YundingServiceImpl.java

@@ -0,0 +1,277 @@
+package com.uas.eis.service.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.alibaba.fastjson.JSON;
+import com.uas.eis.dao.BaseDao;
+import com.uas.eis.service.YundingService;
+import com.uas.eis.util.BaseUtil;
+import com.uas.eis.util.SqlUtil;
+
+
+
+@Service
+public  class YundingServiceImpl implements YundingService  {
+	@Autowired
+	private BaseDao baseDao;
+	
+	
+	/**
+	 * 出入库单审核接口
+	 * 
+	 * @param id
+	 * @param piclass
+	 *            单据主表id
+	 *            单据类型piclass
+	 *            
+	 */
+	@Override
+	public void  ProdInOutAuidted(int id,String piclass) {
+		Map<Object, Object> store = new HashMap<Object, Object>();	
+		//传入查询code、单据ID传回单据主从表信息Map
+		if (piclass=="采购验收单"||piclass=="委外验收单"){
+		//云顶插入采购/委外验收单接口
+		}
+		if (piclass=="采购验退单"||piclass=="委外验退单"){
+			//云顶插入采购/委外验退单接口	
+		}
+		if (piclass=="拨出单"){
+			//云顶插入拨出单接口	
+		}
+		if (piclass=="其他入库单"){
+			//云顶插入其他入库单接口	
+		}
+		if (piclass=="其他出库单"){
+			//云顶插入其他出库单接口	
+		}
+	}
+	
+	
+	/**
+	 * 出入库单云顶数据中心传UAS过账接口
+	 * 
+	 * @param Store
+	 *            单据编号,类型等Json数据 Store
+	 *            
+	 */
+	@Override
+	public void  ProdInOutPOST(String Store) {
+
+
+
+		com.alibaba.fastjson.JSONObject json = JSON.parseObject(Store);
+		String Code=json.getString("xxxxxx").toString();
+		String Piclass=json.getString("xxxxxx").toString();
+		String res=null;
+		baseDao.procedure("SP_GetCostPrice", new Object[] { Piclass, Code });
+		res = baseDao.callProcedure("Sp_SplitProdOut",
+				new Object[] { Piclass, Code, "ADMIN" });
+
+		if (res != null && !res.trim().equals("")) {
+			// 重新添加提示限制信息
+			BaseUtil.showError(res + "  " +Piclass + Code + ",过账失败");
+			// BaseUtil.showError(res);
+		}
+		res = baseDao.callProcedure("Sp_CommitProdInout",
+				new Object[] { Piclass, Code, "ADMIN"});
+		if (res != null && !res.trim().equals("")) {
+			BaseUtil.showError(res);
+		}
+			
+	}
+	
+	
+	
+	/**
+	 * 销售订单云顶数据中心传UAS并生成一张已过账销售出货单接口
+	 * 
+	 * @param Store
+	 *            销售订单主从表Json数据 Store
+	 *            
+	 */
+	@Override
+	public void  Salereceive(String Store) {
+		//销售订单插入
+		com.alibaba.fastjson.JSONObject json = JSON.parseObject(Store);
+		String jsons =json.toString();
+		List<Object[]> mappingList = baseDao.getFieldsDatasByCondition("xxx", new String[] { "TD_FROMFIELD", "TD_TOFIELD" }, "qu_id=1");
+		Map<String, String> resultmap = new HashMap<String, String>();
+		for(Object[] obj : mappingList){
+			resultmap.put(String.valueOf(obj[0]), String.valueOf(obj[1]));
+		}
+		Map<String, Object> njson=BaseUtil.jsonToMap(jsons, resultmap);
+		Map<Object, Object> store = (Map<Object, Object>) njson.get("stockout_list");
+		store.put("sa_status", "已审核");
+		store.put("sa_statuscode", "AUDITED");
+		int id= Integer.valueOf(String.valueOf(baseDao.getFieldDataByCondition("dual", "sale_seq.nextval", "1=1")));
+		store.put("sa_id", id);
+		List<Map<Object, Object>> grid = (List<Map<Object, Object>>) njson.get("details_list");
+		for (Map<Object, Object> map : grid) {
+			map.put("sd_said", id);	
+			map.put("sd_id", "saledetail_seq.nextval");
+			}
+		int count= Integer.valueOf(String.valueOf(baseDao.getFieldDataByCondition("Sale", "count(1)", "sa_code=" + store.get("order_no"))));
+		if (count >0) {
+			// 重新添加提示限制信息
+			BaseUtil.showError(store.get("order_no")  + "编号已存在");
+		}
+		// 保存sale
+		String formSql = SqlUtil.getInsertSqlByMap(store, "Sale");
+		baseDao.execute(formSql);
+		// 保存saleDetail
+		List<String> gridSql = SqlUtil.getInsertSqlbyList(grid, "SaleDetail", "sd_id");
+		baseDao.execute(gridSql);
+		//调用生成出货单方法
+		TurnProdIN(id);
+		//过账生成的出货单
+		String pi_inoutno= String.valueOf(baseDao.getFieldDataByCondition("ProdInOut", "pi_inoutno", "pi_sourcecoe="+store.get("order_no")));
+		String res=null;
+		baseDao.procedure("SP_GetCostPrice", new Object[] { "出货单", pi_inoutno });
+		res = baseDao.callProcedure("Sp_SplitProdOut",
+				new Object[] { "出货单", pi_inoutno, "ADMIN" });
+
+		if (res != null && !res.trim().equals("")) {
+			// 重新添加提示限制信息
+			BaseUtil.showError(res + "  出货单"  + pi_inoutno + ",过账失败");
+			// BaseUtil.showError(res);
+		}
+		res = baseDao.callProcedure("Sp_CommitProdInout",
+				new Object[] { "出货单", pi_inoutno, "ADMIN"});
+		if (res != null && !res.trim().equals("")) {
+			BaseUtil.showError(res);
+		}
+	}
+	
+	
+	
+	
+	
+	/**
+	 * 销售订单形成对应得出货单
+	 * 
+	 * @param id
+	 *            单据类型id
+	 *            
+	 */
+	@Override
+	public void  TurnProdIN(int id) {
+		String code=baseDao.callProcedure("Sp_GetMaxNumber", new Object[] { "ProdInOut!Sale", 2 });
+		int pi_id= Integer.valueOf(String.valueOf(baseDao.getFieldDataByCondition("dual", "ProdInOut_seq.nextval", "1=1")));
+		String contactSql = "insert into ProdInOut (pi_id,pi_inoutno,pi_recordman,pi_operatorcode,pi_recorddate,pi_invostatus,pi_invostatuscode,pi_class,pi_cardid,pi_cardcode,pi_title,pi_status,pi_statuscode,pi_updatedate,pi_updateman,pi_receivecode,pi_receivename,pi_arcode,pi_arname,pi_currency,pi_rate,pi_sellercode,pi_sellername,pi_address,pi_remark,pi_cusaddresssid,pi_paymentcode,pi_cop,pi_departmentcode,pi_departmentname,pi_transport,pi_payment,pi_printstatus,pi_printstatuscode,pi_chargeamount,pi_sourcecoe) "
+						+ "select"+pi_id+","+code+",'admin','ADMIN',sysdate,'在录入','ENTERING','出货单',sa_custid,sa_custcode,sa_custname,'未过账','UNPOST',sysdate,'admin',sa_shcustcode,sa_shcustname,sa_apcustcode,sa_apcustname,sa_currency,sa_rate,sa_sellercode,sa_seller,sa_toplace,sa_remark,sa_cusaddresssid,sa_paymentscode,sa_cop,sa_departmentcode,sa_departmentname,sa_transport,sa_payments,'未打印','UNPRINT',sa_fare,sa_code from sale where sa_id="+id;
+		baseDao.execute(contactSql);
+		contactSql = "insert into ProdIODetail  (pd_id,pd_piid,pd_orderdetno,pd_ordercode,pd_prodcode,pd_sendprice,pd_outqty,pd_beipinoutqty,pd_pocode,pd_piclass,pd_status,pd_auditstatus,pd_taxrate,pd_sdid,pd_remark,pd_custprodcode,pd_custprodspec,pd_discount,pd_inqty,pd_custproddetail,pd_purcprice,pd_commissionrate,pd_whcode,pd_whname) "
+				+ "select ProdIODetail_seq.nextval,"+pi_id+",sd_detno,sa_code,sd_prodcode,sd_price,sd_qty,sd_readyqty,sa_pocode,'出货单',0,'ENTERING',sd_taxrate,sd_id,sd_remark,sd_custprodcode,sd_prodcustcode,sd_discount,0,sd_custproddetail,sd_purcprice,sd_commissionrate,sd_whcode,sd_whcode from saledetail left join sale on sd_said=sa_id where sa_id="+id;
+		baseDao.execute(contactSql);
+		baseDao.execute("update Prodinout set (pi_whcode,pi_whname)=(select pd_whcode,pd_whname from ProdIODetail where pd_piid="
+				+ pi_id + " and pd_pdno=1) where pi_id=" + pi_id + "");
+		
+		baseDao.execute(
+				"update ProdInOut set pi_address=(select cu_add1 from customer where pi_cardcode=cu_code) where pi_id=? and nvl(pi_address,' ')=' '",
+				pi_id);
+		baseDao.execute("update prodinout set pi_purposename=((select max(ca_person) from CustomerAddress left join customer on ca_cuid=cu_id where cu_code=pi_cardcode and ca_address=pi_address))  where pi_purposename is null  and  pi_id="
+				+ pi_id);
+		baseDao.execute("update prodinout set pi_expresscode=((select max(ca_phone) from CustomerAddress left join customer on ca_cuid=cu_id where cu_code=pi_cardcode and ca_address=pi_address))  where pi_expresscode is null  and  pi_id="
+				+ pi_id);
+		baseDao.execute("update prodinout set pi_fax=((select max(ca_fax) from CustomerAddress left join customer on ca_cuid=cu_id where cu_code=pi_cardcode and ca_address=pi_address))  where pi_fax is null  and  pi_id="
+				+ pi_id);
+		baseDao.execute(
+				"update ProdIODetail set pd_netprice=ROUND(pd_sendprice/(1 + pd_taxrate/ 100),6), pd_taxtotal=round(pd_sendprice*pd_outqty/(1+pd_taxrate/100),2), pd_ordertotal=round(pd_outqty*pd_sendprice,2) where pd_piid=?",
+				pi_id);
+		baseDao.execute(
+				"update saleDetail set sdyqty=sd_qty where sd_said=?",
+				id);
+	}
+	
+	
+	
+	
+	
+	
+	/**
+	 * 销售退货单云顶数据中心传UAS并过账接口
+	 * 
+	 * @param Store
+	 *            销售退货单主从表Json数据 Store
+	 *            
+	 */
+	@Override
+	public void  SaleReturn(String Store) {
+		//销售退货单插入
+		com.alibaba.fastjson.JSONObject json = JSON.parseObject(Store);
+		String jsons =json.toString();
+		List<Object[]> mappingList = baseDao.getFieldsDatasByCondition("xxx", new String[] { "TD_FROMFIELD", "TD_TOFIELD" }, "qu_id=1");
+		Map<String, String> resultmap = new HashMap<String, String>();
+		for(Object[] obj : mappingList){
+			resultmap.put(String.valueOf(obj[0]), String.valueOf(obj[1]));
+		}
+		Map<String, Object> njson=BaseUtil.jsonToMap(jsons, resultmap);
+		Map<Object, Object> store = (Map<Object, Object>) njson.get("date");
+		store.put("pi_invostatus", "已审核");
+		store.put("pi_invostatuscode", "AUDITED");
+		int id= Integer.valueOf(String.valueOf(baseDao.getFieldDataByCondition("dual", "ProdInOut_seq.nextval", "1=1")));
+		store.put("pi_id", id);
+		List<Map<Object, Object>> grid = (List<Map<Object, Object>>) njson.get("refund_orders_list");
+		for (Map<Object, Object> map : grid) {
+			map.put("pd_piid", id);	
+			map.put("pd_id", "ProdIODetail_seq.nextval");
+			}
+		int count= Integer.valueOf(String.valueOf(baseDao.getFieldDataByCondition("ProdInOut", "count(1)", "pi_inoutno=" + store.get("refund_no")+"and pi_class='销售退货单'")));
+		if (count >0) {
+			// 重新添加提示限制信息
+			BaseUtil.showError(store.get("refund_no")  + "编号已存在");
+		}
+		// 保存ProdInOut
+		String formSql = SqlUtil.getInsertSqlByMap(store, "ProdInOut");
+		baseDao.execute(formSql);
+		// 保存ProdIODetail
+		List<String> gridSql = SqlUtil.getInsertSqlbyList(grid, "ProdIODetail", "pd_id");
+		baseDao.execute(gridSql);
+		//过账生成的退货单
+		String res=null;
+		baseDao.procedure("SP_GetCostPrice", new Object[] { "出货单", store.get("refund_no") });
+		res = baseDao.callProcedure("Sp_SplitProdOut",
+				new Object[] { "销售退货单", store.get("refund_no"), "ADMIN" });
+
+		if (res != null && !res.trim().equals("")) {
+			// 重新添加提示限制信息
+			BaseUtil.showError(res + "  销售退货单"  + store.get("refund_no") + ",过账失败");
+			// BaseUtil.showError(res);
+		}
+		res = baseDao.callProcedure("Sp_CommitProdInout",
+				new Object[] { "销售退货单", store.get("refund_no"), "ADMIN"});
+		if (res != null && !res.trim().equals("")) {
+			BaseUtil.showError(res);
+		}
+	}
+	
+	
+	/**
+	 * 退货单云顶数据中心传UAS反过账接口
+	 * 
+	 * @param Store
+	 *            单据编号,类型等Json数据 Store
+	 *            
+	 */
+	@Override
+	public void  SaleReturnDelete(String Store) {
+		com.alibaba.fastjson.JSONObject json = JSON.parseObject(Store);
+		String Code=json.getString("refund_no").toString();
+		String Piclass="销售退货单";
+		int piid= Integer.valueOf(String.valueOf(baseDao.getFieldDataByCondition("ProdInOut", "pi_id", "pi_inoutno=" + Code+"and pi_class="+Piclass)));
+		String res=null;
+		res= baseDao.callProcedure("Sp_UnCommitProdInout", Piclass,Code);
+		if (res != null && !res.trim().equals("")) {
+			BaseUtil.showError(res);
+		}
+		baseDao.updateByCondition("ProdInOut", "pi_statuscode='UNPOST',pi_status='未过账',pi_inoutman=null,pi_date1=null", "pi_id=" + piid);
+		//删除反过账销售退货单
+		baseDao.deleteByCondition("ProdIODetail", "pd_piid="+piid);
+		baseDao.deleteByCondition("ProdInOut", "pi_id="+piid);
+		}	
+}

+ 123 - 0
eis-yunding/src/main/java/com/uas/eis/service/impl/SaleServiceImpl.java

@@ -0,0 +1,123 @@
+package com.uas.eis.service.impl;
+
+import com.uas.eis.dao.*;
+import com.uas.eis.entity.EdiSuccessLog;
+import com.uas.eis.entity.Sale;
+import com.uas.eis.service.SaleService;
+import com.uas.eis.service.StockService;
+import com.uas.eis.util.Constant;
+import com.uas.eis.util.HttpUtil;
+import com.uas.eis.util.JacksonUtil;
+import com.uas.eis.util.LogUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by luhg on 2018/4/26.
+ * 销售订单
+ */
+@Service
+public class SaleServiceImpl implements SaleService{
+    private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    public static final String getSaleFromYundingUrl = "http://dc.oclean.com/getoutstorage";
+    //public static final String getSaleFromYundingUrl = "http://127.0.0.1:8008/test/getoutstorage";
+
+    @Autowired
+    BaseDao baseDao;
+    @Autowired
+    EdiLogDao ediLogDao;
+    @Autowired
+    SaleDao saleDao;
+    @Autowired
+    EdiSuccessLogDao ediSuccessLogDao;
+    @Autowired
+    StockService stockService;
+
+    public void getSale() {
+        String timestamp = String.valueOf(System.currentTimeMillis()/1000);
+
+        Map<String,Object> postMapData = new HashMap<String,Object>();
+        postMapData.put("app_key", Constant.yundingAppKey);
+        postMapData.put("time_stamp",timestamp);
+        postMapData.put("start_time","1970-01-01 00:00:00");
+        postMapData.put("end_time","2099-01-01 00:00:00");
+        postMapData.put("page_size",100);
+        postMapData.put("page_index",0);
+
+        String jsonData = JacksonUtil.toSortJson(postMapData);
+        String responseText = null;
+        try {
+            HttpUtil.Response response = HttpUtil.doPostToYunding(getSaleFromYundingUrl,jsonData,timestamp);
+
+            System.out.println("responseText:" + response.getResponseText());
+
+            if(response.getStatusCode()!=200){
+                responseText = "yunding server error";
+                throw new RuntimeException(response.getResponseText());
+            }
+
+            responseText = response.getResponseText();
+            Map<String,Object> responseMap = JacksonUtil.fromJson(response.getResponseText());
+
+            if(!"0".equals(String.valueOf(responseMap.get("code")))){
+                ediLogDao.save(LogUtil.getRequestFailLog(responseText));
+                return;
+            }
+
+            if(responseMap.get("stockout_list")==null){
+                return;
+            }
+
+            List<Map<String,Object>> datas = (List<Map<String,Object>>) responseMap.get("stockout_list");
+            if(datas.size()>0){
+                execCreateSaleProcedure(datas,responseText);
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+            logger.error("error",e);
+            ediLogDao.save(LogUtil.getSaleFailLog(responseText,e.getMessage()));
+        }
+    }
+
+    public void execCreateSaleProcedure(List<Map<String,Object>> datas,String responseText){
+        String code = null;
+        String out = null;
+        EdiSuccessLog postSuccessHist = null;
+        String type = "sale";
+        for(Map<String,Object> data:datas){
+            code = String.valueOf(data.get("trade_no"));
+
+            postSuccessHist = null;
+            postSuccessHist = ediSuccessLogDao.findByCodeAndType(code,type);
+            if(postSuccessHist!=null){
+                stockService.postConfirmToYunding(code,2);
+                continue;
+            }
+
+            try {
+                Sale sale = JacksonUtil.fromJson(data, Sale.class);
+                sale = saleDao.save(sale);
+
+                out = baseDao.callProcedure("SP_YUNDING_SALERECEIVE",new Object[]{sale.getId()});
+                if (out!=null){
+                    ediLogDao.save(LogUtil.getSaleFailLog(code,responseText,out));
+                }else{
+                    ediLogDao.save(LogUtil.getSaleSuccessLog(code,responseText));
+                    ediSuccessLogDao.save(LogUtil.getLogToAvoidRepeatPost(code,type));
+                    stockService.postConfirmToYunding(code,2);
+                }
+            }catch (Exception e){
+                e.printStackTrace();
+                logger.error("error",e);
+                ediLogDao.save(LogUtil.getSaleFailLog(code,responseText,e.getMessage()));
+            }
+        }
+    }
+}

+ 341 - 0
eis-yunding/src/main/java/com/uas/eis/service/impl/StockServiceImpl.java

@@ -0,0 +1,341 @@
+package com.uas.eis.service.impl;
+
+import com.uas.eis.dao.*;
+import com.uas.eis.entity.EdiSuccessLog;
+import com.uas.eis.service.StockService;
+import com.uas.eis.util.*;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jdbc.support.rowset.SqlRowSet;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by luhg on 2018/4/19.
+ * 出入库相关
+ */
+@Service
+public class StockServiceImpl implements StockService{
+    private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    private static final String sendStockToYundingUrl = "http://dc.oclean.com/putinstorage";
+    private static final String stockGetPostFromYundingUrl = "http://dc.oclean.com/getinstorage";
+    private static final String sendStockPostConfirmToYundingUrl = "http://dc.oclean.com/setconfirmstatus";
+
+    @Autowired
+    BaseDao baseDao;
+    @Autowired
+    EdiLogDao ediLogDao;
+    @Autowired
+    EdiSuccessLogDao ediSuccessLogDao;
+
+    public Map<String, Object> postStockToYunding(Integer id) {
+        Map<String,Object> data = getMainData(id);
+        List<Map<String,Object>> datas = new LinkedList<Map<String,Object>>();
+        datas.add(data);
+
+        String timestamp = String.valueOf(System.currentTimeMillis()/1000);
+        String outerNo = String.valueOf(data.get("outer_no"));
+
+        Map<String,Object> postMapData = new HashMap<String,Object>();
+        postMapData.put("app_key", Constant.yundingAppKey);
+        postMapData.put("time_stamp",timestamp);
+        postMapData.put("data",datas);
+
+        return postData(outerNo,postMapData,timestamp);
+    }
+
+    private Map<String,Object> postData(String outerNo,Map<String,Object> data,String timestamp){
+        Map<String,Object> res = new HashMap<String,Object>();
+        String jsonData = JacksonUtil.toSortJson(data);
+        try{
+
+            HttpUtil.Response response = HttpUtil.doPostToYunding(sendStockToYundingUrl,jsonData,timestamp);
+
+            String responseText = response.getResponseText();
+
+            logger.info("responseText:" + responseText);
+            logger.info("responseCode:" + response.getStatusCode());
+
+            if(response.getStatusCode()!=200){
+                throw new RuntimeException("yunding server error:" + responseText);
+            }
+
+            Map<String,Object> responseMap = JacksonUtil.fromJson(response.getResponseText());
+
+            if(!"0".equals(String.valueOf(responseMap.get("code")))){
+                res.put("success",false);
+                res.put("remark",responseMap.get("message"));
+            }else{
+                Map<String,Object> msgJson = (Map<String,Object>) responseMap.get("msg_json");
+                List<String> successCodes = (List<String>)msgJson.get("s_no");
+                if(successCodes.contains(outerNo)){
+                    res.put("success",true);
+                    ediLogDao.save(LogUtil.getSendSuccessLog(outerNo,jsonData,"send success"));
+                }else{
+                    res.put("success",false);
+                    res.put("remark","云顶数据中心处理失败!");
+                }
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+            logger.error("error",e);
+
+            res.put("success",false);
+            res.put("remark",e.getMessage());
+        }
+        return res;
+    }
+
+    public void autoPost(){
+        String timestamp = String.valueOf(System.currentTimeMillis()/1000);
+
+        Map<String,Object> postMapData = new HashMap<String,Object>();
+        postMapData.put("app_key", Constant.yundingAppKey);
+        postMapData.put("time_stamp",timestamp);
+        postMapData.put("start_time","1970-01-01 00:00:00");
+        postMapData.put("end_time","2099-01-01 00:00:00");
+        postMapData.put("status",2);
+        postMapData.put("page_size",100);
+        postMapData.put("page_index",0);
+
+        String jsonData = JacksonUtil.toSortJson(postMapData);
+        String responseText = null;
+        try {
+            HttpUtil.Response response = HttpUtil.doPostToYunding(stockGetPostFromYundingUrl,jsonData,timestamp);
+
+            if(response.getStatusCode()!=200){
+                responseText = "yunding server error";
+                throw new RuntimeException(response.getResponseText());
+            }
+
+            responseText = response.getResponseText();
+
+            logger.info("responseText" + responseText);
+
+            Map<String,Object> responseMap = JacksonUtil.fromJson(response.getResponseText());
+
+            if(!"0".equals(String.valueOf(responseMap.get("code")))){
+                ediLogDao.save(LogUtil.getRequestFailLog(responseText));
+                return;
+            }
+
+            if(responseMap.get("data")==null){
+                return;
+            }
+
+            List<Map<String,Object>> datas = (List<Map<String,Object>>) responseMap.get("data");
+            if(datas.size()>0){
+                execPostProcedure(datas,responseText);
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+            logger.error("error",e);
+            ediLogDao.save(LogUtil.getPostFailLog(responseText,e.getMessage()));
+        }
+    }
+
+    public void execPostProcedure(List<Map<String,Object>> datas,String responseText){
+        String code = null;
+        String piClass = null;
+        EdiSuccessLog postSuccessHist = null;
+        for(Map<String,Object> data:datas){
+            code = String.valueOf(data.get("outer_no"));
+            piClass = String.valueOf(data.get("src_order_type"));
+            postSuccessHist = null;
+            try {
+                postSuccessHist = ediSuccessLogDao.findByCodeAndType(code,piClass);
+                if(postSuccessHist!=null){ //说明之前已经过账成功
+                    postConfirmToYunding(code,1);
+                }else{ //没有记录,说明没有过账成功
+                    String out = baseDao.callProcedure("SP_YUNDING_STOCKPOST",new Object[]{code,piClass});
+                    if (out!=null){
+                        ediLogDao.save(LogUtil.getPostFailLog(code,responseText,out));
+                    }else{
+                        ediLogDao.save(LogUtil.getPostSuccessLog(code,responseText));
+                        ediSuccessLogDao.save(LogUtil.getLogToAvoidRepeatPost(code,piClass));  //记录到edi_post_log,防止调用接口失败,下次重复过账
+                        postConfirmToYunding(code,1);
+                    }
+                }
+
+            }catch (Exception e){
+                e.printStackTrace();
+                logger.error("error",e);
+                ediLogDao.save(LogUtil.getPostFailLog(code,responseText,e.getMessage()));
+            }
+
+        }
+    }
+
+    public void postConfirmToYunding(String code,int type){
+        String timestamp = String.valueOf(System.currentTimeMillis()/1000);
+
+        Map<String,Object> postMapData = new HashMap<String,Object>();
+        postMapData.put("app_key", Constant.yundingAppKey);
+        postMapData.put("time_stamp",timestamp);
+        postMapData.put("type",type);
+        postMapData.put("outer_no",code);
+
+        String jsonData = JacksonUtil.toSortJson(postMapData);
+        try{
+            HttpUtil.Response response = HttpUtil.doPostToYunding(sendStockPostConfirmToYundingUrl,jsonData,timestamp);
+            logger.info("confirm response:" + response.getResponseText());
+        }catch (Exception e){
+            e.printStackTrace();
+            logger.error("error",e);
+        }
+    }
+
+    private Map<String,Object> getMainData(Integer id){
+        Map<String,Object> data = new HashMap<String,Object>();
+        SqlRowSet rs = baseDao.getJdbcTemplate().queryForRowSet("select pi_id,pi_class,pi_inoutno,pi_whcode,pi_purpose,pi_remark,wh_type,ve_add1,ve_contact,ve_tel,pi_transport from prodinout left join warehouse on pi_whcode=wh_code left join Vendor on pi_cardcode = ve_code where pi_id=" + id);
+        String piClass = null;
+        if(rs.next()){
+            piClass = rs.getString("pi_class");
+            data.put("outer_no",rs.getString("pi_inoutno"));
+            data.put("warehouse_no",getWarehouseCode(piClass,rs.getString("pi_whcode"),rs.getString("pi_purpose")));
+            data.put("out_warehouse_no",rs.getString("pi_whcode"));
+            data.put("remark",rs.getString("pi_remark"));
+            data.put("order_type",getOrderType(piClass));
+            data.put("src_order_type",piClass);
+            data.put("warehouse_type",getWhType(rs.getString("wh_type")));
+            data.put("rec_type",rs.getString("pi_transport"));
+            data.put("rec_address",rs.getString("ve_add1"));
+            data.put("rec_contacts",rs.getString("ve_contact"));
+            data.put("rec_phone",rs.getString("ve_tel"));
+            data.put("details_list",getDetailData(id));
+        }
+        return data;
+    }
+
+    private String getWarehouseCode(String piClass,String piWhCode,String piPurpose){
+        if("拨出单".equals(piClass)){
+            return piPurpose;
+        }
+        return piWhCode;
+    }
+
+    private List<Map<String,Object>> getDetailData(Integer id){
+        List<Map<String,Object>> datas = new LinkedList<Map<String,Object>>();
+        Map<String,Object> data = new HashMap<String,Object>();
+        SqlRowList rs = baseDao.queryForRowSet("select pd_piclass,pd_id,pd_ordercode,pd_orderdetno,pd_batchcode,pd_prodcode,pd_inqty,pd_outqty,pd_description,pd_whcode,pd_inwhcode from prodiodetail where pd_piid=" + id);
+        String piClass = null;
+        String whCode = null;
+        String pdinWhCode = null;
+        while (rs.next()){
+            data = new HashMap<String,Object>();
+            piClass = rs.getString("pd_piclass");
+            whCode = rs.getString("pd_whcode");
+            pdinWhCode = rs.getString("pd_inwhcode");
+            data.put("child_no",rs.getString("pd_id"));
+            data.put("purchase_no",rs.getString("pd_ordercode"));
+            data.put("purchase_detno",rs.getString("pd_orderdetno"));
+            data.put("batch_no",rs.getString("pd_batchcode"));
+            data.put("stockin_num",getQty(piClass,rs.getInt("pd_inqty"),rs.getInt("pd_outqty")));
+            data.put("spec_no",rs.getString("pd_prodcode"));
+            data.put("remark",rs.getString("pd_description"));
+            data.put("warehouse_no",getInWarehouseNo(piClass,whCode,pdinWhCode));
+            data.put("out_warehouse_no",getOutWarehouseNo(piClass,whCode));
+
+            datas.add(data);
+        }
+        return datas;
+    }
+
+    private String getInWarehouseNo(String piClass,String whcode,String pdinwhcode){
+        String code = whcode;
+        if("拨出单".equals(piClass)){
+            code = pdinwhcode;
+        }
+        return code;
+    }
+
+    private String getOutWarehouseNo(String piClass,String whcode){
+        String code = null;
+        if("拨出单".equals(piClass)){
+            code = whcode;
+        }
+        return code;
+    }
+
+    private int getQty(String piClass,int inQty,int outQty){
+        int correctQty = 0;
+        switch (piClass){
+            case "采购验收单":
+                correctQty = inQty;
+                break;
+            case "采购验退单":
+                correctQty = outQty;
+                break;
+            case "委外验收单":
+                correctQty = inQty;
+                break;
+            case "委外验退单":
+                correctQty = outQty;
+                break;
+            case "拨出单":
+                correctQty = outQty;
+                break;
+            case "其它出库单":
+                correctQty = outQty;
+                break;
+            case "其它入库单":
+                correctQty = inQty;
+                break;
+            default:break;
+        }
+        return correctQty;
+    }
+
+    private int getWhType(String whtype){
+        int whType = -1;
+        switch (whtype){
+            case "良品仓":
+                whType = 1;
+                break;
+            case "不良品仓":
+                whType = 2;
+                break;
+            case "暂收仓":
+                whType = 3;
+                break;
+            default:break;
+        }
+        return whType;
+    }
+
+    private int getOrderType(String piClass){
+        int orderType = -1;
+        switch (piClass){
+            case "采购验收单":
+                orderType = 0;
+                break;
+            case "委外验收单":
+                orderType = 0;
+                break;
+            case "其它入库单":
+                orderType = 0;
+                break;
+            case "拨出单":
+                orderType = 1;
+                break;
+            case "采购验退单":
+                orderType = 2;
+                break;
+            case "委外验退单":
+                orderType = 2;
+                break;
+            case "其它出库单":
+                orderType = 2;
+                break;
+            default:break;
+        }
+        return orderType;
+    }
+}

+ 48 - 0
eis-yunding/src/main/resources/config/application.yml

@@ -0,0 +1,48 @@
+spring:
+    datasource:
+        type: com.alibaba.druid.pool.DruidDataSource
+        driverClassName: oracle.jdbc.OracleDriver
+        username: yunding
+        password: select!#%@$^
+        url: jdbc:oracle:thin:@scope2015.oicp.net:1521:orcl
+        initialSize: 10
+        maxActive: 80
+        minIdle: 10
+        maxWait: 60000
+        testOnBorrow: true
+        testOnReturn: false
+        testWhileIdle: true
+        validationQuery: SELECT 1 FROM DUAL
+        timeBetweenEvictionRunsMillis: 60000
+        minEvictableIdleTimeMillis: 300000
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 80
+        filters: stat
+        removeAbandoned: true
+        removeAbandonedTimeout: 1800
+    http:
+        encoding:
+            force: true
+            charset: UTF-8
+            enabled: true
+    message:
+        encoding: UTF-8
+    jpa:
+      show-sql: false
+      hibernate:
+        ddl-auto: update
+      database: oracle
+
+server:
+    tomcat:
+        uri_encoding: UTF-8
+    port: 8008
+    context-path: /EIS
+action:
+    api_action: /EIS/api
+    public_actions: /EIS/logout,/EIS/hello1
+logging:
+  level:
+    org:
+      hibernate:
+        type: trace

+ 197 - 0
logs/log.2018-10-10.log

@@ -0,0 +1,197 @@
+2018-10-10 15:25:42:284 [860 ms] INFO  [      com.uas.eis.UasApiApplication.logStarting:48] ---- Starting UasApiApplication on weixx-pc with PID 1064 (E:\workspace2\uas-eis\eis-api\target\classes started by Administrator in E:\workspace2\uas-eis)
+2018-10-10 15:25:42:287 [863 ms] INFO  [as.eis.UasApiApplication.logStartupProfileInfo:593] ---- No active profile set, falling back to default profiles: default
+2018-10-10 15:25:42:333 [909 ms] INFO  [igEmbeddedWebApplicationContext.prepareRefresh:583] ---- Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@335b5620: startup date [Wed Oct 10 15:25:42 CST 2018]; root of context hierarchy
+2018-10-10 15:25:42:687 [1263 ms] INFO  [ConfigurationClassParser.processPropertySource:458] ---- Properties location [classpath:/config/token.properties] not resolvable: class path resource [config/token.properties] cannot be opened because it does not exist
+2018-10-10 15:25:42:689 [1265 ms] INFO  [ConfigurationClassParser.processPropertySource:458] ---- Properties location [classpath:/config/abc.properties] not resolvable: class path resource [config/abc.properties] cannot be opened because it does not exist
+2018-10-10 15:25:43:061 [1637 ms] INFO  [     c.alibaba.druid.pool.DruidDataSource.init:715] ---- {dataSource-1} inited
+2018-10-10 15:25:43:063 [1639 ms] INFO  [   o.h.validator.internal.util.Version.<clinit>:30] ---- HV000001: Hibernate Validator 5.3.6.Final
+2018-10-10 15:25:43:800 [2376 ms] INFO  [aultListableBeanFactory.registerBeanDefinition:828] ---- Overriding bean definition for bean 'dataSource' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=true; factoryBeanName=druidDBConfig; factoryMethodName=dataSource; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/uas/eis/core/config/DruidDBConfig.class]] with [Generic bean: class [com.uas.eis.core.config.DynamicDataSource]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
+2018-10-10 15:25:44:517 [3093 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$5fc51f89] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:25:44:562 [3138 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.cache.annotation.ProxyCachingConfiguration' of type [org.springframework.cache.annotation.ProxyCachingConfiguration$$EnhancerBySpringCGLIB$$a8d755a7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:25:44:587 [3163 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration' of type [org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration$$EnhancerBySpringCGLIB$$9d4b1a4b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:25:44:681 [3257 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'spring.cache-org.springframework.boot.autoconfigure.cache.CacheProperties' of type [org.springframework.boot.autoconfigure.cache.CacheProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:25:44:694 [3270 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'cacheManagerCustomizers' of type [org.springframework.boot.autoconfigure.cache.CacheManagerCustomizers] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:25:44:700 [3276 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration' of type [org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration$$EnhancerBySpringCGLIB$$3ee68d2c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:25:44:712 [3288 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'cacheManager' of type [org.springframework.cache.concurrent.ConcurrentMapCacheManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:25:44:713 [3289 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'cacheAutoConfigurationValidator' of type [org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration$CacheManagerValidator] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:25:44:764 [3340 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$f872e7c3] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:25:44:779 [3355 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:25:44:781 [3357 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@51dae791' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:25:44:791 [3367 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$1d478a75] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:25:44:807 [3383 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:25:45:284 [3860 ms] INFO  [c.e.t.TomcatEmbeddedServletContainer.initialize:89] ---- Tomcat initialized with port(s): 8008 (http)
+2018-10-10 15:25:45:297 [3873 ms] INFO  [         o.a.catalina.core.StandardService.log:180] ---- Starting service [Tomcat]
+2018-10-10 15:25:45:299 [3875 ms] INFO  [          o.a.catalina.core.StandardEngine.log:180] ---- Starting Servlet Engine: Apache Tomcat/8.5.27
+2018-10-10 15:25:45:444 [4020 ms] INFO  [            o.a.c.c.C.[.[localhost].[/API].log:180] ---- Initializing Spring embedded WebApplicationContext
+2018-10-10 15:25:45:444 [4020 ms] INFO  [extLoader.prepareEmbeddedWebApplicationContext:276] ---- Root WebApplicationContext: initialization completed in 3111 ms
+2018-10-10 15:25:45:677 [4253 ms] INFO  [    o.s.b.w.s.FilterRegistrationBean.configure:258] ---- Mapping filter: 'characterEncodingFilter' to: [/*]
+2018-10-10 15:25:45:679 [4255 ms] INFO  [elegatingFilterProxyRegistrationBean.configure:258] ---- Mapping filter: 'springSecurityFilterChain' to: [/*]
+2018-10-10 15:25:45:679 [4255 ms] INFO  [   o.s.b.w.s.ServletRegistrationBean.onStartup:190] ---- Mapping servlet: 'dispatcherServlet' to [/]
+2018-10-10 15:25:45:865 [4441 ms] INFO  [erFactoryBean.createNativeEntityManagerFactory:356] ---- Building JPA container EntityManagerFactory for persistence unit 'default'
+2018-10-10 15:25:45:885 [4461 ms] INFO  [al.util.LogHelper.logPersistenceUnitInformation:31] ---- HHH000204: Processing PersistenceUnitInfo [
+	name: default
+	...]
+2018-10-10 15:25:45:973 [4549 ms] INFO  [               org.hibernate.Version.logVersion:37] ---- HHH000412: Hibernate Core {5.0.12.Final}
+2018-10-10 15:25:45:976 [4552 ms] INFO  [        org.hibernate.cfg.Environment.<clinit>:213] ---- HHH000206: hibernate.properties not found
+2018-10-10 15:25:45:978 [4554 ms] INFO  [ibernate.cfg.Environment.buildBytecodeProvider:317] ---- HHH000021: Bytecode provider name : javassist
+2018-10-10 15:25:46:030 [4606 ms] INFO  [        o.h.annotations.common.Version.<clinit>:66] ---- HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
+2018-10-10 15:25:46:200 [4776 ms] INFO  [          org.hibernate.dialect.Dialect.<init>:156] ---- HHH000400: Using dialect: org.hibernate.dialect.Oracle9iDialect
+2018-10-10 15:25:46:443 [5019 ms] WARN  [        org.hibernate.orm.deprecation.configure:87] ---- HHH90000014: Found use of deprecated [org.hibernate.id.SequenceHiLoGenerator] sequence-based id generator; use org.hibernate.id.enhanced.SequenceStyleGenerator instead.  See Hibernate Domain Model Mapping Guide for details.
+2018-10-10 15:25:46:447 [5023 ms] WARN  [        org.hibernate.orm.deprecation.configure:87] ---- HHH90000014: Found use of deprecated [org.hibernate.id.SequenceHiLoGenerator] sequence-based id generator; use org.hibernate.id.enhanced.SequenceStyleGenerator instead.  See Hibernate Domain Model Mapping Guide for details.
+2018-10-10 15:25:46:811 [5387 ms] INFO  [         o.h.tool.hbm2ddl.SchemaUpdate.execute:105] ---- HHH000228: Running hbm2ddl schema update
+2018-10-10 15:25:47:634 [6210 ms] INFO  [gerFactoryBean.buildNativeEntityManagerFactory:392] ---- Initialized JPA EntityManagerFactory for persistence unit 'default'
+2018-10-10 15:25:48:457 [7033 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/pm/postBOM],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.pm.BOMController.postBOM(java.lang.String)
+2018-10-10 15:25:48:460 [7036 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/scm/postProduct],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.scm.ProductController.postProduct(java.lang.String)
+2018-10-10 15:25:48:461 [7037 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/test]}" onto public java.lang.String com.uas.eis.controller.test.TestController.test(java.lang.String)
+2018-10-10 15:25:48:461 [7037 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/ss]}" onto public java.lang.String com.uas.eis.controller.test.TestController.testss(java.lang.String,java.lang.String,java.lang.String)
+2018-10-10 15:25:48:462 [7038 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/api/query]}" onto public java.lang.Object com.uas.eis.controller.QueryController.query(java.lang.String,java.lang.String)
+2018-10-10 15:25:48:462 [7038 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/api/doAction]}" onto public java.lang.Object com.uas.eis.controller.QueryController.doAction(java.lang.String,java.lang.String)
+2018-10-10 15:25:48:464 [7040 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/users/test],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.UserController.test()
+2018-10-10 15:25:48:465 [7041 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/users/userList],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.UserController.userList()
+2018-10-10 15:25:48:465 [7041 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/users/signup],methods=[POST]}" onto public com.uas.eis.entity.User com.uas.eis.controller.UserController.signup(com.uas.eis.entity.User)
+2018-10-10 15:25:48:467 [7043 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
+2018-10-10 15:25:48:468 [7044 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
+2018-10-10 15:25:48:575 [7151 ms] INFO  [appingHandlerAdapter.initControllerAdviceCache:534] ---- Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@335b5620: startup date [Wed Oct 10 15:25:42 CST 2018]; root of context hierarchy
+2018-10-10 15:25:48:643 [7219 ms] INFO  [eptionResolver.initExceptionHandlerAdviceCache:273] ---- Detected @ExceptionHandler methods in exceptionHandlerAdvice
+2018-10-10 15:25:48:933 [7509 ms] INFO  [    o.s.s.web.DefaultSecurityFilterChain.<init>:43] ---- Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@17477bbb, org.springframework.security.web.context.SecurityContextPersistenceFilter@49ea13b6, org.springframework.security.web.header.HeaderWriterFilter@414d2821, org.springframework.web.filter.CorsFilter@40fee459, org.springframework.security.web.authentication.logout.LogoutFilter@7dc92a06, com.uas.eis.core.filter.JWTLoginFilter@bcd9ed6, com.uas.eis.core.filter.JWTAuthenticationFilter@3ffa0f38, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@3d8fd373, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@807c1e8, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@13cc31df, org.springframework.security.web.session.SessionManagementFilter@6694fb1b, org.springframework.security.web.access.ExceptionTranslationFilter@5db90818, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@363fe35a]
+2018-10-10 15:25:49:733 [8309 ms] INFO  [ationMBeanExporter.afterSingletonsInstantiated:431] ---- Registering beans for JMX exposure on startup
+2018-10-10 15:25:49:757 [8333 ms] INFO  [       o.a.coyote.http11.Http11NioProtocol.log:180] ---- Initializing ProtocolHandler ["http-nio-8008"]
+2018-10-10 15:25:49:773 [8349 ms] INFO  [       o.a.coyote.http11.Http11NioProtocol.log:180] ---- Starting ProtocolHandler ["http-nio-8008"]
+2018-10-10 15:25:49:788 [8364 ms] INFO  [       o.a.tomcat.util.net.NioSelectorPool.log:180] ---- Using a shared selector for servlet write/read
+2018-10-10 15:25:49:811 [8387 ms] INFO  [s.b.c.e.t.TomcatEmbeddedServletContainer.start:201] ---- Tomcat started on port(s): 8008 (http)
+2018-10-10 15:25:49:816 [8392 ms] INFO  [       com.uas.eis.UasApiApplication.logStarted:57] ---- Started UasApiApplication in 8.05 seconds (JVM running for 8.621)
+2018-10-10 15:28:39:489 [803 ms] INFO  [      com.uas.eis.UasApiApplication.logStarting:48] ---- Starting UasApiApplication on weixx-pc with PID 15108 (E:\workspace2\uas-eis\eis-api\target\classes started by Administrator in E:\workspace2\uas-eis)
+2018-10-10 15:28:39:492 [806 ms] INFO  [as.eis.UasApiApplication.logStartupProfileInfo:593] ---- No active profile set, falling back to default profiles: default
+2018-10-10 15:28:39:674 [988 ms] INFO  [igEmbeddedWebApplicationContext.prepareRefresh:583] ---- Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@335b5620: startup date [Wed Oct 10 15:28:39 CST 2018]; root of context hierarchy
+2018-10-10 15:28:39:963 [1277 ms] INFO  [ConfigurationClassParser.processPropertySource:458] ---- Properties location [classpath:/config/token.properties] not resolvable: class path resource [config/token.properties] cannot be opened because it does not exist
+2018-10-10 15:28:39:964 [1278 ms] INFO  [ConfigurationClassParser.processPropertySource:458] ---- Properties location [classpath:/config/abc.properties] not resolvable: class path resource [config/abc.properties] cannot be opened because it does not exist
+2018-10-10 15:28:40:232 [1546 ms] INFO  [     c.alibaba.druid.pool.DruidDataSource.init:715] ---- {dataSource-1} inited
+2018-10-10 15:28:40:582 [1896 ms] INFO  [   o.h.validator.internal.util.Version.<clinit>:30] ---- HV000001: Hibernate Validator 5.3.6.Final
+2018-10-10 15:28:41:369 [2683 ms] INFO  [aultListableBeanFactory.registerBeanDefinition:828] ---- Overriding bean definition for bean 'dataSource' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=true; factoryBeanName=druidDBConfig; factoryMethodName=dataSource; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/uas/eis/core/config/DruidDBConfig.class]] with [Generic bean: class [com.uas.eis.core.config.DynamicDataSource]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
+2018-10-10 15:28:42:110 [3424 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$92f9c931] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:28:42:162 [3476 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.cache.annotation.ProxyCachingConfiguration' of type [org.springframework.cache.annotation.ProxyCachingConfiguration$$EnhancerBySpringCGLIB$$dc0bff4f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:28:42:191 [3505 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration' of type [org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration$$EnhancerBySpringCGLIB$$d07fc3f3] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:28:42:303 [3617 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'spring.cache-org.springframework.boot.autoconfigure.cache.CacheProperties' of type [org.springframework.boot.autoconfigure.cache.CacheProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:28:42:312 [3626 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'cacheManagerCustomizers' of type [org.springframework.boot.autoconfigure.cache.CacheManagerCustomizers] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:28:42:316 [3630 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration' of type [org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration$$EnhancerBySpringCGLIB$$721b36d4] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:28:42:324 [3638 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'cacheManager' of type [org.springframework.cache.concurrent.ConcurrentMapCacheManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:28:42:325 [3639 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'cacheAutoConfigurationValidator' of type [org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration$CacheManagerValidator] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:28:42:358 [3672 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$2ba7916b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:28:42:370 [3684 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:28:42:373 [3687 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@4ceff87d' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:28:42:381 [3695 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$507c341d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:28:42:395 [3709 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 15:28:42:839 [4153 ms] INFO  [c.e.t.TomcatEmbeddedServletContainer.initialize:89] ---- Tomcat initialized with port(s): 8008 (http)
+2018-10-10 15:28:42:990 [4304 ms] INFO  [         o.a.catalina.core.StandardService.log:180] ---- Starting service [Tomcat]
+2018-10-10 15:28:42:991 [4305 ms] INFO  [          o.a.catalina.core.StandardEngine.log:180] ---- Starting Servlet Engine: Apache Tomcat/8.5.27
+2018-10-10 15:28:43:179 [4493 ms] INFO  [            o.a.c.c.C.[.[localhost].[/API].log:180] ---- Initializing Spring embedded WebApplicationContext
+2018-10-10 15:28:43:180 [4494 ms] INFO  [extLoader.prepareEmbeddedWebApplicationContext:276] ---- Root WebApplicationContext: initialization completed in 3506 ms
+2018-10-10 15:28:43:451 [4765 ms] INFO  [    o.s.b.w.s.FilterRegistrationBean.configure:258] ---- Mapping filter: 'characterEncodingFilter' to: [/*]
+2018-10-10 15:28:43:454 [4768 ms] INFO  [elegatingFilterProxyRegistrationBean.configure:258] ---- Mapping filter: 'springSecurityFilterChain' to: [/*]
+2018-10-10 15:28:43:454 [4768 ms] INFO  [   o.s.b.w.s.ServletRegistrationBean.onStartup:190] ---- Mapping servlet: 'dispatcherServlet' to [/]
+2018-10-10 15:28:43:651 [4965 ms] INFO  [erFactoryBean.createNativeEntityManagerFactory:356] ---- Building JPA container EntityManagerFactory for persistence unit 'default'
+2018-10-10 15:28:43:714 [5028 ms] INFO  [al.util.LogHelper.logPersistenceUnitInformation:31] ---- HHH000204: Processing PersistenceUnitInfo [
+	name: default
+	...]
+2018-10-10 15:28:43:814 [5128 ms] INFO  [               org.hibernate.Version.logVersion:37] ---- HHH000412: Hibernate Core {5.0.12.Final}
+2018-10-10 15:28:43:817 [5131 ms] INFO  [        org.hibernate.cfg.Environment.<clinit>:213] ---- HHH000206: hibernate.properties not found
+2018-10-10 15:28:43:818 [5132 ms] INFO  [ibernate.cfg.Environment.buildBytecodeProvider:317] ---- HHH000021: Bytecode provider name : javassist
+2018-10-10 15:28:43:872 [5186 ms] INFO  [        o.h.annotations.common.Version.<clinit>:66] ---- HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
+2018-10-10 15:28:44:069 [5383 ms] INFO  [          org.hibernate.dialect.Dialect.<init>:156] ---- HHH000400: Using dialect: org.hibernate.dialect.Oracle9iDialect
+2018-10-10 15:28:44:413 [5727 ms] WARN  [        org.hibernate.orm.deprecation.configure:87] ---- HHH90000014: Found use of deprecated [org.hibernate.id.SequenceHiLoGenerator] sequence-based id generator; use org.hibernate.id.enhanced.SequenceStyleGenerator instead.  See Hibernate Domain Model Mapping Guide for details.
+2018-10-10 15:28:44:416 [5730 ms] WARN  [        org.hibernate.orm.deprecation.configure:87] ---- HHH90000014: Found use of deprecated [org.hibernate.id.SequenceHiLoGenerator] sequence-based id generator; use org.hibernate.id.enhanced.SequenceStyleGenerator instead.  See Hibernate Domain Model Mapping Guide for details.
+2018-10-10 15:28:44:849 [6163 ms] INFO  [         o.h.tool.hbm2ddl.SchemaUpdate.execute:105] ---- HHH000228: Running hbm2ddl schema update
+2018-10-10 15:28:45:632 [6946 ms] INFO  [gerFactoryBean.buildNativeEntityManagerFactory:392] ---- Initialized JPA EntityManagerFactory for persistence unit 'default'
+2018-10-10 15:28:46:707 [8021 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/pm/postBOM],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.pm.BOMController.postBOM(java.lang.String)
+2018-10-10 15:28:46:716 [8030 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/scm/postProduct],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.scm.ProductController.postProduct(java.lang.String)
+2018-10-10 15:28:46:717 [8031 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/test]}" onto public java.lang.String com.uas.eis.controller.test.TestController.test(java.lang.String)
+2018-10-10 15:28:46:717 [8031 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/ss]}" onto public java.lang.String com.uas.eis.controller.test.TestController.testss(java.lang.String,java.lang.String,java.lang.String)
+2018-10-10 15:28:46:717 [8031 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/api/query]}" onto public java.lang.Object com.uas.eis.controller.QueryController.query(java.lang.String,java.lang.String)
+2018-10-10 15:28:46:717 [8031 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/api/doAction]}" onto public java.lang.Object com.uas.eis.controller.QueryController.doAction(java.lang.String,java.lang.String)
+2018-10-10 15:28:46:719 [8033 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/users/test],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.UserController.test()
+2018-10-10 15:28:46:720 [8034 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/users/signup],methods=[POST]}" onto public com.uas.eis.entity.User com.uas.eis.controller.UserController.signup(com.uas.eis.entity.User)
+2018-10-10 15:28:46:720 [8034 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/users/userList],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.UserController.userList()
+2018-10-10 15:28:46:723 [8037 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
+2018-10-10 15:28:46:723 [8037 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
+2018-10-10 15:28:46:935 [8249 ms] INFO  [appingHandlerAdapter.initControllerAdviceCache:534] ---- Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@335b5620: startup date [Wed Oct 10 15:28:39 CST 2018]; root of context hierarchy
+2018-10-10 15:28:47:066 [8380 ms] INFO  [eptionResolver.initExceptionHandlerAdviceCache:273] ---- Detected @ExceptionHandler methods in exceptionHandlerAdvice
+2018-10-10 15:28:47:398 [8712 ms] INFO  [    o.s.s.web.DefaultSecurityFilterChain.<init>:43] ---- Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@8bde368, org.springframework.security.web.context.SecurityContextPersistenceFilter@5ccc971e, org.springframework.security.web.header.HeaderWriterFilter@26b3fe8, org.springframework.web.filter.CorsFilter@5065bdac, org.springframework.security.web.authentication.logout.LogoutFilter@5ae16aa, com.uas.eis.core.filter.JWTLoginFilter@2e9dcdd3, com.uas.eis.core.filter.JWTAuthenticationFilter@6e617c0e, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@4c9d833, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@76105ac0, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@9a07409, org.springframework.security.web.session.SessionManagementFilter@20518250, org.springframework.security.web.access.ExceptionTranslationFilter@2fa2143d, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@4c0930c4]
+2018-10-10 15:28:48:215 [9529 ms] INFO  [ationMBeanExporter.afterSingletonsInstantiated:431] ---- Registering beans for JMX exposure on startup
+2018-10-10 15:28:48:242 [9556 ms] INFO  [       o.a.coyote.http11.Http11NioProtocol.log:180] ---- Initializing ProtocolHandler ["http-nio-8008"]
+2018-10-10 15:28:48:256 [9570 ms] INFO  [       o.a.coyote.http11.Http11NioProtocol.log:180] ---- Starting ProtocolHandler ["http-nio-8008"]
+2018-10-10 15:28:48:270 [9584 ms] INFO  [       o.a.tomcat.util.net.NioSelectorPool.log:180] ---- Using a shared selector for servlet write/read
+2018-10-10 15:28:48:294 [9608 ms] INFO  [s.b.c.e.t.TomcatEmbeddedServletContainer.start:201] ---- Tomcat started on port(s): 8008 (http)
+2018-10-10 15:28:48:299 [9613 ms] INFO  [       com.uas.eis.UasApiApplication.logStarted:57] ---- Started UasApiApplication in 9.246 seconds (JVM running for 9.885)
+2018-10-10 15:29:26:965 [48279 ms] INFO  [            o.a.c.c.C.[.[localhost].[/API].log:180] ---- Initializing Spring FrameworkServlet 'dispatcherServlet'
+2018-10-10 15:29:26:965 [48279 ms] INFO  [.web.servlet.DispatcherServlet.initServletBean:489] ---- FrameworkServlet 'dispatcherServlet': initialization started
+2018-10-10 15:29:26:992 [48306 ms] INFO  [.web.servlet.DispatcherServlet.initServletBean:508] ---- FrameworkServlet 'dispatcherServlet': initialization completed in 27 ms
+2018-10-10 15:29:27:034 [48348 ms] INFO  [       c.uas.eis.controller.UserController.test:47] ---- msg
+2018-10-10 15:30:37:979 [119293 ms] INFO  [       c.uas.eis.controller.UserController.test:47] ---- msg
+2018-10-10 15:39:43:547 [664861 ms] INFO  [       c.uas.eis.controller.UserController.test:47] ---- msg
+2018-10-10 15:40:16:534 [697848 ms] INFO  [       c.uas.eis.controller.UserController.test:47] ---- msg
+2018-10-10 17:54:52:968 [1157 ms] INFO  [      com.uas.eis.UasApiApplication.logStarting:48] ---- Starting UasApiApplication on weixx-pc with PID 12972 (E:\workspace2\uas-eis\eis-api\target\classes started by Administrator in E:\workspace2\uas-eis)
+2018-10-10 17:54:52:984 [1173 ms] INFO  [as.eis.UasApiApplication.logStartupProfileInfo:593] ---- No active profile set, falling back to default profiles: default
+2018-10-10 17:54:53:040 [1229 ms] INFO  [igEmbeddedWebApplicationContext.prepareRefresh:583] ---- Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@335b5620: startup date [Wed Oct 10 17:54:53 CST 2018]; root of context hierarchy
+2018-10-10 17:54:53:238 [1427 ms] INFO  [ConfigurationClassParser.processPropertySource:458] ---- Properties location [classpath:/config/token.properties] not resolvable: class path resource [config/token.properties] cannot be opened because it does not exist
+2018-10-10 17:54:53:238 [1427 ms] INFO  [ConfigurationClassParser.processPropertySource:458] ---- Properties location [classpath:/config/abc.properties] not resolvable: class path resource [config/abc.properties] cannot be opened because it does not exist
+2018-10-10 17:54:53:383 [1572 ms] INFO  [   o.h.validator.internal.util.Version.<clinit>:30] ---- HV000001: Hibernate Validator 5.3.6.Final
+2018-10-10 17:54:53:784 [1973 ms] INFO  [     c.alibaba.druid.pool.DruidDataSource.init:715] ---- {dataSource-1} inited
+2018-10-10 17:54:55:054 [3243 ms] INFO  [aultListableBeanFactory.registerBeanDefinition:828] ---- Overriding bean definition for bean 'dataSource' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=true; factoryBeanName=druidDBConfig; factoryMethodName=dataSource; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/uas/eis/core/config/DruidDBConfig.class]] with [Generic bean: class [com.uas.eis.core.config.DynamicDataSource]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
+2018-10-10 17:54:56:133 [4322 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$e4a9197] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 17:54:56:186 [4375 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.cache.annotation.ProxyCachingConfiguration' of type [org.springframework.cache.annotation.ProxyCachingConfiguration$$EnhancerBySpringCGLIB$$575cc7b5] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 17:54:56:209 [4398 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration' of type [org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration$$EnhancerBySpringCGLIB$$4bd08c59] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 17:54:56:402 [4591 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'spring.cache-org.springframework.boot.autoconfigure.cache.CacheProperties' of type [org.springframework.boot.autoconfigure.cache.CacheProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 17:54:56:412 [4601 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'cacheManagerCustomizers' of type [org.springframework.boot.autoconfigure.cache.CacheManagerCustomizers] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 17:54:56:417 [4606 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration' of type [org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration$$EnhancerBySpringCGLIB$$ed6bff3a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 17:54:56:426 [4615 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'cacheManager' of type [org.springframework.cache.concurrent.ConcurrentMapCacheManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 17:54:56:427 [4616 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'cacheAutoConfigurationValidator' of type [org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration$CacheManagerValidator] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 17:54:56:481 [4670 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$a6f859d1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 17:54:56:494 [4683 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 17:54:56:496 [4685 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@3252747e' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 17:54:56:501 [4690 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$cbccfc83] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 17:54:56:513 [4702 ms] INFO  [rocessorChecker.postProcessAfterInitialization:327] ---- Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2018-10-10 17:54:57:192 [5381 ms] INFO  [c.e.t.TomcatEmbeddedServletContainer.initialize:89] ---- Tomcat initialized with port(s): 8008 (http)
+2018-10-10 17:54:57:206 [5395 ms] INFO  [         o.a.catalina.core.StandardService.log:180] ---- Starting service [Tomcat]
+2018-10-10 17:54:57:209 [5398 ms] INFO  [          o.a.catalina.core.StandardEngine.log:180] ---- Starting Servlet Engine: Apache Tomcat/8.5.27
+2018-10-10 17:54:57:383 [5572 ms] INFO  [            o.a.c.c.C.[.[localhost].[/API].log:180] ---- Initializing Spring embedded WebApplicationContext
+2018-10-10 17:54:57:384 [5573 ms] INFO  [extLoader.prepareEmbeddedWebApplicationContext:276] ---- Root WebApplicationContext: initialization completed in 4344 ms
+2018-10-10 17:54:57:632 [5821 ms] INFO  [    o.s.b.w.s.FilterRegistrationBean.configure:258] ---- Mapping filter: 'characterEncodingFilter' to: [/*]
+2018-10-10 17:54:57:634 [5823 ms] INFO  [elegatingFilterProxyRegistrationBean.configure:258] ---- Mapping filter: 'springSecurityFilterChain' to: [/*]
+2018-10-10 17:54:57:634 [5823 ms] INFO  [   o.s.b.w.s.ServletRegistrationBean.onStartup:190] ---- Mapping servlet: 'dispatcherServlet' to [/]
+2018-10-10 17:54:58:147 [6336 ms] INFO  [erFactoryBean.createNativeEntityManagerFactory:356] ---- Building JPA container EntityManagerFactory for persistence unit 'default'
+2018-10-10 17:54:58:219 [6408 ms] INFO  [al.util.LogHelper.logPersistenceUnitInformation:31] ---- HHH000204: Processing PersistenceUnitInfo [
+	name: default
+	...]
+2018-10-10 17:54:58:501 [6690 ms] INFO  [               org.hibernate.Version.logVersion:37] ---- HHH000412: Hibernate Core {5.0.12.Final}
+2018-10-10 17:54:58:503 [6692 ms] INFO  [        org.hibernate.cfg.Environment.<clinit>:213] ---- HHH000206: hibernate.properties not found
+2018-10-10 17:54:58:505 [6694 ms] INFO  [ibernate.cfg.Environment.buildBytecodeProvider:317] ---- HHH000021: Bytecode provider name : javassist
+2018-10-10 17:54:58:621 [6810 ms] INFO  [        o.h.annotations.common.Version.<clinit>:66] ---- HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
+2018-10-10 17:54:58:848 [7037 ms] INFO  [          org.hibernate.dialect.Dialect.<init>:156] ---- HHH000400: Using dialect: org.hibernate.dialect.Oracle9iDialect
+2018-10-10 17:54:59:276 [7465 ms] WARN  [        org.hibernate.orm.deprecation.configure:87] ---- HHH90000014: Found use of deprecated [org.hibernate.id.SequenceHiLoGenerator] sequence-based id generator; use org.hibernate.id.enhanced.SequenceStyleGenerator instead.  See Hibernate Domain Model Mapping Guide for details.
+2018-10-10 17:54:59:280 [7469 ms] WARN  [        org.hibernate.orm.deprecation.configure:87] ---- HHH90000014: Found use of deprecated [org.hibernate.id.SequenceHiLoGenerator] sequence-based id generator; use org.hibernate.id.enhanced.SequenceStyleGenerator instead.  See Hibernate Domain Model Mapping Guide for details.
+2018-10-10 17:54:59:753 [7942 ms] INFO  [         o.h.tool.hbm2ddl.SchemaUpdate.execute:105] ---- HHH000228: Running hbm2ddl schema update
+2018-10-10 17:55:01:978 [10167 ms] INFO  [gerFactoryBean.buildNativeEntityManagerFactory:392] ---- Initialized JPA EntityManagerFactory for persistence unit 'default'
+2018-10-10 17:55:03:141 [11330 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/pm/postBOM],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.pm.BOMController.postBOM(java.lang.String)
+2018-10-10 17:55:03:143 [11332 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/scm/postProduct],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.scm.ProductController.postProduct(java.lang.String)
+2018-10-10 17:55:03:143 [11332 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/test]}" onto public java.lang.String com.uas.eis.controller.test.TestController.test(java.lang.String)
+2018-10-10 17:55:03:143 [11332 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/ss]}" onto public java.lang.String com.uas.eis.controller.test.TestController.testss(java.lang.String,java.lang.String,java.lang.String)
+2018-10-10 17:55:03:144 [11333 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/api/query]}" onto public java.lang.Object com.uas.eis.controller.QueryController.query(java.lang.String,java.lang.String)
+2018-10-10 17:55:03:144 [11333 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/api/doAction]}" onto public java.lang.Object com.uas.eis.controller.QueryController.doAction(java.lang.String,java.lang.String)
+2018-10-10 17:55:03:146 [11335 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/users/test],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.UserController.test()
+2018-10-10 17:55:03:147 [11336 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/users/userList],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.uas.eis.controller.UserController.userList()
+2018-10-10 17:55:03:147 [11336 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/users/signup],methods=[POST]}" onto public com.uas.eis.entity.User com.uas.eis.controller.UserController.signup(com.uas.eis.entity.User)
+2018-10-10 17:55:03:149 [11338 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
+2018-10-10 17:55:03:150 [11339 ms] INFO  [.s.m.m.a.RequestMappingHandlerMapping.register:543] ---- Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
+2018-10-10 17:55:03:245 [11434 ms] INFO  [appingHandlerAdapter.initControllerAdviceCache:534] ---- Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@335b5620: startup date [Wed Oct 10 17:54:53 CST 2018]; root of context hierarchy
+2018-10-10 17:55:03:304 [11493 ms] INFO  [eptionResolver.initExceptionHandlerAdviceCache:273] ---- Detected @ExceptionHandler methods in exceptionHandlerAdvice
+2018-10-10 17:55:03:759 [11948 ms] INFO  [    o.s.s.web.DefaultSecurityFilterChain.<init>:43] ---- Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@507f7cd1, org.springframework.security.web.context.SecurityContextPersistenceFilter@26be0d23, org.springframework.security.web.header.HeaderWriterFilter@6c7f804c, org.springframework.web.filter.CorsFilter@349996a6, org.springframework.security.web.authentication.logout.LogoutFilter@397dfbe8, com.uas.eis.core.filter.JWTLoginFilter@78aa1753, com.uas.eis.core.filter.JWTAuthenticationFilter@67292fc7, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@2560a7be, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@67823972, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@4c1b4e07, org.springframework.security.web.session.SessionManagementFilter@259aec72, org.springframework.security.web.access.ExceptionTranslationFilter@79fc4e99, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@654c2f81]
+2018-10-10 17:55:04:578 [12767 ms] INFO  [ationMBeanExporter.afterSingletonsInstantiated:431] ---- Registering beans for JMX exposure on startup
+2018-10-10 17:55:04:621 [12810 ms] INFO  [       o.a.coyote.http11.Http11NioProtocol.log:180] ---- Initializing ProtocolHandler ["http-nio-8008"]
+2018-10-10 17:55:04:664 [12853 ms] INFO  [       o.a.coyote.http11.Http11NioProtocol.log:180] ---- Starting ProtocolHandler ["http-nio-8008"]
+2018-10-10 17:55:04:679 [12868 ms] INFO  [       o.a.tomcat.util.net.NioSelectorPool.log:180] ---- Using a shared selector for servlet write/read
+2018-10-10 17:55:04:736 [12925 ms] INFO  [s.b.c.e.t.TomcatEmbeddedServletContainer.start:201] ---- Tomcat started on port(s): 8008 (http)
+2018-10-10 17:55:04:742 [12931 ms] INFO  [       com.uas.eis.UasApiApplication.logStarted:57] ---- Started UasApiApplication in 12.511 seconds (JVM running for 13.224)
+2018-10-10 17:57:30:982 [159171 ms] INFO  [            o.a.c.c.C.[.[localhost].[/API].log:180] ---- Initializing Spring FrameworkServlet 'dispatcherServlet'
+2018-10-10 17:57:30:982 [159171 ms] INFO  [.web.servlet.DispatcherServlet.initServletBean:489] ---- FrameworkServlet 'dispatcherServlet': initialization started
+2018-10-10 17:57:31:036 [159225 ms] INFO  [.web.servlet.DispatcherServlet.initServletBean:508] ---- FrameworkServlet 'dispatcherServlet': initialization completed in 54 ms
+2018-10-10 17:57:31:132 [159321 ms] INFO  [       c.uas.eis.controller.UserController.test:47] ---- msg

+ 131 - 0
logs/log.log

@@ -0,0 +1,131 @@
+2018-11-13 15:24:19:148 [1379 ms] INFO  [      com.uas.eis.UasApiApplication.logStarting:48] ---- Starting UasApiApplication on weixx-pc with PID 536 (E:\workspace2\uas-eis\eis-api\target\classes started by Administrator in E:\workspace2\uas-eis)
+2018-11-13 15:24:19:173 [1404 ms] INFO  [as.eis.UasApiApplication.logStartupProfileInfo:593] ---- No active profile set, falling back to default profiles: default
+2018-11-13 15:24:19:303 [1534 ms] INFO  [igEmbeddedWebApplicationContext.prepareRefresh:583] ---- Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7e4204e2: startup date [Tue Nov 13 15:24:19 CST 2018]; root of context hierarchy
+2018-11-13 15:24:20:012 [2243 ms] INFO  [   o.h.validator.internal.util.Version.<clinit>:30] ---- HV000001: Hibernate Validator 5.3.6.Final
+2018-11-13 15:24:20:454 [2685 ms] INFO  [ConfigurationClassParser.processPropertySource:458] ---- Properties location [classpath:/config/token.properties] not resolvable: class path resource [config/token.properties] cannot be opened because it does not exist
+2018-11-13 15:24:20:454 [2685 ms] INFO  [ConfigurationClassParser.processPropertySource:458] ---- Properties location [classpath:/config/abc.properties] not resolvable: class path resource [config/abc.properties] cannot be opened because it does not exist
+2018-11-13 15:24:21:040 [3271 ms] INFO  [     c.alibaba.druid.pool.DruidDataSource.init:715] ---- {dataSource-1} inited
+2018-11-13 15:24:22:137 [4368 ms] ERROR [     c.alibaba.druid.pool.DruidDataSource.run:2001] ---- create connection error, url: jdbc:oracle:thin:@127.0.0.1:1521:orcl, errorCode 17002, state 08006
+java.sql.SQLRecoverableException: IO 错误: The Network Adapter could not establish the connection
+	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:673)
+	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:715)
+	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:385)
+	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
+	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:564)
+	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1421)
+	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1477)
+	at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1998)
+Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
+	at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:445)
+	at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:464)
+	at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:594)
+	at oracle.net.ns.NSProtocol.connect(NSProtocol.java:229)
+	at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1360)
+	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:486)
+	... 7 common frames omitted
+Caused by: java.net.ConnectException: Connection refused: connect
+	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
+	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
+	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
+	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
+	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
+	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
+	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
+	at java.net.Socket.connect(Socket.java:589)
+	at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:162)
+	at oracle.net.nt.ConnOption.connect(ConnOption.java:133)
+	at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:411)
+	... 12 common frames omitted
+2018-11-13 15:24:23:145 [5376 ms] ERROR [     c.alibaba.druid.pool.DruidDataSource.run:2001] ---- create connection error, url: jdbc:oracle:thin:@127.0.0.1:1521:orcl, errorCode 17002, state 08006
+java.sql.SQLRecoverableException: IO 错误: The Network Adapter could not establish the connection
+	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:673)
+	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:715)
+	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:385)
+	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
+	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:564)
+	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1421)
+	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1477)
+	at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1998)
+Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
+	at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:445)
+	at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:464)
+	at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:594)
+	at oracle.net.ns.NSProtocol.connect(NSProtocol.java:229)
+	at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1360)
+	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:486)
+	... 7 common frames omitted
+Caused by: java.net.ConnectException: Connection refused: connect
+	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
+	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
+	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
+	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
+	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
+	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
+	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
+	at java.net.Socket.connect(Socket.java:589)
+	at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:162)
+	at oracle.net.nt.ConnOption.connect(ConnOption.java:133)
+	at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:411)
+	... 12 common frames omitted
+2018-11-13 15:24:24:155 [6386 ms] ERROR [     c.alibaba.druid.pool.DruidDataSource.run:2001] ---- create connection error, url: jdbc:oracle:thin:@127.0.0.1:1521:orcl, errorCode 17002, state 08006
+java.sql.SQLRecoverableException: IO 错误: The Network Adapter could not establish the connection
+	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:673)
+	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:715)
+	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:385)
+	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
+	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:564)
+	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1421)
+	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1477)
+	at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1998)
+Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
+	at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:445)
+	at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:464)
+	at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:594)
+	at oracle.net.ns.NSProtocol.connect(NSProtocol.java:229)
+	at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1360)
+	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:486)
+	... 7 common frames omitted
+Caused by: java.net.ConnectException: Connection refused: connect
+	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
+	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
+	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
+	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
+	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
+	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
+	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
+	at java.net.Socket.connect(Socket.java:589)
+	at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:162)
+	at oracle.net.nt.ConnOption.connect(ConnOption.java:133)
+	at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:411)
+	... 12 common frames omitted
+2018-11-13 15:24:25:165 [7396 ms] ERROR [     c.alibaba.druid.pool.DruidDataSource.run:2001] ---- create connection error, url: jdbc:oracle:thin:@127.0.0.1:1521:orcl, errorCode 17002, state 08006
+java.sql.SQLRecoverableException: IO 错误: The Network Adapter could not establish the connection
+	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:673)
+	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:715)
+	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:385)
+	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
+	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:564)
+	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1421)
+	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1477)
+	at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1998)
+Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
+	at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:445)
+	at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:464)
+	at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:594)
+	at oracle.net.ns.NSProtocol.connect(NSProtocol.java:229)
+	at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1360)
+	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:486)
+	... 7 common frames omitted
+Caused by: java.net.ConnectException: Connection refused: connect
+	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
+	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
+	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
+	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
+	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
+	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
+	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
+	at java.net.Socket.connect(Socket.java:589)
+	at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:162)
+	at oracle.net.nt.ConnOption.connect(ConnOption.java:133)
+	at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:411)
+	... 12 common frames omitted

TEMPAT SAMPAH
out/artifacts/eis_api_jar/accessors-smart-1.1.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/android-json-0.0.20131108.vaadin1.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/antlr-2.7.7.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/asm-5.0.3.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/aspectjweaver-1.8.13.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/assertj-core-2.6.0.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/classmate-1.3.1.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/commons-beanutils-1.8.0.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/commons-codec-1.10.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/commons-collections-3.2.1.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/commons-lang-2.5.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/commons-logging-1.1.1.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/dom4j-1.6.1.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/druid-1.0.26.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/eis-api.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/ezmorph-1.0.6.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/fastjson-1.2.15.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/flexjson-2.1.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/hamcrest-core-1.3.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/hamcrest-library-1.3.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/hibernate-commons-annotations-5.0.1.Final.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/hibernate-core-5.0.12.Final.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/hibernate-entitymanager-5.0.12.Final.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/hibernate-jpa-2.1-api-1.0.0.Final.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/hibernate-validator-5.3.6.Final.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/httpclient-4.5.5.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/httpcore-4.4.9.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/httpmime-4.5.5.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/jackson-annotations-2.8.0.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/jackson-core-2.8.10.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/jackson-core-asl-1.9.13.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/jackson-databind-2.8.10.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/jackson-mapper-asl-1.9.13.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/jandex-2.0.0.Final.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/javassist-3.18.1-GA.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/javax.transaction-api-1.2.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/jboss-logging-3.3.0.Final.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/jcl-over-slf4j-1.7.25.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/jconsole.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/jjwt-0.6.0.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/json-lib-2.4-jdk15.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/json-path-2.2.0.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/json-smart-2.2.1.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/jsonassert-1.4.0.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/jul-to-slf4j-1.7.25.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/junit-4.12.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/log4j-over-slf4j-1.7.25.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/logback-classic-1.1.11.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/logback-core-1.1.11.jar


TEMPAT SAMPAH
out/artifacts/eis_api_jar/mockito-core-1.10.19.jar


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini