浏览代码

矩阵数据推送

shilin 4 年之前
父节点
当前提交
658ccd102f

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

@@ -71,7 +71,7 @@ public class InitialRunner implements CommandLineRunner {
         ProjectExample projectExample=new ProjectExample();
         projectExample.setOrderByClause("ordernum ASC");
         projectExample.createCriteria().getAllCriteria();
-        //pjls= projectService.selectByExample(projectExample);
+        pjls= projectService.selectByExample(projectExample);
 
         LineExample lineExample=new LineExample();
         lineExample.setOrderByClause("ordernum ASC");

+ 4 - 2
src/main/java/com/gyee/frame/controller/gen/GyeeMatrixController.java

@@ -32,17 +32,19 @@ public class GyeeMatrixController extends BaseController{
 		{
 			if(keyid.equals("0"))
 			{
-				Map<String,String> map=new HashMap<>();
+
 				for(Windpowerstation wp: InitialRunner.wpls)
 				{
+					Map<String,String> map=new HashMap<>();
 					map.put("id",wp.getId());
 					map.put("name",wp.getName());
 					ls.add(map);
 				}
 			}else {
-				Map<String,String> map=new HashMap<>();
+
 				for(Project pj: InitialRunner.pjls)
 				{
+					Map<String,String> map=new HashMap<>();
 					if(pj.getWindpowerstationid().equals(keyid))
 					{
 						map.put("id",pj.getId());