|
@@ -63,7 +63,7 @@ public class CompanyAuthenticationServiceImpl extends ServiceImpl<CompanyAuthent
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional
|
|
@Transactional
|
|
|
- public Map<String, Object> anterpriseAuth(HttpServletRequest request, HttpServletResponse response) {
|
|
|
|
|
|
|
+ public Map<String, Object> anterpriseAuth(HttpServletRequest request, HttpServletResponse response) throws ParseException, IOException {
|
|
|
Map<String, Object> returnMap = new HashMap<String, Object>();
|
|
Map<String, Object> returnMap = new HashMap<String, Object>();
|
|
|
String userId = request.getParameter("user_id");
|
|
String userId = request.getParameter("user_id");
|
|
|
String userToken = request.getParameter("user_token");
|
|
String userToken = request.getParameter("user_token");
|
|
@@ -74,42 +74,35 @@ public class CompanyAuthenticationServiceImpl extends ServiceImpl<CompanyAuthent
|
|
|
if (StringUtils.isBlank(expiryDate)) {
|
|
if (StringUtils.isBlank(expiryDate)) {
|
|
|
expiryDate = "2100-01-01 00:00:00";
|
|
expiryDate = "2100-01-01 00:00:00";
|
|
|
}
|
|
}
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String isHumanResource = request.getParameter("isHumanResource"); //是否人力资源公司
|
|
String isHumanResource = request.getParameter("isHumanResource"); //是否人力资源公司
|
|
|
CompanyAuthentication companyAuthentication = new CompanyAuthentication();
|
|
CompanyAuthentication companyAuthentication = new CompanyAuthentication();
|
|
|
companyAuthentication.setUserId(Integer.parseInt(userId));
|
|
companyAuthentication.setUserId(Integer.parseInt(userId));
|
|
|
companyAuthentication.setEnterpriseName(enterpriseName);
|
|
companyAuthentication.setEnterpriseName(enterpriseName);
|
|
|
companyAuthentication.setIsHumanResource(Integer.parseInt(isHumanResource));
|
|
companyAuthentication.setIsHumanResource(Integer.parseInt(isHumanResource));
|
|
|
companyAuthentication.setAuthenticationStatus(1);
|
|
companyAuthentication.setAuthenticationStatus(1);
|
|
|
- try {
|
|
|
|
|
- companyAuthentication.setExpiryDate(sdf.parse(expiryDate));
|
|
|
|
|
-
|
|
|
|
|
- if (request instanceof MultipartHttpServletRequest) {
|
|
|
|
|
- //营业执照上传调用
|
|
|
|
|
- Result<JSONObject> result = webupload(request, "licenseFront", companyAuthentication, "/hpuser/resume");
|
|
|
|
|
- if (result.isSuccess()) {
|
|
|
|
|
- companyAuthentication.setLicenseFront(result.getMessage());
|
|
|
|
|
- } else {
|
|
|
|
|
- System.out.println("wpload========" + result.getMessage());
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- Result<JSONObject> result1 = webupload(request, "otherLicense", companyAuthentication, "/hpuser/resume");
|
|
|
|
|
- if (result.isSuccess()) {
|
|
|
|
|
- companyAuthentication.setOtherLicense(result1.getMessage());
|
|
|
|
|
- } else {
|
|
|
|
|
- System.out.println("wpload========" + result1.getMessage());
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ companyAuthentication.setExpiryDate(sdf.parse(expiryDate));
|
|
|
|
|
+ if (request instanceof MultipartHttpServletRequest) {
|
|
|
|
|
+ //营业执照上传调用
|
|
|
|
|
+ Result<JSONObject> result = webupload(request, "licenseFront", companyAuthentication, "/hpuser/resume");
|
|
|
|
|
+ if (result.isSuccess()) {
|
|
|
|
|
+ companyAuthentication.setLicenseFront(result.getMessage());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ System.out.println("wpload========" + result.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ Result<JSONObject> result1 = webupload(request, "otherLicense", companyAuthentication, "/hpuser/resume");
|
|
|
|
|
+ if (result.isSuccess()) {
|
|
|
|
|
+ companyAuthentication.setOtherLicense(result1.getMessage());
|
|
|
} else {
|
|
} else {
|
|
|
- System.out.println("wpnonono========没有文件上传");
|
|
|
|
|
|
|
+ System.out.println("wpload========" + result1.getMessage());
|
|
|
}
|
|
}
|
|
|
- save(companyAuthentication);
|
|
|
|
|
- returnMap.put("companyAuthentication", companyAuthentication);
|
|
|
|
|
- returnMap.put("success", true);
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- returnMap.put("success", false);
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
|
|
+
|
|
|
|
|
+ } else {
|
|
|
|
|
+ System.out.println("wpnonono========没有文件上传");
|
|
|
}
|
|
}
|
|
|
|
|
+ save(companyAuthentication);
|
|
|
|
|
+ returnMap.put("companyAuthentication", companyAuthentication);
|
|
|
} else {
|
|
} else {
|
|
|
returnMap.put("success", "1004");
|
|
returnMap.put("success", "1004");
|
|
|
}
|
|
}
|
|
@@ -201,30 +194,31 @@ public class CompanyAuthenticationServiceImpl extends ServiceImpl<CompanyAuthent
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 审批
|
|
|
|
|
|
|
+ * 审批
|
|
|
|
|
+ *
|
|
|
* @param
|
|
* @param
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public boolean updateById1(CompanyAuthentication companyAuthentication) {
|
|
public boolean updateById1(CompanyAuthentication companyAuthentication) {
|
|
|
- boolean ok= false;
|
|
|
|
|
|
|
+ boolean ok = false;
|
|
|
try {
|
|
try {
|
|
|
ok = updateById(companyAuthentication);
|
|
ok = updateById(companyAuthentication);
|
|
|
- companyAuthentication=getById(companyAuthentication.getId());
|
|
|
|
|
- Message message=new Message();
|
|
|
|
|
|
|
+ companyAuthentication = getById(companyAuthentication.getId());
|
|
|
|
|
+ Message message = new Message();
|
|
|
message.setUserId(companyAuthentication.getUserId());
|
|
message.setUserId(companyAuthentication.getUserId());
|
|
|
- if(companyAuthentication.getAuthenticationStatus()==2){
|
|
|
|
|
|
|
+ if (companyAuthentication.getAuthenticationStatus() == 2) {
|
|
|
message.setTitle("企业认证通过审核");
|
|
message.setTitle("企业认证通过审核");
|
|
|
message.setContent("您的企业信息已通过审核");
|
|
message.setContent("您的企业信息已通过审核");
|
|
|
- List<Position> list=positionMapper.findPosition(companyAuthentication.getUserId());
|
|
|
|
|
- if(list.size()>0){
|
|
|
|
|
- for (int i = 0; i <list.size() ; i++) {
|
|
|
|
|
- Position position=list.get(i);
|
|
|
|
|
|
|
+ List<Position> list = positionMapper.findPosition(companyAuthentication.getUserId());
|
|
|
|
|
+ if (list.size() > 0) {
|
|
|
|
|
+ for (int i = 0; i < list.size(); i++) {
|
|
|
|
|
+ Position position = list.get(i);
|
|
|
position.setEnterpriseName(companyAuthentication.getEnterpriseName());
|
|
position.setEnterpriseName(companyAuthentication.getEnterpriseName());
|
|
|
positionMapper.changePositionName(position);
|
|
positionMapper.changePositionName(position);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }else if(companyAuthentication.getAuthenticationStatus()==3){
|
|
|
|
|
|
|
+ } else if (companyAuthentication.getAuthenticationStatus() == 3) {
|
|
|
message.setTitle("企业认证未通过审核");
|
|
message.setTitle("企业认证未通过审核");
|
|
|
message.setContent("您的企业信息未通过审核");
|
|
message.setContent("您的企业信息未通过审核");
|
|
|
}
|
|
}
|
|
@@ -232,7 +226,7 @@ public class CompanyAuthenticationServiceImpl extends ServiceImpl<CompanyAuthent
|
|
|
message.setType(2);
|
|
message.setType(2);
|
|
|
message.setIsRead(0);
|
|
message.setIsRead(0);
|
|
|
message.setDelFlag("0");
|
|
message.setDelFlag("0");
|
|
|
- ok=iMessageService.save(message);
|
|
|
|
|
|
|
+ ok = iMessageService.save(message);
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
@@ -288,7 +282,7 @@ public class CompanyAuthenticationServiceImpl extends ServiceImpl<CompanyAuthent
|
|
|
//验证用户合法性
|
|
//验证用户合法性
|
|
|
if (TokenUtil.validateToken(userId, userToken)) {
|
|
if (TokenUtil.validateToken(userId, userToken)) {
|
|
|
String messageId = requestMap.get("messageId");
|
|
String messageId = requestMap.get("messageId");
|
|
|
- Message message=iMessageService.getById(messageId);
|
|
|
|
|
|
|
+ Message message = iMessageService.getById(messageId);
|
|
|
message.setIsRead(1);
|
|
message.setIsRead(1);
|
|
|
iMessageService.updateById(message);
|
|
iMessageService.updateById(message);
|
|
|
} else {
|
|
} else {
|