上海大数据中心统一待办加字段

dev
wangxuanran 2023-06-14 19:37:35 +08:00
parent cdda440ef2
commit 36ed42ce30
6 changed files with 69 additions and 58 deletions

View File

@ -69,7 +69,7 @@ public class OtherSystemToOAServiceImpl implements OtherSystemToOAService {
String sql = "select id from hrmresource where " + Util.null2DefaultStr(ShBigDataUtil.getPropertiesValByKey("ssoOaCompareField"),"outkey") + " = #{outKey}";
int id = otherSystemToOAMapper.selectUserIdByOutKey(sql, oaOutKey);
if(id < 0){
throw new CustomerException(Util.logStr("code : {} not found in OA!", id));
throw new CustomerException(Util.logStr("code : {} not found in OA!", oaOutKey));
}
return id;
}

View File

@ -42,6 +42,7 @@ public class WorkFlowToVmsAndMQService {
// 表单字段
private static final String VMS_SUCCESS = "vms_success";
private static final String SUCCESS = "0";
{
httpUtils.getGlobalCache().header.put("Content-Type", MediaType.APPLICATION_JSON); // 全局请求头
}
@ -88,11 +89,12 @@ public class WorkFlowToVmsAndMQService {
/**
* <h1></h1>
* @author xuanran.wang
* @dateTime 2022/12/23 11:25
*
* @param responseVo
* @param url
* @param requestParam
* @author xuanran.wang
* @dateTime 2022/12/23 11:25
**/
private void parseResponseVo(ResponeVo responseVo, String url, Map<String, Object> requestParam, VmsResponseVoField vmsResponseVoField) {
if (responseVo.getCode() != SUCCESS_CODE) { // 相应状态码
@ -112,10 +114,11 @@ public class WorkFlowToVmsAndMQService {
/**
* <h1>kafka</h1>
* @author xuanran.wang
* @dateTime 2023/3/30 14:56
*
* @param kafkaConfig kafka
* @param message
* @author xuanran.wang
* @dateTime 2023/3/30 14:56
**/
public void sendToMQ(String kafkaConfig, Map<String, Object> message) {
KafkaProducer<String, String> producer = null;
@ -159,11 +162,12 @@ public class WorkFlowToVmsAndMQService {
/**
* <h1>sql</h1>
* @author xuanran.wang
* @dateTime 2023/3/30 19:18
*
* @param field
* @param tableName
* @param requestId id
* @author xuanran.wang
* @dateTime 2023/3/30 19:18
**/
public void updateWorkFlow(String field, String tableName, String requestId) {
String updateSQL = "update " + tableName + " set " + field + " = " + SUCCESS + " where requestid = ?";

View File

@ -74,6 +74,11 @@ public class SendTodoTaskUtil {
todoTask.setAgentid(agentId);
todoTask.setTaskName(obj.getRequestnamenew());
todoTask.setTaskDesc(obj.getRequestnamenew());
String pcAgentId = ShBigDataUtil.getPropertiesValByKey("pcAgentId");
if(StringUtils.isBlank(pcAgentId)){
pcAgentId = agentId;
}
todoTask.setPcAgentId(pcAgentId);
String todoSSOCallBackUrl = ShBigDataUtil.getPropertiesValByKey("todoSSOCallBackUrl");
StringBuilder sb = new StringBuilder(todoSSOCallBackUrl);
sb.append("?user=")

View File

@ -37,6 +37,7 @@ public class ShBigDataUtil {
WHILTE_LIST.add("getUserIdDebugOutKey");
WHILTE_LIST.add("ssoInterfaceCompareField");
WHILTE_LIST.add("ssoOaCompareField");
WHILTE_LIST.add("pcAgentId");
}
/**

View File

@ -26,4 +26,5 @@ public class CusTodoTask {
protected String mobileLinkUrl;
protected String receiver;
protected String sender;
protected String pcAgentId;
}

View File

@ -391,8 +391,8 @@ public class BigDataTest extends BaseTest {
@Test
public void testG(){
String oaOutKey = "111";
String sql = "select id from hrmresource where " + Util.null2DefaultStr(ShBigDataUtil.getPropertiesValByKey("ssoOaCompareField"),"outkey") + " = #{outKey}";
String oaOutKey = "wld";
String sql = "select id from hrmresource where loginid = #{outKey}";
int id = otherSystemToOAMapper.selectUserIdByOutKey(sql, oaOutKey);
log.info("id => " + id);
}