binxie
2023-06-26 dd004276162a2bf9d042ff0aaa569dc30a95d827
force-app/main/default/classes/LexArriveGoodsMainController.cls
@@ -7,7 +7,7 @@
    private static String cate1ForSort = null;
    private static Date cate2ForSort = Date.today();
    private static Date cate2 = Date.today();
    private static String[] columus = new String[]{ 'Product2__c.Name'};
    private static String[] columus = new List<String>{ 'Product2__c.Name' };
    // 产品 ID
    private static String ESetId = '';
    private static String accountid = null;
@@ -34,8 +34,8 @@
        try {
            // coc = new Consumable_order__c();
            String userId = UserInfo.getUserId();
            List<user> Useracc = New List<user>();
            Useracc = [select accountid, Work_Location__c,UserPro_Type__c from user where id =:userId];
            List<user> Useracc = new List<user>();
            Useracc = [SELECT accountid, Work_Location__c, UserPro_Type__c FROM user WHERE id = :userId];
            accountid = Useracc[0].accountid;
            userWorkLocation = Useracc[0].Work_Location__c;
            agencyProType = Useracc[0].UserPro_Type__c;
@@ -62,7 +62,18 @@
            for (String s : column) {
                soql += ',' + s;
            }
            soql += ' from Consumable_order__c where Order_type__c = \''+'订单'+'\' and  recordtypeid =\'' + System.Label.RT_ConOrder_Delivery + '\' and Dealer_Info__c =\'' + accountid +'\' and Order_ProType__c =\'' + agencyProType +'\' and   (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_Owner_WorkLocal__c = \'' + userWorkLocation + '\' and showFalseNotshowTrue__c = false order by Deliver_date__c'; //
            soql +=
                ' from Consumable_order__c where Order_type__c = \'' +
                '订单' +
                '\' and  recordtypeid =\'' +
                System.Label.RT_ConOrder_Delivery +
                '\' and Dealer_Info__c =\'' +
                accountid +
                '\' and Order_ProType__c =\'' +
                agencyProType +
                '\' and   (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) and Order_Owner_WorkLocal__c = \'' +
                userWorkLocation +
                '\' and showFalseNotshowTrue__c = false order by Deliver_date__c'; //
            // soql = 'select id,name,ContractNo__c,Total_num__c,OrderNumber_arrived__c,Delivery_detail_count__c,OrderNumber_notarrive__c,More_than_seven_days__c,Shipment_date__c,First_Delivery__c from Consumable_order__c where id in :idList';
            raesList = Database.query(soql);
            //20200904 ljh add start
@@ -108,7 +119,13 @@
    }
    @AuraEnabled
    public static Results searchConsumableorderdetails(String category1Str, Date cate2Str, String accountidStr, String userWorkLocationStr, String agencyProTypeStr){
    public static Results searchConsumableorderdetails(
        String category1Str,
        Date cate2Str,
        String accountidStr,
        String userWorkLocationStr,
        String agencyProTypeStr
    ) {
        Results results = new Results();
        category1 = category1Str;
        cate2 = cate2Str;
@@ -137,7 +154,14 @@
            for (String s : column) {
                soql += ',' + s;
            }
            soql += ' from Consumable_order__c where Order_type__c = \''+'订单'+'\' and  recordtypeid =\'' + System.Label.RT_ConOrder_Delivery + '\' and Dealer_Info__c =\'' + accountid +'\' and  (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) ';
            soql +=
                ' from Consumable_order__c where Order_type__c = \'' +
                '订单' +
                '\' and  recordtypeid =\'' +
                System.Label.RT_ConOrder_Delivery +
                '\' and Dealer_Info__c =\'' +
                accountid +
                '\' and  (OrderNumber_notarrive__c > 0 or Delivery_detail_count__c >0) ';
            soql += 'and Order_Owner_WorkLocal__c = \'' + userWorkLocation + '\' ';
            soql += 'and showFalseNotshowTrue__c = false';
            if (!String.isBlank(category1)) {