generated from dxfeng/secondev-chapanda-feishu
offer发送
This commit is contained in:
parent
3905b769d8
commit
96704f8bb9
|
|
@ -1,10 +1,13 @@
|
|||
package weaver.formmode.recruit.modeexpand.offer;
|
||||
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.util.RecruitMessageUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.hrm.company.SubCompanyComInfo;
|
||||
import weaver.soa.workflow.request.MainTableInfo;
|
||||
import weaver.soa.workflow.request.Property;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
|
|
@ -47,6 +50,8 @@ public class CreateOfferModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
}
|
||||
// 发送信息
|
||||
sendMessage(billId);
|
||||
// 更新状态为已发送
|
||||
recordSet.executeUpdate("update uf_jcl_offer set zt = 1 where id = ? ", billId);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
@ -59,7 +64,7 @@ public class CreateOfferModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
|
||||
private void sendMessage(int billId) {
|
||||
String querySql = "select sjhm,dzyx,yjtzmb,tznr,tzypz from uf_jcl_offer where id = ?";
|
||||
recordSet.executeQuery(querySql,billId);
|
||||
recordSet.executeQuery(querySql, billId);
|
||||
String sjhm = "";
|
||||
String dzyx = "";
|
||||
String yjtzmb = "";
|
||||
|
|
@ -73,7 +78,7 @@ public class CreateOfferModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
tzypz = Util.null2String(recordSet.getString("tzypz"));
|
||||
}
|
||||
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
String[] ways = tzypz.split(",");
|
||||
for (String way : ways) {
|
||||
switch (way) {
|
||||
|
|
@ -86,9 +91,20 @@ public class CreateOfferModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
break;
|
||||
case "1":
|
||||
// 短信
|
||||
params.put("receiver", sjhm);
|
||||
params.put("content", tznr);
|
||||
RecruitMessageUtils.sendSMS(params);
|
||||
recordSet.executeQuery("select b.xm , c.zpzwmc , a.sxrq , a.rzgs from uf_jcl_offer a inner join uf_jcl_yppc b on a.xm = b.id inner join uf_jcl_zp_zpzw c on a.ypzw = c.id where a.id = ?", billId);
|
||||
if (recordSet.next()) {
|
||||
String name = recordSet.getString("xm");
|
||||
String positionName = recordSet.getString("zpzwmc");
|
||||
String endDate = recordSet.getString("sxrq");
|
||||
String companyId = recordSet.getString("rzgs");
|
||||
if (StringUtils.isAnyBlank(name, positionName, endDate, companyId)) {
|
||||
throw new CustomizeRunTimeException("offer短信发送失败,应聘者信息获取失败");
|
||||
}
|
||||
String msgContent = name + "你好,恭喜你成功通过" + new SubCompanyComInfo().getSubCompanyname(companyId) + "的" + positionName + "面试,聘用通知已发送至你的邮箱,请注意查收邮件,并于" + endDate + "前确认,逾期将失效。";
|
||||
params.put("receiver", sjhm);
|
||||
params.put("content", msgContent);
|
||||
RecruitMessageUtils.sendSMS(params);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -99,9 +115,10 @@ public class CreateOfferModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
|
||||
/**
|
||||
* 获取邮件模板主题
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
private String getEmailTitle (String id) {
|
||||
private String getEmailTitle(String id) {
|
||||
String emailTitle = "";
|
||||
recordSet.executeQuery("select yjzt from uf_jcl_yjtzmb where id = ?", id);
|
||||
if (recordSet.next()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue