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

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

fix(jg):不同人员查询使用code进行匹配
parent 2b4b3b53
......@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.DPFilterParamForDetailDto;
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.ymt.api.entity.EquipmentCategory;
......@@ -24,7 +23,7 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
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);
......
......@@ -22,18 +22,24 @@
</if>
</select>
<select id="getSecurityAdmin" resultType="java.util.Map">
SELECT
<select id="getSecurityAdmin" resultType="java.util.Map">
SELECT
sequence_nbr sequenceNbr,
name,
phone,
certificate_num
FROM
FROM
"tzs_user_info"
WHERE
unit_code = #{companyCode}
AND post_name LIKE CONCAT('%',#{type},'%')
AND is_delete = 'f'
WHERE
is_delete = 'f'
AND unit_code = #{companyCode}
<if test="post != null and post.size() > 0">
AND (
<foreach collection="post" separator="or" item="postItem">
post like concat('%',#{postItem},'%')
</foreach>
)
</if>
</select>
<select id="getUserInfo" resultType="java.util.Map">
SELECT
......
......@@ -807,20 +807,21 @@ public class CommonServiceImpl implements ICommonService {
CompanyBo company = reginParams.getCompany();
companyCode = company.getCompanyCode();
}
String postName = null;
List<String> post = new ArrayList<>();
if (type.equals("use")) {
postName = "安全管理员";
post.add("6617") ;//安全管理员
}
if (type.equals("jyjc")) {
postName = "检验检测人员";
post.add("66151");//检验人员
post.add("66152");//检测人员
}
if (type.equals("agw")) {
postName = "安改维负责人";
post.add("6553");// 安改维负责人
}
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
......
......@@ -30,7 +30,7 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
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);
......
......@@ -191,8 +191,9 @@ public class TzsUserInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getUserType")
@ApiOperation(httpMethod = "GET", value = "根据单位类型获取人员类型", notes = "根据单位类型获取人员类型")
public ResponseModel<List<Map<String, Object>>> getUserType(@RequestParam(value = "unitType") String unitType) {
return ResponseHelper.buildResponse(tzsUserInfoService.getUserType(unitType));
public ResponseModel<List<Map<String, Object>>> getUserType(@RequestParam(value = "unitType") String unitType,
@RequestParam(value = "formType") String formType) {
return ResponseHelper.buildResponse(tzsUserInfoService.getUserType(unitType, formType));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -658,20 +658,30 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
@Override
public List<Map<String, Object>> getUserType(String unitType) {
public List<Map<String, Object>> getUserType(String unitType, String formType) {
// 详情可展示所有的人员类型
List<String> type = new ArrayList<>();
type.add("QYRYGW");
if (unitType.contains("use")) {
type.add("QYRYGW-SYDW");
}
if (unitType.contains("pro")) {
type.add("QYRYGW-SCDW");
}
if (unitType.contains("install")) {
type.add("QYRYGW-INSTALL");
}
if (unitType.contains("inspection")) {
type.add("QYRYGW-INSPECTION");
if ("detail".equals(formType)) {
type.addAll(Arrays.asList(
"QYRYGW-SYDW",
"QYRYGW-SCDW",
"QYRYGW-INSTALL",
"QYRYGW-INSPECTION"
));
} else {
if (unitType.contains("use")) {
type.add("QYRYGW-SYDW");
}
if (unitType.contains("pro")) {
type.add("QYRYGW-SCDW");
}
if (unitType.contains("install")) {
type.add("QYRYGW-INSTALL");
}
if (unitType.contains("inspection")) {
type.add("QYRYGW-INSPECTION");
}
}
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