瀏覽代碼

修改mybatis相关业务实体类,完成基础信息初始化加载类内容

shilin 4 年之前
父節點
當前提交
c9c87dc0bb

+ 3 - 1
src/main/java/com/gyee/SpringbootStart.java

@@ -2,7 +2,9 @@ package com.gyee;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
 
 
 /**
@@ -10,7 +12,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
  * @author gyee
  *
  */
-@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
+@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, MongoAutoConfiguration.class, MongoDataAutoConfiguration.class})
 public class SpringbootStart {
 
     public static void main(String[] args) throws Exception {

+ 88 - 10
src/main/java/com/gyee/frame/common/spring/InitialRunner.java

@@ -1,12 +1,12 @@
 package com.gyee.frame.common.spring;
 
-import com.gyee.frame.model.auto.RMConfig;
-import com.gyee.frame.model.auto.RMConfigExample;
-import com.gyee.frame.service.RMConfigService;
-import org.springframework.beans.factory.annotation.Autowired;
+import com.gyee.frame.model.auto.*;
+import com.gyee.frame.service.*;
 import org.springframework.boot.CommandLineRunner;
 import org.springframework.stereotype.Component;
 
+import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -18,23 +18,39 @@ import java.util.Map;
 public class InitialRunner implements CommandLineRunner {
 
 
-    @Autowired
+    @Resource
     private RMConfigService rMConfigService;
+    @Resource
+    private WindpowerstationService windpowerstationService;
+    @Resource
+    private ProjectService projectService;
+    @Resource
+    private LineService lineService;
+    @Resource
+    private WindturbineService windturbineService;
+    @Resource
+    private WindPowerstationTestingPointService windPowerstationTestingPointService;
+    @Resource
+    private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
+    @Resource
+    private WindTurbineTestingPointDiService windTurbineTestingPointDiService;
     //RMConfig
 
     public static Map<String, RMConfig> rmcmap = new HashMap<String, RMConfig>();
+    public static List<Windpowerstation> wpls = new ArrayList<Windpowerstation>(); // 风电场LIST集合
+    public static List<Project> pjls = new ArrayList<Project>(); // 项目LIST集合
+    public static List<Windturbine> wtls = new ArrayList<Windturbine>(); // 风电机LIST集合
+    public static List<Line> lnls = new ArrayList<Line>(); // 线路LIST集合
+
+    public static Map<String, Map<String, WindTurbineTestingPointAi>> wtpAimap = new HashMap<String, Map<String, WindTurbineTestingPointAi>>();// 风电机测点AI表
+    public static Map<String, Map<String, WindPowerstationTestingPoint>> stationPointmap = new HashMap<String, Map<String, WindPowerstationTestingPoint>>();//场站测点
     @Override
     public void run(String... args) throws Exception {
         System.out.println(">>>>>>>>>>>>>>>服务启动执行,换成测点关联数据 <<<<<<<<<<<<<");
 
         RMConfigExample example=new RMConfigExample();
-
-        example.setOrderByClause("id ASC");
-
         example.createCriteria().getAllCriteria();
-
         List<RMConfig> list= rMConfigService.selectByExample(example);
-
         if(!list.isEmpty())
         {
             for(RMConfig rm:list)
@@ -42,6 +58,68 @@ public class InitialRunner implements CommandLineRunner {
                 rmcmap.put(rm.getId(),rm);
             }
         }
+
+        WindpowerstationExample windpowerstationExample=new WindpowerstationExample();
+        windpowerstationExample.setOrderByClause("ordernum ASC");
+        windpowerstationExample.createCriteria().getAllCriteria();
+        wpls= windpowerstationService.selectByExample(windpowerstationExample);
+
+        ProjectExample projectExample=new ProjectExample();
+        projectExample.setOrderByClause("ordernum ASC");
+        projectExample.createCriteria().getAllCriteria();
+        pjls= projectService.selectByExample(projectExample);
+
+        LineExample lineExample=new LineExample();
+        lineExample.setOrderByClause("ordernum ASC");
+        lineExample.createCriteria().getAllCriteria();
+        lnls= lineService.selectByExample(lineExample);
+
+        WindturbineExample windturbineExample=new WindturbineExample();
+        windturbineExample.setOrderByClause("id ASC");
+        windturbineExample.createCriteria().getAllCriteria();
+        wtls= windturbineService.selectByExample(windturbineExample);
+
+
+        WindPowerstationTestingPointExample windPowerstationTestingPointExample=new WindPowerstationTestingPointExample();
+        windPowerstationTestingPointExample.createCriteria().getAllCriteria();
+        List<WindPowerstationTestingPoint> wpPointlist= windPowerstationTestingPointService.selectByExample(windPowerstationTestingPointExample);
+
+        Map<String,WindPowerstationTestingPoint> items=null;
+        if(wpPointlist!=null && !wpPointlist.isEmpty()){
+            for(int i=0;i<wpPointlist.size();i++){
+                WindPowerstationTestingPoint point=wpPointlist.get(i);
+                if(stationPointmap.containsKey(point.getWindpowerstationid())){
+                    items=stationPointmap.get(point.getWindpowerstationid());
+                    items.put(point.getUniformcode(), point);
+                }
+                else{
+                    items=new HashMap<String,WindPowerstationTestingPoint>();
+                    stationPointmap.put(point.getWindpowerstationid(), items);
+                    items.put(point.getUniformcode(), point);
+                }
+
+            }
+        }
+
+        WindTurbineTestingPointAiExample windTurbineTestingPointAiExample=new WindTurbineTestingPointAiExample();
+        windTurbineTestingPointAiExample.createCriteria().getAllCriteria();
+        List<WindTurbineTestingPointAi> wtAilist= windTurbineTestingPointAiService.selectByExample(windTurbineTestingPointAiExample);
+
+        Map<String, WindTurbineTestingPointAi> map = null;
+
+        if(wtAilist != null && !wtAilist.isEmpty()){
+            for(WindTurbineTestingPointAi mp : wtAilist){
+                if(wtpAimap.containsKey(mp.getWindturbineid())){
+                    map = wtpAimap.get(mp.getWindturbineid());
+                    map.put(mp.getUniformcode(), mp);
+                }else{
+                    map = new HashMap<String, WindTurbineTestingPointAi>();
+                    map.put(mp.getUniformcode(), mp);
+                    wtpAimap.put(mp.getWindturbineid(), map);
+                }
+            }
+        }
+
     }
 
 }

+ 12 - 14
src/main/java/com/gyee/frame/model/auto/Windturbine.java

@@ -1,12 +1,12 @@
 package com.gyee.frame.model.auto;
 
-import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
 
 /**
  * 风机信息表 Windturbine 
@@ -71,7 +71,7 @@ private String name;
 		
 	/** 是否是标杆风机 **/
 	@ApiModelProperty(value = "是否是标杆风机") 
-private String standardid;
+private Integer isStandard;
 		
 		
 	public String getId() {
@@ -180,23 +180,21 @@ private String standardid;
     public void setName(String name) {
         this.name = name;
     }
-	 
-			
-	public String getStandardid() {
-        return standardid;
+
+    public Integer getIsStandard() {
+        return isStandard;
     }
 
-    public void setStandardid(String standardid) {
-        this.standardid = standardid;
+    public void setIsStandard(Integer isStandard) {
+        this.isStandard = isStandard;
     }
-	 
-			
-	public Windturbine() {
+
+    public Windturbine() {
         super();
     }
     
 																																																																			
-	public Windturbine(String id,String code,String windpowerstationid,BigDecimal longitude,BigDecimal latitude,String modelid,String status,String projectid,String lineid,Date firstintegratedtime,String photo,String name,String standardid) {
+	public Windturbine(String id,String code,String windpowerstationid,BigDecimal longitude,BigDecimal latitude,String modelid,String status,String projectid,String lineid,Date firstintegratedtime,String photo,String name,Integer isStandard) {
 	
 		this.id = id;
 		this.code = code;
@@ -210,7 +208,7 @@ private String standardid;
 		this.firstintegratedtime = firstintegratedtime;
 		this.photo = photo;
 		this.name = name;
-		this.standardid = standardid;
+		this.isStandard = isStandard;
 		
 	}
 	

+ 136 - 0
src/main/java/com/gyee/frame/service/ProjectService.java

@@ -0,0 +1,136 @@
+package com.gyee.frame.service;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.ProjectMapper;
+import com.gyee.frame.model.auto.Project;
+import com.gyee.frame.model.auto.ProjectExample;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.util.SnowflakeIdWorker;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 项目 ProjectService
+ * @Title: ProjectService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-31 14:58:09  
+ **/
+@Service
+public class ProjectService implements BaseService<Project, ProjectExample>{
+	@Resource
+	private ProjectMapper projectMapper;
+	
+      	   	      	      	      	      	      	      	      	      	      	
+	/**
+	 * 分页查询
+	 * @param tablepar
+	 * @param name
+	 * @return
+	 */
+	 public PageInfo<Project> list(Tablepar tablepar,String name){
+	        ProjectExample testExample=new ProjectExample();
+	        testExample.setOrderByClause("id ASC");
+	        if(name!=null&&!"".equals(name)){
+	        	testExample.createCriteria().andCodeLike("%"+name+"%");
+	        }
+
+	        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+	        List<Project> list= projectMapper.selectByExample(testExample);
+	        PageInfo<Project> pageInfo = new PageInfo<Project>(list);
+	        return  pageInfo;
+	 }
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<String> lista=Convert.toListStrArray(ids);
+			ProjectExample example=new ProjectExample();
+			example.createCriteria().andIdIn(lista);
+			return projectMapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	public Project selectByPrimaryKey(String id) {
+				
+			return projectMapper.selectByPrimaryKey(id);
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(Project record) {
+		return projectMapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(Project record) {
+				
+		//添加雪花主键id
+		record.setId(SnowflakeIdWorker.getUUID());
+			
+				
+		return projectMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(Project record, ProjectExample example) {
+		
+		return projectMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(Project record, ProjectExample example) {
+		
+		return projectMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<Project> selectByExample(ProjectExample example) {
+		
+		return projectMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(ProjectExample example) {
+		
+		return projectMapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(ProjectExample example) {
+		
+		return projectMapper.deleteByExample(example);
+	}
+	
+	/**
+	 * 检查name
+	 * @param project
+	 * @return
+	 */
+	public int checkNameUnique(Project project){
+		ProjectExample example=new ProjectExample();
+		example.createCriteria().andCodeEqualTo(project.getCode());
+		List<Project> list=projectMapper.selectByExample(example);
+		return list.size();
+	}
+
+
+}

+ 136 - 0
src/main/java/com/gyee/frame/service/WindPowerstationTestingPointService.java

@@ -0,0 +1,136 @@
+package com.gyee.frame.service;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.WindPowerstationTestingPointMapper;
+import com.gyee.frame.model.auto.WindPowerstationTestingPoint;
+import com.gyee.frame.model.auto.WindPowerstationTestingPointExample;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.util.SnowflakeIdWorker;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 风场测点 WindPowerstationTestingPointService
+ * @Title: WindPowerstationTestingPointService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-31 14:58:09  
+ **/
+@Service
+public class WindPowerstationTestingPointService implements BaseService<WindPowerstationTestingPoint, WindPowerstationTestingPointExample>{
+	@Resource
+	private WindPowerstationTestingPointMapper windPowerstationTestingPointMapper;
+	
+      	   	      	      	      	      	      	      	      	      	      	
+	/**
+	 * 分页查询
+	 * @param tablepar
+	 * @param name
+	 * @return
+	 */
+	 public PageInfo<WindPowerstationTestingPoint> list(Tablepar tablepar,String name){
+	        WindPowerstationTestingPointExample testExample=new WindPowerstationTestingPointExample();
+	        testExample.setOrderByClause("id ASC");
+	        if(name!=null&&!"".equals(name)){
+	        	testExample.createCriteria().andCodeLike("%"+name+"%");
+	        }
+
+	        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+	        List<WindPowerstationTestingPoint> list= windPowerstationTestingPointMapper.selectByExample(testExample);
+	        PageInfo<WindPowerstationTestingPoint> pageInfo = new PageInfo<WindPowerstationTestingPoint>(list);
+	        return  pageInfo;
+	 }
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<String> lista=Convert.toListStrArray(ids);
+			WindPowerstationTestingPointExample example=new WindPowerstationTestingPointExample();
+			example.createCriteria().andCodeIn(lista);
+			return windPowerstationTestingPointMapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	public WindPowerstationTestingPoint selectByPrimaryKey(String id) {
+				
+			return windPowerstationTestingPointMapper.selectByPrimaryKey(id);
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(WindPowerstationTestingPoint record) {
+		return windPowerstationTestingPointMapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(WindPowerstationTestingPoint record) {
+				
+		//添加雪花主键id
+		record.setCode(SnowflakeIdWorker.getUUID());
+			
+				
+		return windPowerstationTestingPointMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(WindPowerstationTestingPoint record, WindPowerstationTestingPointExample example) {
+		
+		return windPowerstationTestingPointMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(WindPowerstationTestingPoint record, WindPowerstationTestingPointExample example) {
+		
+		return windPowerstationTestingPointMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<WindPowerstationTestingPoint> selectByExample(WindPowerstationTestingPointExample example) {
+		
+		return windPowerstationTestingPointMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(WindPowerstationTestingPointExample example) {
+		
+		return windPowerstationTestingPointMapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(WindPowerstationTestingPointExample example) {
+		
+		return windPowerstationTestingPointMapper.deleteByExample(example);
+	}
+	
+	/**
+	 * 检查name
+	 * @param windPowerstationTestingPoint
+	 * @return
+	 */
+	public int checkNameUnique(WindPowerstationTestingPoint windPowerstationTestingPoint){
+		WindPowerstationTestingPointExample example=new WindPowerstationTestingPointExample();
+		example.createCriteria().andCodeEqualTo(windPowerstationTestingPoint.getCode());
+		List<WindPowerstationTestingPoint> list=windPowerstationTestingPointMapper.selectByExample(example);
+		return list.size();
+	}
+
+
+}

+ 136 - 0
src/main/java/com/gyee/frame/service/WindTurbineTestingPointAiService.java

@@ -0,0 +1,136 @@
+package com.gyee.frame.service;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.WindTurbineTestingPointAiMapper;
+import com.gyee.frame.model.auto.WindTurbineTestingPointAi;
+import com.gyee.frame.model.auto.WindTurbineTestingPointAiExample;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.util.SnowflakeIdWorker;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 风机AI测点 WindTurbineTestingPointAiService
+ * @Title: WindTurbineTestingPointAiService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-31 14:58:09  
+ **/
+@Service
+public class WindTurbineTestingPointAiService implements BaseService<WindTurbineTestingPointAi, WindTurbineTestingPointAiExample>{
+	@Resource
+	private WindTurbineTestingPointAiMapper windTurbineTestingPointAiMapper;
+	
+      	   	      	      	      	      	      	      	      	      	      	
+	/**
+	 * 分页查询
+	 * @param tablepar
+	 * @param name
+	 * @return
+	 */
+	 public PageInfo<WindTurbineTestingPointAi> list(Tablepar tablepar,String name){
+	        WindTurbineTestingPointAiExample testExample=new WindTurbineTestingPointAiExample();
+	        testExample.setOrderByClause("id ASC");
+	        if(name!=null&&!"".equals(name)){
+	        	testExample.createCriteria().andCodeLike("%"+name+"%");
+	        }
+
+	        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+	        List<WindTurbineTestingPointAi> list= windTurbineTestingPointAiMapper.selectByExample(testExample);
+	        PageInfo<WindTurbineTestingPointAi> pageInfo = new PageInfo<WindTurbineTestingPointAi>(list);
+	        return  pageInfo;
+	 }
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<String> lista=Convert.toListStrArray(ids);
+			WindTurbineTestingPointAiExample example=new WindTurbineTestingPointAiExample();
+			example.createCriteria().andIdIn(lista);
+			return windTurbineTestingPointAiMapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	public WindTurbineTestingPointAi selectByPrimaryKey(String id) {
+				
+			return windTurbineTestingPointAiMapper.selectByPrimaryKey(id);
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(WindTurbineTestingPointAi record) {
+		return windTurbineTestingPointAiMapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(WindTurbineTestingPointAi record) {
+				
+		//添加雪花主键id
+		record.setId(SnowflakeIdWorker.getUUID());
+			
+				
+		return windTurbineTestingPointAiMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(WindTurbineTestingPointAi record, WindTurbineTestingPointAiExample example) {
+		
+		return windTurbineTestingPointAiMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(WindTurbineTestingPointAi record, WindTurbineTestingPointAiExample example) {
+		
+		return windTurbineTestingPointAiMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<WindTurbineTestingPointAi> selectByExample(WindTurbineTestingPointAiExample example) {
+		
+		return windTurbineTestingPointAiMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(WindTurbineTestingPointAiExample example) {
+		
+		return windTurbineTestingPointAiMapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(WindTurbineTestingPointAiExample example) {
+		
+		return windTurbineTestingPointAiMapper.deleteByExample(example);
+	}
+	
+	/**
+	 * 检查name
+	 * @param windTurbineTestingPointAi
+	 * @return
+	 */
+	public int checkNameUnique(WindTurbineTestingPointAi windTurbineTestingPointAi){
+		WindTurbineTestingPointAiExample example=new WindTurbineTestingPointAiExample();
+		example.createCriteria().andCodeEqualTo(windTurbineTestingPointAi.getCode());
+		List<WindTurbineTestingPointAi> list=windTurbineTestingPointAiMapper.selectByExample(example);
+		return list.size();
+	}
+
+
+}

+ 136 - 0
src/main/java/com/gyee/frame/service/WindTurbineTestingPointDiService.java

@@ -0,0 +1,136 @@
+package com.gyee.frame.service;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.WindTurbineTestingPointDiMapper;
+import com.gyee.frame.model.auto.WindTurbineTestingPointDi;
+import com.gyee.frame.model.auto.WindTurbineTestingPointDiExample;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.util.SnowflakeIdWorker;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 风机DI测点 WindTurbineTestingPointDiService
+ * @Title: WindTurbineTestingPointDiService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-31 14:58:09  
+ **/
+@Service
+public class WindTurbineTestingPointDiService implements BaseService<WindTurbineTestingPointDi, WindTurbineTestingPointDiExample>{
+	@Resource
+	private WindTurbineTestingPointDiMapper windTurbineTestingPointDiMapper;
+	
+      	   	      	      	      	      	      	      	      	      	      	
+	/**
+	 * 分页查询
+	 * @param tablepar
+	 * @param name
+	 * @return
+	 */
+	 public PageInfo<WindTurbineTestingPointDi> list(Tablepar tablepar,String name){
+	        WindTurbineTestingPointDiExample testExample=new WindTurbineTestingPointDiExample();
+	        testExample.setOrderByClause("id ASC");
+	        if(name!=null&&!"".equals(name)){
+	        	testExample.createCriteria().andCodeLike("%"+name+"%");
+	        }
+
+	        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+	        List<WindTurbineTestingPointDi> list= windTurbineTestingPointDiMapper.selectByExample(testExample);
+	        PageInfo<WindTurbineTestingPointDi> pageInfo = new PageInfo<WindTurbineTestingPointDi>(list);
+	        return  pageInfo;
+	 }
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<String> lista=Convert.toListStrArray(ids);
+			WindTurbineTestingPointDiExample example=new WindTurbineTestingPointDiExample();
+			example.createCriteria().andIdIn(lista);
+			return windTurbineTestingPointDiMapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	public WindTurbineTestingPointDi selectByPrimaryKey(String id) {
+				
+			return windTurbineTestingPointDiMapper.selectByPrimaryKey(id);
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(WindTurbineTestingPointDi record) {
+		return windTurbineTestingPointDiMapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(WindTurbineTestingPointDi record) {
+				
+		//添加雪花主键id
+		record.setId(SnowflakeIdWorker.getUUID());
+			
+				
+		return windTurbineTestingPointDiMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(WindTurbineTestingPointDi record, WindTurbineTestingPointDiExample example) {
+		
+		return windTurbineTestingPointDiMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(WindTurbineTestingPointDi record, WindTurbineTestingPointDiExample example) {
+		
+		return windTurbineTestingPointDiMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<WindTurbineTestingPointDi> selectByExample(WindTurbineTestingPointDiExample example) {
+		
+		return windTurbineTestingPointDiMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(WindTurbineTestingPointDiExample example) {
+		
+		return windTurbineTestingPointDiMapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(WindTurbineTestingPointDiExample example) {
+		
+		return windTurbineTestingPointDiMapper.deleteByExample(example);
+	}
+	
+	/**
+	 * 检查name
+	 * @param windTurbineTestingPointDi
+	 * @return
+	 */
+	public int checkNameUnique(WindTurbineTestingPointDi windTurbineTestingPointDi){
+		WindTurbineTestingPointDiExample example=new WindTurbineTestingPointDiExample();
+		example.createCriteria().andCodeEqualTo(windTurbineTestingPointDi.getCode());
+		List<WindTurbineTestingPointDi> list=windTurbineTestingPointDiMapper.selectByExample(example);
+		return list.size();
+	}
+
+
+}

+ 136 - 0
src/main/java/com/gyee/frame/service/WindpowerstationService.java

@@ -0,0 +1,136 @@
+package com.gyee.frame.service;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.WindpowerstationMapper;
+import com.gyee.frame.model.auto.Windpowerstation;
+import com.gyee.frame.model.auto.WindpowerstationExample;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.util.SnowflakeIdWorker;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 风场 WindpowerstationService
+ * @Title: WindpowerstationService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-31 14:58:09  
+ **/
+@Service
+public class WindpowerstationService implements BaseService<Windpowerstation, WindpowerstationExample>{
+	@Resource
+	private WindpowerstationMapper windpowerstationMapper;
+	
+      	   	      	      	      	      	      	      	      	      	      	
+	/**
+	 * 分页查询
+	 * @param tablepar
+	 * @param name
+	 * @return
+	 */
+	 public PageInfo<Windpowerstation> list(Tablepar tablepar,String name){
+	        WindpowerstationExample testExample=new WindpowerstationExample();
+	        testExample.setOrderByClause("id ASC");
+	        if(name!=null&&!"".equals(name)){
+	        	testExample.createCriteria().andCodeLike("%"+name+"%");
+	        }
+
+	        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+	        List<Windpowerstation> list= windpowerstationMapper.selectByExample(testExample);
+	        PageInfo<Windpowerstation> pageInfo = new PageInfo<Windpowerstation>(list);
+	        return  pageInfo;
+	 }
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<String> lista=Convert.toListStrArray(ids);
+			WindpowerstationExample example=new WindpowerstationExample();
+			example.createCriteria().andIdIn(lista);
+			return windpowerstationMapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	public Windpowerstation selectByPrimaryKey(String id) {
+				
+			return windpowerstationMapper.selectByPrimaryKey(id);
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(Windpowerstation record) {
+		return windpowerstationMapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(Windpowerstation record) {
+				
+		//添加雪花主键id
+		record.setId(SnowflakeIdWorker.getUUID());
+			
+				
+		return windpowerstationMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(Windpowerstation record, WindpowerstationExample example) {
+		
+		return windpowerstationMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(Windpowerstation record, WindpowerstationExample example) {
+		
+		return windpowerstationMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<Windpowerstation> selectByExample(WindpowerstationExample example) {
+		
+		return windpowerstationMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(WindpowerstationExample example) {
+		
+		return windpowerstationMapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(WindpowerstationExample example) {
+		
+		return windpowerstationMapper.deleteByExample(example);
+	}
+	
+	/**
+	 * 检查name
+	 * @param windpowerstation
+	 * @return
+	 */
+	public int checkNameUnique(Windpowerstation windpowerstation){
+		WindpowerstationExample example=new WindpowerstationExample();
+		example.createCriteria().andCodeEqualTo(windpowerstation.getCode());
+		List<Windpowerstation> list=windpowerstationMapper.selectByExample(example);
+		return list.size();
+	}
+
+
+}

+ 7 - 7
src/main/java/com/gyee/frame/service/WindturbineService.java

@@ -1,9 +1,5 @@
 package com.gyee.frame.service;
 
-import java.util.List;
-import java.util.Arrays;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.gyee.frame.common.base.BaseService;
@@ -13,6 +9,10 @@ import com.gyee.frame.model.auto.Windturbine;
 import com.gyee.frame.model.auto.WindturbineExample;
 import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.util.SnowflakeIdWorker;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * 风机信息表 WindturbineService
@@ -24,14 +24,14 @@ import com.gyee.frame.util.SnowflakeIdWorker;
  **/
 @Service
 public class WindturbineService implements BaseService<Windturbine, WindturbineExample>{
-	@Autowired
+	@Resource
 	private WindturbineMapper windturbineMapper;
 	
       	   	      	      	      	      	      	      	      	      	      	      	      	      	      	
 	/**
 	 * 分页查询
-	 * @param pageNum
-	 * @param pageSize
+	 * @param tablepar
+	 * @param name
 	 * @return
 	 */
 	 public PageInfo<Windturbine> list(Tablepar tablepar,String name){

+ 14 - 14
src/main/resources/mybatis/auto/WindturbineMapper.xml

@@ -14,7 +14,7 @@
     <result column="firstintegratedtime" jdbcType="TIMESTAMP" property="firstintegratedtime" />
     <result column="photo" jdbcType="VARCHAR" property="photo" />
     <result column="name" jdbcType="VARCHAR" property="name" />
-    <result column="standardid" jdbcType="VARCHAR" property="standardid" />
+    <result column="isStandard" jdbcType="INTEGER" property="isStandard" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -87,7 +87,7 @@
        	  	      	firstintegratedtime,
        	  	      	photo,
        	  	      	name,
-       	  	    	  	standardid
+       	  	    	  	isStandard
        	</sql>
   <select id="selectByExample" parameterType="com.gyee.frame.model.auto.WindturbineExample" resultMap="BaseResultMap">
     select
@@ -135,7 +135,7 @@
        	  	       firstintegratedtime,
        	  	       photo,
        	  	       name,
-       	  	    	  standardid
+       	  	    	  isStandard
        	    )
     values (
 	  	  	      	#{id,jdbcType=VARCHAR},
@@ -150,7 +150,7 @@
        	  	      	#{firstintegratedtime,jdbcType=TIMESTAMP},
        	  	      	#{photo,jdbcType=VARCHAR},
        	  	      	#{name,jdbcType=VARCHAR},
-       	  	    	  #{standardid,jdbcType=VARCHAR}
+       	  	    	  #{isStandard,jdbcType=VARCHAR}
        	    )
   </insert>
   
@@ -218,8 +218,8 @@
       </if>
       
          
-      <if test="standardid != null">
-        standardid,
+      <if test="isStandard != null">
+        isStandard,
       </if>
       
          </trim>
@@ -260,8 +260,8 @@
           <if test="name != null">
         #{name,jdbcType=VARCHAR},
       </if>
-          <if test="standardid != null">
-        #{standardid,jdbcType=VARCHAR},
+          <if test="isStandard != null">
+        #{isStandard,jdbcType=VARCHAR},
       </if>
         </trim>
   </insert>
@@ -312,8 +312,8 @@
           <if test="record.name != null">
         name = #{record.name,jdbcType=VARCHAR},
       </if>
-          <if test="record.standardid != null">
-        standardid = #{record.standardid,jdbcType=VARCHAR},
+          <if test="record.isStandard != null">
+        isStandard = #{record.isStandard,jdbcType=VARCHAR},
       </if>
          
     </set>
@@ -338,7 +338,7 @@
     	         	     	 firstintegratedtime = #{record.firstintegratedtime,jdbcType=TIMESTAMP},
     	         	     	 photo = #{record.photo,jdbcType=VARCHAR},
     	         	     	 name = #{record.name,jdbcType=VARCHAR},
-    	         	     	 standardid = #{record.standardid,jdbcType=VARCHAR}
+    	         	     	 isStandard = #{record.isStandard,jdbcType=VARCHAR}
     	         <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -381,8 +381,8 @@
                       <if test="name != null">
         name = #{name,jdbcType=VARCHAR},
       </if>
-                      <if test="standardid != null">
-        standardid = #{standardid,jdbcType=VARCHAR},
+                      <if test="isStandard != null">
+        isStandard = #{isStandard,jdbcType=VARCHAR},
       </if>
               </set>
     where 
@@ -406,7 +406,7 @@
 		     	        	    	 			firstintegratedtime = #{firstintegratedtime,jdbcType=TIMESTAMP},
 		     	        	    	 			photo = #{photo,jdbcType=VARCHAR},
 		     	        	    	 			name = #{name,jdbcType=VARCHAR},
-		     	        	    	 			standardid = #{standardid,jdbcType=VARCHAR}
+		     	        	    	 			isStandard = #{isStandard,jdbcType=VARCHAR}
 		     	        where 
             id = #{id,jdbcType=VARCHAR}