zoukankan      html  css  js  c++  java
  • How to Compare two layer’s object: Get AOT objects both modified in USR & SL1 layer

    static void CompareJob(Args _args)
    {
        UtilElements utilElements;
        UtilElements_Job utilElementsJob;
        UtilElements_Job utilElementsJob_usr;
        UtilElements_Job utilElementsJob_sl1;
        ;
     
        delete_from utilElementsJob;
        Insert_Recordset utilElementsJob(utilLevel, recordType, parentId, name)
            select utilLevel, recordType, parentId, name from utilElements
                where utilElements.utilLevel == UtilEntryLevel::usr || utilElements.utilLevel == UtilEntryLevel::sl1;
        info("Imported completed!");
     
        while select utilElementsJob_usr join utilElementsJob_sl1
            where utilElementsJob_usr.utilLevel == UtilEntryLevel::usr
            && utilElementsJob_sl1.utilLevel == UtilEntryLevel::sl1
            && utilElementsJob_usr.name == utilElementsJob_sl1.name
            // && utilElementsJob_usr.parentId == 0 && utilElementsJob_sl1.parentId == 0
            &&
            (
                (utilelementsJob_usr.recordType == UtilElementType::Class && utilelementsJob_sl1.recordType == UtilElementType::Class)
                ||
                (utilelementsJob_usr.recordType == UtilElementType::Form && utilelementsJob_sl1.recordType == UtilElementType::Form)
                ||
                (utilelementsJob_usr.recordType == UtilElementType::Table && utilelementsJob_sl1.recordType == UtilElementType::Table)
            )
            {
                info(utilElementsJob_usr.name);
            }
    }
    How it works:

    1. There is one special table in AOT\System Documentation\Tables\UtilElements, firstly, create a similar table UtilElements_Job with those fields: utilLevel(Enum: UtilEntryLevel), recordType(Enum: UtilElementType), parentId(int), name(EDT: Name)

    2. import data from UtilElements table into new table UtilElements_Job

    Bcs it’s very slow when querying the UtilElements table. (I cannot find the UtilElements table in AOT Data Dictionary tables folder, Maybe it is a system table, a file-based table, or a queried table…)

    3. while select…

  • 相关阅读:
    第七届河南省赛F.Turing equation(模拟)
    第八届acm省赛 A挑战密室(模拟)
    展开字符串(dfs)
    排名(水题)
    Identity Card(水题)
    Dropping Balls (二叉树+思维)
    SQL学习——IN运算符
    SQL学习——BETWEEN运算符
    SQL学习——LIKE运算符
    【数字图像处理】灰度转换算法
  • 原文地址:https://www.cnblogs.com/aot/p/1900140.html
Copyright © 2011-2022 走看看