|
@@ -284,6 +284,7 @@ public class PersonInfoController {
|
|
|
@ApiImplicitParam(name = "name",value = "姓名", required = false, paramType = "form",dataType = "String"),
|
|
|
@ApiImplicitParam(name = "idCard",value = "身份证", required = false, paramType = "form",dataType = "String"),
|
|
|
@ApiImplicitParam(name = "phone",value = "手机号", required = false, paramType = "form",dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "companyId",value = "企业id", required = false, paramType = "form",dataType = "String"),
|
|
|
@ApiImplicitParam(name = "position1",value = "一级位置", required = false, paramType = "form",dataType = "String"),
|
|
|
@ApiImplicitParam(name = "position2",value = "二级位置", required = false, paramType = "form",dataType = "String"),
|
|
|
@ApiImplicitParam(name = "position3",value = "三级位置", required = false, paramType = "form",dataType = "String"),
|
|
@@ -294,6 +295,7 @@ public class PersonInfoController {
|
|
|
@RequestParam(value="name",defaultValue="") String name,
|
|
|
@RequestParam(value="idCard",defaultValue="") String idCard,
|
|
|
@RequestParam(value="phone",defaultValue="") String phone,
|
|
|
+ @RequestParam(value="companyId",defaultValue="") String companyId,
|
|
|
@RequestParam(value="position1",defaultValue="") String position1,
|
|
|
@RequestParam(value="position2",defaultValue="") String position2,
|
|
|
@RequestParam(value="position3",defaultValue="") String position3,
|
|
@@ -317,10 +319,13 @@ public class PersonInfoController {
|
|
|
searchParams.put("name","%" + name + "%");
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(idCard)) {
|
|
|
- searchParams.put("name","%" + idCard + "%");
|
|
|
+ searchParams.put("idCard","%" + idCard + "%");
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(phone)) {
|
|
|
- searchParams.put("name","%" + phone + "%");
|
|
|
+ searchParams.put("phone","%" + phone + "%");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(companyId)) {
|
|
|
+ searchParams.put("companyId",companyId);
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(position1)) {
|
|
|
searchParams.put("position1",position1);
|
|
@@ -656,10 +661,7 @@ public class PersonInfoController {
|
|
|
|
|
|
@ApiOperation(value="导出人员")
|
|
|
@PostMapping("exportXls")
|
|
|
- @ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "ids",value = "人员ids", required = false, paramType = "form",dataType = "String")
|
|
|
- })
|
|
|
- public MessageResult<String> exportXls(@RequestParam(value="ids",defaultValue="") String ids){
|
|
|
+ public MessageResult<String> exportXls(@RequestBody List<String> ids){
|
|
|
MessageResult<String> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
@@ -694,9 +696,8 @@ public class PersonInfoController {
|
|
|
HSSFCell cellTitle13 = rowTitle.createCell(12);
|
|
|
cellTitle13.setCellValue("访客开关");
|
|
|
//表内容
|
|
|
- String[] idArray = ids.split(",");
|
|
|
- for(int i=0; i<idArray.length; i++){
|
|
|
- PersonInfo personInfo = personInfoService.get(Long.getLong(idArray[i]));
|
|
|
+ for(int i=0; i<ids.size(); i++){
|
|
|
+ PersonInfo personInfo = personInfoService.get(Long.getLong(ids.get(i)));
|
|
|
|
|
|
HSSFRow rowContent = sheet.createRow(0);
|
|
|
HSSFCell cellContent1 = rowContent.createCell(0);
|