1.OA待办移动端链接优化

2.采购需求自动生成编码规则优化

S
This commit is contained in:
weiyunlong 2024-12-19 12:32:31 +08:00
parent 69bfc74af0
commit 18a8a1a064
3 changed files with 32 additions and 15 deletions

View File

@ -28,16 +28,16 @@ public class PurDemandFormPlugin extends AbstractFormPlugin {
updateRenovationProject();
DynamicObject dataEntity = this.getModel().getDataEntity(true);
if (StringUtils.isEmpty(dataEntity.getString("billno"))) {
QFilter q1 = new QFilter("number","=","CGXQ");
DynamicObject coderule = BusinessDataServiceHelper.loadSingle("bos_coderule", "id", new QFilter[]{q1});
if (null != coderule) {
CodeRuleInfo codeRule = CodeRuleCache.reloadCodeRuleById(coderule.getString("id"));
String number = CodeRuleServiceHelper.getNumber(codeRule, dataEntity);
String purissue = codeRuleNumberIsExits(number, codeRule, dataEntity);
this.getModel().setValue("billno", purissue);
}
}
// if (StringUtils.isEmpty(dataEntity.getString("billno"))) {
// QFilter q1 = new QFilter("number","=","CGXQ");
// DynamicObject coderule = BusinessDataServiceHelper.loadSingle("bos_coderule", "id", new QFilter[]{q1});
// if (null != coderule) {
// CodeRuleInfo codeRule = CodeRuleCache.reloadCodeRuleById(coderule.getString("id"));
// String number = CodeRuleServiceHelper.getNumber(codeRule, dataEntity);
// String purissue = codeRuleNumberIsExits(number, codeRule, dataEntity);
// this.getModel().setValue("billno", purissue);
// }
// }
}
/**

View File

@ -70,14 +70,16 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
}
//获取Url
String url = toDoInfo.getUrl(); // 链接
String url1 = toDoInfo.getUrl(); // 链接
String url1 = toDoInfo.getUrl(); // pc链接
String h5url = url + "&device=mob&ado=view";
try {
url = URLEncoder.encode(url, "UTF-8");
h5url = URLEncoder.encode(h5url, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + url;
h5url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + h5url;
//获取任务创建人
Long startUserId = messageContext.getStartUserId(); // 审批实例发起人id
@ -115,6 +117,7 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
thirdPartyMap.put("url1", url1);
thirdPartyMap.put("billNo", billNo);
thirdPartyMap.put("startNumber", startNumber);//发起人
thirdPartyMap.put("h5url", h5url);
//推送OA待办新增接口
thirdParty(thirdPartyMap);
@ -264,15 +267,28 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
// }
// }
// }
// //获取Url
// String url = message.getContentUrl(); // 链接
// String url1 = message.getContentUrl(); // 链接
// try {
// url = URLEncoder.encode(url, "UTF-8");
// } catch (UnsupportedEncodingException e) {
// e.printStackTrace();
// }
// url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + url;
//获取Url
String url = message.getContentUrl(); // 链接
String url1 = message.getContentUrl(); // 链接
String url1 = message.getContentUrl(); // pc链接
String h5url = url + "&device=mob&ado=view";
try {
url = URLEncoder.encode(url, "UTF-8");
h5url = URLEncoder.encode(h5url, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + url;
h5url = "http://172.31.254.240:9090/seeyon/isc.do?method=ssoISC&toUrl=" + h5url;
//获取token
String oaToken = OAUtils.getOaToken(billNo);
@ -288,6 +304,7 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
thirdPartyMap.put("url1", url1);
thirdPartyMap.put("billNo", billNo);
thirdPartyMap.put("startNumber", startNumber);//发起人
thirdPartyMap.put("h5url", h5url);
//推送OA消息新增接口
thirdpartyMessage(thirdPartyMap);

View File

@ -211,7 +211,7 @@ public class OAUtils {
jsonObject.put("creationDate", String.valueOf(thirdPartyMap.get("createDateStr")));//待办创建时间格式yyyy-MM-dd HH:mm:ss
jsonObject.put("state", "0");//状态0:未办理1:已办理
jsonObject.put("url", String.valueOf(thirdPartyMap.get("url")));//PC端穿透链接
jsonObject.put("h5url", "test");//移动端穿透链接
jsonObject.put("h5url", String.valueOf(thirdPartyMap.get("h5url")));//移动端穿透链接
pendingList.add(jsonObject);
}
pendingsBody.put("pendingList", pendingList);
@ -329,7 +329,7 @@ public class OAUtils {
// jsonObject.put("thirdpartyReceiverId", "jdtest");//todo 接收人主键保证唯一
jsonObject.put("creation_date", String.valueOf(thirdPartyMap.get("createDateStr")));//创建时间格式yyyy-MM-dd HH:mm:ss
jsonObject.put("messageURL", String.valueOf(thirdPartyMap.get("url")));//PC端穿透链接
jsonObject.put("messageH5URL", "test");//移动端穿透链接
jsonObject.put("messageH5URL", String.valueOf(thirdPartyMap.get("h5url")));//移动端穿透链接
messageList.add(jsonObject);
}
messageBody.put("messages", messageList);