From 398e52fd6ea6f308e10840da9e24d97056cee767 Mon Sep 17 00:00:00 2001 From: yujh Date: Fri, 8 Nov 2024 16:50:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=B8=B8=E7=9F=A9=E9=98=B5?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pal/output/pr/report1/Report1Gener.java | 40 ++++++++++++++++--- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/com.actionsoft.apps.coe.pal.output.pr/src/com/actionsoft/apps/coe/pal/output/pr/report1/Report1Gener.java b/com.actionsoft.apps.coe.pal.output.pr/src/com/actionsoft/apps/coe/pal/output/pr/report1/Report1Gener.java index fda8e326..a7708658 100644 --- a/com.actionsoft.apps.coe.pal.output.pr/src/com/actionsoft/apps/coe/pal/output/pr/report1/Report1Gener.java +++ b/com.actionsoft.apps.coe.pal.output.pr/src/com/actionsoft/apps/coe/pal/output/pr/report1/Report1Gener.java @@ -22,6 +22,7 @@ import com.actionsoft.apps.coe.pal.pal.output.model.OutputTaskModel; import com.actionsoft.apps.coe.pal.pal.output.util.OutputExcelUtil; import com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil; import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager; +import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryAttributeCache; import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache; import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryPropertyCache; import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory; @@ -659,12 +660,39 @@ public class Report1Gener { if (repositoryPropertyList != null && repositoryPropertyList.size() > 0) { for (PALRepositoryPropertyModel palRepositoryPropertyModel : repositoryPropertyList) { JSONObject _process_tr = new JSONObject(); - if(palRepositoryPropertyModel.getPropertyId().equals("lead_process") && UtilString.isNotEmpty(JSONObject.parseObject(palRepositoryPropertyModel.getPropertyValue()).getString("relationShapeText"))){//上游流程 - _process_tr.put("name",JSONObject.parseObject(palRepositoryPropertyModel.getPropertyValue()).getString("relationShapeText")); - _process_tr.put("type","上游流程"); - }else if(palRepositoryPropertyModel.getPropertyId().equals("rear_process") && UtilString.isNotEmpty(JSONObject.parseObject(palRepositoryPropertyModel.getPropertyValue()).getString("relationShapeText"))){//下游流程 - _process_tr.put("name",JSONObject.parseObject(palRepositoryPropertyModel.getPropertyValue()).getString("relationShapeText")); - _process_tr.put("type","下游流程"); + //查询文件名sql + String querySQL= " SELECT R.PLNAME FROM APP_ACT_COE_PAL_REPOSITORY R " + + " JOIN (" + + " SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT" + + " WHERE FILEID = ? AND ATTRID = ?" + + " ) S ON R.PLVERSIONID = S.RELATIONFILEID"; + if(palRepositoryPropertyModel.getPropertyId().equals("lead_process")){//上游流程 + List maps = DBSql.getMaps(querySQL, new Object[]{repositoryModel.getId(), "lead_process"}); + if(!maps.isEmpty()){ + StringBuilder sb =new StringBuilder(); + for (RowMap map : maps) { + sb.append(map.getString("PLNAME")).append(","); + } + if(sb.length()>0){ + sb.deleteCharAt(sb.length()); + } + _process_tr.put("name",sb.toString()); + _process_tr.put("type","上游流程"); + } + }else if(palRepositoryPropertyModel.getPropertyId().equals("rear_process")){//下游流程 + List maps = DBSql.getMaps(querySQL, new Object[]{repositoryModel.getId(), "rear_process"}); + if(!maps.isEmpty()){ + StringBuilder sb =new StringBuilder(); + for (RowMap map : maps) { + sb.append(map.getString("PLNAME")).append(","); + } + if(sb.length()>0){ + sb.deleteCharAt(sb.length()); + } + _process_tr.put("name",sb.toString()); + _process_tr.put("type","下游流程"); + } + } if(!_process_tr.isEmpty()){ procedureTable.add(_process_tr);