diff --git a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar index 87dc0c59..e6ddb0c9 100644 Binary files a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar and b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar differ diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/Plugins.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/Plugins.java index a11abbd0..13ed77a4 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/Plugins.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/Plugins.java @@ -5,8 +5,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import com.actionsoft.apps.coe.pal.publisher.at.SendPublisherMessageAt; -import com.actionsoft.apps.coe.pal.publisher.at.getRoleAt; +import com.actionsoft.apps.coe.pal.publisher.at.*; import com.actionsoft.apps.coe.pal.publisher.client.web.ProcessPublishClientWeb; import com.actionsoft.apps.coe.pal.publisher.client.web.ProcessPublishWeb; import com.actionsoft.apps.coe.pal.publisher.conf.PublisherConf; @@ -153,6 +152,11 @@ public class Plugins implements PluginListener { list.add(new AtFormulaPluginProfile("根据发布人部门获取角色账号", "@getRole(*orgdepart)", getRoleAt.class.getName(), "根据发布人部门获取角色账号", "根据发布人部门获取角色账号")); + list.add(new AtFormulaPluginProfile("根据表单部门查找流程校对人", "@FindProcessAndProofreader(*orgdepart)", FindProcessAndProofreaderAt.class.getName(), "根据表单部门查找流程校对人", "根据表单部门查找流程校对人")); + + list.add(new AtFormulaPluginProfile("根据表单部门查找意见征询发送人员配置表获取发送通知人员", "@ConfigurationSendMessage(*orgdepart)", ConfigurationSendMessageAt.class.getName(), "根据表单部门查找意见征询发送人员配置表获取发送通知人员", "根据表单部门查找意见征询发送人员配置表获取发送通知人员")); + + list.add(new AtFormulaPluginProfile("根据当前部门获取一级部门", "@getFirstDepart(*fullDepartId)", getFirstDepartAt.class.getName(), "根据当前部门获取一级部门", "根据当前部门获取一级部门")); return list; } diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/at/ConfigurationSendMessageAt.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/at/ConfigurationSendMessageAt.java new file mode 100644 index 00000000..452ec2ca --- /dev/null +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/at/ConfigurationSendMessageAt.java @@ -0,0 +1,24 @@ +package com.actionsoft.apps.coe.pal.publisher.at; + +import com.actionsoft.bpms.bo.engine.BO; +import com.actionsoft.bpms.commons.at.AbstExpression; +import com.actionsoft.bpms.commons.at.ExpressionContext; +import com.actionsoft.sdk.local.SDK; + +public class ConfigurationSendMessageAt extends AbstExpression { + + public ConfigurationSendMessageAt(ExpressionContext atContext, String expressionValue) { + super(atContext, expressionValue); + } + + public String execute(String expression) { + // 获取发送部门 + String depName = getParameter(expression, 1); + BO act_sendpublishmessage=SDK.getBOAPI().query("BO_ACT_CONSULTATION_SEND_PRO").addQuery("DEPNAME=",depName).detail(); + String sendperson=null; + if(act_sendpublishmessage!=null){ + sendperson=act_sendpublishmessage.getString("SENDPERSON"); + } + return sendperson; + } +} diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/at/FindProcessAndProofreaderAt.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/at/FindProcessAndProofreaderAt.java new file mode 100644 index 00000000..99981d2f --- /dev/null +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/at/FindProcessAndProofreaderAt.java @@ -0,0 +1,28 @@ +package com.actionsoft.apps.coe.pal.publisher.at; + +import com.actionsoft.bpms.bo.engine.BO; +import com.actionsoft.bpms.commons.at.AbstExpression; +import com.actionsoft.bpms.commons.at.ExpressionContext; +import com.actionsoft.sdk.local.SDK; + +public class FindProcessAndProofreaderAt extends AbstExpression { + + public FindProcessAndProofreaderAt(ExpressionContext atContext, String expressionValue) { + super(atContext, expressionValue); + } + + public String execute(String expression) { + + String departmanager = null; + //获取发布人部门 + String orgdepart = getParameter(expression, 1); + + BO bo_act_processmanager=SDK.getBOAPI().query("BO_ACT_PROCESSMANAGER").addQuery("ORGDEPART=",orgdepart).detail(); + + if(bo_act_processmanager!=null){ + //部门内部校对人 + departmanager = bo_act_processmanager.getString("DEPARTMANAGER"); + } + return departmanager; + } +} diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/at/getFirstDepartAt.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/at/getFirstDepartAt.java new file mode 100644 index 00000000..851396b9 --- /dev/null +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/at/getFirstDepartAt.java @@ -0,0 +1,25 @@ +package com.actionsoft.apps.coe.pal.publisher.at; + +import com.actionsoft.bpms.bo.engine.BO; +import com.actionsoft.bpms.commons.at.AbstExpression; +import com.actionsoft.bpms.commons.at.ExpressionContext; +import com.actionsoft.sdk.local.SDK; + +public class getFirstDepartAt extends AbstExpression { + + + public getFirstDepartAt(ExpressionContext atContext, String expressionValue) { + super(atContext, expressionValue); + } + + public String execute(String expression) { + + //获取表单部门 + String fullDepart = getParameter(expression, 1); + + String firstDepartment=fullDepart.substring(0,fullDepart.indexOf("/")); + + return firstDepartment; + } + +} diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent_new.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent_new.java index 0331947e..330fd69f 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent_new.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent_new.java @@ -139,6 +139,9 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute SDK.getProcessAPI().start(processInstance); + BO boRecordData=new BO(); + boRecordData.set("PROCESS_NAME",bo_act_coe_publish.getString("PROCESS_TITLE")); + SDK.getBOAPI().create("BO_ACT_DOCUMENT_PUBLICITY_TASK", boRecordData, processInstance.getId(), ""); //发送OA待办 TaskInstance taskInstance= SDK.getTaskAPI().getInstanceById(processInstance.getStartTaskInstId()); @@ -2634,7 +2637,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute } xmlDatasUtil.setCreaterworkcode(""); HttpClientUtils httpClientUtil = new HttpClientUtils(); - String taskurl= SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "taskurl"); + String taskurl= "http://10.105.1.59/services/yili"; String s = httpClientUtil.SendPend(taskurl, xmlDatasUtil); //System.out.println("状态码============》》》》》》》》》》》"+s); diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar index c3ff83f2..a9885d3d 100644 Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/CoeDesignerShapeAPIManager.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/CoeDesignerShapeAPIManager.java index 4355c415..c666752c 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/CoeDesignerShapeAPIManager.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/CoeDesignerShapeAPIManager.java @@ -1266,29 +1266,31 @@ public class CoeDesignerShapeAPIManager { int h = props.getInteger("h"); if (shape.containsKey("textBlock")) { JSONObject textBlock = JSONObject.parseObject(shape.getString("textBlock")); - JSONObject textBlockFinal = new JSONObject(); - String textBlockX = textBlock.getString("x").replace("w", w + "").replace("h", h + "").replace("Mat" + h, "Math"); - String textBlockY = textBlock.getString("y").replace("w", w + "").replace("h", h + "").replace("Mat" + h, "Math"); - String textBlockW = textBlock.getString("w").replace("w", w + "").replace("h", h + "").replace("Mat" + h, "Math"); - String textBlockH = textBlock.getString("h").replace("w", w + "").replace("h", h + "").replace("Mat" + h, "Math"); - if (textBlockX.equals("0")) { - textBlockX = "0.0"; + if (!textBlock.isEmpty()) { + JSONObject textBlockFinal = new JSONObject(); + String textBlockX = textBlock.getString("x").replace("w", w + "").replace("h", h + "").replace("Mat" + h, "Math"); + String textBlockY = textBlock.getString("y").replace("w", w + "").replace("h", h + "").replace("Mat" + h, "Math"); + String textBlockW = textBlock.getString("w").replace("w", w + "").replace("h", h + "").replace("Mat" + h, "Math"); + String textBlockH = textBlock.getString("h").replace("w", w + "").replace("h", h + "").replace("Mat" + h, "Math"); + if (textBlockX.equals("0")) { + textBlockX = "0.0"; + } + if (textBlockY.equals("0")) { + textBlockY = "0.0"; + } + if (textBlockW.equals("0")) { + textBlockW = "0.0"; + } + if (textBlockH.equals("0")) { + textBlockH = "0.0"; + } + textBlockFinal.put("x", Double.parseDouble(runJs(textBlockX).toString())); + textBlockFinal.put("y", Double.parseDouble(runJs(textBlockY).toString())); + textBlockFinal.put("w", Double.parseDouble(runJs(textBlockW).toString())); + textBlockFinal.put("h", Double.parseDouble(runJs(textBlockH).toString())); + shape.put("textBlock", textBlock); + shape.put("textBlockFinal", textBlockFinal); } - if (textBlockY.equals("0")) { - textBlockY = "0.0"; - } - if (textBlockW.equals("0")) { - textBlockW = "0.0"; - } - if (textBlockH.equals("0")) { - textBlockH = "0.0"; - } - textBlockFinal.put("x", Double.parseDouble(runJs(textBlockX).toString())); - textBlockFinal.put("y", Double.parseDouble(runJs(textBlockY).toString())); - textBlockFinal.put("w", Double.parseDouble(runJs(textBlockW).toString())); - textBlockFinal.put("h", Double.parseDouble(runJs(textBlockH).toString())); - shape.put("textBlock", textBlock); - shape.put("textBlockFinal", textBlockFinal); } } elements.put(shapeId, shape); diff --git a/com.awspaas.user.apps.app20221008163300/lib/Spire.Doc.jar b/com.awspaas.user.apps.app20221008163300/lib/Spire.Doc.jar new file mode 100644 index 00000000..a0c4d895 Binary files /dev/null and b/com.awspaas.user.apps.app20221008163300/lib/Spire.Doc.jar differ diff --git a/com.awspaas.user.apps.app20221008163300/lib/com.awspaas.user.apps.app20221008163300.jar b/com.awspaas.user.apps.app20221008163300/lib/com.awspaas.user.apps.app20221008163300.jar index 4b582701..331c2ca7 100644 Binary files a/com.awspaas.user.apps.app20221008163300/lib/com.awspaas.user.apps.app20221008163300.jar and b/com.awspaas.user.apps.app20221008163300/lib/com.awspaas.user.apps.app20221008163300.jar differ diff --git a/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/controller/UpateFileStateController.java b/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/controller/UpateFileStateController.java index a1eb9758..4b76dc6d 100644 --- a/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/controller/UpateFileStateController.java +++ b/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/controller/UpateFileStateController.java @@ -111,7 +111,7 @@ public class UpateFileStateController { }else{ String sql = "select EXT4 from APP_ACT_COE_PAL_REPOSITORY where ID = '"+plId+"'"; String ext4 = DBSql.getString(sql); - ProcessInstance processInstance = SDK.getProcessAPI().createProcessInstance("obj_a228b4816a7b4f58a862b9612299948c", "admin", ""); + ProcessInstance processInstance = SDK.getProcessAPI().createProcessInstance("obj_68deb5b9515e49b9ba0a18011363dc7a", "admin", ""); CancelPublishKnwl(processInstance,me.getSessionId(),ext4); } @@ -159,7 +159,7 @@ public class UpateFileStateController { publishN.set("PUBLISTHTYPE","N"); publishN.set("PUBLISHFILENAME",model.getName()); publishN.set("PUBLISHFILEID",plId); - ProcessInstance processInstance = SDK.getProcessAPI().createProcessInstance("obj_a228b4816a7b4f58a862b9612299948c", "admin", ""); + ProcessInstance processInstance = SDK.getProcessAPI().createProcessInstance("obj_68deb5b9515e49b9ba0a18011363dc7a", "admin", ""); SDK.getBOAPI().create("BO_ACT_COE_PUBLISH_N",publishN,processInstance,me); @@ -221,7 +221,7 @@ public class UpateFileStateController { RowMap map = DBSql.getMap("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID = '" + plId + "'"); String ext4 = map.getString("EXT4"); if (UtilString.isNotEmpty(ext4)){ - ProcessInstance processInstance = SDK.getProcessAPI().createProcessInstance("obj_a228b4816a7b4f58a862b9612299948c", "admin", ""); + ProcessInstance processInstance = SDK.getProcessAPI().createProcessInstance("obj_68deb5b9515e49b9ba0a18011363dc7a", "admin", ""); CancelPublishKnwl(processInstance,sid,ext4); }else { System.out.println("该文件未被发布,不进行取消发布知识以及删除索引"); @@ -439,7 +439,7 @@ public class UpateFileStateController { publishN.set("PUBLISTHTYPE","N"); publishN.set("PUBLISHFILENAME",model.getName()); publishN.set("PUBLISHFILEID",plId); - ProcessInstance processInstance = SDK.getProcessAPI().createProcessInstance("obj_a228b4816a7b4f58a862b9612299948c", "admin", ""); + ProcessInstance processInstance = SDK.getProcessAPI().createProcessInstance("obj_68deb5b9515e49b9ba0a18011363dc7a", "admin", ""); SDK.getBOAPI().create("BO_ACT_COE_PUBLISH_N",publishN,processInstance,me); @@ -495,7 +495,7 @@ public class UpateFileStateController { RowMap rowMap = DBSql.getMap(sql_card_name); String caed_name = rowMap.getString("CARDNAME"); String[] split_card = caed_name.split("V"); - ProcessInstance processInstance = SDK.getProcessAPI().createProcessInstance("obj_a228b4816a7b4f58a862b9612299948c", "admin", ""); + ProcessInstance processInstance = SDK.getProcessAPI().createProcessInstance("obj_68deb5b9515e49b9ba0a18011363dc7a", "admin", ""); PublishKnow(processInstance, me, ext4,me.getSessionId()); JSONArray coontest = new JSONArray(new LinkedList<>()); JSONObject jsonObject = new JSONObject(new LinkedHashMap<>()); diff --git a/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/controller/test.java b/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/controller/test.java deleted file mode 100644 index 3f9bbe08..00000000 --- a/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/controller/test.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.awspaas.user.apps.app.controller; - -public class test { - public static void main(String[] args) { - String name = "11.7 流程管理"; - String name1 = name.substring(name.lastIndexOf(".") + 2).trim(); - System.out.println("name>>>>>>>"+name1); - } -}