|
|
@ -8,7 +8,6 @@ import com.elink.esua.epdc.dto.enterprise.form.EnterpriseInfoFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.enterprise.result.EnterpriseInfoResultDTO; |
|
|
|
import com.elink.esua.epdc.dto.form.CompleteRequisiteInfoDTO; |
|
|
|
import com.elink.esua.epdc.service.CustomEnterpriseService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
@ -34,15 +33,14 @@ public class ApiCustomEnterpriseController { |
|
|
|
**/ |
|
|
|
@PostMapping("completeSelectiveInfo") |
|
|
|
public Result completeEnterpriseInfo(@RequestBody EnterpriseInfoFormDTO enterpriseInfoFormDTO) { |
|
|
|
/** |
|
|
|
* 代码说明: |
|
|
|
* 除id外,不对EnterpriseInfoFormDTO的其他字段加限制。 |
|
|
|
* 因为前端表单中所有字段都是可选的。 |
|
|
|
* 用户提交任何信息都如实写入数据库。 |
|
|
|
* 无论空字符串还是空数值(会被转化为0) |
|
|
|
*/ |
|
|
|
ValidatorUtils.validateEntity(enterpriseInfoFormDTO); |
|
|
|
if(StringUtils.isBlank(enterpriseInfoFormDTO.getBusinessScope()) && |
|
|
|
StringUtils.isBlank(enterpriseInfoFormDTO.getIndustry()) && |
|
|
|
StringUtils.isBlank(enterpriseInfoFormDTO.getLegalPerson()) && |
|
|
|
enterpriseInfoFormDTO.getEmployedPopulation()==null && |
|
|
|
enterpriseInfoFormDTO.getRegisteredCapital()==null |
|
|
|
){ |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
return customEnterpriseService.completeEnterpriseInfo(enterpriseInfoFormDTO); |
|
|
|
} |
|
|
|
|
|
|
|