diff --git a/main/java/shkd/repc/rebm/formplugin/PurDemandFormPlugin.java b/main/java/shkd/repc/rebm/formplugin/PurDemandFormPlugin.java index 77f2109..e1f8ef1 100644 --- a/main/java/shkd/repc/rebm/formplugin/PurDemandFormPlugin.java +++ b/main/java/shkd/repc/rebm/formplugin/PurDemandFormPlugin.java @@ -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); +// } +// } } /** diff --git a/main/java/shkd/todotask/todoZyTaskServiceHandler.java b/main/java/shkd/todotask/todoZyTaskServiceHandler.java index 5ae0a70..0147e60 100644 --- a/main/java/shkd/todotask/todoZyTaskServiceHandler.java +++ b/main/java/shkd/todotask/todoZyTaskServiceHandler.java @@ -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); diff --git a/main/java/shkd/utils/OAUtils.java b/main/java/shkd/utils/OAUtils.java index 8adf8a7..81e59d2 100644 --- a/main/java/shkd/utils/OAUtils.java +++ b/main/java/shkd/utils/OAUtils.java @@ -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);