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 03285346..2754ea31 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/job/SynchronousPortJob.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/job/SynchronousPortJob.java index e745eba0..6d51c8a1 100644 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/job/SynchronousPortJob.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/job/SynchronousPortJob.java @@ -10,6 +10,7 @@ import java.util.List; import java.util.Map; import com.actionsoft.apps.coe.pal.pal.repository.upfile.web.UpfileWeb; +import okhttp3.OkHttpClient; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; @@ -88,7 +89,7 @@ public class SynchronousPortJob implements IJob { Connection open = DBSql.open(); try { - orgdepartmentList = DBSql.getMaps(open, "select DEPARTMENTNAME,ID,LAYER,PARENTDEPARTMENTID,ORDERINDEX from ORGDEPARTMENT where Closed=0 "); + orgdepartmentList = DBSql.getMaps(open, "SELECT DEPARTMENTNAME,ID,LAYER,PARENTDEPARTMENTID,ORDERINDEX from ORGDEPARTMENT where Closed=0 "); RowMap parentModel=DBSql.getMap("SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME='内蒙古伊利实业集团股份有限公司' and PLMETHODID='org.normal'"); @@ -183,16 +184,16 @@ public class SynchronousPortJob implements IJob { coeProcessLevel.insert(model1); createPostData(model1.getId(), org.getString("ID"), model1, conn); return modelId = model1.getId(); - }/* else { + } else { PALRepositoryModelImpl model = (PALRepositoryModelImpl) coeProcessLevel.getInstance(orgrowMap.getString("ID")); - String plname = orgrowMap.getString("PLNAME"); + /* String plname = orgrowMap.getString("PLNAME"); if (!plname.equals(org.getString("DEPARTMENTNAME"))) { String updateSql = "UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLNAME=? WHERE ID=? AND PLMETHODID='org.normal'"; DBSql.update(conn, String.format(updateSql, org.getString("DEPARTMENTNAME"), orgrowMap.getString("ID"))); - } + }*/ createPostData(model.getId(), org.getString("ID"), model, conn); - }*/ + } } @@ -212,18 +213,19 @@ public class SynchronousPortJob implements IJob { null, null, null, null, null, null, null, 1); coeProcessLevel.insert(model2); + createPostData(model2.getId(), org.getString("ID"), model2, conn); return modelId = model2.getId(); - }/*else{ + }else{ PALRepositoryModelImpl model = (PALRepositoryModelImpl)coeProcessLevel.getInstance(orgrowMap.getString("ID")); - String plname=orgrowMap.getString("PLNAME"); + /* String plname=orgrowMap.getString("PLNAME"); if(!plname.equals(org.getString("DEPARTMENTNAME"))){ String updateSql = "UPDATE APP_ACT_COE_PAL_REPOSITORY SET PLNAME=? WHERE ID=? AND PLMETHODID='org.normal'"; DBSql.update(conn, String.format(updateSql, org.getString("DEPARTMENTNAME"), orgrowMap.getString("ID"))); - } + }*/ createPostData(orgrowMap.getString("ID"), org.getString("ID"), model, conn); - }*/ + } } @@ -261,26 +263,27 @@ public class SynchronousPortJob implements IJob { Map idRelationMap = new HashMap<>(); + System.out.println("departmentId==================="+departmentId); - - List orgdepartmentList = DBSql.getMaps(conn, "select distinct(DESCR),DEPTNAME from BO_EU_ORG_POSTS WHERE DEPTID=? AND DESCR IS NOT NULL ", departmentId); + List orgdepartmentList = DBSql.getMaps(conn, "select DESCR,DEPTNAME from BO_EU_ORG_POSTS WHERE DEPTID=? AND DESCR IS NOT NULL ", departmentId); JSONArray shapes = new JSONArray(); if (orgdepartmentList.size() > 0) { + for (int i = 0; i < orgdepartmentList.size(); i++) { boolean flag=true; String positionName = orgdepartmentList.get(i).getString("DESCR"); String deptname = orgdepartmentList.get(i).getString("DEPTNAME"); + //新建一个uuid String shapeId = UUIDGener.getObjectId(); //拿到基础结构 JSONObject shape = ShapeUtil.getProcessShapeDefinitionByName("org.normal", "position"); - //查询模型形状 PALRepositoryModel parentModel = PALRepositoryCache.getCache().get(uuid); @@ -289,19 +292,17 @@ public class SynchronousPortJob implements IJob { List> fileElements = CoeDesignerUtil.getShapeMessageJson4(uuid); - if (fileElements.size() > 0) { for (Map shape2 : fileElements) { - List result = new ArrayList(); - - if (positionName.equals(shape2.get("name"))) { + if (positionName.equals(shape2.get("name").toString().trim())) { flag = false; } } if (flag == true) { + System.out.println("uuid==============="+uuid); System.out.println("部门名称为=================" + deptname); System.out.println("新建岗位为==================" + positionName); 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 7aa60f9a..4d166239 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 @@ -2645,7 +2645,7 @@ public class CoeProcessLevelWeb extends ActionWeb { requiredSpan = ""; } if ("textarea".equals(type)) { - input = ""; + input = ""; } else if ("select".equals(type) || "select_m".equals(type)) { if (readonly) { input = ""; @@ -2668,7 +2668,6 @@ public class CoeProcessLevelWeb extends ActionWeb { input = "" + ""; }else if ("table".equals(type)){ - //判断如果table不为准确json格式,则手动输入 boolean falgtrue = getJSONType(jsonValue); String attrRef = attributeModel.getRef(); @@ -8794,7 +8793,6 @@ public class CoeProcessLevelWeb extends ActionWeb { } } - // 设置画布大小 DiagramsUtil.setDiagramHeightWidth(definition, newElements); defineModel.setDefinition(definition.toString()); diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessListWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessListWeb.java index 99b6f3ac..d047a89c 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessListWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessListWeb.java @@ -63,6 +63,7 @@ public class CoeProcessListWeb extends ActionWeb { macroLibraries.put("condition", condition); macroLibraries.put("processCount", CoeProcessLevelDaoFacotory.createCoeProcessLevel().getCoeProcessLevelByWsId(wsId).size()); + String html = getToolbarHtml(wsId); macroLibraries.put("html", html); return HtmlPageTemplate.merge(CoEConstant.APP_ID, "pal.pl.list.portal.htm", macroLibraries);