⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 processmanager.java

📁 是个执行管理类,里边的方法控制整个系统执行.是整个执行的支持与控制枢纽.
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
        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.");
                    returnCheck(returnValue);
                }
            }
            BigDecimal iCount = null;
            boolean isRight = true;
            boolean transactionCtrlValue = systemInfoIn.isTransactCtrl();
            systemInfoIn.setTransactCtrl(false);
            returnValue = canBack(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, "BS0004683G", 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
                if(returnValue.getSystemInfoOut().getHitCount() == 0)
                {
                    iCount = new BigDecimal(1.0D);
                } else
                {
                    NodeTblD_selectMaxSubNoOut selectByPKOut = (NodeTblD_selectMaxSubNoOut)returnValue.getData();
                    iCount = selectByPKOut.getMaxProcessSubNo();
                }
            }
            if(isRight && !nodeType.equals("after"))
            {
                returnValue = getBackData(systemInfoIn);
                if(returnValue.getSystemInfoOut().getErrorCode() != null)
                {
                    messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
                    isRight = false;
                }
                if(isRight)
                {
                    ProcessManager_getBackDataOut out = (ProcessManager_getBackDataOut)returnValue.getData();
                    BigDecimal backProcessNo = out.getBackProcessNo();
                    String sUsrNode = out.getSUsrNode();
                    BigDecimal iCpSubNo = out.getICpSubNo();
                    if(iCpSubNo.compareTo(backProcessNo) < 0)
                        iCpSubNo = backProcessNo;
                    returnValue = backNext(systemInfoIn, "admit", iCpSubNo, sUsrNode, iCount, backProcessNo);
                    if(returnValue.getSystemInfoOut().getErrorCode() != null)
                    {
                        messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
                        isRight = false;
                    }
                }
            } else
            if(isRight)
            {
                OthSysConn other = new OthSysConn();
                systemInfoIn.setExtend2(tranBase);
                returnValue = other.afterBack(systemInfoIn, xmlMap);
                setSystemInfoOut(returnValue.getSystemInfoOut());
                if(returnValue.getSystemInfoOut().getErrorCode() != null)
                {
                    messageList.addAll((MessageList)returnValue.getSystemInfoOut().getExtend1());
                    isRight = false;
                }
                if(isRight)
                {
                    BigDecimal backProcessNo = new BigDecimal(1.0D);
                    NodeTblD_selectByPKIn selIn = new NodeTblD_selectByPKIn();
                    selIn.setCompanyCd(companyCd);
                    selIn.setProcessType(processType);
                    selIn.setProcessId(processId);
                    selIn.setProcessNo(processNo);
                    selIn.setProcessSubNo(new BigDecimal(1.0D));
                    returnValue = s_NodeTblD_selectByPK(systemInfoIn, selIn);
                    if(returnValue.getSystemInfoOut().getErrorCode() != null)
                    {
                        messageList.setMessage(null, null, "BS0002480G", 0x80000000);
                        isRight = false;
                    } else
                    {
                        NodeTblD_selectByPKOut selOut = (NodeTblD_selectByPKOut)returnValue.getData();
                        NodeTbl_st nodest = selOut.getNodeTbl();
                        NodeTblD_selectMaxNoByNodeTypeIn maxIn = new NodeTblD_selectMaxNoByNodeTypeIn();
                        maxIn.setCompanyCd(companyCd);
                        maxIn.setProcessType(processType);
                        maxIn.setProcessId(processId);
                        maxIn.setProcessNo(processNo);
                        maxIn.setNodeId(nodest.getNodeId());
                        maxIn.setNodeType(nodest.getNodeType());
                        maxIn.setNodeKind(nodest.getNodeKind());
                        maxIn.setTargetCompanyCd(nodest.getTargetCompanyCd());
                        maxIn.setTargetStfNo(nodest.getTargetStfNo());
                        maxIn.setRoleId(nodest.getRoleId());
                        maxIn.setSecCd(nodest.getSecCd());
                        maxIn.setLevelTop(nodest.getLevelTop());
                        maxIn.setLevelBottom(nodest.getLevelBottom());
                        returnValue = s_NodeTblD_selectMaxNoByNodeType(systemInfoIn, maxIn);
                        if(returnValue.getSystemInfoOut().getErrorCode() != null)
                        {
                            messageList.setMessage(null, null, "BS0002480G", 0x80000000);
                            isRight = false;
                        } else
                        {
                            NodeTblD_selectMaxNoByNodeTypeOut maxOut = (NodeTblD_selectMaxNoByNodeTypeOut)returnValue.getData();
                            backProcessNo = maxOut.getMaxProcessSubNo();
                        }
                    }
                    returnValue = backNext(systemInfoIn, "AFTER", backProcessNo, null, iCount, backProcessNo);
                    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 delete(SystemInfoIn systemInfoIn)
    {
        ReturnValue returnValue = new ReturnValue();
        setLogInfo(systemInfoIn, returnValue.getSystemInfoOut(), "delete", "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.");
                    returnCheck(returnValue);
                }
            }
            BigDecimal iCount = null;
            boolean isRight = true;
            boolean transactionCtrlValue = systemInfoIn.isTransactCtrl();
            systemInfoIn.setTransactCtrl(false);
            returnValue = canDelete(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, "BS0004684G", 0x80000000);
                    isRight = false;
                }
            }
            actionStf = ((UserInfo)systemInfoIn.getExtend1()).getStfNo();
            actionStfCompanyCd = ((UserInfo)systemInfoIn.getExtend1()).getCompanyCd();
            actionDate = getSystemDate();
            if(isRight)
            {
                ProcessTblD_updateDelFlgByPKIn dIn = new ProcessTblD_updateDelFlgByPKIn();
                dIn.setCompanyCd(companyCd);
                dIn.setProcessType(processType);
                dIn.setProcessId(processId);
                dIn.setProcessNo(processNo);
                dIn.setExclusiveKey(exclusiveKeyPro);
                returnValue = s_ProcessTblD_updateDelFlgByPK(systemInfoIn, dIn);
                if(returnValue.getSystemInfoOut().getErrorCode() != null)
                {
                    messageList.setMessage(null, null, "BS0002480G", 0x80000000);
                    isRight = false;
                }
            }
            if(isRight)
                if(processType.equals("admit") || processType.equals("message"))
                {
                    NodeTblD_updateDelFlgByPKIn nodeup = new NodeTblD_updateDelFlgByPKIn();
                    nodeup.setCompanyCd(companyCd);
                    nodeup.setProcessType(processType);
                    nodeup.setProcessId(processId);
                    nodeup.setProcessNo(processNo);
                    nodeup.setProcessSubNo(processSubNo);
                    nodeup.setActionStfCompanyCd(actionStfCompanyCd);
                    nodeup.setActionStf(actionStf);
                    nodeup.setActionDate(actionDate);
                    nodeup.setExclusiveKey(exclusiveKeyNode);
                    returnValue = s_NodeTblD_updateDelFlgByPK(systemInfoIn, nodeup);
                    if(returnValue.getSystemInfoOut().getErrorCode() != null)
                    {
                        messageList.setMessage(null, null, "BS0002480G", 0x80000000);
                        isRight = false;
                    }
                } else
                if(processType.equals("info"))
                {
                    NodeTblD_selectSubByNoIn selIn = new NodeTblD_selectSubByNoIn();
                    selIn.setCompanyCd(companyCd);
                    selIn.setProcessType(processType);
                    selIn.setProcessId(processId);
                    selIn.setProcessNo(processNo);
                    selIn.setProcessSubNo(new BigDecimal(0.0D));
                    returnValue = s_NodeTblD_selectSubByNo(systemInfoIn, selIn);
                    if(returnValue.getSystemInfoOut().getErrorCode() != null)
                    {
                        messageList.setMessage(null, null, "BS0002480G", 0x80000000);
                        isRight = false;
                    } else
                    if(returnValue.getSystemInfoOut().getHitCount() != 0)
                    {
                        NodeTblD_selectSubByNoOut out = (NodeTblD_selectSubByNoOut)returnValue.getData();
                        ArrayList selList = out.getNodeTblDselectSubByNoList();
                        ArrayList outList = new ArrayList();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -