|
@@ -4,12 +4,20 @@ package com.gyee.backconfig.service;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.gyee.backconfig.common.requst.vo.ProjectPlanQueryVo;
|
|
|
+import com.gyee.backconfig.model.auto.Project;
|
|
|
+import com.gyee.backconfig.model.auto.Windpowerstation;
|
|
|
import com.gyee.backconfig.model.auto.XrpProjectplan;
|
|
|
+import com.gyee.backconfig.service.auto.IProjectService;
|
|
|
+import com.gyee.backconfig.service.auto.IWindpowerstationService;
|
|
|
import com.gyee.backconfig.service.auto.IXrpProjectplanService;
|
|
|
+import com.gyee.backconfig.vo.Projectvo;
|
|
|
+import com.gyee.backconfig.vo.Windpowerstationvo;
|
|
|
import com.gyee.common.model.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.Currency;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -22,6 +30,10 @@ public class BackConfigService {
|
|
|
|
|
|
@Resource
|
|
|
private IXrpProjectplanService xrpProjectplanService;
|
|
|
+ @Resource
|
|
|
+ private IWindpowerstationService windpowerstationService;
|
|
|
+ @Resource
|
|
|
+ private IProjectService projectService;
|
|
|
|
|
|
/**
|
|
|
* @param
|
|
@@ -62,7 +74,7 @@ public class BackConfigService {
|
|
|
Page<XrpProjectplan> page=new Page<XrpProjectplan>(vo.getCurrent(),vo.getPageSize());
|
|
|
|
|
|
QueryWrapper<XrpProjectplan> queryWrapper=new QueryWrapper<>();
|
|
|
- String id=vo.getId();;
|
|
|
+ String id=vo.getId();
|
|
|
String projectid=vo.getProjectid();
|
|
|
String generatingcapacity=vo.getGeneratingcapacity();
|
|
|
Double outagehours=vo.getOutagehours();
|
|
@@ -146,4 +158,162 @@ public class BackConfigService {
|
|
|
queryWrapper.eq("id",id);
|
|
|
return xrpProjectplanService.remove(queryWrapper);
|
|
|
}
|
|
|
+
|
|
|
+ //windpowerstation表
|
|
|
+ public Page<Windpowerstation> Bypage(Windpowerstationvo vo){
|
|
|
+ Page<Windpowerstation> page=new Page<Windpowerstation>(vo.getCurrent(),vo.getPagesize());
|
|
|
+
|
|
|
+ QueryWrapper<Windpowerstation> queryWrapper=new QueryWrapper<>();
|
|
|
+ String id=vo.getId();;
|
|
|
+ String code=vo.getCode();
|
|
|
+ String name=vo.getName();
|
|
|
+ String address=vo.getAddress();
|
|
|
+ String telephone=vo.getTelephone();
|
|
|
+ Integer capacity=vo.getCapacity();
|
|
|
+ String capacityunit=vo.getCapacityunit();
|
|
|
+ Integer quantity=vo.getQuantity();
|
|
|
+ String aname=vo.getAname();
|
|
|
+ Integer longitude=vo.getLongitude();
|
|
|
+ Integer latitude=vo.getLatitude();
|
|
|
+ String photo=vo.getPhoto();
|
|
|
+ String companyid=vo.getCompanyid();
|
|
|
+ String systemmanufact=vo.getSystemmanufact();
|
|
|
+ String headfarm=vo.getHeadfarm();
|
|
|
+ String headfarmphone=vo.getHeadfarmphone();
|
|
|
+ String model=vo.getModel();
|
|
|
+ Integer ordernum=vo.getOrdernum();
|
|
|
+ Integer altitudevo=vo.getAltitude();
|
|
|
+ Integer height=vo.getHeight();
|
|
|
+
|
|
|
+ if(StringUtils.isNotNull(id)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("id",id);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(code)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("code",code);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(name)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("name",name);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(address)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("address",address);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(telephone)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("telephone",telephone);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(capacity)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("capacity",capacity);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(capacityunit)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("capacityunit",capacityunit);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(aname)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("aname",aname);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(longitude)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("longitude",longitude);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(photo)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("photo",photo);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(quantity)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("quantity",quantity);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(latitude)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("latitude",latitude);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(companyid)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("companyid",companyid);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(systemmanufact)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("systemmanufact",systemmanufact);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(headfarm)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("headfarm",headfarm);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(headfarmphone)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("headfarmphone",headfarmphone);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(model)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("model",model);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(ordernum)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("ordernum",ordernum);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(altitudevo)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("altitudevo",altitudevo);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotNull(height)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("height",height);
|
|
|
+ }
|
|
|
+
|
|
|
+ Page<Windpowerstation> page1 = windpowerstationService.page(page,queryWrapper);
|
|
|
+ return page1;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Page<Project> ProjectBypage(Projectvo vo) {
|
|
|
+ Page<Project> page = new Page<Project>(vo.getCurrent(), vo.getPageSize());
|
|
|
+
|
|
|
+ QueryWrapper<Project> queryWrapper = new QueryWrapper<>();
|
|
|
+ String id = vo.getId();
|
|
|
+ String code = vo.getCode();
|
|
|
+ String aname = vo.getAname();
|
|
|
+ String name = vo.getName();
|
|
|
+ String capacityunit = vo.getCapacityunit();
|
|
|
+ Integer capacity = vo.getCapacity();
|
|
|
+ String windpowerstationid = vo.getWindpowerstationid();
|
|
|
+ Integer quantity = vo.getQuantity();
|
|
|
+ String model = vo.getModel();
|
|
|
+ Date commissiondate = vo.getCommissiondate();
|
|
|
+ String masterphone = vo.getMasterphone();
|
|
|
+ String shiftforeman = vo.getShiftforeman();
|
|
|
+ String shiftforemanphone = vo.getShiftforemanphone();
|
|
|
+ Integer ordernum = vo.getOrdernum();
|
|
|
+
|
|
|
+ if(StringUtils.isNotNull(id)&&!id.equals("")){
|
|
|
+ queryWrapper.eq("id",id);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(code)&&!code.equals("")){
|
|
|
+ queryWrapper.eq("code",code);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(aname)&&!code.equals("")){
|
|
|
+ queryWrapper.eq("aname",aname);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(name)&&!code.equals("")){
|
|
|
+ queryWrapper.eq("name",name);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(capacityunit)&&!code.equals("")){
|
|
|
+ queryWrapper.eq("capacityunit",capacityunit);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(capacity)&&!code.equals("")){
|
|
|
+ queryWrapper.eq("capacity",capacity);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(windpowerstationid)&&!code.equals("")){
|
|
|
+ queryWrapper.eq("windpowerstationid",windpowerstationid);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(quantity)&&!code.equals("")){
|
|
|
+ queryWrapper.eq("quantity",quantity);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(model)&&!code.equals("")){
|
|
|
+ queryWrapper.eq("model",model);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(commissiondate)&&!code.equals("")){
|
|
|
+ queryWrapper.eq("commissiondate",commissiondate);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(masterphone)&&!code.equals("")){
|
|
|
+ queryWrapper.eq("masterphone",masterphone);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(shiftforeman)&&!code.equals("")){
|
|
|
+ queryWrapper.eq("shiftforeman",shiftforeman);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(shiftforemanphone)&&!code.equals("")){
|
|
|
+ queryWrapper.eq("shiftforemanphone",shiftforemanphone);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(ordernum)&&!code.equals("")){
|
|
|
+ queryWrapper.eq("ordernum",ordernum);
|
|
|
+ }
|
|
|
+
|
|
|
+ Page<Project> page1 = projectService.page(page,queryWrapper);
|
|
|
+ return page1;
|
|
|
+ }
|
|
|
+
|
|
|
}
|