Li Jun
2022-03-24 f127c76b19f5316032d4bed127a1dde710c48d74
force-app/main/default/classes/ConsumTrialController.cls
@@ -15,6 +15,9 @@
    public Boolean showEditButton{get;set;}
    private String case_OR_animal_organLabel{get;set;}
    private String saveType{get;set;}
    public String staticResource {get; set;}
    public String rowListString{set;get;}
    public String EditAWSDataId{set;get;}
    public ConsumTrialController(ApexPages.StandardController stdController) {
        parId = System.currentPageReference().getParameters().get('Id');
@@ -25,6 +28,8 @@
        if (String.isBlank(parId)) {
            parId = stdController.getId();
        }
        PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo('Consum_Apply_Equipment_Set_Detail__c');
        staticResource = JSON.serialize(piIntegration);
    }
    public void init() {
@@ -36,6 +41,7 @@
                        // , DateOfDelivery__c
                        // , ReceivingNoteNo__c
                        , Status__c
                        ,AWS_Data_Id__c
                        // , Asset_loaner_category__c
                        , RA_Status__c
                        , demo_purpose2__c
@@ -63,6 +69,7 @@
            assetFieldApiList.addAll(assetFieldApiSet);
            receivingNoteFieldApiList.addAll(receivingNoteFieldApiSet);
            pageB = new PageBean(rnList[0], assetFieldApiList, receivingNoteFieldApiList);
            rowListString = JSON.serialize(pageB.rowBList);
            showEditButton = (rnList[0].Status__c != '申请中' && rnList[0].Status__c != '取消');
        }
        catch (Exception e) {
@@ -210,10 +217,13 @@
            else if (rnList[0].Status__c == '取消') {
                throw new ControllerUtil.myException('取消的耗材申请书不能保存');
            }
            system.debug('耗材备品明细加密信息:'+JSON.serialize(pageB.rowBList));
            List<Consum_Apply_Equipment_Set_Detail__c> rndList = new List<Consum_Apply_Equipment_Set_Detail__c>();
            for (RowBean rowB : pageB.rowBList) {
                if (rowB.checked) {
                    rowB.rnd.InputCheck__c = true;
                    //rowB.rnd.AWS_Data_Id__c = EditAWSDataId;
                    System.debug('zhj rowB.rnd.AWS_Data_Id__c = '+ rowB.rnd.AWS_Data_Id__c);
                    rndList.add(rowB.rnd);
                }
            }
@@ -408,6 +418,7 @@
                    + String.join(assetFieldApiList, ',')
                    + (assetFieldApiList.size() > 0 ? ',' : '')
                    + String.join(receivingNoteFieldApiList, ',')
                    + ',AWS_Data_Id__c'
                 + ' FROM Consum_Apply_Equipment_Set_Detail__c '
                + ' WHERE Consum_Apply_Equipment_Set__r.Consum_Apply__c = \'' + rn.Id + '\'' + wher
                  + ' AND (Cancel_Select__c = false OR NG_Select_Again__c = true)'
@@ -477,7 +488,7 @@
            // dataConfirmation = rnd1.DataConfirmation__c;
            lineNo = lineNo1 + 1;
            canChangeField = 'Show_demonstration__c, Operation_Type__c, Consum_Start_Date__c';
            canChangeField += ', Case_OR_animal_organ__c, Trial_User__c, Follower_User__c, Spare__c, Comment__c, Degree_Of_Importance__c';
            canChangeField += ',AWS_Data_Id__c, Case_OR_animal_organ__c, Trial_User__c, Follower_User__c, Spare__c, Comment__c, Degree_Of_Importance__c';
            haveAsset = String.isNotBlank(rnd1.Asset__c);
        }