|
@@ -1,22 +1,18 @@
|
|
|
package com.gyee.backconfig.controller;
|
|
|
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import com.gyee.backconfig.config.MyPage;
|
|
|
+import com.gyee.backconfig.common.requst.vo.ProjectPlanQueryVo;
|
|
|
import com.gyee.backconfig.config.R;
|
|
|
-import com.gyee.backconfig.model.auto.Region;
|
|
|
import com.gyee.backconfig.model.auto.Windpowerstation;
|
|
|
+import com.gyee.backconfig.model.auto.XrpProjectplan;
|
|
|
import com.gyee.backconfig.service.BackConfigService;
|
|
|
-import com.gyee.backconfig.service.auto.IWindpowerstationService;
|
|
|
import com.gyee.backconfig.vo.Windpowerstationvo;
|
|
|
import com.gyee.common.model.StringUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.List;
|
|
|
+import java.util.Currency;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -32,10 +28,6 @@ public class WindpowerstationController {
|
|
|
@Resource
|
|
|
private BackConfigService backConfigService;
|
|
|
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private IWindpowerstationService windpowerstationService;
|
|
|
-
|
|
|
@GetMapping("/listByPage")
|
|
|
@ResponseBody
|
|
|
@CrossOrigin(origins = "*", maxAge = 3600)
|
|
@@ -121,100 +113,4 @@ public class WindpowerstationController {
|
|
|
vo.setVersion(version);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 查询
|
|
|
- * @param id
|
|
|
- * @param name
|
|
|
- * @param pageNum
|
|
|
- * @param pageSize
|
|
|
- * @return
|
|
|
- */
|
|
|
- @GetMapping(value = "/List")
|
|
|
- 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 = "companyid",required = false) String companyid,
|
|
|
- @RequestParam(value = "pageNum",required = true) String pageNum,
|
|
|
- @RequestParam(value = "pageSize",required = true) String pageSize){
|
|
|
- MyPage<Windpowerstation> list = windpowerstationService.getList(id,name,code,companyid,pageNum,pageSize);
|
|
|
- if (null != list){
|
|
|
- return R.ok().data(list);
|
|
|
- }else {
|
|
|
- return R.error().data("查询失败!");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 根据id查询
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- @GetMapping(value = "/{id}")
|
|
|
- public R findOne(@PathVariable("id") String id){
|
|
|
-
|
|
|
- Windpowerstation windpowerstation = windpowerstationService.getOne(id);
|
|
|
- if (StringUtils.isNotNull(windpowerstation)){
|
|
|
- return R.ok().data(windpowerstation);
|
|
|
- }else {
|
|
|
- return R.error().data("查询失败!");
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 插入(批量)
|
|
|
- * @param windpowerstation
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PostMapping(value = "/add")
|
|
|
- public R addAll(@RequestBody Windpowerstation windpowerstation){
|
|
|
-
|
|
|
- boolean b = windpowerstationService.addOrUpdate(windpowerstation);
|
|
|
- if (b){
|
|
|
- return R.ok().data(b);
|
|
|
- }else {
|
|
|
- return R.error().data("保存失败!");
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 批量删除
|
|
|
- * @param ids
|
|
|
- * @return
|
|
|
- */
|
|
|
- @DeleteMapping(value = "/{ids}")
|
|
|
- public R deleteAll(@PathVariable("ids") String ids){
|
|
|
- boolean b = windpowerstationService.removeByIds(ids);
|
|
|
- if (b){
|
|
|
- return R.ok().data(b);
|
|
|
- }else {
|
|
|
- return R.error().data("删除失败!");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 批量修改
|
|
|
- * @param list
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PutMapping(value = "/editRegions")
|
|
|
- public R update(@RequestBody List<Windpowerstation> list){
|
|
|
- boolean b = windpowerstationService.updateBatchById(list);
|
|
|
- if (b){
|
|
|
- return R.ok().data(b);
|
|
|
- }else {
|
|
|
- return R.error().data("更新失败!");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
}
|