From f51e107293505f6c2f9baf0170354e7d4c1df8bd Mon Sep 17 00:00:00 2001 From: dxfeng Date: Wed, 26 Jun 2024 14:38:59 +0800 Subject: [PATCH] =?UTF-8?q?MODIFY-"=E6=8B=9B=E8=81=98=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E7=94=B3=E8=AF=B7"=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=EF=BC=8C=E7=AE=80=E5=8C=96=E9=85=8D=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../action/RecruitFlowToModeAction.java | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/src/weaver/interfaces/recruit/action/RecruitFlowToModeAction.java b/src/weaver/interfaces/recruit/action/RecruitFlowToModeAction.java index 0a73694..8977e1a 100644 --- a/src/weaver/interfaces/recruit/action/RecruitFlowToModeAction.java +++ b/src/weaver/interfaces/recruit/action/RecruitFlowToModeAction.java @@ -5,13 +5,15 @@ import com.cloudstore.dev.api.bean.MessageType; import com.cloudstore.dev.api.util.Util_Message; import com.engine.recruit.conn.ApplicantCommonInfo; import com.engine.recruit.conn.RecruitRecordSet; +import com.engine.recruit.constant.RecruitConstant; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang.StringUtils; import weaver.common.DateUtil; import weaver.conn.RecordSetTrans; import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil; -import weaver.formmode.setup.ModeRightInfo; import weaver.general.BaseBean; import weaver.general.Util; +import weaver.hrm.User; import weaver.hrm.resource.ResourceComInfo; import weaver.interfaces.workflow.action.Action; import weaver.soa.workflow.request.*; @@ -47,6 +49,7 @@ public class RecruitFlowToModeAction implements Action { MainTableInfo mainTableInfo = requestInfo.getMainTableInfo(); int billId = requestInfo.getRequestManager().getBillid(); int formid = requestInfo.getRequestManager().getFormid(); + User user = requestInfo.getRequestManager().getUser(); DetailTableInfo detailTableInfo = requestInfo.getDetailTableInfo(); DetailTable detailTable = detailTableInfo.getDetailTable(0); @@ -119,9 +122,24 @@ public class RecruitFlowToModeAction implements Action { Set managerSet = new HashSet<>(); managerSet.add(manager); + // 获取消息类型默认值 + if (StringUtils.isBlank(messageType)) { + messageType = RecruitConstant.RECRUIT_MESSAGE_TYPE; + } + if (StringUtils.isBlank(title)) { + title = "【招聘需求管理】"; + } + if (StringUtils.isBlank(linkUrl)) { + linkUrl = "/spa/cube/index.html#/main/cube/card?type=0&modeId=$modeId$&formId=$formId$&billid=$billid$"; + } + if (StringUtils.isBlank(linkMobileUrl)) { + linkMobileUrl = "/mobilemode/browserLinkTransit.jsp?billid=$billid$&modeId=$modeId$&formId=$formId$"; + } + String url = replaceUrlKeys(linkUrl, messageMap); + String mobileUrl = replaceUrlKeys(linkMobileUrl, messageMap); // 消息提醒 - messagePush(applicantName + ",你申请的“" + requirementName + "”招聘需求,正在进行中,请知悉。", messageMap, applicantSet); - messagePush("您有一个新的”" + requirementName + "“招聘需求,请查收。", messageMap, managerSet); + RecruitModeUtil.messagePush(messageType, applicantName + ",你申请的“" + requirementName + "”招聘需求,正在进行中,请知悉。", title, applicantSet, user.getUID(), url, mobileUrl); + RecruitModeUtil.messagePush(messageType, "您有一个新的”" + requirementName + "“招聘需求,请查收。", title, managerSet, user.getUID(), url, mobileUrl); } rst.commit(); } catch (Exception e) { @@ -206,26 +224,6 @@ public class RecruitFlowToModeAction implements Action { } - /** - * 权限重构 - * - * @param rst RecordSetTrans - * @param uuid UUID - * @param formModeId 建模ID - * @throws Exception Exception - */ - private void refreshRight(RecordSetTrans rst, String uuid, int formModeId) throws Exception { - rst.executeQuery("select id from " + MODE_TABLE_NAME + " where modeuuid='" + uuid + "'"); - if (rst.next()) { - //建模数据的id - int bid = Util.getIntValue(rst.getString("id")); - ModeRightInfo modeRightInfo = new ModeRightInfo(); - modeRightInfo.setNewRight(true); - //新建的时候添加共享 - modeRightInfo.editModeDataShare(1, formModeId, bid); - } - } - /** * 消息推送 *