李彤
2022-05-17 e086d26f5ea28d42f78f836d6a8be5c686c1f36d
【委托】【期初修改4月6日开始修改】目标录入相关判断修改
2个文件已修改
60 ■■■■ 已修改文件
force-app/main/default/classes/SetPersonalTargetController.cls 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/SetPersonalTarget.page 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/SetPersonalTargetController.cls
@@ -228,7 +228,7 @@
        // 職位
        if (plist == null) {
            plist = new List<Position>();
            plist.add(new Position('一般', true));
            plist.add(new Position('专员', true));  //20220517 lt SWAG-CD28H3
            plist.add(new Position('高级', true));
            plist.add(new Position('主管', true));
            //20220402 lt SWAG-CD28H3 【委托】【期初修改4月6日开始修改】目标录入相关判断修改 start
@@ -605,7 +605,7 @@
    }
    private List<User> getUserList(List<String> UserInfoList) {//根据上传文件中得本部,省份,担当,职位 得到了user 信息
        String soql = 'select Id, UserInfos__c, Salesdepartment__c, Province__c, Alias, Product_specialist_incharge_product__c,Responsible_for_Products_Concurrently__c, Use_Start_Date__c,'
                      + ' ProfileId, Profile.Name, UserRoleId, UserRole.Name, Sales_Speciality__c, Post__c,Job_Category__c'
                      + ' ProfileId, Profile.Name, UserRoleId, UserRole.Name, Sales_Speciality__c, HR_Post__c,Job_Category__c'
                      + ' from User where IsActive = true and Test_staff__c = false and UserType = \'Standard\' '
                      + ' and Salesdepartment__c <> \'7.能量\' '
                      + ' and UserInfos__c IN :UserInfoList order by Salesdepartment__c, Province__c';
@@ -717,7 +717,7 @@
    // ユーザの検索
    private List<User> getUserList(Boolean searchByDpt, Boolean searchByProvince, Boolean defaultSearch) {
        String soql = 'select Id, Salesdepartment__c, Province__c, Alias, Product_specialist_incharge_product__c,Responsible_for_Products_Concurrently__c, Use_Start_Date__c,'
                      + ' ProfileId, Profile.Name, UserRoleId, UserRole.Name, Sales_Speciality__c, Post__c'
                      + ' ProfileId, Profile.Name, UserRoleId, UserRole.Name, Sales_Speciality__c, HR_Post__c'
                      + ' from User where IsActive = true and Test_staff__c = false and UserType = \'Standard\' '
                      // CHAN-BBLCYP 20190509 LHJ Start
                      + ' and Salesdepartment__c <> \'7.能量\' ';
@@ -766,19 +766,27 @@
        // 職位条件
        List<String> positionNames = new List<String>();
        String s1 = '经理';
        String s2 = '总监';
        for (Position p : plist) {
            if (p.check) {
                positionNames.add(p.positionName);
                //positionNames.add(p.positionName);
                //20220406 lt SWAG-CD28H3 【委托】【期初修改4月6日开始修改】目标录入相关判断修改 start
                if(p.positionName == '经理级'){
                    positionNames.add('副经理');
                    positionNames.add('经理');
                //20220517 lt SWAG-CD28H3  注释
                if(p.positionName == '高级'){
                    positionNames.add('高级专员');
                }else{
                    positionNames.add(p.positionName);
                }
                if(p.positionName == '总监级'){
                    positionNames.add('副部长');
                    positionNames.add('部长');
                    positionNames.add('总监');
                }
                // if(p.positionName == '经理级'){
                //     positionNames.add('副经理');
                //     positionNames.add('经理');
                // }
                // if(p.positionName == '总监级'){
                //     positionNames.add('副部长');
                //     positionNames.add('部长');
                //     positionNames.add('总监');
                // }
                //20220406 lt SWAG-CD28H3 【委托】【期初修改4月6日开始修改】目标录入相关判断修改end
            }
        }
@@ -787,9 +795,29 @@
            soql += ' and (';
            for (Integer i = 0; i < positionNames.size(); i++) {
                if (i == positionNames.size() - 1) {
                    soql += ' Post__c = \'' + positionNames[i] + '\'';
                    //20220517 lt SWAG-CD28H3 Start
                    if(positionNames[i] != '经理级' && positionNames[i] != '总监级'){
                        soql += ' HR_Post__c = \'' + positionNames[i] + '\'';
                    }
                    else if(positionNames[i] == '经理级'){
                        soql += ' HR_Post__c like \'%' + s1 + '%\'';
                    }
                    else if(positionNames[i] == '总监级'){
                        soql += ' HR_Post__c like \'%' + s2 + '%\'';
                    }
                    //20220517 lt SWAG-CD28H3 End
                } else {
                    soql += ' Post__c = \'' + positionNames[i] + '\' or';
                    //20220517 lt SWAG-CD28H3 Start
                    if(positionNames[i] != '经理级' && positionNames[i] != '总监级'){
                        soql += ' HR_Post__c = \'' + positionNames[i] + '\' or';
                    }
                    else if(positionNames[i] == '经理级'){
                        soql += ' HR_Post__c like \'%' + s1 + '%\' or';
                    }
                    else if(positionNames[i] == '总监级'){
                        soql += ' HR_Post__c like \'%' + s2 + '%\' or';
                    }
                    //20220517 lt SWAG-CD28H3 End
                }
            }
            soql += ')';
force-app/main/default/pages/SetPersonalTarget.page
@@ -374,7 +374,7 @@
                    <th width="70px" class="headerRow  booleanColumn">省</th>
                    <th class="headerRow  booleanColumn">角色</th>
                    <th width="70px" class="headerRow  booleanColumn">担当</th>
                    <th width="70px" class="headerRow  booleanColumn">职位</th>
                    <th width="70px" class="headerRow  booleanColumn">HR通用职级</th>  <!-- 20220517 lt SWAG-CD28H3 Update -->
                    <th width="70px" class="headerRow  booleanColumn">负责<br/>产品分类(主)</th>
                    <!--wangweipeng  20210615-->
                    <th width="70px" class="headerRow  booleanColumn">负责<br/>产品分类(兼)</th>
@@ -411,7 +411,7 @@
                        <td class="dataCell">{!dbs.user.Province__c}</td>
                        <td class="dataCell">{!dbs.user.UserRole.Name}</td>
                        <td class="dataCell">{!dbs.user.Alias}</td>
                        <td class="dataCell">{!dbs.user.Post__c}</td>
                        <td class="dataCell">{!dbs.user.HR_Post__c}</td> <!-- 20220517 lt SWAG-CD28H3 Update -->
                        <td class="dataCell" style="word-wrap:break-word;max-width:70px;">{!SUBSTITUTE(dbs.user.Product_specialist_incharge_product__c, ";", "; ")}</td>
                        <!--wangweipeng  20210615-->
                        <td class="dataCell" style="word-wrap:break-word;max-width:70px;">{!SUBSTITUTE(dbs.user.Responsible_for_Products_Concurrently__c, ";", "; ")}</td>