|
|
@@ -93,6 +93,7 @@ import com.goafanti.common.enums.UserAbilityFields;
|
|
|
import com.goafanti.common.enums.UserFields;
|
|
|
import com.goafanti.common.enums.UserIdentityFields;
|
|
|
import com.goafanti.common.enums.UserLevel;
|
|
|
+import com.goafanti.common.enums.UserType;
|
|
|
import com.goafanti.common.model.Admin;
|
|
|
import com.goafanti.common.model.OrgActivity;
|
|
|
import com.goafanti.common.model.OrgActivityCost;
|
|
|
@@ -399,6 +400,17 @@ public class AdminApiController extends CertifyApiController {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ if (UserType.ORGANIZATION.getCode().equals(inputUser.getType())
|
|
|
+ && StringUtils.isBlank(inputUser.getUnitName())) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "公司名称", "公司名称"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (UserType.PERSONAL.getCode().equals(inputUser.getType()) && StringUtils.isBlank(inputUser.getUsername())) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "用户名称", "用户名称"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
User u = new User();
|
|
|
u.setId(UUID.randomUUID().toString());
|
|
|
u.setMobile(inputUser.getMobile().trim());
|
|
|
@@ -410,7 +422,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
u.setPassword(passwordUtil.getEncryptPwd(u));
|
|
|
u.setLvl(UserLevel.GENERAL.getCode());
|
|
|
u.setAid(TokenManager.getAdminId());
|
|
|
- userService.insertRegister(u, "", inputUser.getUnitName());
|
|
|
+ userService.insertRegister(u, "", inputUser.getUnitName(), inputUser.getUsername());
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
@@ -445,7 +457,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
|
|
|
return res;
|
|
|
}
|
|
|
- res.setData(userIdentityService.selectUserIdentityByUserId(uid));
|
|
|
+ res.setData(userIdentityService.selectUserIdentityByUserIdAdmin(uid));
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
@@ -464,7 +476,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isBlank(userIdentity.getId())) {
|
|
|
- res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户认证ID", "找不到用户认证ID"));
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到认证ID", "认证ID"));
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
@@ -478,10 +490,16 @@ public class AdminApiController extends CertifyApiController {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ UserIdentity idd = userIdentityService.selectUserIdentityByUserId(userIdentity.getUid());
|
|
|
+ if (IdentityAuditStatus.COMMITTED.getCode().equals(idd.getAuditStatus())){
|
|
|
+ res.getError().add(buildError("", "审核中,无法保存或提交!"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
Integer level = userIdentity.getLevel();
|
|
|
if (!UserLevel.GENERAL.getCode().equals(level)) {
|
|
|
User u = userService.selectByPrimaryKey(userIdentity.getUid());
|
|
|
- if (UserLevel.GENERAL.getCode().equals(u.getLvl())){
|
|
|
+ if (UserLevel.GENERAL.getCode().equals(u.getLvl())) {
|
|
|
res.getError().add(buildError(ErrorConstants.NON_CERTIFIED, "未通过实名认证,无法操作!"));
|
|
|
return res;
|
|
|
}
|
|
|
@@ -504,6 +522,11 @@ public class AdminApiController extends CertifyApiController {
|
|
|
BeanUtils.copyProperties(userIdentity, ui);
|
|
|
|
|
|
if (CertifySubmitType.SUBMIT.getCode().equals(saveSign)) {
|
|
|
+ User u = userService.selectByPrimaryKey(userIdentity.getUid());
|
|
|
+ if (!UserLevel.GENERAL.getCode().equals(u.getLvl())) {
|
|
|
+ res.getError().add(buildError("", "已通过实名认证,无法操作!"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
ui.setProcess(IdentityProcess.COMMITTED.getCode());
|
|
|
ui.setAuditStatus(IdentityAuditStatus.COMMITTED.getCode());
|
|
|
}
|
|
|
@@ -541,7 +564,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
|
|
|
return res;
|
|
|
}
|
|
|
- res.setData(organizationIdentityService.selectOrgIdentityDetailByUserId(uid));
|
|
|
+ res.setData(organizationIdentityService.selectOrgIdentityDetailByUserIdAdmin(uid));
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
@@ -574,11 +597,16 @@ public class AdminApiController extends CertifyApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "保存提交方式"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ OrganizationIdentity idd = organizationIdentityService.selectOrgIdentityByUserId(orgIdentity.getUid());
|
|
|
+ if (IdentityAuditStatus.COMMITTED.getCode().equals(idd.getAuditStatus())){
|
|
|
+ res.getError().add(buildError("", "审核中,无法保存或提交!"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
Integer level = orgIdentity.getLevel();
|
|
|
if (!UserLevel.GENERAL.getCode().equals(level)) {
|
|
|
User u = userService.selectByPrimaryKey(orgIdentity.getUid());
|
|
|
- if (UserLevel.GENERAL.getCode().equals(u.getLvl())){
|
|
|
+ if (UserLevel.GENERAL.getCode().equals(u.getLvl())) {
|
|
|
res.getError().add(buildError(ErrorConstants.NON_CERTIFIED, "未通过实名认证,无法操作!"));
|
|
|
return res;
|
|
|
}
|
|
|
@@ -593,7 +621,15 @@ public class AdminApiController extends CertifyApiController {
|
|
|
|
|
|
OrganizationIdentity oi = new OrganizationIdentity();
|
|
|
BeanUtils.copyProperties(orgIdentity, oi);
|
|
|
-
|
|
|
+ if (CertifySubmitType.SUBMIT.getCode().equals(saveSign)) {
|
|
|
+ User u = userService.selectByPrimaryKey(oi.getUid());
|
|
|
+ if (!UserLevel.GENERAL.getCode().equals(u.getLvl())) {
|
|
|
+ res.getError().add(buildError("", "已通过实名认证,无法操作!"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ oi.setProcess(IdentityProcess.COMMITTED.getCode());
|
|
|
+ oi.setAuditStatus(IdentityAuditStatus.COMMITTED.getCode());
|
|
|
+ }
|
|
|
res.setData(organizationIdentityService.updateOrgDetail(oi, saveSign, level));
|
|
|
return res;
|
|
|
}
|
|
|
@@ -750,7 +786,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 删除团体人力资源
|
|
|
*
|
|
|
@@ -766,8 +802,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 企业参与国家标准或行业标准制定情况明细列表
|
|
|
*/
|
|
|
@@ -947,11 +982,11 @@ public class AdminApiController extends CertifyApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "知识产权ID"));
|
|
|
return res;
|
|
|
}
|
|
|
- if (IntellectualPropertyType.PATENT.getCode() == type) {
|
|
|
+ if (IntellectualPropertyType.PATENT.getCode().equals(type)) {
|
|
|
res.setData(orgIntellectualPropertyService.selectPatentTypeDetail(id));
|
|
|
- } else if (IntellectualPropertyType.COPYRIGHT.getCode() == type) {
|
|
|
+ } else if (IntellectualPropertyType.COPYRIGHT.getCode().equals(type)) {
|
|
|
res.setData(orgIntellectualPropertyService.selectCopyrightTypeDetail(id));
|
|
|
- } else if (IntellectualPropertyType.COMMON.getCode() == type) {
|
|
|
+ } else if (IntellectualPropertyType.COMMON.getCode().equals(type)) {
|
|
|
OrgIntellectualPropertyDetailBo oipdb = new OrgIntellectualPropertyDetailBo();
|
|
|
BeanUtils.copyProperties(oip, oipdb);
|
|
|
res.setData(oipdb);
|
|
|
@@ -1173,7 +1208,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
if (StringUtils.isBlank(otp.getId())) {
|
|
|
OrgTechProduct product = orgTechProductService.findBySerialNumberAndUid(otp.getSerialNumber(),
|
|
|
otp.getUid());
|
|
|
- if (null != product){
|
|
|
+ if (null != product) {
|
|
|
res.getError().add(buildError("", "产品编号重复,无法保存!"));
|
|
|
return res;
|
|
|
}
|
|
|
@@ -2220,7 +2255,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (!checkCertify(res, orgTechCenter.getUid()).getError().isEmpty()) {
|
|
|
return res;
|
|
|
}
|
|
|
@@ -2860,7 +2895,8 @@ public class AdminApiController extends CertifyApiController {
|
|
|
* 高企培育列表
|
|
|
*/
|
|
|
@RequestMapping(value = "/cultivate", method = RequestMethod.POST)
|
|
|
- public Result cultivationList(String uid, Integer locationProvince, String unitName, String pageNo, String pageSize) {
|
|
|
+ public Result cultivationList(String uid, Integer locationProvince, String unitName, String pageNo,
|
|
|
+ String pageSize) {
|
|
|
Result res = new Result();
|
|
|
Integer pNo = 1;
|
|
|
Integer pSize = 10;
|