Merge remote-tracking branch 'origin/develop_1' into develop_master
This commit is contained in:
+2
-9
@@ -72,7 +72,6 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
|||||||
return Result.success("200",list);
|
return Result.success("200",list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/queryProjectManager")
|
@GetMapping("/queryProjectManager")
|
||||||
@ApiOperation("查询产品线项目经理")
|
@ApiOperation("查询产品线项目经理")
|
||||||
public ResponseMessage queryProjectManager(@RequestParam(defaultValue = "1", value = "current")int current, @RequestParam(defaultValue = "10", value = "PageSize") int pageSize){
|
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();
|
productLineDto p = new productLineDto();
|
||||||
p.setProductLine(sarStandProjectLibrary.getProductLine());
|
p.setProductLine(sarStandProjectLibrary.getProductLine());
|
||||||
p.setUName(sarStandProjectLibrary.getUName());
|
p.setUName(sarStandProjectLibrary.getUName());
|
||||||
|
p.setProjectManager(sarStandProjectLibrary.getProjectManager());
|
||||||
List<SarStandProjectLibrary> list2 = sarStandProjectLibraryService.queryByProductLine(sarStandProjectLibrary.getProductLine());
|
List<SarStandProjectLibrary> list2 = sarStandProjectLibraryService.queryByProductLine(sarStandProjectLibrary.getProductLine());
|
||||||
p.setSarStandProjectLibraries(list2);
|
p.setSarStandProjectLibraries(list2);
|
||||||
listTemp.add(p);
|
listTemp.add(p);
|
||||||
}
|
}
|
||||||
IPage<productLineDto> iPage = new Page<>();
|
return Result.success("200",listTemp);
|
||||||
iPage.setRecords(listTemp);
|
|
||||||
iPage.setCurrent(list1.getCurrent());
|
|
||||||
iPage.setSize(list1.getSize());
|
|
||||||
iPage.setTotal(list1.getTotal());
|
|
||||||
iPage.setPages(list1.getPages());
|
|
||||||
|
|
||||||
return Result.success("200",iPage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -16,6 +16,6 @@ import java.util.List;
|
|||||||
* @since 2021-06-15
|
* @since 2021-06-15
|
||||||
*/
|
*/
|
||||||
public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLibrary> {
|
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 productLine;
|
||||||
|
|
||||||
|
private String projectManager;
|
||||||
|
|
||||||
private List<SarStandProjectLibrary> sarStandProjectLibraries;
|
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.entity.SarStandProjectLibrary;
|
||||||
import com.adc.da.slrs.sarStandProjectLibrary.dao.SarStandProjectLibraryDao;
|
import com.adc.da.slrs.sarStandProjectLibrary.dao.SarStandProjectLibraryDao;
|
||||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibraryDto;
|
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.adc.da.slrs.sarStandProjectLibrary.service.SarStandProjectLibraryService;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@@ -128,11 +127,13 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
@Override
|
@Override
|
||||||
public IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize) {
|
public IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize) {
|
||||||
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
|
||||||
wrapper.groupBy("product_line");
|
wrapper.select("product_line","project_manager","uName");
|
||||||
IPage<SarStandProjectLibrary> list = sarStandProjectLibraryDao.selectPage(new Page<>(current,pageSize),wrapper);
|
wrapper.last("inner join ts_user t on sar_stand_project_library.project_manager=t.usid group by sar_stand_project_library.product_line");
|
||||||
List<SarStandProjectLibrary> libraryIPage=sarStandProjectLibraryDao.queryProjectManagerPage((current-1)*pageSize,current*pageSize);
|
Page<SarStandProjectLibrary> page = new Page<>(current, pageSize);
|
||||||
list.setRecords(libraryIPage);
|
IPage<SarStandProjectLibrary> userIPage = sarStandProjectLibraryDao.selectPage(page, wrapper);
|
||||||
return list;
|
System.out.println("总条数"+userIPage.getTotal());
|
||||||
|
System.out.println("总页数"+userIPage.getPages());
|
||||||
|
return userIPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+8
-8
@@ -3,12 +3,12 @@
|
|||||||
<mapper namespace="com.adc.da.slrs.sarStandProjectLibrary.dao.SarStandProjectLibraryDao">
|
<mapper namespace="com.adc.da.slrs.sarStandProjectLibrary.dao.SarStandProjectLibraryDao">
|
||||||
|
|
||||||
|
|
||||||
<select id="queryProjectManagerPage" resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">
|
<!-- <select id="queryProjectManagerPage" resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">-->
|
||||||
select s.product_line,t.UNAME as uName
|
<!-- select s.product_line,t.UNAME as uName-->
|
||||||
from sar_stand_project_library s
|
<!-- from sar_stand_project_library s-->
|
||||||
INNER JOIN ts_user t
|
<!-- INNER JOIN ts_user t-->
|
||||||
ON s.project_manager=t.USID
|
<!-- ON s.project_manager=t.USID-->
|
||||||
GROUP BY s.product_line
|
<!-- GROUP BY s.product_line-->
|
||||||
limit #{current},#{pageSize}
|
<!-- limit #{current},#{pageSize}-->
|
||||||
</select>
|
<!-- </select>-->
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user