|
@@ -211,20 +211,44 @@ public class TemplateGenerator {
|
|
|
|
|
|
private static List<ParaVo> getAllParaVos(String pid) {
|
|
|
List<ParaVo> paravos =new ArrayList<>();
|
|
|
- List<String> allUid = findAllOutUids(pid);
|
|
|
+ List<String> allUid = findAllOutUids(pid);// 可修改变量
|
|
|
for (String uid:allUid) {
|
|
|
ParaVo pvo =new ParaVo();
|
|
|
pvo.setUid(uid);
|
|
|
pvo.setLable(uid.substring(uid.lastIndexOf("/")+1,uid.length()));
|
|
|
paravos.add(pvo);
|
|
|
}
|
|
|
+ //mathfunc 自动流转变量
|
|
|
+ List<ParaVo> mathfuncInPram = getMathFuncZdlz(pid);
|
|
|
+ paravos.addAll(mathfuncInPram);
|
|
|
paravos.addAll(findMathFuncInMySelfParaVos(pid));//自建 MathFunc in
|
|
|
//in param
|
|
|
List<ParaVo> inPlist = getInParaVos(pid);
|
|
|
paravos.addAll(inPlist);
|
|
|
return paravos;
|
|
|
}
|
|
|
-
|
|
|
+ private static List<ParaVo> getMathFuncZdlz(String pid){
|
|
|
+ List<ParaVo> mathfuncInPram = new ArrayList<>();
|
|
|
+ MdoProInoutParaMapper dao = UtilTools.getBean(MdoProInoutParaMapper.class);
|
|
|
+ MdoProInoutParaSQLBuilder sb = new MdoProInoutParaSQLBuilder();
|
|
|
+ MdoProInoutParaSQLBuilder.Criteria sc = sb.createCriteria();
|
|
|
+ sc.andPidEqualTo(pid);
|
|
|
+ sc.andComtypeEqualTo(Integer.valueOf(ComType.MathFunc.getIndex()));
|
|
|
+ sc.andFlagEqualTo(1);//启用
|
|
|
+ sc.andTypeEqualTo(1);//输入参数
|
|
|
+ sc.andFcomidIsNotNull();//非自建
|
|
|
+ sc.andComtypeEqualTo(Integer.valueOf(ComType.MathFunc.getIndex()));//match
|
|
|
+ List<MdoProInoutPara> paras = dao.selectByExample(sb);
|
|
|
+ for (MdoProInoutPara para:paras) {
|
|
|
+ ParaVo vo = new ParaVo();
|
|
|
+ String uid ;
|
|
|
+ uid =MdoUidUtils.getUidByComTyeAndPcode(para.getComtype().toString(),para.getCode());
|
|
|
+ vo.setUid(uid);
|
|
|
+ vo.setLable(para.getCode());
|
|
|
+ mathfuncInPram.add(vo);
|
|
|
+ }
|
|
|
+ return mathfuncInPram;
|
|
|
+ }
|
|
|
private static List<ParaVo> getInParaVos(String pid) {
|
|
|
MdoProjectVariateMapper vDao =UtilTools.getBean(MdoProjectVariateMapper.class);
|
|
|
MdoProjectVariateSQLBuilder vsb = new MdoProjectVariateSQLBuilder();
|
|
@@ -361,6 +385,11 @@ public class TemplateGenerator {
|
|
|
List<String> ouids = mDao.selectFsiOuids(pid);
|
|
|
outUids.addAll(cuids);
|
|
|
outUids.addAll(ouids);
|
|
|
+ //自动流转变量
|
|
|
+ List<ParaVo> mathfuncInPrams = getMathFuncZdlz(pid);
|
|
|
+ for (ParaVo vo:mathfuncInPrams) {
|
|
|
+ ouids.add(vo.getUid());
|
|
|
+ }
|
|
|
return outUids;
|
|
|
}
|
|
|
|