|
|
@ -3,6 +3,7 @@ package com.epmet.controller; |
|
|
|
import com.epmet.commons.tools.annotation.MaskResponse; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.exception.ValidateException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
|
import com.epmet.commons.tools.utils.FileUtils; |
|
|
@ -13,6 +14,7 @@ import com.epmet.excel.data.*; |
|
|
|
import com.epmet.service.LingShanSpecialCrowdService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.io.IOUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
@ -23,6 +25,7 @@ import java.nio.file.Files; |
|
|
|
import java.nio.file.Path; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
/** |
|
|
|
* @description: 灵山社会维稳(特殊人群) |
|
|
@ -104,40 +107,40 @@ public class LingShanSpecialCrowdController { |
|
|
|
* @author: WangXianZhang |
|
|
|
* @date: 2023/4/20 2:50 PM |
|
|
|
*/ |
|
|
|
@PostMapping("anzhibangjiao/create") |
|
|
|
public Result createSpecialCrowd(@RequestBody LingShanSpecialCrowdDetailAzbjExcelData azbjData) { |
|
|
|
@PostMapping("anzhibangjiao/save") |
|
|
|
public Result saveSpecialCrowd(@RequestBody LingShanSpecialCrowdDetailAzbjExcelData azbjData) { |
|
|
|
ValidatorUtils.validateEntity(azbjData); |
|
|
|
|
|
|
|
lingShanSpecialCrowdService.createSpecialCrowd(azbjData, "anzhibangjiao"); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("xidurenyuan/create") |
|
|
|
public Result createSpecialCrowd(@RequestBody LingshanSpecialCrowdDetailJdryExcelData jdryData) { |
|
|
|
@PostMapping("xidurenyuan/save") |
|
|
|
public Result saveSpecialCrowd(@RequestBody LingshanSpecialCrowdDetailJdryExcelData jdryData) { |
|
|
|
ValidatorUtils.validateEntity(jdryData); |
|
|
|
|
|
|
|
lingShanSpecialCrowdService.createSpecialCrowd(jdryData, "xidurenyuan"); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("jingzhanhuanzhe/create") |
|
|
|
public Result createSpecialCrowd(@RequestBody LingshanSpecialCrowdDetailJzhzExcelData jzhzData) { |
|
|
|
@PostMapping("jingzhanhuanzhe/save") |
|
|
|
public Result saveSpecialCrowd(@RequestBody LingshanSpecialCrowdDetailJzhzExcelData jzhzData) { |
|
|
|
ValidatorUtils.validateEntity(jzhzData); |
|
|
|
|
|
|
|
lingShanSpecialCrowdService.createSpecialCrowd(jzhzData, "jingzhanhuanzhe"); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("shequjiaozheng/create") |
|
|
|
public Result createSpecialCrowd(@RequestBody LingshanSpecialCrowdDetailSqjzExcelData sqjzData) { |
|
|
|
@PostMapping("shequjiaozheng/save") |
|
|
|
public Result saveSpecialCrowd(@RequestBody LingshanSpecialCrowdDetailSqjzExcelData sqjzData) { |
|
|
|
ValidatorUtils.validateEntity(sqjzData); |
|
|
|
|
|
|
|
lingShanSpecialCrowdService.createSpecialCrowd(sqjzData, "shequjiaozheng"); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("xinfangrenyuan/create") |
|
|
|
public Result createSpecialCrowd(@RequestBody LingshanSpecialCrowdDetailXfryExcelData xfryData) { |
|
|
|
@PostMapping("xinfangrenyuan/save") |
|
|
|
public Result saveSpecialCrowd(@RequestBody LingshanSpecialCrowdDetailXfryExcelData xfryData) { |
|
|
|
ValidatorUtils.validateEntity(xfryData); |
|
|
|
|
|
|
|
lingShanSpecialCrowdService.createSpecialCrowd(xfryData, "xinfangrenyuan"); |
|
|
@ -190,5 +193,26 @@ public class LingShanSpecialCrowdController { |
|
|
|
return new Result<PageData<LingShanSpecialCrowdListResultDTO>>().ok(pd); |
|
|
|
} |
|
|
|
|
|
|
|
// 修改 todo
|
|
|
|
|
|
|
|
/** |
|
|
|
* @description: 删除 |
|
|
|
* @param params: |
|
|
|
* @return |
|
|
|
* @author: WangXianZhang |
|
|
|
* @date: 2023/4/21 9:40 AM |
|
|
|
*/ |
|
|
|
@PostMapping("deleteByType") |
|
|
|
public Result deleteByType(@RequestBody Map<String, String> params) { |
|
|
|
String specialType = params.get("specialType"); |
|
|
|
String idCard = params.get("idCard"); |
|
|
|
|
|
|
|
if (StringUtils.isAnyBlank(specialType, idCard)) { |
|
|
|
throw new ValidateException("特殊人群类型或身份证不能为空"); |
|
|
|
} |
|
|
|
|
|
|
|
lingShanSpecialCrowdService.deleteByType(specialType, idCard); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|