|
|
@@ -25,6 +25,7 @@ import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.net.URLEncoder;
|
|
|
+import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
@@ -69,13 +70,13 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
String authenticationStatus = requestMap.get("authenticationStatus"); //审核状态
|
|
|
String isOn = requestMap.get("isOn"); //结束状态
|
|
|
String isPause = requestMap.get("isPause"); //暂停状态
|
|
|
- if(StringUtils.isNotBlank(authenticationStatus)){
|
|
|
+ if (StringUtils.isNotBlank(authenticationStatus)) {
|
|
|
positionAPI.setAuthenticationStatus(Integer.parseInt(authenticationStatus));
|
|
|
}
|
|
|
- if(StringUtils.isNotBlank(isOn)){
|
|
|
+ if (StringUtils.isNotBlank(isOn)) {
|
|
|
positionAPI.setIsOn(Integer.parseInt(isOn));
|
|
|
}
|
|
|
- if(StringUtils.isNotBlank(isPause)){
|
|
|
+ if (StringUtils.isNotBlank(isPause)) {
|
|
|
positionAPI.setIsPause(Integer.parseInt(isPause));
|
|
|
}
|
|
|
positionAPI.setUserId(Integer.parseInt(userId));
|
|
|
@@ -231,7 +232,7 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional
|
|
|
- public Map<String, Object> parttimePositionAuth(Map<String, String> requestMap, HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ public Map<String, Object> parttimePositionAuth(Map<String, String> requestMap, HttpServletRequest request, HttpServletResponse response) throws ParseException {
|
|
|
Map<String, Object> returnMap = new HashMap<String, Object>();
|
|
|
String userId = requestMap.get("user_id");
|
|
|
String userToken = requestMap.get("user_token");
|
|
|
@@ -312,33 +313,31 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
if (StringUtils.isNotBlank(isHealthCertification)) {
|
|
|
position.setIsHealthCertification(Integer.parseInt(isHealthCertification));
|
|
|
}
|
|
|
- try {
|
|
|
- if (StringUtils.isNotBlank(endDate)) {
|
|
|
- position.setEndDate(sdf.parse(endDate));
|
|
|
- }
|
|
|
- positionMapper.save(position);
|
|
|
- String json = requestMap.get("json");//工作地址
|
|
|
- if (StringUtils.isNotBlank(json)) {
|
|
|
- JSONArray jsonArray = JSONArray.fromObject(json);
|
|
|
- for (int i = 0; i < jsonArray.size(); i++) {
|
|
|
- PositionAddress positionAddress = new PositionAddress();
|
|
|
- JSONObject jsonObject = jsonArray.getJSONObject(i);
|
|
|
- positionAddress.setPositionId(position.getId());
|
|
|
- positionAddress.setProvinceId(Integer.parseInt(jsonObject.getString("provinceId")));
|
|
|
- positionAddress.setCityId(Integer.parseInt(jsonObject.getString("cityId")));
|
|
|
- positionAddress.setCountryId(Integer.parseInt(jsonObject.getString("countryId")));
|
|
|
- positionAddress.setAdname(jsonObject.getString("adname"));
|
|
|
- positionAddress.setAdname(jsonObject.getString("address"));
|
|
|
- positionAddress.setIsThisAreaPublish(Integer.parseInt(jsonObject.getString("isThisAreaPublish")));
|
|
|
- positionAddressService.save(positionAddress);
|
|
|
- }
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(endDate)) {
|
|
|
+ position.setEndDate(sdf.parse(endDate));
|
|
|
+ }
|
|
|
+ position.setCreateTime(new Date());
|
|
|
+ position.setUpdateTime(new Date());
|
|
|
+ positionMapper.save(position);
|
|
|
+ String json = requestMap.get("json");//工作地址
|
|
|
+ if (StringUtils.isNotBlank(json)) {
|
|
|
+ JSONArray jsonArray = JSONArray.fromObject(json);
|
|
|
+ for (int i = 0; i < jsonArray.size(); i++) {
|
|
|
+ PositionAddress positionAddress = new PositionAddress();
|
|
|
+ JSONObject jsonObject = jsonArray.getJSONObject(i);
|
|
|
+ positionAddress.setPositionId(position.getId());
|
|
|
+ positionAddress.setProvinceId(Integer.parseInt(jsonObject.getString("provinceId")));
|
|
|
+ positionAddress.setCityId(Integer.parseInt(jsonObject.getString("cityId")));
|
|
|
+ positionAddress.setCountryId(Integer.parseInt(jsonObject.getString("countryId")));
|
|
|
+ positionAddress.setAdname(jsonObject.getString("adname"));
|
|
|
+ positionAddress.setAdname(jsonObject.getString("address"));
|
|
|
+ positionAddress.setIsThisAreaPublish(Integer.parseInt(jsonObject.getString("isThisAreaPublish")));
|
|
|
+ positionAddressService.save(positionAddress);
|
|
|
}
|
|
|
- returnMap.put("success", true);
|
|
|
- } catch (Exception e) {
|
|
|
- returnMap.put("success", false);
|
|
|
- e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
} else {
|
|
|
returnMap.put("success", "1004");
|
|
|
}
|
|
|
@@ -351,7 +350,7 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional
|
|
|
- public Map<String, Object> fulltimePositionAuth(Map<String, String> requestMap, HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ public Map<String, Object> fulltimePositionAuth(Map<String, String> requestMap, HttpServletRequest request, HttpServletResponse response) throws ParseException {
|
|
|
Map<String, Object> returnMap = new HashMap<String, Object>();
|
|
|
String userId = requestMap.get("user_id");
|
|
|
String userToken = requestMap.get("user_token");
|
|
|
@@ -402,7 +401,7 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
position.setRecruitNumber(Integer.parseInt(recruitNumber));
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(salaryStructure)) {
|
|
|
- position.setSalaryPeriod(Integer.parseInt(salaryStructure));
|
|
|
+ position.setSalaryStructure(salaryStructure);
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(basicSalary)) {
|
|
|
position.setBasicSalary(Integer.parseInt(basicSalary));
|
|
|
@@ -420,33 +419,31 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
if (StringUtils.isNotBlank(hasRegularBus)) {
|
|
|
position.setHasRegularBus(Integer.parseInt(hasRegularBus));
|
|
|
}
|
|
|
- try {
|
|
|
- if (StringUtils.isNotBlank(endDate)) {
|
|
|
- position.setEndDate(sdf.parse(endDate));
|
|
|
- }
|
|
|
- positionMapper.save(position);
|
|
|
- String json = requestMap.get("json");
|
|
|
- if (StringUtils.isNotBlank(json)) {
|
|
|
- JSONArray jsonArray = JSONArray.fromObject(json);
|
|
|
- for (int i = 0; i < jsonArray.size(); i++) {
|
|
|
- PositionAddress positionAddress = new PositionAddress();
|
|
|
- JSONObject jsonObject = jsonArray.getJSONObject(i);
|
|
|
- positionAddress.setPositionId(position.getId());
|
|
|
- positionAddress.setProvinceId(Integer.parseInt(jsonObject.getString("provinceId")));
|
|
|
- positionAddress.setCityId(Integer.parseInt(jsonObject.getString("cityId")));
|
|
|
- positionAddress.setCountryId(Integer.parseInt(jsonObject.getString("countryId")));
|
|
|
- positionAddress.setAdname(jsonObject.getString("adname"));
|
|
|
- positionAddress.setAdname(jsonObject.getString("address"));
|
|
|
- positionAddress.setIsThisAreaPublish(Integer.parseInt(jsonObject.getString("isThisAreaPublish")));
|
|
|
- positionAddressService.save(positionAddress);
|
|
|
- }
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(endDate)) {
|
|
|
+ position.setEndDate(sdf.parse(endDate));
|
|
|
+ }
|
|
|
+ position.setCreateTime(new Date());
|
|
|
+ position.setUpdateTime(new Date());
|
|
|
+ positionMapper.save(position);
|
|
|
+ String json = requestMap.get("json");
|
|
|
+ if (StringUtils.isNotBlank(json)) {
|
|
|
+ JSONArray jsonArray = JSONArray.fromObject(json);
|
|
|
+ for (int i = 0; i < jsonArray.size(); i++) {
|
|
|
+ PositionAddress positionAddress = new PositionAddress();
|
|
|
+ JSONObject jsonObject = jsonArray.getJSONObject(i);
|
|
|
+ positionAddress.setPositionId(position.getId());
|
|
|
+ positionAddress.setProvinceId(Integer.parseInt(jsonObject.getString("provinceId")));
|
|
|
+ positionAddress.setCityId(Integer.parseInt(jsonObject.getString("cityId")));
|
|
|
+ positionAddress.setCountryId(Integer.parseInt(jsonObject.getString("countryId")));
|
|
|
+ positionAddress.setAdname(jsonObject.getString("adname"));
|
|
|
+ positionAddress.setAdname(jsonObject.getString("address"));
|
|
|
+ positionAddress.setIsThisAreaPublish(Integer.parseInt(jsonObject.getString("isThisAreaPublish")));
|
|
|
+ positionAddressService.save(positionAddress);
|
|
|
}
|
|
|
- returnMap.put("success", true);
|
|
|
- } catch (Exception e) {
|
|
|
- returnMap.put("success", false);
|
|
|
- e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
} else {
|
|
|
returnMap.put("success", "1004");
|
|
|
}
|
|
|
@@ -461,7 +458,7 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
public com.alibaba.fastjson.JSONObject remuse(Map<String, String> requestMap, HttpServletRequest request, HttpServletResponse response) {
|
|
|
String userId = requestMap.get("user_id");
|
|
|
String userToken = requestMap.get("user_token");
|
|
|
- com.alibaba.fastjson.JSONObject jsonObject =new com.alibaba.fastjson.JSONObject();
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = new com.alibaba.fastjson.JSONObject();
|
|
|
//验证用户合法性
|
|
|
if (TokenUtil.validateToken(userId, userToken)) {
|
|
|
try {
|
|
|
@@ -472,10 +469,10 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
String type = requestMap.get("type"); //1:查询新报名 2:查询待面试
|
|
|
String url = path + "/f/api/sendmessage/sendResume?positionId=" + positionId + "&positionCategory="
|
|
|
+ positionCategory + "&type=" + type
|
|
|
- + "&pageNo=" + pageNo+ "&pageSize=" + pageSize;
|
|
|
+ + "&pageNo=" + pageNo + "&pageSize=" + pageSize;
|
|
|
String data = CommUtil.get(url, null);
|
|
|
//使用alibaba fastjson解析jsonarray,涉及性能优化问题
|
|
|
- jsonObject = com.alibaba.fastjson.JSONObject.parseObject(data);
|
|
|
+ jsonObject = com.alibaba.fastjson.JSONObject.parseObject(data);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -545,9 +542,9 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
String companyName = requestMap.get("companyName");
|
|
|
String sendMsgUrl = path + "/f/api/sendmessage/interviewInvite?positionId=" + positionId
|
|
|
+ "&userId=" + userId + "&positionCategory=" + positionCategory + "&interviewTime=" + interviewTime
|
|
|
- + "&interviewAddres=" +URLEncoder.encode(interviewAddres)
|
|
|
- + "&contactPerson=" +URLEncoder.encode(contactPerson) + "&contactPhone=" + contactPhone + "&positionName=" +URLEncoder.encode(positionName)
|
|
|
- + "&companyName=" +URLEncoder.encode(companyName) ;
|
|
|
+ + "&interviewAddres=" + URLEncoder.encode(interviewAddres)
|
|
|
+ + "&contactPerson=" + URLEncoder.encode(contactPerson) + "&contactPhone=" + contactPhone + "&positionName=" + URLEncoder.encode(positionName)
|
|
|
+ + "&companyName=" + URLEncoder.encode(companyName);
|
|
|
|
|
|
JSONObject paramJson = JSONObject.fromObject(CommUtil.doPost(sendMsgUrl, null));
|
|
|
String returnStatus = paramJson.getString("success");
|
|
|
@@ -568,23 +565,24 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 审批
|
|
|
+ * 审批
|
|
|
+ *
|
|
|
* @param
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
public boolean updateById1(Position position) {
|
|
|
- boolean ok= false;
|
|
|
+ boolean ok = false;
|
|
|
try {
|
|
|
ok = updateById(position);
|
|
|
- position=getById(position.getId());
|
|
|
- Message message=new Message();
|
|
|
+ position = getById(position.getId());
|
|
|
+ Message message = new Message();
|
|
|
message.setUserId(position.getUserId());
|
|
|
message.setPositionId(position.getId());
|
|
|
- if(position.getAuthenticationStatus()==2){
|
|
|
+ if (position.getAuthenticationStatus() == 2) {
|
|
|
message.setTitle("岗位认证通过审核");
|
|
|
message.setContent("您的岗位信息已通过审核");
|
|
|
- }else if(position.getAuthenticationStatus()==3){
|
|
|
+ } else if (position.getAuthenticationStatus() == 3) {
|
|
|
message.setTitle("岗位认证未通过审核");
|
|
|
message.setContent("您的岗位信息未通过审核");
|
|
|
}
|
|
|
@@ -592,7 +590,7 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
message.setType(3);
|
|
|
message.setIsRead(0);
|
|
|
message.setDelFlag("0");
|
|
|
- ok=iMessageService.save(message);
|
|
|
+ ok = iMessageService.save(message);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|