From 00e147ec892cb1e89d0698787a8c60da1014cdb7 Mon Sep 17 00:00:00 2001
From: binxie <137736985@qq.com>
Date: 星期一, 26 六月 2023 17:42:22 +0800
Subject: [PATCH] Community升级
---
force-app/main/default/classes/LexArriveGoodsMainController.cls | 92 ++++++++++++++++++++++++++--------------------
1 files changed, 52 insertions(+), 40 deletions(-)
diff --git a/force-app/main/default/classes/LexArriveGoodsMainController.cls b/force-app/main/default/classes/LexArriveGoodsMainController.cls
index 489086c..d79a1a0 100644
--- a/force-app/main/default/classes/LexArriveGoodsMainController.cls
+++ b/force-app/main/default/classes/LexArriveGoodsMainController.cls
@@ -1,13 +1,13 @@
public without sharing class LexArriveGoodsMainController {
/*****************妞滅储鐢�******************/
//缁忛攢鍟嗕骇鍝佸垎绫�
- public static String agencyProType {get;set;}
+ public static String agencyProType { get; set; }
// public static Consumable_order__c coc { get; set; }
public static String category1 { get; set; }
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;
@@ -21,37 +21,25 @@
// 鐧诲綍鑰呭伐浣滃湴
private static String userWorkLocation;
// 20200904 ljh 姹囨�讳娇鐢� start
- public static Integer Total_num {get; set;}
- public static Integer OrderNumber_arrived {get; set;}
- public static Integer Delivery_detail_count {get; set;}
- public static Integer OrderNumber_notarrive {get; set;}
- public static Integer More_than_seven_days {get; set;}
+ public static Integer Total_num { get; set; }
+ public static Integer OrderNumber_arrived { get; set; }
+ public static Integer Delivery_detail_count { get; set; }
+ public static Integer OrderNumber_notarrive { get; set; }
+ public static Integer More_than_seven_days { get; set; }
@AuraEnabled
- public static Results init(){
+ public static Results init() {
Results results = new Results();
results.isNoteStay = LexUtility.getIsNoteStay();
try {
- List<String> idList = new List<String>();
- idList.add('a2K10000002zHyDEAU');
- idList.add('a2K10000002zIJEEA2');
- idList.add('a2K10000002zK9rEAE');
- idList.add('a2K10000004AKGBEA4');
- idList.add('a2K10000004ALqeEAG');
- idList.add('a2K10000004AMmrEAG');
- idList.add('a2K10000004ANvDEAW');
- idList.add('a2K10000004AOVxEAO');
- idList.add('a2K10000004AOJZEA4');
- idList.add('a2K10000004AOLuEAO');
- idList.add('a2K10000004AOLfEAO');
// 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;
- if(String.isBlank(Useracc[0].UserPro_Type__c)){
+ if (String.isBlank(Useracc[0].UserPro_Type__c)) {
agencyProType = 'ET';
}
// 鑾峰緱璁㈠崟涓�瑙�
@@ -74,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
@@ -83,22 +82,22 @@
Delivery_detail_count = 0;
OrderNumber_notarrive = 0;
More_than_seven_days = 0;
- System.debug('-----1------'+raesList);
- for(Consumable_order__c conorder :raesList){
- if(conorder.Total_num__c != null){
- Total_num += (Integer)conorder.Total_num__c;
+ System.debug('-----1------' + raesList);
+ for (Consumable_order__c conorder : raesList) {
+ if (conorder.Total_num__c != null) {
+ Total_num += (Integer) conorder.Total_num__c;
}
- if(conorder.OrderNumber_arrived__c != null){
- OrderNumber_arrived += (Integer)conorder.OrderNumber_arrived__c;
+ if (conorder.OrderNumber_arrived__c != null) {
+ OrderNumber_arrived += (Integer) conorder.OrderNumber_arrived__c;
}
- if(conorder.Delivery_detail_count__c != null){
- Delivery_detail_count += (Integer)conorder.Delivery_detail_count__c;
+ if (conorder.Delivery_detail_count__c != null) {
+ Delivery_detail_count += (Integer) conorder.Delivery_detail_count__c;
}
- if(conorder.OrderNumber_notarrive__c != null){
- OrderNumber_notarrive += (Integer)conorder.OrderNumber_notarrive__c;
+ if (conorder.OrderNumber_notarrive__c != null) {
+ OrderNumber_notarrive += (Integer) conorder.OrderNumber_notarrive__c;
}
- if(conorder.More_than_seven_days__c != null){
- More_than_seven_days += (Integer)conorder.More_than_seven_days__c;
+ if (conorder.More_than_seven_days__c != null) {
+ More_than_seven_days += (Integer) conorder.More_than_seven_days__c;
}
}
results.agencyProType = agencyProType;
@@ -120,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;
@@ -149,16 +154,23 @@
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)) {
soql += ' and Name like \'%' + String.escapeSingleQuotes(category1.replaceAll('%', '\\%')) + '%\' ';
}
- if(cate2 != null){
+ if (cate2 != null) {
soql += ' and Shipment_date__c = :cate2 ';
}
- soql += ' and Order_ProType__c =\'' + agencyProType +'\'';
+ soql += ' and Order_ProType__c =\'' + agencyProType + '\'';
soql += ' order by Deliver_date__c';
system.debug('====soql:' + soql);
raesList = Database.query(soql);
--
Gitblit v1.9.1