wangchangsheng %!s(int64=3) %!d(string=hai) anos
pai
achega
002e5e7fba

+ 32 - 3
src/main/java/com/gyee/frame/service/SysUserService.java

@@ -250,7 +250,36 @@ public class SysUserService implements BaseService<TsysUser, TsysUserExample>{
 		//修改用户信息
 		return tsysUserMapper.updateByPrimaryKeySelective(record);
 	}
-	
-	
-	
+
+	/**
+	 *
+	 * @param username
+	 * @return
+	 */
+	public TsysUser findUser(String username) {
+		TsysUserExample example=new TsysUserExample();
+		example.createCriteria().andUsernameEqualTo(username);
+		List<TsysUser> list=tsysUserMapper.selectByExample(example);
+		if(null == list || list.size()<=0){
+			return null;
+		}
+		return list.get(0);
+	}
+
+	/**
+	 *
+	 * @param username
+	 * @return
+	 */
+	public TsysUser findUser(String username,String password) {
+		TsysUserExample example=new TsysUserExample();
+		example.createCriteria().andUsernameEqualTo(username);
+		example.createCriteria().andPasswordEqualTo(password);
+		List<TsysUser> list=tsysUserMapper.selectByExample(example);
+		if(null == list || list.size()<=0){
+			return null;
+		}
+		return list.get(0);
+	}
+
 }

+ 2 - 2
src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java

@@ -451,8 +451,8 @@ public class MatrixPushByWpService {
                     //限电台数
                     Double xdts = MathUtil.twoBit(jczblist.get(12).getPointValueInDouble());
                     jczbmap.put("xdts", xdts);
-
-
+                    //接入台数
+                    jczbmap.put("jrts", djts+yxts+gzts+lxts+whts+xdts);
 
                 } else {
                     //实时风速

+ 1 - 1
src/main/java/com/gyee/frame/service/websocket/MatrixPushService.java

@@ -298,7 +298,7 @@ public class MatrixPushService {
         map.put("fcxdnum", fcxdnum);
         //风场限电台数
         map.put("fcslnum", fcslnum);
-//风场受累台数
+        //风场受累台数
         double fcjrnum = fcdjnum + fcyxnum + fcgznum + fclxnum + fcwhnum + fcxdnum + fcslnum;
 
         map.put("fcjrnum", fcjrnum);

+ 75 - 5
src/main/java/com/gyee/frame/service/websocket/WpInfoPushService.java

@@ -5,15 +5,13 @@ import com.gyee.frame.common.spring.Constant;
 import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.auto.WindPowerStationTestingPoint2;
 import com.gyee.frame.model.auto.Windpowerstation;
+import com.gyee.frame.model.auto.Windturbine;
 import com.gyee.frame.model.auto.WpMttrAndMtbMonth;
 import com.gyee.frame.model.custom.DNAVal;
 import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.model.custom.PointData;
 import com.gyee.frame.model.custom.ZtjsVo;
-import com.gyee.frame.service.ProjectPlanService;
-import com.gyee.frame.service.WindPowerstationTestingPointService;
-import com.gyee.frame.service.WindpowerinfodayService;
-import com.gyee.frame.service.WpMttrAndMtbMonthService;
+import com.gyee.frame.service.*;
 import com.gyee.frame.service.weather.WeatherService;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.MathUtil;
@@ -46,6 +44,9 @@ public class WpInfoPushService {
     @Resource
     private WeatherService weatherService;
 
+    @Resource
+    private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
+
     IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
     private final double YCFDLXS = 1.08;
     String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
@@ -1217,7 +1218,7 @@ public class WpInfoPushService {
                 jczbmap.put("sjgl", sjgl);
 
 
-//待机台数
+                //待机台数
                 Double djnum = MathUtil.twoBit(jczblist.get(5).getPointValueInDouble());
                 jczbmap.put("djnum", djnum);
                 //手动停机台数
@@ -1257,6 +1258,75 @@ public class WpInfoPushService {
                 Double lxnum = MathUtil.twoBit(jczblist.get(17).getPointValueInDouble());
                 jczbmap.put("lxnum", lxnum);
 
+                /*************************************************光伏状态统计*************************************************************/
+
+                if(wp.getId().endsWith("GDC")){
+
+                    List<String> fjzbls = new ArrayList<>();
+                    List<Windturbine> wtls=InitialRunner.wp_wtmap.get(wp.getId());
+                    for(Windturbine wt:wtls) {
+
+                        //状态
+                        fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
+                    }
+                    List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
+                    if (!fjzblist.isEmpty() && fjzblist.size() == fjzbls.size()) {
+//                        double djnum=0.0;
+//                        double yxts=0.0;
+//                        double gzts=0.0;
+//                        double lxts=0.0;
+//                        double whts=0.0;
+//                        double xdts=0.0;
+//                        double slts=0.0;
+                        for(int i=0;i<wtls.size();i++){
+                            double fjzt = MathUtil.twoBit(MathUtil.twoBit(fjzblist.get(i).getPointValueInDouble()));
+                            switch (Double.valueOf(fjzt).intValue()) {
+                                case 0:
+                                    djnum++;
+                                    break;
+                                case 1:
+                                    zcfdnum++;
+                                    break;
+                                case 2:
+                                    gztjnum++;
+                                    break;
+                                case 3:
+                                    lxnum++;
+                                    break;
+                                case 4:
+                                    jxtjnum++;
+                                    break;
+                                case 5:
+                                    xdjclnum++;
+                                    break;
+                                case 6:
+                                    xdjclnum++;
+                                    break;
+
+                                default:
+
+                                    break;
+                            }
+                        }
+
+                    }
+
+                    //待机台数
+                    jczbmap.put("djnum", djnum);
+                    //正常发电台数
+                    jczbmap.put("zcfdnum", zcfdnum);
+                    // 限电降出力台数
+                    jczbmap.put("xdjclnum", xdjclnum);
+                    // 故障停机台数
+                    jczbmap.put("gztjnum", gztjnum);
+                    // 检修停机台数
+                    jczbmap.put("jxtjnum", jxtjnum);
+                    // 电网受累台数
+                    jczbmap.put("dwslnum", dwslnum);
+                    // 风机离线台数
+                    jczbmap.put("lxnum", lxnum);
+                }
+
 //
 //                double djts=djnum+sdtjnum;
 //                double yxts=zcfdnum+qxjclnum;