Commit 11bf1039 authored by tianyiming's avatar tianyiming

大瓶人员列表接口

parent 0dcccdf9
...@@ -49,4 +49,21 @@ public class DPFilterParamDto { ...@@ -49,4 +49,21 @@ public class DPFilterParamDto {
* 企业单位名称(发起单位/使用单位) * 企业单位名称(发起单位/使用单位)
*/ */
private String companyName; private String companyName;
/**
* 人员类型
*/
private String newPost;
/**
* 姓名
*/
private String name;
/**
* 证件号码
*/
private String certificateNum;
/**
* 所在单位名称
*/
private String unitName;
} }
...@@ -43,10 +43,16 @@ public enum UserPostEnum { ...@@ -43,10 +43,16 @@ public enum UserPostEnum {
List<Map<String,String>> list = new ArrayList<>(); List<Map<String,String>> list = new ArrayList<>();
for (UserPostEnum testEnum : EnumSet.allOf(UserPostEnum.class)) { for (UserPostEnum testEnum : EnumSet.allOf(UserPostEnum.class)) {
Map<String,String> map = new HashMap<>(); Map<String,String> map = new HashMap<>();
if (testEnum.getType().contains(type)) { if (null == type) {
map.put("name",testEnum.getName()); map.put("name", testEnum.getName());
map.put("code",testEnum.getCode()); map.put("code", testEnum.getCode());
list.add(map); list.add(map);
} else {
if (testEnum.getType().contains(type)) {
map.put("name", testEnum.getName());
map.put("code", testEnum.getCode());
list.add(map);
}
} }
} }
return list; return list;
......
package com.yeejoin.amos.boot.module.statistics.api.mapper; package com.yeejoin.amos.boot.module.statistics.api.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto; import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -35,4 +36,7 @@ public interface ZLStatisticsMapper { ...@@ -35,4 +36,7 @@ public interface ZLStatisticsMapper {
Long getEquipTotal(@Param("cityCode") String cityCode); Long getEquipTotal(@Param("cityCode") String cityCode);
Long getEquListTotal(@Param("field") String field, @Param("cityCode") String cityCode); Long getEquListTotal(@Param("field") String field, @Param("cityCode") String cityCode);
Page<Map<String, Object>> getPersonPage(Page page, @Param("paramDto") DPFilterParamDto paramDto, @Param("orgCode") String orgCode, @Param("unitTypeList") List<String> unitTypeList);
} }
...@@ -107,6 +107,44 @@ ...@@ -107,6 +107,44 @@
<select id="getEquListTotal" resultType="java.lang.Long"> <select id="getEquListTotal" resultType="java.lang.Long">
select ${field} from tzs_equip_claim_statistics where city_code = #{cityCode} select ${field} from tzs_equip_claim_statistics where city_code = #{cityCode}
</select> </select>
<select id="getPersonPage" resultType="java.util.Map">
SELECT
tui.sequence_nbr sequenceNbr,
tui.name,
tui.profile,
tui.certificate_num certificateNum,
tui.unit_name unitName,
tui.post_name postName
FROM
tzs_user_info tui
LEFT JOIN tz_base_enterprise_info bei ON tui.unit_code = bei.use_code
where
tui.is_delete = '0'
<if test="unitTypeList != null and unitTypeList.size() > 0">
AND
<foreach collection="unitTypeList" item="unitType" open="(" separator="OR" close=")">
bei.unit_type LIKE concat ( '%', #{unitType}, '%' )
</foreach>
</if>
<if test="orgCode != null and orgCode != ''">
AND bei.supervise_org_code LIKE concat ( '%', #{orgCode}, '%' )
</if>
<if test="paramDto.name != null and paramDto.name != ''">
AND tui.name LIKE concat ( '%', #{paramDto.name}, '%' )
</if>
<if test="paramDto.newPost != null and paramDto.newPost != ''">
AND tui.new_post LIKE concat ( '%', #{paramDto.newPost}, '%' )
</if>
<if test="paramDto.name != null and paramDto.name != ''">
AND tui.name LIKE concat ( '%', #{paramDto.name}, '%' )
</if>
<if test="paramDto.certificateNum != null and paramDto.certificateNum != ''">
AND tui.certificate_num LIKE concat ( '%', #{paramDto.certificateNum}, '%' )
</if>
<if test="paramDto.unitName != null and paramDto.unitName != ''">
AND tui.unit_name LIKE concat ( '%', #{paramDto.unitName}, '%' )
</if>
</select>
</mapper> </mapper>
...@@ -148,4 +148,22 @@ public class ZLDPStatisticsController { ...@@ -148,4 +148,22 @@ public class ZLDPStatisticsController {
public ResponseModel<Object> equipTree(@RequestParam(value = "type", required = false) String type) { public ResponseModel<Object> equipTree(@RequestParam(value = "type", required = false) String type) {
return ResponseHelper.buildResponse(statisticsService.equipTree(type)); return ResponseHelper.buildResponse(statisticsService.equipTree(type));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/personPage")
@ApiOperation(httpMethod = "POST", value = "查询人员列表", notes = "查询人员列表")
public ResponseModel<Page<Map<String, Object>>> personPage(@RequestBody DPFilterParamDto paramDto,
@RequestParam("size") Integer size,
@RequestParam("current") Integer current) {
Page page = new Page<>(current, size);
return ResponseHelper.buildResponse(statisticsService.getPersonPage(paramDto, page));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/personType")
@ApiOperation(httpMethod = "GET", value = "查询人员类型", notes = "查询人员类型")
public ResponseModel<List<Map<String, String>>> personType(@RequestParam(value = "companyType",required = false) String companyType) {
return ResponseHelper.buildResponse(statisticsService.getPersonType(companyType));
}
} }
...@@ -1065,4 +1065,17 @@ public class ZLDPStatisticsServiceImpl { ...@@ -1065,4 +1065,17 @@ public class ZLDPStatisticsServiceImpl {
} }
return menus; return menus;
} }
public Page<Map<String,Object>> getPersonPage(DPFilterParamDto paramDto, Page page) {
String regionCode = paramDto.getCityCode();
String orgCode = stCommonService.getAndSetOrgCode(regionCode);
List<String> unitTypeList = UnitTypeEnum.getNameListByType(paramDto.getCompanyType());
Page<Map<String, Object>> result = screenMapper.getPersonPage(page, paramDto, orgCode, unitTypeList);
return result;
}
public List<Map<String, String>> getPersonType(String companyType) {
return UserPostEnum.getEnumListByType(companyType);
}
} }
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