From d8dc84a3d56df839895f1c417a4d9cbee763d262 Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期五, 03 三月 2023 14:50:59 +0800
Subject: [PATCH] gzw 测试环境代码更新
---
force-app/main/default/classes/InventoryController.cls | 49 ++++++++++++++++++++++++++++++++++++-------------
1 files changed, 36 insertions(+), 13 deletions(-)
diff --git a/force-app/main/default/classes/InventoryController.cls b/force-app/main/default/classes/InventoryController.cls
index d9367bc..bab5998 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 = '00510000006k82X';
+ // String userId = '00510000006xHnrAAE';
//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,17 +131,19 @@
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]);
- }
+ // 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<Consumable_order_details2__c> ProductCount_Res = [select Id, Name,Consumable_Product__c,
Bar_Code__c,Consumable_Product__r.Name__c,
@@ -157,7 +159,28 @@
AND Product_Type__c like : sqlagencyProType
AND Arrive_Owner_Work_Location__c =: userWorkLocation
AND Dealer_Info_text__c = :accountName];
- //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'ProductCount_Res ' + ProductCount_Res.size()));
+ //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()));
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 == '鐩�'){
--
Gitblit v1.9.1