Bladeren bron

1、增加性能分析详情接口
2、数据导出模板2青山点修改

chenminghua 3 jaren geleden
bovenliggende
commit
ed477027dc

+ 98 - 0
src/main/java/com/gyee/frame/controller/health/ReliabilityAnalysisController.java

@@ -0,0 +1,98 @@
+package com.gyee.frame.controller.health;
+
+
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.exception.enums.QiNiuErrorEnum;
+import com.gyee.frame.common.feign.RemoteServiceBuilder;
+import com.gyee.frame.model.auto.Metrics;
+import com.gyee.frame.model.auto.MetricsUniformCode;
+import com.gyee.frame.model.auto.WindTurbineTestingPointAi2;
+import com.gyee.frame.model.auto.WindTurbineTestingPointDi2;
+import com.gyee.frame.model.custom.export.TsPointData;
+import com.gyee.frame.service.Alertrule2ervice;
+import com.gyee.frame.service.WindTurbineTestingPointAiService;
+import com.gyee.frame.service.WindTurbineTestingPointDiService;
+import com.gyee.frame.service.health.MetricsService;
+import com.gyee.frame.service.health.MetricsUniformCodeService;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/analysis")
+@Api(value = "可靠性分析" ,tags =  "可靠性分析")
+public class ReliabilityAnalysisController {
+
+    @Resource
+    private Alertrule2ervice alertrule2ervice;
+    @Resource
+    private RemoteServiceBuilder remoteService;
+    @Resource
+    private MetricsService metricsService;
+    @Resource
+    private MetricsUniformCodeService uniformCodeService;
+    @Resource
+    private WindTurbineTestingPointAiService windAIService;
+    @Resource
+    private WindTurbineTestingPointDiService windDIService;
+
+
+    /**
+     * 查询报警规则中点的数据
+     * @param station
+     * @param wtId
+     * @param name
+     * @param startTs
+     * @param endTs
+     * @return
+     */
+    @GetMapping("/detail")
+    public AjaxResult analysisDetails(
+            @RequestParam(name = "station") String station,
+            @RequestParam(name = "wtId") String wtId,
+            @RequestParam(name = "name") String name,
+            @RequestParam(name = "startTs") long startTs,
+            @RequestParam(name = "endTs") long endTs){
+
+        List<Object> list = new ArrayList<>();
+
+        List<String> codes = alertrule2ervice.getUniformCodeByNameAndStation(name, station, wtId);
+        if (codes == null || codes.size() == 0)
+            return AjaxResult.successData(AjaxStatus.success.code, list);
+
+        for (String code : codes){
+            Map<String, Object> map = new HashMap<>();
+            if (code.startsWith("AI")){
+                WindTurbineTestingPointAi2 windAI = windAIService.getWindTurbineTestingPointAi2(wtId, code);
+                List<TsPointData> data = remoteService.ShardingService().getHistorySnap(windAI.getId(), startTs, endTs, 60);
+
+                // 查询点的单位和描述属性
+                String unit = "";
+                String desc = "";
+                List<MetricsUniformCode> metricsList = uniformCodeService.getListByStationAndUniforCode(station, windAI.getUniformcode());
+                if (metricsList != null && metricsList.size() > 0) {
+                    MetricsUniformCode metricsUniformCode = metricsList.get(0);
+                    List<Metrics> metrics = metricsService.getMetricsByMetricsId(metricsUniformCode.getMetricid());
+                    if (metrics != null && metrics.size() > 0){
+                        unit = metrics.get(0).getUnitname();
+                        desc = metrics.get(1).getMetricname();
+                    }
+                }
+                map.put("unit", unit);
+                map.put("name", desc);
+                map.put("data", data);
+
+                list.add(map);
+            }
+        }
+
+        return AjaxResult.successData(AjaxStatus.success.code, list);
+    }
+
+}

+ 96 - 0
src/main/java/com/gyee/frame/mapper/auto/MetricsMapper.java

@@ -0,0 +1,96 @@
+package com.gyee.frame.mapper.auto;
+
+import com.gyee.frame.model.auto.Metrics;
+import com.gyee.frame.model.auto.MetricsExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface MetricsMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS
+     *
+     * @mbg.generated
+     */
+    long countByExample(MetricsExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS
+     *
+     * @mbg.generated
+     */
+    int deleteByExample(MetricsExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS
+     *
+     * @mbg.generated
+     */
+    int deleteByPrimaryKey(Short id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS
+     *
+     * @mbg.generated
+     */
+    int insert(Metrics record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS
+     *
+     * @mbg.generated
+     */
+    int insertSelective(Metrics record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS
+     *
+     * @mbg.generated
+     */
+    List<Metrics> selectByExample(MetricsExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS
+     *
+     * @mbg.generated
+     */
+    Metrics selectByPrimaryKey(Short id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS
+     *
+     * @mbg.generated
+     */
+    int updateByExampleSelective(@Param("record") Metrics record, @Param("example") MetricsExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS
+     *
+     * @mbg.generated
+     */
+    int updateByExample(@Param("record") Metrics record, @Param("example") MetricsExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKeySelective(Metrics record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKey(Metrics record);
+}

+ 96 - 0
src/main/java/com/gyee/frame/mapper/auto/MetricsUniformCodeMapper.java

@@ -0,0 +1,96 @@
+package com.gyee.frame.mapper.auto;
+
+import com.gyee.frame.model.auto.MetricsUniformCode;
+import com.gyee.frame.model.auto.MetricsUniformCodeExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface MetricsUniformCodeMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    long countByExample(MetricsUniformCodeExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    int deleteByExample(MetricsUniformCodeExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    int deleteByPrimaryKey(Short id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    int insert(MetricsUniformCode record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    int insertSelective(MetricsUniformCode record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    List<MetricsUniformCode> selectByExample(MetricsUniformCodeExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    MetricsUniformCode selectByPrimaryKey(Short id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    int updateByExampleSelective(@Param("record") MetricsUniformCode record, @Param("example") MetricsUniformCodeExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    int updateByExample(@Param("record") MetricsUniformCode record, @Param("example") MetricsUniformCodeExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKeySelective(MetricsUniformCode record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKey(MetricsUniformCode record);
+}

+ 574 - 0
src/main/java/com/gyee/frame/model/auto/Metrics.java

@@ -0,0 +1,574 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+
+public class Metrics implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.ID
+     *
+     * @mbg.generated
+     */
+    private Short id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.THING
+     *
+     * @mbg.generated
+     */
+    private String thing;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.METRICID
+     *
+     * @mbg.generated
+     */
+    private String metricid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.METRICNAME
+     *
+     * @mbg.generated
+     */
+    private String metricname;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.UNITNAME
+     *
+     * @mbg.generated
+     */
+    private String unitname;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.UNITNAMECN
+     *
+     * @mbg.generated
+     */
+    private String unitnamecn;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.THINGSUB
+     *
+     * @mbg.generated
+     */
+    private String thingsub;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.THINGSUBSUB
+     *
+     * @mbg.generated
+     */
+    private String thingsubsub;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.CATEGORYDATA
+     *
+     * @mbg.generated
+     */
+    private String categorydata;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.CATEGORYSCI
+     *
+     * @mbg.generated
+     */
+    private String categorysci;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.CATEGORYSYS
+     *
+     * @mbg.generated
+     */
+    private String categorysys;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.CATEGORYRES1
+     *
+     * @mbg.generated
+     */
+    private String categoryres1;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.CATEGORYRES2
+     *
+     * @mbg.generated
+     */
+    private String categoryres2;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.CATEGORYRES3
+     *
+     * @mbg.generated
+     */
+    private String categoryres3;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.CATEGORYRES4
+     *
+     * @mbg.generated
+     */
+    private String categoryres4;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.CATEGORYRES5
+     *
+     * @mbg.generated
+     */
+    private String categoryres5;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS.DESCRIPTION
+     *
+     * @mbg.generated
+     */
+    private String description;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table METRICS
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.ID
+     *
+     * @return the value of METRICS.ID
+     *
+     * @mbg.generated
+     */
+    public Short getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.ID
+     *
+     * @param id the value for METRICS.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(Short id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.THING
+     *
+     * @return the value of METRICS.THING
+     *
+     * @mbg.generated
+     */
+    public String getThing() {
+        return thing;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.THING
+     *
+     * @param thing the value for METRICS.THING
+     *
+     * @mbg.generated
+     */
+    public void setThing(String thing) {
+        this.thing = thing == null ? null : thing.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.METRICID
+     *
+     * @return the value of METRICS.METRICID
+     *
+     * @mbg.generated
+     */
+    public String getMetricid() {
+        return metricid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.METRICID
+     *
+     * @param metricid the value for METRICS.METRICID
+     *
+     * @mbg.generated
+     */
+    public void setMetricid(String metricid) {
+        this.metricid = metricid == null ? null : metricid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.METRICNAME
+     *
+     * @return the value of METRICS.METRICNAME
+     *
+     * @mbg.generated
+     */
+    public String getMetricname() {
+        return metricname;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.METRICNAME
+     *
+     * @param metricname the value for METRICS.METRICNAME
+     *
+     * @mbg.generated
+     */
+    public void setMetricname(String metricname) {
+        this.metricname = metricname == null ? null : metricname.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.UNITNAME
+     *
+     * @return the value of METRICS.UNITNAME
+     *
+     * @mbg.generated
+     */
+    public String getUnitname() {
+        return unitname;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.UNITNAME
+     *
+     * @param unitname the value for METRICS.UNITNAME
+     *
+     * @mbg.generated
+     */
+    public void setUnitname(String unitname) {
+        this.unitname = unitname == null ? null : unitname.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.UNITNAMECN
+     *
+     * @return the value of METRICS.UNITNAMECN
+     *
+     * @mbg.generated
+     */
+    public String getUnitnamecn() {
+        return unitnamecn;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.UNITNAMECN
+     *
+     * @param unitnamecn the value for METRICS.UNITNAMECN
+     *
+     * @mbg.generated
+     */
+    public void setUnitnamecn(String unitnamecn) {
+        this.unitnamecn = unitnamecn == null ? null : unitnamecn.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.THINGSUB
+     *
+     * @return the value of METRICS.THINGSUB
+     *
+     * @mbg.generated
+     */
+    public String getThingsub() {
+        return thingsub;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.THINGSUB
+     *
+     * @param thingsub the value for METRICS.THINGSUB
+     *
+     * @mbg.generated
+     */
+    public void setThingsub(String thingsub) {
+        this.thingsub = thingsub == null ? null : thingsub.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.THINGSUBSUB
+     *
+     * @return the value of METRICS.THINGSUBSUB
+     *
+     * @mbg.generated
+     */
+    public String getThingsubsub() {
+        return thingsubsub;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.THINGSUBSUB
+     *
+     * @param thingsubsub the value for METRICS.THINGSUBSUB
+     *
+     * @mbg.generated
+     */
+    public void setThingsubsub(String thingsubsub) {
+        this.thingsubsub = thingsubsub == null ? null : thingsubsub.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.CATEGORYDATA
+     *
+     * @return the value of METRICS.CATEGORYDATA
+     *
+     * @mbg.generated
+     */
+    public String getCategorydata() {
+        return categorydata;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.CATEGORYDATA
+     *
+     * @param categorydata the value for METRICS.CATEGORYDATA
+     *
+     * @mbg.generated
+     */
+    public void setCategorydata(String categorydata) {
+        this.categorydata = categorydata == null ? null : categorydata.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.CATEGORYSCI
+     *
+     * @return the value of METRICS.CATEGORYSCI
+     *
+     * @mbg.generated
+     */
+    public String getCategorysci() {
+        return categorysci;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.CATEGORYSCI
+     *
+     * @param categorysci the value for METRICS.CATEGORYSCI
+     *
+     * @mbg.generated
+     */
+    public void setCategorysci(String categorysci) {
+        this.categorysci = categorysci == null ? null : categorysci.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.CATEGORYSYS
+     *
+     * @return the value of METRICS.CATEGORYSYS
+     *
+     * @mbg.generated
+     */
+    public String getCategorysys() {
+        return categorysys;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.CATEGORYSYS
+     *
+     * @param categorysys the value for METRICS.CATEGORYSYS
+     *
+     * @mbg.generated
+     */
+    public void setCategorysys(String categorysys) {
+        this.categorysys = categorysys == null ? null : categorysys.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.CATEGORYRES1
+     *
+     * @return the value of METRICS.CATEGORYRES1
+     *
+     * @mbg.generated
+     */
+    public String getCategoryres1() {
+        return categoryres1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.CATEGORYRES1
+     *
+     * @param categoryres1 the value for METRICS.CATEGORYRES1
+     *
+     * @mbg.generated
+     */
+    public void setCategoryres1(String categoryres1) {
+        this.categoryres1 = categoryres1 == null ? null : categoryres1.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.CATEGORYRES2
+     *
+     * @return the value of METRICS.CATEGORYRES2
+     *
+     * @mbg.generated
+     */
+    public String getCategoryres2() {
+        return categoryres2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.CATEGORYRES2
+     *
+     * @param categoryres2 the value for METRICS.CATEGORYRES2
+     *
+     * @mbg.generated
+     */
+    public void setCategoryres2(String categoryres2) {
+        this.categoryres2 = categoryres2 == null ? null : categoryres2.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.CATEGORYRES3
+     *
+     * @return the value of METRICS.CATEGORYRES3
+     *
+     * @mbg.generated
+     */
+    public String getCategoryres3() {
+        return categoryres3;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.CATEGORYRES3
+     *
+     * @param categoryres3 the value for METRICS.CATEGORYRES3
+     *
+     * @mbg.generated
+     */
+    public void setCategoryres3(String categoryres3) {
+        this.categoryres3 = categoryres3 == null ? null : categoryres3.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.CATEGORYRES4
+     *
+     * @return the value of METRICS.CATEGORYRES4
+     *
+     * @mbg.generated
+     */
+    public String getCategoryres4() {
+        return categoryres4;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.CATEGORYRES4
+     *
+     * @param categoryres4 the value for METRICS.CATEGORYRES4
+     *
+     * @mbg.generated
+     */
+    public void setCategoryres4(String categoryres4) {
+        this.categoryres4 = categoryres4 == null ? null : categoryres4.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.CATEGORYRES5
+     *
+     * @return the value of METRICS.CATEGORYRES5
+     *
+     * @mbg.generated
+     */
+    public String getCategoryres5() {
+        return categoryres5;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.CATEGORYRES5
+     *
+     * @param categoryres5 the value for METRICS.CATEGORYRES5
+     *
+     * @mbg.generated
+     */
+    public void setCategoryres5(String categoryres5) {
+        this.categoryres5 = categoryres5 == null ? null : categoryres5.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS.DESCRIPTION
+     *
+     * @return the value of METRICS.DESCRIPTION
+     *
+     * @mbg.generated
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS.DESCRIPTION
+     *
+     * @param description the value for METRICS.DESCRIPTION
+     *
+     * @mbg.generated
+     */
+    public void setDescription(String description) {
+        this.description = description == null ? null : description.trim();
+    }
+}

File diff suppressed because it is too large
+ 1482 - 0
src/main/java/com/gyee/frame/model/auto/MetricsExample.java


+ 244 - 0
src/main/java/com/gyee/frame/model/auto/MetricsUniformCode.java

@@ -0,0 +1,244 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+
+public class MetricsUniformCode implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS_UNIFORMCODE.ID
+     *
+     * @mbg.generated
+     */
+    private Short id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS_UNIFORMCODE.THING
+     *
+     * @mbg.generated
+     */
+    private String thing;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS_UNIFORMCODE.METRICID
+     *
+     * @mbg.generated
+     */
+    private String metricid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS_UNIFORMCODE.MODEL
+     *
+     * @mbg.generated
+     */
+    private String model;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS_UNIFORMCODE.STATIONID
+     *
+     * @mbg.generated
+     */
+    private String stationid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS_UNIFORMCODE.UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    private String uniformcode;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column METRICS_UNIFORMCODE.MULTIPLIER
+     *
+     * @mbg.generated
+     */
+    private Short multiplier;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS_UNIFORMCODE.ID
+     *
+     * @return the value of METRICS_UNIFORMCODE.ID
+     *
+     * @mbg.generated
+     */
+    public Short getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS_UNIFORMCODE.ID
+     *
+     * @param id the value for METRICS_UNIFORMCODE.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(Short id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS_UNIFORMCODE.THING
+     *
+     * @return the value of METRICS_UNIFORMCODE.THING
+     *
+     * @mbg.generated
+     */
+    public String getThing() {
+        return thing;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS_UNIFORMCODE.THING
+     *
+     * @param thing the value for METRICS_UNIFORMCODE.THING
+     *
+     * @mbg.generated
+     */
+    public void setThing(String thing) {
+        this.thing = thing == null ? null : thing.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS_UNIFORMCODE.METRICID
+     *
+     * @return the value of METRICS_UNIFORMCODE.METRICID
+     *
+     * @mbg.generated
+     */
+    public String getMetricid() {
+        return metricid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS_UNIFORMCODE.METRICID
+     *
+     * @param metricid the value for METRICS_UNIFORMCODE.METRICID
+     *
+     * @mbg.generated
+     */
+    public void setMetricid(String metricid) {
+        this.metricid = metricid == null ? null : metricid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS_UNIFORMCODE.MODEL
+     *
+     * @return the value of METRICS_UNIFORMCODE.MODEL
+     *
+     * @mbg.generated
+     */
+    public String getModel() {
+        return model;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS_UNIFORMCODE.MODEL
+     *
+     * @param model the value for METRICS_UNIFORMCODE.MODEL
+     *
+     * @mbg.generated
+     */
+    public void setModel(String model) {
+        this.model = model == null ? null : model.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS_UNIFORMCODE.STATIONID
+     *
+     * @return the value of METRICS_UNIFORMCODE.STATIONID
+     *
+     * @mbg.generated
+     */
+    public String getStationid() {
+        return stationid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS_UNIFORMCODE.STATIONID
+     *
+     * @param stationid the value for METRICS_UNIFORMCODE.STATIONID
+     *
+     * @mbg.generated
+     */
+    public void setStationid(String stationid) {
+        this.stationid = stationid == null ? null : stationid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS_UNIFORMCODE.UNIFORMCODE
+     *
+     * @return the value of METRICS_UNIFORMCODE.UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public String getUniformcode() {
+        return uniformcode;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS_UNIFORMCODE.UNIFORMCODE
+     *
+     * @param uniformcode the value for METRICS_UNIFORMCODE.UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public void setUniformcode(String uniformcode) {
+        this.uniformcode = uniformcode == null ? null : uniformcode.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column METRICS_UNIFORMCODE.MULTIPLIER
+     *
+     * @return the value of METRICS_UNIFORMCODE.MULTIPLIER
+     *
+     * @mbg.generated
+     */
+    public Short getMultiplier() {
+        return multiplier;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column METRICS_UNIFORMCODE.MULTIPLIER
+     *
+     * @param multiplier the value for METRICS_UNIFORMCODE.MULTIPLIER
+     *
+     * @mbg.generated
+     */
+    public void setMultiplier(Short multiplier) {
+        this.multiplier = multiplier;
+    }
+}

+ 772 - 0
src/main/java/com/gyee/frame/model/auto/MetricsUniformCodeExample.java

@@ -0,0 +1,772 @@
+package com.gyee.frame.model.auto;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class MetricsUniformCodeExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public MetricsUniformCodeExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("ID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("ID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Short value) {
+            addCriterion("ID =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Short value) {
+            addCriterion("ID <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Short value) {
+            addCriterion("ID >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Short value) {
+            addCriterion("ID >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Short value) {
+            addCriterion("ID <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Short value) {
+            addCriterion("ID <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Short> values) {
+            addCriterion("ID in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Short> values) {
+            addCriterion("ID not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Short value1, Short value2) {
+            addCriterion("ID between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Short value1, Short value2) {
+            addCriterion("ID not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andThingIsNull() {
+            addCriterion("THING is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andThingIsNotNull() {
+            addCriterion("THING is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andThingEqualTo(String value) {
+            addCriterion("THING =", value, "thing");
+            return (Criteria) this;
+        }
+
+        public Criteria andThingNotEqualTo(String value) {
+            addCriterion("THING <>", value, "thing");
+            return (Criteria) this;
+        }
+
+        public Criteria andThingGreaterThan(String value) {
+            addCriterion("THING >", value, "thing");
+            return (Criteria) this;
+        }
+
+        public Criteria andThingGreaterThanOrEqualTo(String value) {
+            addCriterion("THING >=", value, "thing");
+            return (Criteria) this;
+        }
+
+        public Criteria andThingLessThan(String value) {
+            addCriterion("THING <", value, "thing");
+            return (Criteria) this;
+        }
+
+        public Criteria andThingLessThanOrEqualTo(String value) {
+            addCriterion("THING <=", value, "thing");
+            return (Criteria) this;
+        }
+
+        public Criteria andThingLike(String value) {
+            addCriterion("THING like", value, "thing");
+            return (Criteria) this;
+        }
+
+        public Criteria andThingNotLike(String value) {
+            addCriterion("THING not like", value, "thing");
+            return (Criteria) this;
+        }
+
+        public Criteria andThingIn(List<String> values) {
+            addCriterion("THING in", values, "thing");
+            return (Criteria) this;
+        }
+
+        public Criteria andThingNotIn(List<String> values) {
+            addCriterion("THING not in", values, "thing");
+            return (Criteria) this;
+        }
+
+        public Criteria andThingBetween(String value1, String value2) {
+            addCriterion("THING between", value1, value2, "thing");
+            return (Criteria) this;
+        }
+
+        public Criteria andThingNotBetween(String value1, String value2) {
+            addCriterion("THING not between", value1, value2, "thing");
+            return (Criteria) this;
+        }
+
+        public Criteria andMetricidIsNull() {
+            addCriterion("METRICID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMetricidIsNotNull() {
+            addCriterion("METRICID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMetricidEqualTo(String value) {
+            addCriterion("METRICID =", value, "metricid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMetricidNotEqualTo(String value) {
+            addCriterion("METRICID <>", value, "metricid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMetricidGreaterThan(String value) {
+            addCriterion("METRICID >", value, "metricid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMetricidGreaterThanOrEqualTo(String value) {
+            addCriterion("METRICID >=", value, "metricid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMetricidLessThan(String value) {
+            addCriterion("METRICID <", value, "metricid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMetricidLessThanOrEqualTo(String value) {
+            addCriterion("METRICID <=", value, "metricid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMetricidLike(String value) {
+            addCriterion("METRICID like", value, "metricid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMetricidNotLike(String value) {
+            addCriterion("METRICID not like", value, "metricid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMetricidIn(List<String> values) {
+            addCriterion("METRICID in", values, "metricid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMetricidNotIn(List<String> values) {
+            addCriterion("METRICID not in", values, "metricid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMetricidBetween(String value1, String value2) {
+            addCriterion("METRICID between", value1, value2, "metricid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMetricidNotBetween(String value1, String value2) {
+            addCriterion("METRICID not between", value1, value2, "metricid");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelIsNull() {
+            addCriterion("MODEL is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelIsNotNull() {
+            addCriterion("MODEL is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelEqualTo(String value) {
+            addCriterion("MODEL =", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelNotEqualTo(String value) {
+            addCriterion("MODEL <>", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelGreaterThan(String value) {
+            addCriterion("MODEL >", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelGreaterThanOrEqualTo(String value) {
+            addCriterion("MODEL >=", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelLessThan(String value) {
+            addCriterion("MODEL <", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelLessThanOrEqualTo(String value) {
+            addCriterion("MODEL <=", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelLike(String value) {
+            addCriterion("MODEL like", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelNotLike(String value) {
+            addCriterion("MODEL not like", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelIn(List<String> values) {
+            addCriterion("MODEL in", values, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelNotIn(List<String> values) {
+            addCriterion("MODEL not in", values, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelBetween(String value1, String value2) {
+            addCriterion("MODEL between", value1, value2, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelNotBetween(String value1, String value2) {
+            addCriterion("MODEL not between", value1, value2, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidIsNull() {
+            addCriterion("STATIONID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidIsNotNull() {
+            addCriterion("STATIONID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidEqualTo(String value) {
+            addCriterion("STATIONID =", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidNotEqualTo(String value) {
+            addCriterion("STATIONID <>", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidGreaterThan(String value) {
+            addCriterion("STATIONID >", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidGreaterThanOrEqualTo(String value) {
+            addCriterion("STATIONID >=", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidLessThan(String value) {
+            addCriterion("STATIONID <", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidLessThanOrEqualTo(String value) {
+            addCriterion("STATIONID <=", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidLike(String value) {
+            addCriterion("STATIONID like", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidNotLike(String value) {
+            addCriterion("STATIONID not like", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidIn(List<String> values) {
+            addCriterion("STATIONID in", values, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidNotIn(List<String> values) {
+            addCriterion("STATIONID not in", values, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidBetween(String value1, String value2) {
+            addCriterion("STATIONID between", value1, value2, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidNotBetween(String value1, String value2) {
+            addCriterion("STATIONID not between", value1, value2, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUniformcodeIsNull() {
+            addCriterion("UNIFORMCODE is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUniformcodeIsNotNull() {
+            addCriterion("UNIFORMCODE is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUniformcodeEqualTo(String value) {
+            addCriterion("UNIFORMCODE =", value, "uniformcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andUniformcodeNotEqualTo(String value) {
+            addCriterion("UNIFORMCODE <>", value, "uniformcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andUniformcodeGreaterThan(String value) {
+            addCriterion("UNIFORMCODE >", value, "uniformcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andUniformcodeGreaterThanOrEqualTo(String value) {
+            addCriterion("UNIFORMCODE >=", value, "uniformcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andUniformcodeLessThan(String value) {
+            addCriterion("UNIFORMCODE <", value, "uniformcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andUniformcodeLessThanOrEqualTo(String value) {
+            addCriterion("UNIFORMCODE <=", value, "uniformcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andUniformcodeLike(String value) {
+            addCriterion("UNIFORMCODE like", value, "uniformcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andUniformcodeNotLike(String value) {
+            addCriterion("UNIFORMCODE not like", value, "uniformcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andUniformcodeIn(List<String> values) {
+            addCriterion("UNIFORMCODE in", values, "uniformcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andUniformcodeNotIn(List<String> values) {
+            addCriterion("UNIFORMCODE not in", values, "uniformcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andUniformcodeBetween(String value1, String value2) {
+            addCriterion("UNIFORMCODE between", value1, value2, "uniformcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andUniformcodeNotBetween(String value1, String value2) {
+            addCriterion("UNIFORMCODE not between", value1, value2, "uniformcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andMultiplierIsNull() {
+            addCriterion("MULTIPLIER is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMultiplierIsNotNull() {
+            addCriterion("MULTIPLIER is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMultiplierEqualTo(Short value) {
+            addCriterion("MULTIPLIER =", value, "multiplier");
+            return (Criteria) this;
+        }
+
+        public Criteria andMultiplierNotEqualTo(Short value) {
+            addCriterion("MULTIPLIER <>", value, "multiplier");
+            return (Criteria) this;
+        }
+
+        public Criteria andMultiplierGreaterThan(Short value) {
+            addCriterion("MULTIPLIER >", value, "multiplier");
+            return (Criteria) this;
+        }
+
+        public Criteria andMultiplierGreaterThanOrEqualTo(Short value) {
+            addCriterion("MULTIPLIER >=", value, "multiplier");
+            return (Criteria) this;
+        }
+
+        public Criteria andMultiplierLessThan(Short value) {
+            addCriterion("MULTIPLIER <", value, "multiplier");
+            return (Criteria) this;
+        }
+
+        public Criteria andMultiplierLessThanOrEqualTo(Short value) {
+            addCriterion("MULTIPLIER <=", value, "multiplier");
+            return (Criteria) this;
+        }
+
+        public Criteria andMultiplierIn(List<Short> values) {
+            addCriterion("MULTIPLIER in", values, "multiplier");
+            return (Criteria) this;
+        }
+
+        public Criteria andMultiplierNotIn(List<Short> values) {
+            addCriterion("MULTIPLIER not in", values, "multiplier");
+            return (Criteria) this;
+        }
+
+        public Criteria andMultiplierBetween(Short value1, Short value2) {
+            addCriterion("MULTIPLIER between", value1, value2, "multiplier");
+            return (Criteria) this;
+        }
+
+        public Criteria andMultiplierNotBetween(Short value1, Short value2) {
+            addCriterion("MULTIPLIER not between", value1, value2, "multiplier");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated do_not_delete_during_merge
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table METRICS_UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 26 - 0
src/main/java/com/gyee/frame/service/Alertrule2ervice.java

@@ -10,6 +10,7 @@ import com.gyee.frame.model.auto.Alertrule2Example;
 import com.gyee.frame.model.custom.AlarmTotalVo;
 import com.gyee.frame.model.custom.SimpleVo;
 import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.model.custom.weather.Sys;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.SnowflakeIdWorker;
 import com.gyee.frame.util.StringUtils;
@@ -235,4 +236,29 @@ public class Alertrule2ervice implements BaseService<Alertrule2, Alertrule2Examp
         ls=alertrule2Mapper.getAlarmTypenum();
         return ls;
     }
+
+    /**
+     * 通过规则描述,场站,风机ID查询一条
+     * 解析规则表达式,提取出所有uniformCode
+     * @param name
+     * @param station
+     * @param wtId
+     * @return
+     */
+    public List<String> getUniformCodeByNameAndStation(String name, String station, String wtId){
+        Alertrule2Example example = new Alertrule2Example();
+        example.createCriteria().andNameEqualTo(name)
+               .andStationEqualTo(station)
+               .andWindturbineLike("%" + wtId + "%");
+
+        List<Alertrule2> rules = alertrule2Mapper.selectByExample(example);
+        if (rules == null || rules.size() == 0)
+            return null;
+
+        Alertrule2 rule = rules.get(0);
+        String expression = "[AI,DI](.{4})";
+        List<String> list = StringUtils.pattern(rule.getExpression(), expression);
+
+        return list;
+    }
 }

+ 37 - 0
src/main/java/com/gyee/frame/service/health/MetricsService.java

@@ -0,0 +1,37 @@
+package com.gyee.frame.service.health;
+
+import com.gyee.frame.common.exception.QiNiuException;
+import com.gyee.frame.common.exception.enums.QiNiuErrorEnum;
+import com.gyee.frame.mapper.auto.MetricsMapper;
+import com.gyee.frame.model.auto.Metrics;
+import com.gyee.frame.model.auto.MetricsExample;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Service
+public class MetricsService {
+
+    @Resource
+    private MetricsMapper metricsMapper;
+
+    /**
+     * 通过MetricsId查询
+     * @param metricId
+     * @return
+     */
+    public List<Metrics> getMetricsByMetricsId(String metricId){
+        MetricsExample example = new MetricsExample();
+
+        List<Metrics> list;
+        try{
+            example.createCriteria().andMetricidEqualTo(metricId);
+            list = metricsMapper.selectByExample(example);
+        }catch (Exception e){
+            throw new QiNiuException(QiNiuErrorEnum.ERROR_DATA);
+        }
+
+        return list;
+    }
+}

+ 43 - 0
src/main/java/com/gyee/frame/service/health/MetricsUniformCodeService.java

@@ -0,0 +1,43 @@
+package com.gyee.frame.service.health;
+
+import com.gyee.frame.common.exception.QiNiuException;
+import com.gyee.frame.common.exception.enums.QiNiuErrorEnum;
+import com.gyee.frame.mapper.auto.MetricsUniformCodeMapper;
+import com.gyee.frame.model.auto.MetricsUniformCode;
+import com.gyee.frame.model.auto.MetricsUniformCodeExample;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Service
+public class MetricsUniformCodeService {
+
+    @Resource
+    private MetricsUniformCodeMapper uniformCodeMapper;
+
+
+    /**
+     * 使用场站、统一编码查询
+     * @param station   场站
+     * @param uniformCode 统一编码
+     * @return
+     */
+    public List<MetricsUniformCode> getListByStationAndUniforCode(String station, String uniformCode){
+        MetricsUniformCodeExample example = new MetricsUniformCodeExample();
+
+        List<MetricsUniformCode> list;
+        try{
+            example.createCriteria().andStationidEqualTo(station)
+                    .andUniformcodeEqualTo(uniformCode);
+
+            list = uniformCodeMapper.selectByExample(example);
+
+        }catch (Exception e){
+            throw new QiNiuException(QiNiuErrorEnum.ERROR_DATA);
+        }
+
+        return list;
+    }
+
+}

+ 25 - 4
src/main/java/com/gyee/frame/util/StringUtils.java

@@ -7,10 +7,7 @@ import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.Collection;
-import java.util.Date;
-import java.util.Map;
-import java.util.UUID;
+import java.util.*;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -535,4 +532,28 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
         return true;
     }
+
+
+    /**
+     * 正则表达式
+     * @param input     需要匹配的字符串
+     * @param expression 正则表达公式
+     * @return
+     */
+    public static List<String> pattern(String input, String expression){
+        // 创建 Pattern 对象
+        Pattern p = Pattern.compile(expression);
+        Matcher m = p.matcher(input);
+
+        ArrayList list = new ArrayList();
+        while (m.find()) {
+            list.add(m.group(0));
+        }
+        //去除重复值
+        HashSet hs=new HashSet(list);
+        list.clear();
+        list.addAll(hs);
+
+        return list;
+    }
 }

+ 1 - 1
src/main/resources/application.yml

@@ -186,6 +186,6 @@ exportcode:
   template2cft:
     MHS_FDC: MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0106,MHSFGL.NX_GD_MHSF_YC_P1_L1_001_FGLD70,MHSFGL.NX_GD_MHSF_YC_P1_L1_001_FGLTEM,MHSFGL.NX_GD_MHSF_YC_P1_L1_001_FGLPRE,MHSFGL.NX_GD_MHSF_YC_P1_L1_001_FGLHUM
     NSS_FDC: NSSFCJSFW.NX_GD_NSSF_XX_XX_XXX_XXX_CI0106,NSSFGL.NX_GD_NSSF_YC_P1_L1_001_FGLD70,NSSFGL.NX_GD_NSSF_YC_P1_L1_001_FGLTEM,NSSFGL.NX_GD_NSSF_YC_P1_L1_001_FGLPRE,NSSFGL.NX_GD_NSSF_YC_P1_L1_001_FGLHUM
-    QS_FDC: QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0106,QSFGL.NX_GD_QSF_YC_P1_L1_001_FGLD70,QSFGL.NX_GD_QSF_YC_P1_L1_001_FGLTEM,QSFGL.NX_GD_QSF_YC_P1_L1_001_FGLPRE,QSFGL.NX_GD_QSF_YC_P1_L1_001_FGLHUM
+    QS_FDC: QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0106,QSFGL.NX_GD_QSF_YC_P1_L1_001_CFT018,QSFGL.NX_GD_QSF_YC_P1_L1_001_CFT019,QSFGL.NX_GD_QSF_YC_P1_L1_001_CFT020,QSFGL.NX_GD_QSF_YC_P1_L1_001_CFT021
     SBQ_FDC: SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0106,SBQFGL.NX_GD_SBQF_YC_P1_L1_001_FGLD70,SBQFGL.NX_GD_SBQF_YC_P1_L1_001_FGLTEM,SBQFGL.NX_GD_SBQF_YC_P1_L1_001_FGLPRE,SBQFGL.NX_GD_SBQF_YC_P1_L1_001_FGLHUM
     XS_FDC: XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0106,XSFGL.NX_GD_XSF_YC_P1_L1_001_FGLD70,XSFGL.NX_GD_XSF_YC_P1_L1_001_FGLTEM,XSFGL.NX_GD_XSF_YC_P1_L1_001_FGLPRE,XSFGL.NX_GD_XSF_YC_P1_L1_001_FGLHUM

+ 461 - 0
src/main/resources/mybatis/auto/MetricsMapper.xml

@@ -0,0 +1,461 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gyee.frame.mapper.auto.MetricsMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Metrics">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="ID" jdbcType="DECIMAL" property="id" />
+    <result column="THING" jdbcType="VARCHAR" property="thing" />
+    <result column="METRICID" jdbcType="VARCHAR" property="metricid" />
+    <result column="METRICNAME" jdbcType="VARCHAR" property="metricname" />
+    <result column="UNITNAME" jdbcType="VARCHAR" property="unitname" />
+    <result column="UNITNAMECN" jdbcType="VARCHAR" property="unitnamecn" />
+    <result column="THINGSUB" jdbcType="VARCHAR" property="thingsub" />
+    <result column="THINGSUBSUB" jdbcType="VARCHAR" property="thingsubsub" />
+    <result column="CATEGORYDATA" jdbcType="VARCHAR" property="categorydata" />
+    <result column="CATEGORYSCI" jdbcType="VARCHAR" property="categorysci" />
+    <result column="CATEGORYSYS" jdbcType="VARCHAR" property="categorysys" />
+    <result column="CATEGORYRES1" jdbcType="VARCHAR" property="categoryres1" />
+    <result column="CATEGORYRES2" jdbcType="VARCHAR" property="categoryres2" />
+    <result column="CATEGORYRES3" jdbcType="VARCHAR" property="categoryres3" />
+    <result column="CATEGORYRES4" jdbcType="VARCHAR" property="categoryres4" />
+    <result column="CATEGORYRES5" jdbcType="VARCHAR" property="categoryres5" />
+    <result column="DESCRIPTION" jdbcType="VARCHAR" property="description" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    ID, THING, METRICID, METRICNAME, UNITNAME, UNITNAMECN, THINGSUB, THINGSUBSUB, CATEGORYDATA, 
+    CATEGORYSCI, CATEGORYSYS, CATEGORYRES1, CATEGORYRES2, CATEGORYRES3, CATEGORYRES4, 
+    CATEGORYRES5, DESCRIPTION
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.MetricsExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from METRICS
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from METRICS
+    where ID = #{id,jdbcType=DECIMAL}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from METRICS
+    where ID = #{id,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.MetricsExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from METRICS
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.Metrics">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into METRICS (ID, THING, METRICID, 
+      METRICNAME, UNITNAME, UNITNAMECN, 
+      THINGSUB, THINGSUBSUB, CATEGORYDATA, 
+      CATEGORYSCI, CATEGORYSYS, CATEGORYRES1, 
+      CATEGORYRES2, CATEGORYRES3, CATEGORYRES4, 
+      CATEGORYRES5, DESCRIPTION)
+    values (#{id,jdbcType=DECIMAL}, #{thing,jdbcType=VARCHAR}, #{metricid,jdbcType=VARCHAR}, 
+      #{metricname,jdbcType=VARCHAR}, #{unitname,jdbcType=VARCHAR}, #{unitnamecn,jdbcType=VARCHAR}, 
+      #{thingsub,jdbcType=VARCHAR}, #{thingsubsub,jdbcType=VARCHAR}, #{categorydata,jdbcType=VARCHAR}, 
+      #{categorysci,jdbcType=VARCHAR}, #{categorysys,jdbcType=VARCHAR}, #{categoryres1,jdbcType=VARCHAR}, 
+      #{categoryres2,jdbcType=VARCHAR}, #{categoryres3,jdbcType=VARCHAR}, #{categoryres4,jdbcType=VARCHAR}, 
+      #{categoryres5,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Metrics">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into METRICS
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="thing != null">
+        THING,
+      </if>
+      <if test="metricid != null">
+        METRICID,
+      </if>
+      <if test="metricname != null">
+        METRICNAME,
+      </if>
+      <if test="unitname != null">
+        UNITNAME,
+      </if>
+      <if test="unitnamecn != null">
+        UNITNAMECN,
+      </if>
+      <if test="thingsub != null">
+        THINGSUB,
+      </if>
+      <if test="thingsubsub != null">
+        THINGSUBSUB,
+      </if>
+      <if test="categorydata != null">
+        CATEGORYDATA,
+      </if>
+      <if test="categorysci != null">
+        CATEGORYSCI,
+      </if>
+      <if test="categorysys != null">
+        CATEGORYSYS,
+      </if>
+      <if test="categoryres1 != null">
+        CATEGORYRES1,
+      </if>
+      <if test="categoryres2 != null">
+        CATEGORYRES2,
+      </if>
+      <if test="categoryres3 != null">
+        CATEGORYRES3,
+      </if>
+      <if test="categoryres4 != null">
+        CATEGORYRES4,
+      </if>
+      <if test="categoryres5 != null">
+        CATEGORYRES5,
+      </if>
+      <if test="description != null">
+        DESCRIPTION,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="thing != null">
+        #{thing,jdbcType=VARCHAR},
+      </if>
+      <if test="metricid != null">
+        #{metricid,jdbcType=VARCHAR},
+      </if>
+      <if test="metricname != null">
+        #{metricname,jdbcType=VARCHAR},
+      </if>
+      <if test="unitname != null">
+        #{unitname,jdbcType=VARCHAR},
+      </if>
+      <if test="unitnamecn != null">
+        #{unitnamecn,jdbcType=VARCHAR},
+      </if>
+      <if test="thingsub != null">
+        #{thingsub,jdbcType=VARCHAR},
+      </if>
+      <if test="thingsubsub != null">
+        #{thingsubsub,jdbcType=VARCHAR},
+      </if>
+      <if test="categorydata != null">
+        #{categorydata,jdbcType=VARCHAR},
+      </if>
+      <if test="categorysci != null">
+        #{categorysci,jdbcType=VARCHAR},
+      </if>
+      <if test="categorysys != null">
+        #{categorysys,jdbcType=VARCHAR},
+      </if>
+      <if test="categoryres1 != null">
+        #{categoryres1,jdbcType=VARCHAR},
+      </if>
+      <if test="categoryres2 != null">
+        #{categoryres2,jdbcType=VARCHAR},
+      </if>
+      <if test="categoryres3 != null">
+        #{categoryres3,jdbcType=VARCHAR},
+      </if>
+      <if test="categoryres4 != null">
+        #{categoryres4,jdbcType=VARCHAR},
+      </if>
+      <if test="categoryres5 != null">
+        #{categoryres5,jdbcType=VARCHAR},
+      </if>
+      <if test="description != null">
+        #{description,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.MetricsExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from METRICS
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update METRICS
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=DECIMAL},
+      </if>
+      <if test="record.thing != null">
+        THING = #{record.thing,jdbcType=VARCHAR},
+      </if>
+      <if test="record.metricid != null">
+        METRICID = #{record.metricid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.metricname != null">
+        METRICNAME = #{record.metricname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.unitname != null">
+        UNITNAME = #{record.unitname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.unitnamecn != null">
+        UNITNAMECN = #{record.unitnamecn,jdbcType=VARCHAR},
+      </if>
+      <if test="record.thingsub != null">
+        THINGSUB = #{record.thingsub,jdbcType=VARCHAR},
+      </if>
+      <if test="record.thingsubsub != null">
+        THINGSUBSUB = #{record.thingsubsub,jdbcType=VARCHAR},
+      </if>
+      <if test="record.categorydata != null">
+        CATEGORYDATA = #{record.categorydata,jdbcType=VARCHAR},
+      </if>
+      <if test="record.categorysci != null">
+        CATEGORYSCI = #{record.categorysci,jdbcType=VARCHAR},
+      </if>
+      <if test="record.categorysys != null">
+        CATEGORYSYS = #{record.categorysys,jdbcType=VARCHAR},
+      </if>
+      <if test="record.categoryres1 != null">
+        CATEGORYRES1 = #{record.categoryres1,jdbcType=VARCHAR},
+      </if>
+      <if test="record.categoryres2 != null">
+        CATEGORYRES2 = #{record.categoryres2,jdbcType=VARCHAR},
+      </if>
+      <if test="record.categoryres3 != null">
+        CATEGORYRES3 = #{record.categoryres3,jdbcType=VARCHAR},
+      </if>
+      <if test="record.categoryres4 != null">
+        CATEGORYRES4 = #{record.categoryres4,jdbcType=VARCHAR},
+      </if>
+      <if test="record.categoryres5 != null">
+        CATEGORYRES5 = #{record.categoryres5,jdbcType=VARCHAR},
+      </if>
+      <if test="record.description != null">
+        DESCRIPTION = #{record.description,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update METRICS
+    set ID = #{record.id,jdbcType=DECIMAL},
+      THING = #{record.thing,jdbcType=VARCHAR},
+      METRICID = #{record.metricid,jdbcType=VARCHAR},
+      METRICNAME = #{record.metricname,jdbcType=VARCHAR},
+      UNITNAME = #{record.unitname,jdbcType=VARCHAR},
+      UNITNAMECN = #{record.unitnamecn,jdbcType=VARCHAR},
+      THINGSUB = #{record.thingsub,jdbcType=VARCHAR},
+      THINGSUBSUB = #{record.thingsubsub,jdbcType=VARCHAR},
+      CATEGORYDATA = #{record.categorydata,jdbcType=VARCHAR},
+      CATEGORYSCI = #{record.categorysci,jdbcType=VARCHAR},
+      CATEGORYSYS = #{record.categorysys,jdbcType=VARCHAR},
+      CATEGORYRES1 = #{record.categoryres1,jdbcType=VARCHAR},
+      CATEGORYRES2 = #{record.categoryres2,jdbcType=VARCHAR},
+      CATEGORYRES3 = #{record.categoryres3,jdbcType=VARCHAR},
+      CATEGORYRES4 = #{record.categoryres4,jdbcType=VARCHAR},
+      CATEGORYRES5 = #{record.categoryres5,jdbcType=VARCHAR},
+      DESCRIPTION = #{record.description,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Metrics">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update METRICS
+    <set>
+      <if test="thing != null">
+        THING = #{thing,jdbcType=VARCHAR},
+      </if>
+      <if test="metricid != null">
+        METRICID = #{metricid,jdbcType=VARCHAR},
+      </if>
+      <if test="metricname != null">
+        METRICNAME = #{metricname,jdbcType=VARCHAR},
+      </if>
+      <if test="unitname != null">
+        UNITNAME = #{unitname,jdbcType=VARCHAR},
+      </if>
+      <if test="unitnamecn != null">
+        UNITNAMECN = #{unitnamecn,jdbcType=VARCHAR},
+      </if>
+      <if test="thingsub != null">
+        THINGSUB = #{thingsub,jdbcType=VARCHAR},
+      </if>
+      <if test="thingsubsub != null">
+        THINGSUBSUB = #{thingsubsub,jdbcType=VARCHAR},
+      </if>
+      <if test="categorydata != null">
+        CATEGORYDATA = #{categorydata,jdbcType=VARCHAR},
+      </if>
+      <if test="categorysci != null">
+        CATEGORYSCI = #{categorysci,jdbcType=VARCHAR},
+      </if>
+      <if test="categorysys != null">
+        CATEGORYSYS = #{categorysys,jdbcType=VARCHAR},
+      </if>
+      <if test="categoryres1 != null">
+        CATEGORYRES1 = #{categoryres1,jdbcType=VARCHAR},
+      </if>
+      <if test="categoryres2 != null">
+        CATEGORYRES2 = #{categoryres2,jdbcType=VARCHAR},
+      </if>
+      <if test="categoryres3 != null">
+        CATEGORYRES3 = #{categoryres3,jdbcType=VARCHAR},
+      </if>
+      <if test="categoryres4 != null">
+        CATEGORYRES4 = #{categoryres4,jdbcType=VARCHAR},
+      </if>
+      <if test="categoryres5 != null">
+        CATEGORYRES5 = #{categoryres5,jdbcType=VARCHAR},
+      </if>
+      <if test="description != null">
+        DESCRIPTION = #{description,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Metrics">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update METRICS
+    set THING = #{thing,jdbcType=VARCHAR},
+      METRICID = #{metricid,jdbcType=VARCHAR},
+      METRICNAME = #{metricname,jdbcType=VARCHAR},
+      UNITNAME = #{unitname,jdbcType=VARCHAR},
+      UNITNAMECN = #{unitnamecn,jdbcType=VARCHAR},
+      THINGSUB = #{thingsub,jdbcType=VARCHAR},
+      THINGSUBSUB = #{thingsubsub,jdbcType=VARCHAR},
+      CATEGORYDATA = #{categorydata,jdbcType=VARCHAR},
+      CATEGORYSCI = #{categorysci,jdbcType=VARCHAR},
+      CATEGORYSYS = #{categorysys,jdbcType=VARCHAR},
+      CATEGORYRES1 = #{categoryres1,jdbcType=VARCHAR},
+      CATEGORYRES2 = #{categoryres2,jdbcType=VARCHAR},
+      CATEGORYRES3 = #{categoryres3,jdbcType=VARCHAR},
+      CATEGORYRES4 = #{categoryres4,jdbcType=VARCHAR},
+      CATEGORYRES5 = #{categoryres5,jdbcType=VARCHAR},
+      DESCRIPTION = #{description,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+</mapper>

+ 303 - 0
src/main/resources/mybatis/auto/MetricsUniformCodeMapper.xml

@@ -0,0 +1,303 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gyee.frame.mapper.auto.MetricsUniformCodeMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.MetricsUniformCode">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="ID" jdbcType="DECIMAL" property="id" />
+    <result column="THING" jdbcType="VARCHAR" property="thing" />
+    <result column="METRICID" jdbcType="VARCHAR" property="metricid" />
+    <result column="MODEL" jdbcType="VARCHAR" property="model" />
+    <result column="STATIONID" jdbcType="VARCHAR" property="stationid" />
+    <result column="UNIFORMCODE" jdbcType="VARCHAR" property="uniformcode" />
+    <result column="MULTIPLIER" jdbcType="DECIMAL" property="multiplier" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    ID, THING, METRICID, MODEL, STATIONID, UNIFORMCODE, MULTIPLIER
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.MetricsUniformCodeExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from METRICS_UNIFORMCODE
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from METRICS_UNIFORMCODE
+    where ID = #{id,jdbcType=DECIMAL}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from METRICS_UNIFORMCODE
+    where ID = #{id,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.MetricsUniformCodeExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from METRICS_UNIFORMCODE
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.MetricsUniformCode">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into METRICS_UNIFORMCODE (ID, THING, METRICID, 
+      MODEL, STATIONID, UNIFORMCODE, 
+      MULTIPLIER)
+    values (#{id,jdbcType=DECIMAL}, #{thing,jdbcType=VARCHAR}, #{metricid,jdbcType=VARCHAR}, 
+      #{model,jdbcType=VARCHAR}, #{stationid,jdbcType=VARCHAR}, #{uniformcode,jdbcType=VARCHAR}, 
+      #{multiplier,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.MetricsUniformCode">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into METRICS_UNIFORMCODE
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="thing != null">
+        THING,
+      </if>
+      <if test="metricid != null">
+        METRICID,
+      </if>
+      <if test="model != null">
+        MODEL,
+      </if>
+      <if test="stationid != null">
+        STATIONID,
+      </if>
+      <if test="uniformcode != null">
+        UNIFORMCODE,
+      </if>
+      <if test="multiplier != null">
+        MULTIPLIER,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="thing != null">
+        #{thing,jdbcType=VARCHAR},
+      </if>
+      <if test="metricid != null">
+        #{metricid,jdbcType=VARCHAR},
+      </if>
+      <if test="model != null">
+        #{model,jdbcType=VARCHAR},
+      </if>
+      <if test="stationid != null">
+        #{stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="uniformcode != null">
+        #{uniformcode,jdbcType=VARCHAR},
+      </if>
+      <if test="multiplier != null">
+        #{multiplier,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.MetricsUniformCodeExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from METRICS_UNIFORMCODE
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update METRICS_UNIFORMCODE
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=DECIMAL},
+      </if>
+      <if test="record.thing != null">
+        THING = #{record.thing,jdbcType=VARCHAR},
+      </if>
+      <if test="record.metricid != null">
+        METRICID = #{record.metricid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.model != null">
+        MODEL = #{record.model,jdbcType=VARCHAR},
+      </if>
+      <if test="record.stationid != null">
+        STATIONID = #{record.stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.uniformcode != null">
+        UNIFORMCODE = #{record.uniformcode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.multiplier != null">
+        MULTIPLIER = #{record.multiplier,jdbcType=DECIMAL},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update METRICS_UNIFORMCODE
+    set ID = #{record.id,jdbcType=DECIMAL},
+      THING = #{record.thing,jdbcType=VARCHAR},
+      METRICID = #{record.metricid,jdbcType=VARCHAR},
+      MODEL = #{record.model,jdbcType=VARCHAR},
+      STATIONID = #{record.stationid,jdbcType=VARCHAR},
+      UNIFORMCODE = #{record.uniformcode,jdbcType=VARCHAR},
+      MULTIPLIER = #{record.multiplier,jdbcType=DECIMAL}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.MetricsUniformCode">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update METRICS_UNIFORMCODE
+    <set>
+      <if test="thing != null">
+        THING = #{thing,jdbcType=VARCHAR},
+      </if>
+      <if test="metricid != null">
+        METRICID = #{metricid,jdbcType=VARCHAR},
+      </if>
+      <if test="model != null">
+        MODEL = #{model,jdbcType=VARCHAR},
+      </if>
+      <if test="stationid != null">
+        STATIONID = #{stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="uniformcode != null">
+        UNIFORMCODE = #{uniformcode,jdbcType=VARCHAR},
+      </if>
+      <if test="multiplier != null">
+        MULTIPLIER = #{multiplier,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.MetricsUniformCode">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update METRICS_UNIFORMCODE
+    set THING = #{thing,jdbcType=VARCHAR},
+      METRICID = #{metricid,jdbcType=VARCHAR},
+      MODEL = #{model,jdbcType=VARCHAR},
+      STATIONID = #{stationid,jdbcType=VARCHAR},
+      UNIFORMCODE = #{uniformcode,jdbcType=VARCHAR},
+      MULTIPLIER = #{multiplier,jdbcType=DECIMAL}
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+</mapper>