From 36958749d1a421a3720819ff1d286becb655dbdb Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 27 Oct 2021 09:29:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2form=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/IcFormController.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java index d89f303291..2e07a6cf79 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormController.java @@ -17,9 +17,7 @@ package com.epmet.controller; -import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -32,6 +30,7 @@ import com.epmet.dto.form.CustomerFormQueryDTO; import com.epmet.dto.result.CustomerFormResultDTO; import com.epmet.excel.IcFormExcel; import com.epmet.service.IcFormService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -49,7 +48,7 @@ import java.util.Map; @RestController @RequestMapping("icform") public class IcFormController { - + @Autowired private IcFormService icFormService; @@ -100,15 +99,17 @@ public class IcFormController { * 获取居民信息表单 * * @param formDto - * @return com.epmet.commons.tools.utils.Result - * @author yinzuomei + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei * @date 2021/10/26 2:40 下午 */ @PostMapping("getcustomerform") - public Result getCustomerForm(@LoginUser TokenDto tokenDto, @RequestBody CustomerFormQueryDTO formDto){ - formDto.setCustomerId(tokenDto.getCustomerId()); + public Result getCustomerForm(@RequestHeader String customerId, @RequestBody CustomerFormQueryDTO formDto){ + if (StringUtils.isBlank(formDto.getCustomerId())){ + formDto.setCustomerId(customerId); + } ValidatorUtils.validateEntity(formDto,CustomerFormQueryDTO.AddUserInternalGroup.class); return new Result().ok(icFormService.getCustomerForm(formDto)); } -} \ No newline at end of file +}