|
|
|
@ -1,18 +1,21 @@
|
|
|
|
|
package com.glxp.api.controller.auth;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
|
import com.glxp.api.common.enums.ResultEnum;
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.entity.sup.UserCertEntity;
|
|
|
|
|
import com.glxp.api.entity.sup.UserCertSetEntity;
|
|
|
|
|
import com.glxp.api.entity.sup.UserRegisterEntity;
|
|
|
|
|
import com.glxp.api.exception.JsonException;
|
|
|
|
|
import com.glxp.api.req.purchase.certRequest;
|
|
|
|
|
import com.glxp.api.req.system.DeleteCompanyFileRequest;
|
|
|
|
|
import com.glxp.api.res.PageSimpleResponse;
|
|
|
|
|
import com.glxp.api.service.sup.UserCertService;
|
|
|
|
|
import com.glxp.api.service.sup.UserCertSetService;
|
|
|
|
|
import com.glxp.api.service.sup.UserRegisterService;
|
|
|
|
|
import com.glxp.api.util.StringUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
|
@ -44,12 +47,15 @@ public class ResgitserCertController {
|
|
|
|
|
private String filePath;
|
|
|
|
|
@Resource
|
|
|
|
|
private UserCertSetService userCertSetService;
|
|
|
|
|
@Resource
|
|
|
|
|
private UserRegisterService userRegisterService;
|
|
|
|
|
|
|
|
|
|
@GetMapping("/reg/company/cert/filterZcList")
|
|
|
|
|
public BaseResponse filterZcCert(certRequest certRequest, BindingResult bindingResult) {
|
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<UserCertEntity> userCertEntities = userCertService.selectByzcId(certRequest);
|
|
|
|
|
PageInfo<UserCertEntity> pageInfo;
|
|
|
|
|
pageInfo = new PageInfo<>(userCertEntities);
|
|
|
|
@ -76,7 +82,7 @@ public class ResgitserCertController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//资质证书添加
|
|
|
|
|
@PostMapping("/reg/company/cert/isertCert")
|
|
|
|
|
@PostMapping("/reg/localCompany/cert/isertCert")
|
|
|
|
|
public BaseResponse isertCert(@RequestBody UserCertEntity userCert) {
|
|
|
|
|
userCert.setBusinessId(Long.valueOf(getCompanyId()));
|
|
|
|
|
userCert.setCreateTime(new Date());
|
|
|
|
@ -88,6 +94,19 @@ public class ResgitserCertController {
|
|
|
|
|
return ResultVOUtils.success("成功");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("/reg/company/cert/isertCert")
|
|
|
|
|
public BaseResponse isertCert1(@RequestBody UserCertEntity userCert) {
|
|
|
|
|
UserRegisterEntity userRegisterEntity = userRegisterService.selectByMobile(String.valueOf(userCert.getBusinessId()));
|
|
|
|
|
userCert.setBusinessId(userRegisterEntity.getCompanyId());
|
|
|
|
|
userCert.setCreateTime(new Date());
|
|
|
|
|
userCert.setUpdateTime(new Date());
|
|
|
|
|
userCert.setStatus(1 + "");
|
|
|
|
|
userCert.setCheckStatus(0 + "");
|
|
|
|
|
userCert.setId(IdUtil.getSnowflakeNextId());
|
|
|
|
|
userCertService.insertCert(userCert);
|
|
|
|
|
return ResultVOUtils.success("成功");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//删除
|
|
|
|
|
@PostMapping("/reg/company/cert/deleteCert")
|
|
|
|
|
public BaseResponse deleteCert(@RequestBody DeleteCompanyFileRequest deleteCompanyFileRequest) {
|
|
|
|
|