Browse Source

值际对标功能修改

shilin 3 years ago
parent
commit
19fac0057b
25 changed files with 11686 additions and 75 deletions
  1. 19 7
      pom.xml
  2. 22 12
      src/main/java/com/gyee/frame/common/conf/MybatisConfig.java
  3. 3 3
      src/main/java/com/gyee/frame/common/dataSources/DataSourceAspect.java
  4. 2 1
      src/main/java/com/gyee/frame/common/dataSources/DataSourceType.java
  5. 40 1
      src/main/java/com/gyee/frame/common/support/Convert.java
  6. 153 0
      src/main/java/com/gyee/frame/controller/report/WtHealthReportMonthController.java
  7. 96 0
      src/main/java/com/gyee/frame/mapper/auto/RecommenmainMapper.java
  8. 101 0
      src/main/java/com/gyee/frame/mapper/auto/WobugeqMapper.java
  9. 576 0
      src/main/java/com/gyee/frame/model/auto/Recommenmain.java
  10. 1424 0
      src/main/java/com/gyee/frame/model/auto/RecommenmainExample.java
  11. 2159 0
      src/main/java/com/gyee/frame/model/auto/Wobugeq.java
  12. 4713 0
      src/main/java/com/gyee/frame/model/auto/WobugeqExample.java
  13. 13 13
      src/main/java/com/gyee/frame/model/auto/WtReportMain.java
  14. 17 17
      src/main/java/com/gyee/frame/model/auto/WtReportSub.java
  15. 23 0
      src/main/java/com/gyee/frame/model/custom/CorrespondingVo.java
  16. 124 0
      src/main/java/com/gyee/frame/service/RecommenmainService.java
  17. 106 1
      src/main/java/com/gyee/frame/service/Windturbineinfodaytop2Service.java
  18. 134 0
      src/main/java/com/gyee/frame/service/WobugeqService.java
  19. 26 0
      src/main/java/com/gyee/frame/service/WtTragetReportChartService.java
  20. 162 0
      src/main/java/com/gyee/frame/service/report/WtHealthReportMonthService.java
  21. 8 3
      src/main/resources/application-dev.yml
  22. 17 17
      src/main/resources/mybatis-generator.xml
  23. 460 0
      src/main/resources/mybatis/auto/RecommenmainMapper.xml
  24. 1226 0
      src/main/resources/mybatis/auto/WobugeqMapper.xml
  25. 62 0
      src/test/java/test/WtHealthReportMonthTest.java

+ 19 - 7
pom.xml

@@ -81,6 +81,11 @@
 			<artifactId>ojdbc6</artifactId>
 			<version>11.2.0.3</version>
 		</dependency>
+		<dependency>
+		<groupId>com.microsoft.sqlserver</groupId>
+		<artifactId>sqljdbc4</artifactId>
+		<version>4.0</version>
+		</dependency>
 		<!-- mysql驱动8.0
 		 <dependency> 
 		 	<groupId>mysql</groupId> 
@@ -290,16 +295,23 @@
 					<configurationFile>src/main/resources/mybatis-generator.xml</configurationFile>
 				</configuration>
 				<dependencies>
-					<dependency>
-						<groupId>mysql</groupId>
-						<artifactId>mysql-connector-java</artifactId>
-						<version>${mysql.version}</version>
-					</dependency>
-			<!--<dependency>
+<!--					<dependency>-->
+<!--						<groupId>mysql</groupId>-->
+<!--						<artifactId>mysql-connector-java</artifactId>-->
+<!--						<version>${mysql.version}</version>-->
+<!--					</dependency>-->
+			<dependency>
                 <groupId>com.oracle</groupId>
                 <artifactId>ojdbc6</artifactId>
                 <version>11.2.0.3</version>
-            </dependency>-->
+            </dependency>
+
+<!--					<dependency>-->
+<!--					<groupId>com.microsoft.sqlserver</groupId>-->
+<!--					<artifactId>sqljdbc4</artifactId>-->
+<!--					<version>4.0</version>-->
+<!--				    </dependency>-->
+
         </dependencies>
     </plugin>
     <!-- jar运行配置 -->

+ 22 - 12
src/main/java/com/gyee/frame/common/conf/MybatisConfig.java

@@ -1,12 +1,12 @@
 package com.gyee.frame.common.conf;
 
-import java.util.HashMap;
-import java.util.Map;
-import javax.sql.DataSource;
+import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
+import com.gyee.frame.common.dataSources.DataSourceType;
+import com.gyee.frame.common.dataSources.DynamicDataSource;
 import org.apache.ibatis.session.SqlSessionFactory;
 import org.mybatis.spring.SqlSessionFactoryBean;
 import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -15,9 +15,10 @@ import org.springframework.core.io.Resource;
 import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
 import org.springframework.jdbc.datasource.DataSourceTransactionManager;
 import org.springframework.transaction.PlatformTransactionManager;
-import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
-import com.gyee.frame.common.dataSources.DataSourceType;
-import com.gyee.frame.common.dataSources.DynamicDataSource;
+
+import javax.sql.DataSource;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * Mybatis多数据源配置
@@ -29,29 +30,38 @@ import com.gyee.frame.common.dataSources.DynamicDataSource;
 @Configuration
 @MapperScan(basePackages = "com.gyee.frame.mapper")
 public class MybatisConfig {
-	
-	@Bean
+
+    @Bean(name = "master")
     @ConfigurationProperties("spring.datasource.druid.master")
     public DataSource masterDataSource()
     {
         return DruidDataSourceBuilder.create().build();
     }
 
-    @Bean
+    @Bean(name = "slave")
     @ConfigurationProperties("spring.datasource.druid.slave")
-    @ConditionalOnProperty(prefix = "spring.datasource.druid.slave", name = "enabled", havingValue = "true")
+//    @ConditionalOnProperty(prefix = "spring.datasource.druid.slave", name = "enabled", havingValue = "true")
     public DataSource slaveDataSource()
     {
         return DruidDataSourceBuilder.create().build();
     }
 
+    @Bean(name = "ticket")
+    @ConfigurationProperties("spring.datasource.druid.ticket")
+//    @ConditionalOnProperty(prefix = "spring.datasource.druid.ticket", name = "enabled", havingValue = "true")
+    public DataSource ticketDataSource()
+    {
+        return DruidDataSourceBuilder.create().build();
+    }
+
     @Bean(name = "dynamicDataSource")
     @Primary
-    public DynamicDataSource dataSource(DataSource masterDataSource, DataSource slaveDataSource)
+    public DynamicDataSource dataSource(@Qualifier("master")DataSource masterDataSource, @Qualifier("slave")DataSource slaveDataSource, @Qualifier("ticket")DataSource ticketDataSource)
     {
         Map<Object, Object> targetDataSources = new HashMap<>();
         targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
     	targetDataSources.put(DataSourceType.SLAVE.name(),slaveDataSource);
+        targetDataSources.put(DataSourceType.TICKET.name(),ticketDataSource);
         return new DynamicDataSource(masterDataSource(), targetDataSources);
     }
 

+ 3 - 3
src/main/java/com/gyee/frame/common/dataSources/DataSourceAspect.java

@@ -23,13 +23,13 @@ import java.lang.reflect.Method;
 //@EnableAsync
 public class DataSourceAspect {
 	//private static final Logger log = LoggerFactory.getLogger(DataSourceAspect.class);
-	
+
 	@Pointcut("@annotation(com.gyee.frame.common.dataSources.DataSource)")
     public void dsPointCut()
     {
 
     }
-	
+
 	@Around("dsPointCut()")
     public Object around(ProceedingJoinPoint point) throws Throwable
     {
@@ -54,7 +54,7 @@ public class DataSourceAspect {
         	DataSourceContextHolder.clearDataSource();
         }
     }
-	
+
 	 /**
      * 获取需要切换的数据源
      */

+ 2 - 1
src/main/java/com/gyee/frame/common/dataSources/DataSourceType.java

@@ -8,5 +8,6 @@ package com.gyee.frame.common.dataSources;
  */
 public enum DataSourceType {
 	MASTER,
-	SLAVE
+	SLAVE,
+	TICKET
 }

+ 40 - 1
src/main/java/com/gyee/frame/common/support/Convert.java

@@ -301,6 +301,22 @@ public class Convert
         return toIntArray(",", str);
     }
 
+    /**
+     * 转换为Double数组<br>
+     *
+     * @return 结果
+     */
+    public static Double[] toDoubleArray(String str)
+    {
+        return toDoubleArray(",", str);
+    }
+
+
+    public static List<Double> toDoubleArrayList(String str){
+        Double[] stringArray= toDoubleArray(str);
+        List<Double> stringB = Arrays.asList(stringArray);
+        return stringB;
+    }
 
     public static List<Integer> toIntArrayList(String str){
         Integer[] stringArray= toIntArray(str);
@@ -331,7 +347,7 @@ public class Convert
 
     /**
      * 转换为Integer数组<br>
-     * 
+     *
      * @param split 分隔符
      * @param split 被转换的值
      * @return 结果
@@ -353,6 +369,29 @@ public class Convert
     }
 
     /**
+     * 转换为Double数组<br>
+     *
+     * @param split 分隔符
+     * @param split 被转换的值
+     * @return 结果
+     */
+    public static Double[] toDoubleArray(String split, String str)
+    {
+        if (StringUtils.isEmpty(str))
+        {
+            return new Double[] {};
+        }
+        String[] arr = str.split(split);
+        final Double[] ints = new Double[arr.length];
+        for (int i = 0; i < arr.length; i++)
+        {
+            final Double v = toDouble(arr[i], 0.0);
+            ints[i] = v;
+        }
+        return ints;
+    }
+
+    /**
      * 转换为Long数组<br>
      * 
      * @return 结果

+ 153 - 0
src/main/java/com/gyee/frame/controller/report/WtHealthReportMonthController.java

@@ -0,0 +1,153 @@
+package com.gyee.frame.controller.report;
+
+import com.gyee.frame.common.base.BaseController;
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.auto.Recommenmain;
+import com.gyee.frame.model.auto.Wobugeq;
+import com.gyee.frame.model.auto.WtTragetReportChart;
+import com.gyee.frame.service.report.WtHealthReportMonthService;
+import com.gyee.frame.util.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+@Controller
+@RequestMapping("/reportmonth")
+public class WtHealthReportMonthController extends BaseController {
+	private static Logger logger = LoggerFactory.getLogger(WtHealthReportMonthController.class);
+
+	@Resource
+	private WtHealthReportMonthService wtHealthReportMonthService;
+
+
+
+	/**
+	 * 查询健康包括部件健康指数的历史图表
+	 * @param wtId
+	 * @param partId
+	 * zk	主控
+	 * clx	齿轮箱
+	 * fdj	发电机
+	 * bj	变桨
+	 * @param recorddate
+	 * @return
+	 */
+	@PostMapping("/healthReportChart")
+	@ResponseBody
+	public AjaxResult healthReportChart(String wtId,String partId, String recorddate)  {
+
+		List<WtTragetReportChart> vos=new ArrayList<>();
+
+		if(StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+		{
+			vos=wtHealthReportMonthService.healthReportChart(wtId,partId, recorddate);
+		}
+
+
+
+		if (null!=vos) {
+			return AjaxResult.successData(AjaxStatus.success.code, vos);
+		} else {
+			return AjaxResult.successData(AjaxStatus.emptyresultset.code, vos);
+		}
+
+	}
+
+
+	/**
+	 * 查询生产系统月度风机检修情况
+	 * @param wtId
+	 * @param recorddate
+	 * @return
+	 */
+	@PostMapping("/getWobugeqList")
+	@ResponseBody
+	public AjaxResult getWobugeqList(String wtId, String recorddate)  {
+
+		List<Wobugeq> vos=new ArrayList<>();
+
+		if(StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+		{
+			vos=wtHealthReportMonthService.getWobugeqList(wtId, recorddate);
+		}
+
+		if (null!=vos) {
+			return AjaxResult.successData(AjaxStatus.success.code, vos);
+		} else {
+			return AjaxResult.successData(AjaxStatus.emptyresultset.code, vos);
+		}
+
+	}
+
+
+	/**
+	 * 查询生产系统月度风机检修情况
+	 * @param wtId
+	 * @param recorddate
+	 * @return
+	 */
+	@PostMapping("/getRecommenmainList")
+	@ResponseBody
+	public AjaxResult getRecommenmainList(String wtId, String recorddate)  {
+
+		List<Recommenmain> vos=new ArrayList<>();
+
+		if(StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+		{
+			vos=wtHealthReportMonthService.getRecommenmainList(wtId, recorddate);
+		}
+
+
+
+		if (null!=vos) {
+			return AjaxResult.successData(AjaxStatus.success.code, vos);
+		} else {
+			return AjaxResult.successData(AjaxStatus.emptyresultset.code, vos);
+		}
+
+	}
+
+
+	/**
+	 * 查询生产系统月度风机检修情况
+	 * @param wtId
+	 * @param recorddate
+	 * @return
+	 *
+	 * map.put(" wid ", po); 等级评估对象
+	 * map.put("vos",vos); 等级评估雷达图数据
+	 */
+	@PostMapping("/gamonthlistByWtId")
+	@ResponseBody
+	public AjaxResult gamonthlistByWtId(String wtId, String recorddate)  {
+
+		Map<String,Object> map=new HashMap<>();
+
+		if(StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+		{
+			map=wtHealthReportMonthService.gamonthlistByWtId(wtId, recorddate);
+		}
+
+
+
+		if (null!=map) {
+			return AjaxResult.successData(AjaxStatus.success.code, map);
+		} else {
+			return AjaxResult.successData(AjaxStatus.emptyresultset.code, map);
+		}
+
+	}
+
+
+}

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

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

+ 101 - 0
src/main/java/com/gyee/frame/mapper/auto/WobugeqMapper.java

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

+ 576 - 0
src/main/java/com/gyee/frame/model/auto/Recommenmain.java

@@ -0,0 +1,576 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class Recommenmain implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.RID
+     *
+     * @mbg.generated
+     */
+    private String rid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.ID
+     *
+     * @mbg.generated
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.WTID
+     *
+     * @mbg.generated
+     */
+    private String wtid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.RECODEDATE
+     *
+     * @mbg.generated
+     */
+    private Date recodedate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.CREATEDATE
+     *
+     * @mbg.generated
+     */
+    private Date createdate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.SPEED
+     *
+     * @mbg.generated
+     */
+    private BigDecimal speed;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.REASON
+     *
+     * @mbg.generated
+     */
+    private String reason;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.ISMAIN
+     *
+     * @mbg.generated
+     */
+    private String ismain;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.WOBUGID
+     *
+     * @mbg.generated
+     */
+    private String wobugid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.OPERATION
+     *
+     * @mbg.generated
+     */
+    private String operation;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.OPERATIONDATE
+     *
+     * @mbg.generated
+     */
+    private Date operationdate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.REMARK
+     *
+     * @mbg.generated
+     */
+    private String remark;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.BAK1
+     *
+     * @mbg.generated
+     */
+    private String bak1;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.BAK2
+     *
+     * @mbg.generated
+     */
+    private String bak2;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.WPID
+     *
+     * @mbg.generated
+     */
+    private String wpid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.WTNUM
+     *
+     * @mbg.generated
+     */
+    private Integer wtnum;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.WPNUM
+     *
+     * @mbg.generated
+     */
+    private Integer wpnum;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table RECOMMENMAIN
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.RID
+     *
+     * @return the value of RECOMMENMAIN.RID
+     *
+     * @mbg.generated
+     */
+    public String getRid() {
+        return rid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.RID
+     *
+     * @param rid the value for RECOMMENMAIN.RID
+     *
+     * @mbg.generated
+     */
+    public void setRid(String rid) {
+        this.rid = rid == null ? null : rid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.ID
+     *
+     * @return the value of RECOMMENMAIN.ID
+     *
+     * @mbg.generated
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.ID
+     *
+     * @param id the value for RECOMMENMAIN.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.WTID
+     *
+     * @return the value of RECOMMENMAIN.WTID
+     *
+     * @mbg.generated
+     */
+    public String getWtid() {
+        return wtid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.WTID
+     *
+     * @param wtid the value for RECOMMENMAIN.WTID
+     *
+     * @mbg.generated
+     */
+    public void setWtid(String wtid) {
+        this.wtid = wtid == null ? null : wtid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.RECODEDATE
+     *
+     * @return the value of RECOMMENMAIN.RECODEDATE
+     *
+     * @mbg.generated
+     */
+    public Date getRecodedate() {
+        return recodedate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.RECODEDATE
+     *
+     * @param recodedate the value for RECOMMENMAIN.RECODEDATE
+     *
+     * @mbg.generated
+     */
+    public void setRecodedate(Date recodedate) {
+        this.recodedate = recodedate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.CREATEDATE
+     *
+     * @return the value of RECOMMENMAIN.CREATEDATE
+     *
+     * @mbg.generated
+     */
+    public Date getCreatedate() {
+        return createdate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.CREATEDATE
+     *
+     * @param createdate the value for RECOMMENMAIN.CREATEDATE
+     *
+     * @mbg.generated
+     */
+    public void setCreatedate(Date createdate) {
+        this.createdate = createdate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.SPEED
+     *
+     * @return the value of RECOMMENMAIN.SPEED
+     *
+     * @mbg.generated
+     */
+    public BigDecimal getSpeed() {
+        return speed;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.SPEED
+     *
+     * @param speed the value for RECOMMENMAIN.SPEED
+     *
+     * @mbg.generated
+     */
+    public void setSpeed(BigDecimal speed) {
+        this.speed = speed;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.REASON
+     *
+     * @return the value of RECOMMENMAIN.REASON
+     *
+     * @mbg.generated
+     */
+    public String getReason() {
+        return reason;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.REASON
+     *
+     * @param reason the value for RECOMMENMAIN.REASON
+     *
+     * @mbg.generated
+     */
+    public void setReason(String reason) {
+        this.reason = reason == null ? null : reason.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.ISMAIN
+     *
+     * @return the value of RECOMMENMAIN.ISMAIN
+     *
+     * @mbg.generated
+     */
+    public String getIsmain() {
+        return ismain;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.ISMAIN
+     *
+     * @param ismain the value for RECOMMENMAIN.ISMAIN
+     *
+     * @mbg.generated
+     */
+    public void setIsmain(String ismain) {
+        this.ismain = ismain == null ? null : ismain.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.WOBUGID
+     *
+     * @return the value of RECOMMENMAIN.WOBUGID
+     *
+     * @mbg.generated
+     */
+    public String getWobugid() {
+        return wobugid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.WOBUGID
+     *
+     * @param wobugid the value for RECOMMENMAIN.WOBUGID
+     *
+     * @mbg.generated
+     */
+    public void setWobugid(String wobugid) {
+        this.wobugid = wobugid == null ? null : wobugid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.OPERATION
+     *
+     * @return the value of RECOMMENMAIN.OPERATION
+     *
+     * @mbg.generated
+     */
+    public String getOperation() {
+        return operation;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.OPERATION
+     *
+     * @param operation the value for RECOMMENMAIN.OPERATION
+     *
+     * @mbg.generated
+     */
+    public void setOperation(String operation) {
+        this.operation = operation == null ? null : operation.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.OPERATIONDATE
+     *
+     * @return the value of RECOMMENMAIN.OPERATIONDATE
+     *
+     * @mbg.generated
+     */
+    public Date getOperationdate() {
+        return operationdate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.OPERATIONDATE
+     *
+     * @param operationdate the value for RECOMMENMAIN.OPERATIONDATE
+     *
+     * @mbg.generated
+     */
+    public void setOperationdate(Date operationdate) {
+        this.operationdate = operationdate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.REMARK
+     *
+     * @return the value of RECOMMENMAIN.REMARK
+     *
+     * @mbg.generated
+     */
+    public String getRemark() {
+        return remark;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.REMARK
+     *
+     * @param remark the value for RECOMMENMAIN.REMARK
+     *
+     * @mbg.generated
+     */
+    public void setRemark(String remark) {
+        this.remark = remark == null ? null : remark.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.BAK1
+     *
+     * @return the value of RECOMMENMAIN.BAK1
+     *
+     * @mbg.generated
+     */
+    public String getBak1() {
+        return bak1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.BAK1
+     *
+     * @param bak1 the value for RECOMMENMAIN.BAK1
+     *
+     * @mbg.generated
+     */
+    public void setBak1(String bak1) {
+        this.bak1 = bak1 == null ? null : bak1.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.BAK2
+     *
+     * @return the value of RECOMMENMAIN.BAK2
+     *
+     * @mbg.generated
+     */
+    public String getBak2() {
+        return bak2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.BAK2
+     *
+     * @param bak2 the value for RECOMMENMAIN.BAK2
+     *
+     * @mbg.generated
+     */
+    public void setBak2(String bak2) {
+        this.bak2 = bak2 == null ? null : bak2.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.WPID
+     *
+     * @return the value of RECOMMENMAIN.WPID
+     *
+     * @mbg.generated
+     */
+    public String getWpid() {
+        return wpid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.WPID
+     *
+     * @param wpid the value for RECOMMENMAIN.WPID
+     *
+     * @mbg.generated
+     */
+    public void setWpid(String wpid) {
+        this.wpid = wpid == null ? null : wpid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.WTNUM
+     *
+     * @return the value of RECOMMENMAIN.WTNUM
+     *
+     * @mbg.generated
+     */
+    public Integer getWtnum() {
+        return wtnum;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.WTNUM
+     *
+     * @param wtnum the value for RECOMMENMAIN.WTNUM
+     *
+     * @mbg.generated
+     */
+    public void setWtnum(Integer wtnum) {
+        this.wtnum = wtnum;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.WPNUM
+     *
+     * @return the value of RECOMMENMAIN.WPNUM
+     *
+     * @mbg.generated
+     */
+    public Integer getWpnum() {
+        return wpnum;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.WPNUM
+     *
+     * @param wpnum the value for RECOMMENMAIN.WPNUM
+     *
+     * @mbg.generated
+     */
+    public void setWpnum(Integer wpnum) {
+        this.wpnum = wpnum;
+    }
+}

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


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


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


+ 13 - 13
src/main/java/com/gyee/frame/model/auto/WtReportMain.java

@@ -18,7 +18,7 @@ public class WtReportMain implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportmain.RECODEDATE
      *
-     * @mbg.generated
+     * 报告创建日期
      */
     private Date recodedate;
 
@@ -27,7 +27,7 @@ public class WtReportMain implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportmain.WTID
      *
-     * @mbg.generated
+     * 风机编号
      */
     private String wtid;
 
@@ -36,7 +36,7 @@ public class WtReportMain implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportmain.MAINREASON
      *
-     * @mbg.generated
+     * 检修原因
      */
     private String mainreason;
 
@@ -45,7 +45,7 @@ public class WtReportMain implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportmain.MAINDATE
      *
-     * @mbg.generated
+     * 检修日期
      */
     private Date maindate;
 
@@ -54,7 +54,7 @@ public class WtReportMain implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportmain.SPEED
      *
-     * @mbg.generated
+     * 预测检修日风速
      */
     private Double speed;
 
@@ -63,7 +63,7 @@ public class WtReportMain implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportmain.MAINMETHOD
      *
-     * @mbg.generated
+     * 检修方法
      */
     private String mainmethod;
 
@@ -72,7 +72,7 @@ public class WtReportMain implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportmain.APPROACH
      *
-     * @mbg.generated
+     * 检修步骤
      */
     private String approach;
 
@@ -81,7 +81,7 @@ public class WtReportMain implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportmain.TOOLS
      *
-     * @mbg.generated
+     * 检修工具
      */
     private String tools;
 
@@ -90,7 +90,7 @@ public class WtReportMain implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportmain.MAINHOUR
      *
-     * @mbg.generated
+     * 平均检修时长
      */
     private Double mainhour;
 
@@ -144,7 +144,7 @@ public class WtReportMain implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportmain.GZTOP3NAME
      *
-     * @mbg.generated
+     * 是否推荐检修说明
      */
     private String gztop3name;
 
@@ -207,7 +207,7 @@ public class WtReportMain implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportmain.TOP1TYPE
      *
-     * @mbg.generated
+     * 故障预测1
      */
     private String top1type;
 
@@ -216,7 +216,7 @@ public class WtReportMain implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportmain.TOP2TYPE
      *
-     * @mbg.generated
+     *故障预测2
      */
     private String top2type;
 
@@ -225,7 +225,7 @@ public class WtReportMain implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportmain.TOP3TYPE
      *
-     * @mbg.generated
+     *故障预测3
      */
     private String top3type;
 

+ 17 - 17
src/main/java/com/gyee/frame/model/auto/WtReportSub.java

@@ -18,7 +18,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.TID
      *
-     * @mbg.generated
+     * 主表id
      */
     private String tid;
 
@@ -27,7 +27,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.WTID
      *
-     * @mbg.generated
+     * 风机编号
      */
     private String wtid;
 
@@ -36,7 +36,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.RECODEDATE
      *
-     * @mbg.generated
+     * 报告日期
      */
     private Date recodedate;
 
@@ -45,7 +45,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.FDL
      *
-     * @mbg.generated
+     * 发电量
      */
     private Double fdl;
 
@@ -54,7 +54,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.SBKLYL
      *
-     * @mbg.generated
+     * 设备可利用率
      */
     private Double sbklyl;
 
@@ -63,7 +63,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.FNLYL
      *
-     * @mbg.generated
+     * 风能利用率
      */
     private Double fnlyl;
 
@@ -72,7 +72,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.GZSS
      *
-     * @mbg.generated
+     * 故障损失
      */
     private Double gzss;
 
@@ -81,7 +81,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.WHSS
      *
-     * @mbg.generated
+     * 检修损失(维护损失)
      */
     private Double whss;
 
@@ -90,7 +90,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.XDSS
      *
-     * @mbg.generated
+     * 限电损失
      */
     private Double xdss;
 
@@ -99,7 +99,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.XNSS
      *
-     * @mbg.generated
+     * 性能损失
      */
     private Double xnss;
 
@@ -108,7 +108,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.SLSS
      *
-     * @mbg.generated
+     * 受累损失
      */
     private Double slss;
 
@@ -117,7 +117,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.QXPCL
      *
-     * @mbg.generated
+     * 曲线偏差率
      */
     private Double qxpcl;
 
@@ -126,7 +126,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.QXPCLJZZ
      *
-     * @mbg.generated
+     * 曲线偏差率基准值
      */
     private Double qxpcljzz;
 
@@ -135,7 +135,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.XNSSL
      *
-     * @mbg.generated
+     * 性能损失率
      */
     private Double xnssl;
 
@@ -153,7 +153,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.DJPGJB
      *
-     * @mbg.generated
+     * 等级评估级别
      */
     private String djpgjb;
 
@@ -162,7 +162,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.STOPHOURS
      *
-     * @mbg.generated
+     * 停机时长
      */
     private Double stophours;
 
@@ -171,7 +171,7 @@ public class WtReportSub implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column wtreportsub.STOPTIMES
      *
-     * @mbg.generated
+     * 停机次数
      */
     private Long stoptimes;
 

+ 23 - 0
src/main/java/com/gyee/frame/model/custom/CorrespondingVo.java

@@ -0,0 +1,23 @@
+package com.gyee.frame.model.custom;
+
+public class CorrespondingVo {
+	private Integer misid;
+	private String sisid;
+
+	public Integer getMisid() {
+		return misid;
+	}
+
+	public void setMisid(Integer misid) {
+		this.misid = misid;
+	}
+
+	public String getSisid() {
+		return sisid;
+	}
+
+	public void setSisid(String sisid) {
+		this.sisid = sisid;
+	}
+
+}

+ 124 - 0
src/main/java/com/gyee/frame/service/RecommenmainService.java

@@ -0,0 +1,124 @@
+package com.gyee.frame.service;
+
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.RecommenmainMapper;
+import com.gyee.frame.model.auto.Recommenmain;
+import com.gyee.frame.model.auto.RecommenmainExample;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 线路 RecommenmainService
+ * @Title: RecommenmainService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-31 14:58:09  
+ **/
+@Service
+public class RecommenmainService implements BaseService<Recommenmain, RecommenmainExample> {
+	@Autowired
+	private RecommenmainMapper recommenmainMapper;
+	
+
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<Integer> lista=Convert.toIntArrayList(ids);
+			RecommenmainExample example=new RecommenmainExample();
+			example.createCriteria().andIdIn(lista);
+			return recommenmainMapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	public Recommenmain selectByPrimaryKey(String id) {
+				
+			return recommenmainMapper.selectByPrimaryKey(id);
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(Recommenmain record) {
+		return recommenmainMapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(Recommenmain record) {
+				
+
+				
+		return recommenmainMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(Recommenmain record, RecommenmainExample example) {
+		
+		return recommenmainMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(Recommenmain record, RecommenmainExample example) {
+		
+		return recommenmainMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<Recommenmain> selectByExample(RecommenmainExample example) {
+		
+		return recommenmainMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(RecommenmainExample example) {
+		
+		return recommenmainMapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(RecommenmainExample example) {
+		
+		return recommenmainMapper.deleteByExample(example);
+	}
+
+	public List<Recommenmain> getRecommenmainList(String wtId, Date beginDate, Date endDate) {
+
+
+		List<Recommenmain> list=new ArrayList<>();
+
+		if (StringUtils.notEmp(wtId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+
+			RecommenmainExample example=new RecommenmainExample();
+			example.setOrderByClause("recodedate asc");
+
+			RecommenmainExample.Criteria criteria =example.createCriteria();
+			criteria.andWtidEqualTo(wtId);
+			criteria.andRecodedateGreaterThanOrEqualTo(beginDate).andRecodedateLessThan(endDate);
+
+
+			list= recommenmainMapper.selectByExample(example);
+
+		}
+		return list;
+
+	}
+
+}

+ 106 - 1
src/main/java/com/gyee/frame/service/Windturbineinfodaytop2Service.java

@@ -302,6 +302,27 @@ public class Windturbineinfodaytop2Service implements BaseService<Windturbineinf
 
 		return list;
 	}
+
+
+	public List<Windturbineinfodaytop2> gamonthlistByWtId(String wtId, String year,String month)  {
+		List<Windturbineinfodaytop2> list=null;
+
+		Windturbineinfodaytop2Example example=new Windturbineinfodaytop2Example();
+		example.setOrderByClause("windturbineid ASC");
+
+		if(StringUtils.isNotEmpty(year) && StringUtils.isNotEmpty(month) &&  StringUtils.isNotEmpty(wtId)){
+
+
+			example.createCriteria().andWindturbineidEqualTo(wtId).andTypeEqualTo(2).andYearEqualTo(Integer.valueOf(year)).andMonthEqualTo(Integer.valueOf(month));
+			list= windturbineinfodaytop2Mapper.selectByExample(example);
+		}else
+		{
+			list=new ArrayList<>();
+		}
+
+
+		return list;
+	}
 	/******************************************************************************************************************/
 	public List<ValueVo> wtchart(String gaid) {
 
@@ -390,5 +411,89 @@ public class Windturbineinfodaytop2Service implements BaseService<Windturbineinf
 		return new ArrayList<>();
 	}
 
-	
+	public List<ValueVo> wtchart(Windturbineinfodaytop2 wtd) {
+
+
+		if (StringUtils.notEmp(wtd)) {
+			List<ValueVo> vos = new ArrayList<ValueVo>();
+
+
+			for (int i = 0; i < 10; i++) {
+				ValueVo vo = new ValueVo();
+
+				switch (i) {
+					case 0:
+						// vo.setName("N("+winfo.getN4()+"/"+winfo.getN()+")");
+						vo.setName("平均切入风速");
+						// vo.setData1(wtd.getMonthxfqr());
+						vo.setData1(wtd.getYearxfqr());
+						break;
+					case 1:
+						// vo.setName("NNE("+winfo.getNne4()+"/"+winfo.getNne()+")");
+						vo.setName("性能损失电量");
+						// vo.setData1(wtd.getMonthxnssdl());
+						vo.setData1(wtd.getYearxnssdl());
+						break;
+					case 2:
+						// vo.setName("NE("+winfo.getNe4()+"/"+winfo.getNe()+")");
+						vo.setName("拟合优度");
+						// vo.setData1(wtd.getMonthnhyd());
+						vo.setData1(wtd.getYearnhyd());
+						break;
+					case 3:
+						// vo.setName("ENE("+winfo.getEne4()+"/"+winfo.getEne()+")");
+						vo.setName("功率一致性系数");
+						// vo.setData1(wtd.getMonthglyzxxs());
+						vo.setData1(wtd.getYearglyzxxs());
+						break;
+					case 4:
+						// vo.setName("E("+winfo.getE4()+"/"+winfo.getE()+")");
+						vo.setName("利用小时");
+						// vo.setData1(wtd.getMonthlyxs());
+						vo.setData1(wtd.getYearlyxs());
+						break;
+					case 5:
+						// vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
+						vo.setName("设备可利用率");
+						// vo.setData1(wtd.getMonthsbklyl());
+						vo.setData1(wtd.getYearsbklyl());
+						break;
+					case 6:
+						// vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
+						vo.setName("等效可利用系数");
+						// vo.setData1(wtd.getMonthdxkyxs());
+						vo.setData1(wtd.getYeardxkyxs());
+						break;
+					case 7:
+						// vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
+						vo.setName("有效风时数");
+						// vo.setData1(wtd.getMonthyxfss());
+						vo.setData1(wtd.getYearyxfss());
+						break;
+					case 8:
+						// vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
+						vo.setName("平均风速");
+						// vo.setData1(wtd.getMonthdxkyxs());
+						vo.setData1(wtd.getYeardxkyxs());
+						break;
+					case 9:
+						// vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
+						vo.setName("静风频率");
+						// vo.setData1(wtd.getMonthdxkyxs());
+						vo.setData1(wtd.getYeardxkyxs());
+						break;
+					default:
+						break;
+				}
+
+				vos.add(vo);
+
+			}
+
+			return	vos;
+
+		}
+
+		return new ArrayList<>();
+	}
 }

+ 134 - 0
src/main/java/com/gyee/frame/service/WobugeqService.java

@@ -0,0 +1,134 @@
+package com.gyee.frame.service;
+
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.WobugeqMapper;
+import com.gyee.frame.model.auto.Wobugeq;
+import com.gyee.frame.model.auto.WobugeqExample;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 线路 WobugeqService
+ * @Title: WobugeqService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-31 14:58:09  
+ **/
+@Service
+public class WobugeqService implements BaseService<Wobugeq, WobugeqExample> {
+	@Autowired
+	private WobugeqMapper wobugeqMapper;
+	
+
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<Double> lista=Convert.toDoubleArrayList(ids);
+			WobugeqExample example=new WobugeqExample();
+			example.createCriteria().andIdIn(lista);
+			return wobugeqMapper.deleteByExample(example);
+
+
+	}
+	
+	
+	@Override
+	public Wobugeq selectByPrimaryKey(String id) {
+				
+			return wobugeqMapper.selectByPrimaryKey(Double.valueOf(id));
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(Wobugeq record) {
+		return wobugeqMapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(Wobugeq record) {
+				
+
+				
+		return wobugeqMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(Wobugeq record, WobugeqExample example) {
+		
+		return wobugeqMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(Wobugeq record, WobugeqExample example) {
+		
+		return wobugeqMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<Wobugeq> selectByExample(WobugeqExample example) {
+		
+		return wobugeqMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(WobugeqExample example) {
+		
+		return wobugeqMapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(WobugeqExample example) {
+		
+		return wobugeqMapper.deleteByExample(example);
+	}
+
+	public List<Wobugeq> getWobugeqList(String wtId,Date beginDate,Date endDate) {
+
+		List<Wobugeq> list=new ArrayList<>();
+
+		if(StringUtils.notEmp(wtId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate))
+		{
+			List<Integer> ls=wobugeqMapper.getWtnum(wtId);
+			if(!ls.isEmpty())
+			{
+				int wtnum=ls.get(0);
+
+
+					WobugeqExample example=new WobugeqExample();
+					example.setOrderByClause("transmittime asc");
+
+					WobugeqExample.Criteria criteria =example.createCriteria();
+
+					criteria.andTransmittimeGreaterThanOrEqualTo(beginDate).andTransmittimeLessThan(endDate);
+
+					criteria.andWtnumEqualTo(String.valueOf(wtnum));
+
+					list= wobugeqMapper.selectByExample(example);
+
+
+			}
+
+		}
+
+		return list;
+
+	}
+
+}

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

@@ -6,6 +6,7 @@ import com.gyee.frame.mapper.auto.WtTragetReportChartMapper;
 import com.gyee.frame.model.auto.WtTragetReportChart;
 import com.gyee.frame.model.auto.WtTragetReportChartExample;
 import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -110,4 +111,29 @@ public class WtTragetReportChartService implements BaseService<WtTragetReportCha
 		return list;
 
 	}
+
+	public List<WtTragetReportChart> healthReportChart(String wtId,String partId, Date beginDate,Date endDate) {
+
+
+		List<WtTragetReportChart> list=new ArrayList<>();
+
+		if(StringUtils.notEmp(wtId) && StringUtils.notEmp(partId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate) )
+		{
+			WtTragetReportChartExample example=new WtTragetReportChartExample();
+			example.setOrderByClause("recorddate asc");
+
+			WtTragetReportChartExample.Criteria criteria =example.createCriteria();
+
+			criteria.andWtidEqualTo(wtId);
+			criteria.andPartidEqualTo(partId);
+			criteria.andRecorddateGreaterThanOrEqualTo(beginDate).andRecorddateLessThan(endDate);
+
+			criteria.andParentidEqualTo("null");
+			list= wtTragetReportChartMapper.selectByExample(example);
+		}
+
+
+		return list;
+
+	}
 }

+ 162 - 0
src/main/java/com/gyee/frame/service/report/WtHealthReportMonthService.java

@@ -0,0 +1,162 @@
+package com.gyee.frame.service.report;
+
+import com.gyee.frame.common.dataSources.DataSource;
+import com.gyee.frame.common.dataSources.DataSourceType;
+import com.gyee.frame.model.auto.Recommenmain;
+import com.gyee.frame.model.auto.Windturbineinfodaytop2;
+import com.gyee.frame.model.auto.Wobugeq;
+import com.gyee.frame.model.auto.WtTragetReportChart;
+import com.gyee.frame.model.custom.ValueVo;
+import com.gyee.frame.service.RecommenmainService;
+import com.gyee.frame.service.Windturbineinfodaytop2Service;
+import com.gyee.frame.service.WobugeqService;
+import com.gyee.frame.service.WtTragetReportChartService;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+/**
+ * 线路 LineService
+ * @Title: LineService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-31 14:58:09  
+ **/
+@Service
+public class WtHealthReportMonthService {
+
+	@Resource
+	private WtTragetReportChartService wtTragetReportChartService;
+	@Resource
+	private WobugeqService wobugeqService;
+	@Resource
+	private RecommenmainService recommenmainService;
+	@Resource
+	private Windturbineinfodaytop2Service windturbineinfodaytop2Service;
+
+
+	/**
+	 * 查询健康包括部件健康指数的历史图表
+	 * @param wtId
+	 * @param partId
+	 * @param recorddate
+	 * @return
+	 */
+	public List<WtTragetReportChart> healthReportChart(String wtId,String partId, String recorddate)  {
+
+		List<WtTragetReportChart> vos=new ArrayList<>();
+
+		if(StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+		{
+			Date date= DateUtils.parseStrtoDate(recorddate);
+			Calendar cal = Calendar.getInstance();
+			cal.setTime(date);
+			cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+			Date endDate = cal.getTime();
+			cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+			Date beginDate = cal.getTime();
+			vos=wtTragetReportChartService.healthReportChart(wtId,partId,beginDate,endDate);
+		}
+
+		return vos;
+	}
+
+
+	/**
+	 * 查询生产系统月度风机检修情况
+	 * @param wtId
+	 * @return
+	 */
+	@DataSource(value = DataSourceType.TICKET)
+	public List<Wobugeq> getWobugeqList(String wtId, String recorddate)  {
+
+		List<Wobugeq> vos=new ArrayList<>();
+
+		if(StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+		{
+			Date date= DateUtils.parseStrtoDate(recorddate);
+
+
+			Calendar cal = Calendar.getInstance();
+			cal.setTime(date);
+			cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+			Date endDate = cal.getTime();
+			cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+			Date beginDate = cal.getTime();
+
+			vos=wobugeqService.getWobugeqList(wtId,beginDate,endDate);
+		}
+
+		return vos;
+	}
+
+	/**
+	 * 查询生产系统月度风机检修情况
+	 * @param wtId
+	 * @return
+	 */
+
+	public List<Recommenmain> getRecommenmainList(String wtId, String recorddate)  {
+
+		List<Recommenmain> vos=new ArrayList<>();
+
+		if(StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+		{
+			Date date= DateUtils.parseStrtoDate(recorddate);
+
+
+			Calendar cal = Calendar.getInstance();
+			cal.setTime(date);
+			cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+			Date endDate = cal.getTime();
+			cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+			Date beginDate = cal.getTime();
+
+			vos=recommenmainService.getRecommenmainList(wtId,beginDate,endDate);
+		}
+
+		return vos;
+	}
+
+	/**
+	 * 查询风机等级评估信息
+	 * 	 * @param wtId
+	 * @return
+	 */
+
+	public Map<String,Object> gamonthlistByWtId(String wtId, String recorddate)  {
+
+		Map<String,Object> map=new HashMap<>();
+
+		if(StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+		{
+			Date date= DateUtils.parseStrtoDate(recorddate);
+
+
+			Calendar cal = Calendar.getInstance();
+			cal.setTime(date);
+			int year=cal.get(Calendar.YEAR);
+			int month=cal.get(Calendar.MONTH)+1;
+
+
+			List<Windturbineinfodaytop2> ls=windturbineinfodaytop2Service.gamonthlistByWtId(wtId,String.valueOf(year),String.valueOf(month));
+			if (!ls.isEmpty())
+			{
+				Windturbineinfodaytop2 po=ls.get(0);
+
+				map.put("wid",po);
+				List<ValueVo> vos=windturbineinfodaytop2Service.wtchart(po);
+				map.put("vos",vos);
+			}
+		}
+
+
+
+		return map;
+	}
+
+}

+ 8 - 3
src/main/resources/application-dev.yml

@@ -15,14 +15,19 @@ spring:
         username: nxfdprod
         password: gdnxfd123
         driver-class-name: oracle.jdbc.driver.OracleDriver
-
      #备数据源 #关闭
      slave:
         enabled: false
         url: jdbc:mysql://localhost:3306/springbootv3?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
         username: root
         password: root
-        #配置初始化连接数大小
+      #两票数据源
+     ticket:
+       url: jdbc:sqlserver://10.155.32.2:1433;DatabaseName=fdeam
+       username: sa
+       password: Gyee@321#!
+       driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+      #配置初始化连接数大小
      initial-size: 10
      # 最大连接数
      max-active: 50
@@ -50,7 +55,7 @@ spring:
       stat:
         log-slow-sql: true
         slow-sql-millis: 1000
-        merge-sql: true
+        merge-sql: false
       wall:
         config:
           multi-statement-allow: true

+ 17 - 17
src/main/resources/mybatis-generator.xml

@@ -45,25 +45,25 @@
             <property name="endingDelimiter" value="`" />
         </commentGenerator>
         <!-- 数据库链接地址账号密码 -->
-        <jdbcConnection
-                driverClass="com.mysql.jdbc.Driver"
-                connectionURL="jdbc:mysql://localhost:3306/springbootv2?serverTimezone=UTC"
-                userId="root"
-                password="123456">
-        </jdbcConnection>
 <!--        <jdbcConnection-->
-<!--                driverClass="oracle.jdbc.driver.OracleDriver"-->
-<!--                connectionURL="jdbc:oracle:thin:@192.168.1.105:1521:gdnxfd"-->
-<!--                userId="nxfdprod"-->
-<!--                password="gdnxfd123">-->
+<!--                driverClass="com.mysql.jdbc.Driver"-->
+<!--                connectionURL="jdbc:mysql://localhost:3306/springbootv2?serverTimezone=UTC"-->
+<!--                userId="root"-->
+<!--                password="123456">-->
 <!--        </jdbcConnection>-->
+        <jdbcConnection
+                driverClass="oracle.jdbc.driver.OracleDriver"
+                connectionURL="jdbc:oracle:thin:@192.168.1.105:1521:gdnxfd"
+                userId="nxfdprod"
+                password="gdnxfd123">
+        </jdbcConnection>
 
-        <!--        <jdbcConnection-->
-        <!--                driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver"-->
-        <!--                connectionURL="jdbc:sqlserver://10.155.32.2:1433;DatabaseName=test"-->
-        <!--                userId="sa"-->
-        <!--                password="Gyee@321#!">-->
-        <!--        </jdbcConnection>-->
+<!--                <jdbcConnection-->
+<!--                        driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver"-->
+<!--                        connectionURL="jdbc:sqlserver://10.155.32.2:1433;DatabaseName=fdeam"-->
+<!--                        userId="sa"-->
+<!--                        password="Gyee@321#!">-->
+<!--                </jdbcConnection>-->
         <javaTypeResolver>
             <property name="forceBigDecimals" value="false"/>
         </javaTypeResolver>
@@ -102,7 +102,7 @@
         </table>-->
 
 
-        <table tableName='WtTragetReportChart' domainObjectName='WtTragetReportChart'/>
+        <table tableName='recommenmain' domainObjectName='Recommenmain'/>
 
     </context>
 </generatorConfiguration>

+ 460 - 0
src/main/resources/mybatis/auto/RecommenmainMapper.xml

@@ -0,0 +1,460 @@
+<?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.RecommenmainMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Recommenmain">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="RID" jdbcType="VARCHAR" property="rid" />
+    <result column="ID" jdbcType="DECIMAL" property="id" />
+    <result column="WTID" jdbcType="VARCHAR" property="wtid" />
+    <result column="RECODEDATE" jdbcType="TIMESTAMP" property="recodedate" />
+    <result column="CREATEDATE" jdbcType="TIMESTAMP" property="createdate" />
+    <result column="SPEED" jdbcType="DECIMAL" property="speed" />
+    <result column="REASON" jdbcType="VARCHAR" property="reason" />
+    <result column="ISMAIN" jdbcType="VARCHAR" property="ismain" />
+    <result column="WOBUGID" jdbcType="VARCHAR" property="wobugid" />
+    <result column="OPERATION" jdbcType="VARCHAR" property="operation" />
+    <result column="OPERATIONDATE" jdbcType="TIMESTAMP" property="operationdate" />
+    <result column="REMARK" jdbcType="VARCHAR" property="remark" />
+    <result column="BAK1" jdbcType="VARCHAR" property="bak1" />
+    <result column="BAK2" jdbcType="VARCHAR" property="bak2" />
+    <result column="WPID" jdbcType="VARCHAR" property="wpid" />
+    <result column="WTNUM" jdbcType="DECIMAL" property="wtnum" />
+    <result column="WPNUM" jdbcType="DECIMAL" property="wpnum" />
+  </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.
+    -->
+    RID, ID, WTID, RECODEDATE, CREATEDATE, SPEED, REASON, ISMAIN, WOBUGID, OPERATION, 
+    OPERATIONDATE, REMARK, BAK1, BAK2, WPID, WTNUM, WPNUM
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.RecommenmainExample" 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 RECOMMENMAIN
+    <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.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from RECOMMENMAIN
+    where RID = #{rid,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from RECOMMENMAIN
+    where RID = #{rid,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.RecommenmainExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from RECOMMENMAIN
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.Recommenmain">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into RECOMMENMAIN (RID, ID, WTID, 
+      RECODEDATE, CREATEDATE, SPEED, 
+      REASON, ISMAIN, WOBUGID, 
+      OPERATION, OPERATIONDATE, REMARK, 
+      BAK1, BAK2, WPID, WTNUM, 
+      WPNUM)
+    values (#{rid,jdbcType=VARCHAR}, #{id,jdbcType=DECIMAL}, #{wtid,jdbcType=VARCHAR}, 
+      #{recodedate,jdbcType=TIMESTAMP}, #{createdate,jdbcType=TIMESTAMP}, #{speed,jdbcType=DECIMAL}, 
+      #{reason,jdbcType=VARCHAR}, #{ismain,jdbcType=VARCHAR}, #{wobugid,jdbcType=VARCHAR}, 
+      #{operation,jdbcType=VARCHAR}, #{operationdate,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, 
+      #{bak1,jdbcType=VARCHAR}, #{bak2,jdbcType=VARCHAR}, #{wpid,jdbcType=VARCHAR}, #{wtnum,jdbcType=DECIMAL}, 
+      #{wpnum,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Recommenmain">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into RECOMMENMAIN
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="rid != null">
+        RID,
+      </if>
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="wtid != null">
+        WTID,
+      </if>
+      <if test="recodedate != null">
+        RECODEDATE,
+      </if>
+      <if test="createdate != null">
+        CREATEDATE,
+      </if>
+      <if test="speed != null">
+        SPEED,
+      </if>
+      <if test="reason != null">
+        REASON,
+      </if>
+      <if test="ismain != null">
+        ISMAIN,
+      </if>
+      <if test="wobugid != null">
+        WOBUGID,
+      </if>
+      <if test="operation != null">
+        OPERATION,
+      </if>
+      <if test="operationdate != null">
+        OPERATIONDATE,
+      </if>
+      <if test="remark != null">
+        REMARK,
+      </if>
+      <if test="bak1 != null">
+        BAK1,
+      </if>
+      <if test="bak2 != null">
+        BAK2,
+      </if>
+      <if test="wpid != null">
+        WPID,
+      </if>
+      <if test="wtnum != null">
+        WTNUM,
+      </if>
+      <if test="wpnum != null">
+        WPNUM,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="rid != null">
+        #{rid,jdbcType=VARCHAR},
+      </if>
+      <if test="id != null">
+        #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="wtid != null">
+        #{wtid,jdbcType=VARCHAR},
+      </if>
+      <if test="recodedate != null">
+        #{recodedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createdate != null">
+        #{createdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="speed != null">
+        #{speed,jdbcType=DECIMAL},
+      </if>
+      <if test="reason != null">
+        #{reason,jdbcType=VARCHAR},
+      </if>
+      <if test="ismain != null">
+        #{ismain,jdbcType=VARCHAR},
+      </if>
+      <if test="wobugid != null">
+        #{wobugid,jdbcType=VARCHAR},
+      </if>
+      <if test="operation != null">
+        #{operation,jdbcType=VARCHAR},
+      </if>
+      <if test="operationdate != null">
+        #{operationdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="remark != null">
+        #{remark,jdbcType=VARCHAR},
+      </if>
+      <if test="bak1 != null">
+        #{bak1,jdbcType=VARCHAR},
+      </if>
+      <if test="bak2 != null">
+        #{bak2,jdbcType=VARCHAR},
+      </if>
+      <if test="wpid != null">
+        #{wpid,jdbcType=VARCHAR},
+      </if>
+      <if test="wtnum != null">
+        #{wtnum,jdbcType=DECIMAL},
+      </if>
+      <if test="wpnum != null">
+        #{wpnum,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.RecommenmainExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from RECOMMENMAIN
+    <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 RECOMMENMAIN
+    <set>
+      <if test="record.rid != null">
+        RID = #{record.rid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=DECIMAL},
+      </if>
+      <if test="record.wtid != null">
+        WTID = #{record.wtid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.recodedate != null">
+        RECODEDATE = #{record.recodedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.createdate != null">
+        CREATEDATE = #{record.createdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.speed != null">
+        SPEED = #{record.speed,jdbcType=DECIMAL},
+      </if>
+      <if test="record.reason != null">
+        REASON = #{record.reason,jdbcType=VARCHAR},
+      </if>
+      <if test="record.ismain != null">
+        ISMAIN = #{record.ismain,jdbcType=VARCHAR},
+      </if>
+      <if test="record.wobugid != null">
+        WOBUGID = #{record.wobugid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.operation != null">
+        OPERATION = #{record.operation,jdbcType=VARCHAR},
+      </if>
+      <if test="record.operationdate != null">
+        OPERATIONDATE = #{record.operationdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.remark != null">
+        REMARK = #{record.remark,jdbcType=VARCHAR},
+      </if>
+      <if test="record.bak1 != null">
+        BAK1 = #{record.bak1,jdbcType=VARCHAR},
+      </if>
+      <if test="record.bak2 != null">
+        BAK2 = #{record.bak2,jdbcType=VARCHAR},
+      </if>
+      <if test="record.wpid != null">
+        WPID = #{record.wpid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.wtnum != null">
+        WTNUM = #{record.wtnum,jdbcType=DECIMAL},
+      </if>
+      <if test="record.wpnum != null">
+        WPNUM = #{record.wpnum,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 RECOMMENMAIN
+    set RID = #{record.rid,jdbcType=VARCHAR},
+      ID = #{record.id,jdbcType=DECIMAL},
+      WTID = #{record.wtid,jdbcType=VARCHAR},
+      RECODEDATE = #{record.recodedate,jdbcType=TIMESTAMP},
+      CREATEDATE = #{record.createdate,jdbcType=TIMESTAMP},
+      SPEED = #{record.speed,jdbcType=DECIMAL},
+      REASON = #{record.reason,jdbcType=VARCHAR},
+      ISMAIN = #{record.ismain,jdbcType=VARCHAR},
+      WOBUGID = #{record.wobugid,jdbcType=VARCHAR},
+      OPERATION = #{record.operation,jdbcType=VARCHAR},
+      OPERATIONDATE = #{record.operationdate,jdbcType=TIMESTAMP},
+      REMARK = #{record.remark,jdbcType=VARCHAR},
+      BAK1 = #{record.bak1,jdbcType=VARCHAR},
+      BAK2 = #{record.bak2,jdbcType=VARCHAR},
+      WPID = #{record.wpid,jdbcType=VARCHAR},
+      WTNUM = #{record.wtnum,jdbcType=DECIMAL},
+      WPNUM = #{record.wpnum,jdbcType=DECIMAL}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Recommenmain">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update RECOMMENMAIN
+    <set>
+      <if test="id != null">
+        ID = #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="wtid != null">
+        WTID = #{wtid,jdbcType=VARCHAR},
+      </if>
+      <if test="recodedate != null">
+        RECODEDATE = #{recodedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createdate != null">
+        CREATEDATE = #{createdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="speed != null">
+        SPEED = #{speed,jdbcType=DECIMAL},
+      </if>
+      <if test="reason != null">
+        REASON = #{reason,jdbcType=VARCHAR},
+      </if>
+      <if test="ismain != null">
+        ISMAIN = #{ismain,jdbcType=VARCHAR},
+      </if>
+      <if test="wobugid != null">
+        WOBUGID = #{wobugid,jdbcType=VARCHAR},
+      </if>
+      <if test="operation != null">
+        OPERATION = #{operation,jdbcType=VARCHAR},
+      </if>
+      <if test="operationdate != null">
+        OPERATIONDATE = #{operationdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="remark != null">
+        REMARK = #{remark,jdbcType=VARCHAR},
+      </if>
+      <if test="bak1 != null">
+        BAK1 = #{bak1,jdbcType=VARCHAR},
+      </if>
+      <if test="bak2 != null">
+        BAK2 = #{bak2,jdbcType=VARCHAR},
+      </if>
+      <if test="wpid != null">
+        WPID = #{wpid,jdbcType=VARCHAR},
+      </if>
+      <if test="wtnum != null">
+        WTNUM = #{wtnum,jdbcType=DECIMAL},
+      </if>
+      <if test="wpnum != null">
+        WPNUM = #{wpnum,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where RID = #{rid,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Recommenmain">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update RECOMMENMAIN
+    set ID = #{id,jdbcType=DECIMAL},
+      WTID = #{wtid,jdbcType=VARCHAR},
+      RECODEDATE = #{recodedate,jdbcType=TIMESTAMP},
+      CREATEDATE = #{createdate,jdbcType=TIMESTAMP},
+      SPEED = #{speed,jdbcType=DECIMAL},
+      REASON = #{reason,jdbcType=VARCHAR},
+      ISMAIN = #{ismain,jdbcType=VARCHAR},
+      WOBUGID = #{wobugid,jdbcType=VARCHAR},
+      OPERATION = #{operation,jdbcType=VARCHAR},
+      OPERATIONDATE = #{operationdate,jdbcType=TIMESTAMP},
+      REMARK = #{remark,jdbcType=VARCHAR},
+      BAK1 = #{bak1,jdbcType=VARCHAR},
+      BAK2 = #{bak2,jdbcType=VARCHAR},
+      WPID = #{wpid,jdbcType=VARCHAR},
+      WTNUM = #{wtnum,jdbcType=DECIMAL},
+      WPNUM = #{wpnum,jdbcType=DECIMAL}
+    where RID = #{rid,jdbcType=VARCHAR}
+  </update>
+</mapper>

File diff suppressed because it is too large
+ 1226 - 0
src/main/resources/mybatis/auto/WobugeqMapper.xml


+ 62 - 0
src/test/java/test/WtHealthReportMonthTest.java

@@ -0,0 +1,62 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.controller.report.WtHealthReportMonthController;
+import com.gyee.frame.model.auto.Recommenmain;
+import com.gyee.frame.model.auto.Wobugeq;
+import com.gyee.frame.model.auto.WtTragetReportChart;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.List;
+
+public class WtHealthReportMonthTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+
+
+        String wtid="MG01_01";
+
+        WtHealthReportMonthController wtHealthReportMonthController= SpringUtils.getBean("wtHealthReportMonthController");
+
+
+        AjaxResult ajaxResult =wtHealthReportMonthController.healthReportChart(wtid,"zk","2021-03-24");
+        List<WtTragetReportChart> test2=(List<WtTragetReportChart>)ajaxResult.get("data");
+
+        for(WtTragetReportChart wtd:test2)
+        {
+            System.out.println(wtd.getRecorddate()+"----------------"+wtd.getValue()+"----------------"+wtd.getWtname());
+        }
+        System.out.println("***************************************************************************************");
+
+        AjaxResult ajaxResult2=wtHealthReportMonthController.getWobugeqList(wtid,"2021-03-24");
+        List<Wobugeq> vos2=(List<Wobugeq>)ajaxResult2.get("data");
+
+        for(Wobugeq wtd:vos2)
+        {
+            System.out.println(wtd.getBugnum()+"----------------"+wtd.getCheckdeptopinion()+"----------------"+wtd.getArrivaltime());
+        }
+        AjaxResult ajaxResult3=wtHealthReportMonthController.getRecommenmainList(wtid,"2021-03-24");
+        List<Recommenmain> vos3=(List<Recommenmain>)ajaxResult3.get("data");
+
+        for(Recommenmain wtd:vos3)
+        {
+            System.out.println(wtd.getRecodedate()+"----------------"+wtd.getReason()+"----------------"+wtd.getOperation());
+        }
+//        System.out.println("***************************************************************************************");
+
+//
+
+    }
+
+
+
+
+}