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

📄 processmanager.java

📁 是个执行管理类,里边的方法控制整个系统执行.是整个执行的支持与控制枢纽.
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
                        for(int i = 0; isRight && i < selList.size(); i++)
                        {
                            NodeTblDselectSubByNoList_st node_st = (NodeTblDselectSubByNoList_st)selList.get(i);
                            NodeTblD_updateDelFlgByPKIn updateIn = new NodeTblD_updateDelFlgByPKIn();
                            updateIn.setCompanyCd(companyCd);
                            updateIn.setProcessType(processType);
                            updateIn.setProcessId(processId);
                            updateIn.setProcessNo(processNo);
                            updateIn.setProcessSubNo(node_st.getProcessSubNo());
                            updateIn.setActionStfCompanyCd(actionStfCompanyCd);
                            updateIn.setActionStf(actionStf);
                            updateIn.setActionDate(actionDate);
                            updateIn.setExclusiveKey(node_st.getExclusiveKey());
                            returnValue = s_NodeTblD_updateDelFlgByPK(systemInfoIn, updateIn);
                            if(returnValue.getSystemInfoOut().getErrorCode() != null)
                            {
                                messageList.setMessage(null, null, "BS0002480G", 0x80000000);
                                isRight = false;
                            }
                        }

                    }
                }
            if(isRight)
            {
                BigDecimal processSubNoAtta = processSubNo;
                if(processType.equals("info"))
                    processSubNoAtta = new BigDecimal(1.0D);
                AttachTblD_selectBySubNoIn selAttIn = new AttachTblD_selectBySubNoIn();
                selAttIn.setCompanyCd(companyCd);
                selAttIn.setProcessType(processType);
                selAttIn.setProcessId(processId);
                selAttIn.setProcessNo(processNo);
                selAttIn.setProcessSubNo(processSubNoAtta);
                returnValue = s_AttachTblD_selectBySubNo(systemInfoIn, selAttIn);
                if(returnValue.getSystemInfoOut().getErrorCode() != null)
                {
                    messageList.setMessage(null, null, "BS0002480G", 0x80000000);
                    isRight = false;
                } else
                if(returnValue.getSystemInfoOut().getHitCount() != 0)
                {
                    AttachTblD_selectBySubNoOut attout = (AttachTblD_selectBySubNoOut)returnValue.getData();
                    ArrayList attList = attout.getAttachTblList();
                    for(int i = 0; isRight && i < attList.size(); i++)
                    {
                        AttachTblList_st attst = (AttachTblList_st)attList.get(i);
                        AttachTblD_updateDelFlgByPKIn upIn = new AttachTblD_updateDelFlgByPKIn();
                        upIn.setCompanyCd(companyCd);
                        upIn.setProcessType(processType);
                        upIn.setProcessId(processId);
                        upIn.setProcessNo(processNo);
                        upIn.setProcessSubNo(processSubNoAtta);
                        upIn.setProcessFileNo(attst.getProcessFileNo());
                        upIn.setExclusiveKey(attst.getExclusiveKey());
                        returnValue = s_AttachTblD_updateDelFlgByPK(systemInfoIn, upIn);
                        if(returnValue.getSystemInfoOut().getErrorCode() != null)
                        {
                            messageList.setMessage(null, null, "BS0002480G", 0x80000000);
                            isRight = false;
                        }
                    }

                }
            }
            if(isRight)
                delFlg = new BigDecimal(1.0D);
        }
        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 canForward(SystemInfoIn systemin)
    {
        ReturnValue returnValue = new ReturnValue();
        super.systemInfoOut.setErrorCode(null);
        MessageList messageList = new MessageList();
        try
        {
            if(super.systemInfoIn.isTransactCtrl())
            {
                if(!super.connectDB())
                    returnCheck(returnValue);
            } else
            {
                backupConnection();
                if(super.systemInfoIn.getConnection() == null)
                {
                    super.systemInfoOut.setErrorCode("EF0101");
                    super.systemInfoOut.setErrorMessage("no connection handle.");
                    super.log.fatal("no connection handle.");
                    returnCheck(returnValue);
                }
            }
            if(super.systemInfoIn.isTransactCtrl() && super.systemInfoIn.getConnection() != null)
                super.systemInfoIn.setConnection(new GemplanetConnection(super.systemInfoIn.getConnection()));
            ProcessManager_canOut out = new ProcessManager_canOut();
            boolean canFlag = false;
            if(processType.equals("admit"))
            {
                if(nodeStatus.equals("5") || nodeStatus.equals("3") || nodeStatus.equals("4") || nodeStatus.equals("") || nodeStatus.equals("0") || nodeStatus.equals("1") || nodeStatus.equals("2"))
                    canFlag = true;
            } else
            if(processType.equals("message"))
            {
                if(nodeStatus.equals("") || nodeStatus.equals("0") || nodeStatus.equals("3"))
                    canFlag = true;
            } else
            if(processType.equals("info"))
            {
                ProcessManager_getDataIn in = new ProcessManager_getDataIn();
                InfoTransaction infom = (InfoTransaction)tranBase;
                String sUsrNode = null;
                int sysdate = DateSupport.getYYYYMMDD(new Date());
                returnValue = getTargetUsrNode(super.systemInfoIn, targetCompanyCd, targetStfNo);
                ProcessManager_getUsrNodeOut sout = (ProcessManager_getUsrNodeOut)returnValue.getData();
                sUsrNode = sout.getStfNode();
                if(sUsrNode != null && !sUsrNode.equals("0") && (nodeStatus.equals("") || infom.getEndDate().intValue() > sysdate))
                    canFlag = true;
            }
            out.setCanFlg(canFlag);
            returnValue.setData(out);
        }
        catch(Exception exception)
        {
            super.log.fatal(super.systemInfoOut.getErrorMessage());
            handleException(exception);
        }
        finally
        {
            super.systemInfoOut.setExtend1(messageList);
            returnValue.setSystemInfoOut(super.systemInfoOut);
            if(super.systemInfoIn.isTransactCtrl())
                closeTransaction();
            super.log.info("[END]");
            return returnCheck(returnValue);
        }
    }

    protected ReturnValue canCancel(SystemInfoIn systemInfoIn)
    {
        ReturnValue returnValue = new ReturnValue();
        setLogInfo(systemInfoIn, returnValue.getSystemInfoOut(), "ProcessManager", "canCancel");
        super.systemInfoOut.setErrorCode(null);
        super.log.info("[START]");
        MessageList messageList = new MessageList();
        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);
                }
            }
            if(systemInfoIn.isTransactCtrl() && systemInfoIn.getConnection() != null)
                systemInfoIn.setConnection(new GemplanetConnection(systemInfoIn.getConnection()));
            ProcessManager_canOut out = new ProcessManager_canOut();
            boolean canFlag = false;
            boolean isRight = true;
            String processSta = null;
            if(!nodeStatus.equals("9"))
                isRight = false;
            if(isRight && !processType.equals("admit"))
                isRight = false;
            if(isRight)
                if(nodeType.equals("start"))
                    processSta = "start";
                else
                if(nodeType.equals("admit-usr") || nodeType.equals("admit-sec") || nodeType.equals("admit-comp"))
                    processSta = "admit";
                else
                    isRight = false;
            NodeTbl_st nownodest = new NodeTbl_st();
            if(isRight)
            {
                NodeTblD_selectMaxNoByNodeTypeIn sIn = new NodeTblD_selectMaxNoByNodeTypeIn();
                sIn.setCompanyCd(companyCd);
                sIn.setProcessType(processType);
                sIn.setProcessId(processId);
                sIn.setProcessNo(processNo);
                sIn.setNodeId(nodeId);
                sIn.setNodeType(nodeType);
                sIn.setNodeKind(nodeKind);
                sIn.setTargetCompanyCd(targetCompanyCd);
                sIn.setTargetStfNo(targetStfNo);
                sIn.setRoleId(roleId);
                sIn.setSecCd(targetSecCd);
                sIn.setLevelTop(levelTop);
                sIn.setLevelBottom(levelBottom);
                returnValue = s_NodeTblD_selectMaxNoByNodeType(systemInfoIn, sIn);
                if(returnValue.getSystemInfoOut().getErrorCode() != null)
                {
                    messageList.setMessage(null, null, "BS0002480G", 0x80000000);
                    isRight = false;
                } else
                {
                    NodeTblD_selectMaxNoByNodeTypeOut selectByPKOut = (NodeTblD_selectMaxNoByNodeTypeOut)returnValue.getData();
                    BigDecimal maxProcessNo = selectByPKOut.getMaxProcessSubNo();
                    if(maxProcessNo == null || processSubNo.compareTo(maxProcessNo) < 0)
                        isRight = false;
                }
            }
            if(isRight)
            {
                NodeTblD_selectByMaxSubIn sIn = new NodeTblD_selectByMaxSubIn();
                sIn.setCompanyCd(companyCd);
                sIn.setProcessType(processType);
                sIn.setProcessId(processId);
                sIn.setProcessNo(processNo);
                returnValue = s_NodeTblD_selectByMaxSub(systemInfoIn, sIn);
                if(returnValue.getSystemInfoOut().getErrorCode() != null)
                {
                    messageList.setMessage(null, null, "BS0002480G", 0x80000000);
                    isRight = false;
                }
                if(isRight)
                {
                    NodeTblD_selectByMaxSubOut selectOut = (NodeTblD_selectByMaxSubOut)returnValue.getData();
                    nownodest.setProcessSubNo(selectOut.getProcessSubNo());
                    nownodest.setNodeId(selectOut.getNodeId());
                    nownodest.setNodeType(selectOut.getNodeType());
                    nownodest.setNodeKind(selectOut.getNodeKind());
                    nownodest.setTargetCompanyCd(selectOut.getTargetCompanyCd());
                    nownodest.setTargetStfNo(selectOut.getTargetStfNo());
                    nownodest.setRoleId(selectOut.getRoleId());
                    nownodest.setSecCd(selectOut.getSecCd());
                    nownodest.setLevelTop(selectOut.getLevelTop());
                    nownodest.setLevelBottom(selectOut.getLevelBottom());
                    nownodest.setReplaceTarget(selectOut.getReplaceTarget());
                    if(selectOut.getNodeKind().equals("5"))
                    {
                        NodeTblD_selectByPKIn sNodeIn = new NodeTblD_selectByPKIn();
                        sNodeIn.setCompanyCd(companyCd);
                        sNodeIn.setProcessType(processType);
                        sNodeIn.setProcessId(processId);
                        sNodeIn.setProcessNo(processNo);
                        sNodeIn.setProcessSubNo(nownodest.getProcessSubNo().add(new BigDecimal(-1D)));
                        returnValue = s_NodeTblD_selectByPK(systemInfoIn, sNodeIn);
                        if(returnValue.getSystemInfoOut().getErrorCode() != null)
                        {
                            messageList.setMessage(null, null, "BS0002480G", 0x80000000);
                            isRight = false;
                        }
     

⌨️ 快捷键说明

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