Browse Source

Merge remote-tracking branch 'origin/yunding' into yunding

luhg 7 years ago
parent
commit
adf459629e

+ 23 - 1
src/main/java/com/uas/eis/serviceImpl/StockServiceImpl.java

@@ -185,7 +185,7 @@ public class StockServiceImpl implements StockService{
 
     private Map<String,Object> getMainData(Integer id){
         Map<String,Object> data = new HashMap<>();
-        SqlRowSet rs = baseDao.getJdbcTemplate().queryForRowSet("select pi_id,pi_class,pi_inoutno,pi_whcode,pi_purpose,pi_remark from prodinout where pi_id=" + id);
+        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");
@@ -195,6 +195,11 @@ public class StockServiceImpl implements StockService{
             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;
@@ -254,6 +259,23 @@ public class StockServiceImpl implements StockService{
         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){

+ 1 - 1
src/main/java/com/uas/eis/task/StockTask.java

@@ -14,7 +14,7 @@ public class StockTask {
     @Autowired
     StockService stockService;
 
-    @Scheduled(cron = "0 0/3 * * * ?")
+    @Scheduled(cron = "0 0/1 * * * ?")
     public void autoPost() {
         stockService.autoPost(); //出入库定时过账
     }

+ 8 - 3
src/main/resources/application.yml

@@ -2,11 +2,16 @@ spring:
     datasource:
         type: org.apache.tomcat.jdbc.pool.DataSource
         driverClassName: oracle.jdbc.OracleDriver
+        url: jdbc:oracle:thin:@scope2015.oicp.net:1521:orcl
         username: yd_test
         password: select!#%@$^
-        url: jdbc:oracle:thin:@scope2015.oicp.net:1521:orcl
-        max-wait: 10000
-        max-active: 50
+        initial-size: 10
+        max-active: 80
+        min-idle: 10
+        max-wait: 60000
+        test-on-borrow: false
+        test-on-return: false
+        test-while-idle: true
         tomcat:
           time-between-eviction-runs-millis: 30000
           min-evictable-idle-time-millis: 30000