|
@@ -14,6 +14,7 @@ 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.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -218,16 +219,18 @@ public class WindpowerstationController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
- * 查询
|
|
|
+ * 行政管理区域风电场列表
|
|
|
* @param regionid
|
|
|
* @param companyid
|
|
|
* @return
|
|
|
*/
|
|
|
- @GetMapping(value = "/getList")
|
|
|
- public R getList(
|
|
|
- @RequestParam(value = "regionid",required = false) String regionid,
|
|
|
- @RequestParam(value = "companyid",required = false) String companyid){
|
|
|
+ @CrossOrigin(origins = "*", maxAge = 3600)
|
|
|
+ @GetMapping(value = "/getAdmList")
|
|
|
+ public R getAdmList(
|
|
|
+ @RequestParam(value = "regionid",required = false) String regionid,
|
|
|
+ @RequestParam(value = "companyid",required = false) String companyid){
|
|
|
try {
|
|
|
List<WindpowerstationAdmVo> list = windpowerstationService.getList(regionid,companyid);
|
|
|
if (null != list){
|
|
@@ -247,10 +250,19 @@ public class WindpowerstationController {
|
|
|
* @param startdate
|
|
|
* @param enddate
|
|
|
*/
|
|
|
- @GetMapping(value = "/getPersis")
|
|
|
- public R getPersis(String station , Date startdate, Date enddate){
|
|
|
+ @CrossOrigin(origins = "*", maxAge = 3600)
|
|
|
+ @GetMapping(value = "/getStationPersis")
|
|
|
+ public R getStationPersis(
|
|
|
+ @RequestParam(value = "station",required = false) String station,
|
|
|
+ @RequestParam(value = "startdate",required = false) String startdate,
|
|
|
+ @RequestParam(value = "enddate",required = false) String enddate){
|
|
|
try {
|
|
|
- List<PersisVo> list = windpowerstationService.getPersis(station,startdate,enddate);
|
|
|
+
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ Date startdt = simpleDateFormat.parse(startdate);
|
|
|
+ Date enddt = simpleDateFormat.parse(enddate);
|
|
|
+
|
|
|
+ List<PersisVo> list = windpowerstationService.getPersis(station,startdt,enddt);
|
|
|
|
|
|
if (null != list){
|
|
|
return R.ok().data(list);
|
|
@@ -265,4 +277,5 @@ public class WindpowerstationController {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
}
|