add:增加ProjectManager
This commit is contained in:
+2
-9
@@ -72,7 +72,6 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
return Result.success("200",list);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/queryProjectManager")
|
||||
@ApiOperation("查询产品线项目经理")
|
||||
public ResponseMessage queryProjectManager(@RequestParam(defaultValue = "1", value = "current")int current, @RequestParam(defaultValue = "10", value = "PageSize") int pageSize){
|
||||
@@ -83,18 +82,12 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
productLineDto p = new productLineDto();
|
||||
p.setProductLine(sarStandProjectLibrary.getProductLine());
|
||||
p.setUName(sarStandProjectLibrary.getUName());
|
||||
p.setProjectManager(sarStandProjectLibrary.getProjectManager());
|
||||
List<SarStandProjectLibrary> list2 = sarStandProjectLibraryService.queryByProductLine(sarStandProjectLibrary.getProductLine());
|
||||
p.setSarStandProjectLibraries(list2);
|
||||
listTemp.add(p);
|
||||
}
|
||||
IPage<productLineDto> iPage = new Page<>();
|
||||
iPage.setRecords(listTemp);
|
||||
iPage.setCurrent(list1.getCurrent());
|
||||
iPage.setSize(list1.getSize());
|
||||
iPage.setTotal(list1.getTotal());
|
||||
iPage.setPages(list1.getPages());
|
||||
|
||||
return Result.success("200",iPage);
|
||||
return Result.success("200",listTemp);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -16,6 +16,6 @@ import java.util.List;
|
||||
* @since 2021-06-15
|
||||
*/
|
||||
public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLibrary> {
|
||||
List<SarStandProjectLibrary> queryProjectManagerPage(@Param("current") int current, @Param("pageSize") int pageSize);
|
||||
// List<SarStandProjectLibrary> queryProjectManagerPage(@Param("current") int current, @Param("pageSize") int pageSize);
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -11,5 +11,7 @@ public class productLineDto {
|
||||
|
||||
private String productLine;
|
||||
|
||||
private String projectManager;
|
||||
|
||||
private List<SarStandProjectLibrary> sarStandProjectLibraries;
|
||||
}
|
||||
|
||||
+7
-6
@@ -4,7 +4,6 @@ import com.adc.da.slrs.sarStandIssueControlProduct.entity.SarStandIssueControlPr
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.dao.SarStandProjectLibraryDao;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibraryDto;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.productLineDto;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.service.SarStandProjectLibraryService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -128,11 +127,13 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
@Override
|
||||
public IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize) {
|
||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||
wrapper.groupBy("product_line");
|
||||
IPage<SarStandProjectLibrary> list = sarStandProjectLibraryDao.selectPage(new Page<>(current,pageSize),wrapper);
|
||||
List<SarStandProjectLibrary> libraryIPage=sarStandProjectLibraryDao.queryProjectManagerPage((current-1)*pageSize,current*pageSize);
|
||||
list.setRecords(libraryIPage);
|
||||
return list;
|
||||
wrapper.select("product_line","project_manager","uName");
|
||||
wrapper.last("inner join ts_user t on sar_stand_project_library.project_manager=t.usid group by sar_stand_project_library.product_line");
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user