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 bff6ccdb..57124eb4 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/client/web/ProcessPublishWeb.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java index b1ac992f..27c5d478 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java @@ -3002,8 +3002,100 @@ public class ProcessPublishWeb extends ActionWeb { ArrayList isNumberAscArray = new ArrayList(); List fileList = upFileDao.search(" and PALREPOSITORYID ='" + publishId + "'" + " ORDER BY FILENAME ASC"); if (fileList != null && fileList.size() > 0) - for (UpfileModel upfileModel : fileList) - if (methodId.contains("data") || methodId.contains("control")) { + for (UpfileModel upfileModel : fileList) { + String type = upfileModel.getType(); + + if(!methodId.equals("control.policy") || methodId.contains("process")){ + + if ("s".equals(upfileModel.getType())) { + JSONObject jb = new JSONObject(); + //按照附件编号排序 + String fileNamel = upfileModel.getFileName(); + if (UtilString.isNotEmpty(fileNamel) && fileNamel.contains("附件") && fileNamel.length() > 2 && (fileNamel.contains(":") || fileNamel.contains(":"))) { + if (fileNamel.indexOf("附件") == 0) { + int indexOf2 = 3; + if (fileNamel.contains(":")) { + indexOf2 = fileNamel.indexOf(":"); + } else if (fileNamel.contains(":")) { + indexOf2 = fileNamel.indexOf(":"); + } + String numberStr = fileNamel.substring(2, indexOf2); + if (isNumeric(numberStr) && !"".equals(numberStr)) { + isNumberAscArray.add("true"); + int fileNumber = Integer.parseInt(numberStr); + jb.put("file_number", fileNumber); + } else { + isNumberAscArray.add("false"); + } + } else { + isNumberAscArray.add("false"); + } + + } else { + isNumberAscArray.add("false"); + } + + String upfileId = upfileModel.getUuid(); + String shape_uuid = upfileModel.getShape_uuid(); + String upFileName = upfileModel.getFileName(); + jb.put("upfileId", upfileId); + jb.put("upFileName", upFileName); + String openUrl = ""; + ResponseObject ros = getUrl("s", jb, upfileModel); + JSONObject parseObject = JSON.parseObject(JSON.toJSONString(ros.getData())); + String url = parseObject.get("url").toString(); + if (url.contains(".xls")) + openUrl = url; + else + openUrl = SDK.getConfAPI().getPortalUrl() + "/r/" + url.replace("./", ""); + jb.put("openUrl", openUrl); + js.add(jb.toJSONString()); + } + + if ("f".equals(upfileModel.getType())) { + JSONObject jb = new JSONObject(); + //按照附件编号排序 + String fileNamel = upfileModel.getFileName(); + if (UtilString.isNotEmpty(fileNamel) && fileNamel.contains("附件") && fileNamel.length() > 2 && (fileNamel.contains(":") || fileNamel.contains(":"))) { + if (fileNamel.indexOf("附件") == 0) { + int indexOf2 = 3; + if (fileNamel.contains(":")) { + indexOf2 = fileNamel.indexOf(":"); + } else if (fileNamel.contains(":")) { + indexOf2 = fileNamel.indexOf(":"); + } + String numberStr = fileNamel.substring(2, indexOf2); + if (isNumeric(numberStr) && !"".equals(numberStr)) { + isNumberAscArray.add("true"); + int fileNumber = Integer.parseInt(numberStr); + jb.put("file_number", fileNumber); + } else { + isNumberAscArray.add("false"); + } + } else { + isNumberAscArray.add("false"); + } + + } else { + isNumberAscArray.add("false"); + } + + String upfileId = upfileModel.getUuid(); + String upFileName = upfileModel.getFileName(); + jb.put("upfileId", upfileId); + jb.put("upFileName", upFileName); + String openUrl = ""; + ResponseObject ros = getUrl("f", jb, upfileModel); + JSONObject parseObject = JSON.parseObject(JSON.toJSONString(ros.getData())); + String url = parseObject.get("url").toString(); + if (url.contains(".xls")) + openUrl = url; + else + openUrl = SDK.getConfAPI().getPortalUrl() + "/r/" + url.replace("./", ""); + jb.put("openUrl", openUrl); + js.add(jb.toJSONString()); + } + }else if(methodId.contains("data")){ if ("s".equals(upfileModel.getType())) { JSONObject jb = new JSONObject(); //按照附件编号排序 @@ -3092,7 +3184,10 @@ public class ProcessPublishWeb extends ActionWeb { jb.put("openUrl", openUrl); js.add(jb.toJSONString()); } + } + } + boolean contains = isNumberAscArray.contains("false"); if (!contains) { try { @@ -3164,8 +3259,95 @@ public class ProcessPublishWeb extends ActionWeb { ArrayList isNumberAscArray = new ArrayList(); List fileList = upFileDao.search(" and PALREPOSITORYID ='" + changeId + "'" + " ORDER BY FILENAME ASC"); if (fileList != null && fileList.size() > 0) - for (UpfileModel upfileModel : fileList) - if (methodId.contains("data")) { + for (UpfileModel upfileModel : fileList){ + String type = upfileModel.getType(); + if(!methodId.equals("control.policy") || methodId.contains("process")){ + if ("s".equals(upfileModel.getType())) { + JSONObject jb = new JSONObject(); + //按照附件编号排序 + String fileNamel = upfileModel.getFileName(); + if (UtilString.isNotEmpty(fileNamel) && fileNamel.contains("附件") && fileNamel.length() > 2 && (fileNamel.contains(":") || fileNamel.contains(":"))) { + if (fileNamel.indexOf("附件") == 0) { + int indexOf2 = 3; + if (fileNamel.contains(":")) { + indexOf2 = fileNamel.indexOf(":"); + } else if (fileNamel.contains(":")) { + indexOf2 = fileNamel.indexOf(":"); + } + String numberStr = fileNamel.substring(2, indexOf2); + if (isNumeric(numberStr) && !"".equals(numberStr)) { + isNumberAscArray.add("true"); + int fileNumber = Integer.parseInt(numberStr); + jb.put("file_number", fileNumber); + } else { + isNumberAscArray.add("false"); + } + } else { + isNumberAscArray.add("false"); + } + + } else { + isNumberAscArray.add("false"); + } + String upfileId = upfileModel.getUuid(); + String upFileName = upfileModel.getFileName(); + jb.put("upfileId", upfileId); + jb.put("upFileName", upFileName); + String openUrl = ""; + ResponseObject ros = getUrl("s", jb, upfileModel); + JSONObject parseObject = JSON.parseObject(JSON.toJSONString(ros.getData())); + String url = parseObject.get("url").toString(); + if (url.contains(".xls")) + openUrl = url; + else + openUrl = SDK.getConfAPI().getPortalUrl() + "/r/" + url.replace("./", ""); + jb.put("openUrl", openUrl); + js.add(jb.toJSONString()); + } + if ("f".equals(upfileModel.getType())) { + JSONObject jb = new JSONObject(); + //按照附件编号排序 + String fileNamel = upfileModel.getFileName(); + if (UtilString.isNotEmpty(fileNamel) && fileNamel.contains("附件") && fileNamel.length() > 2 && (fileNamel.contains(":") || fileNamel.contains(":"))) { + if (fileNamel.indexOf("附件") == 0) { + int indexOf2 = 3; + if (fileNamel.contains(":")) { + indexOf2 = fileNamel.indexOf(":"); + } else if (fileNamel.contains(":")) { + indexOf2 = fileNamel.indexOf(":"); + } + String numberStr = fileNamel.substring(2, indexOf2); + if (isNumeric(numberStr) && !"".equals(numberStr)) { + isNumberAscArray.add("true"); + int fileNumber = Integer.parseInt(numberStr); + jb.put("file_number", fileNumber); + } else { + isNumberAscArray.add("false"); + } + } else { + isNumberAscArray.add("false"); + } + + } else { + isNumberAscArray.add("false"); + } + String upfileId = upfileModel.getUuid(); + String upFileName = upfileModel.getFileName(); + jb.put("upfileId", upfileId); + jb.put("upFileName", upFileName); + String openUrl = ""; + ResponseObject ros = getUrl("f", jb, upfileModel); + JSONObject parseObject = JSON.parseObject(JSON.toJSONString(ros.getData())); + String url = parseObject.get("url").toString(); + if (url.contains(".xls")) + openUrl = url; + else + openUrl = SDK.getConfAPI().getPortalUrl() + "/r/" + url.replace("./", ""); + jb.put("openUrl", openUrl); + js.add(jb.toJSONString()); + } + }else if(methodId.contains("data") ){ + if ("s".equals(upfileModel.getType())) { JSONObject jb = new JSONObject(); //按照附件编号排序 @@ -3209,7 +3391,6 @@ public class ProcessPublishWeb extends ActionWeb { js.add(jb.toJSONString()); } } else { - if ("f".equals(upfileModel.getType())) { JSONObject jb = new JSONObject(); //按照附件编号排序 @@ -3254,6 +3435,8 @@ public class ProcessPublishWeb extends ActionWeb { } } + } + boolean contains = isNumberAscArray.contains("false"); if (!contains) { @@ -3323,8 +3506,97 @@ public class ProcessPublishWeb extends ActionWeb { ArrayList isNumberAscArray = new ArrayList(); List fileList = upFileDao.search(" and PALREPOSITORYID ='" + stopId + "'" + " ORDER BY FILENAME ASC"); if (fileList != null && fileList.size() > 0) - for (UpfileModel upfileModel : fileList) - if (methodId.contains("data")) { + for (UpfileModel upfileModel : fileList){ + String type = upfileModel.getType(); + if(methodId.contains("control") || methodId.contains("process")){ + if ("s".equals(upfileModel.getType())) { + JSONObject jb = new JSONObject(); + //按照附件编号排序 + String fileNamel = upfileModel.getFileName(); + if (UtilString.isNotEmpty(fileNamel) && fileNamel.contains("附件") && fileNamel.length() > 2 && (fileNamel.contains(":") || fileNamel.contains(":"))) { + if (fileNamel.indexOf("附件") == 0) { + int indexOf2 = 3; + if (fileNamel.contains(":")) { + indexOf2 = fileNamel.indexOf(":"); + } else if (fileNamel.contains(":")) { + indexOf2 = fileNamel.indexOf(":"); + } + String numberStr = fileNamel.substring(2, indexOf2); + if (isNumeric(numberStr) && !"".equals(numberStr)) { + isNumberAscArray.add("true"); + int fileNumber = Integer.parseInt(numberStr); + jb.put("file_number", fileNumber); + } else { + isNumberAscArray.add("false"); + } + } else { + isNumberAscArray.add("false"); + } + + } else { + isNumberAscArray.add("false"); + } + + String upfileId = upfileModel.getUuid(); + String shape_uuid = upfileModel.getShape_uuid(); + String upFileName = upfileModel.getFileName(); + jb.put("upfileId", upfileId); + jb.put("upFileName", upFileName); + String openUrl = ""; + ResponseObject ros = getUrl("s", jb, upfileModel); + JSONObject parseObject = JSON.parseObject(JSON.toJSONString(ros.getData())); + String url = parseObject.get("url").toString(); + if (url.contains(".xls")) + openUrl = url; + else + openUrl = SDK.getConfAPI().getPortalUrl() + "/r/" + url.replace("./", ""); + jb.put("openUrl", openUrl); + js.add(jb.toJSONString()); + } + if ("f".equals(upfileModel.getType())) { + JSONObject jb = new JSONObject(); + //按照附件编号排序 + String fileNamel = upfileModel.getFileName(); + if (UtilString.isNotEmpty(fileNamel) && fileNamel.contains("附件") && fileNamel.length() > 2 && (fileNamel.contains(":") || fileNamel.contains(":"))) { + if (fileNamel.indexOf("附件") == 0) { + int indexOf2 = 3; + if (fileNamel.contains(":")) { + indexOf2 = fileNamel.indexOf(":"); + } else if (fileNamel.contains(":")) { + indexOf2 = fileNamel.indexOf(":"); + } + String numberStr = fileNamel.substring(2, indexOf2); + if (isNumeric(numberStr) && !"".equals(numberStr)) { + isNumberAscArray.add("true"); + int fileNumber = Integer.parseInt(numberStr); + jb.put("file_number", fileNumber); + } else { + isNumberAscArray.add("false"); + } + } else { + isNumberAscArray.add("false"); + } + + } else { + isNumberAscArray.add("false"); + } + + String upfileId = upfileModel.getUuid(); + String upFileName = upfileModel.getFileName(); + jb.put("upfileId", upfileId); + jb.put("upFileName", upFileName); + String openUrl = ""; + ResponseObject ros = getUrl("f", jb, upfileModel); + JSONObject parseObject = JSON.parseObject(JSON.toJSONString(ros.getData())); + String url = parseObject.get("url").toString(); + if (url.contains(".xls")) + openUrl = url; + else + openUrl = SDK.getConfAPI().getPortalUrl() + "/r/" + url.replace("./", ""); + jb.put("openUrl", openUrl); + js.add(jb.toJSONString()); + } + }else if (methodId.contains("data")) { if ("s".equals(upfileModel.getType())) { JSONObject jb = new JSONObject(); //按照附件编号排序 @@ -3414,6 +3686,11 @@ public class ProcessPublishWeb extends ActionWeb { js.add(jb.toJSONString()); } } + } + + + + boolean contains = isNumberAscArray.contains("false"); if (!contains) { try { diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/SubFormAfterSave.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/SubFormAfterSave.java index 377b05b1..a4712c80 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/SubFormAfterSave.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/SubFormAfterSave.java @@ -132,11 +132,11 @@ public class SubFormAfterSave extends ExecuteListener { //保存文件类型到主表 saveFileType(processInstId); - System.out.println(formData.getString("ADAPT_NAME_THE_COMPANY")); - System.out.println(formData.getString("ADAPT_REGION_NAME")); - System.out.println(formData.getString("APPLICABLE_PRODUCT")); - /* + int level1auditcount = DBSql.update("UPDATE BO_ACT_COE_PUBLISH SET LEVEL_1_AUDIT_REQUIRED='" + formData.getString("LEVEL_1_AUDIT_REQUIRED") + "' ,SET SECONDARY_AUDIT_REQUIRED='"+formData.getString("SECONDARY_AUDIT_REQUIRED")+"', LEVEL_AUDIT_REQUIRED='"+formData.getString("LEVEL_AUDIT_REQUIRED")+"', FOURTH_AUDIT_REQUIRED='"+formData.getString("FOURTH_AUDIT_REQUIRED")+"' WHERE BINDID ='" + processInstId + "'"); + + + /* 根据L1、L2、L3、L4查询权限矩阵所属分部数据 */ ProcessInstance processInstance = SDK.getProcessAPI().getInstanceById(processInstId); 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 330fd69f..70777859 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 @@ -2253,7 +2253,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute BO bo1 = SDK.getBOAPI().query("BO_ACT_PUBLISH_PERM_SCOPE", true) .addQuery("PALNAME=", bo.getString("PUBLISHFILENAME")).detail(); if (bo1 != null) { - if (bo1.getString("SEND_SCOP").equals("1")) { + if (bo1.getString("PERMTYPE").equals("1")) { jsonObject_ehsq.put("releasescope", "内蒙古伊利实业集团股份有限公司"); } else {