|
@@ -1,11 +1,18 @@
|
|
|
package com.gyee.backconfig.service.auto.impl;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.gyee.backconfig.model.auto.Line;
|
|
|
import com.gyee.backconfig.mapper.auto.LineMapper;
|
|
|
+import com.gyee.backconfig.model.auto.Windpowerstation;
|
|
|
import com.gyee.backconfig.service.auto.ILineService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.gyee.common.model.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
|
|
|
* <p>
|
|
|
* 服务实现类
|
|
@@ -17,4 +24,44 @@ import org.springframework.stereotype.Service;
|
|
|
@Service
|
|
|
public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements ILineService {
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<Line> getList(String id, String name, String code, String aname, String projectid, Integer ordernum, Integer capacity, String capacityunit, Integer quantity, String pageNum, String pageSize) {
|
|
|
+ QueryWrapper<Line> qw = new QueryWrapper<>();
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(id)){
|
|
|
+ qw.like("id",id);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(code)){
|
|
|
+ qw.like("code",code);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(name)){
|
|
|
+ qw.like("name",name);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(name)){
|
|
|
+ qw.eq("projectid",projectid);
|
|
|
+ }
|
|
|
+ Page<Line> page = new Page<>(Integer.parseInt(pageNum),Integer.parseInt(pageSize));
|
|
|
+ Page<Line> companysPage = getBaseMapper().selectPage(page, qw);
|
|
|
+ List<Line> list = companysPage.getRecords();
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Line getOne(String id) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean addOrUpdate(Line Line) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean removeByIds(String ids) {
|
|
|
+ String[] strings = ids.split(",");
|
|
|
+ boolean b = this.removeByIds(Arrays.asList(strings));
|
|
|
+ return b;
|
|
|
+ }
|
|
|
}
|