|
|
@@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
+import com.goafanti.cognizance.service.OrgRatepayService;
|
|
|
import com.goafanti.common.bo.Result;
|
|
|
import com.goafanti.common.constant.ErrorConstants;
|
|
|
import com.goafanti.common.controller.BaseApiController;
|
|
|
@@ -90,6 +91,8 @@ public class UserApiController extends BaseApiController {
|
|
|
private OrgHumanResourceService orgHumanResourceService;
|
|
|
@Resource
|
|
|
private TechWebsiteService techWebsiteService;
|
|
|
+ @Resource
|
|
|
+ private OrgRatepayService orgRatepayService;
|
|
|
|
|
|
/**
|
|
|
* 修改密码
|
|
|
@@ -745,15 +748,15 @@ public class UserApiController extends BaseApiController {
|
|
|
if (0 != (u.getAmountMoney().compareTo(userIdentity.getAmountMoney()))) {
|
|
|
int t = 3 - u.getWrongCount() - 1;
|
|
|
u.setWrongCount(u.getWrongCount() + 1);
|
|
|
- userIdentityService.updateByPrimaryKeySelective(u);
|
|
|
+
|
|
|
if (0 == t) {
|
|
|
u.setAuditStatus(4);
|
|
|
u.setProcess(5);
|
|
|
- userIdentityService.updateByPrimaryKeySelective(u);
|
|
|
res.getError().add(buildError("", "2"));// 输入错误金额次数过多
|
|
|
} else {
|
|
|
res.getError().add(buildError("", "输入打款金额错误,您还有" + t + "次机会"));
|
|
|
}
|
|
|
+ userIdentityService.updateByPrimaryKeySelective(u);
|
|
|
return res;
|
|
|
}
|
|
|
userIdentity.setAuditStatus(5);
|
|
|
@@ -780,19 +783,22 @@ public class UserApiController extends BaseApiController {
|
|
|
@RequestMapping(value = "/orgNextPro", method = RequestMethod.POST)
|
|
|
public Result orgNextProcess(OrganizationIdentity orgIdentity, String listedDateFormattedDate, String verificationCode) throws ParseException {
|
|
|
Result res = new Result();
|
|
|
- if (!StringUtils.isBlank(listedDateFormattedDate)){
|
|
|
- orgIdentity.setListedDate(DateUtils.parseDate(listedDateFormattedDate, "yyyy-MM-dd"));
|
|
|
- }
|
|
|
if (1 == orgIdentity.getProcess()) {
|
|
|
if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.V_CODE).equals(verificationCode)) {
|
|
|
res.getError().add(buildError(ErrorConstants.VCODE_ERROR, "验证码错误"));
|
|
|
return res;
|
|
|
}
|
|
|
+ if (!StringUtils.isBlank(listedDateFormattedDate)){
|
|
|
+ orgIdentity.setListedDate(DateUtils.parseDate(listedDateFormattedDate, "yyyy-MM-dd"));
|
|
|
+ }
|
|
|
+ /*res.setData(organizationIdentityService.saveLastYearTaxReprotUrl(orgIdentity, TokenManager.getUserId()));
|
|
|
+ return res;*/
|
|
|
}
|
|
|
if (3 == orgIdentity.getProcess()) {
|
|
|
OrganizationIdentity o = organizationIdentityService.selectOrgIdentityByUserId(TokenManager.getUserId());
|
|
|
o.setAuditStatus(1);
|
|
|
organizationIdentityService.updateByPrimaryKeySelective(o);
|
|
|
+ return res;
|
|
|
}
|
|
|
if (5 == orgIdentity.getProcess()) {
|
|
|
OrganizationIdentity o = organizationIdentityService.selectOrgIdentityByUserId(TokenManager.getUserId());
|
|
|
@@ -812,15 +818,14 @@ public class UserApiController extends BaseApiController {
|
|
|
if (0 != (o.getValidationAmount().compareTo(orgIdentity.getValidationAmount()))) {
|
|
|
int t = 3 - o.getWrongCount() - 1;
|
|
|
o.setWrongCount(o.getWrongCount() + 1);
|
|
|
- organizationIdentityService.updateByPrimaryKeySelective(o);
|
|
|
if (0 == t) {
|
|
|
o.setAuditStatus(4);
|
|
|
- o.setProcess(5);
|
|
|
- organizationIdentityService.updateByPrimaryKeySelective(o);
|
|
|
+ o.setProcess(6);
|
|
|
res.getError().add(buildError("", "2"));// 输入错误金额次数过多
|
|
|
} else {
|
|
|
res.getError().add(buildError("", "输入打款金额错误,您还有" + t + "次机会"));
|
|
|
}
|
|
|
+ organizationIdentityService.updateByPrimaryKeySelective(o);
|
|
|
return res;
|
|
|
}
|
|
|
orgIdentity.setAuditStatus(5);
|
|
|
@@ -904,42 +909,13 @@ public class UserApiController extends BaseApiController {
|
|
|
|
|
|
// orgProcess
|
|
|
private Result dealOrgProcess(Result res, OrganizationIdentity o, String uid) {
|
|
|
- OrganizationIdentity org = organizationIdentityService.selectOrgIdentityByUserId(uid);
|
|
|
- if (null == org) {
|
|
|
- o.setId(UUID.randomUUID().toString());
|
|
|
- o.setUid(uid);
|
|
|
- res.setData(organizationIdentityService.insert(o));
|
|
|
- } else {
|
|
|
- o.setId(org.getId());
|
|
|
- res.setData(organizationIdentityService.updateByPrimaryKeySelective(o));
|
|
|
- if (null != o.getAuditStatus() && 5 == o.getAuditStatus()){
|
|
|
- User u = new User();
|
|
|
- u.setId(TokenManager.getUserId());
|
|
|
- u.setLvl(1);;
|
|
|
- userService.updateByPrimaryKeySelective(u);
|
|
|
- }
|
|
|
- }
|
|
|
+ res.setData(organizationIdentityService.saveOrgIndentityProcess(res, o, uid));
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
// userProcess
|
|
|
- private Result dealUserProcess(Result res, UserIdentity userIdentity, String uid) {
|
|
|
- UserIdentity identity = userIdentityService.selectUserIdentityByUserId(uid);
|
|
|
- if (null == identity) {
|
|
|
- userIdentity.setId(UUID.randomUUID().toString());
|
|
|
- userIdentity.setUid(uid);
|
|
|
- userIdentity.setWrongCount(0);
|
|
|
- res.setData(userIdentityService.insert(userIdentity));
|
|
|
- } else {
|
|
|
- userIdentity.setId(identity.getId());
|
|
|
- res.setData(userIdentityService.updateByPrimaryKeySelective(userIdentity));
|
|
|
- if (5 == userIdentity.getAuditStatus()){
|
|
|
- User u = new User();
|
|
|
- u.setId(userIdentityService.selectUserIdentityByUserId(TokenManager.getUserId()).getUid());
|
|
|
- u.setLvl(1);
|
|
|
- userService.updateByPrimaryKeySelective(u);
|
|
|
- }
|
|
|
- }
|
|
|
+ private Result dealUserProcess(Result res, UserIdentity u, String uid) {
|
|
|
+ res.setData(userIdentityService.saveUserIdentityProcess(res, u, uid));
|
|
|
return res;
|
|
|
}
|
|
|
|