Merge remote-tracking branch 'origin/develop_master' into develop_3

This commit is contained in:
zhaokaiyao@91isoft.com
2021-11-21 11:25:02 +08:00
11 changed files with 68 additions and 11 deletions
@@ -86,6 +86,12 @@ public class TsInstitutionController extends BaseController<TsInstitution> {
return tsInstitutionService.getNext(institutionId,userName); return tsInstitutionService.getNext(institutionId,userName);
} }
@ApiOperation("获得下一级的部门和人员")
@GetMapping("/getNextById")
public List<TsInstitution> getNextById(String ids){
return tsInstitutionService.getNextById(ids);
}
@ApiOperation("获得第一级部门目录") @ApiOperation("获得第一级部门目录")
@GetMapping("/getFirstInstitution") @GetMapping("/getFirstInstitution")
public List<TsInstitution> 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> 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); List<TsInstitution> selectTreeByIds(@Param("rootIds") List<String> rootIds);
@@ -37,6 +37,8 @@ public interface ITsInstitutionService extends IService<TsInstitution> {
*/ */
public List<TsInstitution> getNext(String institutionId,String userName); public List<TsInstitution> getNext(String institutionId,String userName);
public List<TsInstitution> getNextById(String ids);
/** /**
* 获得第一级的部门 * 获得第一级的部门
* @return * @return
@@ -216,6 +216,13 @@ public class TsInstitutionServiceImpl extends ServiceImpl<TsInstitutionDao, TsIn
return tsInstitutions; 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(){ public List<TsInstitution> getFirst(){
//查询第一层机构 //查询第一层机构
@@ -1,6 +1,7 @@
package com.adc.da.slrs.sarStandProjectLibrary.controller; package com.adc.da.slrs.sarStandProjectLibrary.controller;
import com.adc.da.http.ResponseMessage; import com.adc.da.http.ResponseMessage;
import com.adc.da.http.Result; 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.*;
import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.Head; import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.Head;
import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.ResponseDto; import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.ResponseDto;
@@ -100,8 +101,8 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
**/ **/
@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, standDTO standDTO){
IPage<SarStandProjectLibrary> list1 = sarStandProjectLibraryService.queryProjectManager(current,pageSize); IPage<SarStandProjectLibrary> list1 = sarStandProjectLibraryService.queryProjectManager(current,pageSize, standDTO);
// 创建一个新的list集合,用于存储去重后的元素 // 创建一个新的list集合,用于存储去重后的元素
List<productLineDto> listTemp = new ArrayList(); List<productLineDto> listTemp = new ArrayList();
for (SarStandProjectLibrary sarStandProjectLibrary:list1.getRecords()){ for (SarStandProjectLibrary sarStandProjectLibrary:list1.getRecords()){
@@ -30,4 +30,5 @@ public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLib
List<String> getAllStand(); List<String> getAllStand();
List<SarStandProjectLibrary> updateByProjectId(@Param("id")String id, @Param("version")String version); List<SarStandProjectLibrary> updateByProjectId(@Param("id")String id, @Param("version")String version);
void deleteByProjectId(@Param("projectId")String projectId); 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;
}
@@ -1,5 +1,6 @@
package com.adc.da.slrs.sarStandProjectLibrary.service; 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.*;
import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.Head; import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.Head;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -17,7 +18,7 @@ public interface SarStandProjectLibraryService {
List<String> queryNotMaintenanceProjectsolostar(String type); List<String> queryNotMaintenanceProjectsolostar(String type);
Map<String, Object> solostar(); Map<String, Object> solostar();
List<SarStandProjectLibrary> queryById(String id); 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> queryByProductLine(String productLine);
List<SarStandProjectLibrary> queryStandId(String standId); List<SarStandProjectLibrary> queryStandId(String standId);
IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId, String cars); IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId, String cars);
@@ -2,6 +2,7 @@ package com.adc.da.slrs.sarStandProjectLibrary.service.impl;
import com.adc.da.ocr.util.UUIDUtils; import com.adc.da.ocr.util.UUIDUtils;
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao; import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo; 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.entity.*;
import com.adc.da.slrs.sarStandProjectLibrary.dao.SarStandProjectLibraryDao; import com.adc.da.slrs.sarStandProjectLibrary.dao.SarStandProjectLibraryDao;
import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.Head; import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.Head;
@@ -260,11 +261,20 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
return list; return list;
} }
@Override @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<>(); QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
wrapper.select("product_line","s.user_id as projectManager","s.NAME AS uName"); 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" + 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); Page<SarStandProjectLibrary> page = new Page<>(current, pageSize);
IPage<SarStandProjectLibrary> userIPage = sarStandProjectLibraryDao.selectPage(page, wrapper); IPage<SarStandProjectLibrary> userIPage = sarStandProjectLibraryDao.selectPage(page, wrapper);
System.out.println("总条数"+userIPage.getTotal()); System.out.println("总条数"+userIPage.getTotal());
@@ -48,6 +48,22 @@
</if> </if>
</select> </select>
<select id="selectNextUserByIds" resultMap="TsUser">
select ts_user.EMAIL,ts_user.ACCOUNT,ts_user.CREATION_TIME,ts_user.DISABLE_FLAG,ts_user.EXT_INFO,ts_user.USID,
ts_user.INSTITUTION_ID,ts_user.INSTITUTION_NAME,ts_user.MODIFY_TIME,ts_user.OPER_USER,ts_user.PASSWORD,ts_user.PHONE,
ts_user.POSITION_ID,ts_user.POSITION_NAME,ts_user.SEX,ts_user.SSO_ID,ts_user.STATE,ts_user.UNLOCK_FLAG,ts_user.USER_SOURCE,
ts_user.USER_TYPE,ts_user.VALID_FLAG,ts_user.WORK_NUM,concat(ts_user.UNAME,concat(concat("(",ts_user.ACCOUNT),")")) as uname
from ts_user
WHERE 1=1
<if test="ids != null and ids.size()> 0 ">
and ts_user.USID in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
<select id="selectTreeByIds" resultMap="TsInstitution"> <select id="selectTreeByIds" resultMap="TsInstitution">
<foreach collection="rootIds" item="id"> <foreach collection="rootIds" item="id">
SELECT SELECT
@@ -754,9 +754,9 @@
<!-- 标准编号111 --> <!-- 标准编号111 -->
<if test="page.standNumber != null and page.standNumber != ''"> <if test="page.standNumber != null and page.standNumber != ''">
and ( and (
(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-', (trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
SAR_STANDARDS_INFO.STAND_YEAR) like concat(concat('%',#{page.standNumber}),'%') and SAR_STANDARDS_INFO.STAND_YEAR != '') SAR_STANDARDS_INFO.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{page.standNumber}),'%'),' ','')) and SAR_STANDARDS_INFO.STAND_YEAR != '')
or (concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER) like concat(concat('%',#{page.standNumber}),'%') or (trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER),' ','')) like trim(replace(concat(concat('%',#{page.standNumber}),'%'),' ',''))
and SAR_STANDARDS_INFO.STAND_YEAR = '') and SAR_STANDARDS_INFO.STAND_YEAR = '')
or (stand_name like concat(concat('%',#{page.standNumber}),'%')) or (stand_name like concat(concat('%',#{page.standNumber}),'%'))
) )
@@ -995,9 +995,9 @@
<if test="mark == 999 "> <if test="mark == 999 ">
and sar_standards_info.ID in (select distinct stand_id from sar_stand_items) and sar_standards_info.ID in (select distinct stand_id from sar_stand_items)
</if> </if>
<if test='page.orderByA != null and page.orderByA != "" and page.order1 != null and page.order1 != "" <if test='(page.orderByA != null and page.orderByA != "" and page.order1 != null and page.order1 != "")
and page.standType != null and page.standType != "" '> or (page.standType != null and page.standType != "") '>
<include refid="standSort_in"/> <include refid="standSort_in"/>
</if> </if>
limit ${page.pager.startIndex-1},${page.pageSize} limit ${page.pager.startIndex-1},${page.pageSize}
</select> </select>