Merge remote-tracking branch 'origin/develop_master' into develop_3
This commit is contained in:
+6
@@ -86,6 +86,12 @@ public class TsInstitutionController extends BaseController<TsInstitution> {
|
||||
return tsInstitutionService.getNext(institutionId,userName);
|
||||
}
|
||||
|
||||
@ApiOperation("获得下一级的部门和人员")
|
||||
@GetMapping("/getNextById")
|
||||
public List<TsInstitution> getNextById(String ids){
|
||||
return tsInstitutionService.getNextById(ids);
|
||||
}
|
||||
|
||||
@ApiOperation("获得第一级部门目录")
|
||||
@GetMapping("/getFirstInstitution")
|
||||
public List<TsInstitution> getFirstInstitution(){
|
||||
|
||||
@@ -29,6 +29,8 @@ public interface TsInstitutionDao extends BaseMapper<TsInstitution> {
|
||||
*/
|
||||
List<TsInstitution> selectNextUser(@Param("institutionId") String institutionId,@Param("userName") String userName);
|
||||
|
||||
List<TsInstitution> selectNextUserByIds(@Param("ids") List<String> ids);
|
||||
|
||||
|
||||
List<TsInstitution> selectTreeByIds(@Param("rootIds") List<String> rootIds);
|
||||
|
||||
|
||||
+2
@@ -37,6 +37,8 @@ public interface ITsInstitutionService extends IService<TsInstitution> {
|
||||
*/
|
||||
public List<TsInstitution> getNext(String institutionId,String userName);
|
||||
|
||||
public List<TsInstitution> getNextById(String ids);
|
||||
|
||||
/**
|
||||
* 获得第一级的部门
|
||||
* @return
|
||||
|
||||
+7
@@ -216,6 +216,13 @@ public class TsInstitutionServiceImpl extends ServiceImpl<TsInstitutionDao, TsIn
|
||||
return tsInstitutions;
|
||||
}
|
||||
|
||||
public List<TsInstitution> getNextById(String ids){
|
||||
List<String> strings=new ArrayList<>(Arrays.asList(ids.split(",")));
|
||||
List<TsInstitution> tsUsers=tsInstitutionDao.selectNextUserByIds(strings);
|
||||
|
||||
return tsUsers;
|
||||
}
|
||||
|
||||
|
||||
public List<TsInstitution> getFirst(){
|
||||
//查询第一层机构
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandProjectLibrary.controller;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.dao.standDTO;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.*;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.Head;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.ResponseDto;
|
||||
@@ -100,8 +101,8 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
**/
|
||||
@GetMapping("/queryProjectManager")
|
||||
@ApiOperation("查询产品线项目经理")
|
||||
public ResponseMessage queryProjectManager(@RequestParam(defaultValue = "1", value = "current")int current, @RequestParam(defaultValue = "10", value = "PageSize") int pageSize){
|
||||
IPage<SarStandProjectLibrary> list1 = sarStandProjectLibraryService.queryProjectManager(current,pageSize);
|
||||
public ResponseMessage queryProjectManager(@RequestParam(defaultValue = "1", value = "current")int current, @RequestParam(defaultValue = "10", value = "PageSize") int pageSize, standDTO standDTO){
|
||||
IPage<SarStandProjectLibrary> list1 = sarStandProjectLibraryService.queryProjectManager(current,pageSize, standDTO);
|
||||
// 创建一个新的list集合,用于存储去重后的元素
|
||||
List<productLineDto> listTemp = new ArrayList();
|
||||
for (SarStandProjectLibrary sarStandProjectLibrary:list1.getRecords()){
|
||||
|
||||
+1
@@ -30,4 +30,5 @@ public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLib
|
||||
List<String> getAllStand();
|
||||
List<SarStandProjectLibrary> updateByProjectId(@Param("id")String id, @Param("version")String version);
|
||||
void deleteByProjectId(@Param("projectId")String projectId);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.adc.da.slrs.sarStandProjectLibrary.dao;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class standDTO {
|
||||
|
||||
private String uname;
|
||||
|
||||
private String productLine;
|
||||
}
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
package com.adc.da.slrs.sarStandProjectLibrary.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.dao.standDTO;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.*;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.Head;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -17,7 +18,7 @@ public interface SarStandProjectLibraryService {
|
||||
List<String> queryNotMaintenanceProjectsolostar(String type);
|
||||
Map<String, Object> solostar();
|
||||
List<SarStandProjectLibrary> queryById(String id);
|
||||
IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize);
|
||||
IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize, standDTO standDTO);
|
||||
List<SarStandProjectLibrary> queryByProductLine(String productLine);
|
||||
List<SarStandProjectLibrary> queryStandId(String standId);
|
||||
IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId, String cars);
|
||||
|
||||
+12
-2
@@ -2,6 +2,7 @@ package com.adc.da.slrs.sarStandProjectLibrary.service.impl;
|
||||
import com.adc.da.ocr.util.UUIDUtils;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.dao.standDTO;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.*;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.dao.SarStandProjectLibraryDao;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.Head;
|
||||
@@ -260,11 +261,20 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize) {
|
||||
public IPage<SarStandProjectLibrary> queryProjectManager(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("product_line","s.user_id as projectManager","s.NAME AS uName");
|
||||
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");
|
||||
" 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());
|
||||
|
||||
Reference in New Issue
Block a user