generated from dxfeng/secondev-chapanda-feishu
发送信息采集
This commit is contained in:
parent
4b81645c0d
commit
336a91c928
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.recruit.conn;
|
||||
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
|
|
@ -54,6 +55,9 @@ public class RecruitRecordSet {
|
|||
String insertSql = " insert into " + tableName + "(" + StringUtils.join(fieldList, ",") + ") values (" + StringUtils.join(paramList, ",") + ")";
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate(insertSql, dataList);
|
||||
if (StringUtils.isNotBlank(rs.getExceptionMsg())) {
|
||||
throw new CustomizeRunTimeException(rs.getExceptionMsg());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.engine.recruit.conn.RecruitDataMap;
|
|||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import com.engine.recruit.enums.InfoCollectEnum;
|
||||
import com.engine.recruit.enums.PositionOperateEnum;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.InductionManageService;
|
||||
import com.engine.recruit.util.RecruitMessageUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -40,6 +41,14 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
|
||||
RecordSet rs = new RecordSet();
|
||||
for (String billId : split) {
|
||||
// 判断是否已发送信息采集,已发送的不重复发送
|
||||
rs.executeQuery("select a.id from uf_jcl_xxcj a inner join uf_jcl_rzgl b on a.xm = b.xm and a.sjh = b.sjhm where b.id = ? ", billId);
|
||||
if (rs.next()) {
|
||||
if (StringUtils.isNotBlank(rs.getString("id"))) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 根据入职管理信息完善信息采集表单
|
||||
Map<String, Object> dataMap = new RecruitDataMap<>();
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
|
|
@ -72,9 +81,8 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
// 发送短信
|
||||
String mobile = Util.null2String(dataMap.get("sjh"));
|
||||
String messageContent = RecruitModeUtil.getRecruitPropValue("COLLECT_MESSAGE_CONTENT");
|
||||
// TODO
|
||||
if (StringUtils.isBlank(messageContent)) {
|
||||
//throw new CustomizeRunTimeException("未获取到短信内容,请检查配置");
|
||||
throw new CustomizeRunTimeException("未获取到短信内容,请检查配置");
|
||||
} else {
|
||||
RecruitMessageUtils.sendSMS(mobile, messageContent);
|
||||
}
|
||||
|
|
@ -83,7 +91,7 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
int id = RecruitRecordSet.refreshRight(uuid, "uf_jcl_xxcj", formModeId);
|
||||
|
||||
// 更新状态为已发送,反填信息采集ID
|
||||
rs.executeUpdate("update uf_jcl_rzgl set xxcj = ? ,xxcjid = ? where id = ? ", InfoCollectEnum.HAS_SENT, id, billId);
|
||||
rs.executeUpdate("update uf_jcl_rzgl set xxcj = ? ,xxcjid = ? where id = ? ", InfoCollectEnum.HAS_SENT.getId(), id, billId);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
@ -91,7 +99,14 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
|
||||
@Override
|
||||
public Map<String, Object> checkLoginInfo(Map<String, Object> param) {
|
||||
return null;
|
||||
RecordSet rs = new RecordSet();
|
||||
String mobile = Util.null2String(param.get("mobile"));
|
||||
String pwd = Util.null2String(param.get("pwd"));
|
||||
rs.executeQuery("select id from uf_jcl_xxcj where sjh = ? and mm = ?", mobile, pwd);
|
||||
rs.next();
|
||||
return new HashMap<String, Object>() {{
|
||||
put("id", Util.getIntValue(rs.getString("id")));
|
||||
}};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package com.engine.recruit.util;
|
|||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.core.exception.ECException;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -142,7 +142,7 @@ public class ResponseResult<T, R> {
|
|||
*/
|
||||
private String Ok() {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
apidatas.put("status", true);
|
||||
apidatas.put("api_status", true);
|
||||
return JSONObject.toJSONString(apidatas, SerializerFeature.DisableCircularReferenceDetect);
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ public class ResponseResult<T, R> {
|
|||
*/
|
||||
private String Ok(R r) {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
apidatas.put("status", true);
|
||||
apidatas.put("api_status", true);
|
||||
apidatas.put("data", r);
|
||||
String success = getJsonString(apidatas);
|
||||
if (isLog) {
|
||||
|
|
@ -167,7 +167,7 @@ public class ResponseResult<T, R> {
|
|||
*/
|
||||
private static String Error(String message) {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
apidatas.put("status", false);
|
||||
apidatas.put("api_status", false);
|
||||
apidatas.put("errormsg", message);
|
||||
return JSONObject.toJSONString(apidatas, SerializerFeature.DisableCircularReferenceDetect);
|
||||
}
|
||||
|
|
@ -178,7 +178,7 @@ public class ResponseResult<T, R> {
|
|||
*/
|
||||
private static String Error(String message, Exception e) {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
apidatas.put("status", false);
|
||||
apidatas.put("api_status", false);
|
||||
apidatas.put("errormsg", message);
|
||||
apidatas.put("error", e.getMessage());
|
||||
return JSONObject.toJSONString(apidatas, SerializerFeature.DisableCircularReferenceDetect);
|
||||
|
|
|
|||
Loading…
Reference in New Issue