diff --git a/SynUser/src/com/yili/org/IntegrationJob.java b/SynUser/src/com/yili/org/IntegrationJob.java index f53641f6..e11bca3f 100644 --- a/SynUser/src/com/yili/org/IntegrationJob.java +++ b/SynUser/src/com/yili/org/IntegrationJob.java @@ -261,6 +261,12 @@ public class IntegrationJob implements IJob { if(map!=null) { SDK.getORGAPI().updateDepartment(createDepartment, org_name, org_code, ORGAPI.NO_UPDATE, hr_org_id, buName, full_name, map.getString("BUSINESS_UNIT"), ext5.toString(), dept_flag, org_code, start_date, end_date); } + + DepartmentModel departmentModel=SDK.getORGAPI().getDepartmentById(currentId); + String departname=departmentModel.getName(); + if(!org_name.equals(departname)){ + SDK.getORGAPI().updateDepartment(currentId, org_name, org_code, ORGAPI.NO_UPDATE, hr_org_id, buName, full_name, ORGAPI.NO_UPDATE, ext5.toString(), dept_flag, org_code, start_date, end_date); + } /* String sql ="SELECT USERID FROM ORGUSER WHERE DEPARTMENTID = '"+createDepartment+"'"; * String userId = DBSql.getString(sql); UserModel user = @@ -287,6 +293,14 @@ public class IntegrationJob implements IJob { if(map!=null) { SDK.getORGAPI().updateDepartment(currentId, org_name, org_code, ORGAPI.NO_UPDATE, hr_org_id, buName, full_name, map.getString("BUSINESS_UNIT"), ext5.toString(), dept_flag, org_code, start_date, end_date); } + + DepartmentModel departmentModel=SDK.getORGAPI().getDepartmentById(currentId); + String departname=departmentModel.getName(); + + if(!org_name.equals(departname)){ + SDK.getORGAPI().updateDepartment(currentId, org_name, org_code, ORGAPI.NO_UPDATE, hr_org_id, buName, full_name, ORGAPI.NO_UPDATE, ext5.toString(), dept_flag, org_code, start_date, end_date); + } + if("A".equals(eff_status)) { if(SDK.getORGAPI().getDepartmentById(currentId).isClosed()) { SDK.getORGAPI().activeDepartment(currentId); diff --git a/com.actionsoft.apps.coe.pal.datamigration/lib/com.actionsoft.apps.coe.pal.datamigration.jar b/com.actionsoft.apps.coe.pal.datamigration/lib/com.actionsoft.apps.coe.pal.datamigration.jar index 23fc8a8e..c863d022 100644 Binary files a/com.actionsoft.apps.coe.pal.datamigration/lib/com.actionsoft.apps.coe.pal.datamigration.jar and b/com.actionsoft.apps.coe.pal.datamigration/lib/com.actionsoft.apps.coe.pal.datamigration.jar differ diff --git a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/CopyJob.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/CopyJob.java index 85d3c325..d1b47731 100644 --- a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/CopyJob.java +++ b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/CopyJob.java @@ -136,7 +136,11 @@ public class CopyJob implements IJob { /** * 创建线程发送待阅数据 */ - course(lists,startTime,jsonObject,pc,list); + try { + course(lists,startTime,jsonObject,pc,list); + } catch (Exception e) { + e.printStackTrace(); + } //System.out.println("发送人员数据>>>>>>>>>>>>>>"+list); }else { int size = users.length/length; @@ -156,7 +160,11 @@ public class CopyJob implements IJob { /** * 创建线程发送待阅数据 */ - course(lists,startTime,jsonObject,pc,list); + try { + course(lists,startTime,jsonObject,pc,list); + } catch (Exception e) { + e.printStackTrace(); + } //System.out.println("发送人员数据>>>>>>>>>>>>>>"+list); } diff --git a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/InsertOAJob.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/InsertOAJob.java index cf260e41..f0f4051f 100644 --- a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/InsertOAJob.java +++ b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/InsertOAJob.java @@ -172,7 +172,11 @@ public class InsertOAJob implements IJob { /** * 创建线程发送待阅数据 */ - course(lists,startTime,jsonObject,pc,taskInstance,list); + try { + course(lists,startTime,jsonObject,pc,taskInstance,list); + } catch (Exception e) { + e.printStackTrace(); + } //System.out.println("发送人员数据>>>>>>>>>>>>>>"+list); }else { int size = users.length/length; @@ -192,7 +196,11 @@ public class InsertOAJob implements IJob { /** * 创建线程发送待阅数据 */ - course(lists,startTime,jsonObject,pc,taskInstance,list); + try { + course(lists,startTime,jsonObject,pc,taskInstance,list); + } catch (Exception e) { + e.printStackTrace(); + } //System.out.println("发送人员数据>>>>>>>>>>>>>>"+list); } 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 0d66654d..66e6f2aa 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 be73e089..f8e43ce7 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,6 +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.client.web.ProcessPublishClientWeb; import com.actionsoft.apps.coe.pal.publisher.client.web.ProcessPublishWeb; import com.actionsoft.apps.coe.pal.publisher.conf.PublisherConf; @@ -145,6 +146,10 @@ public class Plugins implements PluginListener { params15.put("icon", ""); list.add(new AppExtensionProfile("流程发布->通知", "aslp://com.actionsoft.apps.notification/registerApp", params15)); + + // 注册AT公式 + list.add(new AtFormulaPluginProfile("根据发布部门返回应发送发布人员账号", "@SendPublishMessage(*depName)", SendPublisherMessageAt.class.getName(), "返回发送发布人员账号", "返回发送发布人员账号")); + return list; } diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/at/SendPublisherMessageAt.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/at/SendPublisherMessageAt.java new file mode 100644 index 00000000..b5b8a1b0 --- /dev/null +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/at/SendPublisherMessageAt.java @@ -0,0 +1,29 @@ +package com.actionsoft.apps.coe.pal.publisher.at; + +import com.actionsoft.apps.coe.pal.system.util.StringUtil; +import com.actionsoft.bpms.bo.engine.BO; +import com.actionsoft.bpms.commons.at.AbstExpression; +import com.actionsoft.bpms.commons.at.ExpressionContext; +import com.actionsoft.exception.AWSExpressionException; +import com.actionsoft.sdk.local.SDK; +import org.apache.commons.lang3.StringUtils; + +public class SendPublisherMessageAt extends AbstExpression { + + + public SendPublisherMessageAt(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_SENDPUBLISHMESSAGE").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/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar index f78eea5a..c3ff83f2 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/output/util/OutputWordUtil.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/output/util/OutputWordUtil.java index 4f9da232..46e42521 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/output/util/OutputWordUtil.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/output/util/OutputWordUtil.java @@ -230,6 +230,7 @@ public class OutputWordUtil { * @param docName */ public static void createZdDoc2(JSONObject dataMap, String tempPath, String tempName, String docName, JSONObject wizardJsonData, String repositoryId, String docPath) throws FileNotFoundException { + Configuration configuration = new Configuration(); configuration.setDefaultEncoding("UTF-8"); @@ -733,7 +734,6 @@ public class OutputWordUtil { if (relationList2.size() > 0) { for (DesignerShapeRelationModel relation : relationList2) { String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID - System.out.println("relationFileId============="+relationFileId); PALRepositoryModel model = PALRepositoryCache.getCache().get(relationFileId); if (model != null) { @@ -1073,22 +1073,27 @@ public class OutputWordUtil { // 排序 - Collections.sort(search2, new Comparator() { - @Override - public int compare(UpfileModel o1, UpfileModel o2) { - String p1 = o1.getFileName(); - String p2 = o2.getFileName(); + try { + Collections.sort(search2, new Comparator() { + @Override + public int compare(UpfileModel o1, UpfileModel o2) { + String p1 = o1.getFileName(); + String p2 = o2.getFileName(); + + if (p1.substring(0, 2).equals("附件") && p2.substring(0, 2).equals("附件") && p1.contains(":") && p2.contains(":") && StringUtils.isNumeric(p1.substring(2, p1.indexOf(":"))) && StringUtils.isNumeric(p2.substring(2, p2.indexOf(":")))) { + return Integer.parseInt(p1.substring(2, p1.indexOf(":"))) - Integer.parseInt(p2.substring(2, p2.indexOf(":"))); + + } else { + return 0; + } - if (p1.substring(0, 2).equals("附件") && p2.substring(0, 2).equals("附件") && p1.contains(":") && p2.contains(":") && StringUtils.isNumeric(p1.substring(2, p1.indexOf(":"))) && StringUtils.isNumeric(p2.substring(2, p2.indexOf(":")))) { - return Integer.parseInt(p1.substring(2, p1.indexOf(":"))) - Integer.parseInt(p2.substring(2, p2.indexOf(":"))); - } else { - return 0; } + }); + } catch (Exception e) { - - } - }); + e.printStackTrace(); + } //读取模型附件插入手册中文档对象 if (search2 != null && search2.size() > 0) { @@ -1369,7 +1374,7 @@ public class OutputWordUtil { tr4.getCharacterFormat().setBold(true); tr4.getCharacterFormat().setFontName("宋体"); - paragraph.applyStyle(BuiltinStyle.Heading_1); //应用标题1样式 + //paragraph.applyStyle(BuiltinStyle.Heading_2); //应用标题1样式 //doc.saveToFile(outFile.getPath(), FileFormat.Docx_2013); diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java index faea5a93..688c250d 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java @@ -6456,6 +6456,32 @@ public class CoeProcessLevelWeb extends ActionWeb { CoEOpLogAPI.auditOkOp(_uc, CoEOpLogConst.MODULE_CATEGORY_REPOSITORY, CoEOpLogConst.OP_UPDATE, CoEOpLogConst.INFO_REPOSITORY_DESIGNER_UPDATE); } ro.put("define", definition); + + PALRepositoryModel palmodel = PALRepositoryCache.getCache().get(definition.get("uuid").toString()); + + if(palmodel!=null){ + PALRepository dao = new PALRepository(); + if(palmodel.getMethodId().equals("control.policy")){ + JSONObject elements = definition.getJSONObject("elements"); + Iterator ite = elements.keySet().iterator(); + PALRepositoryPropertyDao propertyDao = new PALRepositoryPropertyDao(); + while (ite.hasNext()) { + String key = ite.next(); + JSONObject shape = elements.getJSONObject(key); + String name = shape.getString("name"); + if(name.equals("I/O_L4")){ + int r = dao.updateRepositoryExt(definition.get("uuid").toString(), palmodel.getExt1(), palmodel.getExt2(), "I/O_L4", palmodel.getExt4()); + break; + } else if (name.equals("regulation")) { + int r = dao.updateRepositoryExt(definition.get("uuid").toString(), palmodel.getExt1(), palmodel.getExt2(), "regulation", palmodel.getExt4()); + break; + } + + } + } + } + + return ro.toString(); } @@ -8873,7 +8899,6 @@ public class CoeProcessLevelWeb extends ActionWeb { //新建一个uuid String shapeId = UUIDGener.getObjectId(); - //拿到基础结构 JSONObject shape; if (type.equals("1")) { @@ -8885,6 +8910,10 @@ public class CoeProcessLevelWeb extends ActionWeb { shape.put("id", shapeId); shape.put("text", title); } + + + + //图形的数据属性配置 List attributeModels = CoeDesignerShapeAPIManager.getInstance().getAllValidShapeAttributeModels(wsId, plModel.getMethodId()); for (PALMethodAttributeModel attributeModel : attributeModels) { diff --git a/com.awspaas.user.apps.coe.pal.output.zd/lib/com.awspaas.user.apps.coe.pal.output.zd.jar b/com.awspaas.user.apps.coe.pal.output.zd/lib/com.awspaas.user.apps.coe.pal.output.zd.jar index b784c457..775124a7 100644 Binary files a/com.awspaas.user.apps.coe.pal.output.zd/lib/com.awspaas.user.apps.coe.pal.output.zd.jar and b/com.awspaas.user.apps.coe.pal.output.zd/lib/com.awspaas.user.apps.coe.pal.output.zd.jar differ diff --git a/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/report1/Report1Gener.java b/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/report1/Report1Gener.java index 54a1cda6..54326617 100644 --- a/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/report1/Report1Gener.java +++ b/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/report1/Report1Gener.java @@ -79,8 +79,12 @@ public class Report1Gener { log.info("begin..."); log.info("-------------------"); // ----文件处理----- - genarateWord(tempPath, tempName, dcContext.getPath(), jsonObj); + + Map errorMap=new HashMap<>(); + genarateWord(tempPath, tempName, dcContext.getPath(), jsonObj,errorMap); log.info("end"); + // xml转换成word格式 + OutputWordUtil.xml2Word(log, dcContext.getPath()); // } } finally { // isRunning = false; @@ -96,7 +100,7 @@ public class Report1Gener { * @param docPath * @param wizardJsonData */ - private void genarateWord(String tempPath, String tempName, String docPath, JSONObject wizardJsonData) throws FileNotFoundException { + private void genarateWord(String tempPath, String tempName, String docPath, JSONObject wizardJsonData,Map errorMap) throws FileNotFoundException { String[] repositoryIds = wizardJsonData.getString("targetFileId").split(","); String reportName = wizardJsonData.getString("reportNameIsItName"); //页面上设计的文件命名规则