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/NFM115Controller.cls | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/force-app/main/default/classes/NFM115Controller.cls b/force-app/main/default/classes/NFM115Controller.cls
index 3b2b880..81367f0 100644
--- a/force-app/main/default/classes/NFM115Controller.cls
+++ b/force-app/main/default/classes/NFM115Controller.cls
@@ -58,7 +58,8 @@
BatchIF_Log__c rowData = null;
try {
List<Sample_order_list__c> samList = [select Id, AgentCode__c, DeliveryAddress__c, DeliveryContact__c, DeliveryPhone__c, Account__c,
- Account__r.City_Master__r.Level2_Sys_No__c
+ //Account__r.City_Master__r.name,Account__r.City_Master__c,
+ city__c,province__c
from Sample_order_list__c where Id IN:samIds];
List<Sample_order_list_detail__c> samDetailList = [select id, ItemCode__c, ItemQuantity__c, Sample_order_list__c
from Sample_order_list_detail__c where Sample_order_list__c IN:samIds];
@@ -70,7 +71,22 @@
sample.DeliveryAddress = sam.DeliveryAddress__c;
sample.DeliveryContact = sam.DeliveryContact__c;
sample.DeliveryPhone = sam.DeliveryPhone__c;
- sample.AreaCode = sam.Account__r.City_Master__r.Level2_Sys_No__c;
+ //modify by lyh 鍔炰簨澶勮璐ф帴鍙e競淇敼 2022/7/15 start
+ /*if (String.isBlank(sam.Account__r.City_Master__c)) {
+ //sample.AreaCode = null;
+ }else {
+ sample.AreaCode = sam.Account__r.City_Master__r.name.substring(0,sam.Account__r.City_Master__r.name.length()-1);
+ }*/
+ // sample.AreaCode = sam.Account__r.City_Master__r.name;
+ //琛ュ~鐨勫湴鐞嗕俊鎭�
+ String city = sam.city__c;
+ if (sam.province__c.contains('甯�')) {
+ sample.AreaCode = sam.province__c.substring(0,sam.province__c.length()-1);
+ } else {
+ sample.AreaCode = sam.city__c.substring(0,sam.city__c.length()-1);
+ }
+ //modify by lyh 鍔炰簨澶勮璐ф帴鍙e競淇敼 2022/7/15 end
+
sample.Detail = new List<Detail>();
samples.Sample.add(sample);
for(Sample_order_list_detail__c samDetail : samDetailList){
--
Gitblit v1.9.1