|
|
|
@ -7,6 +7,8 @@ import weaver.conn.RecordSet;
|
|
|
|
|
import weaver.formmode.setup.ModeRightInfo;
|
|
|
|
|
import weaver.general.BaseBean;
|
|
|
|
|
import weaver.general.Util;
|
|
|
|
|
import weaver.hrm.company.DepartmentComInfo;
|
|
|
|
|
import weaver.hrm.resource.ResourceComInfo;
|
|
|
|
|
import weaver.interfaces.dito.comInfo.PropBean;
|
|
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
@ -78,19 +80,37 @@ public class HrmRocketmqUtil {
|
|
|
|
|
if(StringUtils.isNotEmpty(personid) && StringUtils.isNotEmpty(managerid)) {
|
|
|
|
|
|
|
|
|
|
Map<String,String> dataMap = new HashMap<String,String>();
|
|
|
|
|
dataMap.put("syndate",nowDateTime);
|
|
|
|
|
dataMap.put("reqmessage",jsonObject.toJSONString());
|
|
|
|
|
dataMap.put("systable","hrmresource");
|
|
|
|
|
|
|
|
|
|
sql = " update hrmresource h set h.managerid = ? where id = ? ";
|
|
|
|
|
boolean flag = rs.executeUpdate(sql,new Object[]{managerid,personid});
|
|
|
|
|
|
|
|
|
|
Object[] objects = new Object[]{managerid,personid} ;
|
|
|
|
|
|
|
|
|
|
boolean flag = rs.executeUpdate(sql,objects);
|
|
|
|
|
bb.writeLog("flag:"+flag);
|
|
|
|
|
|
|
|
|
|
if(!flag){
|
|
|
|
|
errcount++;
|
|
|
|
|
dataMap.put("errmessage","人员更新SQL执行错误,managerid:"+managerid+"、personid:"+personid);
|
|
|
|
|
dataMap.put("zxjg","false");
|
|
|
|
|
}else{
|
|
|
|
|
dataMap.put("errmessage","人员更新SQL执行成功");
|
|
|
|
|
dataMap.put("zxjg","true");
|
|
|
|
|
|
|
|
|
|
ResourceComInfo resComInfo;
|
|
|
|
|
try {
|
|
|
|
|
resComInfo = new ResourceComInfo();
|
|
|
|
|
resComInfo.removeResourceCache();
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
bb.writeLog(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dataMap.put("syndate",nowDateTime);
|
|
|
|
|
dataMap.put("reqmessage",jsonObject.toJSONString());
|
|
|
|
|
dataMap.put("systable","hrmresource");
|
|
|
|
|
dataMap.put("zxyj",sql);
|
|
|
|
|
dataMap.put("zxcs",convertObject2String(objects));
|
|
|
|
|
dataMap.put("personno",personno);
|
|
|
|
|
recordErrorData(dataMap);
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
@ -99,7 +119,9 @@ public class HrmRocketmqUtil {
|
|
|
|
|
dataMap.put("reqmessage",datasObject.toJSONString());
|
|
|
|
|
dataMap.put("systable","hrmresource");
|
|
|
|
|
dataMap.put("errmessage","入参参数personno、managerno在cus_fielddata查询为空");
|
|
|
|
|
dataMap.put("personno",personno);
|
|
|
|
|
recordErrorData(dataMap);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
@ -118,6 +140,7 @@ public class HrmRocketmqUtil {
|
|
|
|
|
dataMap.put("reqmessage",datasObject.toJSONString());
|
|
|
|
|
dataMap.put("systable","hrmresource");
|
|
|
|
|
dataMap.put("errmessage","入参参数status不为1");
|
|
|
|
|
dataMap.put("personno",personno);
|
|
|
|
|
recordErrorData(dataMap);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -140,6 +163,7 @@ public class HrmRocketmqUtil {
|
|
|
|
|
dataMap.put("systable","hrmresource");
|
|
|
|
|
dataMap.put("errmessage","入参参数缺少masterInfo");
|
|
|
|
|
recordErrorData(dataMap);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
bb.writeLog("e:"+e);
|
|
|
|
@ -184,7 +208,7 @@ public class HrmRocketmqUtil {
|
|
|
|
|
String systable = Util.null2String(dataMap.get("systable"));
|
|
|
|
|
|
|
|
|
|
if(!reqmessage.contains("\\\"")){
|
|
|
|
|
reqmessage = reqmessage.replace("\"","\\\"");
|
|
|
|
|
reqmessage = reqmessage.replace("\"","\"");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int bool = 0;
|
|
|
|
@ -219,4 +243,17 @@ public class HrmRocketmqUtil {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String convertObject2String(Object[] obj) {
|
|
|
|
|
String datas = "";
|
|
|
|
|
if (null != obj) {
|
|
|
|
|
for (int i = 0; i < obj.length; i++) {
|
|
|
|
|
String data = obj[i].toString();
|
|
|
|
|
System.out.println(data);
|
|
|
|
|
datas += org.apache.commons.lang3.StringUtils.isBlank(datas) ? data : "," + data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return datas;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|