#EC_HJ31# 已上线提交,单点登录处理日志、对email大小写处理

main
shilei 2 years ago
parent ff3c1f0a32
commit 9e4051be40

@ -0,0 +1,90 @@
package com.engine.workflow.cmd.workflowOvertime;
import com.engine.common.entity.BizLogContext;
import com.engine.core.interceptor.CommandContext;
import com.engine.workflow.entity.workflowOvertime.OvertimeEntity;
import com.engine.workflow.entity.workflowOvertime.RemindEntity;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.Util;
import weaver.workflow.logging.Logger;
import weaver.workflow.logging.LoggerFactory;
import weaver.workflow.msg.MsgPushUtil;
import weaver.workflow.msg.PoppupRemindInfoUtil;
import weaver.workflow.msg.entity.MsgEntity;
import weaver.workflow.request.RequestComInfo;
import weaver.workflow.request.RequestOperationMsgManager;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
/**
* -
*/
public class DoRemind_InfoCenterRemindCmd extends DoRemind_CommonInitCmd {
private final static Logger log = LoggerFactory.getLogger(DoRemind_InfoCenterRemindCmd.class);
private RequestComInfo requestcominfo;
public DoRemind_InfoCenterRemindCmd(OvertimeEntity overtimeEntity, RemindEntity remindEntity) {
super(overtimeEntity,remindEntity);
try {
requestcominfo = new RequestComInfo();
}catch (Exception e){
e.printStackTrace();
}
}
@Override
public BizLogContext getLogContext() {
return null;
}
@Override
public Boolean execute(CommandContext commandContext) {
boolean result = true;
int remindtype = remindEntity.getRemindtype();
int requestid = overtimeEntity.getRequestId();
log.info("信息中心提醒开始requestid:"+requestid+" remindtype:"+remindtype +" remindUserIdList:"+remindUserIdList);
/*PoppupRemindInfoUtil popUtil = new PoppupRemindInfoUtil();
for (int j = 0; j < remindUserIdList.size(); j++) {
result = popUtil.addPoppupRemindInfo(Util.getIntValue("" + remindUserIdList.get(j)), 10, "" + remindUserTypeList.get(j), requestid, requestcominfo.getRequestname(requestid + ""));
if (!result) {
log.info("信息中心提醒失败!相关参数userid" + remindUserIdList.get(j) + " type:10 logintype" + remindUserTypeList.get(j) + " requestid:" + requestid + " requestname:" + requestcominfo.getRequestname(requestid + ""));
}
}*//*
RecordSet rs = new RecordSet();
if (remindtype == 0) { // 超时前提
rs.executeUpdate("update workflow_currentoperator set wfreminduser='" + remindUserIds + "',wfusertypes='" + remindUserTypes + "' where isremark='0' and requestid=" + requestid);
} else { // 超时后提醒
rs.executeUpdate("update workflow_currentoperator set wfreminduser_csh='" + remindUserIds + "',wfusertypes_csh='" + remindUserTypes + "' where isremark='0' and requestid=" + requestid);
}*/
RequestOperationMsgManager romm = new RequestOperationMsgManager();
List<MsgEntity> requestMsgEntity = romm.requestOverTimeNoticeMsg(requestid, remindUserIdList, remindtype);
new MsgPushUtil().pushMsg(requestMsgEntity);
try{
Class<?> clazz = Class.forName("weaver.interfaces.dito.msg.SendPortalOverTimeMsgUtil");
if(clazz.getMethod("SendOverTimeMsg") != null) {
Method method = clazz.getMethod("SendOverTimeMsg", List.class);
Object newInstance = clazz.newInstance();
method.invoke(newInstance,requestMsgEntity);
}
}catch (ClassNotFoundException | NoSuchMethodException e){
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
return result;
}
}

@ -157,7 +157,6 @@ public class HttpRequestUtil extends BaseBean{
}
RecordSet rs = new RecordSet();
RecordSet rslog = new RecordSet();
User newUser = null;
String loginUserId = "" ;
@ -239,10 +238,14 @@ public class HttpRequestUtil extends BaseBean{
session.setAttribute("isie", Util.null2String(request.getParameter("isie")));
session.setAttribute("browser_isie", Util.null2String(request.getParameter("isie")));
Calendar today = Calendar.getInstance();
String currentdate = Util.add0(today.get(1), 4) + "-" + Util.add0(today.get(2) + 1, 2) + "-" + Util.add0(today.get(5), 2);
char separater = Util.getSeparator();
rslog.execute("HrmResource_UpdateLoginDate", loginUserId + separater + currentdate);
// try{
// Calendar today = Calendar.getInstance();
// String currentdate = Util.add0(today.get(1), 4) + "-" + Util.add0(today.get(2) + 1, 2) + "-" + Util.add0(today.get(5), 2);
// char separater = Util.getSeparator();
// rs.execute("HrmResource_UpdateLoginDate", loginUserId + separater + currentdate);
// }catch (Exception e){
// bb.writeLog("HttpRequestUtil--e:"+e);
// }
boolean moreAccountLanding = GCONST.getMOREACCOUNTLANDING();
if (moreAccountLanding) {

@ -137,7 +137,13 @@ public class RocketmqUtil {
String staffCode = Util.null2String(jsonObject.get("staffCode"));
String actType = Util.null2String(jsonObject.get("actType"));
String email = Util.null2String(jsonObject.get("email"));
String email = "" ;
if(jsonObject.containsKey("eMail")){
email = Util.null2String(jsonObject.get("eMail"));
}else if(jsonObject.containsKey("email")){
email = Util.null2String(jsonObject.get("email"));
}
String sysUserId = Util.null2String(jsonObject.get("sysUserId"));
String sysUserCode = Util.null2String(jsonObject.get("sysUserCode"));
String userName = Util.null2String(jsonObject.get("userName"));
@ -707,7 +713,7 @@ public class RocketmqUtil {
if("A".equals(actType) || "M".equals(actType))
{
//当岗位为主岗位时才更新1主岗位
if ("1".equals(defaultFlag)){
// if ("1".equals(defaultFlag)){
String updateUserJobSql = " update hrmresource set jobtitle=?,modified=?,modifier=? where id=? ";
bb.writeLog("updateUserJobSql:"+updateUserJobSql);
boolean flag = rs.executeUpdate(updateUserJobSql,new Object[]{jobtitlesId,currentDateTime,updateStaff,userId});
@ -722,7 +728,7 @@ public class RocketmqUtil {
dataMap.put("errmessage","更新人员岗位sql执行成功");
}
recordErrorData(dataMap);
}
// }
}else if("D".equals(actType)){
jobtitlesId = null;
String updateUserJobSql = " update hrmresource set jobtitle=?,modified=?,modifier=? where id=? ";
@ -1163,8 +1169,13 @@ public class RocketmqUtil {
String staffName = Util.null2String(jsonObject.get("staffName"));
String staffCode = Util.null2String(jsonObject.get("staffCode"));
String actType = Util.null2String(jsonObject.get("actType"));
String email = "" ;
if(jsonObject.containsKey("eMail")){
email = Util.null2String(jsonObject.get("eMail"));
}else if(jsonObject.containsKey("email")){
email = Util.null2String(jsonObject.get("email"));
}
String email = Util.null2String(jsonObject.get("email"));
String pwdSmsTel = Util.null2String(jsonObject.get("pwdSmsTel"));
String loginedNum = Util.null2String(jsonObject.get("sysUserId"));
@ -1175,7 +1186,12 @@ public class RocketmqUtil {
String lastname = staffName;
String staffId = Util.null2String(jsonObject.get("staffId"));
String eId = Util.null2String(jsonObject.get("eId"));
String eId = "" ;
if(jsonObject.containsKey("eid")){
eId = Util.null2String(jsonObject.get("eid"));
}else if(jsonObject.containsKey("eId")){
eId = Util.null2String(jsonObject.get("eId"));
}
bb.writeLog("eId:"+eId);
bb.writeLog("staffId:"+staffId);
@ -1214,9 +1230,9 @@ public class RocketmqUtil {
if("M".equalsIgnoreCase(actType))
{
String userUpdateSql = " update hrmresource set lastname=?,departmentid=?,subcompanyid1=?," +
" creater=?,email=?,mobile=?,jobtitle=?,status=?,dsporder=?,lastmoddate=?,modified=? where workcode=? ";
" creater=?,email=?,mobile=?,status=?,dsporder=?,lastmoddate=?,modified=? where workcode=? ";
bb.writeLog("userUpdateSql:"+userUpdateSql);
boolean flag = rs.executeUpdate(userUpdateSql,new Object[]{lastname,deptId,subcompanyid1,creator,email,pwdSmsTel,jobTitleId,status,loginedNum,currentDate,currentDateTime,staffCode});
boolean flag = rs.executeUpdate(userUpdateSql,new Object[]{lastname,deptId,subcompanyid1,creator,email,pwdSmsTel,status,loginedNum,currentDate,currentDateTime,staffCode});
bb.writeLog("flag:"+flag);
Map<String,String> dataMap = new HashMap<String,String>();
dataMap.put("syndate",nowDateTime);

Loading…
Cancel
Save