张宇恒
2022-12-23 ec47f5ab5923a315bf22e0df5af7371e9668589e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
public with sharing class taskAlertController {
    public Integer myTaskNumber { get; set; }
    public Integer myAllTaskNumber { get; set; }
    public Integer subTaskNumber { get; set; }
    public Integer UnfinishedTaskNumber { get; set; } 
    //2021-05-19 招投标项目--页面提醒  mzy  start
    public Integer myTBCNumber { get; set; }
    public Integer myTBRNumber { get; set; }
    public Integer myTBBNumber { get; set; }
    //2021-05-19 招投标项目-- 页面提醒 mzy  end
    //2021-11-09 SWAG-C8KCZZ  mzy  start
    public Boolean isTwoSOne {get;set;}
    public Integer OppWithoutConformNumber {get;set;}
    //2021-11-09  SWAG-C8KCZZ mzy  end
 
    public Integer feedbackNumber{ get; set; } // 2021-11-04 yjk 待反馈
    public Integer OverFeedbackNumber{ get; set; } // 2021-11-17 mzy 反馈Over
    //2021-11-23 mzy 共通平台项目-首页修改  start
    public Boolean isShowInquiry {get;set;}
    public Integer InquiryNumber{ get; set; } 
    //2021-11-23 mzy 共通平台项目-首页修改  end
 
    //2022-4-19 yjk FSE共通平台项目 start
    public Integer InquiryNumberFSE{ get; set; } 
    //2022-4-19 yjk FSE共通平台项目 end
 
    //2022-3-17 yjk 根据简档显示任务提醒
    public Boolean isShowTask{get;set;}
    public String proId{get;set;}
 
    public taskAlertController() {
    }
    public PageReference init() {
        //2022-3-17 yjk 根据简档显示任务提醒
        proId = UserInfo.getProfileId();
        if(UserInfo.getProfileId() == System.Label.ProfileId_OBA1zbjd ){
            isShowTask = false;
        }else{
            isShowTask = true;
        }
        Date today = Date.today();
        Date firstDate = Date.newInstance(today.year(), today.month(), 1);
 
        //2021-09-28  mzy  任务管理改善  start
        taskManageController.Task  allTask =
            taskManageController.getCurrentTask(null, null, '01 分配', null, null, null,null,
                                                null, null, null, '01 分配', null , null, null,null);
        system.debug('allTask:' + allTask.myTasks.size());
        //2021.9.18 pk statr
        taskManageController.Task  UnfinishedTasks =
            taskManageController.getCurrentTask(null, null, '02 接受', null, null, null,null,
                                                null, null, null, '02 接受', null , null, null,null);
        //2021-09-28  mzy  任务管理改善  end
        system.debug('UnfinishedTasks:' + UnfinishedTasks.myTasks.size());
        //2021.9.18 pk end
        myTaskNumber = allTask.myTasks == null ? 0 : allTask.myTasks.size();
        subTaskNumber = allTask.subTasks == null ? 0 : allTask.subTasks.size();
 
        //2021.9.18 增加未完成任务数量显示 pk statr
        unfinishedTaskNumber = UnfinishedTasks.myTasks == null ? 0 : UnfinishedTasks.myTasks.size();
        //2021.9.18 增加未完成任务数量显示 pk end
 
        // taskManageController.Task  myallTask =
        //     taskManageController.getMyTask(null, null,
        //                                    '01 分配', null,
        //                                    null, null);
        // myAllTaskNumber = myallTask.myTasks == null ? 0 : myallTask.myTasks.size();
 
        //2021-05-19 招投标项目--页面提醒  mzy  start
        TenderManageController.TenderInformation MyTender = 
            TenderManageController.getCurrentTenderInformation();
        system.debug('MyTender--TBC:'+MyTender.MyTBCTender.size());    
        system.debug('MyTender--TBR:'+MyTender.MyTBRTender.size());    
        system.debug('MyTender--TBB:'+MyTender.MyTBBTender.size());    
        //待确认的招投标项目
        myTBCNumber =  MyTender.MyTBCTender.size();
        //待关联询价的招投标项目
        myTBRNumber =  MyTender.MyTBRTender.size();
        //待应标的招投标项目
        myTBBNumber =  MyTender.MyTBBTender.size();
        //2021-05-19 招投标项目-- 页面提醒 mzy  end
 
        //2021-11-04 yjk 待反馈任务 start
                //2021-09-28  mzy  任务管理改善  start
        taskFeedbackController.Task  allFeedbackTask =
            taskFeedbackController.getFeedbackTask(null, null, null, null, null, null,null,
                                                null, null, null, null, null , null, null,null);
        feedbackNumber = allFeedbackTask.myTasks == null ? 0 : allFeedbackTask.myTasks.size();
        //2021-11-04 yjk 待反馈任务 end 
 
        //2021-11-17  mzy  任务管理改善  start
        //已反馈的任务
        List<Task__c> OverFeedbackTaskList = taskFeedbackController.getOverFeedbackTask();
        OverFeedbackNumber = OverFeedbackTaskList == null ? 0 : OverFeedbackTaskList.size();
        //2021-11-17  mzy  任务管理改善  end
 
 
        //2021-11-08 mzy  SWAG-C8KCZZ start
        AgencyOpportunityManageCotroller.AgencyOpportunityView AOView = 
            AgencyOpportunityManageCotroller.getCurrentAgencyOpportunity();
            if(AOView.isShow){
                this.isTwoSOne = AOView.isShow;
                this.OppWithoutConformNumber = AOView.AgencyOpportunityList.size();
            }else{
                this.isTwoSOne = false;
                this.OppWithoutConformNumber = 0;
            }
        //2021-11-08 mzy  SWAG-C8KCZZ  end
        //2021-11-23 mzy 共通平台项目-首页修改  start      
 
        //2022-4-19 yjk SWAG-CBUB2W start
        List<String> profileIdList = new List<String>();
        profileIdList.add(System.Label.ProfileId_2S1);
        profileIdList.add(System.Label.ProfileIdN_2S1);
        profileIdList.add(System.Label.ProfileId_2S4);
        profileIdList.add(System.Label.ProfileId_2S4_Chief);
        profileIdList.add(System.Label.ProfileId_2S5);
        profileIdList.add(System.Label.ProfileId_2S6);
        profileIdList.add(System.Label.ProfileId_2S8);
        profileIdList.add(System.Label.ProfileId_2S10);
 
        if( profileIdList.contains(UserInfo.getProfileId())){
            //2022-4-22 yjk 修改查询逻辑
            List<Inquiry_form__c> InquiryNumberFSEList = [select id from Inquiry_form__c where Service_Status__c = '01.未跟进' and     FSE_Owner__c =:UserInfo.getUserId()];
            InquiryNumberFSE = InquiryNumberFSEList.size();
        }
            
        LeadIntentionController LeadIntController = new LeadIntentionController();
        LeadIntController.init();
        Integer pclCount = LeadIntController.pclCount;
        system.debug('pclCount--------------------'+pclCount);
        if(pclCount>0){
            InquiryNumber = pclCount;
            isShowInquiry = true;
        }else{
            isShowInquiry = false;
            InquiryNumber = 0;
        }
        
        //2022-4-19 yjk SWAG-CBUB2W end
        //2021-11-23 mzy 共通平台项目-首页修改  end 
        
        return null;
    }
}