xushili 2 лет назад
Родитель
Сommit
6d4160dcfb
14 измененных файлов с 666 добавлено и 10 удалено
  1. 16 0
      gyee-sample-impala/src/main/java/com/gyee/impala/mapper/gdoa/EqQxjcljlMapper.java
  2. 16 0
      gyee-sample-impala/src/main/java/com/gyee/impala/mapper/master/CasefaultrepairMapper.java
  3. 249 0
      gyee-sample-impala/src/main/java/com/gyee/impala/model/gdoa/EqQxjcljl.java
  4. 169 0
      gyee-sample-impala/src/main/java/com/gyee/impala/model/master/Casefaultrepair.java
  5. 19 0
      gyee-sample-impala/src/main/java/com/gyee/impala/model/master/ICasefaultrepairService.java
  6. 1 0
      gyee-sample-impala/src/main/java/com/gyee/impala/model/master/Windspeedforecastspshortterm.java
  7. 3 2
      gyee-sample-impala/src/main/java/com/gyee/impala/schdule/TaskCasefaultReplenish.java
  8. 80 0
      gyee-sample-impala/src/main/java/com/gyee/impala/schdule/TaskEQInspect.java
  9. 3 4
      gyee-sample-impala/src/main/java/com/gyee/impala/schdule/TaskWindspeedForecast.java
  10. 16 0
      gyee-sample-impala/src/main/java/com/gyee/impala/service/gdoa/IEqQxjcljlService.java
  11. 20 0
      gyee-sample-impala/src/main/java/com/gyee/impala/service/impl/gdoa/EqQxjcljlServiceImpl.java
  12. 70 0
      gyee-sample-impala/src/main/java/com/gyee/impala/service/impl/master/CasefaultrepairServiceImpl.java
  13. 1 2
      gyee-sample-impala/src/main/java/com/gyee/impala/service/impl/master/WindspeedforecastshorttermServiceImpl.java
  14. 3 2
      gyee-sample-impala/src/main/java/com/gyee/impala/service/impl/master/WindspeedforecastspshorttermServiceImpl.java

+ 16 - 0
gyee-sample-impala/src/main/java/com/gyee/impala/mapper/gdoa/EqQxjcljlMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.impala.mapper.gdoa;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.impala.model.gdoa.EqQxjcljl;
+
+/**
+ * <p>
+ * 缺陷及处理记录 Mapper 接口
+ * </p>
+ *
+ * @author gfhd
+ * @since 2022-10-13
+ */
+public interface EqQxjcljlMapper extends BaseMapper<EqQxjcljl> {
+
+}

+ 16 - 0
gyee-sample-impala/src/main/java/com/gyee/impala/mapper/master/CasefaultrepairMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.impala.mapper.master;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.impala.model.master.Casefaultrepair;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author gfhd
+ * @since 2022-10-13
+ */
+public interface CasefaultrepairMapper extends BaseMapper<Casefaultrepair> {
+
+}

+ 249 - 0
gyee-sample-impala/src/main/java/com/gyee/impala/model/gdoa/EqQxjcljl.java

@@ -0,0 +1,249 @@
+package com.gyee.impala.model.gdoa;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 缺陷及处理记录
+ * </p>
+ *
+ * @author gfhd
+ * @since 2022-10-13
+ */
+@TableName("EQ_QXJCLJL")
+public class EqQxjcljl implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * SNO
+     */
+    private String sno;
+
+    /**
+     * PSNO
+     */
+    private String psno;
+
+    /**
+     * 缺陷名称
+     */
+    private String qxname;
+
+    /**
+     * 设备名称
+     */
+    private String equipmentName;
+
+    /**
+     * 管辖部门
+     */
+    private String useDept;
+
+    /**
+     * 故障描述
+     */
+    private String describe;
+
+    /**
+     * 发现人
+     */
+    private String find;
+
+    /**
+     * 发现时间
+     */
+    private String finddate;
+
+    /**
+     * 处理人
+     */
+    private String dealing;
+
+    /**
+     * 缺陷原因
+     */
+    private String cause;
+
+    /**
+     * 结束时间
+     */
+    private String enddate;
+
+    /**
+     * 处理过程
+     */
+    private String clgc;
+
+    /**
+     * 备件更换情况
+     */
+    private String bjghqk;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 备品备件ID
+     */
+    private String bpbjId;
+
+    /**
+     * 备品备件名称
+     */
+    private String bpbjName;
+
+    public String getSno() {
+        return sno;
+    }
+
+    public void setSno(String sno) {
+        this.sno = sno;
+    }
+
+    public String getPsno() {
+        return psno;
+    }
+
+    public void setPsno(String psno) {
+        this.psno = psno;
+    }
+
+    public String getQxname() {
+        return qxname;
+    }
+
+    public void setQxname(String qxname) {
+        this.qxname = qxname;
+    }
+
+    public String getEquipmentName() {
+        return equipmentName;
+    }
+
+    public void setEquipmentName(String equipmentName) {
+        this.equipmentName = equipmentName;
+    }
+
+    public String getUseDept() {
+        return useDept;
+    }
+
+    public void setUseDept(String useDept) {
+        this.useDept = useDept;
+    }
+
+    public String getDescribe() {
+        return describe;
+    }
+
+    public void setDescribe(String describe) {
+        this.describe = describe;
+    }
+
+    public String getFind() {
+        return find;
+    }
+
+    public void setFind(String find) {
+        this.find = find;
+    }
+
+    public String getFinddate() {
+        return finddate;
+    }
+
+    public void setFinddate(String finddate) {
+        this.finddate = finddate;
+    }
+
+    public String getDealing() {
+        return dealing;
+    }
+
+    public void setDealing(String dealing) {
+        this.dealing = dealing;
+    }
+
+    public String getCause() {
+        return cause;
+    }
+
+    public void setCause(String cause) {
+        this.cause = cause;
+    }
+
+    public String getEnddate() {
+        return enddate;
+    }
+
+    public void setEnddate(String enddate) {
+        this.enddate = enddate;
+    }
+
+    public String getClgc() {
+        return clgc;
+    }
+
+    public void setClgc(String clgc) {
+        this.clgc = clgc;
+    }
+
+    public String getBjghqk() {
+        return bjghqk;
+    }
+
+    public void setBjghqk(String bjghqk) {
+        this.bjghqk = bjghqk;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getBpbjId() {
+        return bpbjId;
+    }
+
+    public void setBpbjId(String bpbjId) {
+        this.bpbjId = bpbjId;
+    }
+
+    public String getBpbjName() {
+        return bpbjName;
+    }
+
+    public void setBpbjName(String bpbjName) {
+        this.bpbjName = bpbjName;
+    }
+
+    @Override
+    public String toString() {
+        return "EqQxjcljl{" +
+            "sno = " + sno +
+            ", psno = " + psno +
+            ", qxname = " + qxname +
+            ", equipmentName = " + equipmentName +
+            ", useDept = " + useDept +
+            ", describe = " + describe +
+            ", find = " + find +
+            ", finddate = " + finddate +
+            ", dealing = " + dealing +
+            ", cause = " + cause +
+            ", enddate = " + enddate +
+            ", clgc = " + clgc +
+            ", bjghqk = " + bjghqk +
+            ", remark = " + remark +
+            ", bpbjId = " + bpbjId +
+            ", bpbjName = " + bpbjName +
+        "}";
+    }
+}

+ 169 - 0
gyee-sample-impala/src/main/java/com/gyee/impala/model/master/Casefaultrepair.java

@@ -0,0 +1,169 @@
+package com.gyee.impala.model.master;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gfhd
+ * @since 2022-10-13
+ */
+public class Casefaultrepair implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    private String stationid;
+
+    private String stationname;
+
+    private String windturbineid;
+
+    private String windturbinename;
+
+    private String modelid;
+
+    private String faulttypename;
+
+    private String faulttypecode;
+
+    private String starttime;
+
+    private String endtime;
+
+    private String faultreason;
+
+    private String treatprocesses;
+
+    private String sparepartsreplacement;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getStationid() {
+        return stationid;
+    }
+
+    public void setStationid(String stationid) {
+        this.stationid = stationid;
+    }
+
+    public String getStationname() {
+        return stationname;
+    }
+
+    public void setStationname(String stationname) {
+        this.stationname = stationname;
+    }
+
+    public String getWindturbineid() {
+        return windturbineid;
+    }
+
+    public void setWindturbineid(String windturbineid) {
+        this.windturbineid = windturbineid;
+    }
+
+    public String getWindturbinename() {
+        return windturbinename;
+    }
+
+    public void setWindturbinename(String windturbinename) {
+        this.windturbinename = windturbinename;
+    }
+
+    public String getModelid() {
+        return modelid;
+    }
+
+    public void setModelid(String modelid) {
+        this.modelid = modelid;
+    }
+
+    public String getFaulttypename() {
+        return faulttypename;
+    }
+
+    public void setFaulttypename(String faulttypename) {
+        this.faulttypename = faulttypename;
+    }
+
+    public String getFaulttypecode() {
+        return faulttypecode;
+    }
+
+    public void setFaulttypecode(String faulttypecode) {
+        this.faulttypecode = faulttypecode;
+    }
+
+    public String getStarttime() {
+        return starttime;
+    }
+
+    public void setStarttime(String starttime) {
+        this.starttime = starttime;
+    }
+
+    public String getEndtime() {
+        return endtime;
+    }
+
+    public void setEndtime(String endtime) {
+        this.endtime = endtime;
+    }
+
+    public String getFaultreason() {
+        return faultreason;
+    }
+
+    public void setFaultreason(String faultreason) {
+        this.faultreason = faultreason;
+    }
+
+    public String getTreatprocesses() {
+        return treatprocesses;
+    }
+
+    public void setTreatprocesses(String treatprocesses) {
+        this.treatprocesses = treatprocesses;
+    }
+
+    public String getSparepartsreplacement() {
+        return sparepartsreplacement;
+    }
+
+    public void setSparepartsreplacement(String sparepartsreplacement) {
+        this.sparepartsreplacement = sparepartsreplacement;
+    }
+
+    @Override
+    public String toString() {
+        return "Casefaultrepair{" +
+            "id = " + id +
+            ", stationid = " + stationid +
+            ", stationname = " + stationname +
+            ", windturbineid = " + windturbineid +
+            ", windturbinename = " + windturbinename +
+            ", modelid = " + modelid +
+            ", faulttypename = " + faulttypename +
+            ", faulttypecode = " + faulttypecode +
+            ", starttime = " + starttime +
+            ", endtime = " + endtime +
+            ", faultreason = " + faultreason +
+            ", treatprocesses = " + treatprocesses +
+            ", sparepartsreplacement = " + sparepartsreplacement +
+        "}";
+    }
+}

+ 19 - 0
gyee-sample-impala/src/main/java/com/gyee/impala/model/master/ICasefaultrepairService.java

@@ -0,0 +1,19 @@
+package com.gyee.impala.model.master;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.apache.kudu.client.KuduException;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author gfhd
+ * @since 2022-10-13
+ */
+public interface ICasefaultrepairService extends IService<Casefaultrepair> {
+
+    void insertBatch(List<Casefaultrepair> list) throws KuduException;
+}

+ 1 - 0
gyee-sample-impala/src/main/java/com/gyee/impala/model/master/Windspeedforecastspshortterm.java

@@ -18,6 +18,7 @@ import java.util.Date;
 public class Windspeedforecastspshortterm implements Serializable {
 
     private static final long serialVersionUID = 1L;
+
     @TableId(type = IdType.AUTO)
     private Long id;
 

+ 3 - 2
gyee-sample-impala/src/main/java/com/gyee/impala/schdule/TaskCasefaultReplenish.java

@@ -15,12 +15,10 @@ import com.gyee.impala.model.slave.Windturbinetestingpointai2;
 import com.gyee.impala.service.master.CasefaultService;
 import com.gyee.impala.service.master.CasefaultalgService;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.time.DateUtils;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
-import java.text.ParseException;
 import java.util.*;
 import java.util.concurrent.TimeUnit;
 import java.util.function.Function;
@@ -43,6 +41,9 @@ public class TaskCasefaultReplenish {
     @Resource
     private RemoteServiceBuilder remoteServiceBuilder;
 
+    /**
+     * 计算故障解除时间和故障时长
+     */
     @Scheduled(cron = "0 15 3 * * ?")
     public void creatEndtime(){
         Calendar instance = Calendar.getInstance();

+ 80 - 0
gyee-sample-impala/src/main/java/com/gyee/impala/schdule/TaskEQInspect.java

@@ -1,10 +1,23 @@
 package com.gyee.impala.schdule;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.impala.common.spring.InitialRunner;
+import com.gyee.impala.model.gdoa.EqQxjcljl;
+import com.gyee.impala.model.master.Casefaultrepair;
+import com.gyee.impala.model.master.ICasefaultrepairService;
+import com.gyee.impala.model.master.Knowcategory;
+import com.gyee.impala.model.master.Windturbine;
+import com.gyee.impala.service.gdoa.IEqQxjcljlService;
 import com.gyee.impala.service.master.KnowinspectService;
+import org.apache.kudu.client.KuduException;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 来自国电oa的设备检修数据同步至kudu样本库
@@ -14,6 +27,12 @@ public class TaskEQInspect {
 
     @Resource
     private KnowinspectService knowinspectService;
+    @Resource
+    private IEqQxjcljlService iEqQxjcljlService;
+    @Resource
+    private ICasefaultrepairService casefaultrepairService;
+    //故障类型
+    private Map<String,String> gzlx;
 
     /**
      * 每周六一点执行一次
@@ -23,4 +42,65 @@ public class TaskEQInspect {
         String time = knowinspectService.selectMaxTime();
         knowinspectService.insertBatch(time);
     }
+    /**
+     * 每周六一点半执行一次
+     */
+    @Scheduled(cron = "0 30 1 ? * 6")
+    public void caseFaultRepair(){
+        QueryWrapper<EqQxjcljl> wrapper = new QueryWrapper<>();
+        wrapper.notLike("USE_DEPT", "光伏");
+        List<EqQxjcljl> list = iEqQxjcljlService.list(wrapper);
+        List<Casefaultrepair> casefaultrepairs = new ArrayList<>();
+        for (EqQxjcljl eqxjcljl : list) {
+            Casefaultrepair cfr = new Casefaultrepair();
+            String stid = InitialRunner.stationenMap.get(eqxjcljl.getUseDept());
+            cfr.setStationid(stid);
+            cfr.setStationname(eqxjcljl.getUseDept());
+            String wtId = getWtId(stid, eqxjcljl.getEquipmentName());
+            cfr.setWindturbineid(wtId);
+            Windturbine windturbine = InitialRunner.wtMap.get(wtId);
+            if(windturbine==null||windturbine.getName()==null) continue;
+            cfr.setWindturbinename(windturbine.getName());
+            cfr.setModelid(windturbine.getModel());
+            String ftc = getFaultType(eqxjcljl.getQxname());
+            cfr.setFaulttypecode(ftc);
+            cfr.setFaulttypename(InitialRunner.faultTypeMap.get(ftc));
+            cfr.setStarttime(eqxjcljl.getFinddate());
+            cfr.setEndtime(eqxjcljl.getEnddate());
+            cfr.setFaultreason(eqxjcljl.getCause());
+            cfr.setTreatprocesses(eqxjcljl.getClgc());
+            cfr.setSparepartsreplacement(eqxjcljl.getBjghqk());
+            casefaultrepairs.add(cfr);
+        }
+        try {
+            casefaultrepairService.insertBatch(casefaultrepairs);
+        } catch (KuduException e) {
+            e.printStackTrace();
+        }
+    }
+
+    private String getFaultType(String qxname) {
+        if(gzlx==null ||gzlx.size()==0){
+            gzlx = new HashMap<>();
+            for (Knowcategory knowcategory : InitialRunner.faultTypeList) {
+                gzlx.put(knowcategory.getName().replace("系统故障","")
+                        .replace("类故障","")
+                        .replace("故障",""), knowcategory.getCode());
+            }
+        }
+        for (String s : gzlx.keySet()) {
+            if(qxname.contains(s)){
+                return gzlx.get(s);
+            }
+        }
+        return "QT";
+    }
+
+    private String getWtId(String stid, String equipmentName) {
+        if(stid==null||equipmentName==null) return null;
+        String fj = equipmentName.replace("#", "").replace("风机", "");
+        fj = fj.length() > 1 ? fj : "0" + fj;
+        return stid.charAt(0)+"G01_"+fj;
+    }
+
 }

+ 3 - 4
gyee-sample-impala/src/main/java/com/gyee/impala/schdule/TaskWindspeedForecast.java

@@ -342,7 +342,7 @@ public class TaskWindspeedForecast {
     }
 
     @SneakyThrows
-    //@Scheduled(cron = "0 */30 * * * ?")
+    @Scheduled(cron = "0 45 2 * * ?")
     //超短期
     public void specialShortTerm() {
 
@@ -643,8 +643,8 @@ public class TaskWindspeedForecast {
     }
 
 
-    @Scheduled(cron = "0 43 16 * * ?")
-    //去年同期
+    //@Scheduled(cron = "0 43 16 * * ?")
+    //去年同期数据
     public void qntqTerm() throws KuduException {
         Date date1 = DateUtil.str2DateTime("2021-08-01 00:00:00");
         Date date2 = DateUtil.str2DateTime("2021-10-31 59:59:00");
@@ -730,7 +730,6 @@ public class TaskWindspeedForecast {
 
         return wsfcsts;
     }
-
     public List<WfStatPeriodData> getWfStatPeriodDatas2(Date time,Date time2) {
         QueryWrapper<WfStatPeriodData> wrapper = new QueryWrapper();
         wrapper.between("DATA_TIME", time,time2)

+ 16 - 0
gyee-sample-impala/src/main/java/com/gyee/impala/service/gdoa/IEqQxjcljlService.java

@@ -0,0 +1,16 @@
+package com.gyee.impala.service.gdoa;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gyee.impala.model.gdoa.EqQxjcljl;
+
+/**
+ * <p>
+ * 缺陷及处理记录 服务类
+ * </p>
+ *
+ * @author gfhd
+ * @since 2022-10-13
+ */
+public interface IEqQxjcljlService extends IService<EqQxjcljl> {
+
+}

+ 20 - 0
gyee-sample-impala/src/main/java/com/gyee/impala/service/impl/gdoa/EqQxjcljlServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.impala.service.impl.gdoa;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.impala.mapper.gdoa.EqQxjcljlMapper;
+import com.gyee.impala.model.gdoa.EqQxjcljl;
+import com.gyee.impala.service.gdoa.IEqQxjcljlService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 缺陷及处理记录 服务实现类
+ * </p>
+ *
+ * @author gfhd
+ * @since 2022-10-13
+ */
+@Service
+public class EqQxjcljlServiceImpl extends ServiceImpl<EqQxjcljlMapper, EqQxjcljl> implements IEqQxjcljlService {
+
+}

+ 70 - 0
gyee-sample-impala/src/main/java/com/gyee/impala/service/impl/master/CasefaultrepairServiceImpl.java

@@ -0,0 +1,70 @@
+package com.gyee.impala.service.impl.master;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.impala.common.config.datasource.KuduDataSourceConfig;
+import com.gyee.impala.common.util.SnowFlakeUtil;
+import com.gyee.impala.mapper.master.CasefaultrepairMapper;
+import com.gyee.impala.model.master.Casefaultrepair;
+import com.gyee.impala.model.master.ICasefaultrepairService;
+import org.apache.kudu.client.*;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author gfhd
+ * @since 2022-10-13
+ */
+@Service
+public class CasefaultrepairServiceImpl extends ServiceImpl<CasefaultrepairMapper, Casefaultrepair> implements ICasefaultrepairService {
+    @Resource
+    private KuduDataSourceConfig kuduConfig;
+
+    /**
+     * 由于mybatis-plus存储的中文乱码
+     * 采用原生写法
+     * @param list
+     * @return
+     */
+    @Override
+    public void insertBatch(List<Casefaultrepair> list) throws KuduException {
+        KuduTable kuduTable = kuduConfig.kuduClient.openTable("impala::gyee_sample_kudu.casefaultrepair");
+        KuduSession kuduSession = kuduConfig.kuduSession();
+        int i = 0;
+        for (Casefaultrepair boj : list){
+            Insert insert = kuduTable.newInsert();
+            // 获取Row对象,设置插入的值
+            PartialRow row = insert.getRow();
+            row.addObject("id", SnowFlakeUtil.generateIdL());
+            row.addObject("stationid", boj.getStationid());
+            row.addObject("stationname", boj.getStationname());
+            row.addObject("windturbineid", boj.getWindturbineid());
+            row.addObject("windturbinename", boj.getWindturbinename());
+            row.addObject("modelid", boj.getModelid());
+            row.addObject("faulttypename", boj.getFaulttypename());
+            row.addObject("faulttypecode", boj.getFaulttypecode());
+            row.addObject("starttime", boj.getStarttime());
+            row.addObject("endtime", boj.getEndtime());
+            row.addObject("faultreason", boj.getFaultreason());
+            row.addObject("treatprocesses", boj.getTreatprocesses());
+            row.addObject("sparepartsreplacement", boj.getSparepartsreplacement());
+
+            // 先不提交kudu
+            kuduSession.apply(insert);
+            i ++;
+            if (i % kuduConfig.getCount() == 0)
+                kuduSession.flush(); //批量写入kudu
+        }
+
+        // 最后,补加一条批量写入
+        kuduSession.flush();
+
+        // 关闭和kudu的会话
+        kuduSession.close();
+    }
+}

+ 1 - 2
gyee-sample-impala/src/main/java/com/gyee/impala/service/impl/master/WindspeedforecastshorttermServiceImpl.java

@@ -17,7 +17,6 @@ import com.gyee.impala.model.master.Windspeedforecastshortterm;
 import com.gyee.impala.model.master.Windspeedforecastspshortterm;
 import com.gyee.impala.service.master.IWindspeedforecastshorttermService;
 import org.apache.kudu.client.*;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -38,7 +37,7 @@ import java.util.stream.Collectors;
  */
 @Service
 public class WindspeedforecastshorttermServiceImpl extends ServiceImpl<WindspeedforecastshorttermMapper, Windspeedforecastshortterm> implements IWindspeedforecastshorttermService {
-    @Autowired
+    @Resource
     private KuduDataSourceConfig kuduConfig;
     @Resource
     private WindspeedforecastspshorttermMapper windspeedforecastspshorttermMapper;

+ 3 - 2
gyee-sample-impala/src/main/java/com/gyee/impala/service/impl/master/WindspeedforecastspshorttermServiceImpl.java

@@ -7,9 +7,9 @@ import com.gyee.impala.mapper.master.WindspeedforecastspshorttermMapper;
 import com.gyee.impala.model.master.Windspeedforecastspshortterm;
 import com.gyee.impala.service.master.IWindspeedforecastspshorttermService;
 import org.apache.kudu.client.*;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.util.List;
 
 /**
@@ -22,8 +22,9 @@ import java.util.List;
  */
 @Service
 public class WindspeedforecastspshorttermServiceImpl extends ServiceImpl<WindspeedforecastspshorttermMapper, Windspeedforecastspshortterm> implements IWindspeedforecastspshorttermService {
-    @Autowired
+    @Resource
     private KuduDataSourceConfig kuduConfig;
+
     /**
      * 由于mybatis-plus存储的中文乱码
      * 采用原生写法