上下游矩阵代码优化
This commit is contained in:
parent
38b3c10c19
commit
398e52fd6e
@ -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.OutputExcelUtil;
|
||||||
import com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil;
|
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.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.PALRepositoryCache;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryPropertyCache;
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryPropertyCache;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
|
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
|
||||||
@ -659,12 +660,39 @@ public class Report1Gener {
|
|||||||
if (repositoryPropertyList != null && repositoryPropertyList.size() > 0) {
|
if (repositoryPropertyList != null && repositoryPropertyList.size() > 0) {
|
||||||
for (PALRepositoryPropertyModel palRepositoryPropertyModel : repositoryPropertyList) {
|
for (PALRepositoryPropertyModel palRepositoryPropertyModel : repositoryPropertyList) {
|
||||||
JSONObject _process_tr = new JSONObject();
|
JSONObject _process_tr = new JSONObject();
|
||||||
if(palRepositoryPropertyModel.getPropertyId().equals("lead_process") && UtilString.isNotEmpty(JSONObject.parseObject(palRepositoryPropertyModel.getPropertyValue()).getString("relationShapeText"))){//上游流程
|
//查询文件名sql
|
||||||
_process_tr.put("name",JSONObject.parseObject(palRepositoryPropertyModel.getPropertyValue()).getString("relationShapeText"));
|
String querySQL= " SELECT R.PLNAME FROM APP_ACT_COE_PAL_REPOSITORY R " +
|
||||||
_process_tr.put("type","上游流程");
|
" JOIN (" +
|
||||||
}else if(palRepositoryPropertyModel.getPropertyId().equals("rear_process") && UtilString.isNotEmpty(JSONObject.parseObject(palRepositoryPropertyModel.getPropertyValue()).getString("relationShapeText"))){//下游流程
|
" SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT" +
|
||||||
_process_tr.put("name",JSONObject.parseObject(palRepositoryPropertyModel.getPropertyValue()).getString("relationShapeText"));
|
" WHERE FILEID = ? AND ATTRID = ?" +
|
||||||
_process_tr.put("type","下游流程");
|
" ) S ON R.PLVERSIONID = S.RELATIONFILEID";
|
||||||
|
if(palRepositoryPropertyModel.getPropertyId().equals("lead_process")){//上游流程
|
||||||
|
List<RowMap> 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<RowMap> 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()){
|
if(!_process_tr.isEmpty()){
|
||||||
procedureTable.add(_process_tr);
|
procedureTable.add(_process_tr);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user