From de9565270a88b0749d17c1961cd41399c8483c96 Mon Sep 17 00:00:00 2001
From: binxie <137736985@qq.com>
Date: 星期一, 26 六月 2023 17:46:45 +0800
Subject: [PATCH] merge
---
force-app/main/default/classes/InventoryController.cls | 51 +++++++++++++++------------------------------------
1 files changed, 15 insertions(+), 36 deletions(-)
diff --git a/force-app/main/default/classes/InventoryController.cls b/force-app/main/default/classes/InventoryController.cls
index bab5998..d5d7694 100644
--- a/force-app/main/default/classes/InventoryController.cls
+++ b/force-app/main/default/classes/InventoryController.cls
@@ -114,10 +114,10 @@
this.sortOrder = new String[]{' ',' ','鈫�'};
String userId = UserInfo.getUserId();
- // String userId = '00510000006xHnrAAE';
+ //String userId = '00510000006k82X';
//String userId = '00510000005QO75';
user Useracc = [select Accountid, Work_Location__c,UserPro_Type__c from user where id =:userId];
- accountid = Useracc.Accountid;
+ accountid = Useracc.accountid;
userWorkLocation = Useracc.Work_Location__c;
agencyProType = Useracc.UserPro_Type__c;
if(String.isBlank(Useracc.UserPro_Type__c)){
@@ -131,19 +131,17 @@
List<ConsumableorderdetailsInfo> boxRecords = new List<ConsumableorderdetailsInfo>();
Map<String,ConsumableorderdetailsInfo> newMidBoxMap = new Map<String,ConsumableorderdetailsInfo>();
Map<String,ConsumableorderdetailsInfo> newMidPieceMap = new Map<String,ConsumableorderdetailsInfo>();
- //DB202302357027 娑堣�楀搧杩芥函绯荤粺鏃犳硶姝e父浣跨敤鈥斺�旂洏鐐归〉闈㈡搷浣滃嵆鎶ラ敊 fy start
//寮�濮嬪埗浣滆〃澶存暟鎹�
- // List<Product2__c> productCount_Unfull_bak = [select Id, Name,Name__c,
- // SFDA_Status__c,Packing_list_manual__c,
- // Asset_Model_No__c
- // from Product2__c
- // //where Estimation_Entry_Possibility__c = '鈼�'
- // where Product_Type__c like : sqlagencyProType
- // ];
- // for(integer i = 0;i < productCount_Unfull_bak.size() ; i++){
- // midMap.put(productCount_Unfull_bak[i].Id, productCount_Unfull_bak[i]);
- // }
- //DB202302357027 娑堣�楀搧杩芥函绯荤粺鏃犳硶姝e父浣跨敤鈥斺�旂洏鐐归〉闈㈡搷浣滃嵆鎶ラ敊 fy end
+ List<Product2__c> productCount_Unfull_bak = [select Id, Name,Name__c,
+ SFDA_Status__c,Packing_list_manual__c,
+ Asset_Model_No__c
+ from Product2__c
+ //where Estimation_Entry_Possibility__c = '鈼�'
+ where Product_Type__c like : sqlagencyProType
+ ];
+ for(integer i = 0;i < productCount_Unfull_bak.size() ; i++){
+ midMap.put(productCount_Unfull_bak[i].Id, productCount_Unfull_bak[i]);
+ }
//鏌ヨ搴撳瓨 杩藉姞杩斿搧搴撳瓨
List<Consumable_order_details2__c> ProductCount_Res = [select Id, Name,Consumable_Product__c,
Bar_Code__c,Consumable_Product__r.Name__c,
@@ -159,28 +157,7 @@
AND Product_Type__c like : sqlagencyProType
AND Arrive_Owner_Work_Location__c =: userWorkLocation
AND Dealer_Info_text__c = :accountName];
- //DB202302357027 娑堣�楀搧杩芥函绯荤粺鏃犳硶姝e父浣跨敤鈥斺�旂洏鐐归〉闈㈡搷浣滃嵆鎶ラ敊 fy start
- //寮�濮嬪埗浣滆〃澶存暟鎹�
- Set<Id> Product2cIdSet = new Set<Id>();
- for(Consumable_order_details2__c con_or_d2item: ProductCount_Res){
- Product2cIdSet.add(con_or_d2item.Consumable_Product__c);
- }
- List<Product2__c> productCount_Unfull_bak = [select Id, Name,Name__c,
- SFDA_Status__c,Packing_list_manual__c,
- Asset_Model_No__c
- from Product2__c
- //where Estimation_Entry_Possibility__c = '鈼�'
- where Id in:Product2cIdSet
- and Product_Type__c like : sqlagencyProType
- ];
- for(integer i = 0;i < productCount_Unfull_bak.size() ; i++){
- midMap.put(productCount_Unfull_bak[i].Id, productCount_Unfull_bak[i]);
- }
- system.debug('productCount_Unfull_bak'+productCount_Unfull_bak.size());
- // String erro='productCount_Unfull_bak:'+productCount_Unfull_bak.size();
- // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, erro));
- //DB202302357027 娑堣�楀搧杩芥函绯荤粺鏃犳硶姝e父浣跨敤鈥斺�旂洏鐐归〉闈㈡搷浣滃嵆鎶ラ敊 fy end
- // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'ProductCount_Res ' + ProductCount_Res.size()));
+ //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'ProductCount_Res ' + ProductCount_Res.size()));
for(Integer i = 0 ; i< ProductCount_Res.size();i++){
//鐒跺悗寰幆CountDel鍋欱ox鍜宲iece2涓猰ap
if(MidMap.containsKey(ProductCount_Res[i].Consumable_Product__c) && ProductCount_Res[i].Box_Piece__c == '鐩�'){
@@ -1028,7 +1005,9 @@
}
//CSV鍑哄姏
public PageReference doClick() {
+ system.debug('Click');
Pagereference pr = page.InventoryCSV;
+ system.debug('data:'+JSON.serialize(consumableorderdetailsRecordserrordummy));
return pr;
}
--
Gitblit v1.9.1