Browse Source

管理功能完善

wangb 2 years ago
parent
commit
49ed60af73

+ 12 - 12
web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/CompanysController.java

@@ -44,18 +44,18 @@ public class CompanysController {
      * @param pageSize
      * @return
      */
-    @GetMapping(value = "/companys")
-    public R findList(@RequestParam(value = "id",required = true) String id,
-                      @RequestParam(value = "name",required = true) String name,
-                      @RequestParam(value = "pageNum",required = true) String pageNum,
-                      @RequestParam(value = "pageSize",required = true) String pageSize){
-        List<Companys> list = companysService.list(id,name,pageNum,pageSize);
-        if (StringUtils.isNotEmpty(list)){
-            return R.ok(list.size()).data(list);
-        }else {
-            return R.error().data("查询失败!");
-        }
-    }
+//    @GetMapping(value = "/companys")
+//    public R findList(@RequestParam(value = "id",required = true) String id,
+//                      @RequestParam(value = "name",required = true) String name,
+//                      @RequestParam(value = "pageNum",required = true) String pageNum,
+//                      @RequestParam(value = "pageSize",required = true) String pageSize){
+//        List<Companys> list = companysService.list(id,name,pageNum,pageSize);
+//        if (StringUtils.isNotEmpty(list)){
+//            return R.ok(list.size()).data(list);
+//        }else {
+//            return R.error().data("查询失败!");
+//        }
+//    }
 
     /**
      * 根据id查询

+ 2 - 2
web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/ProjectController.java

@@ -120,10 +120,10 @@ public class ProjectController {
     public R findList(@RequestParam(value = "id",required = false) String id,
                       @RequestParam(value = "name",required = false) String name,
                       @RequestParam(value = "code",required = false) String code,
-                      @RequestParam(value = "stationid",required = false) String stationid,
+                      @RequestParam(value = "windpowerstationid",required = false) String windpowerstationid,
                       @RequestParam(value = "pageNum",required = true) String pageNum,
                       @RequestParam(value = "pageSize",required = true) String pageSize){
-        IPage<Project> list = projectService.getList(id,name,code,stationid,pageNum,pageSize);
+        IPage<Project> list = projectService.getList(id,name,code,windpowerstationid,pageNum,pageSize);
         if (null != list){
             return R.ok().data(list);
         }else {

+ 3 - 3
web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/WindturbineController.java

@@ -31,7 +31,7 @@ public class WindturbineController {
      * 查询
      * @param id
      * @param code
-     * @param stationid
+     * @param windpowerstationid
      * @param projectid
      * @param lineid
      * @param pageNum
@@ -41,12 +41,12 @@ public class WindturbineController {
     @GetMapping(value = "/companys")
     public R findList(@RequestParam(value = "id", required = false) String id,
                       @RequestParam(value = "code", required = false) String code,
-                      @RequestParam(value = "stationid", required = false) String stationid,
+                      @RequestParam(value = "windpowerstationid", required = false) String windpowerstationid,
                       @RequestParam(value = "projectid", required = false) String projectid,
                       @RequestParam(value = "lineid", required = false) String lineid,
                       @RequestParam(value = "pageNum", required = true) String pageNum,
                       @RequestParam(value = "pageSize", required = true) String pageSize) {
-        IPage<Windturbine> list = windturbineService.list(id, code, stationid, projectid, lineid, pageNum, pageSize);
+        IPage<Windturbine> list = windturbineService.list(id, code, windpowerstationid, projectid, lineid, pageNum, pageSize);
         if (null != list) {
             return R.ok().data(list);
         } else {

+ 2 - 0
web/backmanagerconfig/src/main/java/com/gyee/backconfig/model/auto/Project.java

@@ -9,6 +9,7 @@ import java.time.LocalDate;
 import java.util.Date;
 import java.util.List;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -53,6 +54,7 @@ public class Project extends Model {
     @TableField("MODEL")
     private String model;
 
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     @TableField("COMMISSIONDATE")
     private Date commissiondate;
 

+ 1 - 1
web/backmanagerconfig/src/main/java/com/gyee/backconfig/service/auto/IWindturbineService.java

@@ -17,7 +17,7 @@ import java.util.List;
 public interface IWindturbineService extends IService<Windturbine> {
 
 
-    IPage<Windturbine> list(String id, String code, String stationid, String projectid, String lineid, String pageNum, String pageSize);
+    IPage<Windturbine> list(String id, String code, String windpowerstationid, String projectid, String lineid, String pageNum, String pageSize);
 
     Windturbine getOne(String id);
 

+ 3 - 3
web/backmanagerconfig/src/main/java/com/gyee/backconfig/service/auto/impl/ProjectServiceImpl.java

@@ -25,7 +25,7 @@ import java.util.List;
 public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> implements IProjectService {
 
     @Override
-    public IPage<Project> getList(String id, String name, String code, String stationid, String pageNum, String pageSize) {
+    public IPage<Project> getList(String id, String name, String code, String windpowerstationid, String pageNum, String pageSize) {
         QueryWrapper<Project> qw = new QueryWrapper<>();
 
         if (StringUtils.isNotEmpty(id)){
@@ -40,8 +40,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             qw.like("name",name);
         }
 
-        if (StringUtils.isNotEmpty(name)){
-            qw.eq("windpowerstationid",stationid);
+        if (StringUtils.isNotEmpty(windpowerstationid)){
+            qw.like("windpowerstationid",windpowerstationid);
         }
 
         Page<Project> page = new Page<>(Integer.parseInt(pageNum),Integer.parseInt(pageSize));

+ 3 - 3
web/backmanagerconfig/src/main/java/com/gyee/backconfig/service/auto/impl/WindturbineServiceImpl.java

@@ -25,7 +25,7 @@ import java.util.List;
 public class WindturbineServiceImpl extends ServiceImpl<WindturbineMapper, Windturbine> implements IWindturbineService {
 
     @Override
-    public IPage<Windturbine> list(String id, String code, String stationid, String projectid, String lineid, String pageNum, String pageSize) {
+    public IPage<Windturbine> list(String id, String code, String windpowerstationid, String projectid, String lineid, String pageNum, String pageSize) {
         QueryWrapper<Windturbine> qw = new QueryWrapper<>();
         if (StringUtils.isNotEmpty(id)){
             qw.eq("id",id);
@@ -34,8 +34,8 @@ public class WindturbineServiceImpl extends ServiceImpl<WindturbineMapper, Windt
             qw.like("code",code);
         }
 
-        if (StringUtils.isNotEmpty(stationid)){
-            qw.eq("windpowerstationid",stationid);
+        if (StringUtils.isNotEmpty(windpowerstationid)){
+            qw.like("windpowerstationid",windpowerstationid);
         }
 
         if (StringUtils.isNotEmpty(projectid)){