未符合项整改 新增 下拉处理
This commit is contained in:
+30
@@ -125,6 +125,36 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
return Result.success("200",pageres);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param current
|
||||
* @param pageSize
|
||||
* @return
|
||||
* @author zj
|
||||
* date 2021-07-13
|
||||
**/
|
||||
@GetMapping("/queryProjectManagerXL")
|
||||
@ApiOperation("查询产品线项目经理")
|
||||
public ResponseMessage queryProjectManagerXL(@RequestParam(defaultValue = "1", value = "current")int current, @RequestParam(defaultValue = "10", value = "PageSize") int pageSize, standDTO standDTO){
|
||||
IPage<SarStandProjectLibrary> list1 = sarStandProjectLibraryService.queryProjectManagerXL(current,pageSize, standDTO);
|
||||
// 创建一个新的list集合,用于存储去重后的元素
|
||||
List<productLineDto> listTemp = new ArrayList();
|
||||
for (SarStandProjectLibrary sarStandProjectLibrary:list1.getRecords()){
|
||||
productLineDto p = new productLineDto();
|
||||
p.setProductLine(sarStandProjectLibrary.getProductLine());
|
||||
List<SarStandProjectLibrary> list2 = sarStandProjectLibraryService.queryByProductLineXL(sarStandProjectLibrary.getProductLine());
|
||||
p.setSarStandProjectLibraries(list2);
|
||||
listTemp.add(p);
|
||||
}
|
||||
IPage<productLineDto> pageres=new Page<>();
|
||||
pageres.setRecords(listTemp);
|
||||
pageres.setPages(list1.getPages());
|
||||
pageres.setTotal(list1.getTotal());
|
||||
pageres.setCurrent(list1.getCurrent());
|
||||
pageres.setSize(list1.getSize());
|
||||
return Result.success("200",pageres);
|
||||
}
|
||||
|
||||
@GetMapping("/queryProjectUnderLine")
|
||||
@ApiOperation("查询产品线项目经理")
|
||||
public ResponseMessage queryProjectUnderLine(@RequestParam(defaultValue = "1", value = "current")int current,
|
||||
|
||||
+2
@@ -19,7 +19,9 @@ public interface SarStandProjectLibraryService {
|
||||
Map<String, Object> solostar();
|
||||
List<SarStandProjectLibrary> queryById(String id);
|
||||
IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize, standDTO standDTO);
|
||||
IPage<SarStandProjectLibrary> queryProjectManagerXL(int current, int pageSize, standDTO standDTO);
|
||||
List<SarStandProjectLibrary> queryByProductLine(String productLine);
|
||||
List<SarStandProjectLibrary> queryByProductLineXL(String productLine);
|
||||
List<SarStandProjectLibrary> queryStandId(String standId);
|
||||
IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId, String cars);
|
||||
|
||||
|
||||
+32
@@ -332,6 +332,29 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
System.out.println("总页数"+userIPage.getPages());
|
||||
return userIPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<SarStandProjectLibrary> queryProjectManagerXL(int current, int pageSize, standDTO standDTO) {
|
||||
StringBuilder stringBuilder=new StringBuilder();
|
||||
stringBuilder.append("where 1=1 ");
|
||||
if (null!=standDTO.getUname() && !"".equals(standDTO.getUname())){
|
||||
stringBuilder.append("and s.NAME like '%"+standDTO.getUname()+"%' ");
|
||||
}
|
||||
if (null!=standDTO.getProductLine() && !"".equals(standDTO.getProductLine())){
|
||||
stringBuilder.append("and sar_stand_project_library.product_line like '%"+standDTO.getProductLine()+"%' ");
|
||||
}
|
||||
|
||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||
wrapper.select("distinct product_line");
|
||||
wrapper.last("inner join sar_stand_project_team s on s.project_code = sar_stand_project_library.project_number" +
|
||||
" and sar_stand_project_library.product_line IS not NULL "+stringBuilder.toString());
|
||||
Page<SarStandProjectLibrary> page = new Page<>(current, pageSize);
|
||||
IPage<SarStandProjectLibrary> userIPage = sarStandProjectLibraryDao.selectPage(page, wrapper);
|
||||
System.out.println("总条数"+userIPage.getTotal());
|
||||
System.out.println("总页数"+userIPage.getPages());
|
||||
return userIPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarStandProjectLibrary> queryByProductLine(String productLine) {
|
||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||
@@ -339,6 +362,15 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
List<SarStandProjectLibrary> list = sarStandProjectLibraryDao.selectList(wrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarStandProjectLibrary> queryByProductLineXL(String productLine) {
|
||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||
wrapper.select("distinct project_number,project_name");
|
||||
wrapper.eq("product_line",productLine);
|
||||
List<SarStandProjectLibrary> list = sarStandProjectLibraryDao.selectList(wrapper);
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public List<SarStandProjectLibrary> queryStandId(String standId) {
|
||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||
|
||||
Reference in New Issue
Block a user