Sfoglia il codice sorgente

Merge branch 'master' of http://47.108.172.52:3000/dayou/item-management-1phase

GouGengquan 6 mesi fa
parent
commit
2d6978c826

+ 6 - 2
service/src/main/java/com/dayou/service/impl/MajorProductionServiceImpl.java

@@ -510,10 +510,14 @@ public class MajorProductionServiceImpl extends ServiceImpl<MajorProductionMappe
                         majorProduction.setSecondCheck(ReportStatus.待审核.name());
                         majorProduction.setThirdCheck(ReportStatus.待审核.name());
                     }else{
-                        if (evaluateAmount.compareTo(EVALUATE_MAX)<=0){
+                        if (evaluateAmount.compareTo(EVALUATE_MIN)<=0){
+                            majorProduction.setSecondCheck(ReportStatus.不审.name());
+                            majorProduction.setThirdCheck(ReportStatus.不审.name());
+                        }else if (evaluateAmount.compareTo(EVALUATE_MAX)<=0
+                                && evaluateAmount.compareTo(EVALUATE_MIN)>0){
                             majorProduction.setSecondCheck(ReportStatus.待审核.name());
                             majorProduction.setThirdCheck(ReportStatus.不审.name());
-                        }else{
+                        }else {
                             majorProduction.setSecondCheck(ReportStatus.待审核.name());
                             majorProduction.setThirdCheck(ReportStatus.待审核.name());
                         }

+ 11 - 7
service/src/main/java/com/dayou/websocket/WebSocketServer.java

@@ -44,13 +44,17 @@ public class WebSocketServer {
     @OnOpen
     public void onOpen(Session session, EndpointConfig config){
         HttpSession httpSession = (HttpSession) config.getUserProperties().get(HttpSession.class.getName());
-        key = String.valueOf(httpSession.getAttribute(USER_ID));
-        this.session = session;
-        System.out.println("当前登录用户id:" + key);
-        atomicInteger.incrementAndGet();
-        System.out.println("建立连接成功 onOpen 线程数量:"+atomicInteger.get()+" sessionID:"+ key);
-        System.out.println("当前socket连接数量:" + webSocketMap.size());
-        webSocketMap.put(key,this);
+        Object attribute = httpSession.getAttribute(USER_ID);
+        if (attribute != null) {
+            key = String.valueOf(attribute);
+            this.session = session;
+            System.out.println("当前登录用户id:" + key);
+            atomicInteger.incrementAndGet();
+            System.out.println("建立连接成功 onOpen 线程数量:"+atomicInteger.get()+" sessionID:"+ key);
+            System.out.println("当前socket连接数量:" + webSocketMap.size());
+            webSocketMap.put(key,this);
+        }
+
     }
 
     /**