Pu Zhibing
2025-04-18 f87ad18f9c3175cee155c4f0c06302369ec7ea9d
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingPileController.java
@@ -264,8 +264,13 @@
            tChargingGun1.setId(tChargingGun.getId());
            tChargingGun1.setStatus(2);
            chargingGunService.updateById(tChargingGun1);
            //推送状态给三方平台
            tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), tChargingGun1.getStatus());
            new Thread(new Runnable() {
               @Override
               public void run() {
                  //推送状态给三方平台
                  tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), tChargingGun1.getStatus());
               }
            }).start();
            
            if(chargingPile.getStatus() != 1){
               TChargingPile chargingPile1 = new TChargingPile();
@@ -287,8 +292,13 @@
            tChargingGun1.setId(tChargingGun.getId());
            tChargingGun1.setStatus(7);
            chargingGunService.updateById(tChargingGun1);
            //推送状态给三方平台
            tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), tChargingGun1.getStatus());
            new Thread(new Runnable() {
               @Override
               public void run() {
                  //推送状态给三方平台
                  tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), tChargingGun1.getStatus());
               }
            }).start();
            
            //桩处于正常,桩所属的枪都处于非正常,修改桩状态为异常
            List<TChargingGun> list = chargingGunService.list(new LambdaQueryWrapper<TChargingGun>().eq(TChargingGun::getChargingPileId, chargingPile.getId()).eq(TChargingGun::getDelFlag, 0));
@@ -335,15 +345,25 @@
                  tChargingGun1.setId(tChargingGun.getId());
                  chargingGunService.updateById(tChargingGun1);
               }
               //推送状态给三方平台
               tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), tChargingGun1.getStatus());
               new Thread(new Runnable() {
                  @Override
                  public void run() {
                     //推送状态给三方平台
                     tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), tChargingGun1.getStatus());
                  }
               }).start();
            }else{
               TChargingGun tChargingGun1 = new TChargingGun();
               tChargingGun1.setId(tChargingGun.getId());
               tChargingGun1.setStatus(3);
               chargingGunService.updateById(tChargingGun1);
               //推送状态给三方平台
               tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), tChargingGun1.getStatus());
               new Thread(new Runnable() {
                  @Override
                  public void run() {
                     //推送状态给三方平台
                     tcecClient.pushChargingGunStatus(tChargingGun.getFullNumber(), tChargingGun1.getStatus());
                  }
               }).start();
            }
            
            List<TFaultMessage> list = faultMessageService.list(new LambdaQueryWrapper<TFaultMessage>().eq(TFaultMessage::getChargingGunId, tChargingGun.getId())