|
|
|
@ -155,77 +155,7 @@ public class AegPublicAccountMailIntegrate_mxJPO {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void replaceRouteNode(Context context, String routeId, String itemId, String changeId){
|
|
|
|
|
|
|
|
|
|
String getConnId = "query connection from " + routeId + " to " + itemId + " select id attribute[Route Sequence] attribute[Title] attribute[Route Instructions] attribute[Route Action] dump |";
|
|
|
|
|
LOGGER.info("getConnId ==> " + getConnId);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
String connInfo = MqlUtil.mqlCommand(context, getConnId);
|
|
|
|
|
|
|
|
|
|
String connId = connInfo.split("\\|")[1];
|
|
|
|
|
String routeSequence = connInfo.split("\\|")[2];
|
|
|
|
|
String title = connInfo.split("\\|")[3];
|
|
|
|
|
String routeInstructions = connInfo.split("\\|")[4];
|
|
|
|
|
String routeAction = connInfo.split("\\|")[5];
|
|
|
|
|
|
|
|
|
|
LOGGER.info("connId ==> " + connId);
|
|
|
|
|
LOGGER.info("routeSequence ==> " + routeSequence);
|
|
|
|
|
LOGGER.info("title ==> " + title);
|
|
|
|
|
LOGGER.info("routeInstructions ==> " + routeInstructions);
|
|
|
|
|
LOGGER.info("routeAction ==> " + routeAction);
|
|
|
|
|
|
|
|
|
|
String delConnId = "delete connection " + connId;
|
|
|
|
|
MqlUtil.mqlCommand(context,delConnId);
|
|
|
|
|
|
|
|
|
|
LOGGER.info("================================================");
|
|
|
|
|
Map<String, List<String>> caMap = getCAAttrInfo(context, changeId);
|
|
|
|
|
LOGGER.info(" ======> 2222222222");
|
|
|
|
|
String publicAccountId = "";
|
|
|
|
|
|
|
|
|
|
String getItemTitle = "print bus " + itemId + " select attribute[Title].value dump |";
|
|
|
|
|
LOGGER.info("getItemTitle ==> " + getItemTitle);
|
|
|
|
|
String itemTitle = MqlUtil.mqlCommand(context, getItemTitle);
|
|
|
|
|
LOGGER.info("itemTitle ==> " + itemTitle);
|
|
|
|
|
|
|
|
|
|
if(!"".equals(itemTitle))
|
|
|
|
|
{
|
|
|
|
|
if(itemTitle.contains("\u8425\u8fd0")){
|
|
|
|
|
List<String> list = caMap.get("operate");
|
|
|
|
|
publicAccountId = list.get(1);
|
|
|
|
|
|
|
|
|
|
} else if(itemTitle.contains("\u91c7\u8d2d")){
|
|
|
|
|
List<String> list = caMap.get("purchase");
|
|
|
|
|
publicAccountId = list.get(1);
|
|
|
|
|
|
|
|
|
|
} else if (itemTitle.contains("\u8d28\u91cf")) {
|
|
|
|
|
List<String> list = caMap.get("quality");
|
|
|
|
|
publicAccountId = list.get(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(publicAccountId != ""){
|
|
|
|
|
DomainObject fromDomainObject = DomainObject.newInstance(context, routeId);
|
|
|
|
|
DomainObject toDomainObject = DomainObject.newInstance(context, publicAccountId);
|
|
|
|
|
DomainRelationship domainRelationship = DomainRelationship.connect(context, fromDomainObject, "Route Node", toDomainObject);
|
|
|
|
|
|
|
|
|
|
Map<String, String> map = new HashMap<>();
|
|
|
|
|
map.put("Route Sequence", routeSequence);
|
|
|
|
|
map.put("Assignee Set Due Date","Yes");
|
|
|
|
|
map.put("Template Task", "Yes");
|
|
|
|
|
map.put("Route Action", "Approve");
|
|
|
|
|
map.put("Title", title);
|
|
|
|
|
map.put("Route Instructions", routeInstructions);
|
|
|
|
|
map.put("Parallel Node Procession Rule", "All");
|
|
|
|
|
map.put("Date Offset From", "Route Start Date");
|
|
|
|
|
|
|
|
|
|
domainRelationship.setAttributeValues(context, map);
|
|
|
|
|
}
|
|
|
|
|
} catch (FrameworkException e) {
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<String> getGroupId(Context context){
|
|
|
|
|
String getReplaceInfo = "temp query bus Group * * where 'attribute[Title].value == " + OperatingUserGroup + " || attribute[Title].value == " + ProcurementUserGroup + " || attribute[Title].value == " + QualityUserGroup + "' select id dump |";
|
|
|
|
|
LOGGER.info("getReplaceId ==> " + getReplaceInfo);
|
|
|
|
|