Commit 57234ef3 authored by tangwei's avatar tangwei

注释级联下拉参数

parent 914aa152
......@@ -2,8 +2,8 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWeight;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanWeightMapper;
......@@ -35,10 +35,10 @@ public class IdxBizFanWeightController extends BaseController {
@Autowired
IdxBizFanWeightMapper idxBizFanWeightMapper;
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/queryPage")
@ApiOperation(httpMethod = "GET",value = "场站列表", notes = "场站列表")
public ResponseModel<Page<IdxBizFanWeight>> queryForDealerReviewPage(@RequestParam(value = "current") int current, @RequestParam
public ResponseModel<com.baomidou.mybatisplus.extension.plugins.pagination.Page<IdxBizFanWeight>> queryForDealerReviewPage(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size, IdxBizFanWeight reviewDto) {
LambdaQueryWrapper<IdxBizFanWeight> qu=new LambdaQueryWrapper<>();
......@@ -48,36 +48,62 @@ public class IdxBizFanWeightController extends BaseController {
qu.eq(!StringUtils.isEmpty(reviewDto.getSubarray()),IdxBizFanWeight::getSubarray,reviewDto.getSubarray());
qu.eq(!StringUtils.isEmpty(reviewDto.getEquipmentName()),IdxBizFanWeight::getEquipmentName,reviewDto.getEquipmentName());
qu.eq(!StringUtils.isEmpty(reviewDto.getPointName()),IdxBizFanWeight::getPointName,reviewDto.getPointName());
Integer total = idxBizFanWeightMapper.selectCount(qu);
qu.orderByAsc(IdxBizFanWeight::getType);
PageHelper.startPage(current, size);
qu.last(" limit "+ (current-1)*size+","+size);
//PageHelper.startPage(current, size);
List<IdxBizFanWeight> list = idxBizFanWeightMapper.selectList(qu);
Page<IdxBizFanWeight> page = new Page();
page.setRecords(list);
page.setSize(size);
page.setCurrent(current);
return ResponseHelper.buildResponse(page);
//PageInfo<IdxBizFanWeight> page = new PageInfo(list);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IdxBizFanWeight> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<IdxBizFanWeight>();
pagenew.setCurrent(current);
pagenew.setTotal(total);
pagenew.setSize(size);
pagenew.setRecords(list);
return ResponseHelper.buildResponse(pagenew);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/drop_down")
@ApiOperation(httpMethod = "GET",value = "场站列表", notes = "场站列表")
public ResponseModel<List<IdxBizFanWeight>> queryForDealerReviewPage(String type) {
public ResponseModel<List<IdxBizFanWeight>> queryForDealerReviewPage(String type
// ,String arae
// ,String station
// ,String equipmentName
// ,String subarray
// ,String pointName
) {
QueryWrapper< IdxBizFanWeight> qu=new QueryWrapper<>();
String name="";
switch(type){
case "1":
name="ARAE";
// qu.eq("ARAE",arae);
break;
case "2":
name="STATION";
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
break;
case "3":
name="EQUIPMENT_NAME";
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
// qu.eq("EQUIPMENT_NAME",equipmentName);
break;
case "4":
name="SUBARRAY";
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
// qu.eq("EQUIPMENT_NAME",equipmentName);
// qu.eq("SUBARRAY",subarray);
break;
case "5":
name="POINT_NAME";
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
// qu.eq("EQUIPMENT_NAME",equipmentName);
// qu.eq("SUBARRAY",subarray);
// qu.eq("POINT_NAME",pointName);
break;
}
qu.isNotNull(name);
......
......@@ -2,16 +2,17 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWeight;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWeight;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvWeightMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Case;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -38,7 +39,7 @@ public class IdxBizPvWeightController extends BaseController {
@Autowired
IdxBizPvWeightMapper idxBizPvWeightMapper;
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/queryPage")
@ApiOperation(httpMethod = "GET",value = "场站列表", notes = "场站列表")
public ResponseModel<Page<IdxBizPvWeight>> queryForDealerReviewPage(@RequestParam(value = "current") int current, @RequestParam
......@@ -51,38 +52,75 @@ public class IdxBizPvWeightController extends BaseController {
qu.eq(!StringUtils.isEmpty(reviewDto.getSubarray()),IdxBizPvWeight::getSubarray,reviewDto.getSubarray());
qu.eq(!StringUtils.isEmpty(reviewDto.getEquipmentName()),IdxBizPvWeight::getEquipmentName,reviewDto.getEquipmentName());
qu.eq(!StringUtils.isEmpty(reviewDto.getPointName()),IdxBizPvWeight::getPointName,reviewDto.getPointName());
Integer total = idxBizPvWeightMapper.selectCount(qu);
qu.orderByAsc(IdxBizPvWeight::getType);
PageHelper.startPage(current, size);
qu.last(" limit "+ (current-1)*size+","+size);
/// PageHelper.startPage(current, size);
List<IdxBizPvWeight> list = idxBizPvWeightMapper.selectList(qu);
Page<IdxBizPvWeight> page = new Page();
page.setRecords(list);
page.setSize(size);
page.setCurrent(current);
return ResponseHelper.buildResponse(page);
// PageInfo<IdxBizPvWeight> page = new PageInfo(list);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IdxBizPvWeight> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<IdxBizPvWeight>();
pagenew.setCurrent(current);
pagenew.setTotal(total);
pagenew.setSize(size);
pagenew.setRecords(list);
return ResponseHelper.buildResponse(pagenew);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/drop_down")
@ApiOperation(httpMethod = "GET",value = "场站列表", notes = "场站列表")
public ResponseModel<List<IdxBizPvWeight>> queryForDealerReviewPage(String type) {
public ResponseModel<List<IdxBizPvWeight>> queryForDealerReviewPage(String type
// ,String arae
// ,String station
// ,String equipmentName
// ,String subarray
// ,String pointName
) {
if(type==null){
return ResponseHelper.buildResponse(null);
}
QueryWrapper< IdxBizPvWeight> qu=new QueryWrapper<>();
String name="";
IdxBizPvWeight qt=new IdxBizPvWeight();
switch(type){
case "1":
name="ARAE";
// qu.eq("ARAE",arae);
break;
case "2":
name="STATION";
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
break;
case "3":
name="EQUIPMENT_NAME";
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
// qu.eq("EQUIPMENT_NAME",equipmentName);
break;
case "4":
name="SUBARRAY";
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
// qu.eq("EQUIPMENT_NAME",equipmentName);
// qu.eq("SUBARRAY",subarray);
break;
case "5":
name="POINT_NAME";
// qu.eq("ARAE",arae);
// qu.eq("STATION",station);
// qu.eq("EQUIPMENT_NAME",equipmentName);
// qu.eq("SUBARRAY",subarray);
// qu.eq("POINT_NAME",pointName);
break;
}
qu.isNotNull(name);
qu.groupBy(name);
qu.orderByAsc(name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment