|
@@ -4,12 +4,10 @@ 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.model.auto.*;
|
|
|
+import com.gyee.backconfig.service.auto.*;
|
|
|
+import com.gyee.backconfig.vo.Companysvo;
|
|
|
+import com.gyee.backconfig.vo.Linevo;
|
|
|
import com.gyee.backconfig.vo.Projectvo;
|
|
|
import com.gyee.backconfig.vo.Windpowerstationvo;
|
|
|
import com.gyee.common.model.StringUtils;
|
|
@@ -31,25 +29,29 @@ public class BackConfigService {
|
|
|
@Resource
|
|
|
private IXrpProjectplanService xrpProjectplanService;
|
|
|
@Resource
|
|
|
+ private ICompanysService companysService;
|
|
|
+ @Resource
|
|
|
private IWindpowerstationService windpowerstationService;
|
|
|
@Resource
|
|
|
private IProjectService projectService;
|
|
|
+ @Resource
|
|
|
+ private ILineService lineService;
|
|
|
|
|
|
/**
|
|
|
* @param
|
|
|
* @return
|
|
|
*/
|
|
|
- public List<XrpProjectplan> backConfigList(){
|
|
|
+ public List<XrpProjectplan> backConfigList() {
|
|
|
List<XrpProjectplan> xrpProjectplanList = xrpProjectplanService.list();
|
|
|
|
|
|
return xrpProjectplanList;
|
|
|
}
|
|
|
|
|
|
//根据id返回
|
|
|
- public XrpProjectplan projectplanById(String id){
|
|
|
+ public XrpProjectplan projectplanById(String id) {
|
|
|
QueryWrapper<XrpProjectplan> queryWrapper = new QueryWrapper<>();
|
|
|
XrpProjectplan xrpProjectplan = xrpProjectplanService.getOne(queryWrapper);
|
|
|
- queryWrapper.eq("id",id);
|
|
|
+ queryWrapper.eq("id", id);
|
|
|
return xrpProjectplan;
|
|
|
}
|
|
|
|
|
@@ -58,7 +60,6 @@ public class BackConfigService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
public Boolean saveSingle(XrpProjectplan xrpProjectplan) {
|
|
|
return xrpProjectplanService.saveOrUpdate(xrpProjectplan);
|
|
|
}
|
|
@@ -70,39 +71,39 @@ public class BackConfigService {
|
|
|
|
|
|
//分页查询
|
|
|
|
|
|
- public Page<XrpProjectplan> listBypage(ProjectPlanQueryVo vo){
|
|
|
- Page<XrpProjectplan> page=new Page<XrpProjectplan>(vo.getCurrent(),vo.getPageSize());
|
|
|
+ public Page<XrpProjectplan> listBypage(ProjectPlanQueryVo vo) {
|
|
|
+ Page<XrpProjectplan> page = new Page<XrpProjectplan>(vo.getCurrent(), vo.getPageSize());
|
|
|
|
|
|
- QueryWrapper<XrpProjectplan> queryWrapper=new QueryWrapper<>();
|
|
|
- String id=vo.getId();
|
|
|
- String projectid=vo.getProjectid();
|
|
|
- String generatingcapacity=vo.getGeneratingcapacity();
|
|
|
- Double outagehours=vo.getOutagehours();
|
|
|
- String year=vo.getYear();
|
|
|
- String month=vo.getMonth();
|
|
|
- String windpower=vo.getWindpower();
|
|
|
+ QueryWrapper<XrpProjectplan> queryWrapper = new QueryWrapper<>();
|
|
|
+ String id = vo.getId();
|
|
|
+ String projectid = vo.getProjectid();
|
|
|
+ String generatingcapacity = vo.getGeneratingcapacity();
|
|
|
+ Double outagehours = vo.getOutagehours();
|
|
|
+ String year = vo.getYear();
|
|
|
+ String month = vo.getMonth();
|
|
|
+ String windpower = vo.getWindpower();
|
|
|
|
|
|
|
|
|
- if(StringUtils.isNotNull(id)&&!id.equals("")){
|
|
|
- queryWrapper.eq("id",id);
|
|
|
+ if (StringUtils.isNotNull(id) && !id.equals("")) {
|
|
|
+ queryWrapper.eq("id", id);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(projectid)&&!projectid.equals("")){
|
|
|
- queryWrapper.eq("projectid",projectid);
|
|
|
+ if (StringUtils.isNotNull(projectid) && !projectid.equals("")) {
|
|
|
+ queryWrapper.eq("projectid", projectid);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(generatingcapacity)&&!generatingcapacity.equals("")){
|
|
|
- queryWrapper.eq("generatingcapacity",generatingcapacity);
|
|
|
+ if (StringUtils.isNotNull(generatingcapacity) && !generatingcapacity.equals("")) {
|
|
|
+ queryWrapper.eq("generatingcapacity", generatingcapacity);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(outagehours)&&outagehours!=0.0){
|
|
|
- queryWrapper.eq("outagehours",outagehours);
|
|
|
+ if (StringUtils.isNotNull(outagehours) && outagehours != 0.0) {
|
|
|
+ queryWrapper.eq("outagehours", outagehours);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(year)&&!year.equals("")){
|
|
|
- queryWrapper.eq("year",year);
|
|
|
+ if (StringUtils.isNotNull(year) && !year.equals("")) {
|
|
|
+ queryWrapper.eq("year", year);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(month)&&!month.equals("")){
|
|
|
- queryWrapper.eq("month",month);
|
|
|
+ if (StringUtils.isNotNull(month) && !month.equals("")) {
|
|
|
+ queryWrapper.eq("month", month);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(windpower)&&!windpower.equals("")){
|
|
|
- queryWrapper.eq("windpower",windpower);
|
|
|
+ if (StringUtils.isNotNull(windpower) && !windpower.equals("")) {
|
|
|
+ queryWrapper.eq("windpower", windpower);
|
|
|
}
|
|
|
|
|
|
Page<XrpProjectplan> page1 = xrpProjectplanService.page(page, queryWrapper);
|
|
@@ -117,136 +118,137 @@ public class BackConfigService {
|
|
|
public boolean removeWapper(XrpProjectplan xrpProjectplan) {
|
|
|
|
|
|
|
|
|
- QueryWrapper<XrpProjectplan> queryWrapper=new QueryWrapper<XrpProjectplan>();
|
|
|
+ QueryWrapper<XrpProjectplan> queryWrapper = new QueryWrapper<XrpProjectplan>();
|
|
|
conditionJudge(xrpProjectplan, queryWrapper);
|
|
|
return xrpProjectplanService.remove(queryWrapper);
|
|
|
}
|
|
|
|
|
|
private void conditionJudge(XrpProjectplan xrpProjectplan, QueryWrapper<XrpProjectplan> queryWrapper) {
|
|
|
- String id=xrpProjectplan.getId();
|
|
|
- String projectid=xrpProjectplan.getProjectid();
|
|
|
- String generatingcapacity=xrpProjectplan.getGeneratingcapacity();
|
|
|
- Double outagehours=xrpProjectplan.getOutagehours();
|
|
|
- String year=xrpProjectplan.getYear();
|
|
|
- String month=xrpProjectplan.getMonth();
|
|
|
- String windpower=xrpProjectplan.getWindpower();
|
|
|
- if(StringUtils.isNotNull(id)&&!id.equals("")){
|
|
|
- queryWrapper.eq("id",id);
|
|
|
+ String id = xrpProjectplan.getId();
|
|
|
+ String projectid = xrpProjectplan.getProjectid();
|
|
|
+ String generatingcapacity = xrpProjectplan.getGeneratingcapacity();
|
|
|
+ Double outagehours = xrpProjectplan.getOutagehours();
|
|
|
+ String year = xrpProjectplan.getYear();
|
|
|
+ String month = xrpProjectplan.getMonth();
|
|
|
+ String windpower = xrpProjectplan.getWindpower();
|
|
|
+ if (StringUtils.isNotNull(id) && !id.equals("")) {
|
|
|
+ queryWrapper.eq("id", id);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(projectid)&&!projectid.equals("")){
|
|
|
- queryWrapper.eq("projectid",projectid);
|
|
|
+ if (StringUtils.isNotNull(projectid) && !projectid.equals("")) {
|
|
|
+ queryWrapper.eq("projectid", projectid);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(generatingcapacity)&&!generatingcapacity.equals("")){
|
|
|
- queryWrapper.eq("generatingcapacity",generatingcapacity);
|
|
|
+ if (StringUtils.isNotNull(generatingcapacity) && !generatingcapacity.equals("")) {
|
|
|
+ queryWrapper.eq("generatingcapacity", generatingcapacity);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(outagehours)&&outagehours!=0.0){
|
|
|
- queryWrapper.eq("outagehours",outagehours);
|
|
|
+ if (StringUtils.isNotNull(outagehours) && outagehours != 0.0) {
|
|
|
+ queryWrapper.eq("outagehours", outagehours);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(year)&&!year.equals("")){
|
|
|
- queryWrapper.eq("year",year);
|
|
|
+ if (StringUtils.isNotNull(year) && !year.equals("")) {
|
|
|
+ queryWrapper.eq("year", year);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(month)&&!month.equals("")){
|
|
|
- queryWrapper.eq("month",month);
|
|
|
+ if (StringUtils.isNotNull(month) && !month.equals("")) {
|
|
|
+ queryWrapper.eq("month", month);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(windpower)&&!windpower.equals("")){
|
|
|
- queryWrapper.eq("windpower",windpower);
|
|
|
+ if (StringUtils.isNotNull(windpower) && !windpower.equals("")) {
|
|
|
+ queryWrapper.eq("windpower", windpower);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public boolean removeWapperById(String id) {
|
|
|
- QueryWrapper<XrpProjectplan> queryWrapper=new QueryWrapper<XrpProjectplan>();
|
|
|
- queryWrapper.eq("id",id);
|
|
|
+ QueryWrapper<XrpProjectplan> queryWrapper = new QueryWrapper<XrpProjectplan>();
|
|
|
+ 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());
|
|
|
+ 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();
|
|
|
+ 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(id) && !id.equals("")) {
|
|
|
+ queryWrapper.eq("id", id);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(code)&&!id.equals("")){
|
|
|
- queryWrapper.eq("code",code);
|
|
|
+ if (StringUtils.isNotNull(code) && !code.equals("")) {
|
|
|
+ queryWrapper.eq("code", code);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(name)&&!id.equals("")){
|
|
|
- queryWrapper.eq("name",name);
|
|
|
+ if (StringUtils.isNotNull(name) && !name.equals("")) {
|
|
|
+ queryWrapper.eq("name", name);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(address)&&!id.equals("")){
|
|
|
- queryWrapper.eq("address",address);
|
|
|
+ if (StringUtils.isNotNull(address) && !address.equals("")) {
|
|
|
+ queryWrapper.eq("address", address);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(telephone)&&!id.equals("")){
|
|
|
- queryWrapper.eq("telephone",telephone);
|
|
|
+ if (StringUtils.isNotNull(telephone) && !telephone.equals("")) {
|
|
|
+ queryWrapper.eq("telephone", telephone);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(capacity)&&!id.equals("")){
|
|
|
- queryWrapper.eq("capacity",capacity);
|
|
|
+ if (StringUtils.isNotNull(capacity) && !capacity.equals("")) {
|
|
|
+ queryWrapper.eq("capacity", capacity);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(capacityunit)&&!id.equals("")){
|
|
|
- queryWrapper.eq("capacityunit",capacityunit);
|
|
|
+ if (StringUtils.isNotNull(capacityunit) && !capacityunit.equals("")) {
|
|
|
+ queryWrapper.eq("capacityunit", capacityunit);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(aname)&&!id.equals("")){
|
|
|
- queryWrapper.eq("aname",aname);
|
|
|
+ if (StringUtils.isNotNull(aname) && !aname.equals("")) {
|
|
|
+ queryWrapper.eq("aname", aname);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(longitude)&&!id.equals("")){
|
|
|
- queryWrapper.eq("longitude",longitude);
|
|
|
+ if (StringUtils.isNotNull(longitude) && !longitude.equals("")) {
|
|
|
+ queryWrapper.eq("longitude", longitude);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(photo)&&!id.equals("")){
|
|
|
- queryWrapper.eq("photo",photo);
|
|
|
+ if (StringUtils.isNotNull(photo) && !photo.equals("")) {
|
|
|
+ queryWrapper.eq("photo", photo);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(quantity)&&!id.equals("")){
|
|
|
- queryWrapper.eq("quantity",quantity);
|
|
|
+ if (StringUtils.isNotNull(quantity) && !quantity.equals("")) {
|
|
|
+ queryWrapper.eq("quantity", quantity);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(latitude)&&!id.equals("")){
|
|
|
- queryWrapper.eq("latitude",latitude);
|
|
|
+ if (StringUtils.isNotNull(latitude) && !latitude.equals("")) {
|
|
|
+ queryWrapper.eq("latitude", latitude);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(companyid)&&!id.equals("")){
|
|
|
- queryWrapper.eq("companyid",companyid);
|
|
|
+ if (StringUtils.isNotNull(companyid) && !companyid.equals("")) {
|
|
|
+ queryWrapper.eq("companyid", companyid);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(systemmanufact)&&!id.equals("")){
|
|
|
- queryWrapper.eq("systemmanufact",systemmanufact);
|
|
|
+ if (StringUtils.isNotNull(systemmanufact) && !systemmanufact.equals("")) {
|
|
|
+ queryWrapper.eq("systemmanufact", systemmanufact);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(headfarm)&&!id.equals("")){
|
|
|
- queryWrapper.eq("headfarm",headfarm);
|
|
|
+ if (StringUtils.isNotNull(headfarm) && !headfarm.equals("")) {
|
|
|
+ queryWrapper.eq("headfarm", headfarm);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(headfarmphone)&&!id.equals("")){
|
|
|
- queryWrapper.eq("headfarmphone",headfarmphone);
|
|
|
+ if (StringUtils.isNotNull(headfarmphone) && !headfarmphone.equals("")) {
|
|
|
+ queryWrapper.eq("headfarmphone", headfarmphone);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(model)&&!id.equals("")){
|
|
|
- queryWrapper.eq("model",model);
|
|
|
+ if (StringUtils.isNotNull(model) && !model.equals("")) {
|
|
|
+ queryWrapper.eq("model", model);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(ordernum)&&!id.equals("")){
|
|
|
- queryWrapper.eq("ordernum",ordernum);
|
|
|
+ if (StringUtils.isNotNull(ordernum) && !ordernum.equals("")) {
|
|
|
+ queryWrapper.eq("ordernum", ordernum);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(altitudevo)&&!id.equals("")){
|
|
|
- queryWrapper.eq("altitudevo",altitudevo);
|
|
|
+ if (StringUtils.isNotNull(altitudevo) && !altitudevo.equals("")) {
|
|
|
+ queryWrapper.eq("altitudevo", altitudevo);
|
|
|
}
|
|
|
- if(StringUtils.isNotNull(height)&&!id.equals("")){
|
|
|
- queryWrapper.eq("height",height);
|
|
|
+ if (StringUtils.isNotNull(height) && !height.equals("")) {
|
|
|
+ queryWrapper.eq("height", height);
|
|
|
}
|
|
|
|
|
|
- Page<Windpowerstation> page1 = windpowerstationService.page(page,queryWrapper);
|
|
|
+ Page<Windpowerstation> page1 = windpowerstationService.page(page, queryWrapper);
|
|
|
return page1;
|
|
|
}
|
|
|
|
|
@@ -269,51 +271,119 @@ public class BackConfigService {
|
|
|
String shiftforemanphone = vo.getShiftforemanphone();
|
|
|
Integer ordernum = vo.getOrdernum();
|
|
|
|
|
|
- if(StringUtils.isNotNull(id)&&!id.equals("")){
|
|
|
- queryWrapper.eq("id",id);
|
|
|
+ if (StringUtils.isNotNull(id) && !id.equals("")) {
|
|
|
+ queryWrapper.eq("id", id);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(code)&&!code.equals("")){
|
|
|
- queryWrapper.eq("code",code);
|
|
|
+ if (StringUtils.isNotNull(code) && !code.equals("")) {
|
|
|
+ queryWrapper.eq("code", code);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(aname)&&!code.equals("")){
|
|
|
- queryWrapper.eq("aname",aname);
|
|
|
+ if (StringUtils.isNotNull(aname) && !aname.equals("")) {
|
|
|
+ queryWrapper.eq("aname", aname);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(name)&&!code.equals("")){
|
|
|
- queryWrapper.eq("name",name);
|
|
|
+ if (StringUtils.isNotNull(name) && !name.equals("")) {
|
|
|
+ queryWrapper.eq("name", name);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(capacityunit)&&!code.equals("")){
|
|
|
- queryWrapper.eq("capacityunit",capacityunit);
|
|
|
+ if (StringUtils.isNotNull(capacityunit) && !capacityunit.equals("")) {
|
|
|
+ queryWrapper.eq("capacityunit", capacityunit);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(capacity)&&!code.equals("")){
|
|
|
- queryWrapper.eq("capacity",capacity);
|
|
|
+ if (StringUtils.isNotNull(capacity) && !capacity.equals("")) {
|
|
|
+ queryWrapper.eq("capacity", capacity);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(windpowerstationid)&&!code.equals("")){
|
|
|
- queryWrapper.eq("windpowerstationid",windpowerstationid);
|
|
|
+ if (StringUtils.isNotNull(windpowerstationid) && !windpowerstationid.equals("")) {
|
|
|
+ queryWrapper.eq("windpowerstationid", windpowerstationid);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(quantity)&&!code.equals("")){
|
|
|
- queryWrapper.eq("quantity",quantity);
|
|
|
+ if (StringUtils.isNotNull(quantity) && !quantity.equals("")) {
|
|
|
+ queryWrapper.eq("quantity", quantity);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(model)&&!code.equals("")){
|
|
|
- queryWrapper.eq("model",model);
|
|
|
+ if (StringUtils.isNotNull(model) && !model.equals("")) {
|
|
|
+ queryWrapper.eq("model", model);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(commissiondate)&&!code.equals("")){
|
|
|
- queryWrapper.eq("commissiondate",commissiondate);
|
|
|
+ if (StringUtils.isNotNull(commissiondate) && !commissiondate.equals("")) {
|
|
|
+ queryWrapper.eq("commissiondate", commissiondate);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(masterphone)&&!code.equals("")){
|
|
|
- queryWrapper.eq("masterphone",masterphone);
|
|
|
+ if (StringUtils.isNotNull(masterphone) && !masterphone.equals("")) {
|
|
|
+ queryWrapper.eq("masterphone", masterphone);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(shiftforeman)&&!code.equals("")){
|
|
|
- queryWrapper.eq("shiftforeman",shiftforeman);
|
|
|
+ if (StringUtils.isNotNull(shiftforeman) && !shiftforeman.equals("")) {
|
|
|
+ queryWrapper.eq("shiftforeman", shiftforeman);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(shiftforemanphone)&&!code.equals("")){
|
|
|
- queryWrapper.eq("shiftforemanphone",shiftforemanphone);
|
|
|
+ if (StringUtils.isNotNull(shiftforemanphone) && !shiftforemanphone.equals("")) {
|
|
|
+ queryWrapper.eq("shiftforemanphone", shiftforemanphone);
|
|
|
}
|
|
|
- if (StringUtils.isNotNull(ordernum)&&!code.equals("")){
|
|
|
- queryWrapper.eq("ordernum",ordernum);
|
|
|
+ if (StringUtils.isNotNull(ordernum) && !ordernum.equals("")) {
|
|
|
+ queryWrapper.eq("ordernum", ordernum);
|
|
|
}
|
|
|
|
|
|
- Page<Project> page1 = projectService.page(page,queryWrapper);
|
|
|
+ Page<Project> page1 = projectService.page(page, queryWrapper);
|
|
|
+ return page1;
|
|
|
+ }
|
|
|
+
|
|
|
+ //line分页
|
|
|
+ public Page<Line> lineBypage(Linevo vo) {
|
|
|
+ Page<Line> page = new Page<Line>(vo.getCurrent(), vo.getPageSize());
|
|
|
+
|
|
|
+ QueryWrapper<Line> queryWrapper = new QueryWrapper<>();
|
|
|
+ String id = vo.getId();
|
|
|
+ String code = vo.getCode();
|
|
|
+ String aname = vo.getAname();
|
|
|
+ String name = vo.getName();
|
|
|
+ String projectid = vo.getProjectid();
|
|
|
+ Integer ordernum = vo.getOrdernum();
|
|
|
+ String capacityunit = vo.getCapacityunit();
|
|
|
+ Integer capacity = vo.getCapacity();
|
|
|
+ Integer quantity = vo.getQuantity();
|
|
|
+
|
|
|
+ if (StringUtils.isNotNull(id) && !id.equals("")) {
|
|
|
+ queryWrapper.eq("id", id);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(code) && !code.equals("")) {
|
|
|
+ queryWrapper.eq("code", code);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(aname) && !aname.equals("")) {
|
|
|
+ queryWrapper.eq("aname", aname);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(name) && !name.equals("")) {
|
|
|
+ queryWrapper.eq("name", name);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(capacityunit) && !capacityunit.equals("")) {
|
|
|
+ queryWrapper.eq("capacityunit", capacityunit);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(capacity) && !capacity.equals("")) {
|
|
|
+ queryWrapper.eq("capacity", capacity);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(projectid) && !projectid.equals("")) {
|
|
|
+ queryWrapper.eq("projectid", projectid);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(ordernum) && !ordernum.equals("")) {
|
|
|
+ queryWrapper.eq("ordernum", ordernum);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(quantity) && !quantity.equals("")) {
|
|
|
+ queryWrapper.eq("quantity", quantity);
|
|
|
+ }
|
|
|
+ Page<Line> page1 = lineService.page(page, queryWrapper);
|
|
|
return page1;
|
|
|
}
|
|
|
|
|
|
+ //Companys
|
|
|
+ public Page<Companys> CompanysBypage(Companysvo vo) {
|
|
|
+ Page<Companys> page = new Page<Companys>(vo.getCurrent(), vo.getPageSize());
|
|
|
+
|
|
|
+ QueryWrapper<Companys> queryWrapper = new QueryWrapper<>();
|
|
|
+ String id = vo.getId();
|
|
|
+ String rid = vo.getRid();
|
|
|
+ String name = vo.getName();
|
|
|
+
|
|
|
+ if (StringUtils.isNotNull(id) && !id.equals("")) {
|
|
|
+ queryWrapper.eq("id", id);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(rid) && !rid.equals("")) {
|
|
|
+ queryWrapper.eq("code", rid);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(name) && !name.equals("")) {
|
|
|
+ queryWrapper.eq("aname", name);
|
|
|
+ }
|
|
|
+
|
|
|
+ Page<Companys> page1 = companysService.page(page, queryWrapper);
|
|
|
+ return page1;
|
|
|
+ }
|
|
|
}
|