Commit a7cf3467 authored by 韩桐桐's avatar 韩桐桐

fix(tcm):详情展示所有人员类型;

fix(jg):不同人员查询使用code进行匹配
parent 2b4b3b53
...@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo; import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto; import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.jg.api.bo.JgBizCountDataBO; import com.yeejoin.amos.boot.module.jg.api.bo.JgBizCountDataBO;
import com.yeejoin.amos.boot.module.jg.api.dto.ReportAnalysisSearchDTO; import com.yeejoin.amos.boot.module.jg.api.dto.ReportAnalysisSearchDTO;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory; import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
...@@ -24,7 +23,7 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> { ...@@ -24,7 +23,7 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
List<Map<String, Object>> getUnitListByType(String type); List<Map<String, Object>> getUnitListByType(String type);
List<Map<String, Object>> getSecurityAdmin(String companyCode, String type); List<Map<String, Object>> getSecurityAdmin(String companyCode, List<String> post);
Map<String, Object> getUserInfo(String sequenceNbr); Map<String, Object> getUserInfo(String sequenceNbr);
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</if> </if>
</select> </select>
<select id="getSecurityAdmin" resultType="java.util.Map"> <select id="getSecurityAdmin" resultType="java.util.Map">
SELECT SELECT
sequence_nbr sequenceNbr, sequence_nbr sequenceNbr,
name, name,
...@@ -31,9 +31,15 @@ ...@@ -31,9 +31,15 @@
FROM FROM
"tzs_user_info" "tzs_user_info"
WHERE WHERE
unit_code = #{companyCode} is_delete = 'f'
AND post_name LIKE CONCAT('%',#{type},'%') AND unit_code = #{companyCode}
AND is_delete = 'f' <if test="post != null and post.size() > 0">
AND (
<foreach collection="post" separator="or" item="postItem">
post like concat('%',#{postItem},'%')
</foreach>
)
</if>
</select> </select>
<select id="getUserInfo" resultType="java.util.Map"> <select id="getUserInfo" resultType="java.util.Map">
SELECT SELECT
......
...@@ -807,20 +807,21 @@ public class CommonServiceImpl implements ICommonService { ...@@ -807,20 +807,21 @@ public class CommonServiceImpl implements ICommonService {
CompanyBo company = reginParams.getCompany(); CompanyBo company = reginParams.getCompany();
companyCode = company.getCompanyCode(); companyCode = company.getCompanyCode();
} }
String postName = null; List<String> post = new ArrayList<>();
if (type.equals("use")) { if (type.equals("use")) {
postName = "安全管理员"; post.add("6617") ;//安全管理员
} }
if (type.equals("jyjc")) { if (type.equals("jyjc")) {
postName = "检验检测人员"; post.add("66151");//检验人员
post.add("66152");//检测人员
} }
if (type.equals("agw")) { if (type.equals("agw")) {
postName = "安改维负责人"; post.add("6553");// 安改维负责人
} }
if (type.equals("wbry")) { if (type.equals("wbry")) {
postName = "维保人员"; post.add("6618");//维保人员
} }
return ObjectUtils.isEmpty(postName) ? new ArrayList<>() : commonMapper.getSecurityAdmin(companyCode, postName); return ObjectUtils.isEmpty(post) ? new ArrayList<>() : commonMapper.getSecurityAdmin(companyCode, post);
} }
@Override @Override
......
...@@ -30,7 +30,7 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> { ...@@ -30,7 +30,7 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
List<Map<String, Object>> getEquipmentType(String creditCode); List<Map<String, Object>> getEquipmentType(String creditCode);
List<Map<String, Object>> getUserType(String unitType); List<Map<String, Object>> getUserType(String unitType, String formType);
Map<String,Integer> getArrangementStatistic(String companyCode); Map<String,Integer> getArrangementStatistic(String companyCode);
......
...@@ -191,8 +191,9 @@ public class TzsUserInfoController extends BaseController { ...@@ -191,8 +191,9 @@ public class TzsUserInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getUserType") @GetMapping(value = "/getUserType")
@ApiOperation(httpMethod = "GET", value = "根据单位类型获取人员类型", notes = "根据单位类型获取人员类型") @ApiOperation(httpMethod = "GET", value = "根据单位类型获取人员类型", notes = "根据单位类型获取人员类型")
public ResponseModel<List<Map<String, Object>>> getUserType(@RequestParam(value = "unitType") String unitType) { public ResponseModel<List<Map<String, Object>>> getUserType(@RequestParam(value = "unitType") String unitType,
return ResponseHelper.buildResponse(tzsUserInfoService.getUserType(unitType)); @RequestParam(value = "formType") String formType) {
return ResponseHelper.buildResponse(tzsUserInfoService.getUserType(unitType, formType));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
......
...@@ -658,9 +658,18 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI ...@@ -658,9 +658,18 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
@Override @Override
public List<Map<String, Object>> getUserType(String unitType) { public List<Map<String, Object>> getUserType(String unitType, String formType) {
// 详情可展示所有的人员类型
List<String> type = new ArrayList<>(); List<String> type = new ArrayList<>();
type.add("QYRYGW"); type.add("QYRYGW");
if ("detail".equals(formType)) {
type.addAll(Arrays.asList(
"QYRYGW-SYDW",
"QYRYGW-SCDW",
"QYRYGW-INSTALL",
"QYRYGW-INSPECTION"
));
} else {
if (unitType.contains("use")) { if (unitType.contains("use")) {
type.add("QYRYGW-SYDW"); type.add("QYRYGW-SYDW");
} }
...@@ -673,6 +682,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI ...@@ -673,6 +682,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
if (unitType.contains("inspection")) { if (unitType.contains("inspection")) {
type.add("QYRYGW-INSPECTION"); type.add("QYRYGW-INSPECTION");
} }
}
return tzsUserInfoMapper.getUserTypeList(type); return tzsUserInfoMapper.getUserTypeList(type);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment