| | |
| | | /** |
| | | * 获取所有或者根据姓名和工号查询,分页 |
| | | */ |
| | | public static final String GRID_GET_getAll_Search_Page_URL = "http://171.217.92.33:53303/gridOperator/getAllOrSearchByPage?areaId=jhRxqEQp&limit=200&page=1"; |
| | | public static final String GRID_GET_GETALL_SEARCH_PAGE_URL = "http://171.217.92.33:53303/gridOperator/getAllOrSearchByPage?areaId=jhRxqEQp&limit=200&page=1"; |
| | | } |
| | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * |
| | | * desc 本地事件类型和浪潮接口对应的事件类型的对应关系 |
| | | * 本地事件类型1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群信息上报 7宣传教育 |
| | | * @author manaiilin |
| | | */ |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import cn.afterturn.easypoi.excel.annotation.Excel; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | * 名字 |
| | | */ |
| | | @ExcelProperty(value = "名字" ,index = 0) |
| | | @Excel(name = "姓名(必填项)", width = 20, isImportField = "true_st") |
| | | private String name; |
| | | /** |
| | | * 身份证号码 |
| | | */ |
| | | @ExcelProperty(value = "身份证号码" ,index = 1) |
| | | @Excel(name = "身份证号码(必填项)", width = 20, isImportField = "true_st") |
| | | private String cardNo; |
| | | /** |
| | | * 残疾人证编码 |
| | | */ |
| | | @ExcelProperty(value = "残疾人证编码" ,index = 2) |
| | | @Excel(name = "残疾人证编码(必填项)", width = 20, isImportField = "true_st") |
| | | private String disableSn; |
| | | /** |
| | | * 出生年月 |
| | |
| | | * 残疾人证 |
| | | */ |
| | | @ExcelProperty(value = "残疾人证" ,index = 3) |
| | | @Excel(name = "残疾人证等级(必填项)", width = 20, isImportField = "true_st") |
| | | private String level; |
| | | /** |
| | | * 性别(取字典表国家编码) |
| | | */ |
| | | @ExcelProperty(value = "性别" ,index = 4) |
| | | @Excel(name = "性别(必填项)", width = 20, isImportField = "true_st") |
| | | private String sex; |
| | | /** |
| | | * 性别名称 |
| | |
| | | * 文化程度(取字典表国家编码)) |
| | | */ |
| | | @ExcelProperty(value = "文化程度" ,index = 5) |
| | | @Excel(name = "文化程度(必填项)", width = 20, isImportField = "true_st") |
| | | private String cultureLevel; |
| | | /** |
| | | * 民族 |
| | | */ |
| | | @ExcelProperty(value = "民族" ,index = 6) |
| | | @Excel(name = "民族(必填项)", width = 20, isImportField = "true_st") |
| | | private String nation; |
| | | /** |
| | | * 残疾部位/类别 |
| | | */ |
| | | @ExcelProperty(value = "残疾部位" ,index = 7) |
| | | @Excel(name = "残疾部位(必填项)", width = 20, isImportField = "true_st") |
| | | private String disableType; |
| | | /** |
| | | * 残疾级别 |
| | | */ |
| | | @ExcelProperty(value = "残疾级别" ,index = 8) |
| | | @Excel(name = "残疾级别(必填项)", width = 20, isImportField = "true_st") |
| | | private String disableLevel; |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @ExcelProperty(value = "联系电话" ,index = 9) |
| | | @Excel(name = "联系电话(必填项)", width = 20, isImportField = "true_st") |
| | | private String phone; |
| | | /** |
| | | * 监护人联系电话 |
| | | */ |
| | | @ExcelProperty(value = "监护人联系电话" ,index =10) |
| | | @Excel(name = "监护人联系电话(必填项)", width = 20, isImportField = "true_st") |
| | | private String guardianPhone; |
| | | /** |
| | | * 地址 |
| | | */ |
| | | @ExcelProperty(value = "地址" ,index = 11) |
| | | @Excel(name = "地址(必填项)", width = 20, isImportField = "true_st") |
| | | private String address; |
| | | /** |
| | | * 创建用户 |
| | |
| | | /** |
| | | * description 提交事件登记关联的文件或者图片信息 |
| | | * @param eventFile 文件对象 |
| | | * @return R 上传结果 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @PostMapping("lc/event/upload/file") |
| | | void automationUploadFile(@RequestBody EventFile eventFile); |
| | | R automationUploadFile(@RequestBody EventFile eventFile); |
| | | |
| | | /** |
| | | * description 提交事件登记关联的文件或者图片信息 |
| | |
| | | @ApiOperation(value = "导出用于导入的模板EXCEL", notes = "导出用于导入的模板EXCEL") |
| | | @GetMapping("diabled_person/export/model") |
| | | public void exportUser(HttpServletResponse response) throws IOException { |
| | | List<ExcelSelectObject> selectListObject = keyPersonBizService.defineExcelModelData(); |
| | | List<ExcelSelectObject> selectListObject = keyPersonBizService.defineDisableUserExcelModelData(); |
| | | //导出操作 |
| | | ExcelUtil.exportExcelForSelectList(Collections.emptyList(), "残疾人员信息导入模版", "残疾人员信息导入模版", KeyPersonExcelExportDto.class, "残疾人员信息导入模版.xls", selectListObject, response); |
| | | ExcelUtil.exportExcelForSelectList(Collections.emptyList(), "残疾人员信息导入模版", "残疾人员信息导入模版", DisabledPersonsDTO.class, "残疾人员信息导入模版.xls", selectListObject, response); |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | public List<ExcelSelectObject> definePopulationExcelModelData() { |
| | | HashMap map = new HashMap(5); |
| | | |
| | | List<String> dictNames = Arrays.asList("sex", "family", "education", "nation", "key_person_type"); |
| | | dictNames.forEach(dictName -> { |
| | | List<BcDictionaryVO> dictionaryItem = communityService.listDictionaryByKey(dictName).getData(); |
| | |
| | | excelSelectObjectList.add(new ExcelSelectObject(17, 17, (String[]) map.get("family"))); |
| | | return excelSelectObjectList; |
| | | } |
| | | |
| | | public List<ExcelSelectObject> defineDisableUserExcelModelData() { |
| | | HashMap map = new HashMap(5); |
| | | List<String> dictNames = Arrays.asList("sex", "education", "nation"); |
| | | dictNames.forEach(dictName -> { |
| | | List<BcDictionaryVO> dictionaryItem = communityService.listDictionaryByKey(dictName).getData(); |
| | | String[] dataMap = dictionaryItem.stream().map(dictionaryVO -> dictionaryVO.getDictName() + split + dictionaryVO.getDictValue()).distinct().toArray(String[]::new); |
| | | map.put(dictName, dataMap); |
| | | }); |
| | | List<ExcelSelectObject> excelSelectObjectList = new ArrayList<>(); |
| | | excelSelectObjectList.add(new ExcelSelectObject(4, 4, (String[]) map.get("sex"))); |
| | | excelSelectObjectList.add(new ExcelSelectObject(5, 5, (String[]) map.get("education"))); |
| | | excelSelectObjectList.add(new ExcelSelectObject(6, 6, (String[]) map.get("nation"))); |
| | | return excelSelectObjectList; |
| | | } |
| | | } |
| | |
| | | |
| | | @Override |
| | | public String getGridMemberListByAreaIdOrName(String areaId) { |
| | | HttpRequest request = HttpUtil.createPost(LangchaoApiConstants.GRID_GET_getAll_Search_Page_URL); |
| | | HttpRequest request = HttpUtil.createPost(LangchaoApiConstants.GRID_GET_GETALL_SEARCH_PAGE_URL); |
| | | request.auth(getAuthToken()); |
| | | request.form("areaId", areaId); |
| | | HttpResponse result = request.execute(); |