PAL代码部署
This commit is contained in:
parent
57200075b2
commit
3816715876
@ -3664,13 +3664,11 @@ public class PALRepositoryQueryAPIManager {
|
||||
if(methodModel.getId().equals("org.role") || methodModel.getId().equals("org.normal")){
|
||||
icon.put("icon", "");
|
||||
icon.put("color", "#ef7b40");
|
||||
object.put("folder", false);// 非文件夹
|
||||
}else{
|
||||
icon.put("icon", "");
|
||||
icon.put("color", "#8E8E8E");
|
||||
object.put("folder", false);// 非文件夹
|
||||
}
|
||||
|
||||
object.put("folder", false);// 非文件夹
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3714,7 +3712,7 @@ public class PALRepositoryQueryAPIManager {
|
||||
|
||||
if(object.getBoolean("folder")==false){
|
||||
|
||||
String sessionId = new SSOUtil().registerClientSessionNoPassword(model.getCreateUser(), LoginConst.DEFAULT_LANG, "localhost", LoginConst.DEVICE_PC);
|
||||
String sessionId = new SSOUtil().registerClientSessionNoPassword(model.getCreateUser(), LoginConst.DEFAULT_LANG, "127.0.0.1", LoginConst.DEVICE_PC);
|
||||
|
||||
String url=SDK.getPortalAPI().getPortalUrl()+"/r/w?uuid="+model.getId()+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+sessionId+"";
|
||||
|
||||
|
||||
@ -20,9 +20,11 @@ import jodd.util.StringUtil;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.checkerframework.checker.units.qual.C;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.*;
|
||||
|
||||
@ -48,12 +50,11 @@ public class SynchronousOrgJob implements IJob {
|
||||
String plRid1 = UUIDGener.getUUID();
|
||||
String id1 = UUIDGener.getUUID();
|
||||
|
||||
orgdepartmentList = DBSql.getMaps("select DEPARTMENTNAME,ID,LAYER,PARENTDEPARTMENTID,ORDERINDEX from ORGDEPARTMENT ");
|
||||
Connection open = DBSql.open();
|
||||
orgdepartmentList = DBSql.getMaps(open,"select DEPARTMENTNAME,ID,LAYER,PARENTDEPARTMENTID,ORDERINDEX from ORGDEPARTMENT ");
|
||||
|
||||
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
|
||||
|
||||
|
||||
|
||||
PALRepositoryModelImpl model = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, "6f4e292c-1b90-4dd2-8c20-7da159cb20a5", "内蒙古伊利实业集团股份有限公司",
|
||||
"", 1, "org", "org", true, 1,
|
||||
id1, false, "org.normal", "0", 1, null,
|
||||
@ -65,6 +66,7 @@ public class SynchronousOrgJob implements IJob {
|
||||
parentModelId=model.getId();
|
||||
orgindex = 0;
|
||||
createTree();
|
||||
DBSql.close(open);
|
||||
|
||||
}
|
||||
|
||||
@ -88,9 +90,11 @@ public class SynchronousOrgJob implements IJob {
|
||||
String id1 = UUIDGener.getUUID();
|
||||
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
|
||||
|
||||
Connection open = DBSql.open();
|
||||
|
||||
if (org.getString("PARENTDEPARTMENTID").equals("0")) {
|
||||
String sql1 = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE WSID='6f4e292c-1b90-4dd2-8c20-7da159cb20a5' and EXT1='" + org.getString("ID") + "'";
|
||||
String parentPalOrgId1 = DBSql.getString(sql1);
|
||||
String parentPalOrgId1 = DBSql.getString(open,sql1);
|
||||
if(StringUtil.isEmpty(parentPalOrgId1)){
|
||||
PALRepositoryModelImpl model1 = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, "6f4e292c-1b90-4dd2-8c20-7da159cb20a5", org.getString("DEPARTMENTNAME"),
|
||||
"", 1, parentModelId, "org", true, 1,
|
||||
@ -102,6 +106,8 @@ public class SynchronousOrgJob implements IJob {
|
||||
return modelId=model1.getId();
|
||||
}
|
||||
|
||||
DBSql.close(open);
|
||||
|
||||
} else {
|
||||
|
||||
String parentPalOrgId = getParentPalOrgId(org);
|
||||
@ -130,29 +136,33 @@ public class SynchronousOrgJob implements IJob {
|
||||
|
||||
public String getParentPalOrgId(RowMap org) {
|
||||
|
||||
Connection open = DBSql.open();
|
||||
String sql = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE WSID='6f4e292c-1b90-4dd2-8c20-7da159cb20a5' and EXT1='" + org.getString("PARENTDEPARTMENTID") + "'";
|
||||
String parentPalOrgId = DBSql.getString(sql);
|
||||
String parentPalOrgId = DBSql.getString(open,sql);
|
||||
|
||||
if (parentPalOrgId.equals("0") || parentPalOrgId.equals("") || parentPalOrgId == null) {
|
||||
RowMap parentOrg = DBSql.getMap("select DEPARTMENTNAME,ID,LAYER,PARENTDEPARTMENTID,ORDERINDEX from ORGDEPARTMENT where id = '" + org.getString("PARENTDEPARTMENTID") + "'");
|
||||
creatNode(parentOrg);
|
||||
}
|
||||
|
||||
DBSql.close(open);
|
||||
|
||||
return parentPalOrgId;
|
||||
}
|
||||
|
||||
|
||||
public String getParentPallevel(RowMap org) {
|
||||
|
||||
Connection open = DBSql.open();
|
||||
String sql = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE WSID='6f4e292c-1b90-4dd2-8c20-7da159cb20a5' and EXT1='" + org.getString("PARENTDEPARTMENTID") + "'";
|
||||
String parentPalOrgId = DBSql.getString(sql);
|
||||
String parentPalOrgId = DBSql.getString(open,sql);
|
||||
|
||||
if (parentPalOrgId.equals("0") || parentPalOrgId.equals("") || parentPalOrgId == null) {
|
||||
RowMap parentOrg = DBSql.getMap("select DEPARTMENTNAME,ID,LAYER,PARENTDEPARTMENTID from ORGDEPARTMENT where id = '" + org.getString("PARENTDEPARTMENTID") + "'");
|
||||
RowMap parentOrg = DBSql.getMap(open,"select DEPARTMENTNAME,ID,LAYER,PARENTDEPARTMENTID from ORGDEPARTMENT where id = '" + org.getString("PARENTDEPARTMENTID") + "'");
|
||||
|
||||
creatNode(parentOrg);
|
||||
}
|
||||
|
||||
DBSql.close(open);
|
||||
return parentPalOrgId;
|
||||
}
|
||||
|
||||
@ -163,6 +173,9 @@ public class SynchronousOrgJob implements IJob {
|
||||
* @return
|
||||
*/
|
||||
public void createPostData(String uuid,String departmentId,PALRepositoryModelImpl model){
|
||||
|
||||
Connection open = DBSql.open();
|
||||
|
||||
Map<String, String> idRelationMap = new HashMap<>();
|
||||
|
||||
BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(model.getId(), 0);
|
||||
@ -178,7 +191,6 @@ public class SynchronousOrgJob implements IJob {
|
||||
String shapeId = UUIDGener.getObjectId();
|
||||
|
||||
//拿到基础结构
|
||||
|
||||
JSONObject shape = ShapeUtil.getProcessShapeDefinitionByName("org.normal", "position");
|
||||
|
||||
if (StringUtils.isNotEmpty(definition.getString("commonShapeConfig"))) {
|
||||
@ -187,7 +199,7 @@ public class SynchronousOrgJob implements IJob {
|
||||
|
||||
|
||||
|
||||
List<RowMap> orgdepartmentList=DBSql.getMaps("select POSITION_NO,POSITION_NAME from ORGUSER WHERE DEPARTMENTID=?",departmentId);
|
||||
List<RowMap> orgdepartmentList=DBSql.getMaps(open,"select POSITION_NO,POSITION_NAME from ORGUSER WHERE DEPARTMENTID=?",departmentId);
|
||||
|
||||
int zindex = 1;
|
||||
|
||||
@ -227,6 +239,8 @@ public class SynchronousOrgJob implements IJob {
|
||||
defineModel.setDefinition(definition.toString());
|
||||
// 保存文件
|
||||
CoeDesignerAPIManager.getInstance().storeDefinition(defineModel);// dao操作
|
||||
|
||||
DBSql.close(open);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -8145,7 +8145,12 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
}
|
||||
}
|
||||
|
||||
String keywordStr = sb.deleteCharAt(sb.length() - 1).toString();//去掉最后一个逗号
|
||||
String keywordStr;
|
||||
if(sb.length()>0){
|
||||
keywordStr = sb.deleteCharAt(sb.length() - 1).toString();//去掉最后一个逗号
|
||||
}else{
|
||||
keywordStr="无";
|
||||
}
|
||||
ro.put("repositoryPathData",keywordStr);
|
||||
return ro.toString();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user