vms调整
parent
40b268455b
commit
3333e103f4
|
@ -59,7 +59,7 @@ function initTimeoutDate(){
|
||||||
console.log('计算下次超时日期 ', computeTimeoutDate);
|
console.log('计算下次超时日期 ', computeTimeoutDate);
|
||||||
var trackingLine = parseInt(WfForm.getFieldValue(trackingLineField));
|
var trackingLine = parseInt(WfForm.getFieldValue(trackingLineField));
|
||||||
var detail2LineNum = WfForm.getDetailRowCount("detail_2");
|
var detail2LineNum = WfForm.getDetailRowCount("detail_2");
|
||||||
setTimeout(()=>{
|
setTimeout(function (){
|
||||||
WfForm.changeFieldValue(timeoutRemindDateFiled, {value: computeTimeoutDate});
|
WfForm.changeFieldValue(timeoutRemindDateFiled, {value: computeTimeoutDate});
|
||||||
// 判断流程提交走向
|
// 判断流程提交走向
|
||||||
console.log('主表跟踪触发行数 : ', trackingLine)
|
console.log('主表跟踪触发行数 : ', trackingLine)
|
||||||
|
@ -102,6 +102,9 @@ function getCurrentDate() {
|
||||||
function parseDate(date) {
|
function parseDate(date) {
|
||||||
var currentYear = date.getFullYear();
|
var currentYear = date.getFullYear();
|
||||||
var currentMonth = date.getMonth() + 1;// getMonth()返回0~11,需要加1
|
var currentMonth = date.getMonth() + 1;// getMonth()返回0~11,需要加1
|
||||||
|
if(currentMonth < 10){
|
||||||
|
currentMonth = '0' + currentMonth;
|
||||||
|
}
|
||||||
var currentDay = date.getDate();
|
var currentDay = date.getDate();
|
||||||
return currentYear + '-' + currentMonth + '-' + currentDay;
|
return currentYear + '-' + currentMonth + '-' + currentDay;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,19 +32,20 @@ public class CusListValue implements CusInterfaceGetValue {
|
||||||
// 如果fileName不为空则对集合中每个map添加"fileName":value value则是附件字段名称
|
// 如果fileName不为空则对集合中每个map添加"fileName":value value则是附件字段名称
|
||||||
String fileName = Util.null2DefaultStr(pathParam.get("fileName"), "");
|
String fileName = Util.null2DefaultStr(pathParam.get("fileName"), "");
|
||||||
if(StringUtils.isNotBlank(cusSql)){
|
if(StringUtils.isNotBlank(cusSql)){
|
||||||
|
cusSql = cusSql.replace("{?requestid}",Util.null2DefaultStr(mainMap.get("requestid"),""));
|
||||||
if (StringUtils.isNotBlank(attachmentField)) {
|
if (StringUtils.isNotBlank(attachmentField)) {
|
||||||
for (String item : attachmentField.split(",")) {
|
String[] fields = attachmentField.split(",");
|
||||||
|
for (String item : fields) {
|
||||||
String filedValue = Util.null2DefaultStr(mainMap.get(item),"");
|
String filedValue = Util.null2DefaultStr(mainMap.get(item),"");
|
||||||
if(StringUtils.isNotBlank(Util.null2DefaultStr(mainMap.get(filedValue),""))){
|
String fileSql = cusSql;
|
||||||
cusSql = cusSql
|
if(StringUtils.isNotBlank(filedValue)){
|
||||||
.replace("{?docIds}", "( " + filedValue + " )")
|
fileSql = fileSql.replace("{?docIds}", "( " + filedValue + " )");
|
||||||
.replace("{?requestid}",Util.null2DefaultStr(mainMap.get("requestid"),""));
|
List<Map<String, String>> attachmentInfo = mapper.getAttachmentInfo(fileSql);
|
||||||
List<Map<String, String>> attachmentInfo = mapper.getAttachmentInfo(cusSql);
|
|
||||||
if(CollectionUtils.isEmpty(attachmentInfo)){
|
if(CollectionUtils.isEmpty(attachmentInfo)){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 往map中put附件字段名
|
// 往map中put附件字段名
|
||||||
if(StringUtils.isBlank(fileName)){
|
if(StringUtils.isNotBlank(fileName)){
|
||||||
attachmentInfo.forEach(file ->{
|
attachmentInfo.forEach(file ->{
|
||||||
file.put(fileName, item);
|
file.put(fileName, item);
|
||||||
});
|
});
|
||||||
|
@ -52,6 +53,11 @@ public class CusListValue implements CusInterfaceGetValue {
|
||||||
list.addAll(attachmentInfo);
|
list.addAll(attachmentInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
List<Map<String, String>> attachmentInfo = mapper.getAttachmentInfo(cusSql);
|
||||||
|
if(CollectionUtils.isNotEmpty(attachmentInfo)){
|
||||||
|
list.addAll(attachmentInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
|
|
@ -42,7 +42,6 @@ public class WorkFlowToVmsAndMQService {
|
||||||
// 表单字段
|
// 表单字段
|
||||||
private static final String VMS_SUCCESS = "vms_success";
|
private static final String VMS_SUCCESS = "vms_success";
|
||||||
private static final String SUCCESS = "0";
|
private static final String SUCCESS = "0";
|
||||||
|
|
||||||
{
|
{
|
||||||
httpUtils.getGlobalCache().header.put("Content-Type", MediaType.APPLICATION_JSON); // 全局请求头
|
httpUtils.getGlobalCache().header.put("Content-Type", MediaType.APPLICATION_JSON); // 全局请求头
|
||||||
}
|
}
|
||||||
|
@ -89,12 +88,11 @@ public class WorkFlowToVmsAndMQService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <h1>解析响应对象</h1>
|
* <h1>解析响应对象</h1>
|
||||||
*
|
* @author xuanran.wang
|
||||||
|
* @dateTime 2022/12/23 11:25
|
||||||
* @param responseVo 响应对象
|
* @param responseVo 响应对象
|
||||||
* @param url 地址
|
* @param url 地址
|
||||||
* @param requestParam 请求
|
* @param requestParam 请求
|
||||||
* @author xuanran.wang
|
|
||||||
* @dateTime 2022/12/23 11:25
|
|
||||||
**/
|
**/
|
||||||
private void parseResponseVo(ResponeVo responseVo, String url, Map<String, Object> requestParam, VmsResponseVoField vmsResponseVoField){
|
private void parseResponseVo(ResponeVo responseVo, String url, Map<String, Object> requestParam, VmsResponseVoField vmsResponseVoField){
|
||||||
if (responseVo.getCode() != SUCCESS_CODE) { // 相应状态码
|
if (responseVo.getCode() != SUCCESS_CODE) { // 相应状态码
|
||||||
|
@ -114,11 +112,10 @@ public class WorkFlowToVmsAndMQService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <h1>将流程信息发送到kafka</h1>
|
* <h1>将流程信息发送到kafka</h1>
|
||||||
*
|
|
||||||
* @param kafkaConfig kafka配置文件名称
|
|
||||||
* @param message 消息对象
|
|
||||||
* @author xuanran.wang
|
* @author xuanran.wang
|
||||||
* @dateTime 2023/3/30 14:56
|
* @dateTime 2023/3/30 14:56
|
||||||
|
* @param kafkaConfig kafka配置文件名称
|
||||||
|
* @param message 消息对象
|
||||||
**/
|
**/
|
||||||
public void sendToMQ(String kafkaConfig, Map<String, Object> message){
|
public void sendToMQ(String kafkaConfig, Map<String, Object> message){
|
||||||
KafkaProducer<String, String> producer = null;
|
KafkaProducer<String, String> producer = null;
|
||||||
|
@ -162,12 +159,11 @@ public class WorkFlowToVmsAndMQService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <h1>更新流程sql</h1>
|
* <h1>更新流程sql</h1>
|
||||||
*
|
* @author xuanran.wang
|
||||||
|
* @dateTime 2023/3/30 19:18
|
||||||
* @param field 主表字段
|
* @param field 主表字段
|
||||||
* @param tableName 表名
|
* @param tableName 表名
|
||||||
* @param requestId 请求id
|
* @param requestId 请求id
|
||||||
* @author xuanran.wang
|
|
||||||
* @dateTime 2023/3/30 19:18
|
|
||||||
**/
|
**/
|
||||||
public void updateWorkFlow(String field, String tableName, String requestId){
|
public void updateWorkFlow(String field, String tableName, String requestId){
|
||||||
String updateSQL = "update " + tableName + " set " + field + " = " + SUCCESS + " where requestid = ?";
|
String updateSQL = "update " + tableName + " set " + field + " = " + SUCCESS + " where requestid = ?";
|
||||||
|
|
|
@ -80,15 +80,16 @@ public class SendTodoTaskUtil {
|
||||||
}
|
}
|
||||||
todoTask.setPcAgentId(pcAgentId);
|
todoTask.setPcAgentId(pcAgentId);
|
||||||
String todoSSOCallBackUrl = ShBigDataUtil.getPropertiesValByKey("todoSSOCallBackUrl");
|
String todoSSOCallBackUrl = ShBigDataUtil.getPropertiesValByKey("todoSSOCallBackUrl");
|
||||||
StringBuilder sb = new StringBuilder(todoSSOCallBackUrl);
|
String todoPcSSOCallBackUrl = ShBigDataUtil.getPropertiesValByKey("todoPcSSOCallBackUrl");
|
||||||
sb.append("?user=")
|
if(StringUtils.isBlank(todoPcSSOCallBackUrl)){
|
||||||
.append(userId)
|
todoPcSSOCallBackUrl = todoSSOCallBackUrl;
|
||||||
.append("&requestId=")
|
}
|
||||||
.append(requestId);
|
// 移动端链接
|
||||||
// todoTask.setLinkUrl(Util.null2DefaultStr(ShBigDataUtil.getPropertiesValByKey("taskPcUrl"), oaAddress) + "/spa/workflow/static4form/index.html?#/main/workflow/req?requestid="+requestId);
|
StringBuilder mobileUrl = new StringBuilder(todoSSOCallBackUrl);
|
||||||
// todoTask.setMobileLinkUrl(Util.null2DefaultStr(ShBigDataUtil.getPropertiesValByKey("taskMobileUrl"), oaAddress) + "/spa/workflow/static4mobileform/index.html?#/req?requestid="+requestId);
|
// pc端链接
|
||||||
todoTask.setLinkUrl(sb.toString());
|
StringBuilder pcUrl = new StringBuilder(todoPcSSOCallBackUrl);
|
||||||
todoTask.setMobileLinkUrl(sb.append("&mobile=1").toString());
|
todoTask.setLinkUrl(appendParam(pcUrl, userId, requestId).toString());
|
||||||
|
todoTask.setMobileLinkUrl(appendParam(mobileUrl, userId, requestId).append("&mobile=1").toString());
|
||||||
todoTask.setSender(getConvertHrm(0, obj, String.valueOf(obj.getCreator().getUID())));
|
todoTask.setSender(getConvertHrm(0, obj, String.valueOf(obj.getCreator().getUID())));
|
||||||
todoTask.setReceiver(getConvertHrm(1, obj, String.valueOf(userId)));
|
todoTask.setReceiver(getConvertHrm(1, obj, String.valueOf(userId)));
|
||||||
res.add(todoTask);
|
res.add(todoTask);
|
||||||
|
@ -96,6 +97,14 @@ public class SendTodoTaskUtil {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static StringBuilder appendParam(StringBuilder sb, int userId, int requestId){
|
||||||
|
sb.append("?user=")
|
||||||
|
.append(userId)
|
||||||
|
.append("&requestId=")
|
||||||
|
.append(requestId);
|
||||||
|
return sb;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <h1>将oa任务对象转换成三方系统任务对象</h1>
|
* <h1>将oa任务对象转换成三方系统任务对象</h1>
|
||||||
* @author xuanran.wang
|
* @author xuanran.wang
|
||||||
|
|
|
@ -38,6 +38,8 @@ public class ShBigDataUtil {
|
||||||
WHILTE_LIST.add("ssoInterfaceCompareField");
|
WHILTE_LIST.add("ssoInterfaceCompareField");
|
||||||
WHILTE_LIST.add("ssoOaCompareField");
|
WHILTE_LIST.add("ssoOaCompareField");
|
||||||
WHILTE_LIST.add("pcAgentId");
|
WHILTE_LIST.add("pcAgentId");
|
||||||
|
// pc回调地址
|
||||||
|
WHILTE_LIST.add("todoPcSSOCallBackUrl");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -26,9 +26,10 @@ taskPcUrl=http://127.0.0.1/spa/workflow/static4form/index.html?#/main/workflow/r
|
||||||
taskMobileUrl=http://127.0.0.1/spa/workflow/static4mobileform/index.html?#/req?requestid={requestId}
|
taskMobileUrl=http://127.0.0.1/spa/workflow/static4mobileform/index.html?#/req?requestid={requestId}
|
||||||
# oa token缓存对象提前过期时间
|
# oa token缓存对象提前过期时间
|
||||||
expiryBeforeTime=5
|
expiryBeforeTime=5
|
||||||
# 统一待办单点接口地址
|
# 统一待办单点移动端接口地址
|
||||||
todoSSOCallBackUrl=http://127.0.0.1/api/wxr/sh_big_data/sso/login/dhajhdsajdhsajdaskdlakdl
|
todoSSOCallBackUrl=http://127.0.0.1/api/wxr/sh_big_data/sso/login/dhajhdsajdhsajdaskdlakdl
|
||||||
|
# 统一待办单点pc接口地址
|
||||||
|
todoPcSSOCallBackUrl=http://127.0.0.1/api/wxr/sh_big_data/sso/login/dhajhdsajdhsajdaskdlakdl
|
||||||
# ================ 组织架构同步新增 ================
|
# ================ 组织架构同步新增 ================
|
||||||
# 分部最大的层级
|
# 分部最大的层级
|
||||||
maxLevel=3
|
maxLevel=3
|
||||||
|
|
|
@ -4,6 +4,7 @@ import aiyh.utils.GenerateFileUtil;
|
||||||
import basetest.BaseTest;
|
import basetest.BaseTest;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import weaver.xuanran.wang.eighty_five_degreec.sap.action.WorkflowToSap;
|
import weaver.xuanran.wang.eighty_five_degreec.sap.action.WorkflowToSap;
|
||||||
|
import weaver.xuanran.wang.immc.WorkFlowToVmsAndMQ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <h1></h1>
|
* <h1></h1>
|
||||||
|
@ -16,6 +17,6 @@ public class NormalTest extends BaseTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWord(){
|
public void testWord(){
|
||||||
GenerateFileUtil.createActionDocument(WorkflowToSap.class);
|
GenerateFileUtil.createActionDocument(WorkFlowToVmsAndMQ.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue