📄 processmanager.java
字号:
returnValue = canForward(systemInfoIn);
systemInfoIn.setTransactCtrl(transactionCtrlValue);
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
isRight = false;
} else
{
ProcessManager_canOut out = (ProcessManager_canOut)returnValue.getData();
if(!out.getCanFlg())
{
super.systemInfoOut.setErrorCode(ErrorCodeSupport.getBusinessError());
messageList.setMessage(null, null, "BS0004680G", 0x80000000);
isRight = false;
}
}
actionStf = ((UserInfo)systemInfoIn.getExtend1()).getStfNo();
actionStfCompanyCd = ((UserInfo)systemInfoIn.getExtend1()).getCompanyCd();
actionDate = getSystemDate();
if(isRight)
{
NodeTblD_selectMaxSubNoIn sIn = new NodeTblD_selectMaxSubNoIn();
sIn.setCompanyCd(companyCd);
sIn.setProcessType(processType);
sIn.setProcessId(processId);
sIn.setProcessNo(processNo);
returnValue = s_NodeTblD_selectMaxSubNo(systemInfoIn, sIn);
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.setMessage(null, null, "BS0002480G", 0x80000000);
isRight = false;
} else
{
NodeTblD_selectMaxSubNoOut selectByOut = (NodeTblD_selectMaxSubNoOut)returnValue.getData();
iCount = selectByOut.getMaxProcessSubNo();
if(iCount == null)
iCount = new BigDecimal(1.0D);
}
}
if(isRight)
if(processStatus.equals("1") || processStatus.equals("Z"))
{
if(nodeStatus.equals(""))
{
if(exclusiveKeyPro == null)
{
ProcessTblD_selectByPKIn dIn = new ProcessTblD_selectByPKIn();
dIn.setCompanyCd(companyCd);
dIn.setProcessType(processType);
dIn.setProcessId(processId);
dIn.setProcessNo(processNo);
returnValue = s_ProcessTblD_selectByPK(systemInfoIn, dIn);
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.setMessage(null, null, "BS0002480G", 0x80000000);
isRight = false;
} else
if(returnValue.getSystemInfoOut().getHitCount() == 0)
{
super.systemInfoOut.setErrorCode(ErrorCodeSupport.getBusinessError());
messageList.setMessage(null, null, "BS0001060G", 0x80000000);
isRight = false;
} else
{
ProcessTblD_selectByPKOut dOut = (ProcessTblD_selectByPKOut)returnValue.getData();
ProcessTbl_st process_St = dOut.getProcessTbl();
exclusiveKeyPro = process_St.getExclusiveKey();
}
}
if(isRight)
{
returnValue = insertNodeTblNew(systemInfoIn, "forward", "start");
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
isRight = false;
}
}
} else
if(nodeStatus.equals("0") || nodeStatus.equals("1") || nodeStatus.equals("2"))
{
returnValue = updateNodeTblBy(systemInfoIn, "forward", "start");
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
isRight = false;
}
}
if(isRight)
{
returnValue = forwardNext(systemInfoIn, null, targetCompanyCd, targetStfNo, iCount);
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
isRight = false;
}
}
} else
if(processStatus.equals("2"))
{
returnValue = getEffetiveStf(systemInfoIn, targetCompanyCd, targetStfNo, replaceTarget);
String effCompanyCd = null;
String effStfNo = null;
String sUsrNode = null;
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
isRight = false;
} else
{
ProcessManager_getEffetiveStfOut out = (ProcessManager_getEffetiveStfOut)returnValue.getData();
effCompanyCd = out.getEffCompanyCd();
effStfNo = out.getEffStfNo();
}
if(isRight)
{
returnValue = getTargetUsrNode(systemInfoIn, effCompanyCd, effStfNo);
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
isRight = false;
} else
{
ProcessManager_getUsrNodeOut out = (ProcessManager_getUsrNodeOut)returnValue.getData();
sUsrNode = out.getStfNode();
}
}
if(isRight)
{
returnValue = updateNodeTblBy(systemInfoIn, "forward", "admit");
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
isRight = false;
}
}
if(isRight && (sUsrNode.equals("1") || sUsrNode.equals("2")))
{
returnValue = forwardNext(systemInfoIn, sUsrNode, effCompanyCd, effStfNo, iCount);
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
isRight = false;
}
}
} else
if(processStatus.equals("3"))
{
OthSysConn other = new OthSysConn();
systemInfoIn.setExtend2(tranBase);
returnValue = other.afterForward(systemInfoIn, xmlMap);
setSystemInfoOut(returnValue.getSystemInfoOut());
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
isRight = false;
}
if(isRight)
{
if(nodeType.equals("after"))
returnValue = updateNodeTblBy(systemInfoIn, "forward", "after");
else
returnValue = updateNodeTblBy(systemInfoIn, "forward", "admit");
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
isRight = false;
}
}
if(isRight && nodeType.equals("after"))
{
returnValue = insertAfterSinkNode(systemInfoIn, nodeId, "sink", iCount, "2");
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
isRight = false;
}
processStatus = "4";
if(isRight)
{
ProcessTblD_updateByPKIn upIn = new ProcessTblD_updateByPKIn();
ProcessTbl_st tblst = new ProcessTbl_st();
tblst.setCompanyCd(companyCd);
tblst.setProcessType(processType);
tblst.setProcessId(processId);
tblst.setProcessNo(processNo);
tblst.setProcessStatus(processStatus);
tblst.setAttachFlg(attachFlg);
tblst.setExclusiveKey(exclusiveKeyPro);
upIn.setProcessTbl(tblst);
returnValue = s_ProcessTblD_updateByPK(systemInfoIn, upIn);
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.setMessage(null, null, "BS0002480G", 0x80000000);
isRight = false;
}
}
}
} else
if(processStatus.equals("4"))
{
if(nodeStatus.equals("3"))
{
returnValue = updateNodeTblBy(systemInfoIn, "forward", "admit");
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.setMessage(null, null, "BS0002480G", 0x80000000);
isRight = false;
}
}
} else
if(processStatus.equals("5") && processType.equals("message"))
{
returnValue = updateNodeTblBy(systemInfoIn, "forward", "message");
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
isRight = false;
}
} else
if(processStatus.equals("5") && processType.equals("info"))
{
returnValue = addAttachFile(systemInfoIn);
if(returnValue.getSystemInfoOut().getErrorCode() != null)
{
messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
isRight = false;
}
}
}
catch(Exception exception)
{
super.log.fatal(super.systemInfoOut.getErrorMessage());
handleException(exception);
}
finally
{
super.systemInfoOut.setExtend1(messageList);
returnValue.setSystemInfoOut(super.systemInfoOut);
if(systemInfoIn.isTransactCtrl())
closeTransaction();
super.log.info("[END]");
return returnCheck(returnValue);
}
}
protected ReturnValue cancel(SystemInfoIn systemInfoIn)
{
ReturnValue returnValue = new ReturnValue();
setLogInfo(systemInfoIn, returnValue.getSystemInfoOut(), "ProcessManager", "cancel");
super.systemInfoOut.setErrorCode(null);
MessageList messageList = new MessageList();
super.log.info("[START]");
try
{
if(systemInfoIn.isTransactCtrl())
{
if(!super.connectDB())
returnCheck(returnValue);
} else
{
backupConnection();
if(systemInfoIn.getConnection() == null)
{
super.systemInfoOut.setErrorCode("EF0101");
super.systemInfoOut.setErrorMessage("no connection handle.");
super.log.fatal("no connection handle.");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -