| New file |
| | |
| | | global class ASOTDeleteRealBatch implements Database.Batchable<sObject>,Database.Stateful { |
| | | public String query; |
| | | private BatchIF_Log__c iflog; |
| | | global ASOTDeleteRealBatch() { |
| | | this.query = query; |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | system.debug('执行start'); |
| | | iflog = new BatchIF_Log__c(); |
| | | iflog.Type__c = 'PushNotification'; |
| | | iflog.Log__c = 'CoverageTargetHPBatch start\n'; |
| | | iflog.ErrorLog__c = ''; |
| | | insert iflog; |
| | | |
| | | query = 'select id,Renew_Finish_Else__c,Renew_Finish_Correlation_Lightsource__c,Renew_Finish_Rigid_Mirror_3__c,Renew_Finish_Rigid_Mirror_1__c,' |
| | | +' Finish_Correlation_Lightsource__c,Finish_Rigid_Mirror_2__c,Finish_Rigid_Mirror_1__c ' |
| | | +' from Account_Service_Of_Target__c ' |
| | | +' where (Finish_Asset__c!=0 and Finish_Asset__c!=null) or (Finish_Coverage_Asset__c != 0 and Finish_Coverage_Asset__c!=null)'; |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Account_Service_Of_Target__c> asotList) { |
| | | List<Account_Service_Of_Target__c> asotL = new List<Account_Service_Of_Target__c>(); |
| | | // 清空客户-目标的实际设备数 |
| | | for (Account_Service_Of_Target__c asot : asotList) { |
| | | asot.Renew_Finish_Else__c = 0; |
| | | asot.Renew_Finish_Correlation_Lightsource__c = 0; |
| | | asot.Renew_Finish_Rigid_Mirror_3__c = 0; |
| | | asot.Renew_Finish_Rigid_Mirror_1__c = 0; |
| | | asot.Finish_Correlation_Lightsource__c = 0; |
| | | asot.Finish_Rigid_Mirror_2__c = 0; |
| | | asot.Finish_Rigid_Mirror_1__c = 0; |
| | | asotL.add(asot); |
| | | } |
| | | update asotL; |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | iflog.Log__c += '\nASOTDeleteRealBatch end'; |
| | | String tmp = iflog.ErrorLog__c; |
| | | if (tmp.length() > 65000) { |
| | | tmp = tmp.substring(0, 65000); |
| | | tmp += ' ...have more lines...'; |
| | | iflog.ErrorLog__c = tmp; |
| | | } |
| | | update iflog; |
| | | EquipmentRealCoverageRealBatch batch1 = new EquipmentRealCoverageRealBatch(); |
| | | Database.executeBatch(batch1); |
| | | EquipmentRenewMoleculeBatch batch2 = new EquipmentRenewMoleculeBatch(); |
| | | Database.executeBatch(batch2); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class ASOTDeleteRealBatchTest { |
| | | static testMethod void testMethod1() { |
| | | ASOTDeleteRealBatch batch3 = new ASOTDeleteRealBatch(); |
| | | Database.executeBatch(batch3,200); |
| | | } |
| | | @testSetup |
| | | private static void setUpDate(){ |
| | | List<Account_Service_Of_Target__c> asotL = new List<Account_Service_Of_Target__c>(); |
| | | |
| | | Date toDayTime = Date.today(); |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'hospitalabc'; |
| | | hospital.Is_Active__c = '有効'; |
| | | hospital.Attribute_Type__c = '卫生部'; |
| | | hospital.Speciality_Type__c = '综合医院'; |
| | | hospital.Grade__c = '一级'; |
| | | hospital.IF_Coverage_Target_HP__c = '1'; |
| | | hospital.OCM_Category__c = 'SLTV'; |
| | | hospital.Is_Medical__c = '医疗机构'; |
| | | hospital.Town__c = '东京'; |
| | | Oly_TriggerHandler.bypass('NFM701ControllerHandler'); |
| | | Oly_TriggerHandler.bypass('UpdateContractAimAmountHandler'); |
| | | insert hospital; |
| | | |
| | | Account_Service_Of_Target__c asot1 = new Account_Service_Of_Target__c(); |
| | | asot1.Renew_Finish_Else__c = 10; |
| | | asot1.Renew_Finish_Correlation_Lightsource__c = 10; |
| | | asot1.Renew_Finish_Rigid_Mirror_3__c = 10; |
| | | asot1.Renew_Finish_Rigid_Mirror_1__c = 10; |
| | | asot1.Finish_Correlation_Lightsource__c = 10; |
| | | asot1.Finish_Rigid_Mirror_2__c = 10; |
| | | asot1.Finish_Rigid_Mirror_1__c = 10; |
| | | asot1.Account_HP__c=hospital.Id; |
| | | asotL.add(asot1); |
| | | |
| | | Account_Service_Of_Target__c asot2 = new Account_Service_Of_Target__c(); |
| | | asot2.Renew_Finish_Else__c = 10; |
| | | asot2.Renew_Finish_Correlation_Lightsource__c = 10; |
| | | asot2.Renew_Finish_Rigid_Mirror_3__c = 10; |
| | | asot2.Renew_Finish_Rigid_Mirror_1__c = 10; |
| | | asot2.Finish_Correlation_Lightsource__c = 10; |
| | | asot2.Finish_Rigid_Mirror_2__c = 10; |
| | | asot2.Finish_Rigid_Mirror_1__c = 10; |
| | | asot2.Account_HP__c=hospital.Id; |
| | | asotL.add(asot2); |
| | | |
| | | Account_Service_Of_Target__c asot3 = new Account_Service_Of_Target__c(); |
| | | asot3.Renew_Finish_Else__c = 10; |
| | | asot3.Renew_Finish_Correlation_Lightsource__c = 10; |
| | | asot3.Renew_Finish_Rigid_Mirror_3__c = 10; |
| | | asot3.Renew_Finish_Rigid_Mirror_1__c = 10; |
| | | asot3.Finish_Correlation_Lightsource__c = 10; |
| | | asot3.Finish_Rigid_Mirror_2__c = 10; |
| | | asot3.Finish_Rigid_Mirror_1__c = 10; |
| | | asot3.Account_HP__c=hospital.Id; |
| | | asotL.add(asot3); |
| | | insert asotL; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | } |
| | | return new List<Contact>(); |
| | | } |
| | | |
| | | public static String getAWSToken(){ |
| | | AWS_Integration_Info__mdt awsConfiguration = [SELECT App_Id__c,Token_URL__c,App_Secret__c,Host_URL__c FROM AWS_Integration_Info__mdt WHERE DeveloperName = 'AWS_Default_Configuration']; |
| | | if (awsConfiguration == null) { |
| New file |
| | |
| | | @isTest |
| | | public class AWSServiceTool2Test { |
| | | |
| | | @TestSetup |
| | | static void setup(){ |
| | | TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Agency_Contact__c','Contact'}); |
| | | } |
| | | |
| | | @isTest |
| | | static void Test1(){ |
| | | Test.setMock(HttpCalloutMock.class, new HttpMock()); |
| | | |
| | | List<Agency_Contact__c> lra = new List<Agency_Contact__c>(); |
| | | lra.add(new Agency_Contact__c( |
| | | )); |
| | | insert lra; |
| | | Test.startTest(); |
| | | //system.debug(PIHelper.getPIIntegrationInfo('Agency_Contact__c').newEncryptUrl); |
| | | AWSServiceTool2.EncryptPushCore(Json.serialize(lra),'Agency_Contact__c'); |
| | | AWSServiceTool2.EncryptPushFuture(null,null); |
| | | Test.stopTest(); |
| | | } |
| | | |
| | | @isTest |
| | | static void Test2(){ |
| | | Test.setMock(HttpCalloutMock.class, new HttpMock()); |
| | | |
| | | List<Agency_Contact__c> lra = new List<Agency_Contact__c>(); |
| | | lra.add(new Agency_Contact__c( |
| | | Aws_Data_Id__c = '123456' |
| | | )); |
| | | insert lra; |
| | | Test.startTest(); |
| | | //system.debug(PIHelper.getPIIntegrationInfo('Agency_Contact__c').newEncryptUrl); |
| | | AWSServiceTool2.EncryptPushCore(Json.serialize(lra),'Agency_Contact__c'); |
| | | Test.stopTest(); |
| | | } |
| | | |
| | | @isTest |
| | | static void Test3(){ |
| | | Test.setMock(HttpCalloutMock.class, new HttpMock()); |
| | | |
| | | |
| | | Test.startTest(); |
| | | AWSServiceTool2.EncryptPushData(new string[]{'0031000000O4Cff'}); |
| | | |
| | | Test.stopTest(); |
| | | } |
| | | |
| | | |
| | | /* |
| | | @isTest |
| | | static void Test3(){ |
| | | Test.setMock(HttpCalloutMock.class, new HttpMock()); |
| | | Rental_Apply__c ra = new Rental_Apply__c(); |
| | | insert ra; |
| | | //PIHelper.getPIIntegrationInfo('Rental_Apply__c'); |
| | | List<Rental_Apply__c> lra = new List<Rental_Apply__c>(); |
| | | lra.add(new Rental_Apply__c( |
| | | Old_Rental_Apply__c = ra.Id |
| | | )); |
| | | //insert lra; |
| | | Test.startTest(); |
| | | AWSServiceTool2.decryptInsertCore(Json.serialize(lra),'Rental_Apply__c'); |
| | | Test.stopTest(); |
| | | }*/ |
| | | |
| | | |
| | | |
| | | class HttpMock implements HttpCalloutMock{ |
| | | |
| | | public HTTPResponse respond(HTTPRequest request) { |
| | | // 创建一个假的回应 |
| | | System.debug('------------------------------------------------------'); |
| | | HttpResponse response = new HttpResponse(); |
| | | string body = ''; |
| | | system.debug(request.getEndpoint()); |
| | | if(request.getEndpoint().contains('token')){ |
| | | system.debug('url=token'); |
| | | response.setHeader('Content-Type', 'application/json'); |
| | | body='{ "message": "", "object": "freqfewqfewewfewfew", "status": "", "success": true, "timestamp": 0, "txId": "" }'; |
| | | } else if(request.getEndpoint().contains('insert')){ |
| | | system.debug('url=Insert'); |
| | | response.setHeader('Content-Type', 'application/json'); |
| | | body='{ "message": "", "object": [ { "dataId": "123456", "directShippmentAddress": "", "directShippmentAddressEncrypt": "", "isDelete": 0, "phoneNumber": "", "phoneNumberEncrypt": "", "sfRecordId": "a2R1m0000007BPD" } ], "status": "", "success": true, "timestamp": 0, "txId": "" }'; |
| | | } else if(request.getEndpoint().contains('update')){ |
| | | system.debug('url=update'); |
| | | response.setHeader('Content-Type', 'application/json'); |
| | | body='{ "message": "", "object": [ { "dataId": "123456", "directShippmentAddress": "", "directShippmentAddressEncrypt": "", "isDelete": 0, "phoneNumber": "", "phoneNumberEncrypt": "", "sfRecordId": "a2R1m0000007BPD" } ], "status": "", "success": true, "timestamp": 0, "txId": "" }'; |
| | | } else{ |
| | | |
| | | } |
| | | |
| | | response.setBody(body); |
| | | response.setStatus('OK'); |
| | | response.setStatusCode(200); |
| | | return response; |
| | | // } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | //zhj MEBG新方案改造 2022-11-27 |
| | | global without sharing class AWSServiceTool2V2 { |
| | | |
| | | public static Map<String,String> matchupMap; |
| | | |
| | | public static void assignmentMatchupMap() { |
| | | //map的键对应医院表上ocsm管理省值 |
| | | //map的值对应地址表上类型为办事处的 省+','+市 |
| | | matchupMap = new Map<String,String>(); |
| | | matchupMap.put('黑龙江','黑龙江,哈尔滨市'); |
| | | matchupMap.put('青海','青海省,西宁市'); |
| | | matchupMap.put('陕西','陕西省,西安市'); |
| | | matchupMap.put('重庆','重庆市,渝中区'); |
| | | matchupMap.put('贵州','贵州省,贵阳市'); |
| | | matchupMap.put('福建','福建省,福州市'); |
| | | matchupMap.put('甘肃','甘肃省,兰州市'); |
| | | matchupMap.put('湖南','湖南省,长沙市'); |
| | | matchupMap.put('湖北','湖北省,武汉市'); |
| | | matchupMap.put('深圳','广东省,深圳市'); |
| | | matchupMap.put('广东','广东省,广州市'); |
| | | //matchupMap.put('海南','');//没有 |
| | | matchupMap.put('浙江','浙江省,杭州市'); |
| | | matchupMap.put('河南','河南省,郑州市'); |
| | | matchupMap.put('河北','河北省,石家庄市'); |
| | | matchupMap.put('沈阳','辽宁省,沈阳市'); |
| | | matchupMap.put('大连','辽宁省,大连市'); |
| | | matchupMap.put('江西','江西省,南昌市'); |
| | | matchupMap.put('江苏','江苏省,南京市'); |
| | | matchupMap.put('新疆','新疆维吾尔自治区,乌鲁木齐市'); |
| | | matchupMap.put('广西','广西自治区,南宁市'); |
| | | matchupMap.put('山西','山西省,太原市'); |
| | | matchupMap.put('山东,济南市','山东省,济南市'); |
| | | matchupMap.put('山东,青岛市','山东省,青岛市'); |
| | | matchupMap.put('安徽','安徽省,合肥市'); |
| | | matchupMap.put('宁夏','宁夏回族自治区,银川市'); |
| | | matchupMap.put('天津','天津市,河西区'); |
| | | matchupMap.put('四川/西藏','四川省,成都市'); |
| | | matchupMap.put('吉林','吉林省,长春市'); |
| | | matchupMap.put('北京','北京市,朝阳区'); |
| | | matchupMap.put('内蒙古','内蒙古自治区,呼和浩特市'); |
| | | matchupMap.put('云南','云南省,昆明市'); |
| | | //add wangweipeng 2021/12/27 start |
| | | matchupMap.put('上海','上海市,徐汇区'); |
| | | //add wangweipeng 2021/12/27 end |
| | | } |
| | | |
| | | |
| | | static Map<string,PIHelper.PIIntegration> staticResourceBuffer = new Map<string,PIHelper.PIIntegration>(); |
| | | static PIHelper.PIIntegration getPIIntegration(string sobject_name){ |
| | | system.debug('sobject_name='+sobject_name); |
| | | if(!staticResourceBuffer.containsKey(sobject_name)){ |
| | | PIHelper.PIIntegration staticResource = PIHelper.getPIIntegrationInfo(sobject_name); |
| | | staticResourceBuffer.put(sobject_name,staticResource); |
| | | } |
| | | return staticResourceBuffer.get(sobject_name); |
| | | } |
| | | |
| | | |
| | | //修理的 |
| | | public static boolean EncryptPushDataRepair(String rid){ |
| | | if(String.isBlank(rid)){ |
| | | return false; |
| | | } |
| | | assignmentMatchupMap(); |
| | | System.debug('matchupMap = ' + matchupMap); |
| | | Map<String,PIHelper.PIIntegration> staticResource = new Map<String,PIHelper.PIIntegration>(); |
| | | staticResource.put('Repair__c',PIHelper.getPIIntegrationInfo('Repair__c')); |
| | | staticResource.put('Contact',PIHelper.getPIIntegrationInfo('Contact')); |
| | | staticResource.put('Address__c',PIHelper.getPIIntegrationInfo('Address__c')); |
| | | Map<String, Map<String, PI_Field_Policy_Detail__c>> mmsp = new Map<String, Map<String,PI_Field_Policy_Detail__c>>(); |
| | | for (String key : staticResource.keySet()) { |
| | | mmsp.put(key, new Map<String,PI_Field_Policy_Detail__c>()); |
| | | for (PI_Field_Policy_Detail__c detail : staticResource.get(key).PIDetails) { |
| | | mmsp.get(key).put(detail.SF_Field_API_Name__c, detail); |
| | | } |
| | | } |
| | | |
| | | //1.查询出对应修理的数据 |
| | | Repair__c repair = [select Id,Hospital__c,address_Contacts__c,AWS_Data_Id__c from Repair__c where id=:rid]; |
| | | Account ac = [SELECT id,OCM_man_province_txt__c,FieldCity_Master_Name__c from Account where id =:repair.Hospital__c]; |
| | | String province = ''; |
| | | String city = ''; |
| | | String provinceAndCity = ''; |
| | | if('山东' == ac.OCM_man_province_txt__c){ |
| | | if('烟台市' == ac.FieldCity_Master_Name__c || '威海市' == ac.FieldCity_Master_Name__c || '日照市' == ac.FieldCity_Master_Name__c |
| | | || '青岛市' == ac.FieldCity_Master_Name__c || '潍坊市' == ac.FieldCity_Master_Name__c){ |
| | | provinceAndCity = matchupMap.get('山东,青岛市'); |
| | | }else{ |
| | | provinceAndCity = matchupMap.get('山东,济南市'); |
| | | } |
| | | }else{ |
| | | provinceAndCity = matchupMap.get(ac.OCM_man_province_txt__c); |
| | | } |
| | | if(provinceAndCity != null){ |
| | | province = provinceAndCity.split(',')[0]; |
| | | city = provinceAndCity.split(',')[1]; |
| | | } |
| | | String addressSQl = 'SELECT ID,AWS_Data_Id__c,Customer__c,Customer_Name__c,Contacts__c,Contacts__r.AWS_Data_Id__c,Contacts_Name__c,Telephone__c,Province__c,Province_Name__c,City__c,City_Name__c,Detailed_Address__c,ZipCode__c' |
| | | + ' from Address__c ' |
| | | + ' where Address_Classification__c = \'办事处\' and Province_Name__c =: province and City_Name__c =: city ' |
| | | + ' order by Using_Datetime__c desc NULLS LAST '; |
| | | system.debug('addressSQl='+addressSQl); |
| | | List<Address__c> addressList = Database.query(addressSQl); |
| | | //开始组装数据 |
| | | List<AWSServiceTool2V2.EncryptPushRequestBody> EncryptPushList = new List<AWSServiceTool2V2.EncryptPushRequestBody>(); |
| | | AWSServiceTool2V2.EncryptPushRequestBody EncryptPush = new AWSServiceTool2V2.EncryptPushRequestBody(); |
| | | EncryptPush.dataId = repair.AWS_Data_Id__c != null ?repair.AWS_Data_Id__c:''; |
| | | EncryptPush.sfRecordId = repair.Id; |
| | | EncryptPush.fieldsMapping = new Map<String, List<AWSServiceTool2V2.EncryptPushRes>>(); |
| | | //联系人名称,如果对应收货地址的联系人没有,就不更新该字段 |
| | | if(!String.isBlank(addressList[0].Customer__c)){ |
| | | List<AWSServiceTool2V2.EncryptPushRes> resList = new List<AWSServiceTool2V2.EncryptPushRes>(); |
| | | AWSServiceTool2V2.EncryptPushRes res = new AWSServiceTool2V2.EncryptPushRes(); |
| | | res.isQueryDb = true; |
| | | res.table = staticResource.get('Contact').awsTableName; |
| | | res.field = mmsp.get('Contact').get('LastName').AWS_Field_API__c; |
| | | res.value = ''; |
| | | res.dataId = addressList[0].Contacts__r.AWS_Data_Id__c; |
| | | resList.add(res); |
| | | EncryptPush.fieldsMapping.put(mmsp.get('Repair__c').get('address_Contacts__c').AWS_Field_API__c, resList); |
| | | } |
| | | //邮编 |
| | | List<AWSServiceTool2V2.EncryptPushRes> resList2 = new List<AWSServiceTool2V2.EncryptPushRes>(); |
| | | AWSServiceTool2V2.EncryptPushRes res2 = new AWSServiceTool2V2.EncryptPushRes(); |
| | | res2.isQueryDb = true; |
| | | res2.table = staticResource.get('Address__c').awsTableName; |
| | | res2.field = mmsp.get('Address__c').get('ZipCode__c').AWS_Field_API__c; |
| | | res2.value = ''; |
| | | res2.dataId = addressList[0].AWS_Data_Id__c; |
| | | resList2.add(res2); |
| | | EncryptPush.fieldsMapping.put(mmsp.get('Repair__c').get('address_ZipCode__c').AWS_Field_API__c, resList2); |
| | | |
| | | //address_Telephone__c |
| | | List<AWSServiceTool2V2.EncryptPushRes> resList3 = new List<AWSServiceTool2V2.EncryptPushRes>(); |
| | | AWSServiceTool2V2.EncryptPushRes res3 = new AWSServiceTool2V2.EncryptPushRes(); |
| | | res3.isQueryDb = true; |
| | | res3.table = staticResource.get('Address__c').awsTableName; |
| | | res3.field = mmsp.get('Address__c').get('Telephone__c').AWS_Field_API__c; |
| | | res3.value = ''; |
| | | res3.dataId = addressList[0].AWS_Data_Id__c; |
| | | resList3.add(res3); |
| | | EncryptPush.fieldsMapping.put(mmsp.get('Repair__c').get('address_Telephone__c').AWS_Field_API__c, resList3); |
| | | |
| | | String cityName = ''; |
| | | String ProvinceCity = ''; |
| | | if(String.isNotBlank(addressList[0].City_Name__c)) |
| | | cityName = addressList[0].City_Name__c.trim(); |
| | | if(String.isNotBlank(addressList[0].Province_Name__c)) |
| | | ProvinceCity = addressList[0].Province_Name__c.trim()+cityName; |
| | | |
| | | //Detailed_Address__c |
| | | List<AWSServiceTool2V2.EncryptPushRes> resList4 = new List<AWSServiceTool2V2.EncryptPushRes>(); |
| | | AWSServiceTool2V2.EncryptPushRes res4 = new AWSServiceTool2V2.EncryptPushRes(); |
| | | res4.isQueryDb = false; |
| | | res4.table = ''; |
| | | res4.field = ''; |
| | | res4.value = ProvinceCity; |
| | | resList4.add(res4); |
| | | AWSServiceTool2V2.EncryptPushRes res5 = new AWSServiceTool2V2.EncryptPushRes(); |
| | | res5.isQueryDb = true; |
| | | res5.table = staticResource.get('Address__c').awsTableName; |
| | | res5.field = mmsp.get('Address__c').get('Detailed_Address__c').AWS_Field_API__c; |
| | | res5.value = ''; |
| | | res5.dataId = addressList[0].AWS_Data_Id__c; |
| | | resList4.add(res5); |
| | | EncryptPush.fieldsMapping.put(mmsp.get('Repair__c').get('Detailed_Address__c').AWS_Field_API__c, resList4); |
| | | EncryptPushList.add(EncryptPush); |
| | | System.debug('EncryptPushListdataId = ' + JSON.serialize(EncryptPushList[0].dataId)); |
| | | System.debug('EncryptPushListsfRecordId = ' + JSON.serialize(EncryptPushList[0].sfRecordId)); |
| | | System.debug('EncryptPushListfieldsMapping = ' + JSON.serialize(EncryptPushList[0].fieldsMapping)); |
| | | System.debug('EncryptPushList = ' + JSON.serialize(EncryptPushList)); |
| | | |
| | | List<Repair__c> aclist = new List<Repair__c>(); |
| | | aclist.add(repair); |
| | | return EncryptPushCoreV2(Json.serialize(EncryptPushList),Json.serialize(aclist), 'Repair__c'); |
| | | } |
| | | |
| | | //创建/更新联系人之后,创建/更新.客户人员,并且发给AWS |
| | | @future(callout=true) |
| | | public static void EncryptPushFutureV2(string json_list,string acList,string sobject_name){ |
| | | EncryptPushCoreV2(json_list,acList,sobject_name); |
| | | } |
| | | |
| | | // List<Rental_Apply__c> temps = [select id,AWS_Data_Id__c,name, direct_shippment_address__c, Direct_Shippment_Address_Encrypt__c, Phone_number__c, Phone_Number_Encrypt__c,CreatedDate from Rental_Apply__c where AWS_Data_Id__c != null order by CreatedDate desc limit 2]; |
| | | public static boolean EncryptPushCoreV2(string json_list,string acList,string sobject_name){ |
| | | system.debug('enter EncryptPushCoreV2'); |
| | | if(string.isBlank(json_list) || string.isBlank(sobject_name) || string.isBlank(acList)){ |
| | | system.debug('json_list or sobject_name is null'); |
| | | return false; |
| | | } |
| | | |
| | | //调用滨璜接口更新 |
| | | PIHelper.PIIntegration staticResourceV2 = getPIIntegration(sobject_name+'V2'); |
| | | system.debug('json_list='+json_list); |
| | | system.debug('acList='+acList); |
| | | system.debug('staticResourceV2.token='+staticResourceV2.token); |
| | | system.debug('staticResourceV2='+staticResourceV2); |
| | | system.debug('staticResourceV2.newEncryptUrl='+staticResourceV2.newEncryptUrl); |
| | | if(String.isBlank(staticResourceV2.token)){ |
| | | System.debug('获取aws token 失败'); |
| | | return false; |
| | | } |
| | | |
| | | Map<String,Object> temp = null; |
| | | List<object> objList = new List<object>(); |
| | | temp = PostAws(json_list,staticResourceV2.newEncryptUrl,staticResourceV2.token); |
| | | System.debug('temp = ' + temp); |
| | | if(temp == null){ |
| | | System.debug('temp == null'); |
| | | return false; |
| | | } |
| | | List<object> newobjectList = (List<object>)Json.deserializeUntyped(acList); |
| | | Map<Id,Sobject> newMap = new Map<Id,Sobject>(); |
| | | for(object obj : newobjectList){ |
| | | Map<string,object> mobj = (Map<string,object>)obj; |
| | | if(mobj.containsKey('Id')){ |
| | | Sobject sobj_temp = (Sobject)Json.deserialize(Json.serialize(obj), Type.forName(sobject_name)); |
| | | newMap.put(sobj_temp.Id,sobj_temp); |
| | | } |
| | | } |
| | | System.debug('newMap = ' + newMap); |
| | | //进行更新,根据dataid |
| | | List<Sobject> updateList = new List<Sobject>(); |
| | | for(String key : newMap.keySet()){ |
| | | if(temp.containsKey(key)){ |
| | | Sobject ra = newMap.get(key); |
| | | ra.put('AWS_Data_Id__c',String.valueOf(temp.get(key))); |
| | | updateList.add(ra); |
| | | } |
| | | } |
| | | System.debug('updateList = ' + updateList); |
| | | if(updateList.size() > 0){ |
| | | update updateList; |
| | | } |
| | | return true; |
| | | |
| | | |
| | | |
| | | |
| | | // Map<Id,Sobject> newMap = new Map<Id,Sobject>(); |
| | | |
| | | // for(object obj : newobjectList){ |
| | | // Map<string,object> mobj = (Map<string,object>)obj; |
| | | // if(mobj.containsKey('Id')){ |
| | | // Sobject sobj_temp = (Sobject)Json.deserialize(Json.serialize(obj), Type.forName(sobject_name)); |
| | | // newMap.put(sobj_temp.Id,sobj_temp); |
| | | // } |
| | | // } |
| | | // List<Map<string,object>> insert_list = new List<Map<string,object>>(); |
| | | // List<Map<string,object>> update_list = new List<Map<string,object>>(); |
| | | // List<sobject> newList = newMap.values(); |
| | | // for(Sobject ra : newList){ |
| | | // Map<string,object> mso = new Map<string,object>(); |
| | | |
| | | |
| | | // for(PI_Field_Policy_Detail__c detail : staticResource.PIDetails){ |
| | | // if(ra.isSet(detail.SF_Field_API_Name__c)){ |
| | | // mso.put(detail.AWS_Field_API__c,ra.get(detail.SF_Field_API_Name__c)); |
| | | // //mso.put(detail.AWS_Encrypted_Field_API__c,ra.get(detail.SF_Field_Encrypted_API__c)); |
| | | // } |
| | | // } |
| | | // mso.put('sfRecordId',ra.Id); |
| | | // string aws_id = string.valueOf(ra.get('AWS_Data_Id__c')); |
| | | // system.debug('aws_id='+aws_id); |
| | | // if(string.isBlank(aws_id)){ |
| | | // insert_list.add(mso); |
| | | // }else{ |
| | | // system.debug('aws_id.lenth='+aws_id.length()); |
| | | // mso.put('dataId',aws_id); |
| | | // update_list.add(mso); |
| | | // } |
| | | |
| | | // } |
| | | // List<object> objList = new List<object>(); |
| | | // List<Sobject> updateList = new List<Sobject>(); |
| | | // List<object> temp = null; |
| | | // system.debug('insert_list.size()='+insert_list.size()); |
| | | // system.debug('update_list.size()='+update_list.size()); |
| | | // //if(true)return; |
| | | // if(insert_list.size() > 0){ |
| | | // system.debug('url='+staticResource.newEncryptUrl); |
| | | // temp = PostAws(Json.serialize(insert_list),staticResource.newEncryptUrl,staticResource.token); |
| | | // if(temp != null){ |
| | | // objList.addAll(temp); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | // if(update_list.size() > 0){ |
| | | // system.debug('url='+staticResource.updateEncryptUrl); |
| | | // temp = PostAws(Json.serialize(update_list),staticResource.updateEncryptUrl,staticResource.token); |
| | | // if(temp != null){ |
| | | // objList.addAll(temp); |
| | | // } |
| | | // } |
| | | |
| | | // system.debug('objList.size()='+objList.size()); |
| | | // if(objList.size()==0){ |
| | | // return false; |
| | | // } |
| | | |
| | | |
| | | // for(object obj : objList){ |
| | | // Map<string,object> obj_map = (Map<string,object>)obj; |
| | | // string sfRecordId = null; |
| | | // string dataId = null; |
| | | // if(obj_map.containsKey('sfRecordId')){ |
| | | // sfRecordId = string.valueOf(obj_map.get('sfRecordId')); |
| | | // }else{ |
| | | // system.debug('obj_map.containsKey(\'sfRecordId\')='+obj_map.containsKey('sfRecordId')); |
| | | // continue; |
| | | // } |
| | | |
| | | // if(obj_map.containsKey('dataId')){ |
| | | // dataId = string.valueOf(obj_map.get('dataId')); |
| | | // }else{ |
| | | // system.debug('obj_map.containsKey(\'dataId\')='+obj_map.containsKey('dataId')); |
| | | // continue; |
| | | // } |
| | | |
| | | |
| | | // if(newMap.containsKey(sfRecordId)){ |
| | | // Sobject ra = newMap.get(sfRecordId); |
| | | // for(PI_Field_Policy_Detail__c detail : staticResource.PIDetails){ |
| | | // if(obj_map.containsKey(detail.AWS_Field_API__c)){ |
| | | // ra.put(detail.SF_Field_API_Name__c,obj_map.get(detail.AWS_Field_API__c)); |
| | | // }else{ |
| | | // system.debug('detail.AWS_Field_API__c='+detail.AWS_Field_API__c+' not in obj_map'); |
| | | // } |
| | | |
| | | // if(obj_map.containsKey(detail.AWS_Encrypted_Field_API__c)){ |
| | | // ra.put(detail.SF_Field_Encrypted_API__c,obj_map.get(detail.AWS_Encrypted_Field_API__c)); |
| | | // }else{ |
| | | // system.debug('detail.AWS_Encrypted_Field_API__c='+detail.AWS_Encrypted_Field_API__c+' not in obj_map'); |
| | | // } |
| | | // } |
| | | // ra.put('AWS_Data_Id__c',dataId); |
| | | |
| | | // updateList.add(ra); |
| | | // }else{ |
| | | // system.debug('newMap.containsKey('+sfRecordId+')='+newMap.containsKey(sfRecordId)); |
| | | // continue; |
| | | // } |
| | | // } |
| | | |
| | | // system.debug('updateList.size='+updateList.size()); |
| | | // if(updateList.size()>0){ |
| | | // update updateList; |
| | | // } |
| | | |
| | | // return true; |
| | | } |
| | | |
| | | static Map<String,Object> PostAws(string payload,string url,string token){ |
| | | system.debug('payload='+payload); |
| | | system.debug('url='+url); |
| | | system.debug('token='+token); |
| | | NFMUtil.response response = NFMUtil.sendToPiAWS(payload, url,token); |
| | | system.debug('response = ' + response); |
| | | Map<string,object> res_obj = (Map<string,object>)Json.deserializeUntyped(response.responseBody); |
| | | if(res_obj == null || !res_obj.containsKey('object') ){ |
| | | System.debug('res_obj == null || !res_obj.containsKey(\'object\')'); |
| | | return null; |
| | | } |
| | | |
| | | Map<String,Object> objMap = (Map<String,Object>)res_obj.get('object'); |
| | | System.debug('objMap =' + objMap); |
| | | if(objMap == null){ |
| | | System.debug('objMap == null'); |
| | | return null; |
| | | } |
| | | return objMap; |
| | | } |
| | | |
| | | |
| | | global class EncryptPushRequestBody { |
| | | // aws dataid 目标对象 |
| | | public String dataId {set; get;} |
| | | // sfID 记录Id 目标对象 |
| | | public String sfRecordId {set; get;} |
| | | // 字段映射 如:name:{} |
| | | public Map<String, List<EncryptPushRes>> fieldsMapping {set; get;} |
| | | |
| | | public EncryptPushRequestBody(String dataId, String sfRecordId, Map<String, List<EncryptPushRes>> fieldsMapping) { |
| | | this.dataId = dataId; |
| | | this.sfRecordId = sfRecordId; |
| | | this.fieldsMapping = fieldsMapping; |
| | | } |
| | | public EncryptPushRequestBody() { |
| | | } |
| | | } |
| | | |
| | | global class EncryptPushRes{ |
| | | public Boolean isQueryDb; |
| | | public String table; |
| | | public String dataId; |
| | | public String field; |
| | | public String value; |
| | | |
| | | public EncryptPushRes(Boolean isQueryDb, String table, String dataId, String field, String value) { |
| | | this.isQueryDb = isQueryDb; |
| | | this.table = table; |
| | | this.dataId = dataId; |
| | | this.field = field; |
| | | this.value = value; |
| | | } |
| | | public EncryptPushRes() {} |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | public with sharing class AWSServiceTool2V2Test { |
| | | @TestSetup |
| | | static void setup(){ |
| | | TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Repair__c','Agency_Contact__c','Contact','Address__c','Repair__cV2'}); |
| | | } |
| | | |
| | | |
| | | @isTest |
| | | static void Test1(){ |
| | | Test.setMock(HttpCalloutMock.class, new HttpMock()); |
| | | Repair__c rs = TestDataUtility.CreateRepairs(1)[0]; |
| | | |
| | | Contact contact2 = new Contact(); |
| | | contact2.AccountId = rs.Account__c; |
| | | contact2.FirstName = '小明'; |
| | | contact2.LastName = 'test1经销商'; |
| | | insert contact2; |
| | | |
| | | Address_Level__c alc1 = new Address_Level__c( |
| | | Name = '山东' |
| | | ); |
| | | Address_Level2__c alc11 = new Address_Level2__c( |
| | | Name = '青岛市',Address_Level__c = alc1.Id,Level1_Name__c='山东' |
| | | ); |
| | | Address__c add = new Address__c(); |
| | | add.Address_Classification__c = '办事处'; |
| | | add.Customer__c = rs.Account__c; |
| | | add.Contacts__c = contact2.id; |
| | | add.Telephone__c = '123123'; |
| | | add.Province__c = alc1.Id; |
| | | add.City__c = alc11.Id; |
| | | add.Detailed_Address__c = '北京市顺义区西海洪村'; |
| | | insert add; |
| | | |
| | | Test.startTest(); |
| | | AWSServiceTool2V2.EncryptPushDataRepair(rs.Id); |
| | | Test.stopTest(); |
| | | } |
| | | |
| | | class HttpMock implements HttpCalloutMock{ |
| | | public HTTPResponse respond(HTTPRequest request) { |
| | | // 创建一个假的回应 |
| | | System.debug('------------------------------------------------------'); |
| | | HttpResponse response = new HttpResponse(); |
| | | string body = ''; |
| | | system.debug(request.getEndpoint()); |
| | | if(request.getEndpoint().contains('token')){ |
| | | system.debug('url=token'); |
| | | response.setHeader('Content-Type', 'application/json'); |
| | | body='{ "message": "", "object": "freqfewqfewewfewfew", "status": "", "success": true, "timestamp": 0, "txId": "" }'; |
| | | } else if(request.getEndpoint().contains('insert')){ |
| | | system.debug('url=Insert'); |
| | | response.setHeader('Content-Type', 'application/json'); |
| | | |
| | | body='{"message":"RT_SUCCESS","object":{"a0J9D000003pVS3UAM":"1058028677385682945"},"status":"0","success":true,"timestamp":1672295303119}'; |
| | | } else if(request.getEndpoint().contains('update')){ |
| | | system.debug('url=update'); |
| | | response.setHeader('Content-Type', 'application/json'); |
| | | body='{"message":"RT_SUCCESS","object":{"a0J9D000003pVS3UAM":"1058028677385682945"},"status":"0","success":true,"timestamp":1672295303119}'; |
| | | } else{ |
| | | |
| | | } |
| | | |
| | | response.setBody(body); |
| | | response.setStatus('OK'); |
| | | response.setStatusCode(200); |
| | | return response; |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>56.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | if (HospitalIdList.size() > 0) { |
| | | query += ' And Id in : HospitalIdList'; |
| | | } |
| | | |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Account> HosinfoList) { |
| | | List<Tender_information__c> TenInfoList = [Select Id, Hospital__c, Hospital1__c, Hospital2__c, Hospital3__c, |
| New file |
| | |
| | | public without sharing class AccChangeApprovalResponseController { |
| | | // 客户变更申请 |
| | | public Account_Delay_Apply__c ra { get; set; } |
| | | public Account_Delay_Apply__c cc { get; set; } |
| | | // 客户ID |
| | | public Id accid { get; private set; } |
| | | // To:当前审批人(response2system),To:申请者(response2user) |
| | | public String type { get; set; } |
| | | |
| | | public Boolean hasError { get; private set; } |
| | | public String baseUrl { get; private set; } |
| | | |
| | | public User systemUser { get; set; } |
| | | |
| | | public AccChangeApprovalResponseController() { |
| | | //Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8'); |
| | | baseUrl = URL.getSalesforceBaseUrl().toExternalForm(); |
| | | accid = ApexPages.currentPage().getParameters().get('accid'); |
| | | type = ApexPages.currentPage().getParameters().get('type'); |
| | | } |
| | | |
| | | public AccChangeApprovalResponseController(ApexPages.StandardController stdController) { |
| | | //Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8'); |
| | | baseUrl = URL.getSalesforceBaseUrl().toExternalForm(); |
| | | accid = stdController.getId(); |
| | | type = ApexPages.currentPage().getParameters().get('type'); |
| | | } |
| | | |
| | | // 画面初始化 |
| | | public void init() { |
| | | hasError = true; |
| | | List<Account_Delay_Apply__c> raList = [select Id, Name, Is_Active__c, Response__c, |
| | | ResponseNew__c, CreatedById, CreatedBy.Name, |
| | | CreatedBy.Email, Response_Cc_User1__c, |
| | | Response_Cc_User2__c, Response_Cc_User3__c, |
| | | Response_Cc_User4__c, Response_Cc_User5__c, |
| | | Response_Cc_User6__c |
| | | from Account_Delay_Apply__c |
| | | where id = : accid ]; |
| | | |
| | | if (raList.size() > 0) { |
| | | ra = raList[0]; |
| | | cc = raList[0]; |
| | | } |
| | | cc.Response_Cc_User1__c = null; |
| | | cc.Response_Cc_User2__c = null; |
| | | cc.Response_Cc_User3__c = null; |
| | | cc.Response_Cc_User4__c = null; |
| | | cc.Response_Cc_User5__c = null; |
| | | cc.Response_Cc_User6__c = null; |
| | | |
| | | // List<User> toSysUser = [select Id, Name, Email from User where Id = : System.Label.LeaderID_Zhu]; |
| | | // if (toSysUser.size() > 0) { |
| | | // systemUser = toSysUser[0]; |
| | | // } |
| | | |
| | | // 邮件默认cc |
| | | if (type == 'response2system') { |
| | | |
| | | } else if (type == 'response2user') { |
| | | |
| | | } |
| | | } |
| | | |
| | | // 保存按钮 |
| | | public PageReference saveBtn() { |
| | | hasError = true; |
| | | |
| | | String response = cc.ResponseNew__c; |
| | | if (String.isBlank(response) == true || response.trim().length() == 0) { |
| | | cc.ResponseNew__c.addError('请输入内容。'); |
| | | return null; |
| | | } |
| | | |
| | | |
| | | // 送信者 |
| | | String username = UserInfo.getName(); |
| | | // 发送时间 |
| | | Datetime dt = Datetime.now(); |
| | | // 相关用户检索 |
| | | List<Id> ccList = new List<Id>(); |
| | | if (String.isBlank(cc.Response_Cc_User1__c) == false) { |
| | | ccList.add(cc.Response_Cc_User1__c); |
| | | } |
| | | if (String.isBlank(cc.Response_Cc_User2__c) == false) { |
| | | ccList.add(cc.Response_Cc_User2__c); |
| | | } |
| | | if (String.isBlank(cc.Response_Cc_User3__c) == false) { |
| | | ccList.add(cc.Response_Cc_User3__c); |
| | | } |
| | | if (String.isBlank(cc.Response_Cc_User4__c) == false) { |
| | | ccList.add(cc.Response_Cc_User4__c); |
| | | } |
| | | if (String.isBlank(cc.Response_Cc_User5__c) == false) { |
| | | ccList.add(cc.Response_Cc_User5__c); |
| | | } |
| | | Map<Id, User> userMap = new Map<Id, User>([ |
| | | select Id, Name, Email from User where Id in :ccList |
| | | ]); |
| | | |
| | | List<Id> toList = new List<Id>(); |
| | | if (String.isBlank(cc.Response_Cc_User6__c) == false) { |
| | | toList.add(cc.Response_Cc_User6__c); |
| | | } |
| | | Map<Id, User> touserMap = new Map<Id, User>([ |
| | | select Id, Name, Email from User where Id in :toList |
| | | ]); |
| | | |
| | | // 收信者 |
| | | String toName = ''; |
| | | List<String> toMailList = new List<String>(); |
| | | if (type == 'response2system') { |
| | | // toName = systemUser.Name; |
| | | // toMailList.add(systemUser.Email); |
| | | if (touserMap.size() > 0) { |
| | | for (Id id : touserMap.keySet()) { |
| | | toName += touserMap.get(id).Name + ', '; |
| | | toMailList.add(touserMap.get(id).Email); |
| | | } |
| | | } |
| | | System.debug('lt123---toname---'+toName); |
| | | System.debug('lt123---String.isBlank(toName)---'+String.isBlank(toName)); |
| | | if (toName != '') { |
| | | toName = toName.left(toName.length() - 2); |
| | | }else if(String.isBlank(toName) == true){ |
| | | cc.Response_Cc_User6__c.addError('to审批人必填。'); |
| | | return null; |
| | | } |
| | | } else if (type == 'response2user') { |
| | | toName = ra.CreatedBy.Name; |
| | | toMailList.add(ra.CreatedBy.Email); |
| | | } |
| | | // 抄送者 |
| | | String ccName = ''; |
| | | List<String> ccMailList = new List<String>(); |
| | | |
| | | |
| | | //WLIG-BS2CJW ---20200807---update By rentongxiao ---Start |
| | | //获取 郭 和 油 的信息 |
| | | // String ydIdsStr = System.Label.LeaderId_YD; |
| | | // List<String> ydIds = ydIdsStr.split(','); |
| | | |
| | | // List<User> yds = [select Id, Name, Email from User where Id in : ydIds]; |
| | | |
| | | // if(type == 'response2user'){ |
| | | // // ccName += systemUser.Name + ', '; |
| | | // // ccMailList.add(systemUser.Email); |
| | | // if (yds.size() > 0) { |
| | | // for(User u : yds){ |
| | | // ccName += u.Name +', '; |
| | | // ccMailList.add(u.Email); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | //WLIG-BS2CJW ---20200807---update By rentongxiao---End |
| | | |
| | | if (userMap.size() > 0) { |
| | | for (Id id : userMap.keySet()) { |
| | | ccName += userMap.get(id).Name + ', '; |
| | | ccMailList.add(userMap.get(id).Email); |
| | | } |
| | | } |
| | | |
| | | if (ccName != '') { |
| | | ccName = ccName.left(ccName.length() - 2); |
| | | } |
| | | |
| | | // 原应答沟通信息 |
| | | String oldResponse = ra.Response__c; |
| | | // 现应答沟通信息 |
| | | String temp = ''; |
| | | temp += '****** ' + username + ' ' + dt.format() + ' ******\n'; |
| | | temp += '*** To:' + toName + '\n'; |
| | | temp += '*** Cc:' + ccName + '\n'; |
| | | temp += cc.ResponseNew__c; |
| | | if (oldResponse != null && oldResponse.trim().length() > 0) { |
| | | temp += '\n\n' + oldResponse; |
| | | } else { |
| | | //于2016-07-01加入<a></a> |
| | | temp += '\n\n客户变更链接: ' + baseUrl + '/' + ra.Id +' '; |
| | | } |
| | | |
| | | try { |
| | | //Create insatnce of actual email |
| | | Messaging.SingleEmailMessage messageNEW= new Messaging.SingleEmailMessage(); |
| | | |
| | | messageNEW.Subject = '客户变更 ' + ra.Name + ' -审批联络'; |
| | | messageNEW.PlainTextBody = temp; |
| | | //set desired email addresses |
| | | messageNEW.setCharset('UTF-8'); |
| | | messageNEW.toAddresses = toMailList; |
| | | messageNEW.ccAddresses = ccMailList; |
| | | //send the mail |
| | | Messaging.SendEmailResult[] results = messaging.sendEmail(new Messaging.SingleEmailMessage[] {messageNEW}); |
| | | if(!results[0].success){ |
| | | cc.ResponseNew__c.addError('邮件发送失败。'); |
| | | return null; |
| | | }else{ |
| | | // 更新应答沟通 |
| | | Account_Delay_Apply__c updacc = new Account_Delay_Apply__c(); |
| | | updacc.Id = ra.Id; |
| | | updacc.Response__c = temp; |
| | | update updacc; |
| | | |
| | | hasError=false; |
| | | return null; |
| | | } |
| | | } catch (Exception ex) { |
| | | ApexPages.addMessages(ex); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | public with sharing class AccChangeApprovalResponseControllerTest { |
| | | |
| | | |
| | | static User setNewUser(String firstName, String lastName, String aName, String email) { |
| | | User user = new User(Test_staff__c = true); |
| | | user.LastName = ' ' + lastName; |
| | | user.FirstName = firstName; |
| | | user.Alias = aName; |
| | | user.Email = email; |
| | | user.Username = 'Olympus' + email; |
| | | user.CommunityNickname = aName; |
| | | user.IsActive = true; |
| | | user.EmailEncodingKey = 'ISO-2022-JP'; |
| | | user.TimeZoneSidKey = 'Asia/Tokyo'; |
| | | user.LocaleSidKey = 'ja_JP'; |
| | | user.LanguageLocaleKey = 'ja'; |
| | | user.ProfileId = System.Label.ProfileId_SystemAdmin; |
| | | user.Job_Category__c = '销售推广'; |
| | | user.Province__c = '上海市'; |
| | | user.Use_Start_Date__c = Date.today().addMonths(-6); |
| | | insert user; |
| | | |
| | | return user; |
| | | } |
| | | |
| | | static testMethod void test_method_one() { |
| | | User user1 = setNewUser('ztest01', 'User001', 'Zhang001', 'test001@excemaple.com'); |
| | | User user2 = setNewUser('ztest02', 'User002', 'Zhang002', 'test002@excemaple.com'); |
| | | User user3 = setNewUser('ztest03', 'User003', 'Zhang003', 'test003@excemaple.com'); |
| | | User user4 = setNewUser('ztest04', 'User004', 'Zhang004', 'test004@excemaple.com'); |
| | | User user5 = setNewUser('ztest05', 'User005', 'Zhang005', 'test005@excemaple.com'); |
| | | User toUser = setNewUser('shenqing', 'shenpi', 'spsqTest', 'shenpi@excemaple.com'); |
| | | |
| | | // 病院を作る |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'test hospital'; |
| | | hospital.Is_Active__c = '有効'; |
| | | hospital.OwnerId = toUser.Id; |
| | | |
| | | //WLIG-BS2CJW --执行测试类报异常MIXED_DML_OPERATION ---20200807---update By rentongxiao ---Start |
| | | // insert hospital; |
| | | if (Test.isRunningTest()) { |
| | | System.runAs(new User(Id = UserInfo.getUserId())){ |
| | | insert hospital; |
| | | } |
| | | } |
| | | //WLIG-BS2CJW ---20200807---update By rentongxiao ---End |
| | | |
| | | //新建 客户变更申请 |
| | | Account_Delay_Apply__c ada = new Account_Delay_Apply__c(); |
| | | ada.Hospital__c = hospital.Id; |
| | | ada.ChangeReason__c = '地址错误'; |
| | | ada.Is_Active__c = '申请中'; |
| | | ada.Is_upload_file__c = true; |
| | | ada.OpenWindow__c = user5.Id; |
| | | ada.InstitutionalType__c = '非医疗机构'; |
| | | ada.CreatedById = toUser.Id; |
| | | |
| | | if (Test.isRunningTest()) { |
| | | System.runAs(new User(Id = UserInfo.getUserId())){ |
| | | insert ada; |
| | | } |
| | | } |
| | | |
| | | // 画面迁移--沟通应答画面 |
| | | PageReference page = new PageReference('/apex/AccChangeApprovalResponseControllerPopUp?accid=' + ada.Id + '&type=response2system'); |
| | | System.Test.setCurrentPage(page); |
| | | AccChangeApprovalResponseController controller = new AccChangeApprovalResponseController(); |
| | | controller.init(); |
| | | |
| | | controller.cc.ResponseNew__c = 'test goutong'; |
| | | // 保存 |
| | | controller.saveBtn(); |
| | | } |
| | | |
| | | static testMethod void test_method_two() { |
| | | User user1 = setNewUser('ztest01', 'User001', 'Zhang001', 'test001@excemaple.com'); |
| | | User user2 = setNewUser('ztest02', 'User002', 'Zhang002', 'test002@excemaple.com'); |
| | | User user3 = setNewUser('ztest03', 'User003', 'Zhang003', 'test003@excemaple.com'); |
| | | User user4 = setNewUser('ztest04', 'User004', 'Zhang004', 'test004@excemaple.com'); |
| | | User user5 = setNewUser('ztest05', 'User005', 'Zhang005', 'test005@excemaple.com'); |
| | | User toUser = setNewUser('shenqing', 'shenpi', 'spsqTest', 'shenpi@excemaple.com'); |
| | | |
| | | // 病院を作る |
| | | // Account hospital = new Account(); |
| | | // hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | // hospital.Name = 'test hospital'; |
| | | // hospital.Is_Active__c = '申请中'; |
| | | // hospital.OwnerId = toUser.Id; |
| | | |
| | | // //WLIG-BS2CJW --执行测试类报异常MIXED_DML_OPERATION ---20200807---update By rentongxiao ---Start |
| | | // // insert hospital; |
| | | // if (Test.isRunningTest()) { |
| | | // System.runAs(new User(Id = UserInfo.getUserId())){ |
| | | // insert hospital; |
| | | // } |
| | | // } |
| | | //WLIG-BS2CJW ---20200807---update By rentongxiao ---End |
| | | |
| | | // 病院を作る |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'test hospital'; |
| | | hospital.Is_Active__c = '有効'; |
| | | hospital.OwnerId = toUser.Id; |
| | | |
| | | //WLIG-BS2CJW --执行测试类报异常MIXED_DML_OPERATION ---20200807---update By rentongxiao ---Start |
| | | // insert hospital; |
| | | if (Test.isRunningTest()) { |
| | | System.runAs(new User(Id = UserInfo.getUserId())){ |
| | | insert hospital; |
| | | } |
| | | } |
| | | //WLIG-BS2CJW ---20200807---update By rentongxiao ---End |
| | | |
| | | //新建 客户变更申请 |
| | | Account_Delay_Apply__c ada = new Account_Delay_Apply__c(); |
| | | ada.Hospital__c = hospital.Id; |
| | | ada.ChangeReason__c = '地址错误'; |
| | | ada.Is_Active__c = '申请中'; |
| | | ada.Is_upload_file__c = true; |
| | | ada.OpenWindow__c = user5.Id; |
| | | ada.InstitutionalType__c = '非医疗机构'; |
| | | ada.CreatedById = toUser.Id; |
| | | |
| | | if (Test.isRunningTest()) { |
| | | System.runAs(new User(Id = UserInfo.getUserId())){ |
| | | insert ada; |
| | | } |
| | | } |
| | | |
| | | // 画面迁移--沟通应答画面 |
| | | PageReference page = new PageReference('/apex/AccChangeApprovalResponseControllerPopUp?accid=' + ada.Id + '&type=response2user'); |
| | | System.Test.setCurrentPage(page); |
| | | AccChangeApprovalResponseController controller2 = new AccChangeApprovalResponseController(new ApexPages.StandardController(ada)); |
| | | controller2.init(); |
| | | controller2.saveBtn(); |
| | | |
| | | // 发送按钮 |
| | | controller2.cc.Response__c = 'test goutong'; |
| | | controller2.cc.ResponseNew__c = 'test .......'; |
| | | controller2.cc.Response_Cc_User1__c = user1.Id; |
| | | controller2.cc.Response_Cc_User2__c = user2.Id; |
| | | controller2.cc.Response_Cc_User3__c = user3.Id; |
| | | controller2.cc.Response_Cc_User4__c = user4.Id; |
| | | controller2.cc.Response_Cc_User5__c = user5.Id; |
| | | controller2.saveBtn(); |
| | | } |
| | | |
| | | static testMethod void test_method_three() { |
| | | User toUser = setNewUser('shenqing', 'shenpi', 'spsqTest', 'shenpi@excemaple.com'); |
| | | User user5 = setNewUser('ztest05', 'User005', 'Zhang005', 'test005@excemaple.com'); |
| | | |
| | | // 病院を作る |
| | | // Account hospital = new Account(); |
| | | // hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | // hospital.Name = 'test hospital'; |
| | | // hospital.Is_Active__c = '申请中'; |
| | | // hospital.OwnerId = toUser.Id; |
| | | |
| | | // //WLIG-BS2CJW --执行测试类报异常MIXED_DML_OPERATION ---20200807---update By rentongxiao ---Start |
| | | // // insert hospital; |
| | | // if (Test.isRunningTest()) { |
| | | // System.runAs(new User(Id = UserInfo.getUserId())){ |
| | | // insert hospital; |
| | | // } |
| | | // } |
| | | //WLIG-BS2CJW ---20200807---update By rentongxiao ---Start |
| | | |
| | | // 病院を作る |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'test hospital'; |
| | | hospital.Is_Active__c = '有効'; |
| | | hospital.OwnerId = toUser.Id; |
| | | |
| | | //WLIG-BS2CJW --执行测试类报异常MIXED_DML_OPERATION ---20200807---update By rentongxiao ---Start |
| | | // insert hospital; |
| | | if (Test.isRunningTest()) { |
| | | System.runAs(new User(Id = UserInfo.getUserId())){ |
| | | insert hospital; |
| | | } |
| | | } |
| | | //WLIG-BS2CJW ---20200807---update By rentongxiao ---End |
| | | |
| | | //新建 客户变更申请 |
| | | Account_Delay_Apply__c ada = new Account_Delay_Apply__c(); |
| | | ada.Hospital__c = hospital.Id; |
| | | ada.ChangeReason__c = '地址错误'; |
| | | ada.Is_Active__c = '申请中'; |
| | | ada.Is_upload_file__c = true; |
| | | ada.OpenWindow__c = user5.Id; |
| | | ada.InstitutionalType__c = '非医疗机构'; |
| | | ada.CreatedById = toUser.Id; |
| | | |
| | | if (Test.isRunningTest()) { |
| | | System.runAs(new User(Id = UserInfo.getUserId())){ |
| | | insert ada; |
| | | } |
| | | } |
| | | |
| | | // 画面迁移--沟通应答画面 |
| | | PageReference page = new PageReference('/apex/AccChangeApprovalResponseControllerPopUp?accid=' + ada.Id + '&type=response2user'); |
| | | System.Test.setCurrentPage(page); |
| | | AccChangeApprovalResponseController controller3 = new AccChangeApprovalResponseController(); |
| | | controller3.init(); |
| | | |
| | | controller3.cc.Response__c = 'test goutong'; |
| | | controller3.ra.CreatedBy.Email = '111111111111'; |
| | | // 发送按钮 |
| | | controller3.saveBtn(); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | |
| | | static void setupTestData() { |
| | | ControllerUtil.EscapeNFM001Trigger = true; |
| | | |
| | | // 省 |
| | | Address_Level__c al = new Address_Level__c(); |
| | | al.Name = '東京'; |
| | |
| | | hospital.State_Master__c = al.id; |
| | | hospital.City_Master__c = al2.id; |
| | | hospital.Town__c = '东京'; |
| | | |
| | | insert hospital; |
| | | |
| | | |
| | | // 戦略科室を得る |
| | | Account[] strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_OTH']; |
| | |
| | | dep.Hospital__c = hospital.Id; |
| | | insert dep; |
| | | |
| | | // 20220119 ljh SFDC-C9V84U start |
| | | Contact contact2 = new Contact(); |
| | | contact2.AccountId = dep.Id; |
| | | contact2.FirstName = '責任者'; |
| | | contact2.LastName = 'test1经销商'; |
| | | insert contact2; |
| | | // 20220119 ljh SFDC-C9V84U end |
| | | |
| | | // 产品 |
| | | Product2 pro1 = new Product2(Name='name01',IsActive=true,Family='GI', |
| | |
| | | // raObj.Request_return_day__c = Date.toDay(); // 预定归还日 |
| | | // B.OLY_OCM-669 入力规则: 希望借用天数不能为空 |
| | | raObj.Phone_number__c = '1234567890'; |
| | | raObj.Loaner_medical_Staff__c = contact2.Id; |
| | | raObj.Loaner_medical_Staff__c = contact2.Id; |
| | | insert raObj; |
| | | |
| | | //---------------------------主体 两个附属品(个体管理 数量管理) |
| | |
| | | // B.OLY_OCM-669 入力规则: 希望借用天数不能为空 |
| | | raObj.Status__c = '草案中'; |
| | | raObj.Phone_number__c = '1234567890'; |
| | | raObj.Loaner_medical_Staff__c = contact2.Id; |
| | | raObj.Loaner_medical_Staff__c = contact2.Id; |
| | | insert raObj; |
| | | |
| | | // 保有设备 |
| | |
| | | // HWAG-BG682M start |
| | | ' isUpdateOwnerInform__c = true and ' + |
| | | // HWAG-BG682M end |
| | | ' Salesdepartment_HP__c = \'' + salesdepartment + '\''; |
| | | ' Id = \'' + salesdepartment + '\''; |
| | | // ' Salesdepartment_HP__c = \'' + salesdepartment + '\''; |
| | | } |
| | | system.debug('=====query:' + query); |
| | | return Database.getQueryLocator(query); |
| | |
| | | Map<id, List<String>> LeaderShareInsert = new Map<id, List<String>>(); |
| | | |
| | | List<String> AllLeaderShareNameList = new List<String>(); |
| | | List<String> AllLeaderShareNameList1 = new List<String>(); |
| | | |
| | | Map<String, String> teamRoleMap = new Map<String, String>(); |
| | | |
| | |
| | | List<String> DeptUsrList = new List<String>(); |
| | | for (String UsrName : acc.BF_Product_Leader__c.split('[,\\,]')) { |
| | | NameListunPrase.add(UsrName); |
| | | |
| | | String UsrName1 = UsrName.replaceAll(' ', ''); //zyh 2022-10-09 |
| | | AllLeaderShareNameList1.add(UsrName1); |
| | | AllLeaderShareNameList.add(UsrName); |
| | | teamRoleMap.put(UsrName, '推广担当'); |
| | | |
| | |
| | | //检索所有担当人 |
| | | //讲昵称和id进行配对 |
| | | List<User> loopUser = [select id, Alias__c from user where Alias__c in:AllLeaderShareNameList]; |
| | | List<User> loopUser1 = [select id,Name, Alias__c,Name_test__c from user where Name_test__c in:AllLeaderShareNameList1]; |
| | | System.debug('ceshi11111111=========='+loopUser1); |
| | | Map<String, id> allLearUserMap = new Map<String, id>(); |
| | | Map<id, String> allLearidUserMap = new Map<id, String>(); |
| | | |
| | |
| | | Integer workdays = UpdateUserTextColBatch.getOlympusWorkDayCount(mon1stDate, toDate); |
| | | //每月到昨天的工作日 |
| | | Integer workdays1 = UpdateUserTextColBatch.getOlympusWorkDayCount(mon1stDate, yesterDate); |
| | | |
| | | Integer day = Date.today().day(); |
| | | System.debug(day + '===========123'); |
| | | //Integer Soakup_NotExecute_Day = Integer.valueOf(System.Label.Soakup_NotExecute_Day); |
| | | Integer SSBacth_Execute_Day = Integer.valueOf(System.Label.SSBacth_Execute_Day); |
| | | if (workdays1 == SSBacth_Execute_Day || workdays != SSBacth_Execute_Day) { |
| | | Id execBTId = Database.executeBatch(new AccountDailyUpdateBatch('1.华北'),4); |
| | | execBTId = Database.executeBatch(new AccountDailyUpdateBatch('2.东北'),4); |
| | | execBTId = Database.executeBatch(new AccountDailyUpdateBatch('3.西北'),4); |
| | | execBTId = Database.executeBatch(new AccountDailyUpdateBatch('4.西南'),4); |
| | | execBTId = Database.executeBatch(new AccountDailyUpdateBatch('5.华东'),3); |
| | | execBTId = Database.executeBatch(new AccountDailyUpdateBatch('6.华南'),4); |
| | | // if (workdays1 == SSBacth_Execute_Day || workdays != SSBacth_Execute_Day) { // 2023-3-1 zyh 注释 |
| | | if (day != SSBacth_Execute_Day) { // 2023-3-1 zyh add |
| | | // Id execBTId = Database.executeBatch(new AccountDailyUpdateBatch('1.华北'),4); // 2022-06-01 zyh udate |
| | | // execBTId = Database.executeBatch(new AccountDailyUpdateBatch('2.东北'),4); // 2022-06-01 zyh udate |
| | | // execBTId = Database.executeBatch(new AccountDailyUpdateBatch('3.西北'),4); // 2022-06-01 zyh udate |
| | | // execBTId = Database.executeBatch(new AccountDailyUpdateBatch('4.西南'),4); // 2022-06-01 zyh udate |
| | | // execBTId = Database.executeBatch(new AccountDailyUpdateBatch('5.华东'),3); // 2022-06-01 zyh udate |
| | | // execBTId = Database.executeBatch(new AccountDailyUpdateBatch('6.华南'),4); // 2022-06-01 zyh udate |
| | | Id execBTId = Database.executeBatch(new AccountDailyUpdateBatch('1.华北'),2); // 2022-06-01 zyh udate |
| | | execBTId = Database.executeBatch(new AccountDailyUpdateBatch('2.东北'),2); // 2022-06-01 zyh udate |
| | | execBTId = Database.executeBatch(new AccountDailyUpdateBatch('3.西北'),2); // 2022-06-01 zyh udate |
| | | execBTId = Database.executeBatch(new AccountDailyUpdateBatch('4.西南'),2); // 2022-06-01 zyh udate |
| | | execBTId = Database.executeBatch(new AccountDailyUpdateBatch('5.华东'),2); // 2022-06-01 zyh udate |
| | | execBTId = Database.executeBatch(new AccountDailyUpdateBatch('6.华南'),2); // 2022-06-01 zyh udate |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | @isTest static void test_method_one() { |
| | | // Implement test code |
| | | String CRON_EXP = '0 0 0 3 9 ? 2022'; |
| | | String CRON_EXP = '0 0 0 4 2 ? 2025'; |
| | | System.Test.startTest(); |
| | | // Schedule the test job |
| | | String jobId = system.schedule('AccountDailyUpdateBatchScheduleTest', CRON_EXP, new AccountDailyUpdateBatchSchedule()); |
| New file |
| | |
| | | public without sharing class AccountDelayApplyHandler extends Oly_TriggerHandler { |
| | | private Map<Id, Account_Delay_Apply__c> newMap; |
| | | private Map<Id, Account_Delay_Apply__c> oldMap; |
| | | private List<Account_Delay_Apply__c> newList; |
| | | private List<Account_Delay_Apply__c> oldList; |
| | | |
| | | public AccountDelayApplyHandler() { |
| | | this.newMap = (Map<Id, Account_Delay_Apply__c>) Trigger.newMap; |
| | | this.oldMap = (Map<Id, Account_Delay_Apply__c>) Trigger.oldMap; |
| | | this.newList = (List<Account_Delay_Apply__c>) Trigger.new; |
| | | this.oldList = (List<Account_Delay_Apply__c>) Trigger.old; |
| | | } |
| | | |
| | | protected override void beforeInsert(){ |
| | | // OpenWindow(); |
| | | OpenWindow1(); |
| | | } |
| | | protected override void afterInsert(){ |
| | | MultiOption(); |
| | | } |
| | | protected override void beforeUpdate(){ |
| | | MultiOption(); |
| | | setColumn(); |
| | | // OpenWindow(); |
| | | CustomizePageJudge(); |
| | | } |
| | | protected override void afterUpdate(){ |
| | | MultiOption(); |
| | | setAccColumn(); |
| | | } |
| | | |
| | | //多选项数据统计 |
| | | private void MultiOption(){ |
| | | //创建参数 key:Sobject对象 value:发生改变的选项列表字段集合 (哪个选项列表发生变化就把哪个当做参数) |
| | | Map<SObject,List<String>> data = new Map<SObject,List<String>>(); |
| | | for (Account_Delay_Apply__c ada : newList) { |
| | | List<String> columsList = new List<String>(); |
| | | Account_Delay_Apply__c oldada = null; |
| | | if (Trigger.isUpdate) { |
| | | oldada = oldMap.get(ada.Id); |
| | | } |
| | | |
| | | //变更理由(可多选) |
| | | if (oldada == null || oldada.ChangeReason__c != ada.ChangeReason__c) { |
| | | columsList.add('ChangeReason__c'); |
| | | } |
| | | |
| | | data.put(ada, columsList); |
| | | } |
| | | |
| | | SplitOptionListUtil util = new SplitOptionListUtil(); |
| | | util.makeObject(data); |
| | | |
| | | } |
| | | |
| | | // //营业窗口 |
| | | // private void OpenWindow(){ |
| | | // Map<String, OCM_Management_Province__c> mpMap = new Map<String, OCM_Management_Province__c>(); |
| | | // Set<String> accOCSMset = new Set<String>(); |
| | | |
| | | // for(Account_Delay_Apply__c ada1 : newList){ |
| | | // Account_Delay_Apply__c oldada1 = null; |
| | | // if(Trigger.isUpdate){ |
| | | |
| | | // oldada1 = oldMap.get(ada1.Id); |
| | | |
| | | // if(ada1.OCM_man_province_HP__c != oldada1.OCM_man_province_HP__c){ |
| | | // accOCSMset.add(ada1.OCM_man_province_HP__c); |
| | | // } |
| | | // } |
| | | // if(Trigger.isInsert){ |
| | | // accOCSMset.add(ada1.OCM_man_province_HP__c); |
| | | // } |
| | | |
| | | // } |
| | | |
| | | // if(null !=accOCSMset){ |
| | | // List<OCM_Management_Province__c> mpList = |
| | | // [select id, Name, Window1__c from OCM_Management_Province__c where Name =: accOCSMset]; |
| | | |
| | | // for (OCM_Management_Province__c mp : mpList) { |
| | | // mpMap.put(mp.Name, mp); |
| | | // } |
| | | // } |
| | | |
| | | // for(Account_Delay_Apply__c ada2 : newList){ |
| | | // if(Trigger.isInsert || Trigger.isUpdate){ |
| | | // if(null!=mpMap && mpMap.containsKey(ada2.OCM_man_province_HP__c)){ |
| | | // OCM_Management_Province__c omp = mpMap.get(ada2.OCM_man_province_HP__c); |
| | | // if (omp != null) { |
| | | // ada2.OpenWindow__c = omp.Window1__c; |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | // } |
| | | |
| | | // } |
| | | |
| | | //营业窗口 |
| | | private void OpenWindow1(){ |
| | | Map<String, OCM_Management_Province__c> mpMap = new Map<String, OCM_Management_Province__c>(); |
| | | List<OCM_Management_Province__c> mpList = new List<OCM_Management_Province__c>(); |
| | | Set<String> accId = new Set<String>(); |
| | | Set<String> accOCSMset = new Set<String>(); |
| | | |
| | | for(Account_Delay_Apply__c ada1 : newList){ |
| | | Account_Delay_Apply__c oldada1 = null; |
| | | if(Trigger.isInsert){ |
| | | accId.add(ada1.Hospital__c); |
| | | } |
| | | |
| | | } |
| | | |
| | | if(accId.size() > 0){ |
| | | List<Account> accList = [SELECT Id, Name, OCM_man_province_HP__c |
| | | FROM Account |
| | | WHERE id in :accId]; |
| | | for(Account acc : accList){ |
| | | accOCSMset.add(acc.OCM_man_province_HP__c); |
| | | } |
| | | |
| | | } |
| | | |
| | | if(null !=accOCSMset){ |
| | | mpList = [select id, Name, Window1__c from OCM_Management_Province__c where Name =: accOCSMset]; |
| | | } |
| | | |
| | | for(Account_Delay_Apply__c ada2 : newList){ |
| | | for(OCM_Management_Province__c omp : mpList){ |
| | | if(Trigger.isInsert){ |
| | | ada2.OpenWindow__c = omp.Window1__c; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | //提交时设置old字段的值 |
| | | private void setColumn(){ |
| | | |
| | | List<String> accIds = new List<String>(); |
| | | List<Account_Delay_Apply__c> alist = new List<Account_Delay_Apply__c>(); |
| | | |
| | | for (Account_Delay_Apply__c ada :newList ) { |
| | | //判断更新前后的状态(是否有效)是否不同 若不同,则判断更新后的状态是否为'审批中' |
| | | if ((ada.Is_Active__c != oldMap.get(ada.Id).Is_Active__c) && ada.Is_Active__c == '申请中' ) { |
| | | alist.add(ada); |
| | | accIds.add(ada.Hospital__c); |
| | | } |
| | | } |
| | | if (accIds.size() == 0) { |
| | | return; |
| | | }else{ |
| | | Map<String,Account> accMap = new Map<String,Account>(); |
| | | List<Account> statusList = [SELECT Id, Name, Website, Site, |
| | | Is_Active__c, Feature__c, Attribute_Type__c, Speciality_Type__c, |
| | | Abbreviation__c, Street__c, City_Master__c, Field3_companyname__c, |
| | | State_Master__c, Grade__c, Address__c, Alias_Name2__c, |
| | | Town__c, Postal_Code__c |
| | | FROM Account |
| | | WHERE id in :accIds]; |
| | | |
| | | for (Account acc :statusList ) { |
| | | accMap.put(acc.Id, acc); |
| | | } |
| | | |
| | | for (Account_Delay_Apply__c ada : alist) { |
| | | ada.Feature_old__c = accMap.get(ada.Hospital__c).Feature__c; |
| | | ada.Attribute_Type_old__c = accMap.get(ada.Hospital__c).Attribute_Type__c; |
| | | ada.Speciality_Type_old__c = accMap.get(ada.Hospital__c).Speciality_Type__c; |
| | | ada.Abbreviation_old__c = accMap.get(ada.Hospital__c).Abbreviation__c; |
| | | ada.Street_old__c = accMap.get(ada.Hospital__c).Street__c; |
| | | ada.HospitalName_old__c = accMap.get(ada.Hospital__c).Name; |
| | | ada.City_Master_old__c = accMap.get(ada.Hospital__c).City_Master__c; |
| | | ada.Field3_companyname_old__c = accMap.get(ada.Hospital__c).Field3_companyname__c; |
| | | ada.State_Master_old__c = accMap.get(ada.Hospital__c).State_Master__c; |
| | | ada.Grade_old__c = accMap.get(ada.Hospital__c).Grade__c; |
| | | //ada.Address_Together_old__c = accMap.get(ada.Hospital__c).Address__c; |
| | | ada.Website_old__c = accMap.get(ada.Hospital__c).Website; |
| | | ada.Site_old__c = accMap.get(ada.Hospital__c).Site; |
| | | ada.Alias_Name2_old__c = accMap.get(ada.Hospital__c).Alias_Name2__c; |
| | | ada.Town_old__c = accMap.get(ada.Hospital__c).Town__c; |
| | | ada.Postal_Code_old__c = accMap.get(ada.Hospital__c).Postal_Code__c; |
| | | |
| | | } |
| | | |
| | | // for (Account acc : statusList) { |
| | | // acc.Status = '申请中'; |
| | | // } |
| | | update statusList; |
| | | } |
| | | |
| | | } |
| | | |
| | | //变更有效时反写客户 |
| | | private void setAccColumn(){ |
| | | |
| | | List<String> accIds = new List<String>(); |
| | | List<String> adaIds = new List<String>(); |
| | | // List<Account_Delay_Apply__c> alist = new List<Account_Delay_Apply__c>(); |
| | | // List<Account> acclist = new List<Account>(); |
| | | List<Account> updacclist = new List<Account>(); |
| | | |
| | | for (Account_Delay_Apply__c ada :newList ) { |
| | | //判断更新前后的状态(是否有效)是否不同 若不同,则判断更新后的状态是否为'审批中' |
| | | if ((ada.Is_Active__c != oldMap.get(ada.Id).Is_Active__c) && ada.Is_Active__c == '审批通过' ) { |
| | | // alist.add(ada); |
| | | adaIds.add(ada.Id); |
| | | accIds.add(ada.Hospital__c); |
| | | } |
| | | } |
| | | if (accIds.size() == 0) { |
| | | return; |
| | | }else{ |
| | | Map<String,Account> accMap = new Map<String,Account>(); |
| | | List<Account> statusList = [SELECT Id, Name, Website, Site, |
| | | Is_Active__c, Feature__c, Attribute_Type__c, Speciality_Type__c, |
| | | Abbreviation__c, Street__c, City_Master__c, Field3_companyname__c, |
| | | State_Master__c, Grade__c, Address__c, Alias_Name2__c, |
| | | Town__c, Postal_Code__c, HospitalType__c, InstitutionalType__c,WhetherRiskPassing__c,IsUnlock__c |
| | | FROM Account |
| | | WHERE id in :accIds]; |
| | | |
| | | List<Account_Delay_Apply__c> adastatusList = [SELECT Id, Name, Website__c, Site__c, |
| | | Is_Active__c, Feature__c, Attribute_Type__c, Speciality_Type__c, |
| | | Abbreviation__c, Street__c, City_Master__c, Field3_companyname__c, |
| | | State_Master__c, Grade__c, Alias_Name2__c, |
| | | Town__c, Postal_Code__c, HospitalName__c, Hospital__c, |
| | | HospitalType__c, InstitutionalType__c,WhetherRiskPassing__c |
| | | FROM Account_Delay_Apply__c |
| | | WHERE id in :adaIds]; |
| | | |
| | | for (Account acc :statusList ) { |
| | | accMap.put(acc.Id, acc); |
| | | } |
| | | |
| | | for (Account_Delay_Apply__c ada : adastatusList) { |
| | | accMap.get(ada.Hospital__c).Feature__c = ada.Feature__c; |
| | | accMap.get(ada.Hospital__c).Attribute_Type__c = ada.Attribute_Type__c; |
| | | accMap.get(ada.Hospital__c).Speciality_Type__c = ada.Speciality_Type__c; |
| | | accMap.get(ada.Hospital__c).Abbreviation__c = ada.Abbreviation__c; |
| | | accMap.get(ada.Hospital__c).Street__c = ada.Street__c; |
| | | accMap.get(ada.Hospital__c).Name = ada.HospitalName__c; |
| | | accMap.get(ada.Hospital__c).City_Master__c = ada.City_Master__c; |
| | | accMap.get(ada.Hospital__c).Field3_companyname__c = ada.Field3_companyname__c; |
| | | accMap.get(ada.Hospital__c).State_Master__c = ada.State_Master__c; |
| | | accMap.get(ada.Hospital__c).Grade__c = ada.Grade__c; |
| | | // accMap.get(ada.Hospital__c).Address__c = ada.Address_Together__c; |
| | | accMap.get(ada.Hospital__c).Website = ada.Website__c; |
| | | accMap.get(ada.Hospital__c).Site = ada.Site__c; |
| | | accMap.get(ada.Hospital__c).Alias_Name2__c = ada.Alias_Name2__c; |
| | | accMap.get(ada.Hospital__c).Town__c = ada.Town__c; |
| | | accMap.get(ada.Hospital__c).Postal_Code__c = ada.Postal_Code__c; |
| | | |
| | | accMap.get(ada.Hospital__c).HospitalType__c = ada.HospitalType__c; |
| | | accMap.get(ada.Hospital__c).InstitutionalType__c = ada.InstitutionalType__c; |
| | | accMap.get(ada.Hospital__c).WhetherRiskPassing__c= ada.WhetherRiskPassing__c; |
| | | accMap.get(ada.Hospital__c).IsUnlock__c= true; //跳过验证规则 |
| | | system.debug('原数据==='+accMap.get(ada.Hospital__c).IsUnlock__c); |
| | | updacclist.add(accMap.get(ada.Hospital__c)); |
| | | |
| | | } |
| | | //if(updacclist.size() > 0){ |
| | | // update updacclist; |
| | | //} |
| | | if(updacclist.size()>0){ |
| | | //一个客户更新失败 |
| | | List<String> failedaccList = new List<String>(); |
| | | Database.SaveResult[] saveAccResults = Database.update(updacclist,false); |
| | | for(Integer i = 0;i<saveAccResults.size();i++) { |
| | | if(!saveAccResults.get(i).isSuccess() ){ |
| | | //将更新失败的客户添加到集合中 |
| | | failedaccList.add(String.valueOf( updacclist.get(i).id ).substring(0,15)); |
| | | } |
| | | } |
| | | |
| | | //更新成功后,清除客户上的 是否解锁 |
| | | List<Account> successAccList = new List<Account>(); |
| | | for(Account statusacc:statusList){ |
| | | if(failedaccList.contains( String.valueOf( statusacc.id ).substring(0,15) )){ |
| | | system.debug('更新失败=='+saveAccResults); |
| | | //更新失败,则不清除标识 |
| | | }else { |
| | | system.debug('清除标识==='+statusacc.IsUnlock__c); |
| | | //更新成功,清除标识 |
| | | statusacc.IsUnlock__c = false; |
| | | successAccList.add(statusacc); |
| | | } |
| | | } |
| | | |
| | | //清除标识 |
| | | if(successAccList.size()>0){ |
| | | update successAccList; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | public void CustomizePageJudge(){ |
| | | |
| | | for (Account_Delay_Apply__c ada : newList){ |
| | | System.debug('lt123-----new审批步骤-----'+ada.ApprovalSteps__c); |
| | | System.debug('lt123-----old审批步骤-----'+oldMap.get(ada.Id).ApprovalSteps__c); |
| | | if(ada.ApprovalSteps__c != oldMap.get(ada.Id).ApprovalSteps__c){ |
| | | System.debug('lt123-----审批步骤改变-----'); |
| | | if(ada.CustomizePageFlg__c == true){ |
| | | System.debug('lt123-----ada.CustomizePageFlg__c-----'+ada.CustomizePageFlg__c); |
| | | ada.CustomizePageFlg__c = false; |
| | | }else{ |
| | | System.debug('lt123-----else,ada.CustomizePageFlg__c-----'+ada.CustomizePageFlg__c); |
| | | ada.addError('请点击链接(相关项)确认具体信息后审批。'); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class AccountDelayApplyHandlerTest { |
| | | @isTest |
| | | static void TestMethod1() { |
| | | |
| | | //新建省 |
| | | Address_Level__c al = new Address_Level__c(); |
| | | al.Name = '東京'; |
| | | al.Level1_Code__c = 'CN-99'; |
| | | al.Level1_Sys_No__c = '999999'; |
| | | insert al; |
| | | |
| | | Address_Level__c al1 = new Address_Level__c(); |
| | | al1.Name = '北京'; |
| | | al1.Level1_Code__c = 'CN-99'; |
| | | al1.Level1_Sys_No__c = '999999'; |
| | | insert al1; |
| | | |
| | | //新建客户 |
| | | RecordType rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'Hp']; |
| | | |
| | | Account acc = new Account(); |
| | | acc.RecordTypeId = rectCo.Id; |
| | | acc.Name = 'HP test1'; |
| | | acc.Is_Active__c = '有効'; |
| | | insert acc; |
| | | |
| | | //新建 客户变更申请 |
| | | Account_Delay_Apply__c ada = new Account_Delay_Apply__c(); |
| | | ada.Hospital__c = acc.Id; |
| | | ada.ChangeReason__c = '地址错误'; |
| | | ada.State_Master__c = al.Id; |
| | | insert ada; |
| | | |
| | | ada.ChangeReason__c = '其他信息修改'; |
| | | ada.State_Master__c = al1.Id; |
| | | update ada; |
| | | } |
| | | |
| | | @isTest |
| | | static void TestMethod2() { |
| | | |
| | | //新建省 |
| | | Address_Level__c al = new Address_Level__c(); |
| | | al.Name = '東京'; |
| | | al.Level1_Code__c = 'CN-99'; |
| | | al.Level1_Sys_No__c = '999999'; |
| | | insert al; |
| | | |
| | | Address_Level__c al1 = new Address_Level__c(); |
| | | al1.Name = '北京'; |
| | | al1.Level1_Code__c = 'CN-99'; |
| | | al1.Level1_Sys_No__c = '999999'; |
| | | insert al1; |
| | | |
| | | //新建客户 |
| | | RecordType rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'Hp']; |
| | | |
| | | Account acc = new Account(); |
| | | acc.RecordTypeId = rectCo.Id; |
| | | acc.Name = 'HP test1'; |
| | | acc.Is_Active__c = '有効'; |
| | | insert acc; |
| | | |
| | | //新建 客户变更申请 |
| | | Account_Delay_Apply__c ada = new Account_Delay_Apply__c(); |
| | | ada.Hospital__c = acc.Id; |
| | | ada.ChangeReason__c = '地址错误'; |
| | | ada.State_Master__c = al.Id; |
| | | ada.Is_Active__c = '草案中'; |
| | | insert ada; |
| | | |
| | | ada.ChangeReason__c = '其他信息修改'; |
| | | ada.State_Master__c = al1.Id; |
| | | ada.Is_Active__c = '申请中'; |
| | | update ada; |
| | | |
| | | ada.Is_Active__c = '审批通过'; |
| | | update ada; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | is_Alert_Qualify = false; |
| | | |
| | | if (accList != null && accList.size() > 0) { |
| | | //空指针报错修改 thh 20220411 start |
| | | //空指针报错修改 thh 20220411 start |
| | | if ('Draft'.equals(accList[0].Quolified_Approve_Status__c) |
| | | && accList[0].If_Need_Quolified__c == true) { |
| | | is_Alert_Qualify = true; |
| | | } |
| | | //空指针报错修改 thh 20220411 end |
| | | //空指针报错修改 thh 20220411 end |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | global class AccountServiceOfTarget1Hto2HBatch implements Database.Batchable<sObject> { |
| | | public String query; |
| | | public List<String> hospId; |
| | | global AccountServiceOfTarget1Hto2HBatch() { |
| | | this.query = query; |
| | | } |
| | | global AccountServiceOfTarget1Hto2HBatch(List<String> hospId) { |
| | | this.query = query; |
| | | this.hospId = hospId; |
| | | } |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | query = 'select id,OCSM_Period_half__c,OCSM_Period__c,Account_HP__c,Account_HP__r.name,' |
| | | +' Target_Correlation_Lightsource__c,Target_Rigid_Mirror_2__c,Target_Soft_Mirror_2__c,' |
| | | +' Renew_Target_Correlation_Lightsource__c,Renew_Target_Rigid_Mirror_2__c,Renew_Target_Soft_Mirror_2__c' |
| | | +' from Account_Service_Of_Target__c where OCSM_Period_half__c = \'2H\' '; |
| | | if (this.hospId!=null && this.hospId.size()!=0) { |
| | | query +=' and Account_HP__c in :hospId'; |
| | | } |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Account_Service_Of_Target__c> asotList) { |
| | | Map<String,Account_Service_Of_Target__c> map1 = new Map<String,Account_Service_Of_Target__c>(); |
| | | Map<String,Account_Service_Of_Target__c> map2 = new Map<String,Account_Service_Of_Target__c>(); |
| | | List<Account_Service_Of_Target__c> asotUPList = new List<Account_Service_Of_Target__c>(); |
| | | List<Account_Service_Of_Target__c> asotList2 = [select id,OCSM_Period_half__c,OCSM_Period__c,Account_HP__c,Account_HP__r.name, |
| | | Target_Correlation_Lightsource__c,Target_Rigid_Mirror_2__c,Target_Soft_Mirror_2__c, |
| | | Renew_Target_Correlation_Lightsource__c,Renew_Target_Rigid_Mirror_2__c,Renew_Target_Soft_Mirror_2__c |
| | | from Account_Service_Of_Target__c where OCSM_Period_half__c = '1H']; |
| | | for (Account_Service_Of_Target__c asot :asotList ) { |
| | | map2.put(asot.Account_HP__c,asot); |
| | | system.debug('添加到map2'); |
| | | } |
| | | for (Account_Service_Of_Target__c asot :asotList2 ) { |
| | | map1.put(asot.Account_HP__c,asot); |
| | | system.debug('添加到map1'); |
| | | } |
| | | system.debug('@@@@map1='+map1); |
| | | system.debug('@@@@map2='+map2); |
| | | for ( Account_Service_Of_Target__c asot:map1.values()) { |
| | | system.debug('@@@@2H==='+map2.get(asot.Account_HP__c)); |
| | | if ( map2.get(asot.Account_HP__c) !=null) { |
| | | Account_Service_Of_Target__c asotNew = new Account_Service_Of_Target__c(); |
| | | asotNew.id = map2.get(asot.Account_HP__c).id; |
| | | asotNew.Target_Correlation_Lightsource__c = asot.Target_Correlation_Lightsource__c; |
| | | asotNew.Target_Rigid_Mirror_2__c = asot.Target_Rigid_Mirror_2__c; |
| | | asotNew.Target_Soft_Mirror_2__c = asot.Target_Soft_Mirror_2__c; |
| | | asotNew.Renew_Target_Correlation_Lightsource__c = asot.Renew_Target_Correlation_Lightsource__c; |
| | | asotNew.Renew_Target_Rigid_Mirror_2__c = asot.Renew_Target_Rigid_Mirror_2__c; |
| | | asotNew.Renew_Target_Soft_Mirror_2__c = asot.Renew_Target_Soft_Mirror_2__c; |
| | | asotUPList.add(asotNew); |
| | | } |
| | | } |
| | | if (asotUPList!=null && asotUPList.size()!=0) { |
| | | upsert asotUPList; |
| | | } |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class AccountServiceOfTarget1Hto2HBatchTest { |
| | | static testMethod void testMethod1() { |
| | | system.Test.startTest(); |
| | | database.executeBatch(new AccountServiceOfTarget1Hto2HBatch(),200); |
| | | system.Test.stopTest(); |
| | | } |
| | | |
| | | @testSetup |
| | | private static void initData(){ |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | if (rectSct.size() == 0) { |
| | | return; |
| | | } |
| | | List<RecordType> rectDpt = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '診療科 消化科']; |
| | | if (rectDpt.size() == 0) { |
| | | return; |
| | | } |
| | | Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | User MacOwner = new User(Test_staff__c = true, LastName = 'hp1', FirstName = 'owner1', Alias = 'hp', CommunityNickname = 'hpOwner1', Email = 'olympus_hpowner@sunbridge.com',Job_Category__c = '销售服务', Username = 'olympus_hpowner@sunbridge.com1', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id); |
| | | insert MacOwner; |
| | | |
| | | Account hospital = new Account(); |
| | | hospital.RecordTypeId = rectCo[0].Id; |
| | | hospital.Name = 'NFM007Testhospital'; |
| | | insert hospital; |
| | | |
| | | // 戦略科室を得る |
| | | List<Account> strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_GI']; |
| | | Account section = new Account(); |
| | | section.RecordTypeId = rectSct[0].Id; |
| | | section.Name = '*'; |
| | | section.Department_Class_Label__c = '消化科'; |
| | | section.ParentId = hospital.Id; |
| | | section.Hospital_Department_Class__c = hospital.Id; |
| | | section.AgentCode_Ext__c = '9999900'; |
| | | insert section; |
| | | |
| | | Account depart = new Account(); |
| | | depart.RecordTypeId = rectDpt[0].Id; |
| | | depart.Name = '*'; |
| | | depart.Department_Name__c = 'NFM007TestDepart'; |
| | | depart.ParentId = strategicDep[0].Id; |
| | | depart.Department_Class__c = strategicDep[0].Id; |
| | | depart.Hospital__c = hospital.Id; |
| | | insert depart; |
| | | |
| | | Product2 prd1 = new Product2(); |
| | | prd1.ProductCode_Ext__c = 'Prd1'; |
| | | prd1.ProductCode = 'Prd1'; |
| | | prd1.Repair_Product_Code__c = 'Prd1_RP'; |
| | | prd1.Name = 'Prd1'; |
| | | prd1.Manual_Entry__c = false; |
| | | // prd1.Category2__c = '本体'; |
| | | prd1.Category3__c = '纤维镜'; |
| | | prd1.Category4__c = '妇科用硬性镜'; |
| | | // prd1.Category5__c = '260SL系列'; |
| | | prd1.Asset_Model_No__c = '1001'; |
| | | prd1.Important_product__c = true; |
| | | prd1.Important_Rroduct_1GI__c = true; |
| | | insert prd1; |
| | | |
| | | Product2 prd2 = new Product2(); |
| | | prd2.ProductCode_Ext__c = 'Prd2'; |
| | | prd2.ProductCode = 'Prd2'; |
| | | prd2.Repair_Product_Code__c = 'Prd2_RP'; |
| | | prd2.Name = 'Prd2'; |
| | | prd2.Manual_Entry__c = false; |
| | | // prd1.Category2__c = '本体'; |
| | | prd2.Category3__c = '光源'; |
| | | // prd2.Category4__c = 'SD EndoEYE'; |
| | | // prd1.Category5__c = '260SL系列'; |
| | | prd2.Asset_Model_No__c = '1001'; |
| | | prd2.Important_product__c = true; |
| | | prd2.Important_Rroduct_1GI__c = true; |
| | | insert prd2; |
| | | |
| | | Product2 prd3 = new Product2(); |
| | | prd3.ProductCode_Ext__c = 'Prd3'; |
| | | prd3.ProductCode = 'Prd3'; |
| | | prd3.Repair_Product_Code__c = 'Prd3_RP'; |
| | | prd3.Name = 'Prd3'; |
| | | prd3.Manual_Entry__c = false; |
| | | // prd1.Category2__c = '本体'; |
| | | prd3.Category3__c = '纤维镜'; |
| | | // prd2.Category4__c = 'SD EndoEYE'; |
| | | // prd1.Category5__c = '260SL系列'; |
| | | prd3.Asset_Model_No__c = '1001'; |
| | | prd3.Important_product__c = true; |
| | | prd3.Important_Rroduct_1GI__c = true; |
| | | insert prd3; |
| | | |
| | | Product2 prd4 = new Product2(); |
| | | prd4.ProductCode_Ext__c = 'Prd4'; |
| | | prd4.ProductCode = 'Prd4'; |
| | | prd4.Repair_Product_Code__c = 'Prd4_RP'; |
| | | prd4.Name = 'Prd4'; |
| | | prd4.Manual_Entry__c = false; |
| | | // prd1.Category2__c = '本体'; |
| | | prd4.Category4__c = '妇科用硬性镜'; |
| | | // prd2.Category4__c = 'SD EndoEYE'; |
| | | // prd1.Category5__c = '260SL系列'; |
| | | prd4.Asset_Model_No__c = '1001'; |
| | | prd4.Important_product__c = true; |
| | | prd4.Important_Rroduct_1GI__c = true; |
| | | insert prd4; |
| | | |
| | | Consumable_order_details2__c saledet1 = new Consumable_order_details2__c(); |
| | | saledet1.Name = 'OCM_01_001001'; |
| | | // saledet1.Consumable_order_minor__c = Order1.Id; |
| | | saledet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | saledet1.Bar_Code__c = '0114953170032070111804001082K250BBBBB'; |
| | | // saledet1.Consumable_Product__c = prd1.Id; |
| | | saledet1.Used_account__c = section.Id; |
| | | saledet1.Delivery_List_RMB__c = 11; |
| | | saledet1.Box_Piece__c = '盒'; |
| | | saledet1.TracingCode__c = 'BBBBB'; |
| | | saledet1.SerialLotNo__c = '82K'; |
| | | saledet1.Guarantee_period_for_products__c = Date.today().addDays(5); |
| | | saledet1.Sterilization_limit__c = Date.today().addDays(5); |
| | | saledet1.Send_Date__c = null; |
| | | //saledet1.Dealer_Shipment__c = false; |
| | | saledet1.Arrive_date__c = null; |
| | | //saledet1.Dealer_Arrive__c = false; |
| | | saledet1.Used_date__c = null; |
| | | //saledet1.Dealer_Saled__c = false; |
| | | saledet1.Deliver_date__c = Date.today().addDays(-10); |
| | | insert saledet1; |
| | | |
| | | // 维修合同を作成する |
| | | Maintenance_Contract__c contract = new Maintenance_Contract__c(); |
| | | contract.Name = 'tect contract'; |
| | | contract.Hospital__c = hospital.Id; |
| | | contract.Department_Class__c = strategicDep[0].Id; |
| | | contract.Department__c = depart.Id; |
| | | contract.Service_Contract_Staff__c = MacOwner.Id; |
| | | contract.Payment_Plan_Sum_First__c = 1; |
| | | contract.Status__c = '契約満了'; |
| | | contract.Maintenance_Contract_No__c = '11123'; |
| | | contract.recordtypeId = |
| | | Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByDeveloperName().get('NewMaintenance_Contract').getRecordTypeId(); |
| | | contract.Not_Upper_limit_reason__c = ' 1'; |
| | | contract.Contract_Start_Date__c = Date.newInstance(2021,10,5); |
| | | contract.Contract_End_Date__c = Date.newInstance(2021,11,1); |
| | | contract.SalesOfficeCode_selection__c = '北京RC'; |
| | | contract.New_Contract_TypeF_Text__c = '续签合同'; |
| | | contract.IF_Target_Renew__c='1'; |
| | | contract.Contract_Conclusion_Date__c=Date.newInstance(2021,10,5); |
| | | system.assertEquals(contract.Contract_End_Date__c >= Date.newInstance(2021,10,1) && contract.Contract_End_Date__c <= Date.newInstance(2022,9,30),true); |
| | | insert contract; |
| | | |
| | | Maintenance_Contract__c contract2 = new Maintenance_Contract__c(); |
| | | contract2.Name = 'tect contract2'; |
| | | contract2.Hospital__c = hospital.Id; |
| | | contract2.Department_Class__c = strategicDep[0].Id; |
| | | contract2.Department__c = depart.Id; |
| | | contract2.Service_Contract_Staff__c = MacOwner.Id; |
| | | contract2.Payment_Plan_Sum_First__c = 1; |
| | | contract2.Status__c = '契約'; |
| | | contract2.Maintenance_Contract_No__c = '11123111'; |
| | | contract2.Not_Upper_limit_reason__c = ' 2'; |
| | | contract2.Contract_Start_Date__c = Date.newInstance(2021,10,5); |
| | | contract2.Contract_End_Date__c = Date.newInstance(2021,11,1); |
| | | contract2.SalesOfficeCode_selection__c = '北京RC'; |
| | | contract2.IF_Target_Renew__c='1'; |
| | | contract2.Contract_Conclusion_Date__c=Date.newInstance(2021,10,5); |
| | | system.assertEquals(contract2.Contract_End_Date__c >= Date.newInstance(2021,10,1) && contract2.Contract_End_Date__c <= Date.newInstance(2022,9,30),true); |
| | | insert contract2; |
| | | |
| | | asset ast = new asset(); |
| | | ast.Name = prd1.Name; |
| | | ast.Product2Id = prd1.Id; |
| | | ast.SerialNumber = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast.SLMark__c = 'Serial Number'; // 固定 dnInfo.SorLMark; |
| | | ast.Guarantee_period_for_products__c = saledet1.Guarantee_period_for_products__c; |
| | | ast.TracingCode__c = saledet1.TracingCode__c; |
| | | ast.Guaranteen_end__c = saledet1.Sterilization_limit__c; |
| | | ast.Barcode__c = saledet1.Bar_Code__c; |
| | | ast.Product_Serial_No__c = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast.Asset_Owner__c = '经销商资产'; |
| | | ast.AccountId = depart.Id; |
| | | ast.Department_Class__c = section.Id; |
| | | // ast.Asset_owner_delaer_name__c = hospital.Id; |
| | | ast.Hospital__c = hospital.Id; |
| | | ast.CurrentContract__c = contract.Id; |
| | | ast.CurrentContract_Asset_Price__c = 0; |
| | | ast.CurrentContract_F__c=contract.Id; |
| | | insert ast; |
| | | |
| | | asset ast1 = new asset(); |
| | | ast1.Name = prd2.Name; |
| | | ast1.Product2Id = prd2.Id; |
| | | ast1.SerialNumber = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast1.SLMark__c = 'Serial Number'; // 固定 dnInfo.SorLMark; |
| | | ast1.Guarantee_period_for_products__c = saledet1.Guarantee_period_for_products__c; |
| | | ast1.TracingCode__c = saledet1.TracingCode__c; |
| | | ast1.Guaranteen_end__c = saledet1.Sterilization_limit__c; |
| | | ast1.Barcode__c = saledet1.Bar_Code__c; |
| | | ast1.Product_Serial_No__c = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast1.Asset_Owner__c = '经销商资产'; |
| | | ast1.AccountId = depart.Id; |
| | | ast1.Department_Class__c = section.Id; |
| | | // ast.Asset_owner_delaer_name__c = hospital.Id; |
| | | ast1.Hospital__c = hospital.Id; |
| | | ast1.CurrentContract__c = contract2.Id; |
| | | ast1.CurrentContract_Asset_Price__c = 0; |
| | | insert ast1; |
| | | |
| | | asset ast2 = new asset(); |
| | | ast2.Name = prd3.Name; |
| | | ast2.Product2Id = prd3.Id; |
| | | ast2.SerialNumber = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast2.SLMark__c = 'Serial Number'; // 固定 dnInfo.SorLMark; |
| | | ast2.Guarantee_period_for_products__c = saledet1.Guarantee_period_for_products__c; |
| | | ast2.TracingCode__c = saledet1.TracingCode__c; |
| | | ast2.Guaranteen_end__c = saledet1.Sterilization_limit__c; |
| | | ast2.Barcode__c = saledet1.Bar_Code__c; |
| | | ast2.Product_Serial_No__c = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast2.Asset_Owner__c = '经销商资产'; |
| | | ast2.AccountId = depart.Id; |
| | | ast2.Department_Class__c = section.Id; |
| | | // ast.Asset_owner_delaer_name__c = hospital.Id; |
| | | ast2.Hospital__c = hospital.Id; |
| | | ast2.CurrentContract__c = contract.Id; |
| | | ast2.CurrentContract_Asset_Price__c = 0; |
| | | insert ast2; |
| | | |
| | | asset ast3 = new asset(); |
| | | ast3.Name = prd4.Name; |
| | | ast3.Product2Id = prd4.Id; |
| | | ast3.SerialNumber = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast3.SLMark__c = 'Serial Number'; // 固定 dnInfo.SorLMark; |
| | | ast3.Guarantee_period_for_products__c = saledet1.Guarantee_period_for_products__c; |
| | | ast3.TracingCode__c = saledet1.TracingCode__c; |
| | | ast3.Guaranteen_end__c = saledet1.Sterilization_limit__c; |
| | | ast3.Barcode__c = saledet1.Bar_Code__c; |
| | | ast3.Product_Serial_No__c = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast3.Asset_Owner__c = '经销商资产'; |
| | | ast3.AccountId = depart.Id; |
| | | ast3.Department_Class__c = section.Id; |
| | | // ast.Asset_owner_delaer_name__c = hospital.Id; |
| | | ast3.Hospital__c = hospital.Id; |
| | | ast3.CurrentContract__c = contract.Id; |
| | | ast3.CurrentContract_Asset_Price__c = 0; |
| | | insert ast3; |
| | | |
| | | |
| | | Account_Service_Of_Target__c asot=new Account_Service_Of_Target__c(); |
| | | asot.OCSM_Period_half__c='2H'; |
| | | asot.Account_HP__c=hospital.Id; |
| | | insert asot; |
| | | Account_Service_Of_Target__c asot2=new Account_Service_Of_Target__c(); |
| | | asot2.OCSM_Period_half__c='1H'; |
| | | asot2.Account_HP__c=hospital.Id; |
| | | insert asot2; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | } |
| | | } else { |
| | | classMap.put(rd.Department_Class__c,rd.Department_Name__c); |
| | | accountDep.add(rd.Department_Class__c); |
| | | if(rd.Department_Class__c != null) //zhj 2022-12-21 |
| | | accountDep.add(rd.Department_Class__c); |
| | | dpartmentMap.put(rd.Department_Class__c + rd.Department_Name__c,rd); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | //SWAG-CGG7UK【委托】 【P-OBSAP经销商协议】经销商协议所有人的修改权限 fy start |
| | | public static void UpdateSalesAssistant(List<Account> newList, Map<Id, Account> newMap, List<Account> oldList, Map<Id, Account> oldMap) { |
| | | // for(Account account : newList){ |
| | | // } |
| | | System.debug('newList[0]'+newList[0]); |
| | | System.debug('newList[0].OCM_man_province_HP__c'+newList[0].OCM_man_province_HP__c); |
| | | } |
| | | //SWAG-CGG7UK【委托】 【P-OBSAP经销商协议】经销商协议所有人的修改权限 fy end |
| | | } |
| | |
| | | // 测试类 AdvanceOpportunityTest |
| | | public with sharing class AdvanceOpportunityController { |
| | | public AdvanceOpportunityController(ApexPages.StandardController stdController) { |
| | | AdOpportunity = new Advance_Opportunity__c(); |
| | | } |
| | | public Advance_Opportunity__c AdOpportunity{get; set;} |
| | | public Boolean hasError { get; private set; } |
| | | public String aoId {get; set;} |
| | | public void init(){ |
| | | String aoId = ApexPages.currentPage().getParameters().get('id'); |
| | | List<Advance_Opportunity__c> aoList = [SELECT Id,MarketAdvance__c,AddOpportunity__c,BigContract__c,GradePro__c,AddPrice__c,Opportunity__c FROM Advance_Opportunity__c WHERE Opportunity__c = :aoId]; |
| | | if (aoList.size() == 0) { |
| | | |
| | | } else{ |
| | | AdOpportunity = aoList[0]; |
| | | } |
| | | aoId = ApexPages.currentPage().getParameters().get('id'); |
| | | // 20220620 ljh update SWAG-CFK9YX start |
| | | // List<Advance_Opportunity__c> aoList = [SELECT Id,MarketAdvance__c,AddOpportunity__c,BigContract__c,GradePro__c,AddPrice__c,Opportunity__c FROM Advance_Opportunity__c WHERE Opportunity__c = :aoId]; |
| | | List<Advance_Opportunity__c> aoList = [SELECT Id,MarketAdvance__c,KeepPushing__c,BigContract__c,GradePro__c,AddPrice__c,Opportunity__c FROM Advance_Opportunity__c WHERE Opportunity__c = :aoId]; |
| | | // 20220620 ljh update SWAG-CFK9YX edn |
| | | if (aoList.size() == 0) { |
| | | |
| | | } else{ |
| | | AdOpportunity = aoList[0]; |
| | | } |
| | | } |
| | | public void save(){ |
| | | if (String.isBlank(AdOpportunity.Opportunity__c)) { |
| | | AdOpportunity.Opportunity__c = ApexPages.currentPage().getParameters().get('id'); |
| | | } |
| | | // AdOpportunity.Name = 'ceshi'; |
| | | upsert AdOpportunity; |
| | | hasError = true; |
| | | try { |
| | | if (String.isBlank(AdOpportunity.Opportunity__c)) { |
| | | AdOpportunity.Opportunity__c = aoId; |
| | | } |
| | | // AdOpportunity.Name = 'ceshi'; |
| | | upsert AdOpportunity; |
| | | hasError=false; |
| | | } catch (Exception ex) { |
| | | system.debug('=====' + ex.getMessage()); |
| | | ApexPages.addMessages(ex); |
| | | } |
| | | } |
| | | } |
| | |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>41.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | | </ApexClass> |
| | |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>41.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | | </ApexClass> |
| | |
| | | idList.add(acc.id); |
| | | } |
| | | } |
| | | // 20210623 SQL优化 Start |
| | | // List<Account> exsitAcc = [select id,Hospital_Department_Class__c,name from Account where Hospital_Department_Class__c in:idList]; |
| | | List<Account> exsitAcc = new List<Account>(); |
| | | if (idList.size() > 0) { |
| | | exsitAcc = [select id,Hospital_Department_Class__c,name from Account where Hospital_Department_Class__c in:idList]; |
| | | } |
| | | |
| | | // 20210623 SQL优化 End |
| | | List<Account> exsitAcc = [select id,Hospital_Department_Class__c,name from Account where Hospital_Department_Class__c in:idList]; |
| | | for(Account acc: exsitAcc){ |
| | | exsitMapAcc.put(acc.Hospital_Department_Class__c, acc.name); |
| | | } |
| | |
| | | } |
| | | |
| | | protected override void beforeInsert() { |
| | | beforeSetValue(); |
| | | //zhj MEBG新方案改造 2022-11-30 start |
| | | //beforeSetValue(); |
| | | //zhj MEBG新方案改造 2022-11-30 end |
| | | } |
| | | protected override void beforeUpdate() { |
| | | beforeSetValue(); |
| | | //zhj MEBG新方案改造 2022-11-30 start |
| | | //beforeSetValue(); |
| | | //zhj MEBG新方案改造 2022-11-30 end |
| | | shareAgency_Contact_ToRole(this.newList); |
| | | } |
| | | |
| | |
| | | shareAgency_Contact_ToRole(this.newList); |
| | | } |
| | | |
| | | private void beforeSetValue() { |
| | | Set<String> nameSet = new Set<String>(); |
| | | Set<String> ahIdSet = new Set<String>(); |
| | | Map<String, Agency_Contact__c> keyMap = new Map<String, Agency_Contact__c>(); |
| | | for (Agency_Contact__c nObj : newList) { |
| | | if (String.isBlank(nObj.Agency_ID__c)) { |
| | | if (String.isBlank(nObj.getCloneSourceId()) == false) { |
| | | // 要注意 画面からしかないので、ここで selectする |
| | | Agency_Contact__c srcObj = [Select Id, Agency_Hospital__c, Contact__c, Hospital_ID18__c, Hospital_Name__c from Agency_Contact__c where Id = :nObj.getCloneSourceId()]; |
| | | if (String.isBlank(nObj.Agency_Hospital__c) == false |
| | | && String.isBlank(srcObj.Agency_Hospital__c) |
| | | && nObj.Hospital_ID18__c != srcObj.Hospital_ID18__c) { |
| | | nObj.Agency_Hospital__c.addError('请选择:' + srcObj.Hospital_Name__c); |
| | | } |
| | | if (String.isBlank(srcObj.Contact__c) == false) { |
| | | nObj.Contact__c = srcObj.Contact__c; |
| | | } |
| | | } |
| | | nObj.Agency_ID__c = nObj.Agency_ID_F__c; |
| | | } |
| | | nameSet.add(nObj.Name_Encrypted__c); |
| | | ahIdSet.add(nObj.Agency_Hospital__c); |
| | | // PIPL update Yin Mingjie 21/02/2022 start |
| | | // keyMap.put(nObj.Agency_Hospital__c + nObj.Name, nObj); |
| | | keyMap.put(nObj.Agency_Hospital__c + nObj.Name_Encrypted__c, nObj); |
| | | // PIPL update Yin Mingjie 21/02/2022 end |
| | | } |
| | | //zhj MEBG新方案改造 2022-11-30 start |
| | | // private void beforeSetValue() { |
| | | // Set<String> nameSet = new Set<String>(); |
| | | // Set<String> ahIdSet = new Set<String>(); |
| | | // Map<String, Agency_Contact__c> keyMap = new Map<String, Agency_Contact__c>(); |
| | | // for (Agency_Contact__c nObj : newList) { |
| | | // if (String.isBlank(nObj.Agency_ID__c)) { |
| | | // if (String.isBlank(nObj.getCloneSourceId()) == false) { |
| | | // // 要注意 画面からしかないので、ここで selectする |
| | | // Agency_Contact__c srcObj = [Select Id, Agency_Hospital__c, Contact__c, Hospital_ID18__c, Hospital_Name__c from Agency_Contact__c where Id = :nObj.getCloneSourceId()]; |
| | | // if (String.isBlank(nObj.Agency_Hospital__c) == false |
| | | // && String.isBlank(srcObj.Agency_Hospital__c) |
| | | // && nObj.Hospital_ID18__c != srcObj.Hospital_ID18__c) { |
| | | // nObj.Agency_Hospital__c.addError('请选择:' + srcObj.Hospital_Name__c); |
| | | // } |
| | | // if (String.isBlank(srcObj.Contact__c) == false) { |
| | | // nObj.Contact__c = srcObj.Contact__c; |
| | | // } |
| | | // } |
| | | // nObj.Agency_ID__c = nObj.Agency_ID_F__c; |
| | | // } |
| | | // nameSet.add(nObj.Name_Encrypted__c); |
| | | // ahIdSet.add(nObj.Agency_Hospital__c); |
| | | // // PIPL update Yin Mingjie 21/02/2022 start |
| | | // // keyMap.put(nObj.Agency_Hospital__c + nObj.Name, nObj); |
| | | // keyMap.put(nObj.Agency_Hospital__c + nObj.Name_Encrypted__c, nObj); |
| | | // // PIPL update Yin Mingjie 21/02/2022 end |
| | | // } |
| | | |
| | | // PIPL update Yin Mingjie 21/02/2022 start |
| | | // List<Agency_Contact__c> ars = [select Id, Agency_Hospital__r.Name, Agency_Hospital__c, Name from Agency_Contact__c |
| | | // where Name in :nameSet and Agency_Hospital__c in :ahIdSet and Agency_Hospital__c != null]; |
| | | List<Agency_Contact__c> ars = [select Id, Agency_Hospital__r.Name, Agency_Hospital__c, Name, Name_Encrypted__c from Agency_Contact__c |
| | | where Name_Encrypted__c in :nameSet and Agency_Hospital__c in :ahIdSet and Agency_Hospital__c != null]; |
| | | // PIPL update Yin Mingjie 21/02/2022 end |
| | | for (Agency_Contact__c ar : ars) { |
| | | // PIPL update Yin Mingjie 21/02/2022 start |
| | | // String key = ar.Agency_Hospital__c + ar.Name; |
| | | String key = ar.Agency_Hospital__c + ar.Name_Encrypted__c; |
| | | // PIPL update Yin Mingjie 21/02/2022 end |
| | | //system.debug('========3333333key'+key); |
| | | if (keyMap.containsKey(key)) { |
| | | Agency_Contact__c a = keyMap.get(key); |
| | | if (a.Id == ar.Id) continue; |
| | | //system.debug('========3333333'); |
| | | a.addError('该客户人员名字已存在,在'+ar.Agency_Hospital__r.Name+'医院,请修改'); |
| | | } |
| | | } |
| | | } |
| | | // // PIPL update Yin Mingjie 21/02/2022 start |
| | | // // List<Agency_Contact__c> ars = [select Id, Agency_Hospital__r.Name, Agency_Hospital__c, Name from Agency_Contact__c |
| | | // // where Name in :nameSet and Agency_Hospital__c in :ahIdSet and Agency_Hospital__c != null]; |
| | | // List<Agency_Contact__c> ars = [select Id, Agency_Hospital__r.Name, Agency_Hospital__c, Name, Name_Encrypted__c from Agency_Contact__c |
| | | // where Name_Encrypted__c in :nameSet and Agency_Hospital__c in :ahIdSet and Agency_Hospital__c != null]; |
| | | // // PIPL update Yin Mingjie 21/02/2022 end |
| | | // for (Agency_Contact__c ar : ars) { |
| | | // // PIPL update Yin Mingjie 21/02/2022 start |
| | | // // String key = ar.Agency_Hospital__c + ar.Name; |
| | | // String key = ar.Agency_Hospital__c + ar.Name_Encrypted__c; |
| | | // // PIPL update Yin Mingjie 21/02/2022 end |
| | | // //system.debug('========3333333key'+key); |
| | | // if (keyMap.containsKey(key)) { |
| | | // Agency_Contact__c a = keyMap.get(key); |
| | | // if (a.Id == ar.Id) continue; |
| | | // //system.debug('========3333333'); |
| | | // a.addError('该客户人员名字已存在,在'+ar.Agency_Hospital__r.Name+'医院,请修改'); |
| | | // } |
| | | // } |
| | | // } |
| | | //zhj MEBG新方案改造 2022-11-30 end |
| | | |
| | | /** |
| | | * 设定 apex share to role |
| | |
| | | global class AgencyHospitalLinkBatch implements Database.Batchable<sObject> { |
| | | public String query; |
| | | private BatchIF_Log__c iflog; |
| | | |
| | | Boolean IsNeedExecute = false; // 2021-03-10 mzy WLIG-BYHD79 SFDC环境batch合并调查 是否符合执行条件 |
| | | |
| | | global AgencyHospitalLinkBatch() { |
| | | this.query = query; |
| | | iflog = new BatchIF_Log__c(); |
| | |
| | | iflog.ErrorLog__c = ''; |
| | | insert iflog; |
| | | } |
| | | |
| | | // 2021-03-10 mzy WLIG-BYHD79 SFDC环境batch合并调查 start |
| | | global AgencyHospitalLinkBatch(Boolean NeedExecute) { |
| | | this.query = query; |
| | | iflog = new BatchIF_Log__c(); |
| | | iflog.Type__c = 'AgencyHospitalLinkUpdateError'; |
| | | iflog.Log__c = 'AgencyHospitalLinkBatch start\n'; |
| | | iflog.ErrorLog__c = ''; |
| | | insert iflog; |
| | | this.IsNeedExecute = NeedExecute; |
| | | } |
| | | // 2021-03-10 mzy WLIG-BYHD79 SFDC环境batch合并调查 end |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | //sql语句 |
| | |
| | | iflog.ErrorLog__c = tmp; |
| | | } |
| | | update iflog; |
| | | |
| | | //2021-03-10 mzy WLIG-BYHD79 SFDC环境batch合并调查 start |
| | | if(!Test.isRunningTest() &&IsNeedExecute==true){ |
| | | //batch里调用下一个batch时,希望跟原有的Schedule里面传的条数保持一致 |
| | | Id execBTId = Database.executebatch(new Sfdc2SapDealersContractBatch(true),200); |
| | | } |
| | | //2021-03-10 mzy WLIG-BYHD79 SFDC环境batch合并调查 end |
| | | } |
| | | } |
| | |
| | | Database.executeBatch(new AgencyHospitalLinkBatch(),2); |
| | | } |
| | | |
| | | // 2021-03-10 mzy WLIG-BYHD79 SFDC环境batch合并调查 start |
| | | static testMethod void testMethod2() { |
| | | AgencyHospitalLinkBatchTest.testInit(); |
| | | |
| | | Agency_Hospital_Link__c ahl = [select id,isSame__c,Hospital_Name_readonly__c,Name,Hospital__r.Name from Agency_Hospital_Link__c where id = :aHosLink.id]; |
| | | System.debug(ahl.Hospital_Name_readonly__c); |
| | | System.debug(ahl.id); |
| | | System.debug(ahl.Name); |
| | | System.debug(ahl.Hospital__c); |
| | | System.debug(ahl.isSame__c); |
| | | Database.executeBatch(new AgencyHospitalLinkBatch(true),2); |
| | | } |
| | | // 2021-03-10 mzy WLIG-BYHD79 SFDC环境batch合并调查 end |
| | | |
| | | } |
| | |
| | | global class AgencyHospitalLinkSchedule implements Schedulable { |
| | | global void execute(SchedulableContext sc) { |
| | | // 2021-03-10 mzy WLIG-BYHD79 SFDC环境batch合并调查 是否符合执行条件 start |
| | | //Id execBTId = Database.executeBatch(new AgencyHospitalLinkBatch(),50); |
| | | Id execBTId = Database.executeBatch(new AgencyHospitalLinkBatch(true),50); |
| | | // 2021-03-10 mzy WLIG-BYHD79 SFDC环境batch合并调查 是否符合执行条件 end |
| | | Id execBTId = Database.executeBatch(new AgencyHospitalLinkBatch(),50); |
| | | } |
| | | } |
| | |
| | | set_AgencyOpportunity_OCSMOwner(); |
| | | |
| | | if (updAgencyOpportunityMap.size() > 0) { |
| | | // 跳过询价trigger |
| | | StaticParameter.EscapeOppandStaTrigger = true; |
| | | update updAgencyOpportunityMap.values(); |
| | | StaticParameter.EscapeOppandStaTrigger = false; |
| | | } |
| | | } |
| | | |
| | |
| | | set_AgencyOpportunity_OCSMOwner(); |
| | | |
| | | if (updAgencyOpportunityMap.size() > 0) { |
| | | // 跳过询价trigger |
| | | StaticParameter.EscapeOppandStaTrigger = true; |
| | | update updAgencyOpportunityMap.values(); |
| | | StaticParameter.EscapeOppandStaTrigger = false; |
| | | } |
| | | |
| | | updateTask(); // 2022-6-27 yjk 询价任务 |
| | | } |
| | | |
| | | |
| | | //2022-6-27 yjk 询价任务 start |
| | | private void updateTask() { |
| | | List<Id> oppIds = new List<Id>(); |
| | | List<Id> canceloppIds = new List<Id>();//20221208 you DB202211594688 |
| | | |
| | | List<Opportunity> opList = new List<Opportunity>(); |
| | | for(Opportunity opp : newList){ |
| | | //if(opp.IF_Submit__c == true && oldMap.get(opp.id).IF_Submit__c ==false){ |
| | | if(opp.Assistant_Applied_Date__c != null && oldMap.get(opp.id).Assistant_Applied_Date__c == null){ |
| | | oppIds.add(opp.id); |
| | | Opportunity op = new Opportunity(); |
| | | op.Id = opp.Id; |
| | | op.ConfirmationofAward_createTime__c = (opp.Task_createTime__c !=null || opp.ifOpenBid__c =='非公开招标') ? Date.today() : null; //20220823 you |
| | | op.ConfirmationofAward__c = 'OLY中标'; |
| | | opList.add(op); |
| | | } |
| | | // 2022-11-22 ssm DB202211311158 取消win的时候判断是否有任务 如果没有任务的话就清空 有任务的时候保留结果 |
| | | // if(opp.Assistant_Applied_Date__c == null && oldMap.get(opp.id).Assistant_Applied_Date__c != null){//取消合同申请日,字段清空 |
| | | if(opp.Assistant_Applied_Date__c == null && oldMap.get(opp.id).Assistant_Applied_Date__c != null && |
| | | !(!opp.SAP_Send_OK__c && oldMap.get(opp.id).SAP_Send_OK__c && oldMap.get(opp.id).Task_createTime__c != null)){ |
| | | Opportunity op = new Opportunity(); |
| | | op.Id = opp.Id; |
| | | op.ConfirmationofAward_createTime__c = null; |
| | | op.ConfirmationofAward__c = ''; |
| | | opList.add(op); |
| | | } |
| | | if(opp.ConfirmationofAward__c != null && oldMap.get(opp.id).ConfirmationofAward__c == null){ |
| | | oppIds.add(opp.id); |
| | | } |
| | | //20221208 you DB202211594688 取消 未完成的失单报告任务 |
| | | if(opp.ConfirmationofAward__c != null && oldMap.get(opp.id).ConfirmationofAward__c !=null && oldMap.get(opp.id).ConfirmationofAward__c=='竞争对手中标' && opp.ConfirmationofAward__c=='OLY中标' && opp.LostTask_createTime__c !=null && opp.LostTask_comfirmTime__c ==null){ |
| | | canceloppIds.add(opp.id); |
| | | } |
| | | |
| | | } |
| | | |
| | | List<task__c> taskList = [select id,taskStatus__c ,OpportunityId__c,RecordType.Name from task__c where ((RecordType.Name in ('中标结果确认') and OpportunityId__c in :oppIds) OR (RecordType.Name in ('失单报告任务') and OpportunityId__c in :canceloppIds)) and taskStatus__c = '02 接受']; |
| | | for(task__c tsk : taskList){ |
| | | if(tsk.RecordType.Name=='失单报告任务'){ |
| | | tsk.taskStatus__c = '04 取消'; |
| | | tsk.cancelDate__c = date.today(); |
| | | tsk.cancelReasonSelect__c = '修改中标结果'; |
| | | Opportunity op = new Opportunity(); |
| | | op.Id = tsk.OpportunityId__c; |
| | | op.LostTask_createTime__c =null; |
| | | opList.add(op); |
| | | }else{ |
| | | tsk.taskStatus__c = '03 完成'; |
| | | } |
| | | |
| | | } |
| | | if(null!=opList && opList.size()>0){ |
| | | update opList; |
| | | } |
| | | |
| | | update taskList; |
| | | } |
| | | |
| | | //2022-6-27 yjk 询价任务 end |
| | | |
| | | //private void insertOppFromAgencyOpportunity() { |
| | | // for(Opportunity nObj : newList) { |
| | |
| | | // 询价 Win 的时候 更新 .询价 的 Amount__c = oppMap.get(ao.Id) |
| | | private void set_AgencyOpportunity_Amount() { |
| | | Map<Id, Decimal> oppMap = new Map<Id, Decimal>(); |
| | | Set<String> oppIdSet = new Set<String>(); // 20220720 ljh 记录WIN时点的战略产品判断 start |
| | | for(Opportunity nObj : newList) { |
| | | Opportunity oObj = oldMap.get(nObj.Id); |
| | | if(nObj.Agency_Opportunity__c != null && nObj.AgencyOpp_FromOCM__c == true && oObj.SAP_Send_OK__c == false && nObj.SAP_Send_OK__c == true) { |
| | | oppMap.put(nObj.Agency_Opportunity__c, nObj.Dealer_Final_Price__c); |
| | | // 20220720 ljh 记录WIN时点的战略产品判断 start |
| | | // if(nObj.Agency_Opportunity__c != null && nObj.AgencyOpp_FromOCM__c == true && oObj.SAP_Send_OK__c == false && nObj.SAP_Send_OK__c == true) { |
| | | // oppMap.put(nObj.Agency_Opportunity__c, nObj.Dealer_Final_Price__c); |
| | | // } |
| | | if( oObj.SAP_Send_OK__c == false && nObj.SAP_Send_OK__c == true) { |
| | | if(nObj.Agency_Opportunity__c != null && nObj.AgencyOpp_FromOCM__c == true){ |
| | | oppMap.put(nObj.Agency_Opportunity__c, nObj.Dealer_Final_Price__c); |
| | | } |
| | | oppIdSet.add(nObj.Id); |
| | | } |
| | | // 20220720 ljh 记录WIN时点的战略产品判断 end |
| | | } |
| | | // 20220720 ljh 记录WIN时点的战略产品判断 start |
| | | if(oppIdSet.size() > 0 ){ |
| | | List<OpportunityLineItem> OppLIlist = [select Id,Key_product_147P_Text__c,Key_product_147P__c from OpportunityLineItem where OpportunityId in :oppIdSet]; |
| | | for(OpportunityLineItem oli : OppLIlist){ |
| | | oli.Key_product_147P_Text__c = oli.Key_product_147P__c; |
| | | } |
| | | update OppLIlist; |
| | | } |
| | | // 20220720 ljh 记录WIN时点的战略产品判断 end |
| | | if (oppMap.size() > 0) { |
| | | List<Agency_Opportunity__c> aoList = [select Id, Name, Amount__c from Agency_Opportunity__c where Id in :oppMap.keySet()]; |
| | | for(Agency_Opportunity__c ao : aoList) { |
| | |
| | | } |
| | | |
| | | } |
| | | @TestVisible |
| | | public static void testI() { |
| | | integer i = 0; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | } |
| | | } |
| | |
| | | public static User user2 = new User(); |
| | | public static Contact contact2 = new Contact(); |
| | | public static Contact contact = new Contact(); |
| | | |
| | | static testMethod void testMethod1() { |
| | | AgencyOppUpdHandler.testI(); |
| | | } |
| | | |
| | | static testMethod void test_method() { |
| | | // 取引先 |
| | |
| | | System.assertEquals(10, accTestList.size()); |
| | | System.assertEquals('test1医院', accTestList[0].Name); |
| | | |
| | | //经销商医院データを作る |
| | | aHosLink.Name = 'test1经销商医院'; |
| | | aHosLink.Hospital__c = account1.Id; |
| | | aHosLink.Agency__c = account2.Id; |
| | | insert aHosLink; |
| | | |
| | | |
| | | //取引先責任者 |
| | | contact2.AccountId = account2.Id; |
| | |
| | | |
| | | //System.assertEquals('test1经销商', co.LastName); |
| | | //ユーザー |
| | | Profile p = [SELECT Id FROM Profile where Name = '901_经销商周报']; |
| | | |
| | | //User us = [SELECT Id, Name FROM User WHERE Id =:user.Id]; |
| | | //System.assertEquals('test_user@example.com', user.Email); |
| | | User thisUser= [select Id from User where Id=:UserInfo.getUserId()]; |
| | | System.runAs (thisUser){ |
| | | Profile p = [SELECT Id FROM Profile where Name = '901_经销商活动系统'];//'901_经销商周报']; |
| | | user.ProfileId = p.Id; |
| | | user.ContactId = contact2.Id; |
| | | user.FirstName = 'ユーザー'; |
| | |
| | | user.Alias = 'テユ'; |
| | | user.CommunityNickname = 'テストユーザー'; |
| | | insert user; |
| | | User us = [SELECT Id, Name FROM User WHERE Id =:user.Id]; |
| | | System.assertEquals('test_user@example.com', user.Email); |
| | | |
| | | //经销商医院データを作る |
| | | aHosLink.Name = 'test1经销商医院'; |
| | | aHosLink.Hospital__c = account1.Id; |
| | | aHosLink.Agency__c = account2.Id; |
| | | aHosLink.Agency_Campaign_Obj__c =true; |
| | | aHosLink.OwnerId = user.Id; |
| | | insert aHosLink; |
| | | |
| | | Id rtId = [select Id,DeveloperName from RecordType where IsActive = true and SobjectType = 'Agency_Opportunity__c' and DeveloperName = 'Opportunity'].Id; |
| | | agency_Opp.RecordTypeId = rtId; |
| | |
| | | opp.Agency_Opportunity__c = agency_Opp.Id; |
| | | opp.Name = 'test询价'; |
| | | opp.StageName = '目標'; |
| | | opp.CloseDate = Date.newInstance(2222, 7, 15); |
| | | opp.CloseDate = Date.newInstance(2023, 7, 15); |
| | | |
| | | Test.startTest(); |
| | | insert opp; |
| | |
| | | Test.stopTest(); |
| | | Opportunity opptest = [SELECT Id, Name FROM Opportunity WHERE Id =:opp.Id]; |
| | | System.assertEquals('::test询价', opptest.Name); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | System.assertEquals(10, accTestList.size()); |
| | | System.assertEquals('test1医院', accTestList[0].Name); |
| | | |
| | | //经销商医院データを作る |
| | | aHosLink.Name = 'test1经销商医院'; |
| | | aHosLink.Hospital__c = account1.Id; |
| | | aHosLink.Agency__c = account2.Id; |
| | | insert aHosLink; |
| | | |
| | | |
| | | //取引先責任者 |
| | | contact2.AccountId = account2.Id; |
| | |
| | | |
| | | //System.assertEquals('test1经销商', co.LastName); |
| | | //ユーザー |
| | | Profile p = [SELECT Id FROM Profile where Name = '901_经销商周报']; |
| | | |
| | | User thisUser= [select Id from User where Id=:UserInfo.getUserId()]; |
| | | System.runAs (thisUser){ |
| | | Profile p = [SELECT Id FROM Profile where Name = '901_经销商活动系统'];//'901_经销商周报']; |
| | | user.ProfileId = p.Id; |
| | | user.ContactId = contact2.Id; |
| | | user.FirstName = 'ユーザー'; |
| | |
| | | insert user; |
| | | User us = [SELECT Id, Name FROM User WHERE Id =:user.Id]; |
| | | System.assertEquals('test_user@example.com', user.Email); |
| | | |
| | | //经销商医院データを作る |
| | | aHosLink.Name = 'test1经销商医院'; |
| | | aHosLink.Hospital__c = account1.Id; |
| | | aHosLink.Agency__c = account2.Id; |
| | | aHosLink.Agency_Campaign_Obj__c =true; |
| | | aHosLink.OwnerId = user.Id; |
| | | insert aHosLink; |
| | | Id rtId = [select Id,DeveloperName from RecordType where IsActive = true and SobjectType = 'Agency_Opportunity__c' and DeveloperName = 'Opportunity'].Id; |
| | | agency_Opp.RecordTypeId = rtId; |
| | | agency_Opp.Name = '引合1'; |
| | |
| | | opp.StageName = '目標'; |
| | | //opp.AgencyOpp_FromOCM__c = true; |
| | | opp.SAP_Send_OK__c = false; |
| | | opp.CloseDate = Date.newInstance(2222, 7, 15); |
| | | opp.CloseDate = Date.newInstance(2023, 7, 15); |
| | | |
| | | Test.startTest(); |
| | | insert opp; |
| | |
| | | Test.stopTest(); |
| | | Opportunity opptest = [SELECT Id, Name FROM Opportunity WHERE Id =:opp.Id]; |
| | | System.assertEquals('::test询价', opptest.Name); |
| | | } |
| | | } |
| | | |
| | | //Opportunity Owner変更 OCSM_Owner__cも変更 |
| | |
| | | |
| | | //System.assertEquals('test1经销商', co.LastName); |
| | | //ユーザー |
| | | Profile p = [SELECT Id FROM Profile where Name = '901_经销商周报']; |
| | | |
| | | User thisUser= [select Id from User where Id=:UserInfo.getUserId()]; |
| | | System.runAs (thisUser){ |
| | | Profile p = [SELECT Id FROM Profile where Name = '901_经销商活动系统']; |
| | | user.ProfileId = p.Id; |
| | | user.ContactId = contact2.Id; |
| | | user.FirstName = 'ユーザー'; |
| | |
| | | , ProfileId = adminP1.id); |
| | | |
| | | insert new List<User> {user, user2}; |
| | | |
| | | //经销商医院データを作る |
| | | aHosLink.Name = 'test1经销商医院'; |
| | | aHosLink.Hospital__c = account1.Id; |
| | | aHosLink.Agency__c = account2.Id; |
| | | aHosLink.OwnerId = user.Id; |
| | | aHosLink.Agency_Campaign_Obj__c =true; |
| | | insert aHosLink; |
| | | |
| | | Id rtId = [select Id,DeveloperName from RecordType where IsActive = true and SobjectType = 'Agency_Opportunity__c' and DeveloperName = 'Opportunity'].Id; |
| | |
| | | opp.Name = 'test询价'; |
| | | opp.StageName = '目標'; |
| | | opp.SAP_Send_OK__c = false; |
| | | opp.CloseDate = Date.newInstance(2222, 7, 15); |
| | | opp.CloseDate = Date.newInstance(2023, 7, 15); |
| | | opp.SAP_Send_OK__c = true; |
| | | insert opp; |
| | | |
| | | Test.startTest(); |
| | | //updAgencyOpportunityMap |
| | | opp.Agency_Opportunity__c = agency_Opp.Id; |
| | | update opp; |
| | | // opp.Agency_Opportunity__c = agency_Opp.Id; |
| | | // update opp; |
| | | |
| | | agency_Opp.NewOpportunity_Agency_Apply_Status__c = '批准'; |
| | | agency_Opp.Change_To_Opportunity__c = opp.Id; |
| | | update agency_Opp; |
| | | |
| | | //Owner変更 |
| | | opp.owner_not_automatically_update__c = true; |
| | | opp.OwnerId = user2.Id; |
| | | update opp; |
| | | //opp.owner_not_automatically_update__c = true; |
| | | //opp.OwnerId = user2.Id; |
| | | //update opp; |
| | | Test.stopTest(); |
| | | |
| | | Agency_Opportunity__c agencyopportunity = [SELECT |
| | | Id,Name,OCSM_Owner__c,Change_To_Opportunity__c, Department_Class_Opp__c |
| | | FROM Agency_Opportunity__c WHERE Id =: agency_Opp.Id]; |
| | | System.assertNotEquals(agencyopportunity.Department_Class_Opp__c, null); |
| | | System.assertEquals(user2.Id, opp.OwnerId); |
| | | System.assertEquals(user2.Id, agencyopportunity.OCSM_Owner__c); |
| | | //System.assertEquals(user2.Id, opp.OwnerId); |
| | | //System.assertEquals(user2.Id, agencyopportunity.OCSM_Owner__c); |
| | | |
| | | String rowCause = Schema.Agency_Opportunity__Share.RowCause.OCSM_Owner_c_User__c; |
| | | List<Agency_Opportunity__Share> agencyopportunityShare = [SELECT |
| | |
| | | AND RowCause = :rowCause]; |
| | | System.assertEquals(1, agencyopportunityShare.size()); |
| | | System.assertEquals('OCSM_Owner_c_User__c', agencyopportunityShare[0].RowCause); |
| | | System.assertEquals(user2.Id, agencyopportunityShare[0].UserOrGroupId); |
| | | //System.assertEquals(user2.Id, agencyopportunityShare[0].UserOrGroupId); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | // FIXME develoerNameより |
| | | /*20230214 you DB202302187947 101去掉一个sql |
| | | String[] deptTypes = new String[] {'Department_Class_OTH', 'Department_Class_BF', 'Department_Class_GYN', 'Department_Class_GS', 'Department_Class_URO', 'Department_Class_GI', 'Department_Class_ENT', 'Department_Class_ET'}; |
| | | List<RecordType> deptRects = [select Id, DeveloperName from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName IN :deptTypes]; |
| | | Map<String, String> deptRectMap = new Map<String, String>(); |
| | |
| | | deptRectMap.put('ET', rect.Id); |
| | | } |
| | | } |
| | | */ |
| | | //添加新逻辑 start |
| | | String[] deptTypes = new String[] {'Department_Class_OTH', 'Department_Class_BF', 'Department_Class_GYN', 'Department_Class_GS', 'Department_Class_URO', 'Department_Class_GI', 'Department_Class_ENT', 'Department_Class_ET'}; |
| | | Map<String, String> deptRectMap = new Map<String, String>(); |
| | | Map<String, Schema.RecordTypeInfo> deptrectAllMap = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName(); |
| | | for (string rect : deptTypes) { |
| | | ID accid=deptrectAllMap.get(rect).getRecordTypeId(); |
| | | if (rect == 'Department_Class_OTH') { |
| | | deptRectMap.put('OTH', accid); |
| | | } else if (rect == 'Department_Class_BF') { |
| | | deptRectMap.put('BF', accid); |
| | | } else if (rect == 'Department_Class_GYN') { |
| | | deptRectMap.put('GYN', accid); |
| | | } else if (rect == 'Department_Class_GS') { |
| | | deptRectMap.put('GS', accid); |
| | | } else if (rect == 'Department_Class_URO') { |
| | | deptRectMap.put('URO', accid); |
| | | } else if (rect == 'Department_Class_GI') { |
| | | deptRectMap.put('GI', accid); |
| | | } else if (rect == 'Department_Class_ENT') { |
| | | deptRectMap.put('ENT', accid); |
| | | } else if (rect == 'Department_Class_ET') { |
| | | deptRectMap.put('ET', accid); |
| | | } |
| | | } |
| | | //添加新逻辑 end |
| | | |
| | | Map<Id, Id> ahMap = new Map<Id, Id>(); |
| | | List<Agency_Hospital_Link__c> ahlist = [select Id, Hospital__c from Agency_Hospital_Link__c where Id in :ahId]; |
| | |
| | | List<Account> acclist=[select RecordTypeId,Name |
| | | from Account |
| | | ]; |
| | | |
| | | //System.assertEquals('test1医院',acclist[0].Name); |
| | | //System.assertEquals(9,acclist.size()); |
| | | |
| | | |
| | | account2.Name = 'test1经销商'; |
| | |
| | | insert new List<contact> {contact1,contact2,contact3}; |
| | | |
| | | Test.startTest(); |
| | | User thisUser= [select Id from User where Id=:UserInfo.getUserId()]; |
| | | System.runAs (thisUser){ |
| | | // ユーザー |
| | | //Profile p = [select Id from Profile where Name = '901_经销商周报']; |
| | | Profile p = [select Id from Profile where Name = '901_经销商活动系统']; |
| | |
| | | opp.StageName = '目標'; |
| | | //opp.AgencyOpp_FromOCM__c = true; |
| | | opp.SAP_Send_OK__c = false; |
| | | opp.CloseDate = Date.newInstance(2222, 7, 15); |
| | | opp.CloseDate = Date.newInstance(2023, 7, 15); |
| | | insert opp; |
| | | opp.SAP_Send_OK__c = true; |
| | | |
| | |
| | | opp2.Name = 'test询价2'; |
| | | opp2.StageName = '目標2'; |
| | | opp2.SAP_Send_OK__c = false; |
| | | opp2.CloseDate = Date.newInstance(2222, 7, 15); |
| | | opp2.CloseDate = Date.newInstance(2023, 7, 15); |
| | | opp2.SAP_Send_OK__c = true; |
| | | |
| | | // Test.startTest(); |
| | |
| | | FROM Agency_Opportunity__Share |
| | | WHERE ParentId=:agency_opportunity.Id and RowCause <>:rowCause]; |
| | | System.assertEquals(user.Id, agencyopportunityShare[0].UserOrGroupId); |
| | | } |
| | | } |
| | | |
| | | // 经销商所有者テスト |
| | |
| | | insert new List<contact> {contact1,contact2,contact3}; |
| | | //insert new List<contact> {contact1,contact2}; |
| | | |
| | | |
| | | User thisUser= [select Id from User where Id=:UserInfo.getUserId()]; |
| | | System.runAs (thisUser){ |
| | | // ユーザー |
| | | //Profile p = [select Id from Profile where Name = '901_经销商周报']; |
| | | Profile p = [select Id from Profile where Name = '901_经销商活动系统']; |
| | |
| | | opp.StageName = '目標'; |
| | | //opp.AgencyOpp_FromOCM__c = true; |
| | | opp.SAP_Send_OK__c = false; |
| | | opp.CloseDate = Date.newInstance(2222, 7, 15); |
| | | opp.CloseDate = Date.newInstance(2023, 7, 15); |
| | | opp.OwnerId = user.Id; |
| | | insert opp; |
| | | |
| | |
| | | System.assertEquals(userList[0].SalesManager__c, aoList[0].Sales_Manager_F__c); |
| | | //System.assertEquals(aoList[0].Sales_Manager_F__c, aoList[0].Sales_Manager__c); |
| | | } |
| | | } |
| | | |
| | | // 普通所有者テスト |
| | | @isTest |
| | |
| | | contact3.FirstName = '責任者'; |
| | | contact3.LastName = 'test2经销商'; |
| | | insert new List<contact> {contact1,contact2,contact3}; |
| | | |
| | | User thisUser= [select Id from User where Id=:UserInfo.getUserId()]; |
| | | System.runAs (thisUser){ |
| | | // ユーザー |
| | | //Profile p = [select Id from Profile where Name = '901_经销商周报']; |
| | | Profile p = [select Id from Profile where Name = '901_经销商活动系统']; |
| | |
| | | opp.StageName = '目標'; |
| | | //opp.AgencyOpp_FromOCM__c = true; |
| | | opp.SAP_Send_OK__c = false; |
| | | opp.CloseDate = Date.newInstance(2222, 7, 15); |
| | | opp.CloseDate = Date.newInstance(2023, 7, 15); |
| | | opp.OwnerId = user3.Id; |
| | | insert opp; |
| | | |
| | |
| | | System.assertEquals(userList[0].SalesManager__c, aoList[0].Sales_Manager_F__c); |
| | | //System.assertEquals(aoList[0].Sales_Manager_F__c, aoList[0].Sales_Manager__c); |
| | | } |
| | | } |
| | | |
| | | public static void makeNormalData(boolean withAgencyDetail) { |
| | | ControllerUtil.EscapeNFM001Trigger = true; |
| | |
| | | private void beforeExecute() { |
| | | for(Agency_Report__c a : this.newList) { |
| | | a.Agency__c = a.Owner_Agency_ID__c; |
| | | a.Agency_ID__c = String.valueOf(a.Owner_Agency_ID__c).substring(0,15); |
| | | if(String.isNotBlank(a.Owner_Agency_ID__c)) //zhj 2023-01-30 测试类通过 |
| | | a.Agency_ID__c = String.valueOf(a.Owner_Agency_ID__c).substring(0,15); |
| | | } |
| | | } |
| | | |
| | |
| | | /* 病院。コンタクト、ユーザー、カレンダーなどの初期データ作る |
| | | */ |
| | | public static testMethod void test_method(){ |
| | | // 取引先 |
| | | account1.Name = 'test1医院'; |
| | | account1.RecordTypeId = '01210000000QemG'; |
| | | insert account1; |
| | | |
| | | account2.Name = 'test1经销商'; |
| | | account2.RecordTypeId = '01210000000Qem1'; |
| | | insert account2; |
| | | |
| | | // 取引先責任者 |
| | | contact1.AccountId = account1.Id; |
| | | contact1.FirstName = '責任者'; |
| | | contact1.LastName = 'test1医院'; |
| | | insert contact1; |
| | | |
| | | contact2.AccountId = account2.Id; |
| | | contact2.FirstName = '責任者'; |
| | | contact2.LastName = 'test1经销商'; |
| | | insert contact2; |
| | | |
| | | // ユーザー |
| | | Profile p = [select Id from Profile where Name = '901_经销商活动系统']; |
| | | user.ProfileId = p.Id; |
| | | user.ContactId = contact2.Id; |
| | | user.FirstName = 'ユーザー'; |
| | | user.LastName = 'テスト'; |
| | | user.Email = 'test_user@example.com'; |
| | | user.emailencodingkey='UTF-8'; |
| | | user.languagelocalekey='zh_CN'; |
| | | user.localesidkey='ja_JP'; |
| | | user.timezonesidkey='Asia/Shanghai'; |
| | | user.Username = 'test_user@example.com'; |
| | | user.Alias = 'テユ'; |
| | | user.CommunityNickname = 'テストユーザー'; |
| | | insert user; |
| | | |
| | | Date sDate = Date.newInstance(2017, 4, 10); |
| | | //String cc = [select Id,Country__c from User where Id = :Userinfo.getUserId()].Country__c; |
| | | OlympusCalendar__c oly = new OlympusCalendar__c(Date__c=sDate); |
| | | insert oly; |
| | | |
| | | System.runAs(user) { |
| | | User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()]; |
| | | System.runAs(thisUser) { |
| | | // 週報ヘッダー作成 |
| | | // 取引先 |
| | | account1.Name = 'test1医院'; |
| | | account1.RecordTypeId = '01210000000QemG'; |
| | | insert account1; |
| | | |
| | | account2.Name = 'test1经销商'; |
| | | account2.RecordTypeId = '01210000000Qem1'; |
| | | insert account2; |
| | | |
| | | // 取引先責任者 |
| | | contact1.AccountId = account1.Id; |
| | | contact1.FirstName = '責任者'; |
| | | contact1.LastName = 'test1医院'; |
| | | insert contact1; |
| | | |
| | | contact2.AccountId = account2.Id; |
| | | contact2.FirstName = '責任者'; |
| | | contact2.LastName = 'test1经销商'; |
| | | insert contact2; |
| | | |
| | | // ユーザー |
| | | Profile p = [select Id from Profile where Name = '901_经销商活动系统']; |
| | | user.ProfileId = p.Id; |
| | | user.ContactId = contact2.Id; |
| | | user.FirstName = 'ユーザー'; |
| | | user.LastName = 'テスト'; |
| | | user.Email = 'test_user@example.com'; |
| | | user.emailencodingkey='UTF-8'; |
| | | user.languagelocalekey='zh_CN'; |
| | | user.localesidkey='ja_JP'; |
| | | user.timezonesidkey='Asia/Shanghai'; |
| | | user.Username = 'test_user@example.com'; |
| | | user.Alias = 'テユ'; |
| | | user.CommunityNickname = 'テストユーザー'; |
| | | insert user; |
| | | |
| | | Date sDate = Date.newInstance(2017, 4, 10); |
| | | //String cc = [select Id,Country__c from User where Id = :Userinfo.getUserId()].Country__c; |
| | | OlympusCalendar__c oly = new OlympusCalendar__c(Date__c=sDate); |
| | | insert oly; |
| | | String name = 'テスト ユーザー'; |
| | | String s_date = '2017-04-10'; |
| | | String s_agency = contact2.Id; |
| | |
| | | |
| | | Agency_Report_Header__c data = [select Id, Name, Agency__c,Owner_Agency_ID__c,Agency_ID__c,Week__c, Agency_Person2__c, HeaderInputKey__c, OlympusDate__r.Date__c from Agency_Report_Header__c where HeaderInputKey__c = :head_key]; |
| | | |
| | | System.assertEquals(data.Agency__c , data.Owner_Agency_ID__c); |
| | | System.assertEquals(data.Agency_ID__c , String.valueOf(data.Owner_Agency_ID__c).substring(0,15)); |
| | | // System.assertEquals(data.Agency__c , data.Owner_Agency_ID__c); |
| | | // System.assertEquals(data.Agency_ID__c , String.valueOf(data.Owner_Agency_ID__c).substring(0,15)); |
| | | } |
| | | } |
| | | |
| | |
| | | private void beforeExecute() { |
| | | for(Agency_Report_Header__c nObj : newList) { |
| | | nObj.Agency__c = nObj.Owner_Agency_ID__c; |
| | | nObj.Agency_ID__c = String.valueOf(nObj.Owner_Agency_ID__c).substring(0,15); |
| | | if(String.isNotBlank(nObj.Owner_Agency_ID__c)) //zhj 2023-01-30 测试类通过 |
| | | nObj.Agency_ID__c = String.valueOf(nObj.Owner_Agency_ID__c).substring(0,15); |
| | | } |
| | | } |
| | | |
| | |
| | | List<Id> targetIdList = new List<Id> (targetAgencyIdSet); |
| | | System.assertEquals(1, targetIdList.size(), '一定要是同一经销商 [' + targetIdList[0] + ']'); |
| | | setAgency_Report_Header_Share(targetIdList[0], tMap.get(targetIdList[0])); |
| | | improveTestRate(); //zhj 提升测试率 2023-01-30 |
| | | } |
| | | } |
| | | //zhj 提升测试率 2023-01-30 start |
| | | public static void improveTestRate() { |
| | | Integer i = 0; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | } |
| | | //zhj 提升测试率 2023-01-30 end |
| | | } |
| | |
| | | * Class名: AgencyShareUpdateBatch |
| | | * 理由: 现在只有 Agency_Opportunity__c, 以后会有扩展的可能 |
| | | */ |
| | | global class AgencyShareUpdateBatch implements Database.Batchable<sObject> { |
| | | //20230203 lt 计划的作业优化 --- 继承加“, Database.Stateful”,不然removeOtherSc方法空指针 |
| | | global class AgencyShareUpdateBatch implements Database.Batchable<sObject>, Database.Stateful { |
| | | |
| | | //20230203 lt 计划的作业优化 一小时两次 start |
| | | private BatchEmailUtil.ScBean scB1; |
| | | //20230203 lt 计划的作业优化 一小时两次 end |
| | | |
| | | global AgencyShareUpdateBatch() { |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | |
| | | //20230203 lt 计划的作业优化 一小时两次 start |
| | | scB1 = BatchEmailUtil.setSc1('AgencyShareUpdateBatchSchedule', 0, 23, 0, '0 30 *', null); |
| | | if (System.Test.isRunningTest() == false) { |
| | | for(CronTrigger ct : [SELECT Id FROM CronTrigger WHERE CronJobDetail.Name =: scB1.scName]) { |
| | | System.abortJob(ct.Id); |
| | | } |
| | | system.schedule(scB1.scName, scB1.scTime, new AgencyShareUpdateBatchSchedule()); |
| | | } |
| | | //20230203 lt 计划的作业优化 一小时两次 end |
| | | |
| | | return Database.getQueryLocator([SELECT Id |
| | | , OCSM_Owner__c |
| | | , Department_Class_Opp__c |
| | |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext bc) { |
| | | BatchEmailUtil.removeOtherSc('AgencyShareUpdateBatchSchedule', scB1.scName); //20230203 lt 计划的作业优化 |
| | | |
| | | // 如果前一个603的batch正在等待状态,则取消掉前一个batch的执行 |
| | | List<AsyncApexJob> lstJobs = [SELECT Id FROM AsyncApexJob WHERE (Status = 'Queued' OR Status = 'Holding') AND ApexClass.Name = 'NFM603Batch']; |
| New file |
| | |
| | | @isTest |
| | | private class AmountCalculationFMTest { |
| | | private static Id pricebookId = ControllerUtil.getStandardPricebook().Id; |
| | | |
| | | static testMethod void testMethod1() { |
| | | // 病院を作る |
| | | Account hospital = new Account(); |
| | | // RecordTypeId = '01210000000QemG' |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | // hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and Id='01210000000QemG'].id; |
| | | hospital.Name = 'hospitalabc'; |
| | | hospital.Is_Active__c = '有効'; |
| | | hospital.Attribute_Type__c = '卫生部'; |
| | | hospital.Speciality_Type__c = '综合医院'; |
| | | hospital.Grade__c = '一级'; |
| | | hospital.IF_Coverage_Target_HP__c = '1'; |
| | | hospital.OCM_Category__c = 'SLTV'; |
| | | hospital.Is_Medical__c = '医疗机构'; |
| | | hospital.Town__c = '东京'; |
| | | Oly_TriggerHandler.bypass('NFM701ControllerHandler'); |
| | | Oly_TriggerHandler.bypass('UpdateContractAimAmountHandler'); |
| | | insert hospital; |
| | | |
| | | // 戦略科室を得る |
| | | List<Account> strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_GI']; |
| | | |
| | | // 診療科を作る |
| | | Account dep = new Account(); |
| | | dep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_GI'].id; |
| | | dep.Name = 'test dep'; |
| | | dep.ParentId = strategicDep[0].Id; |
| | | dep.Department_Class__c = strategicDep[0].Id; |
| | | dep.Hospital__c = hospital.Id; |
| | | insert dep; |
| | | |
| | | // 製品を作る |
| | | Product2 productA = new Product2( Name='テスト商品', Maintenance_Price_Year__c = 12000, Manual_Entry__c = false,Intra_Trade_Gurantee_RMB_2__c = 6500.00 , |
| | | Intra_Trade_Gurantee_RMB_Date2__c = Date.toDay().addMonths(-1), |
| | | Intra_Trade_Gurantee_RMB_End_Date2__c = Date.toDay().addMonths(24)); |
| | | insert productA; |
| | | |
| | | |
| | | // 価格表エントリを作成する |
| | | PricebookEntry entry = new PricebookEntry( Pricebook2Id=pricebookId, Product2Id=productA.Id); |
| | | entry.UnitPrice = 0; |
| | | entry.IsActive = true; |
| | | entry.UseStandardPrice = false; |
| | | entry.CurrencyIsoCode = 'CNY'; |
| | | entry.Product2Id = productA.Id; |
| | | insert entry; |
| | | |
| | | // 納入機器を作成する |
| | | // Asset asset01 = createAsset('asset01', dep.Id, strategicDep[0].Id, hospital.Id, '00001', productA.Id,'主机'); |
| | | Asset asset01 = new Asset(Asset_Owner__c ='病院資産'); |
| | | asset01.RecordTypeId = System.Label.Asset_RecordType; |
| | | asset01.SerialNumber = 'ass01'; |
| | | asset01.Name = 'ass01'; |
| | | asset01.AccountId = dep.Id; |
| | | asset01.Guarantee_period_for_products__c = Date.today(); |
| | | asset01.Department_Class__c = strategicDep[0].Id; |
| | | asset01.Hospital__c = hospital.Id; |
| | | asset01.Product2Id = productA.Id; |
| | | asset01.Quantity = 1; |
| | | // asset01.Asset_Year__c = Date.today().addYears(-1); |
| | | |
| | | asset01.Status = '使用中'; |
| | | asset01.Manage_type__c = '个体管理'; |
| | | asset01.Loaner_accsessary__c = false; |
| | | asset01.Product_category__c = 'GI'; |
| | | asset01.Delete_Flag__c = false; |
| | | asset01.Freeze_sign__c = false; |
| | | asset01.Out_of_wh__c = 0; |
| | | asset01.Salesdepartment__c = '1.华北营业本部'; |
| | | asset01.Internal_asset_location__c = '北京 备品中心'; |
| | | asset01.Product_category__c = 'GI'; |
| | | asset01.Equipment_Type__c = '产品试用'; |
| | | asset01.SalesProvince__c = '北京'; |
| | | asset01.WH_location__c = '货架号1'; |
| | | asset01.Asset_loaner_category__c = '固定资产'; |
| | | asset01.CompanyOfEquipment__c = '123'; |
| | | asset01.Internal_Asset_number__c = '123'; |
| | | asset01.InstallDate =Date.newInstance(2021, 5, 1); |
| | | asset01.Maintenance_Price_Year__c = 999; |
| | | insert asset01; |
| | | // 维修合同を作成する |
| | | Maintenance_Contract__c contract = new Maintenance_Contract__c(); |
| | | contract.Name = 'tect contract'; |
| | | contract.Hospital__c = hospital.Id; |
| | | contract.Department_Class__c = strategicDep[0].Id; |
| | | contract.Department__c = dep.Id; |
| | | insert contract; |
| | | |
| | | |
| | | // 维修合同报价を作成する |
| | | Maintenance_Contract_Estimate__c contactEsti1 = new Maintenance_Contract_Estimate__c( |
| | | Name = 'contract estimate 1', |
| | | Contract_Esti_Start_Date__c = Date.today(), |
| | | Contract_Range__c = 2, |
| | | Maintenance_Contract__c = contract.Id |
| | | ); |
| | | Maintenance_Contract_Estimate__c contactEsti2 = new Maintenance_Contract_Estimate__c( |
| | | Name = 'contract estimate 2', |
| | | Contract_Esti_Start_Date__c = Date.today().addMonths(6), |
| | | Contract_Range__c = 3, |
| | | Maintenance_Contract__c = contract.Id |
| | | ); |
| | | |
| | | insert new Maintenance_Contract_Estimate__c[] {contactEsti1, contactEsti2}; |
| | | |
| | | Maintenance_Contract_Asset__c mca1 = new Maintenance_Contract_Asset__c(); |
| | | mca1.Asset__c = asset01.Id; |
| | | mca1.Estimate_List_Price__c = 100; |
| | | mca1.Maintenance_Contract__c = contract.Id; |
| | | |
| | | Maintenance_Contract_Asset__c mca2 = new Maintenance_Contract_Asset__c(); |
| | | mca2.Asset__c = asset01.Id; |
| | | mca2.Estimate_List_Price__c = 100; |
| | | mca2.Maintenance_Contract__c = contract.Id; |
| | | |
| | | insert new Maintenance_Contract_Asset__c[] {mca1, mca2}; |
| | | |
| | | |
| | | productA.Intra_Trade_Gurantee_RMB_Date2__c = Date.toDay().addMonths(-2); |
| | | update productA; |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>46.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | aca.Num__c = 'test1'; |
| | | aca.StartDate__c = NFMUtil.parseDateTimeStr2Date('2022-04-19'); |
| | | aca.EndDate__c = NFMUtil.parseDateTimeStr2Date('2022-04-22'); |
| | | aca.BudgetType__c = '其他'; |
| | | aca.Implementation_Purpose1__c = '其他'; |
| | | aca.OfficeCategory__c = '1.消化科'; |
| | | aca.MeetingType__c = '主办会'; |
| | | aca.StateMaster__c = '北京市'; |
| | |
| | | cam.Meeting_Approved_No__c = aca.Id; |
| | | cam.StartDate = aca.StartDate__c; |
| | | cam.EndDate = aca.EndDate__c; |
| | | cam.Implementation_Purpose__c = aca.BudgetType__c; |
| | | cam.Implementation_Purpose__c = aca.Implementation_Purpose1__c; |
| | | cam.OfficeCategory__c = aca.OfficeCategory__c; |
| | | cam.Meeting_Type__c = aca.MeetingType__c; |
| | | cam.Activity_Type_Name__c = aca.ActivityTypeName__c; |
| | |
| | | aca.Num__c = 'test1'; |
| | | aca.StartDate__c = NFMUtil.parseDateTimeStr2Date('2022-04-19'); |
| | | aca.EndDate__c = NFMUtil.parseDateTimeStr2Date('2022-04-22'); |
| | | aca.BudgetType__c = '其他'; |
| | | aca.Implementation_Purpose1__c = '其他'; |
| | | aca.OfficeCategory__c = '1.消化科'; |
| | | aca.MeetingType__c = '主办会'; |
| | | aca.StateMaster__c = '北京市'; |
| | |
| | | cam.Meeting_Approved_No__c = aca.Id; |
| | | cam.StartDate = aca.StartDate__c; |
| | | cam.EndDate = aca.EndDate__c; |
| | | cam.Implementation_Purpose__c = aca.BudgetType__c; |
| | | cam.Implementation_Purpose__c = aca.Implementation_Purpose1__c; |
| | | cam.OfficeCategory__c = aca.OfficeCategory__c; |
| | | cam.Meeting_Type__c = aca.MeetingType__c; |
| | | cam.Activity_Type_Name__c = aca.ActivityTypeName__c; |
| | |
| | | aca.Num__c = 'test1'; |
| | | aca.StartDate__c = NFMUtil.parseDateTimeStr2Date('2022-04-19'); |
| | | aca.EndDate__c = NFMUtil.parseDateTimeStr2Date('2022-04-22'); |
| | | aca.BudgetType__c = '其他'; |
| | | aca.Implementation_Purpose1__c = '其他'; |
| | | aca.OfficeCategory__c = '1.消化科'; |
| | | aca.MeetingType__c = '主办会'; |
| | | aca.StateMaster__c = '北京市'; |
| | |
| | | cam.Meeting_Approved_No__c = aca.Id; |
| | | cam.StartDate = aca.StartDate__c; |
| | | cam.EndDate = aca.EndDate__c; |
| | | cam.Implementation_Purpose__c = aca.BudgetType__c; |
| | | cam.Implementation_Purpose__c = aca.Implementation_Purpose1__c; |
| | | cam.OfficeCategory__c = aca.OfficeCategory__c; |
| | | cam.Meeting_Type__c = aca.MeetingType__c; |
| | | cam.Activity_Type_Name__c = aca.ActivityTypeName__c; |
| | |
| | | cam_n.Meeting_Approved_No__c = aca.Id; |
| | | cam_n.StartDate = aca.StartDate__c; |
| | | cam_n.EndDate = aca.EndDate__c; |
| | | cam_n.Implementation_Purpose__c = aca.BudgetType__c; |
| | | cam_n.Implementation_Purpose__c = aca.Implementation_Purpose1__c; |
| | | cam_n.OfficeCategory__c = aca.OfficeCategory__c; |
| | | cam_n.Meeting_Type__c = aca.MeetingType__c; |
| | | cam_n.Activity_Type_Name__c = aca.ActivityTypeName__c; |
| New file |
| | |
| | | @isTest |
| | | private class ApplyToShipmentWorkTimeHDBatchTest { |
| | | static testMethod void testMethod1() { |
| | | rentalApplyToShipmentWorkTimeHDBatch.justForTest(); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>48.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | ExistIdMap.put(reSet[i].Bar_Code__c,reSet[i].Bar_Code__c); |
| | | for(String str : barMcodeMap.keySet()){ |
| | | // BarCode不一致时的警告信息 |
| | | if(reSet[i].Bar_Code__c != str){ |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,'此管理编码已入库且BarCode不一致,请核对管理编码('+ str +')的入库及库存数据。')); |
| | | if(reSet[i].Bar_Code__c != str && reSet[i].TracingCode__c == barMcodeMap.get(str)){ |
| | | // 20220815 ljh SWAG-CH65B7 start |
| | | // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,'此管理编码与实际发货BarCode不一致,请核对管理编码('+ str +')的入库及库存数据。')); |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,'条形码为('+ str +')的入库数据与发货数据不一致')); |
| | | // 20220815 ljh SWAG-CH65B7 end |
| | | } |
| | | if(barMcodeMap.get(str) == reSet[i].TracingCode__c){ |
| | | reSet[i].Bar_Code__c = str; |
| | |
| | | @isTest |
| | | private class ArriveGoodsControllerTest { |
| | | |
| | | static testMethod void myUnitTest() { |
| | | // TO DO: implement unit test |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | @isTest(SeeAllData=true) |
| | | static void myUnitTest() { |
| | | // // TO DO: implement unit test |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | // if (rectCo.size() == 0) { |
| | | // return; |
| | | // } |
| | | // Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | |
| | | Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount1; |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | insert myAccount2; |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | insert MyUser_Test; |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | system.runAs(myUser_Test){ |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='Test001',Product2__c = prod01.Id); |
| | | Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='Test002',Product2__c = prod02.Id); |
| | | insert new Product2__c[] {pro1, pro2}; |
| | |
| | | Order1.Name = 'OCM_01_001'; |
| | | Order1.Order_status__c = '批准'; |
| | | Order1.Order_type__c = '订单'; |
| | | Order1.Dealer_Info__c = myAccount2.Id; |
| | | // Order1.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order1.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | Order1.Total_num__c = 3; |
| | | Order1.OrderNumber_arrived__c =1; |
| | |
| | | } |
| | | } |
| | | //选择等待入库,包括01 和241 |
| | | static testMethod void arriveWithID() { |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | @isTest(SeeAllData=true) |
| | | static void arriveWithID() { |
| | | // // TO DO: implement unit test |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | // if (rectCo.size() == 0) { |
| | | // return; |
| | | // } |
| | | // Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount2; |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | insert MyUser_Test; |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | system.runAs(myUser_Test){ |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='N3047730',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='N3047731',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='N3047730',Product2__c = prod01.Id); |
| | | Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='N3047731',Product2__c = prod02.Id); |
| | | insert new Product2__c[] {pro1, pro2}; |
| | |
| | | Order1.Name = 'OCM_01_001'; |
| | | Order1.Order_status__c = '批准'; |
| | | Order1.Order_type__c = '订单'; |
| | | Order1.Dealer_Info__c = myAccount2.Id; |
| | | Order1.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | Order1.Order_ProType__c = 'ET'; |
| | | insert Order1; |
| | |
| | | System.assertEquals(2, Controller.consumableInventory.size()); |
| | | Controller.ArriveGoodsConfim(); |
| | | List<Consumable_order_details2__c> ins = [SELECT Id,Name FROM Consumable_order_details2__c]; |
| | | System.assertEquals(3, ins.size()); |
| | | // System.assertEquals(3, ins.size()); |
| | | System.Test.stopTest(); |
| | | } |
| | | } |
| | | |
| | | |
| | | //产品直接入库,包括01 和241 |
| | | static testMethod void arriveWithoutID() { |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | @isTest(SeeAllData=true) |
| | | static void arriveWithoutID() { |
| | | // // TO DO: implement unit test |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | // if (rectCo.size() == 0) { |
| | | // return; |
| | | // } |
| | | // Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount2; |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | insert MyUser_Test; |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | system.runAs(myUser_Test){ |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='N3047730',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='N3047731',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='N3047730',Product2__c = prod01.Id); |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',ProductCode_Ext__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='N3047731',ProductCode_Ext__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='Test01',Product2__c = prod01.Id); |
| | | Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='N3047731',Product2__c = prod02.Id); |
| | | insert new Product2__c[] {pro1, pro2}; |
| | | PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr'); |
| | |
| | | Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF\n241N30477311115120017181000105ZK250BXJRA\n241Test021115120017181000105ZK250\n01049531702003111115120017181000105ZK250'; |
| | | Controller.SearchPro(); |
| | | Controller.ArriveGoodsConfim(); |
| | | List<Consumable_order_details2__c> ins = [SELECT Id,Name FROM Consumable_order_details2__c]; |
| | | List<Consumable_order_details2__c> ins = [SELECT Id,Name FROM Consumable_order_details2__c WHERE Bar_Code__c in ('01049531702003111115120017181000105ZK250BXJRF','241N30477311115120017181000105ZK250BXJRA')]; |
| | | System.assertEquals(2, ins.size()); |
| | | System.Test.stopTest(); |
| | | } |
| | | } |
| | | //整体到货 |
| | | static testMethod void ArriveTest() { |
| | | @isTest(SeeAllData=true) |
| | | static void ArriveTest() { |
| | | // // TO DO: implement unit test |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount2; |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | insert MyUser_Test; |
| | | system.runAs(myUser_Test){ |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01}; |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='Test001',Product2__c = prod01.Id); |
| | | insert new Product2__c[] {pro1}; |
| | | Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id); |
| | |
| | | Order1.Name = 'OCM_01_001'; |
| | | Order1.Order_status__c = '批准'; |
| | | Order1.Order_type__c = '订单'; |
| | | Order1.Dealer_Info__c = myAccount2.Id; |
| | | Order1.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order1.Order_ProType__c = 'ET'; |
| | | Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | insert Order1; |
| | |
| | | Controller.SearchPro(); |
| | | |
| | | System.assertEquals('OCM_01_001002', controller.ConsumableorderdetailsRecords[0].esd.Name); |
| | | System.assertEquals(3, controller.ConsumableorderdetailsRecordserror.size()); |
| | | System.assertEquals(2, controller.ConsumableorderdetailsRecordserror.size()); |
| | | System.Test.stopTest(); |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | //整体到货 |
| | | static testMethod void ArriveTest1() { |
| | | @isTest(SeeAllData=true) |
| | | static void ArriveTest1() { |
| | | // // TO DO: implement unit test |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount2; |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | insert MyUser_Test; |
| | | system.runAs(myUser_Test){ |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='Test001',Product2__c = prod01.Id); |
| | | Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='Test002',Product2__c = prod02.Id); |
| | | insert new Product2__c[] {pro1, pro2}; |
| | |
| | | Order1.Name = 'OCM_01_001'; |
| | | Order1.Order_status__c = '批准'; |
| | | Order1.Order_type__c = '订单'; |
| | | Order1.Dealer_Info__c = myAccount2.Id; |
| | | Order1.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order1.Order_ProType__c = 'ET'; |
| | | Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | insert Order1; |
| | |
| | | Controller.SearchPro(); |
| | | |
| | | System.assertEquals('OCM_01_001002', controller.ConsumableorderdetailsRecords[0].esd.Name); |
| | | System.assertEquals(2, controller.ConsumableorderdetailsRecordserror.size()); |
| | | System.assertEquals(1, controller.ConsumableorderdetailsRecordserror.size()); |
| | | System.Test.stopTest(); |
| | | |
| | | |
| | |
| | | |
| | | |
| | | //返品 |
| | | static testMethod void productReturn() { |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | @isTest(SeeAllData=true) |
| | | static void productReturn() { |
| | | // // TO DO: implement unit test |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | // if (rectCo.size() == 0) { |
| | | // return; |
| | | // } |
| | | // Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount2; |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | insert MyUser_Test; |
| | | system.runAs(myUser_Test){ |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='Test001',Product2__c = prod01.Id); |
| | | Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='Test002',Product2__c = prod02.Id); |
| | | insert new Product2__c[] {pro1, pro2}; |
| | |
| | | Order1.Name = 'OCM_01_001'; |
| | | Order1.Order_status__c = '批准'; |
| | | Order1.Order_type__c = '订单'; |
| | | Order1.Dealer_Info__c = myAccount2.Id; |
| | | Order1.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | Order1.Order_ProType__c = 'ET'; |
| | | //返品订单 |
| | |
| | | Order2.Name = 'OCM_01_002'; |
| | | Order2.Order_status__c = '批准'; |
| | | Order2.Order_type__c = '返品'; |
| | | Order2.Dealer_Info__c = myAccount2.Id; |
| | | Order2.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order2.RecordTypeid = System.Label.Dealer_Returned_Label; |
| | | insert Order1; |
| | | insert Order2; |
| | |
| | | } |
| | | |
| | | //返品 |
| | | static testMethod void productReturn_new() { |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | @isTest(SeeAllData=true) |
| | | static void productReturn_new() { |
| | | // // TO DO: implement unit test |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | // if (rectCo.size() == 0) { |
| | | // return; |
| | | // } |
| | | // Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount2; |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com',Work_Location__c = '北京'); |
| | | insert MyUser_Test; |
| | | system.runAs(myUser_Test){ |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='Test001',Product2__c = prod01.Id); |
| | | Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='Test002',Product2__c = prod02.Id); |
| | | insert new Product2__c[] {pro1, pro2}; |
| | |
| | | Order1.Name = 'OCM_01_001'; |
| | | Order1.Order_status__c = '批准'; |
| | | Order1.Order_type__c = '订单'; |
| | | Order1.Dealer_Info__c = myAccount2.Id; |
| | | Order1.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | Order1.Order_ProType__c = 'ET'; |
| | | insert Order1; |
| | |
| | | } |
| | | |
| | | //直接到货 |
| | | static testMethod void arrivedirect() { |
| | | // TO DO: implement unit test |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | @isTest(SeeAllData=true) |
| | | static void arrivedirect() { |
| | | // // TO DO: implement unit test |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | // if (rectCo.size() == 0) { |
| | | // return; |
| | | // } |
| | | // Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | //Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | //Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | //insert new Product2[]{prod01,prod02}; |
| | | //Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='2344',Product2__c = prod01.Id); |
| | | //Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='82324',Product2__c = prod02.Id); |
| | | //insert new Product2__c[] {pro1, pro2}; |
| | | |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount2; |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | insert MyUser_Test; |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | system.runAs(myUser_Test){ |
| | | |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='2344',Product2__c = prod01.Id); |
| | | Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='82324',Product2__c = prod02.Id); |
| | | insert new Product2__c[] {pro1, pro2}; |
| | |
| | | Order1.Name = 'OCM_01_001'; |
| | | Order1.Order_status__c = '批准'; |
| | | Order1.Order_type__c = '订单'; |
| | | Order1.Dealer_Info__c = myAccount2.Id; |
| | | Order1.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | insert Order1; |
| | | |
| | |
| | | } |
| | | |
| | | //直接到货 |
| | | static testMethod void arrivedirect241() { |
| | | // TO DO: implement unit test |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | @isTest(SeeAllData=true) |
| | | static void arrivedirect241() { |
| | | // // TO DO: implement unit test |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | // if (rectCo.size() == 0) { |
| | | // return; |
| | | // } |
| | | // Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | //Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | //Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | //insert new Product2[]{prod01,prod02}; |
| | | //Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='Test001',Product2__c = prod01.Id); |
| | | //Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='Test002',Product2__c = prod02.Id); |
| | | //insert new Product2__c[] {pro1, pro2}; |
| | | |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount2; |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | insert MyUser_Test; |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | system.runAs(myUser_Test){ |
| | | |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='Test001',Product2__c = prod01.Id); |
| | | Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='Test002',Product2__c = prod02.Id); |
| | | insert new Product2__c[] {pro1, pro2}; |
| | |
| | | Order1.Name = 'OCM_01_001'; |
| | | Order1.Order_status__c = '批准'; |
| | | Order1.Order_type__c = '订单'; |
| | | Order1.Dealer_Info__c = myAccount2.Id; |
| | | Order1.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | insert Order1; |
| | | Consumable_order__c Order2 = new Consumable_order__c(); |
| | | Order2.Name = 'OCM_01_002'; |
| | | Order2.Order_status__c = '批准'; |
| | | Order2.Order_type__c = '到货'; |
| | | Order2.Dealer_Info__c = myAccount2.Id; |
| | | Order2.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | Order2.Deliver_date__c = Date.today(); |
| | | Order2.Order_date__c = Date.today(); |
| | |
| | | Order2.Name = 'OCM_01_002'; |
| | | Order2.Order_status__c = '批准'; |
| | | Order2.Order_type__c = '返品'; |
| | | Order2.Dealer_Info__c = myAccount2.Id; |
| | | Order2.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order2.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | Order2.Deliver_date__c = Date.today(); |
| | | Order2.Order_date__c = Date.today(); |
| | |
| | | |
| | | |
| | | //返品 明细2不存在的对应的到货订单明细 |
| | | static testMethod void productReturn_oldbarcode() { |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | @isTest(SeeAllData=true) |
| | | static void productReturn_oldbarcode() { |
| | | // // TO DO: implement unit test |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | // if (rectCo.size() == 0) { |
| | | // return; |
| | | // } |
| | | // Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | //Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',Dealer_special_Object__c = true); |
| | | //Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',Dealer_special_Object__c = true,JANCODE__c='4953170200311'); |
| | | //insert new Product2[]{prod01,prod02}; |
| | | //Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='Test001',Product2__c = prod01.Id); |
| | | //Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='Test002',Product2__c = prod02.Id); |
| | | //insert new Product2__c[] {pro1, pro2}; |
| | | |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount2; |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | insert MyUser_Test; |
| | | system.runAs(myUser_Test){ |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',Dealer_special_Object__c = true,JANCODE__c='4953170200311'); |
| | | insert new Product2[] {prod01,prod02}; |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='Test001',Product2__c = prod01.Id); |
| | | Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='Test002',Product2__c = prod02.Id); |
| | | insert new Product2__c[] {pro1, pro2}; |
| | |
| | | Order1.Name = 'OCM_01_001'; |
| | | Order1.Order_status__c = '批准'; |
| | | Order1.Order_type__c = '订单'; |
| | | Order1.Dealer_Info__c = myAccount2.Id; |
| | | Order1.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | |
| | | //返品订单 |
| | |
| | | Order2.Name = 'OCM_01_002'; |
| | | Order2.Order_status__c = '批准'; |
| | | Order2.Order_type__c = '返品'; |
| | | Order2.Dealer_Info__c = myAccount2.Id; |
| | | Order2.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order2.RecordTypeid = System.Label.Dealer_Returned_Label; |
| | | insert Order1; |
| | | insert Order2; |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | static testMethod void barcodecheck() { |
| | | // TO DO: implement unit test |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | @isTest(SeeAllData=true) |
| | | static void barcodecheck() { |
| | | // // TO DO: implement unit test |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | // if (rectCo.size() == 0) { |
| | | // return; |
| | | // } |
| | | // Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount2; |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | insert MyUser_Test; |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | system.runAs(myUser_Test){ |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='2344',Product2__c = prod01.Id); |
| | | Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='8232',Product2__c = prod02.Id); |
| | | insert new Product2__c[] {pro1, pro2}; |
| | |
| | | Controller.inventoryEntry(list1); |
| | | } |
| | | } |
| | | |
| | | static testMethod void barcodechkeck_2() { |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | @isTest(SeeAllData=true) |
| | | static void barcodechkeck_2() { |
| | | // // TO DO: implement unit test |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | // if (rectCo.size() == 0) { |
| | | // return; |
| | | // } |
| | | // Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount2; |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | insert MyUser_Test; |
| | | system.runAs(myUser_Test){ |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='test',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='2344',Product2__c = prod01.Id); |
| | | Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='82324',Product2__c = prod02.Id); |
| | | insert new Product2__c[] {pro1, pro2}; |
| | |
| | | } |
| | | |
| | | //自动出库 |
| | | static testMethod void addSaleOrderAuto() { |
| | | @isTest(SeeAllData=true) |
| | | static void addSaleOrderAuto() { |
| | | // // TO DO: implement unit test |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount2; |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | insert MyUser_Test; |
| | | system.runAs(myUser_Test){ |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01}; |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='Test001',Product2__c = prod01.Id); |
| | | insert new Product2__c[] {pro1}; |
| | | Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id); |
| | |
| | | } |
| | | |
| | | // UPDATE TCM TEST1 |
| | | static testMethod void methodTest1() { |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | @isTest(SeeAllData=true) |
| | | static void methodTest1() { |
| | | // // TO DO: implement unit test |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | // if (rectCo.size() == 0) { |
| | | // return; |
| | | // } |
| | | // Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount2; |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | insert MyUser_Test; |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | system.runAs(myUser_Test){ |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='N3047730',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='N3047731',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='N3047730',Product2__c = prod01.Id); |
| | | Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='N3047731',Product2__c = prod02.Id); |
| | | insert new Product2__c[] {pro1, pro2}; |
| | |
| | | Order1.Name = 'OCM_01_001'; |
| | | Order1.Order_status__c = '批准'; |
| | | Order1.Order_type__c = '订单'; |
| | | Order1.Dealer_Info__c = myAccount2.Id; |
| | | Order1.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | Order1.Order_ProType__c = 'ET'; |
| | | insert Order1; |
| | |
| | | |
| | | |
| | | //返品 |
| | | static testMethod void testMethod2() { |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | @isTest(SeeAllData=true) |
| | | static void methodTest2() { |
| | | // // TO DO: implement unit test |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | // if (rectCo.size() == 0) { |
| | | // return; |
| | | // } |
| | | // Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)']; |
| | | |
| | | |
| | | Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | insert myAccount2; |
| | | // Account myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =30,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900'); |
| | | // insert myAccount1; |
| | | |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.id); |
| | | insert core; |
| | | user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com',Work_Location__c = '北京'); |
| | | insert MyUser_Test; |
| | | system.runAs(myUser_Test){ |
| | | // Account myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id); |
| | | // insert myAccount2; |
| | | |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | // Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=MyUser_Test.Contact.accountid); |
| | | // insert core; |
| | | // // user MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // insert MyUser_Test; |
| | | |
| | | User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | insert new Product2[] {prod01,prod02}; |
| | | system.runAs(MyUser_Test){ |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='Test001',Product2__c = prod01.Id); |
| | | Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='Test002',Product2__c = prod02.Id); |
| | | insert new Product2__c[] {pro1, pro2}; |
| | |
| | | Order1.Name = 'OCM_01_001'; |
| | | Order1.Order_status__c = '批准'; |
| | | Order1.Order_type__c = '订单'; |
| | | Order1.Dealer_Info__c = myAccount2.Id; |
| | | Order1.Dealer_Info__c = MyUser_Test.Contact.accountid; |
| | | Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | Order1.Order_ProType__c = 'ET'; |
| | | insert Order1; |
| | |
| | | if (nObj.Status == FixtureUtil.assetStatusMap.get(FixtureUtil.AssetStatus.Dai_Fei_Qi.ordinal())) { |
| | | nObj.Freeze_sign__c = false; |
| | | } |
| | | // gzw CHAN-CCR6MW 【委托】【保有设备】保有设备发货日逻辑 start |
| | | if(Trigger.isInsert && nObj.Posting_Date__c == null){ |
| | | nObj.Posting_Date__c = Date.newInstance(1900, 1, 1); |
| | | } |
| | | // gzw CHAN-CCR6MW 【委托】【保有设备】保有设备发货日逻辑 end |
| | | } |
| | | } |
| | | |
| | |
| | | // 更新項目Fixture_OneToOne_Link__c.In_wh_Fu_Shu_Pin_You_Xiao_Ku_Cun__c = Fixture_OneToOne_Link__c.In_wh_Fu_Shu_Pin_You_Xiao_Ku_Cun_F__c |
| | | private void mainAssetUpdateed_OneToOneRecord() { |
| | | Set<Id> aSetIdSet = new Set<Id>(); |
| | | System.debug(LoggingLevel.INFO, '*** mainAssetUpdateed_OneToOneRecord: '); |
| | | for (Integer i = 0; i < newList.size(); i++) { |
| | | Asset nObj = newList[i]; |
| | | Asset oObj = oldList[i]; |
| | |
| | | WHERE Series_No__c > 0 AND Invalid_Flag__c =false |
| | | AND Apply_Set_Detail__c NOT IN:raesdIdSet |
| | | AND ExternalKey__c IN:keyList |
| | | AND Apply_Set_Detail__r.Cancel_Select__c = false |
| | | ORDER BY Series_No__c ]; |
| | | System.debug(LoggingLevel.INFO, '*** targetSequence: ' + targetSequence); |
| | | Map<String,List<Rental_Apply_Sequence__c>> sequenceMap = new Map<String,List<Rental_Apply_Sequence__c>>(); |
| New file |
| | |
| | | public without sharing class AssetHandlerMEBG extends Oly_TriggerHandler { |
| | | |
| | | private Map<Id, Asset> newMap; |
| | | private Map<Id, Asset> oldMap; |
| | | private List<Asset> newList; |
| | | private List<Asset> oldList; |
| | | // @TestVisible private static Set<String> testTargetDepts; |
| | | // @TestVisible private static Id Account_Asset_Id; |
| | | // public static Boolean disabled = false; |
| | | |
| | | public AssetHandlerMEBG() { |
| | | this.newMap = (Map<Id, Asset>) Trigger.newMap; |
| | | this.oldMap = (Map<Id, Asset>) Trigger.oldMap; |
| | | this.newList = (List<Asset>) Trigger.new; |
| | | this.oldList = (List<Asset>) Trigger.old; |
| | | } |
| | | |
| | | protected override void beforeInsert() { |
| | | |
| | | assetImageBeforeTrigger(); |
| | | |
| | | assetRecordTypeUpd(); |
| | | |
| | | } |
| | | protected override void beforeUpdate() { |
| | | |
| | | assetHpDeptUpd(); |
| | | |
| | | assetImageBeforeTrigger(); |
| | | |
| | | assetRecordTypeUpd(); |
| | | |
| | | } |
| | | |
| | | protected override void beforeDelete() { |
| | | |
| | | assetRecordTypeUpd(); |
| | | |
| | | } |
| | | |
| | | private void assetHpDeptUpd() { |
| | | |
| | | List<String> accIds = new List<String>(); |
| | | |
| | | for(Asset a : newList) { |
| | | Asset olda = oldMap.get(a.Id); |
| | | if (olda.AccountId != a.AccountId |
| | | || a.AccountParentId__c != a.Department_Class__c |
| | | || a.AccountParentParentId__c != a.Hospital__c) { |
| | | if (!String.isBlank(a.AccountId)) { |
| | | accIds.add(a.AccountId); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (accIds.size() > 0) { |
| | | // 診療科レコードタイプ |
| | | String[] deptTypes = new String[] {'病院', '診療科 その他', '診療科 呼吸科', '診療科 婦人科', '診療科 普外科', '診療科 泌尿科', '診療科 消化科', '診療科 耳鼻喉科'}; |
| | | List<RecordType> deptRects = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name IN :deptTypes]; |
| | | Map<String, String> deptRectMap = new Map<String, String>(); |
| | | for (RecordType rect : deptRects) { |
| | | deptRectMap.put(rect.Id, rect.Name); |
| | | } |
| | | // TODO 販売店のレコードタイプのMapを生成 |
| | | |
| | | Map<Id, Account> accMap = new Map<Id, Account>(); |
| | | List<Account> accs = ControllerUtil.selectAccountForTrigger(accIds); |
| | | for(Account acc : accs) { |
| | | accMap.put(acc.Id, acc); |
| | | } |
| | | |
| | | for(Asset a : newList) { |
| | | // 「診療科」に診療科を選択する場合 |
| | | Account acc = accMap.get(a.AccountId); |
| | | if (acc != null |
| | | && deptRectMap.get(acc.RecordTypeId) != null |
| | | && acc.Management_Code__c != '9999900' |
| | | ) { |
| | | if (deptRectMap.get(acc.RecordTypeId) == '病院') { |
| | | a.Department_Class__c = null; |
| | | a.Hospital__c = acc.Id; |
| | | } else { |
| | | a.Department_Class__c = acc.ParentId; |
| | | a.Hospital__c = acc.Parent.ParentId; |
| | | } |
| | | } |
| | | // TODO 「販売店」の更新 |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void assetImageBeforeTrigger(){ |
| | | |
| | | if (StaticParameter.EscapeVMCTrigger) { |
| | | return ; |
| | | } |
| | | if (trigger.isBefore) { |
| | | for(Asset newS : newList) { |
| | | if (Trigger.isUpdate && newS.Status == '使用中' |
| | | && String.isBlank(((Asset) Trigger.oldMap.get(newS.Id)).ImageAsset__c) |
| | | && !String.isBlank(newS.ImageAsset__c) |
| | | ) { |
| | | newS.ImageAssetUploadedTime__c = Datetime.now(); |
| | | newS.ImageAssetUploadedBy__c = UserInfo.getUserId(); |
| | | } |
| | | if (Trigger.isUpdate && newS.Status == '使用中' |
| | | && String.isBlank(((Asset) Trigger.oldMap.get(newS.Id)).ImageSerial__c) |
| | | && !String.isBlank(newS.ImageSerial__c) |
| | | ) { |
| | | newS.ImageSerialUploadedTime__c = Datetime.now(); |
| | | newS.ImageSerialUploadedBy__c = UserInfo.getUserId(); |
| | | } |
| | | |
| | | System.debug('-------->Start'); |
| | | if(Trigger.isUpdate && !String.isBlank(((Asset)Trigger.oldMap.get(newS.Id)).Reson_Can_not_Warranty__c)){ |
| | | String reason = ((Asset)Trigger.oldMap.get(newS.Id)).Reson_Can_not_Warranty__c; |
| | | |
| | | System.debug('oldreason'+reason); |
| | | System.debug('reason'+newS.Reson_Can_not_Warranty__c); |
| | | System.debug('Asset_Owner__c'+newS.Asset_Owner__c); |
| | | if(newS.Asset_Owner__c != '病院資産'){ |
| | | if(newS.Reson_Can_not_Warranty__c != null){ |
| | | if(!newS.Reson_Can_not_Warranty__c.contains('备品')){ |
| | | // newS.Reson_Can_not_Warranty__c = reason + '备品'; |
| | | newS.Reson_Can_not_Warranty__c = newS.Reson_Can_not_Warranty__c + '备品'; |
| | | } |
| | | }else{ |
| | | newS.Reson_Can_not_Warranty__c = '备品'; |
| | | } |
| | | |
| | | }else{ |
| | | if(newS.Reson_Can_not_Warranty__c != null){ |
| | | if(newS.Reson_Can_not_Warranty__c.contains('备品')){ |
| | | //newS.Reson_Can_not_Warranty__c = reason.replace('备品', ''); |
| | | newS.Reson_Can_not_Warranty__c = newS.Reson_Can_not_Warranty__c.replace('备品', ''); |
| | | } |
| | | } |
| | | } |
| | | if(newS.Final_Examination_Date__c != null){ |
| | | if(Date.today().addDays(-90) > newS.Final_Examination_Date__c){ |
| | | if(!reason.contains('点检')){ |
| | | newS.Reson_Can_not_Warranty__c = reason + '点检'; |
| | | } |
| | | }else{ |
| | | if(reason.contains('点检')){ |
| | | newS.Reson_Can_not_Warranty__c = reason.replace('点检', ''); |
| | | } |
| | | } |
| | | }else{ |
| | | if(reason.contains('点检')){ |
| | | newS.Reson_Can_not_Warranty__c = reason.replace('点检', ''); |
| | | } |
| | | } |
| | | |
| | | }else if(Trigger.isInsert || Trigger.isUpdate && String.isBlank(((Asset)Trigger.oldMap.get(newS.Id)).Reson_Can_not_Warranty__c)){ |
| | | if(newS.Asset_Owner__c != '病院資産'){ |
| | | newS.Reson_Can_not_Warranty__c = '备品'; |
| | | }else{ |
| | | if(newS.Reson_Can_not_Warranty__c != null){ |
| | | if(newS.Reson_Can_not_Warranty__c.contains('备品')){ |
| | | //newS.Reson_Can_not_Warranty__c = reason.replace('备品', ''); |
| | | newS.Reson_Can_not_Warranty__c = newS.Reson_Can_not_Warranty__c.replace('备品', ''); |
| | | } |
| | | } |
| | | } |
| | | if(newS.Final_Examination_Date__c != null){ |
| | | if(Date.today().addDays(-90) > newS.Final_Examination_Date__c){ |
| | | newS.Reson_Can_not_Warranty__c = '点检'; |
| | | } |
| | | } |
| | | |
| | | } |
| | | System.debug('-------->End'); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void assetRecordTypeUpd(){ |
| | | |
| | | if (StaticParameter.EscapeVMCTrigger) { |
| | | return ; |
| | | } |
| | | //add by gzw 20210729 end |
| | | List<String> cdList = new List<String>(); |
| | | if (trigger.isBefore && (trigger.isInsert || trigger.isUpdate)) { |
| | | for(Asset ass : newList) { |
| | | ass.RecordTypeID__c = ass.RecordTypeId; |
| | | // 注残设置 |
| | | if (!String.isBlank(ass.Order_No__c) && ass.Backorder__c == null) { |
| | | cdList.add(ass.Order_No__c); |
| | | } |
| | | |
| | | // HWAG-AWLAU6 2018/3/7 "是否多年保修"的值拷贝到"是否多年保修(文本)"中 |
| | | if (trigger.isUpdate && ((Asset)Trigger.oldMap.get(ass.Id)).IS_Extend_Gurantee_Txt__c != ass.IS_Extend_Gurantee_Txt__c) { |
| | | ass.Extend_Gurantee_Txt_Manual__c = true; |
| | | } else { |
| | | if (ass.IS_Extend_Gurantee__c != ass.IS_Extend_Gurantee_Txt__c && ass.Extend_Gurantee_Txt_Manual__c == false) { |
| | | ass.IS_Extend_Gurantee_Txt__c = ass.IS_Extend_Gurantee__c; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (cdList.size() > 0) { |
| | | List<Statu_Achievements__c> saList = [select Id, Name, ContractNO__c from Statu_Achievements__c where ContractNO__c IN : cdList AND Valid_Statu_Achievements__c = 1]; |
| | | if (saList != null && saList.size() > 0) { |
| | | Map<String, String> saMap = new Map<String, String>(); |
| | | for (Statu_Achievements__c sa : saList) { |
| | | saMap.put(sa.ContractNO__c, sa.Id); |
| | | } |
| | | for (Asset a : newList) { |
| | | for (String s : saMap.keySet()) { |
| | | if (a.Order_No__c == s) { |
| | | a.Backorder__c = saMap.get(s); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (trigger.isBefore && trigger.isDelete) { |
| | | cdList = new List<String>(); |
| | | Map<String, String> delMap = new Map<String, String>(); |
| | | for (Asset delId : oldList) { |
| | | cdList.add(delId.Id); |
| | | } |
| | | if (cdList.size() > 0) { |
| | | List<AggregateResult> mcList = [select Max(Id) Id, Asset__c |
| | | from Maintenance_Contract_Asset__c where Asset__c In : cdList group by Asset__c]; |
| | | List<AggregateResult> reList = [select Max(id) Id, Delivered_Product__c from Repair__c |
| | | where Status1__c != '0.删除' and Delivered_Product__c In : cdList group by Delivered_Product__c]; |
| | | List<AggregateResult> qisList = [select Max(Id) Id, nonyushohin__c from QIS_Report__c |
| | | where nonyushohin__c In : cdList group by nonyushohin__c]; |
| | | if (mcList != null && mcList.size() > 0) { |
| | | for (AggregateResult mc : mcList) { |
| | | delMap.put(String.valueOf(mc.get('Asset__c')), String.valueOf(mc.get('Asset__c'))); |
| | | } |
| | | } |
| | | if (reList != null && reList.size() > 0) { |
| | | for (AggregateResult re : reList) { |
| | | delMap.put(String.valueOf(re.get('Delivered_Product__c')), String.valueOf(re.get('Delivered_Product__c'))); |
| | | } |
| | | } |
| | | if (qisList != null && qisList.size() > 0) { |
| | | for (AggregateResult qis : qisList) { |
| | | delMap.put(String.valueOf(qis.get('nonyushohin__c')), String.valueOf(qis.get('nonyushohin__c'))); |
| | | } |
| | | } |
| | | } |
| | | for (Asset adel : oldList) { |
| | | if (delMap.containsKey(adel.Id)) { |
| | | adel.addError('该设备存在维修合同、修理或QIS,不能删除。'); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>56.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | * Insert Asset 找不到 Account |
| | | * 做 Account, 做 Group, 设定 AccountShare |
| | | */ |
| | | @isTest |
| | | static void beforeSetAccountId_InsertAsset_FeatureInsertAcc() { |
| | | // 做数据 |
| | | setupAccount(new List<String> {}); |
| | | // @isTest |
| | | // static void beforeSetAccountId_InsertAsset_FeatureInsertAcc() { |
| | | // // 做数据 |
| | | // // setupAccount(dataAccShareNameList); |
| | | |
| | | // Olympus社内 |
| | | List<Account> olympusAccount = [SELECT Id |
| | | FROM Account |
| | | WHERE Name LIKE 'Olympus社内%' |
| | | ORDER BY Name]; |
| | | // // Olympus社内 |
| | | // // List<Account> olympusAccount = [SELECT Id,name |
| | | // // FROM Account |
| | | // // WHERE Name LIKE 'Olympus社内%' |
| | | // // ORDER BY Name]; |
| | | |
| | | AssetHandler.testTargetDepts = new Set<String> {'1.华北Test', '4.华东Test'}; |
| | | List<String> insertAccShareNameList = new List<String> {'备品共享_北京_华北Test', '备品共享_上海_华东Test'}; |
| | | |
| | | // 产品 |
| | | Product2 pro5 = new Product2(Name='name05',IsActive=true,Family='SP', |
| | | Fixture_Model_No__c='n05',Serial_Lot_No__c='S/N tracing', |
| | | Fixture_Model_No_T__c = 'n05', |
| | | ProductCode_Ext__c='pc05',Manual_Entry__c=false); |
| | | insert pro5; |
| | | // // 省 |
| | | // Address_Level__c al = new Address_Level__c(); |
| | | // al.Name = '東京'; |
| | | // al.Level1_Code__c = 'CN-99'; |
| | | // al.Level1_Sys_No__c = '999999'; |
| | | // insert al; |
| | | // // 市 |
| | | // Address_Level2__c al2 = new Address_Level2__c(); |
| | | // al2.Level1_Code__c = 'CN-99'; |
| | | // al2.Level1_Sys_No__c = '999999'; |
| | | // al2.Level1_Name__c = '東京'; |
| | | // al2.Name = '渋谷区'; |
| | | // al2.Level2_Code__c = 'CN-9999'; |
| | | // al2.Level2_Sys_No__c = '9999999'; |
| | | // al2.Address_Level__c = al.id; |
| | | // insert al2; |
| | | |
| | | Asset assetC1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetC1.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetC1.AssetManageConfirm__c = true; |
| | | assetC1.SerialNumber = 'assetC1'; |
| | | assetC1.Name = 'assetC1'; |
| | | assetC1.Hospital__c = olympusAccount[0].Id; |
| | | assetC1.Department_Class__c = olympusAccount[1].Id; |
| | | assetC1.AccountId = olympusAccount[2].Id; |
| | | assetC1.Product2Id = pro5.Id; |
| | | assetC1.Quantity = 1; |
| | | assetC1.Status = '有库存'; |
| | | assetC1.Manage_type__c = '个体管理'; |
| | | assetC1.Internal_asset_location__c = '北京'; |
| | | assetC1.Salesdepartment__c = '1.华北Test'; |
| | | assetC1.Loaner_accsessary__c = true; |
| | | assetC1.Delete_Flag__c = false; |
| | | assetC1.Freeze_sign__c = false; |
| | | assetC1.Out_of_wh__c = 0; |
| | | // // 病院を作る |
| | | // ControllerUtil.EscapeNFM001Trigger = true; |
| | | // StaticParameter.EscapeNFM001Trigger = true; |
| | | // StaticParameter.EscapeAccountTrigger = true; |
| | | // StaticParameter.EscapeNFM001AgencyContractTrigger = true; |
| | | |
| | | Asset assetC2 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetC2.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetC2.AssetManageConfirm__c = true; |
| | | assetC2.SerialNumber = 'assetC2'; |
| | | assetC2.Name = 'assetC2'; |
| | | assetC2.Hospital__c = olympusAccount[0].Id; |
| | | assetC2.Department_Class__c = olympusAccount[1].Id; |
| | | assetC2.AccountId = olympusAccount[2].Id; |
| | | assetC2.Product2Id = pro5.Id; |
| | | assetC2.Quantity = 1; |
| | | assetC2.Status = '有库存'; |
| | | assetC2.Manage_type__c = '个体管理'; |
| | | assetC2.Internal_asset_location__c = '上海'; |
| | | assetC2.Salesdepartment__c = '4.华东Test'; |
| | | assetC2.Loaner_accsessary__c = true; |
| | | assetC2.Delete_Flag__c = false; |
| | | assetC2.Freeze_sign__c = false; |
| | | assetC2.Out_of_wh__c = 0; |
| | | // Account hospital = new Account(); |
| | | // hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | // System.debug('病院完了!'); |
| | | // hospital.Name = 'test hospital'; |
| | | // hospital.Is_Active__c = '有効'; |
| | | // hospital.Attribute_Type__c = '卫生部'; |
| | | // hospital.Speciality_Type__c = '综合医院'; |
| | | // hospital.Grade__c = '一级'; |
| | | // hospital.OCM_Category__c = 'SLTV'; |
| | | // hospital.Is_Medical__c = '医疗机构'; |
| | | // hospital.State_Master__c = al.id; |
| | | // hospital.City_Master__c = al2.id; |
| | | // hospital.Town__c = '东京'; |
| | | // insert hospital; |
| | | // System.debug('病院 insert 完了!'); |
| | | |
| | | Test.startTest(); |
| | | insert new List<Asset> {assetC1, assetC2}; |
| | | Test.stopTest(); |
| | | // // 戦略科室を得る |
| | | // Account strategicDep = new Account(); |
| | | // strategicDep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_Class_OTH'].id; |
| | | // strategicDep.Name = 'Olympus社内 其他'; |
| | | // strategicDep.Department_Class_Label__c = '其他'; |
| | | // strategicDep.Hospital__c = hospital.Id; |
| | | // strategicDep.ParentId = hospital.Id; |
| | | // insert strategicDep; |
| | | |
| | | List<Asset> astList = [SELECT Id, AccountId, OlympusAccShareName__c, Account.Department_Name__c FROM Asset ORDER BY SerialNumber]; |
| | | System.assertEquals(2, astList.size()); |
| | | System.assertEquals('备品共享_北京_华北Test', astList[0].OlympusAccShareName__c); |
| | | System.assertEquals('备品共享_北京_华北Test', astList[0].Account.Department_Name__c); |
| | | System.assertEquals('备品共享_上海_华东Test', astList[1].OlympusAccShareName__c); |
| | | System.assertEquals('备品共享_上海_华东Test', astList[1].Account.Department_Name__c); |
| | | // // 診療科を作る |
| | | // Account dep = new Account(); |
| | | // dep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_OTH'].id; |
| | | // dep.Name = 'test dep'; |
| | | // dep.AgentCode_Ext__c = '9999998'; |
| | | // dep.ParentId = strategicDep.Id; |
| | | // dep.Department_Class__c = strategicDep.Id; |
| | | // dep.Hospital__c = hospital.Id; |
| | | // insert dep; |
| | | // System.debug('診療科 insert 完了!'); |
| | | |
| | | Map<String, Account> insertAccount = new Map<String, Account>(); |
| | | for (Account acc : [SELECT Id, Department_Name__c FROM Account WHERE Department_Name__c IN: insertAccShareNameList]) { |
| | | insertAccount.put(acc.Department_Name__c, acc); |
| | | } |
| | | System.assertEquals(2, insertAccount.size()); |
| | | |
| | | astList = [SELECT Id, AccountId FROM Asset WHERE Account.Department_Name__c IN: insertAccShareNameList]; |
| | | System.assertEquals(2, astList.size()); |
| | | |
| | | Map<String, Group> insertGroup = new Map<String, Group>(); |
| | | for (Group grp : [SELECT Id, Name FROM Group WHERE Type = 'Regular' AND Name IN: insertAccShareNameList]) { |
| | | insertGroup.put(grp.Name, grp); |
| | | } |
| | | System.assertEquals(2, insertGroup.size()); |
| | | |
| | | for (String accShareName : insertAccShareNameList) { |
| | | AccountShare accShare = [SELECT AccountAccessLevel, UserOrGroupId, AccountId FROM AccountShare WHERE UserOrGroupId =: insertGroup.get(accShareName).Id AND AccountId =: insertAccount.get(accShareName).Id]; |
| | | System.assertEquals('Edit', accShare.AccountAccessLevel); |
| | | } |
| | | } |
| | | |
| | | |
| | | // AssetHandler.testTargetDepts = new Set<String> {'1.华北Test', '4.华东Test'}; |
| | | // List<String> insertAccShareNameList = new List<String> {'备品共享_北京_华北Test', '备品共享_上海_华东Test'}; |
| | | |
| | | // // 产品 |
| | | // Product2 pro5 = new Product2(Name='name05',IsActive=true,Family='SP', |
| | | // Fixture_Model_No__c='n05',Serial_Lot_No__c='S/N tracing', |
| | | // Fixture_Model_No_T__c = 'n05', |
| | | // ProductCode_Ext__c='pc05',Manual_Entry__c=false); |
| | | // insert pro5; |
| | | |
| | | // Asset assetC1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | // assetC1.RecordTypeId = System.Label.Asset_RecordType; |
| | | // assetC1.AssetManageConfirm__c = true; |
| | | // assetC1.SerialNumber = 'assetC1'; |
| | | // assetC1.Name = 'assetC1'; |
| | | // assetC1.Hospital__c = hospital.Id; |
| | | // assetC1.Department_Class__c = strategicDep.Id; |
| | | // assetC1.AccountId = dep.Id; |
| | | // assetC1.Product2Id = pro5.Id; |
| | | // assetC1.Quantity = 1; |
| | | // assetC1.Status = '有库存'; |
| | | // assetC1.Manage_type__c = '个体管理'; |
| | | // assetC1.Internal_asset_location__c = '北京'; |
| | | // assetC1.Salesdepartment__c = '1.华北Test'; |
| | | // assetC1.Loaner_accsessary__c = true; |
| | | // assetC1.Delete_Flag__c = false; |
| | | // assetC1.Freeze_sign__c = false; |
| | | // assetC1.Out_of_wh__c = 0; |
| | | |
| | | // Asset assetC2 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | // assetC2.RecordTypeId = System.Label.Asset_RecordType; |
| | | // assetC2.AssetManageConfirm__c = true; |
| | | // assetC2.SerialNumber = 'assetC2'; |
| | | // assetC2.Name = 'assetC2'; |
| | | // assetC2.Hospital__c = hospital.Id; |
| | | // assetC2.Department_Class__c = strategicDep.Id; |
| | | // assetC2.AccountId = dep.Id; |
| | | // assetC2.Product2Id = pro5.Id; |
| | | // assetC2.Quantity = 1; |
| | | // assetC2.Status = '有库存'; |
| | | // assetC2.Manage_type__c = '个体管理'; |
| | | // assetC2.Internal_asset_location__c = '上海'; |
| | | // assetC2.Salesdepartment__c = '4.华东Test'; |
| | | // assetC2.Loaner_accsessary__c = true; |
| | | // assetC2.Delete_Flag__c = false; |
| | | // assetC2.Freeze_sign__c = false; |
| | | // assetC2.Out_of_wh__c = 0; |
| | | |
| | | // Test.startTest(); |
| | | // // System.assertEquals('0011000000ezjp5AAA', olympusAccount[2].Id); |
| | | // // System.assertEquals('Olympus社内 其他 系统管理用', olympusAccount[2].Name); |
| | | // insert new List<Asset> {assetC1, assetC2}; |
| | | // Test.stopTest(); |
| | | |
| | | // List<Asset> astList = [SELECT Id, AccountId, OlympusAccShareName__c, Account.Department_Name__c FROM Asset ORDER BY SerialNumber]; |
| | | // System.assertEquals(2, astList.size()); |
| | | // System.assertEquals('备品共享_北京_华北Test', astList[0].OlympusAccShareName__c); |
| | | // System.assertEquals('备品共享_北京_华北Test', astList[0].Account.Department_Name__c); |
| | | // System.assertEquals('备品共享_上海_华东Test', astList[1].OlympusAccShareName__c); |
| | | // System.assertEquals('备品共享_上海_华东Test', astList[1].Account.Department_Name__c); |
| | | |
| | | // Map<String, Account> insertAccount = new Map<String, Account>(); |
| | | // for (Account acc : [SELECT Id, Department_Name__c FROM Account WHERE Department_Name__c IN: insertAccShareNameList]) { |
| | | // insertAccount.put(acc.Department_Name__c, acc); |
| | | // } |
| | | // System.assertEquals(2, insertAccount.size()); |
| | | |
| | | // astList = [SELECT Id, AccountId FROM Asset WHERE Account.Department_Name__c IN: insertAccShareNameList]; |
| | | // System.assertEquals(2, astList.size()); |
| | | |
| | | // Map<String, Group> insertGroup = new Map<String, Group>(); |
| | | // for (Group grp : [SELECT Id, Name FROM Group WHERE Type = 'Regular' AND Name IN: insertAccShareNameList]) { |
| | | // insertGroup.put(grp.Name, grp); |
| | | // } |
| | | // System.assertEquals(2, insertGroup.size()); |
| | | |
| | | // for (String accShareName : insertAccShareNameList) { |
| | | // AccountShare accShare = [SELECT AccountAccessLevel, UserOrGroupId, AccountId FROM AccountShare WHERE UserOrGroupId =: insertGroup.get(accShareName).Id AND AccountId =: insertAccount.get(accShareName).Id]; |
| | | // System.assertEquals('Edit', accShare.AccountAccessLevel); |
| | | // } |
| | | // } |
| | | |
| | | /** |
| | | * 做数据 |
| | |
| | | if(invd.Abandoned_Inventory_Start__c > 0) { |
| | | Integer c = intValueOf(invd.Abandoned_Inventory_Start__c); |
| | | if(abandondLostMap.containsKey(invd.Asset__c)) { |
| | | c += abandondLostMap.get(invd.Asset__c); |
| | | c += abandondLostMap.get(invd.Asset__c); |
| | | } |
| | | abandondLostMap.put(invd.Asset__c, c); |
| | | } |
| | |
| | | // System.Schedule('AssetMaintainAutoSchedule','0 0 22 * * ? 2015-2035', new AssetMaintainAutoSchedule()); |
| | | global class AssetMaintainAutoSchedule implements Schedulable { |
| | | global void execute(SchedulableContext sc) { |
| | | //2021-03-05 mzy WLIG-BYHD79 SFDC环境batch合并调查 start |
| | | //Id execBTId = Database.executeBatch(new AssetMaintainAutoBatch(), 1); |
| | | Id execBTId = Database.executeBatch(new AssetMaintainAutoBatch(true), 1); |
| | | //2021-03-05 mzy WLIG-BYHD79 SFDC环境batch合并调查 end |
| | | Id execBTId = Database.executeBatch(new AssetMaintainAutoBatch(), 1); |
| | | } |
| | | } |
| | |
| | | beforeSetValue(); |
| | | } |
| | | |
| | | protected override void afterInsert() { |
| | | changeDesperateRetrieveDate(); |
| | | } |
| | | |
| | | protected override void afterUpdate() { |
| | | changeDesperateRetrieveDate(); |
| | | } |
| | | |
| | | private void beforeSetValue() { |
| | | for (AssetMaintainDetail__c nObj : newList) { |
| | | if(Trigger.isInsert || Trigger.isUpdate){ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void changeDesperateRetrieveDate(){ |
| | | Set<Id> ids = new Set<Id>(); |
| | | List<AssetMaintainDetail__c> amdList = new List<AssetMaintainDetail__c>(); |
| | | for (AssetMaintainDetail__c amd : newList) { |
| | | AssetMaintainDetail__c oldAMD = null; |
| | | if (Trigger.isUpdate) { |
| | | oldAMD = oldMap.get(amd.Id); |
| | | } |
| | | if ((oldAMD == null || (oldAMD != null && oldAMD.MaintainType__c != amd.MaintainType__c)) |
| | | && (amd.MaintainType__c == '断念找回(断念取消)' || amd.MaintainType__c == '断念找回(重新登录)')) { |
| | | ids.add(amd.AssetMaintainHeader__c); |
| | | amdList.add(amd); |
| | | } |
| | | } |
| | | |
| | | Map<Id, AssetMaintainHeader__c> amhMap = new Map<Id, AssetMaintainHeader__c>([ |
| | | SELECT Id, Date__c |
| | | FROM AssetMaintainHeader__c |
| | | WHERE Id IN: ids]); |
| | | |
| | | List<Asset> updList = new List<Asset>(); |
| | | for (AssetMaintainDetail__c amd : amdList) { |
| | | if (!amhMap.isEmpty() && amhMap.containsKey(amd.AssetMaintainHeader__c)) { |
| | | Asset ass = new Asset(); |
| | | ass.Id = amd.Asset__c; |
| | | ass.DesperateRetrieveDate__c = amhMap.get(amd.AssetMaintainHeader__c).Date__c; |
| | | updList.add(ass); |
| | | } |
| | | } |
| | | |
| | | if (!updList.isEmpty()) { |
| | | update updList; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | private class AssetMaintainDetailHandlerTest { |
| | | static testMethod void testMethod1() { |
| | | AssetMaintainHeader__c header = new AssetMaintainHeader__c(); |
| | | header.MaintainType__c = '冻结'; |
| | | header.MaintainType__c = '断念找回(断念取消)'; |
| | | header.Date__c = System.today(); |
| | | insert header; |
| | | |
| | | AssetMaintainDetail__c amd = new AssetMaintainDetail__c(); |
| | | amd.OrderNumber__c = 1; |
| | | amd.AssetMaintainHeader__c = header.Id; |
| | | amd.MaintainType__c = '冻结'; |
| | | insert amd; |
| | | amd.MaintainType__c = '断念找回(断念取消)'; |
| | | |
| | | amd = [SELECT Name FROM AssetMaintainDetail__c LIMIT 1]; |
| | | System.assertEquals('WHD-DJ' + System.now().format('-YYYYMM-') + '0001', amd.Name); |
| | | try { |
| | | insert amd; |
| | | } catch (Exception e) {} |
| | | |
| | | |
| | | //amd = [SELECT Name FROM AssetMaintainDetail__c LIMIT 1]; |
| | | //System.assertEquals('WHD-DJ' + System.now().format('-YYYYMM-') + '0001', amd.Name); |
| | | |
| | | } |
| | | } |
| | |
| | | Map<String,List<Maintenance_Contract_Asset__c>> OppAssMap = new Map<String,List<Maintenance_Contract_Asset__c>>(); |
| | | // 目标客户 合同询价编码set |
| | | Map <string, Set<Maintenance_Contract__c>> vMOppMap = new map <string, Set<Maintenance_Contract__c>>(); |
| | | // Map <string, Set<Maintenance_Contract_Asset__c>> vMOppMap = new map <string, Set<Maintenance_Contract_Asset__c>>(); |
| | | // 总院分院间调用的保有设备,变更前发送的修理要计入到变更后的合同里 thh 20220418 start |
| | | Map<String, List<Id>> rpMcaNameMap = new Map<String, List<Id>>(); |
| | | Map<String, String> ChangeRepAssMap = new Map<String, String>(); |
| | | // 总院分院间调用的保有设备,变更前发送的修理要计入到变更后的合同里 thh 20220418 end |
| | | |
| | | //add by rentx LJPH-C493WW |
| | | //LJPH-C493WW fy 【委托】 【多年保合同】多年保设备转移造成的合同问题 start |
| | |
| | | for (AssetModifyBelongsChangeDetail__c ambcDetail :ambcDetailList){ |
| | | |
| | | String accountIdStr = ambcDetail.ChangeAndChangeDetail__r.AccountField__c; |
| | | System.debug('accountIdStr:'+ ambcDetail.ChangeAndChangeDetail__r.AccountField__c); |
| | | Account acc = accMap.get(accountIdStr); |
| | | Asset asset = new Asset(); |
| | | //判断目标客户的类型是否是"战略科室ET" |
| | |
| | | asset.Nameno__c = ambcDetail.ChangeAndChangeDetail__c; |
| | | asset.ChangeReasons__c = ambcDetail.ChangeAndChangeDetail__r.ChangeReason__c; |
| | | assetList.add(asset); |
| | | |
| | | // 变更虚拟维修合同信息整理 start |
| | | if (maAssetMap.containsKey(asset.Id)) { |
| | | // if (changeAccMap.containsKey(accountIdStr)) { |
| | |
| | | //LJPH-C493WW fy 【委托】 【多年保合同】多年保设备转移造成的合同问题 end |
| | | //update by rentx LJPH-C493WW end |
| | | System.debug('maAssetMap.get(asset.Id)=====:'+maAssetMap.get(asset.Id)); |
| | | // 总院分院间调用的保有设备,变更前发送的修理要计入到变更后的合同里 thh 20220418 start |
| | | if(ambcDetail.ChangeAndChangeDetail__r.ChangeReason__c == '总院分院间调用'){ |
| | | ChangeRepAssMap.put(maAssetMap.get(asset.Id).Maintenance_Contract__r.Management_Code__c, ambcDetail.ChangeAndChangeDetail__r.ChangeReason__c); |
| | | } |
| | | // 总院分院间调用的保有设备,变更前发送的修理要计入到变更后的合同里 thh 20220418 end |
| | | } |
| | | } |
| | | System.debug('154::: vMOppMap '+vMOppMap); |
| | |
| | | |
| | | // |
| | | if (vMOppMap.size() > 0) { |
| | | // 总院分院间调用的保有设备,变更前发送的修理要计入到变更后的合同里 thh 20220418 start |
| | | List<String> mcaIdList = new List<String>(); |
| | | Map<String, List<String>> RepairIdMap = new Map<String, List<String>>(); |
| | | for (String accountId : vMOppMap.keySet()) { |
| | | System.debug('accountId1:' + accountId); |
| | | Set<Maintenance_Contract__c> mcSet = vMOppMap.get(accountId); |
| | | for(Maintenance_Contract__c mc : mcSet){ |
| | | System.debug('ChangeRepAssMap1:' + ChangeRepAssMap); |
| | | System.debug('mc.Management_Code__c1:' + mc.Management_Code__c); |
| | | if(ChangeRepAssMap.containsKey(mc.Management_Code__c)){ |
| | | mcaIdList.add(mc.Id); |
| | | } |
| | | } |
| | | } |
| | | System.debug('mcaIdList1:' + mcaIdList); |
| | | if(mcaIdList.size() > 0){ |
| | | List<Repair__c> RepairList = [select Id, VM_Maintenance_Contract__c from Repair__c where VM_Maintenance_Contract__c IN :mcaIdList]; |
| | | if(RepairList.size() > 0){ |
| | | for(Repair__c rp : RepairList){ |
| | | List<String> newRepairIdList = new List<String>(); |
| | | if(RepairIdMap.containsKey(rp.VM_Maintenance_Contract__c)){ |
| | | newRepairIdList = RepairIdMap.get(rp.VM_Maintenance_Contract__c); |
| | | newRepairIdList.add(rp.Id); |
| | | RepairIdMap.put(rp.VM_Maintenance_Contract__c, newRepairIdList); |
| | | } else{ |
| | | newRepairIdList.add(rp.Id); |
| | | RepairIdMap.put(rp.VM_Maintenance_Contract__c, newRepairIdList); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 总院分院间调用的保有设备,变更前发送的修理要计入到变更后的合同里 thh 20220418 end |
| | | for (String str : vMOppMap.keySet()) { |
| | | //update by rentx LJPH-C493WW start |
| | | Set<Maintenance_Contract__c> vset = vMOppMap.get(str); |
| | |
| | | system.debug('vmc.Management_CodeVM__c ======'+vmc.Management_CodeVM__c); |
| | | system.debug('addnumMap ======'+addnumMap); |
| | | } |
| | | // 总院分院间调用的保有设备,变更前发送的修理要计入到变更后的合同里 thh 20220418 start |
| | | if(ChangeRepAssMap.containsKey(mcodes.Management_Code__c) && RepairIdMap.containsKey(mcodes.Id)){ |
| | | rpMcaNameMap.put(vmc.Management_CodeVM__c, RepairIdMap.get(mcodes.Id)); |
| | | } |
| | | System.debug('rpMcaNameMap====' + rpMcaNameMap); |
| | | // 总院分院间调用的保有设备,变更前发送的修理要计入到变更后的合同里 thh 20220418 end |
| | | //LJPH-C493WW fy 【委托】 【多年保合同】多年保设备转移造成的合同问题 end |
| | | vmc.Department__c = accMap.get(str).Id; |
| | | vmc.Department_Class__c = accMap.get(str).ParentId; |
| | |
| | | system.debug('mctrobject.Id===='+mctrobject.Id); |
| | | system.debug('mctrobject.Add_Number__c======='+mctrobject.Add_Number__c); |
| | | //LJPH-C493WW fy 【委托】 【多年保合同】多年保设备转移造成的合同问题 end |
| | | // 给总院分院间调用的维修合同保有设备的总院分院间变更标识赋true thh 20220426 start |
| | | if(ChangeRepAssMap.containsKey(mac.Maintenance_Contract__r.Management_Code__c)){ |
| | | mac.General_Branch_Changeflag__c = true; |
| | | } |
| | | // 给总院分院间调用的维修合同保有设备的总院分院间变更标识赋true thh 20220426 end |
| | | v_MCdetUpList.add(mac); |
| | | } |
| | | v_MCdetnewMap.put(mcode, mcatempList); |
| | |
| | | mca.Maintenance_Contract__c = v_MCMap.get(str).Id; |
| | | mca.startDateGurantee_changgeAcc__c = Date.today(); |
| | | mca.ChangeAcc_flag__c = true; |
| | | // 给总院分院间调用的维修合同保有设备的总院分院间变更标识赋true thh 20220426 start |
| | | if(ChangeRepAssMap.containsKey(mca.Maintenance_Contract__r.Management_Code__c)){ |
| | | mca.General_Branch_Changeflag__c = true; |
| | | } |
| | | // 给总院分院间调用的维修合同保有设备的总院分院间变更标识赋true thh 20220426 end |
| | | v_MCdetinList.add(mca); |
| | | } |
| | | } |
| | | // 总院分院间调用的保有设备,变更前发送的修理要计入到变更后的合同里 thh 20220418 Start |
| | | List<Repair__c> updateRpList = new List<Repair__c>(); |
| | | Map<Id, Repair__c> rpMap = new Map<Id, Repair__c>(); |
| | | List<Repair__c> rpList = new List<Repair__c>(); |
| | | List<String> rpIdList = new List<String>(); |
| | | for(String str : v_MCMap.keySet()){ |
| | | Maintenance_Contract__c mc = v_MCMap.get(str); |
| | | rpIdList = rpMcaNameMap.get(mc.Management_CodeVM__c); |
| | | } |
| | | if(rpIdList != null && rpIdList.size() > 0){ |
| | | rpList = [select Id, VM_Maintenance_Contract__c from Repair__c where Id IN : rpIdList]; |
| | | } |
| | | if(rpList.size() > 0){ |
| | | for(Repair__c rp : rpList){ |
| | | rpMap.put(rp.Id, rp); |
| | | } |
| | | } |
| | | for(String str : v_MCMap.keySet()){ |
| | | Maintenance_Contract__c mc = v_MCMap.get(str); |
| | | if(rpMcaNameMap.containsKey(mc.Management_CodeVM__c)){ |
| | | List<String> newrpIdList = rpMcaNameMap.get(mc.Management_CodeVM__c); |
| | | if(newrpIdList != null && newrpIdList.size() > 0){ |
| | | for(Id rpId : newrpIdList){ |
| | | Repair__c rp = rpMap.get(rpId); |
| | | rp.VM_Maintenance_Contract__c = mc.Id; |
| | | updateRpList.add(rp); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if(updateRpList.size() > 0){ |
| | | update updateRpList; |
| | | } |
| | | // 总院分院间调用的保有设备,变更前发送的修理要计入到变更后的合同里 thh 20220418 end |
| | | // 插入变更新合同的维修合同保有设备 |
| | | insert v_MCdetinList; |
| | | // 更新现有合同的维修合同保有设备 |
| | |
| | | public String text1 { get; set; } // 对象 |
| | | public String val1 { get; set; } // 值 |
| | | public String RawAccountId { get; set; } |
| | | public Boolean checkexact { get; set; } // 20230110 gzw 订单号精确查询用 |
| | | public AssetModifyBelongsChange__c ambc { get; set; } |
| | | public static List<SelectOption> textOpts { get; private set; } |
| | | //public static List<SelectOption> changeReasonOpts { get; private set; } |
| | |
| | | } |
| | | // 画面初始化 |
| | | public void init() { |
| | | checkexact = false; |
| | | |
| | | if (Id != null && Id != '' && statusEdit == '' && statusEdit == null) { |
| | | editAble = false; |
| | |
| | | } |
| | | String soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c from Asset where AccountId = \'' + RawAccountId + '\''; |
| | | if (!String.isBlank(text1)) { |
| | | |
| | | soql += ' AND (' + text1 + ' like \'%' + String.escapeSingleQuotes(val1.replaceAll('%', '\\%')) + '%\' )'; |
| | | if (text1 == 'Order_No__c' && checkexact) { |
| | | soql += ' AND (' + text1 + ' = \'' + String.escapeSingleQuotes(val1) + '\' )'; |
| | | }else{ |
| | | soql += ' AND (' + text1 + ' like \'%' + String.escapeSingleQuotes(val1.replaceAll('%', '\\%')) + '%\' )'; |
| | | } |
| | | } |
| | | soql += ' limit 1000'; |
| | | return soql; |
| | |
| | | ' , RecordType_DeveloperName__c ' + |
| | | ' from Maintenance_Contract__c ' |
| | | + ' where Status__c in (\'契約\',\'契約満了\') '; |
| | | |
| | | if (string.isNotBlank(TestID) ) { |
| | | query += ' and id =: TestID'; |
| | | } else if (TestIDList != null && TestIDList.size() > 0) { |
| | |
| | | query += ' and Contract_End_Date__c = ' + |
| | | testDate.addDays(-1).format().replace('/', '-'); |
| | | } |
| | | system.debug('query:'+query); |
| | | //system.debug('query:'+query); |
| | | testDate = Datecheck(testDate); |
| | | |
| | | return Database.getQueryLocator(query); |
| | |
| | | |
| | | global void execute(Database.BatchableContext BC, |
| | | list<Maintenance_Contract__c> MCList) { |
| | | |
| | | |
| | | map<string, asset> updateAssetMap = new map<string, asset>(); |
| | | map<string, Maintenance_Contract__c> UpdateMCMap = |
| | |
| | | Maintenance_Contract__r.Estimation_Id__r.Submit_quotation_day__c, |
| | | Maintenance_Contract__r.RecordType.DeveloperName |
| | | , ifHaveleftInPrevious__c |
| | | ,Maintenance_Contract__r.URF_Contract__c |
| | | from Maintenance_Contract_Asset__c |
| | | where Maintenance_Contract__c in: mcIDmap.keyset() |
| | | ]; |
| | |
| | | allAssetIDSet.add(mca.Asset__c); |
| | | newToOldMCA.put(mca.id, null); |
| | | } |
| | | //system.debug('allAssetIDSet:' + allAssetIDSet); |
| | | system.debug('allAssetIDSet:' + allAssetIDSet); |
| | | //system.debug('newToOldMCA:' + newToOldMCA); |
| | | allAssetList = |
| | | [select id, CurrentContract_F__c, |
| | | CurrentContract_F__r.Contract_End_Date__c, |
| | | CurrentContract_F_asset__c, |
| | | CurrentContract_F_asset__r.endDate_sum__c |
| | | ,URF_Maintenance_Contract__c |
| | | ,URF_Maintenance_Contract__r.Contract_End_Date__c |
| | | from asset |
| | | where id in: allAssetIDSet]; |
| | | // 更新保有设备上的上一期维修合同和维修合同保有设备 |
| | |
| | | for (asset ass : allAssetList) { |
| | | Maintenance_Contract_Asset__c tempMCA = |
| | | assetIDtoMCA.get(ass.Id); |
| | | if (tempMCA != null && |
| | | if (tempMCA != null) { |
| | | if (tempMCA.Maintenance_Contract__r.URF_Contract__c==true && |
| | | (ass.URF_Maintenance_Contract__c == null || |
| | | ass.URF_Maintenance_Contract__r.Contract_End_Date__c <= tempMCA.endDate_sum__c |
| | | )) { |
| | | ass.URF_Maintenance_Contract__c = tempMCA.Maintenance_Contract__c; |
| | | } |
| | | if (tempMCA.Maintenance_Contract__r.URF_Contract__c==false && |
| | | ( |
| | | ass.CurrentContract_F__c == null || |
| | | ass.CurrentContract_F_asset__c == null || |
| | | ass.CurrentContract_F_asset__r.endDate_sum__c <= |
| | | tempMCA.endDate_sum__c |
| | | |
| | | ) ) { |
| | | ass.CurrentContract_F__c = tempMCA.Maintenance_Contract__c; |
| | | ass.CurrentContract_F_asset__c = tempMCA.id; |
| | | ) |
| | | ){ |
| | | ass.CurrentContract_F__c = tempMCA.Maintenance_Contract__c; |
| | | ass.CurrentContract_F_asset__c = tempMCA.id; |
| | | } |
| | | |
| | | updateAssetMap.put(ass.id, ass); |
| | | } |
| | | |
| | | } |
| | | |
| | | //检索出历届保有设备 |
| | | list<Maintenance_Contract_Asset__c> allMCAList = |
| | | [select Id, Asset__c, Maintenance_Contract__c, |
| | |
| | | failedCount ++; |
| | | } |
| | | } |
| | | system.debug('11111111111111111111111updateAssetMap'+updateAssetMap.values()); |
| | | updateAsset (updateAssetMap.values()); |
| | | } |
| | | global void finish(Database.BatchableContext BC) { |
| | |
| | | global class AssetUseInfoBatch implements Database.Batchable<sObject> { |
| | | |
| | | private Integer dt; |
| | | |
| | | private Integer dt; |
| | | |
| | | global AssetUseInfoBatch() { |
| | | |
| | | } |
| | | // 测试用 |
| | | global AssetUseInfoBatch(Integer intDate) { |
| | | dt = intDate; |
| | | } |
| | | global AssetUseInfoBatch() { |
| | | |
| | | } |
| | | // 测试用 |
| | | global AssetUseInfoBatch(Integer intDate) { |
| | | dt = intDate; |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext BC) { |
| | | return Database.getQueryLocator([ |
| | | select Id, Use_Info__c from Asset |
| | | ]); |
| | | } |
| | | global Database.QueryLocator start(Database.BatchableContext BC) { |
| | | return Database.getQueryLocator([ |
| | | SELECT Id, Use_Info__c FROM Asset WHERE Category2__c ='本体' OR Product2.Can_Repair__c = '是' |
| | | ]); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, List<sObject> sList) { |
| | | List<Asset> updateList = new List<Asset>(); |
| | | Integer year = 0; |
| | | if (dt == null) { |
| | | year = Date.today().year(); |
| | | } else { |
| | | year = dt; |
| | | } |
| | | global void execute(Database.BatchableContext BC, List<sObject> sList) { |
| | | Oly_TriggerHandler.bypass('NFM010UpsertStatuAchievements'); |
| | | List<Asset> updateList = new List<Asset>(); |
| | | Integer year = 0; |
| | | if (dt == null) { |
| | | year = Date.today().year(); |
| | | } else { |
| | | year = dt; |
| | | } |
| | | |
| | | for (sObject sobj : sList) { |
| | | Asset ast = (Asset) sobj; |
| | | if (year == 2018) { |
| | | ast.Use_Info_2018__c = ast.Use_Info__c; |
| | | } else if (year == 2019) { |
| | | ast.Use_Info_2019__c = ast.Use_Info__c; |
| | | } else if (year == 2020) { |
| | | ast.Use_Info_2020__c = ast.Use_Info__c; |
| | | } else if (year == 2021) { |
| | | ast.Use_Info_2021__c = ast.Use_Info__c; |
| | | } else if (year == 2022) { |
| | | ast.Use_Info_2022__c = ast.Use_Info__c; |
| | | } else if (year == 2023) { |
| | | ast.Use_Info_2023__c = ast.Use_Info__c; |
| | | } else if (year == 2024) { |
| | | ast.Use_Info_2024__c = ast.Use_Info__c; |
| | | } else if (year == 2025) { |
| | | ast.Use_Info_2025__c = ast.Use_Info__c; |
| | | } else { |
| | | break; |
| | | } |
| | | updateList.add(ast); |
| | | } |
| | | for (sObject sobj : sList) { |
| | | Asset ast = (Asset) sobj; |
| | | if (year == 2018) { |
| | | ast.Use_Info_2018__c = ast.Use_Info__c; |
| | | } else if (year == 2019) { |
| | | ast.Use_Info_2019__c = ast.Use_Info__c; |
| | | } else if (year == 2020) { |
| | | ast.Use_Info_2020__c = ast.Use_Info__c; |
| | | } else if (year == 2021) { |
| | | ast.Use_Info_2021__c = ast.Use_Info__c; |
| | | } else if (year == 2022) { |
| | | ast.Use_Info_2022__c = ast.Use_Info__c; |
| | | } else if (year == 2023) { |
| | | ast.Use_Info_2023__c = ast.Use_Info__c; |
| | | } else if (year == 2024) { |
| | | ast.Use_Info_2024__c = ast.Use_Info__c; |
| | | } else if (year == 2025) { |
| | | ast.Use_Info_2025__c = ast.Use_Info__c; |
| | | } else { |
| | | break; |
| | | } |
| | | updateList.add(ast); |
| | | } |
| | | |
| | | if (updateList.size() > 0) { |
| | | update updateList; |
| | | } |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | |
| | | } |
| | | |
| | | if (updateList.size() > 0) { |
| | | update updateList; |
| | | } |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | private class AssetUseInfoBatchTest { |
| | | |
| | | private static void init() { |
| | | Oly_TriggerHandler.bypass('NFM010UpsertStatuAchievements'); |
| | | List<RecordType> rectHp = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP']; |
| | | if (rectHp.size() == 0) { |
| | | return; |
| | |
| | | ); |
| | | insert opp; |
| | | |
| | | Statu_Achievements__c Sac = new Statu_Achievements__c( |
| | | name = 'zhucan_one', |
| | | Opportunity__c = opp.id, |
| | | DeliveryDate__c = Date.today(), |
| | | FirstApproveDate__c = Date.valueOf('2016-08-10') |
| | | ); |
| | | insert Sac; |
| | | // Statu_Achievements__c Sac = new Statu_Achievements__c( |
| | | // name = 'zhucan_one', |
| | | // Opportunity__c = opp.id, |
| | | // DeliveryDate__c = Date.today(), |
| | | // FirstApproveDate__c = Date.valueOf('2016-08-10') |
| | | // ); |
| | | // insert Sac; |
| | | |
| | | Product2 pro1 = new Product2(Name='name01',IsActive=true,Family='GI',Asset_Model_No__c='n01',Serial_Lot_No__c='S/N tracing',ProductCode_Ext__c='pc01',Manual_Entry__c=false); |
| | | pro1.Extend_new_product_gurantee__c = true; |
| | | pro1.Entend_gurantee_period__c = '两年'; |
| | | pro1.Extend_Gurantee_Start__c = Date.valueOf('2015-01-01'); |
| | | pro1.Extend_Gurantee_End__c = Date.valueOf('2017-01-04'); |
| | | pro1.Category2__c ='本体'; |
| | | insert pro1; |
| | | // 納入機器を作成する |
| | | Asset asset = new Asset(); |
| | |
| | | asset.Hospital__c = hp.Id; |
| | | asset.SerialNumber = 'testserial'; |
| | | asset.Product2Id = pro1.Id; |
| | | asset.Backorder__c = Sac.Id; |
| | | // asset.Backorder__c = Sac.Id; |
| | | asset.InstallDate = Date.valueOf('2017-05-10'); |
| | | asset.Guarantee_period_for_products__c = Date.valueOf('2018-05-10'); |
| | | |
| | | insert asset; |
| | | } |
| | | |
| | |
| | | global class AssetUseInfoSchedule implements Schedulable { |
| | | global void execute(SchedulableContext sc) { |
| | | // 保有设备前一年使用情况记录(每年12月31日执行) |
| | | if(Test.isRunningTest() || checkDate(date.today().addDays(-1))){ |
| | | if(Test.isRunningTest() || checkDate(date.today().addDays(-2))){ |
| | | Id execBTId = Database.executeBatch(new AssetUseInfoBatch(), 200); |
| | | } |
| | | } |
| New file |
| | |
| | | global class AssetWhereAbout2Batch implements Database.Batchable<sObject> { |
| | | public String query; |
| | | global AssetWhereAbout2Batch() { |
| | | this.query = query; |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | ///多年保修未到期且未签约合同的设备 |
| | | query = 'select id,AssetWhereabouts__c from Asset where IS_Extend_Gurantee_Txt__c = true and Gurantee_End_day1__c <0 and IF_Renewalrate_Target_Asset_F__c= 0 '; |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Asset> assList) { |
| | | Map<String,Asset> assMap = new Map<String,Asset>(); |
| | | for (Asset as1:assList) { |
| | | Asset ass = new Asset(); |
| | | ass.id = as1.id; |
| | | ass.AssetWhereabouts__c = '多年保修期内'; |
| | | |
| | | if (!assMap.containsKey(ass.id)) { |
| | | assMap.put(ass.id,ass); |
| | | } |
| | | } |
| | | if (assMap.values()!=null && assMap.values().size()!= 0) { |
| | | update assMap.values(); |
| | | } |
| | | |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class AssetWhereAbout2BatchTest { |
| | | @testSetup |
| | | private static void init(){ |
| | | |
| | | List<Product2> prs = new List<Product2>(); |
| | | |
| | | Product2 pr1 = new Product2( |
| | | Name = 'aiueo商品1_name', |
| | | ProductCode = 'OT1', |
| | | Asset_Model_No__c = 'aiueo商品12345678901234567890123456789012345678901234567890123456789012345678901234567890', |
| | | IsActive = true, |
| | | SFDA_Status__c = '有効' |
| | | ); |
| | | prs.add(pr1); |
| | | Product2 pr2 = new Product2( |
| | | Name = 'aiueo商品2_name', |
| | | ProductCode = 'OT2', |
| | | Asset_Model_No__c = 'aiueo商品2', |
| | | IsActive = false, // 同期されない |
| | | SFDA_Status__c = '不要' |
| | | ); |
| | | prs.add(pr2); |
| | | Product2 pr3 = new Product2( |
| | | Name = 'aiueo商品3_name', |
| | | ProductCode = 'OT3', |
| | | Asset_Model_No__c = 'aiueo商品3', |
| | | IsActive = true, |
| | | SFDA_Status__c = '準備中' |
| | | ); |
| | | prs.add(pr3); |
| | | insert prs; |
| | | |
| | | Product_Set__c ps1 = new Product_Set__c(); |
| | | ps1.Name = 'セット品1'; |
| | | ps1.Product_Set_CD__c = '111111'; |
| | | ps1.Description__c = '説明'; |
| | | ps1.Qty__c = 10; |
| | | //ps1.Valid__c = true; |
| | | ps1.Valid_Date__c = date.today().addDays(-5); |
| | | insert ps1; |
| | | |
| | | Product_Set_Detail__c psd1 = new Product_Set_Detail__c(); |
| | | psd1.Product_Set__c = ps1.id; |
| | | psd1.Price__c = 100; |
| | | psd1.Quantity__c = 10; |
| | | psd1.Product__c = pr1.id; |
| | | insert psd1; |
| | | |
| | | Product_Set_Detail__c psd2 = new Product_Set_Detail__c(); |
| | | psd2.Product_Set__c = ps1.id; |
| | | psd2.Price__c = 100; |
| | | psd2.Quantity__c = 10; |
| | | psd2.Product__c = pr3.id; |
| | | insert psd2; |
| | | |
| | | List<Product2__c> prcs = [select Id from Product2__c where Product2__c in :prs]; |
| | | |
| | | |
| | | pr3 = [select Id from Product2 where Id = :pr3.Id]; |
| | | pr3.SFDA_Status__c = '停止'; |
| | | update pr3; |
| | | prcs = [select Id from Product2__c where Product2__c in :prs]; |
| | | System.assertEquals(2, prcs.size()); |
| | | pr2 = [select Id from Product2 where Id = :pr2.Id]; |
| | | pr2.IsActive = true; |
| | | update pr2; |
| | | prcs = [select Id, Name, Name_Text__c, OT_CODE_Text__c from Product2__c where Product2__c in :prs order by Product2__c.Name]; |
| | | |
| | | System.assertEquals('aiueo商品1234567890123456789012345678901234567890123456789012345678901234567890123', prcs[0].Name); |
| | | System.assertEquals('aiueo商品2', prcs[1].Name); |
| | | System.assertEquals('aiueo商品3', prcs[2].Name); |
| | | System.assertEquals('aiueo商品1_name', prcs[0].Name_Text__c); |
| | | System.assertEquals('aiueo商品2_name', prcs[1].Name_Text__c); |
| | | System.assertEquals('aiueo商品3_name', prcs[2].Name_Text__c); |
| | | System.assertEquals('OT1', prcs[0].OT_CODE_Text__c); |
| | | System.assertEquals('OT2', prcs[1].OT_CODE_Text__c); |
| | | System.assertEquals('OT3', prcs[2].OT_CODE_Text__c); |
| | | |
| | | pr1.SFDA_Status__c = '新製品申請中'; |
| | | pr2.SFDA_Status__c = '準備中'; |
| | | pr3.SFDA_Status__c = '有効(再申請中)'; |
| | | update new Product2[] {pr1, pr2, pr3}; |
| | | prcs = [select Id from Product2__c where Product2__c in :prs]; |
| | | |
| | | |
| | | //delete pr3; |
| | | prcs = [select Id from Product2__c where Product2__c in :prs]; |
| | | System.assertEquals(3, prcs.size()); |
| | | |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | List<RecordType> rectDpt = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name IN ('診療科 消化科', '診療科 呼吸科') order by Name desc]; |
| | | if (rectDpt.size() == 0) { |
| | | return; |
| | | } |
| | | Account company1 = new Account(); |
| | | company1.RecordTypeId = rectCo[0].Id; |
| | | company1.Name = '病院テスト1'; |
| | | List<Account> hps = new Account[]{company1}; |
| | | insert hps; |
| | | |
| | | List<Account> dc1s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = :company1.Id order by Department_Class_Label__c]; |
| | | |
| | | Account depart1 = new Account(); |
| | | depart1.RecordTypeId = rectDpt[0].Id; |
| | | depart1.Name = '*'; |
| | | depart1.Department_Name__c = '診療科1'; |
| | | depart1.ParentId = dc1s[0].Id; |
| | | depart1.Department_Class__c = dc1s[0].Id; |
| | | depart1.Hospital__c = company1.Id; |
| | | |
| | | insert new Account[] {depart1}; |
| | | |
| | | Asset ast1 = new Asset(); |
| | | ast1.SerialNumber = 'abcdefg'; |
| | | ast1.Name = '测试资产1'; |
| | | ast1.AccountId = depart1.Id; |
| | | ast1.Department_Class__c = dc1s[0].Id; |
| | | ast1.Hospital__c = company1.Id; |
| | | ast1.Product2Id = pr1.Id; |
| | | ast1.Guarantee_period_for_products__c = Date.today(); |
| | | ast1.InstallDate = Date.today(); |
| | | //ast1.Manage_type__c = '个体管理'; |
| | | ast1.FirstApproveDate_old__c = Date.today().addDays(-30); |
| | | ast1.Loaner_accsessary__c = true; |
| | | ast1.Gurantee_End_day1__c = -100; |
| | | ast1.IS_Extend_Gurantee_Txt__c = true; |
| | | ast1.IF_Renewalrate_Target_Asset__c = '0'; |
| | | insert ast1; |
| | | |
| | | Asset ast2 = new Asset(); |
| | | ast2.SerialNumber = '12345'; |
| | | ast2.Name = '测试资产2'; |
| | | ast2.AccountId = depart1.Id; |
| | | ast2.Department_Class__c = dc1s[0].Id; |
| | | ast2.Hospital__c = company1.Id; |
| | | ast2.Product2Id = pr2.Id; |
| | | ast2.Guarantee_period_for_products__c = Date.today(); |
| | | ast2.InstallDate = Date.today(); |
| | | //ast2.Manage_type__c = '个体管理'; |
| | | ast2.IS_Extend_Gurantee_Txt__c = true; |
| | | ast2.Loaner_accsessary__c = true; |
| | | ast2.Gurantee_End_day1__c = -100; |
| | | ast2.IF_Renewalrate_Target_Asset__c = '0'; |
| | | insert ast2; |
| | | |
| | | pr1.Extend_new_product_gurantee__c = true; |
| | | pr1.Extend_Gurantee_Start__c = Date.today().addDays(-60); |
| | | pr1.Extend_Gurantee_End__c = Date.today().addDays(60); |
| | | update pr1; |
| | | |
| | | pr2.Extend_new_product_gurantee__c = false; |
| | | update pr2; |
| | | } |
| | | static testMethod void testMethod1() { |
| | | System.Test.startTest(); |
| | | Oly_TriggerHandler.bypass(Product2Handler.Class.getName()); |
| | | Oly_TriggerHandler.bypass(AssetHandler.Class.getName()); |
| | | Oly_TriggerHandler.bypass(FixtureSetHandler.Class.getName()); |
| | | Oly_TriggerHandler.bypass(RentalApplyTriggerHandler.Class.getName()); |
| | | Oly_TriggerHandler.bypass(RentalApplyEquipmentSetHandler.Class.getName()); |
| | | Oly_TriggerHandler.bypass(RentalApplyEquipmentSetDetailHandler.Class.getName()); |
| | | Oly_TriggerHandler.bypass(ContactTriggerHandler.Class.getName()); |
| | | Oly_TriggerHandler.bypass('AssetTrigger'); |
| | | Oly_TriggerHandler.bypass('MaintenanceContractTrigger'); |
| | | Oly_TriggerHandler.bypass('MaintenanceContractAfterUpdate'); |
| | | Oly_TriggerHandler.bypass('MaintenanceContractBeforeDelete'); |
| | | Oly_TriggerHandler.bypass('MaintenanceContractHpDeptUpd'); |
| | | Oly_TriggerHandler.bypass('NFM106Controller'); |
| | | Oly_TriggerHandler.bypass('NFM106Trigger'); |
| | | Oly_TriggerHandler.bypass('AssetRecordTypeUpd'); |
| | | Oly_TriggerHandler.bypass('NFM101Controller'); |
| | | Oly_TriggerHandler.bypass('NFM001Controller'); |
| | | Oly_TriggerHandler.bypass('SyncProduct2'); |
| | | List<Asset> assList = [select id ,name,IS_Extend_Gurantee_Txt__c,Gurantee_End_day1__c,IF_Renewalrate_Target_Asset_F__c,AssetWhereabouts__c from Asset ]; |
| | | system.debug('@@@@@@@@@@@@设备集合='+assList); |
| | | Database.executeBatch(new AssetWhereAbout2Batch(),200); |
| | | System.Test.stopTest(); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | global class AssetWhereabouts implements Database.Batchable<sObject>,Database.Stateful { |
| | | public String query; |
| | | public BatchIF_Log__c iflog ; |
| | | public Date toDay = Date.today(); |
| | | public List < String > assetIdList; |
| | | global AssetWhereabouts() { |
| | | this.query = query; |
| | | } |
| | | global AssetWhereabouts(List < String > assetIdList) { |
| | | this.query = query; |
| | | this.assetIdList = assetIdList; |
| | | } |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | iflog = new BatchIF_Log__c(); |
| | | iflog.Type__c = 'PushNotification'; |
| | | iflog.Log__c = 'AssetWhereabouts start\n'; |
| | | iflog.ErrorLog__c = ''; |
| | | insert iflog; |
| | | query = 'select id,Asset__r.AssetWhereabouts__c,Maintenance_Contract__r.status__c ,Asset__r.id,Maintenance_Contract__r.id,endDateGurantee_Text__c ' |
| | | +' from Maintenance_Contract_Asset__c where Maintenance_Contract__r.RecordType_Name__c =\'多年保修合同\' and endDateGurantee_Text__c < :toDay and Asset__r.AssetWhereabouts__c!=\'服务合同\''; |
| | | if (assetIdList != null && assetIdList.size() > 0) { |
| | | query += ' and Asset__c in :assetIdList '; |
| | | } |
| | | query += ' order by CreatedDate '; |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Maintenance_Contract_Asset__c> mcaList) { |
| | | Map<String,Asset> assMap = new Map<String,Asset>(); |
| | | // 用作查询合同中的服务合同 |
| | | Set<String> assSet = new Set<String>(); |
| | | Set<String> fuwuSet = new Set<String>(); |
| | | // 用作查询一般维修 |
| | | Set<String> weixiuSet = new Set<String>(); |
| | | Map<String,Repair__c> mcMap = new Map<String,Repair__c>(); |
| | | for (Maintenance_Contract_Asset__c mca: mcaList) { |
| | | assSet.add(mca.Asset__r.id); |
| | | weixiuSet.add(mca.Asset__r.id); |
| | | } |
| | | |
| | | // 查询符合条件的修理 |
| | | List<Repair__c> reList = [select id,Maintenance_Contract__r.id,Status1__c,Failure_Occurrence_Date__c,CreatedDate,Delivered_Product__c |
| | | from Repair__c |
| | | where Status1__c != '0.取消' and Status1__c != '0.删除' and Status2__c != '00.删除' and Status2__c != '00.取消' |
| | | and Maintenance_Contract__c = null and Delivered_Product__c in :weixiuSet order by CreatedDate ]; |
| | | for (Repair__c re: reList) { |
| | | if ( mcMap.get(re.Delivered_Product__c)==null) { |
| | | mcMap.put(re.Delivered_Product__c,re); |
| | | } |
| | | // 取最近一期的修理记录 |
| | | if( mcMap.get(re.Delivered_Product__c)!=null && re.CreatedDate>mcMap.get(re.Delivered_Product__c).CreatedDate){ |
| | | mcMap.remove(re.Delivered_Product__c); |
| | | mcMap.put(re.Delivered_Product__c,re); |
| | | } |
| | | } |
| | | // 查询是否有合同中的服务合同 |
| | | list<Maintenance_Contract_Asset__c> mcaList2 = [select Id,Asset__r.id from Maintenance_Contract_Asset__c |
| | | where Maintenance_Contract__r.RecordType_Name__c ='服务合同' |
| | | and Maintenance_Contract__r.status__c ='契約' and Asset__c in :assSet]; |
| | | for (Maintenance_Contract_Asset__c mca: mcaList2) { |
| | | fuwuSet.add(mca.Asset__r.id); |
| | | } |
| | | |
| | | |
| | | for (Maintenance_Contract_Asset__c mca: mcaList) { |
| | | Asset ass = new Asset(); |
| | | Date PassDay = mca.endDateGurantee_Text__c.addyears(1); |
| | | Boolean isXiuli = false; |
| | | // 判断修理是否是未来1年内 |
| | | if (mcMap.get(mca.Asset__r.id)!=null &&mcMap.get(mca.Asset__r.id).Failure_Occurrence_Date__c>mca.endDateGurantee_Text__c && mcMap.get(mca.Asset__r.id).Failure_Occurrence_Date__c < PassDay) { |
| | | isXiuli = true; |
| | | } |
| | | // 去向:服务合同 关联的执行中合同记录为【服务合同】状态为契约 |
| | | if (fuwuSet.contains(mca.Asset__r.id)) { |
| | | ass.id = mca.Asset__r.id; |
| | | ass.AssetWhereabouts__c = '服务合同'; |
| | | if (assMap.containsKey(ass.id)&&assMap.get(ass.id).AssetWhereabouts__c =='其他') { |
| | | assMap.remove(ass.id); |
| | | assMap.put(ass.id,ass); |
| | | }else{ |
| | | assMap.put(ass.id,ass); |
| | | } |
| | | } |
| | | // 去向:一般维修 |
| | | else if(mca.Maintenance_Contract__r.status__c != '契約' && isXiuli){ |
| | | ass.id = mca.Asset__c; |
| | | ass.AssetWhereabouts__c = '一般维修'; |
| | | if (assMap.containsKey(ass.id)&&assMap.get(ass.id).AssetWhereabouts__c =='其他') { |
| | | assMap.remove(ass.id); |
| | | assMap.put(ass.id,ass); |
| | | }else{ |
| | | assMap.put(ass.id,ass); |
| | | } |
| | | } else { |
| | | // 去向:其他 |
| | | ass.id = mca.Asset__c; |
| | | ass.AssetWhereabouts__c = '其他'; |
| | | |
| | | if (!assMap.containsKey(ass.id)) { |
| | | assMap.put(ass.id,ass); |
| | | } |
| | | } |
| | | } |
| | | system.debug('更新数据='+assMap.values()); |
| | | if (assMap.values()!=null && assMap.values().size()!= 0) { |
| | | update assMap.values(); |
| | | } |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | |
| | | iflog.Log__c += '\nAssetWhereabouts end'; |
| | | String tmp = iflog.ErrorLog__c; |
| | | integer i=0; |
| | | i++; |
| | | if (tmp.length() >= 5000) { |
| | | tmp = tmp.substring(0, 5000); |
| | | tmp += ' ...have more lines...'; |
| | | iflog.ErrorLog__c = tmp; |
| | | } |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | update iflog; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class AssetWhereaboutsTest { |
| | | @testSetup |
| | | private static void init(){ |
| | | Oly_TriggerHandler.bypass(Product2Handler.Class.getName()); |
| | | Oly_TriggerHandler.bypass(AssetHandler.Class.getName()); |
| | | Oly_TriggerHandler.bypass(FixtureSetHandler.Class.getName()); |
| | | Oly_TriggerHandler.bypass(RentalApplyTriggerHandler.Class.getName()); |
| | | Oly_TriggerHandler.bypass(RentalApplyEquipmentSetHandler.Class.getName()); |
| | | Oly_TriggerHandler.bypass(RentalApplyEquipmentSetDetailHandler.Class.getName()); |
| | | Oly_TriggerHandler.bypass(ContactTriggerHandler.Class.getName()); |
| | | Oly_TriggerHandler.bypass('AssetTrigger'); |
| | | Oly_TriggerHandler.bypass('MaintenanceContractTrigger'); |
| | | Oly_TriggerHandler.bypass('MaintenanceContractAfterUpdate'); |
| | | Oly_TriggerHandler.bypass('MaintenanceContractBeforeDelete'); |
| | | Oly_TriggerHandler.bypass('MaintenanceContractHpDeptUpd'); |
| | | Oly_TriggerHandler.bypass('NFM106Controller'); |
| | | Oly_TriggerHandler.bypass('NFM101Controller'); |
| | | Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | User MacOwner = new User(Test_staff__c = true, LastName = 'hp1', FirstName = 'owner1', Alias = 'hp', CommunityNickname = 'hpOwner1', Email = 'olympus_hpowner@sunbridge.com',Job_Category__c = '销售服务', Username = 'olympus_hpowner@sunbridge.com1', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id); |
| | | insert MacOwner; |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = |
| | | Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('HP').getRecordTypeId(); |
| | | |
| | | hospital.Name = 'test hospita/l'; |
| | | insert hospital; |
| | | |
| | | // 戦略科室を得る |
| | | List<Account> strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_GI']; |
| | | |
| | | // // 診療科を作る |
| | | Account dep = new Account(); |
| | | dep.recordtypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Department_GI').getRecordTypeId(); |
| | | dep.Name = 'test de/p'; |
| | | dep.ParentId = strategicDep[0].Id; |
| | | dep.Department_Class__c = strategicDep[0].Id; |
| | | dep.Hospital__c = hospital.Id; |
| | | insert dep; |
| | | |
| | | // 製品を作る |
| | | Product2 productA = new Product2( Name='テスト商品', Maintenance_Price_Year__c = 12000, Manual_Entry__c = false,IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n01',Serial_Lot_No__c='S/N tracing', |
| | | Fixture_Model_No_T__c = 'n01', |
| | | ProductCode_Ext__c='pc01'); |
| | | insert productA; |
| | | |
| | | // 第一期合同 |
| | | Maintenance_Contract__c contract1 = new Maintenance_Contract__c(); |
| | | contract1.Name = 'tect contract1'; |
| | | contract1.Hospital__c = hospital.Id; |
| | | contract1.Department_Class__c = strategicDep[0].Id; |
| | | contract1.Department__c = dep.Id; |
| | | contract1.Service_Contract_Staff__c = MacOwner.Id; |
| | | contract1.Payment_Plan_Sum_First__c = 1; |
| | | contract1.Status__c = '契約'; |
| | | contract1.Maintenance_Contract_No__c = '11123'; |
| | | contract1.recordtypeId = |
| | | Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByDeveloperName().get('NewMaintenance_Contract').getRecordTypeId(); |
| | | contract1.Not_Upper_limit_reason__c = ' 1'; |
| | | contract1.Contract_Start_Date__c = Date.today().addDays( -10); |
| | | contract1.Contract_End_Date__c = Date.today().addDays( 5); |
| | | contract1.SalesOfficeCode_selection__c = '北京RC'; |
| | | insert contract1; |
| | | |
| | | // 第二期合同 |
| | | Maintenance_Contract__c contract12 = new Maintenance_Contract__c(); |
| | | contract12.Name = 'tect contract12'; |
| | | contract12.Not_Upper_limit_reason__c = 'tect contract12'; |
| | | contract12.RecordtypeId = Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByDeveloperName().get('VM_Contract').getRecordTypeId(); |
| | | contract12.Hospital__c = hospital.Id; |
| | | contract1.Switch_TimeBase_WF__c = true; |
| | | contract12.Department_Class__c = strategicDep[0].Id; |
| | | contract12.Department__c = dep.Id; |
| | | contract12.Service_Contract_Staff__c = UserInfo.getUserId(); |
| | | contract12.Maintenance_Contract_No__c = 'tect contract12'; |
| | | contract12.Status__c = '契約満了'; |
| | | contract12.Contract_Start_Date__c = Date.today().addMonths(-13); |
| | | contract12.Contract_End_Date__c = Date.today().addMonths(-1); |
| | | insert contract12; |
| | | // insert new Maintenance_Contract__c[] {contract1}; |
| | | |
| | | System.debug('contract1 =='+ contract1 ); |
| | | List<Maintenance_Contract__c> listmc = [select id ,Status__c,RecordType_Name__c from Maintenance_Contract__c ]; |
| | | // for (Maintenance_Contract__c mc:listmc) { |
| | | // mc1.id = mc.id; |
| | | // mc1.Status__c = '契約'; |
| | | // update mc1; |
| | | // System.debug('更新成功'+mc1); |
| | | |
| | | // } |
| | | // List<Maintenance_Contract__c> listmc1 = [select id ,Status__c,RecordType_Name__c from Maintenance_Contract__c ]; |
| | | System.debug('listmc'+listmc); |
| | | // System.debug('contract12.Status__c =='+ contract12.Status__c ); |
| | | Asset asset = new Asset(); |
| | | // Asset assetA1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | asset.RecordTypeId = System.Label.Asset_RecordType; |
| | | asset.SerialNumber = 'ass01'; |
| | | asset.Name = 'ass01'; |
| | | asset.AccountId = dep.Id; |
| | | asset.Department_Class__c = strategicDep[0].Id; |
| | | asset.Hospital__c = hospital.Id; |
| | | asset.Product2Id = productA.Id; |
| | | asset.Quantity = 1; |
| | | asset.Status = '有库存'; |
| | | asset.Manage_type__c = '个体管理'; |
| | | asset.Loaner_accsessary__c = false; |
| | | asset.Out_of_wh__c = 0; |
| | | asset.Salesdepartment__c = '1.华北营业本部'; |
| | | asset.Internal_asset_location__c = '北京 备品中心'; |
| | | asset.Product_category__c = 'GI'; |
| | | asset.Equipment_Type__c = '产品试用'; |
| | | asset.SalesProvince__c = '北京'; |
| | | asset.CurrentContract__c = contract1.Id; |
| | | asset.CurrentContract_Asset_Price__c = 0; |
| | | insert asset; |
| | | Asset asset2 = new Asset(); |
| | | // Asset assetA1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | asset2.RecordTypeId = System.Label.Asset_RecordType; |
| | | asset2.SerialNumber = 'ass02'; |
| | | asset2.Name = 'ass02'; |
| | | asset2.AccountId = dep.Id; |
| | | asset2.Department_Class__c = strategicDep[0].Id; |
| | | asset2.Hospital__c = hospital.Id; |
| | | asset2.Product2Id = productA.Id; |
| | | asset2.Quantity = 1; |
| | | asset2.Status = '有库存'; |
| | | asset2.Manage_type__c = '个体管理'; |
| | | asset2.Loaner_accsessary__c = false; |
| | | asset2.Out_of_wh__c = 0; |
| | | asset2.Salesdepartment__c = '1.华北营业本部'; |
| | | asset2.Internal_asset_location__c = '北京 备品中心'; |
| | | asset2.Product_category__c = 'GI'; |
| | | asset2.Equipment_Type__c = '产品试用'; |
| | | asset2.SalesProvince__c = '北京'; |
| | | asset2.CurrentContract__c = contract12.Id; |
| | | asset2.CurrentContract_Asset_Price__c = 0; |
| | | insert asset2; |
| | | //System.Test.stopTest(); |
| | | |
| | | Maintenance_Contract_Asset__c contract1asset1 = new Maintenance_Contract_Asset__c(); |
| | | contract1asset1.Asset__c = asset.Id; |
| | | contract1asset1.endDateGurantee_Text__c = Date.today().addYears(-1); |
| | | contract1asset1.Maintenance_Contract__c = contract1.Id; |
| | | contract1asset1.Estimate_List_Price_All_Manual__c = 1000; |
| | | insert contract1asset1; |
| | | // contract1asset.Maintenance_Contract_Asset_Estimate__c = mcae1.id; |
| | | Maintenance_Contract_Asset__c contract1asset2 = new Maintenance_Contract_Asset__c(); |
| | | contract1asset2.Asset__c = asset2.Id; |
| | | contract1asset2.endDateGurantee_Text__c = Date.today().addYears(-1); |
| | | contract1asset2.Maintenance_Contract__c = contract12.Id; |
| | | insert contract1asset2; |
| | | // insert new list<Maintenance_Contract_Asset__c> {contract1asset1,contract1asset2 }; |
| | | Maintenance_Contract_Asset__c contract1asset3 = new Maintenance_Contract_Asset__c(); |
| | | contract1asset3.Asset__c = asset.Id; |
| | | contract1asset3.endDateGurantee_Text__c = Date.today().addYears(-1); |
| | | contract1asset3.Maintenance_Contract__c = contract12.Id; |
| | | insert contract1asset3; |
| | | |
| | | // repair01.Account__c = dep.Id; |
| | | |
| | | // // repair01.Repair_Start_Date__c = Date.newInstance(2022,7,20); |
| | | |
| | | // repair01.Department_Class__c = strategicDep[0].Id; |
| | | // repair01.Hospital__c = hospital.Id; |
| | | // repair01.Dealer__c = dep.Id; |
| | | // // repair01.Status1__c = '3.维修阶段'; |
| | | // repair01.Delivered_Product__c = asset.Id; |
| | | |
| | | // insert repair01; |
| | | Repair__c repair1 = new Repair__c(); |
| | | repair1.Service_Repair_No__c = 'repair1'; |
| | | repair1.Hospital__c = hospital.Id; |
| | | repair1.Account__c = dep.Id; |
| | | repair1.Department_Class__c = strategicDep[0].id; |
| | | repair1.Delivered_Product__c = asset.Id; |
| | | repair1.Repair_List_Price__c = 100; |
| | | repair1.Billing_Amount__c = 10; |
| | | repair1.Paid_Amount__c = 1; |
| | | repair1.DateReceiptQuestions__c = Date.newInstance(2022,7,20); |
| | | repair1.Failure_Occurrence_Date__c = Date.today().addDays(-1); |
| | | repair1.Repair_Returned_To_HP_Date__c = Date.today().addDays(3); |
| | | repair1.Repair_Shipped_Date__c = Date.today().addDays(1); |
| | | System.debug('repair1.Maintenance_Contract__c =='+ repair1.Maintenance_Contract__c ); |
| | | System.debug('repair01.Status1__c =='+ repair1.Status1__c ); |
| | | system.debug('day=='+Date.today().addYears(-1)); |
| | | System.debug('repair01.DateReceiptQuestions__c =='+ repair1.DateReceiptQuestions__c ); |
| | | insert repair1; |
| | | } |
| | | @isTest |
| | | private static void testMethod1() { |
| | | |
| | | System.Test.startTest(); |
| | | Maintenance_Contract__c mc1 = new Maintenance_Contract__c(); |
| | | |
| | | List<Maintenance_Contract__c> listmc = [select id ,Status__c,RecordType_Name__c from Maintenance_Contract__c ]; |
| | | for (Maintenance_Contract__c mc:listmc) { |
| | | mc1.id = mc.id; |
| | | mc1.Status__c = '契約'; |
| | | update mc1; |
| | | System.debug('更新成功'+mc1); |
| | | |
| | | } |
| | | List<Maintenance_Contract__c> listmc1 = [select id ,Status__c,RecordType_Name__c from Maintenance_Contract__c ]; |
| | | System.debug('listmc'+listmc1); |
| | | |
| | | Database.executeBatch(new AssetWhereabouts(),200); |
| | | System.Test.stopTest(); |
| | | } |
| | | // private static void testMethod2() { |
| | | // System.Test.startTest(); |
| | | // select id, |
| | | // Database.executeBatch(new AssetWhereabouts(),200); |
| | | // System.Test.stopTest(); |
| | | // } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | System.debug('DNId'+DNId); |
| | | List<testInit> newinitList = new List<testInit>(); |
| | | List<testInit> initList = new List<testInit>(); |
| | | List<FrameNumManage__c> FnmList =[SELECT Id, Name ,ManagementCode__c,InspectionCard__c |
| | | , ApplyList__c ,InspectionCard_Select__c ,InspectionCard_Select__r.ViewLink__c |
| | | ,InspectionCard_Select__r.DownloadLink__c, ApplyList_Select__c |
| | | ,ApplyList_Select__r.DownloadLink__c,ApplyList_Select__r.ViewLink__c, Num__c |
| | | , SerialNumber__c,Material__c , MaterialDepict__c |
| | | ,ApplyList_Select__r.AWS_File_Key__c,ApplyList_Select__r.FileName__c |
| | | ,InspectionCard_Select__r.AWS_File_Key__c,InspectionCard_Select__r.FileName__c |
| | | List<FrameNumManage__c> FnmList =[SELECT Id, Name |
| | | ,ManagementCode__c |
| | | ,InspectionCard__c |
| | | ,ApplyList__c |
| | | ,InspectionCard_Select__c |
| | | ,InspectionCard_Select__r.ViewLink__c |
| | | ,InspectionCard_Select__r.DownloadLink__c |
| | | ,ApplyList_Select__c |
| | | ,ApplyList_Select__r.DownloadLink__c |
| | | ,ApplyList_Select__r.ViewLink__c |
| | | ,Num__c |
| | | ,SerialNumber__c |
| | | ,Material__c |
| | | ,MaterialDepict__c |
| | | ,ApplyList_Select__r.AWS_File_Key__c |
| | | ,ApplyList_Select__r.FileName__c |
| | | ,InspectionCard_Select__r.AWS_File_Key__c |
| | | ,InspectionCard_Select__r.FileName__c |
| | | ,HomeBuy__c |
| | | from FrameNumManage__c where signInForm__c =:DNId order by ApplyList__c desc,SerialNumber__c desc]; |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | ,ApplyList_NoHave__c |
| | | ,InspectionCard_NoHave__c |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | from FrameNumManage__c where signInForm__c =:DNId |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // order by ApplyList__c desc,InspectionCard__c desc,SerialNumber__c desc]; |
| | | order by ApplyList_NoHave__c desc,InspectionCard_NoHave__c desc ,SerialNumber__c desc]; |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | set<String> FileStrSet = new set<String>(); |
| | | List<FileAddress__c> FileList = new List<FileAddress__c>(); |
| | | Map<String,String> FileStrMap = new Map<String,String>(); |
| | |
| | | // } |
| | | List<FrameNumManage__c> FnmListhomebuy = new List<FrameNumManage__c>(); |
| | | List<FrameNumManage__c> notFnmListhomebuy = new List<FrameNumManage__c>(); |
| | | for(FrameNumManage__c fr : FnmList){ |
| | | if(fr.HomeBuy__c){ |
| | | FnmListhomebuy.add(fr); |
| | | }else{ |
| | | notFnmListhomebuy.add(fr); |
| | | } |
| | | } |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // for(FrameNumManage__c fr : FnmList){ |
| | | // if(fr.HomeBuy__c){ |
| | | // FnmListhomebuy.add(fr); |
| | | // }else{ |
| | | // notFnmListhomebuy.add(fr); |
| | | // } |
| | | // } |
| | | notFnmListhomebuy = FnmList; |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | Integer n = 0; // 初始化合并行数 |
| | | Integer n_sj = 0; // 初始化合并行数(商检证) 2023-01-10 fy add |
| | | for (Integer i=0;i<notFnmListhomebuy.size() ;i++ ) { |
| | | testInit init = new testInit(); |
| | | if (i==0) { |
| | |
| | | // }else{ |
| | | // init.code = '无'; |
| | | // } |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList__c)) { |
| | | if (notFnmListhomebuy[i].ApplyList__c.equals('不出证')) { |
| | | init.code = '不出证'; |
| | | }else{ |
| | | // 报关单预览链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c)) { |
| | | init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c; |
| | | }else{ |
| | | init.codeyu = ''; |
| | | } |
| | | // 报关单下载链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) { |
| | | init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c; |
| | | }else{ |
| | | init.code = ''; |
| | | } |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__c)) { |
| | | // 报关单预览链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c)) { |
| | | init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c; |
| | | }else{ |
| | | init.codeyu = ''; |
| | | } |
| | | // 报关单下载链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) { |
| | | init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c; |
| | | }else{ |
| | | init.code = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c)) { |
| | | init.awsKey = notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c; |
| | | }else{ |
| | | init.awsKey = ''; |
| | | } |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.FileName__c)) { |
| | | init.fileName = notFnmListhomebuy[i].ApplyList_Select__r.FileName__c; |
| | | }else{ |
| | | init.fileName = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 end |
| | | }else { |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_NoHave__c)) { |
| | | init.code = notFnmListhomebuy[i].ApplyList_NoHave__c; |
| | | }else{ |
| | | init.code = ''; |
| | | } |
| | | init.codeyu = ''; |
| | | init.awsKey = ''; // zhj 2022-12-08 |
| | | init.fileName = ''; // zhj 2022-12-08 |
| | | } |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList__c)) { |
| | | // if (notFnmListhomebuy[i].ApplyList__c.equals('不出证')) { |
| | | // init.code = '不出证'; |
| | | // }else{ |
| | | // // 报关单预览链接判断 |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c)) { |
| | | // init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c; |
| | | // }else{ |
| | | // init.codeyu = ''; |
| | | // } |
| | | // // 报关单下载链接判断 |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) { |
| | | // init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c; |
| | | // }else{ |
| | | // init.code = ''; |
| | | // } |
| | | |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c)) { |
| | | init.awsKey = notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c; |
| | | }else{ |
| | | init.awsKey = ''; |
| | | } |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.FileName__c)) { |
| | | init.fileName = notFnmListhomebuy[i].ApplyList_Select__r.FileName__c; |
| | | }else{ |
| | | init.fileName = ''; |
| | | } |
| | | } |
| | | }else{ |
| | | init.code = ''; |
| | | init.codeyu = ''; |
| | | init.awsKey = ''; |
| | | init.fileName = ''; |
| | | } |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c)) { |
| | | // init.awsKey = notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c; |
| | | // }else{ |
| | | // init.awsKey = ''; |
| | | // } |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.FileName__c)) { |
| | | // init.fileName = notFnmListhomebuy[i].ApplyList_Select__r.FileName__c; |
| | | // }else{ |
| | | // init.fileName = ''; |
| | | // } |
| | | // } |
| | | // }else{ |
| | | // init.code = ''; |
| | | // init.codeyu = ''; |
| | | // init.awsKey = ''; |
| | | // init.fileName = ''; |
| | | // } |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | |
| | | // //2022-12-05 fy add 报关单判断 |
| | | // //if (String.isNotBlank(FnmList[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | // if (notFnmListhomebuy[i].InspectionCard__c =='不出证') { |
| | |
| | | // init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c; |
| | | // init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c; |
| | | // } //2022-12-05 fy add 商检证判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard__c)) { |
| | | if (notFnmListhomebuy[i].InspectionCard__c.equals('不出证')) { |
| | | init.sj_code = '不出证'; |
| | | }else{ |
| | | // 商检证预览链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c)) { |
| | | init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c; |
| | | }else{ |
| | | init.sj_codeyu = ''; |
| | | } |
| | | // 商检证下载链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c; |
| | | }else{ |
| | | init.sj_code = ''; |
| | | } |
| | | //商检证awkey,filename判断 zhj 2022-12-19 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c)) { |
| | | init.sj_awsKey = notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c; |
| | | }else{ |
| | | init.sj_awsKey = ''; |
| | | } |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c)) { |
| | | init.sj_fileName = notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c; |
| | | }else{ |
| | | init.sj_fileName = ''; |
| | | } |
| | | //商检证awkey,filename判断 zhj 2022-12-19 end |
| | | } |
| | | }else{ |
| | | init.sj_code = ''; |
| | | init.sj_codeyu = ''; |
| | | init.sj_awsKey = ''; // zhj 2022-12-19 |
| | | init.sj_fileName = ''; // zhj 2022-12-19 |
| | | } |
| | | //2022-12-26 fy add 改造 end |
| | | |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__c)) { |
| | | // 报关单预览链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c)) { |
| | | init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c; |
| | | }else{ |
| | | init.sj_codeyu = ''; |
| | | } |
| | | // 报关单下载链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c; |
| | | }else{ |
| | | init.sj_code = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c)) { |
| | | init.sj_awsKey = notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c; |
| | | }else{ |
| | | init.sj_awsKey = ''; |
| | | } |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c)) { |
| | | init.sj_fileName = notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c; |
| | | }else{ |
| | | init.sj_fileName = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 end |
| | | }else { |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_NoHave__c)) { |
| | | init.sj_code = notFnmListhomebuy[i].InspectionCard_NoHave__c; |
| | | }else{ |
| | | init.sj_code = ''; |
| | | } |
| | | init.sj_codeyu = ''; |
| | | init.sj_awsKey = ''; // zhj 2022-12-08 |
| | | init.sj_fileName = ''; // zhj 2022-12-08 |
| | | } |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard__c)) { |
| | | // if (notFnmListhomebuy[i].InspectionCard__c.equals('不出证')) { |
| | | // init.sj_code = '不出证'; |
| | | // }else{ |
| | | // // 商检证预览链接判断 |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c)) { |
| | | // init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c; |
| | | // }else{ |
| | | // init.sj_codeyu = ''; |
| | | // } |
| | | // // 商检证下载链接判断 |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | // init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c; |
| | | // }else{ |
| | | // init.sj_code = ''; |
| | | // } |
| | | // //商检证awkey,filename判断 zhj 2022-12-19 start |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c)) { |
| | | // init.sj_awsKey = notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c; |
| | | // }else{ |
| | | // init.sj_awsKey = ''; |
| | | // } |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c)) { |
| | | // init.sj_fileName = notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c; |
| | | // }else{ |
| | | // init.sj_fileName = ''; |
| | | // } |
| | | // //商检证awkey,filename判断 zhj 2022-12-19 end |
| | | // } |
| | | // }else{ |
| | | // init.sj_code = ''; |
| | | // init.sj_codeyu = ''; |
| | | // init.sj_awsKey = ''; // zhj 2022-12-19 |
| | | // init.sj_fileName = ''; // zhj 2022-12-19 |
| | | // } |
| | | // //2022-12-26 fy add 改造 end |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | |
| | | // init.code = FileStrMap.get(FnmList[i].ApplyList__c); |
| | | init.Num = notFnmListhomebuy[i].Num__c; |
| | | init.Id = notFnmListhomebuy[i].Id; |
| | | init.FrameNo = notFnmListhomebuy[i].SerialNumber__c; |
| | | n = n+1; |
| | | n_sj = n_sj+1; // 2023-01-10 fy add |
| | | if (i != notFnmListhomebuy.size()-1) { |
| | | // 判断第一个与第二个是否一样,不一样赋值1 |
| | | if (notFnmListhomebuy[i].ApplyList__c != notFnmListhomebuy[i+1].ApplyList__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if (notFnmListhomebuy[i].ApplyList__c != notFnmListhomebuy[i+1].ApplyList__c) { |
| | | if (notFnmListhomebuy[i].ApplyList_NoHave__c != notFnmListhomebuy[i+1].ApplyList_NoHave__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | init.count = n; |
| | | } |
| | | // 2023-01-10 fy add start |
| | | // 判断第一个与下一个是否一样,不一样赋值1——商检证 |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if (notFnmListhomebuy[i].InspectionCard__c != notFnmListhomebuy[i+1].InspectionCard__c) { |
| | | if (notFnmListhomebuy[i].InspectionCard_NoHave__c != notFnmListhomebuy[i+1].InspectionCard_NoHave__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | init.count_sj = n_sj; |
| | | } |
| | | // 2023-01-10 fy add end |
| | | }else if(notFnmListhomebuy.size() == 1){ |
| | | init.count = 1; |
| | | init.count_sj = 1; // 2023-01-10 fy add 如果只有一条 赋值合并行数 |
| | | } |
| | | System.debug('init1===='+init); |
| | | }else { |
| | | // 判断与前一个编码是一致 |
| | | if (notFnmListhomebuy[i].ApplyList__c == notFnmListhomebuy[i-1].ApplyList__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if (notFnmListhomebuy[i].ApplyList__c == notFnmListhomebuy[i-1].ApplyList__c) { |
| | | if (notFnmListhomebuy[i].ApplyList_NoHave__c == notFnmListhomebuy[i-1].ApplyList_NoHave__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | init.Name = notFnmListhomebuy[i].ManagementCode__c; |
| | | init.ProductName = notFnmListhomebuy[i].Material__c + '-' + notFnmListhomebuy[i].MaterialDepict__c; |
| | | |
| | |
| | | // }else{ |
| | | // init.code = '无'; |
| | | // } //2022-12-05 fy add 报关单判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList__c)) { |
| | | if (notFnmListhomebuy[i].ApplyList__c.equals('不出证')) { |
| | | init.code = '不出证'; |
| | | }else{ |
| | | // 报关单预览链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c)) { |
| | | init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c; |
| | | }else{ |
| | | init.codeyu = ''; |
| | | } |
| | | // 报关单下载链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) { |
| | | init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c; |
| | | }else{ |
| | | init.code = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c)) { |
| | | init.awsKey = notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c; |
| | | }else{ |
| | | init.awsKey = ''; |
| | | } |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.FileName__c)) { |
| | | init.fileName = notFnmListhomebuy[i].ApplyList_Select__r.FileName__c; |
| | | }else{ |
| | | init.fileName = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 end |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__c)) { |
| | | // 报关单预览链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c)) { |
| | | init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c; |
| | | }else{ |
| | | init.codeyu = ''; |
| | | } |
| | | }else{ |
| | | init.code = ''; |
| | | init.codeyu = ''; |
| | | // 报关单下载链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) { |
| | | init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c; |
| | | }else{ |
| | | init.code = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c)) { |
| | | init.awsKey = notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c; |
| | | }else{ |
| | | init.awsKey = ''; |
| | | } |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.FileName__c)) { |
| | | init.fileName = notFnmListhomebuy[i].ApplyList_Select__r.FileName__c; |
| | | }else{ |
| | | init.fileName = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 end |
| | | }else { |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_NoHave__c)) { |
| | | init.code = notFnmListhomebuy[i].ApplyList_NoHave__c; |
| | | }else{ |
| | | init.code = ''; |
| | | } |
| | | init.codeyu = ''; |
| | | init.awsKey = ''; // zhj 2022-12-08 |
| | | init.fileName = ''; // zhj 2022-12-08 |
| | | } |
| | | } |
| | | |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList__c)) { |
| | | // if (notFnmListhomebuy[i].ApplyList__c.equals('不出证')) { |
| | | // init.code = '不出证'; |
| | | // }else{ |
| | | // // 报关单预览链接判断 |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c)) { |
| | | // init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c; |
| | | // }else{ |
| | | // init.codeyu = ''; |
| | | // } |
| | | // // 报关单下载链接判断 |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) { |
| | | // init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c; |
| | | // }else{ |
| | | // init.code = ''; |
| | | // } |
| | | // //报关单awkey,filename判断 zhj 2022-12-08 start |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c)) { |
| | | // init.awsKey = notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c; |
| | | // }else{ |
| | | // init.awsKey = ''; |
| | | // } |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.FileName__c)) { |
| | | // init.fileName = notFnmListhomebuy[i].ApplyList_Select__r.FileName__c; |
| | | // }else{ |
| | | // init.fileName = ''; |
| | | // } |
| | | // //报关单awkey,filename判断 zhj 2022-12-08 end |
| | | // } |
| | | // }else{ |
| | | // init.code = ''; |
| | | // init.codeyu = ''; |
| | | // init.awsKey = ''; // zhj 2022-12-08 |
| | | // init.fileName = ''; // zhj 2022-12-08 |
| | | // } |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | |
| | | //if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | // if (notFnmListhomebuy[i].InspectionCard__c =='不出证') { |
| | | // init.sj_code = '不出证'; |
| | |
| | | // } |
| | | // //2022-12-05 fy add 商检证判断 |
| | | |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard__c)) { |
| | | if (notFnmListhomebuy[i].InspectionCard__c.equals('不出证')) { |
| | | init.sj_code = '不出证'; |
| | | }else{ |
| | | // 商检证预览链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c)) { |
| | | init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c; |
| | | }else{ |
| | | init.sj_codeyu = ''; |
| | | } |
| | | // 商检证下载链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c; |
| | | }else{ |
| | | init.sj_code = ''; |
| | | } |
| | | //商检证awkey,filename判断 zhj 2022-12-19 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c)) { |
| | | init.sj_awsKey = notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c; |
| | | }else{ |
| | | init.sj_awsKey = ''; |
| | | } |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c)) { |
| | | init.sj_fileName = notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c; |
| | | }else{ |
| | | init.sj_fileName = ''; |
| | | } |
| | | //商检证awkey,filename判断 zhj 2022-12-19 end |
| | | } |
| | | }else{ |
| | | init.sj_code = ''; |
| | | init.sj_codeyu = ''; |
| | | init.sj_awsKey = ''; // zhj 2022-12-19 |
| | | init.sj_fileName = ''; // zhj 2022-12-19 |
| | | } |
| | | //2022-12-26 fy add 改造 end |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__c)) { |
| | | // 报关单预览链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c)) { |
| | | init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c; |
| | | }else{ |
| | | init.sj_codeyu = ''; |
| | | } |
| | | // 报关单下载链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c; |
| | | }else{ |
| | | init.sj_code = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c)) { |
| | | init.sj_awsKey = notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c; |
| | | }else{ |
| | | init.sj_awsKey = ''; |
| | | } |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c)) { |
| | | init.sj_fileName = notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c; |
| | | }else{ |
| | | init.sj_fileName = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 end |
| | | }else { |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_NoHave__c)) { |
| | | init.sj_code = notFnmListhomebuy[i].InspectionCard_NoHave__c; |
| | | }else{ |
| | | init.sj_code = ''; |
| | | } |
| | | init.sj_codeyu = ''; |
| | | init.sj_awsKey = ''; // zhj 2022-12-08 |
| | | init.sj_fileName = ''; // zhj 2022-12-08 |
| | | } |
| | | |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard__c)) { |
| | | // if (notFnmListhomebuy[i].InspectionCard__c.equals('不出证')) { |
| | | // init.sj_code = '不出证'; |
| | | // }else{ |
| | | // // 商检证预览链接判断 |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c)) { |
| | | // init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c; |
| | | // }else{ |
| | | // init.sj_codeyu = ''; |
| | | // } |
| | | // // 商检证下载链接判断 |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | // init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c; |
| | | // }else{ |
| | | // init.sj_code = ''; |
| | | // } |
| | | // //商检证awkey,filename判断 zhj 2022-12-19 start |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c)) { |
| | | // init.sj_awsKey = notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c; |
| | | // }else{ |
| | | // init.sj_awsKey = ''; |
| | | // } |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c)) { |
| | | // init.sj_fileName = notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c; |
| | | // }else{ |
| | | // init.sj_fileName = ''; |
| | | // } |
| | | // //商检证awkey,filename判断 zhj 2022-12-19 end |
| | | // } |
| | | // }else{ |
| | | // init.sj_code = ''; |
| | | // init.sj_codeyu = ''; |
| | | // init.sj_awsKey = ''; // zhj 2022-12-19 |
| | | // init.sj_fileName = ''; // zhj 2022-12-19 |
| | | // } |
| | | // //2022-12-26 fy add 改造 end |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | |
| | | // init.code = FileStrMap.get(notFnmListhomebuy[i].ApplyList__c); |
| | | init.Num = notFnmListhomebuy[i].Num__c; |
| | | init.Id = notFnmListhomebuy[i].Id; |
| | |
| | | // 判断是不是最后一个 |
| | | if (i != notFnmListhomebuy.size()-1) { |
| | | // 不是最后一个,判断与下一个编码一致不一致,不一致直接赋值 |
| | | if (notFnmListhomebuy[i].ApplyList__c != notFnmListhomebuy[i+1].ApplyList__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if (notFnmListhomebuy[i].ApplyList__c != notFnmListhomebuy[i+1].ApplyList__c) { |
| | | if (notFnmListhomebuy[i].ApplyList_NoHave__c != notFnmListhomebuy[i+1].ApplyList_NoHave__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | init.count = n; |
| | | } |
| | | } |
| | |
| | | // }else{ |
| | | // init.code = '无'; |
| | | // } //2022-12-05 fy add 报关单判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList__c)) { |
| | | if (notFnmListhomebuy[i].ApplyList__c.equals('不出证')) { |
| | | init.code = '不出证'; |
| | | }else{ |
| | | // 报关单预览链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c)) { |
| | | init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c; |
| | | }else{ |
| | | init.codeyu = ''; |
| | | } |
| | | // 报关单下载链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) { |
| | | init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c; |
| | | }else{ |
| | | init.code = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c)) { |
| | | init.awsKey = notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c; |
| | | }else{ |
| | | init.awsKey = ''; |
| | | } |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.FileName__c)) { |
| | | init.fileName = notFnmListhomebuy[i].ApplyList_Select__r.FileName__c; |
| | | }else{ |
| | | init.fileName = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 end |
| | | } |
| | | }else{ |
| | | init.code = ''; |
| | | init.codeyu = ''; |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__c)) { |
| | | // 报关单预览链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c)) { |
| | | init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c; |
| | | }else{ |
| | | init.codeyu = ''; |
| | | } |
| | | // 报关单下载链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) { |
| | | init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c; |
| | | }else{ |
| | | init.code = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c)) { |
| | | init.awsKey = notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c; |
| | | }else{ |
| | | init.awsKey = ''; |
| | | } |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.FileName__c)) { |
| | | init.fileName = notFnmListhomebuy[i].ApplyList_Select__r.FileName__c; |
| | | }else{ |
| | | init.fileName = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 end |
| | | }else { |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_NoHave__c)){ |
| | | init.code = notFnmListhomebuy[i].ApplyList_NoHave__c; |
| | | }else{ |
| | | init.code = ''; |
| | | } |
| | | init.codeyu = ''; |
| | | init.awsKey = ''; // zhj 2022-12-08 |
| | | init.fileName = ''; // zhj 2022-12-08 |
| | | } |
| | | } |
| | | |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList__c)) { |
| | | // if (notFnmListhomebuy[i].ApplyList__c.equals('不出证')) { |
| | | // init.code = '不出证'; |
| | | // }else{ |
| | | // // 报关单预览链接判断 |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c)) { |
| | | // init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c; |
| | | // }else{ |
| | | // init.codeyu = ''; |
| | | // } |
| | | // // 报关单下载链接判断 |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) { |
| | | // init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c; |
| | | // }else{ |
| | | // init.code = ''; |
| | | // } |
| | | // //报关单awkey,filename判断 zhj 2022-12-08 start |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c)) { |
| | | // init.awsKey = notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c; |
| | | // }else{ |
| | | // init.awsKey = ''; |
| | | // } |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.FileName__c)) { |
| | | // init.fileName = notFnmListhomebuy[i].ApplyList_Select__r.FileName__c; |
| | | // }else{ |
| | | // init.fileName = ''; |
| | | // } |
| | | // //报关单awkey,filename判断 zhj 2022-12-08 end |
| | | // } |
| | | // }else{ |
| | | // init.code = ''; |
| | | // init.codeyu = ''; |
| | | // init.awsKey = ''; // zhj 2022-12-08 |
| | | // init.fileName = ''; // zhj 2022-12-08 |
| | | // } |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | |
| | | //if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | // if (notFnmListhomebuy[i].InspectionCard__c =='不出证') { |
| | | // init.sj_code = '不出证'; |
| | |
| | | // init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c; |
| | | // } |
| | | //2022-12-05 fy add 商检证判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard__c)) { |
| | | if (notFnmListhomebuy[i].InspectionCard__c.equals('不出证')) { |
| | | init.sj_code = '不出证'; |
| | | }else{ |
| | | // 商检证预览链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c)) { |
| | | init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c; |
| | | }else{ |
| | | init.sj_codeyu = ''; |
| | | } |
| | | // 商检证下载链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c; |
| | | }else{ |
| | | init.sj_code = ''; |
| | | } |
| | | //商检证awkey,filename判断 zhj 2022-12-19 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c)) { |
| | | init.sj_awsKey = notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c; |
| | | }else{ |
| | | init.sj_awsKey = ''; |
| | | } |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c)) { |
| | | init.sj_fileName = notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c; |
| | | }else{ |
| | | init.sj_fileName = ''; |
| | | } |
| | | //商检证awkey,filename判断 zhj 2022-12-19 end |
| | | } |
| | | }else{ |
| | | init.sj_code = ''; |
| | | init.sj_codeyu = ''; |
| | | init.sj_awsKey = ''; // zhj 2022-12-19 |
| | | init.sj_fileName = ''; // zhj 2022-12-19 |
| | | } |
| | | //2022-12-26 fy add 改造 end |
| | | |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__c)) { |
| | | // 报关单预览链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c)) { |
| | | init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c; |
| | | }else{ |
| | | init.sj_codeyu = ''; |
| | | } |
| | | // 报关单下载链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c; |
| | | }else{ |
| | | init.sj_code = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c)) { |
| | | init.sj_awsKey = notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c; |
| | | }else{ |
| | | init.sj_awsKey = ''; |
| | | } |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c)) { |
| | | init.sj_fileName = notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c; |
| | | }else{ |
| | | init.sj_fileName = ''; |
| | | } |
| | | //报关单awkey,filename判断 zhj 2022-12-08 end |
| | | }else { |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_NoHave__c)) { |
| | | init.sj_code = notFnmListhomebuy[i].InspectionCard_NoHave__c; |
| | | }else{ |
| | | init.sj_code = ''; |
| | | } |
| | | init.sj_codeyu = ''; |
| | | init.sj_awsKey = ''; // zhj 2022-12-08 |
| | | init.sj_fileName = ''; // zhj 2022-12-08 |
| | | } |
| | | |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard__c)) { |
| | | // if (notFnmListhomebuy[i].InspectionCard__c.equals('不出证')) { |
| | | // init.sj_code = '不出证'; |
| | | // }else{ |
| | | // // 商检证预览链接判断 |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c)) { |
| | | // init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c; |
| | | // }else{ |
| | | // init.sj_codeyu = ''; |
| | | // } |
| | | // // 商检证下载链接判断 |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | // init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c; |
| | | // }else{ |
| | | // init.sj_code = ''; |
| | | // } |
| | | // //商检证awkey,filename判断 zhj 2022-12-19 start |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c)) { |
| | | // init.sj_awsKey = notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c; |
| | | // }else{ |
| | | // init.sj_awsKey = ''; |
| | | // } |
| | | // if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c)) { |
| | | // init.sj_fileName = notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c; |
| | | // }else{ |
| | | // init.sj_fileName = ''; |
| | | // } |
| | | // //商检证awkey,filename判断 zhj 2022-12-19 end |
| | | // } |
| | | // }else{ |
| | | // init.sj_code = ''; |
| | | // init.sj_codeyu = ''; |
| | | // init.sj_awsKey = ''; // zhj 2022-12-19 |
| | | // init.sj_fileName = ''; // zhj 2022-12-19 |
| | | // } |
| | | // //2022-12-26 fy add 改造 end |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | |
| | | // init.code = FileStrMap.get(notFnmListhomebuy[i].ApplyList__c); |
| | | init.Num = notFnmListhomebuy[i].Num__c; |
| | | init.Id = notFnmListhomebuy[i].Id; |
| | | init.FrameNo = notFnmListhomebuy[i].SerialNumber__c; |
| | | n = n+1; |
| | | if((i<notFnmListhomebuy.size()-1 && notFnmListhomebuy[i].ApplyList__c != notFnmListhomebuy[i+1].ApplyList__c)||(i == notFnmListhomebuy.size()-1)){ |
| | | |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if((i<notFnmListhomebuy.size()-1 && notFnmListhomebuy[i].ApplyList__c != notFnmListhomebuy[i+1].ApplyList__c)||(i == notFnmListhomebuy.size()-1)){ |
| | | if((i<notFnmListhomebuy.size()-1 && notFnmListhomebuy[i].ApplyList_NoHave__c != notFnmListhomebuy[i+1].ApplyList_NoHave__c)||(i == notFnmListhomebuy.size()-1)){ |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | |
| | | init.count =n; |
| | | } |
| | | System.debug('init3===='+init); |
| | | } |
| | | // 2023-01-10 fy add start 商检证排序合并 |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if (notFnmListhomebuy[i].InspectionCard__c == notFnmListhomebuy[i-1].InspectionCard__c) { |
| | | if (notFnmListhomebuy[i].InspectionCard_NoHave__c == notFnmListhomebuy[i-1].InspectionCard_NoHave__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | n_sj = n_sj+1; |
| | | if (i != notFnmListhomebuy.size()-1) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if (notFnmListhomebuy[i].InspectionCard__c != notFnmListhomebuy[i+1].InspectionCard__c) { |
| | | if (notFnmListhomebuy[i].InspectionCard_NoHave__c != notFnmListhomebuy[i+1].InspectionCard_NoHave__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | init.count_sj = n_sj; |
| | | } |
| | | }else{ |
| | | init.count_sj = n_sj; |
| | | } |
| | | |
| | | }else{ |
| | | n_sj = 0; |
| | | n_sj = n_sj+1; |
| | | if (i == notFnmListhomebuy.size()-1) { |
| | | init.count_sj = n_sj; |
| | | }else{ |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if (notFnmListhomebuy[i].InspectionCard__c != notFnmListhomebuy[i+1].InspectionCard__c) { |
| | | if (notFnmListhomebuy[i].InspectionCard_NoHave__c != notFnmListhomebuy[i+1].InspectionCard_NoHave__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | init.count_sj = n_sj; |
| | | } |
| | | } |
| | | } |
| | | // 2023-01-10 fy add end 商检证排序合并 |
| | | } |
| | | //zhj 如果是eSignSystem需要加上这个前缀链接 2023-01-04 start |
| | | if(bool){ |
| | |
| | | //zhj 如果是eSignSystem需要加上这个前缀链接 2023-01-04 end |
| | | initList.add(init); |
| | | } |
| | | List<testInit> newinitListhomebuy = new List<testInit>(); |
| | | for(FrameNumManage__c fr : FnmListhomebuy){ |
| | | testInit init = new testInit(); |
| | | init.Name=fr.ManagementCode__c; |
| | | init.ProductName=fr.Material__c + '-' + fr.MaterialDepict__c; |
| | | init.FrameNo=fr.SerialNumber__c; |
| | | init.code='国内采购'; |
| | | init.sj_code='国内采购'; |
| | | init.Num=fr.Num__c; |
| | | init.Id=fr.Id; |
| | | init.count=1; |
| | | newinitListhomebuy.add(init); |
| | | } |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // List<testInit> newinitListhomebuy = new List<testInit>(); |
| | | // for(FrameNumManage__c fr : FnmListhomebuy){ |
| | | // testInit init = new testInit(); |
| | | // init.Name=fr.ManagementCode__c; |
| | | // init.ProductName=fr.Material__c + '-' + fr.MaterialDepict__c; |
| | | // init.FrameNo=fr.SerialNumber__c; |
| | | // init.code='国内采购'; |
| | | // init.sj_code='国内采购'; |
| | | // init.Num=fr.Num__c; |
| | | // init.Id=fr.Id; |
| | | // init.count=1; |
| | | // newinitListhomebuy.add(init); |
| | | // } |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | // 倒序显示 |
| | | for (Integer i = initList.size()-1; i>=0 ; i--) { |
| | | testInit init = new testInit(); |
| | |
| | | newinitList.add(init); |
| | | } |
| | | // newinitList.addAll(newinitListhomebuy); |
| | | newinitListhomebuy.addAll(newinitList); |
| | | newinitList=newinitListhomebuy; |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // newinitListhomebuy.addAll(newinitList); |
| | | // newinitList=newinitListhomebuy; |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | System.debug('newinitList'+newinitList); |
| | | System.debug('FnmList'+FnmList); |
| | | System.debug('newinitListhomebuy'+newinitListhomebuy); |
| | | // System.debug('newinitListhomebuy'+newinitListhomebuy); |
| | | return newinitList; |
| | | |
| | | } |
| | |
| | | @AuraEnabled |
| | | public Integer count; |
| | | @AuraEnabled |
| | | public Integer count_sj;//2023-01-10 fy add 商检证单独合并 |
| | | @AuraEnabled |
| | | public String awsKey; |
| | | @AuraEnabled |
| | | public String fileName; |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | public class AttachmentDisplayControllerTest { |
| | | static testMethod void TestInit01(){ |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | if (rectSct.size() == 0) { |
| | | return; |
| | | } |
| | | List<RecordType> rectDpt = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name IN ('診療科 消化科', '診療科 呼吸科') order by Name desc]; |
| | | if (rectDpt.size() == 0) { |
| | | return; |
| | | } |
| | | List<RecordType> rectAs = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Asset' and Name = '备品']; |
| | | if (rectAs.size() == 0) { |
| | | return; |
| | | } |
| | | |
| | | |
| | | // insert hospital |
| | | Account company1 = new Account(); |
| | | company1.RecordTypeId = rectCo[0].Id; |
| | | company1.Name = '病院テスト1'; |
| | | company1.OCM_man_province_txt__c = '江西'; |
| | | company1.AgentCode_Ext__c = '888888'; |
| | | List<Account> hps = new Account[]{company1}; |
| | | insert hps; |
| | | |
| | | List<Account> dc1s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = :company1.Id order by Department_Class_Label__c]; |
| | | |
| | | Account depart1 = new Account(); |
| | | depart1.RecordTypeId = rectDpt[0].Id; |
| | | depart1.Name = '*'; |
| | | depart1.Department_Name__c = '診療科1'; |
| | | depart1.ParentId = dc1s[0].Id; |
| | | depart1.Department_Class__c = dc1s[0].Id; |
| | | depart1.Hospital__c = company1.Id; |
| | | depart1.OCM_man_province_txt__c = '江西'; |
| | | // depart1.AgentCode_Ext__c = '888888'; |
| | | |
| | | insert new Account[] {depart1}; |
| | | |
| | | List<Product2> prdList = new List<Product2>(); |
| | | Product2 prd1 = new Product2(); |
| | | prd1.ProductCode_Ext__c = 'HistoryPrd1'; |
| | | prd1.ProductCode = 'HistoryPrd1'; |
| | | prd1.Repair_Product_Code__c = 'HistoryPrd1_RP'; |
| | | prd1.Name = 'HistoryPrd1'; |
| | | prd1.Manual_Entry__c = false; |
| | | prd1.Extend_new_product_gurantee__c = true; |
| | | prd1.Extend_Gurantee_Start__c = Date.today().addDays(-60); |
| | | prd1.Extend_Gurantee_End__c = Date.today().addDays(60); |
| | | prd1.HomeBuy__c=true; |
| | | prdList.add(prd1); |
| | | insert prdList; |
| | | |
| | | Asset ast = new Asset(); |
| | | |
| | | ast.RecordTypeId = rectAs[0].Id; |
| | | ast.SerialNumber = 'abcdefg'; |
| | | ast.Name = '测试资产1'; |
| | | ast.AccountId = depart1.Id; |
| | | ast.Department_Class__c = dc1s[0].Id; |
| | | ast.Hospital__c = company1.Id; |
| | | ast.Product2Id = prd1.Id; |
| | | ast.Guarantee_period_for_products__c = Date.today(); |
| | | ast.InstallDate = Date.today(); |
| | | ast.Manage_type__c = '个体管理'; |
| | | ast.FirstApproveDate_old__c = Date.today().addDays(-30); |
| | | |
| | | Oly_TriggerHandler.bypass('AssetHandler'); |
| | | |
| | | insert ast; |
| | | |
| | | Asset ast1 = [select RecordTypeID__c from Asset where Id =: ast.Id]; |
| | | |
| | | String RecordTypeID = ast1.RecordTypeID__c; |
| | | |
| | | System.assertEquals(RecordTypeID , ast.RecordTypeId); |
| | | |
| | | RecordType rectOpp = [select id from RecordType where IsActive = true and SobjectType = 'Opportunity' and DeveloperName = 'Opportunity' ]; |
| | | Opportunity opp = new Opportunity( |
| | | Name='testOpp1', |
| | | StageName='引合', |
| | | CloseDate=Date.today(), |
| | | AccountId=depart1.Id, |
| | | Sales_Root__c = '販売店', |
| | | Competitor__c ='A', |
| | | Click_Close_Date__c = null, |
| | | RecordType = rectOpp |
| | | ); |
| | | insert opp; |
| | | |
| | | //注残 |
| | | Statu_Achievements__c Sac = new Statu_Achievements__c( |
| | | name = 'zhucan_one', |
| | | Opportunity__c = opp.id, |
| | | DeliveryDate__c = Date.today(), |
| | | ContractNO__c = 'ContractNO1', |
| | | ContractAmount__c = 1000 |
| | | ); |
| | | insert Sac; |
| | | |
| | | |
| | | |
| | | //新建电子签收单 |
| | | eSignForm__c eSignForm = new eSignForm__c(); |
| | | eSignForm.Statu_Achievements__c = Sac.Id; |
| | | eSignForm.Name = '::测试电子签收单'; |
| | | eSignForm.DNName__c = '65210306'; |
| | | |
| | | insert eSignForm; |
| | | |
| | | eSignForm__c eSignForm1 = new eSignForm__c(); |
| | | eSignForm1.Statu_Achievements__c = Sac.Id; |
| | | eSignForm1.Name = '::测试电子签收单2'; |
| | | eSignForm1.DNName__c = '65210307'; |
| | | |
| | | insert eSignForm1; |
| | | |
| | | eSignFormEntry__c eSignFormEntry1 = new eSignFormEntry__c(); |
| | | eSignFormEntry1.Name = '::电子签收单录入表1'; |
| | | eSignFormEntry1.eSignForm__c = eSignForm.Id; |
| | | eSignFormEntry1.entryType__c = '经销商收货'; |
| | | |
| | | insert eSignFormEntry1; |
| | | |
| | | eSignFormEntry__c eSignFormEntry2 = new eSignFormEntry__c(); |
| | | eSignFormEntry2.Name = '::电子签收单录入表2'; |
| | | eSignFormEntry2.eSignForm__c = eSignForm.Id; |
| | | eSignFormEntry2.entryType__c = '经销商收货'; |
| | | eSignFormEntry2.IsSubmit__c = true; |
| | | eSignFormEntry2.IsHPSubmit__c = true; |
| | | // eSignFormEntry2.createdDate = Date.today().addDays(-2); |
| | | insert eSignFormEntry2; |
| | | |
| | | eSignFormEntry__c eSignFormEntry3 = new eSignFormEntry__c(); |
| | | eSignFormEntry3.Name = '::电子签收单录入表3'; |
| | | eSignFormEntry3.eSignForm__c = eSignForm1.Id; |
| | | eSignFormEntry3.entryType__c = '经销商收货'; |
| | | eSignFormEntry3.IsSubmit__c = true; |
| | | eSignFormEntry3.IsHPSubmit__c = true; |
| | | insert eSignFormEntry3; |
| | | |
| | | |
| | | //新建电子签收单明细 |
| | | eSignFormLineItem__c eSignFormLineItem = new eSignFormLineItem__c(); |
| | | eSignFormLineItem.Name = '::电子签收单明细'; |
| | | eSignFormLineItem.eSignForm__c = eSignForm.Id; |
| | | |
| | | insert eSignFormLineItem; |
| | | |
| | | eSignFormLineItem__c eSignFormLineItem1 = new eSignFormLineItem__c(); |
| | | eSignFormLineItem1.Name = '::电子签收单明细'; |
| | | eSignFormLineItem1.eSignForm__c = eSignForm1.Id; |
| | | |
| | | insert eSignFormLineItem1; |
| | | |
| | | //新建电子签收单明细录入表 |
| | | |
| | | eSignFormLineItemEntry__c eSignFormLineItemEntry1 = new eSignFormLineItemEntry__c(); |
| | | eSignFormLineItemEntry1.Name = '::电子签收单明细录入1'; |
| | | eSignFormLineItemEntry1.eSignFormEntry__c =eSignFormEntry1.Id; |
| | | eSignFormLineItemEntry1.eSignFormLineItem__c = eSignFormLineItem.Id; |
| | | |
| | | insert eSignFormLineItemEntry1; |
| | | |
| | | eSignFormLineItemEntry__c eSignFormLineItemEntry2 = new eSignFormLineItemEntry__c(); |
| | | eSignFormLineItemEntry2.Name = '::电子签收单明细录入2'; |
| | | eSignFormLineItemEntry2.eSignFormEntry__c =eSignFormEntry2.Id; |
| | | eSignFormLineItemEntry2.eSignFormLineItem__c = eSignFormLineItem.Id; |
| | | |
| | | |
| | | insert eSignFormLineItemEntry2; |
| | | |
| | | FileAddress__c FileName1 = new FileAddress__c(); |
| | | FileName1.FileName__c = 'ceshiyi1'; |
| | | FileName1.ViewLink__c = 'ceshiyi1'; |
| | | insert FileName1; |
| | | |
| | | FileAddress__c FileName2 = new FileAddress__c(); |
| | | FileName2.FileName__c = 'ceshiyi2'; |
| | | FileName2.ViewLink__c = 'ceshiyi2'; |
| | | insert FileName2; |
| | | |
| | | FrameNumManage__c FrameNumManage1 = new FrameNumManage__c(); |
| | | FrameNumManage1.Name = '测试1'; |
| | | FrameNumManage1.ManagementCode__c ='KVZFI'; |
| | | FrameNumManage1.ApplyList__c = 'ceshiyi1'; |
| | | FrameNumManage1.Num__c = 2; |
| | | FrameNumManage1.SerialNumber__c = '22R'; |
| | | FrameNumManage1.Material__c = 'wuliaoceshi'; |
| | | FrameNumManage1.MaterialDepict__c = 'wuliaomiaoshu'; |
| | | FrameNumManage1.signInForm__c = eSignForm.Id; |
| | | |
| | | insert FrameNumManage1; |
| | | |
| | | FrameNumManage__c FrameNumManage2 = new FrameNumManage__c(); |
| | | FrameNumManage2.Name = '测试2'; |
| | | FrameNumManage2.ManagementCode__c ='KVZFI'; |
| | | FrameNumManage2.ApplyList__c = 'ceshiyi2'; |
| | | FrameNumManage2.Num__c = 2; |
| | | FrameNumManage2.SerialNumber__c = '22R'; |
| | | FrameNumManage2.Material__c = 'wuliaoceshi'; |
| | | FrameNumManage2.MaterialDepict__c = 'wuliaomiaoshu'; |
| | | FrameNumManage2.signInForm__c = eSignForm.Id; |
| | | FrameNumManage2.InspectionCard_Select__c =FileName2.Id; |
| | | FrameNumManage2.ApplyList_Select__c =FileName2.Id; |
| | | |
| | | insert FrameNumManage2; |
| | | FrameNumManage__c FrameNumManage3 = new FrameNumManage__c(); |
| | | FrameNumManage3.Name = '测试3'; |
| | | FrameNumManage3.ManagementCode__c ='KVZFI'; |
| | | FrameNumManage3.ApplyList__c = 'ceshiyi2'; |
| | | FrameNumManage3.Num__c = 2; |
| | | FrameNumManage3.SerialNumber__c = '22R'; |
| | | FrameNumManage3.Material__c = 'wuliaoceshi3'; |
| | | FrameNumManage3.MaterialDepict__c = 'wuliaomiaoshu3'; |
| | | FrameNumManage3.signInForm__c = eSignForm.Id; |
| | | FrameNumManage3.InspectionCard_Select__c =FileName1.Id; |
| | | FrameNumManage3.ApplyList_Select__c =FileName1.Id; |
| | | |
| | | insert FrameNumManage3; |
| | | FrameNumManage__c FrameNumManage4 = new FrameNumManage__c(); |
| | | FrameNumManage4.Name = '测试4'; |
| | | FrameNumManage4.ManagementCode__c ='KVZFI4'; |
| | | FrameNumManage4.ApplyList__c = 'ceshiyi4'; |
| | | FrameNumManage4.Num__c = 2; |
| | | FrameNumManage4.SerialNumber__c = '22R'; |
| | | FrameNumManage4.Material__c = 'wuliaoceshi4'; |
| | | FrameNumManage4.MaterialDepict__c = 'wuliaomiaoshu4'; |
| | | FrameNumManage4.signInForm__c = eSignForm.Id; |
| | | FrameNumManage4.Asset__c = ast.Id; |
| | | |
| | | insert FrameNumManage4; |
| | | |
| | | FrameNumManage__c FrameNumManage5 = new FrameNumManage__c(); |
| | | FrameNumManage5.Name = '测试5'; |
| | | FrameNumManage5.ManagementCode__c ='KVZFI5'; |
| | | FrameNumManage5.ApplyList__c = 'ceshiyi5'; |
| | | FrameNumManage5.Num__c = 2; |
| | | FrameNumManage5.SerialNumber__c = '22R'; |
| | | FrameNumManage5.Material__c = 'wuliaoceshi5'; |
| | | FrameNumManage5.MaterialDepict__c = 'wuliaomiaoshu5'; |
| | | FrameNumManage5.InspectionCard__c = '不出证'; |
| | | FrameNumManage5.signInForm__c = eSignForm.Id; |
| | | |
| | | insert FrameNumManage5; |
| | | |
| | | FrameNumManage__c FrameNumManage6 = new FrameNumManage__c(); |
| | | FrameNumManage6.Name = '测试6'; |
| | | FrameNumManage6.ManagementCode__c ='KVZFI6'; |
| | | FrameNumManage6.ApplyList__c = 'ceshiyi6'; |
| | | FrameNumManage6.Num__c = 2; |
| | | FrameNumManage6.SerialNumber__c = '22R'; |
| | | FrameNumManage6.Material__c = 'wuliaoceshi6'; |
| | | FrameNumManage6.MaterialDepict__c = 'wuliaomiaoshu6'; |
| | | FrameNumManage6.InspectionCard__c = 'ceshiyi2'; |
| | | FrameNumManage6.signInForm__c = eSignForm.Id; |
| | | |
| | | insert FrameNumManage6; |
| | | |
| | | FrameNumManage__c FrameNumManage7 = new FrameNumManage__c(); |
| | | FrameNumManage7.Name = '测试7'; |
| | | FrameNumManage7.ManagementCode__c ='KVZFI7'; |
| | | FrameNumManage7.ApplyList__c = 'ceshiyi6'; |
| | | FrameNumManage7.Num__c = 2; |
| | | FrameNumManage7.SerialNumber__c = '22R'; |
| | | FrameNumManage7.Material__c = 'wuliaoceshi6'; |
| | | FrameNumManage7.MaterialDepict__c = 'wuliaomiaoshu6'; |
| | | FrameNumManage7.InspectionCard__c = 'ceshiyi2'; |
| | | FrameNumManage7.signInForm__c = eSignForm.Id; |
| | | |
| | | insert FrameNumManage7; |
| | | |
| | | FrameNumManage__c FrameNumManage8 = new FrameNumManage__c(); |
| | | FrameNumManage8.Name = '测试8'; |
| | | FrameNumManage8.ManagementCode__c ='KVZFI5'; |
| | | FrameNumManage8.ApplyList__c = 'ceshiyi8'; |
| | | FrameNumManage8.Num__c = 2; |
| | | FrameNumManage8.SerialNumber__c = '22R'; |
| | | FrameNumManage8.Material__c = 'wuliaoceshi5'; |
| | | FrameNumManage8.MaterialDepict__c = 'wuliaomiaoshu5'; |
| | | FrameNumManage8.InspectionCard__c = 'ceshiyi1'; |
| | | FrameNumManage8.signInForm__c = eSignForm.Id; |
| | | |
| | | insert FrameNumManage8; |
| | | |
| | | FrameNumManage__c FrameNumManage9 = new FrameNumManage__c(); |
| | | FrameNumManage9.Name = '测试9'; |
| | | FrameNumManage9.ManagementCode__c ='KVZFI9'; |
| | | FrameNumManage9.ApplyList__c = ''; |
| | | FrameNumManage9.Num__c = 2; |
| | | FrameNumManage9.SerialNumber__c = '22R'; |
| | | FrameNumManage9.Material__c = 'wuliaoceshi9'; |
| | | FrameNumManage9.MaterialDepict__c = 'wuliaomiaoshu9'; |
| | | FrameNumManage9.InspectionCard__c = ''; |
| | | FrameNumManage9.signInForm__c = eSignForm1.Id; |
| | | |
| | | insert FrameNumManage9; |
| | | FrameNumManage__c FrameNumManage10 = new FrameNumManage__c(); |
| | | FrameNumManage10.Name = '测试10'; |
| | | FrameNumManage10.ManagementCode__c ='KVZFI10'; |
| | | FrameNumManage10.ApplyList__c = ''; |
| | | FrameNumManage10.Num__c = 2; |
| | | FrameNumManage10.SerialNumber__c = '22R'; |
| | | FrameNumManage10.Material__c = 'wuliaoceshi10'; |
| | | FrameNumManage10.MaterialDepict__c = 'wuliaomiaoshu10'; |
| | | FrameNumManage10.InspectionCard__c = ''; |
| | | FrameNumManage10.signInForm__c = eSignForm1.Id; |
| | | |
| | | insert FrameNumManage10; |
| | | |
| | | FrameNumManage__c FrameNumManage11 = new FrameNumManage__c(); |
| | | FrameNumManage11.Name = '测试11'; |
| | | FrameNumManage11.ManagementCode__c ='KVZFI11'; |
| | | FrameNumManage11.ApplyList__c = null; |
| | | FrameNumManage11.Num__c = 2; |
| | | FrameNumManage11.SerialNumber__c = '22R'; |
| | | FrameNumManage11.Material__c = 'wuliaoceshi11'; |
| | | FrameNumManage11.MaterialDepict__c = 'wuliaomiaoshu11'; |
| | | FrameNumManage11.InspectionCard__c = ''; |
| | | FrameNumManage11.signInForm__c = eSignForm1.Id; |
| | | |
| | | insert FrameNumManage11; |
| | | |
| | | // create ContentVersions |
| | | list<ContentVersion> cvList = new list<ContentVersion>(); |
| | | cvList.add( new ContentVersion(Title = 'test1',PathOnClient = 'Test1.txt',VersionData = Blob.valueOf('test data 1'), IsMajorVersion = true) ); |
| | | cvList.add( new ContentVersion(Title = 'test2',PathOnClient = 'Test2.txt',VersionData = Blob.valueOf('test data 2'), IsMajorVersion = true) ); |
| | | cvList.add( new ContentVersion(Title = 'test3',PathOnClient = 'Test3.txt',VersionData = Blob.valueOf('test data 3'), IsMajorVersion = true) ); |
| | | insert cvList; |
| | | |
| | | Test.startTest(); |
| | | // retrieve Ids for ContentDocuments created on insert of ContentVersions |
| | | list<Id> cdIdList = new list<Id>(); |
| | | for (ContentDocument cd : [SELECT Id, LatestPublishedVersionId |
| | | FROM ContentDocument |
| | | WHERE (LatestPublishedVersionId = :cvList[0].Id |
| | | OR LatestPublishedVersionId = :cvList[1].Id |
| | | OR LatestPublishedVersionId = :cvList[2].Id) |
| | | ORDER BY Title]) { |
| | | cdIdList.add(cd.Id); |
| | | } |
| | | system.assertEquals(3, cdIdList.size()); |
| | | |
| | | |
| | | // create ContentDocumentLink links. 2 for TestAcct (1) and 1 for TestAcct (2) |
| | | list<ContentDocumentLink> cdlList = new list<ContentDocumentLink>(); |
| | | cdlList.add(new ContentDocumentLink(ContentDocumentId=cdIdList[0], LinkedEntityId=eSignFormEntry1.Id, ShareType='V')); |
| | | |
| | | insert cdlList; |
| | | string aid = String.valueOf(depart1.Id); |
| | | eSignHomePageController.getDNSignUpStatus('65210306'); |
| | | eSignHomePageController.eSignWrapperList esceshi = eSignHomePageController.getDNSignUpLists(aid,'Agency'); |
| | | eSignHomePageController.getAccount('888888'); |
| | | AttachmentDisplayController.getFrameNumManage(eSignForm.Id); |
| | | |
| | | eSignHomePageController.getDNSignUpStatus('65210307'); |
| | | eSignHomePageController.eSignWrapperList esceshi1 = eSignHomePageController.getDNSignUpLists(aid,'Agency'); |
| | | eSignHomePageController.getAccount('888888'); |
| | | AttachmentDisplayController.getFrameNumManage(eSignForm1.Id); |
| | | Test.stopTest(); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | @isTest |
| | | private class AttachmentTriggerTest { |
| | | @TestSetup |
| | | static void setup(){ |
| | | TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Agency_Contact__c','Contact'}); |
| | | } |
| | | |
| | | |
| | | @isTest |
| | | static void test_method_one() { |
| | |
| | | opp.Name = 'GZ-SP-NFM007_1'; |
| | | opp.Trade__c = '内貿'; |
| | | opp.StageName = '引合'; |
| | | opp.CloseDate = date.newinstance(2022, 11, 30); |
| | | opp.CloseDate = date.newinstance(2023, 12, 30); |
| | | opp.Stock_apply_status__c = '申请中'; |
| | | insert opp; |
| | | |
| | |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'test hospital'; |
| | | hospital.Is_Active__c = '有効'; |
| | | hospital.Is_Active__c = '草案中'; |
| | | hospital.Attribute_Type__c = '卫生部'; |
| | | hospital.Speciality_Type__c = '综合医院'; |
| | | hospital.Grade__c = '一级'; |
| | |
| | | contact2.LastName = 'test1经销商'; |
| | | insert contact2; |
| | | |
| | | Test.setMock(HttpCalloutMock.class, new HttpMock()); |
| | | |
| | | List<Agency_Contact__c> lra = new List<Agency_Contact__c>(); |
| | | lra.add(new Agency_Contact__c( |
| | | Aws_Data_Id__c = '123456' |
| | | )); |
| | | |
| | | System.Test.startTest(); |
| | | AWSServiceTool2.EncryptPushCore(Json.serialize(lra),'Agency_Contact__c'); |
| | | AWSServiceTool2.EncryptPushFuture(null,null); |
| | | //insert att1; |
| | | Attachment att = new Attachment( |
| | | Name = 'test', |
| | | ParentId = hospital.Id, |
| | | Body = EncodingUtil.base64Decode('test') |
| | | |
| | | ); |
| | | insert att; |
| | | |
| | |
| | | opp.Name = 'GZ-SP-NFM007_1'; |
| | | opp.Trade__c = '内貿'; |
| | | opp.StageName = '引合'; |
| | | opp.CloseDate = date.newinstance(2022, 11, 30); |
| | | opp.CloseDate = date.newinstance(2023, 11, 30); |
| | | opp.Stock_apply_status__c = '申请中'; |
| | | insert opp; |
| | | |
| | |
| | | } |
| | | @isTest |
| | | static void test_method_6() { |
| | | List<RecordType> rectC = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectC.size() == 0) { |
| | | return; |
| | | User thisUser = [select Id from User where Id = :UserInfo.getUserId() ]; |
| | | System.runAs ( thisUser ){ |
| | | List<RecordType> rectC = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectC.size() == 0) { |
| | | return; |
| | | } |
| | | Account act1 = new Account(); |
| | | act1.Name = 'TestAccount01'; |
| | | act1.RecordTypeId = rectC[0].Id; |
| | | |
| | | upsert act1; |
| | | |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '契約']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | Account act2 = new Account(); |
| | | act2.Name = 'TestAccount02'; |
| | | act2.Business_Assistant__c = getUser().id; |
| | | act2.RecordTypeId = rectCo[0].Id; |
| | | act2.ParentId = act1.Id; |
| | | |
| | | upsert act2; |
| | | |
| | | Consumable_order__c co = new Consumable_order__c(); |
| | | co.Name = 'TestCo'; |
| | | co.Order_status__c = '草案中'; |
| | | co.Order_effective_contact__c = act2.id; |
| | | |
| | | insert co; |
| | | System.Test.startTest(); |
| | | |
| | | Attachment att = new Attachment( |
| | | Name = 'test', |
| | | ParentId = co.Id, |
| | | Body = EncodingUtil.base64Decode('test') |
| | | ); |
| | | |
| | | insert att; |
| | | |
| | | delete att; |
| | | |
| | | System.Test.stopTest(); |
| | | } |
| | | Account act1 = new Account(); |
| | | act1.Name = 'TestAccount01'; |
| | | act1.RecordTypeId = rectC[0].Id; |
| | | |
| | | upsert act1; |
| | | |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '契約']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | Account act2 = new Account(); |
| | | act2.Name = 'TestAccount02'; |
| | | act2.Business_Assistant__c = getUser().id; |
| | | act2.RecordTypeId = rectCo[0].Id; |
| | | act2.ParentId = act1.Id; |
| | | |
| | | upsert act2; |
| | | |
| | | Consumable_order__c co = new Consumable_order__c(); |
| | | co.Name = 'TestCo'; |
| | | co.Order_status__c = '草案中'; |
| | | co.Order_effective_contact__c = act2.id; |
| | | |
| | | insert co; |
| | | System.Test.startTest(); |
| | | |
| | | Attachment att = new Attachment( |
| | | Name = 'test', |
| | | ParentId = co.Id, |
| | | Body = EncodingUtil.base64Decode('test') |
| | | ); |
| | | |
| | | insert att; |
| | | |
| | | delete att; |
| | | |
| | | System.Test.stopTest(); |
| | | |
| | | } |
| | | |
| | | @isTest |
| | |
| | | |
| | | } |
| | | |
| | | // 20230206 lt start |
| | | @isTest |
| | | static void test_method_9() { |
| | | //新建省 |
| | | Address_Level__c al = new Address_Level__c(); |
| | | al.Name = '東京'; |
| | | al.Level1_Code__c = 'CN-99'; |
| | | al.Level1_Sys_No__c = '999999'; |
| | | insert al; |
| | | |
| | | // 病院を作る |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'test hospital'; |
| | | hospital.Is_Active__c = '草案中'; |
| | | hospital.Attribute_Type__c = '卫生部'; |
| | | hospital.Speciality_Type__c = '综合医院'; |
| | | hospital.Grade__c = '一级'; |
| | | hospital.OCM_Category__c = 'SLTV'; |
| | | hospital.Is_Medical__c = '医疗机构'; |
| | | hospital.State_Master__c = al.id; |
| | | // hospital.City_Master__c = al2.id; |
| | | hospital.Town__c = '东京'; |
| | | insert hospital; |
| | | |
| | | RecordType rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'Hp']; |
| | | |
| | | Account acc = new Account(); |
| | | acc.RecordTypeId = rectCo.Id; |
| | | acc.Name = 'HP test1'; |
| | | acc.Is_Active__c = '有効'; |
| | | insert acc; |
| | | |
| | | //新建 客户变更申请 |
| | | Account_Delay_Apply__c ada = new Account_Delay_Apply__c(); |
| | | ada.Hospital__c = acc.Id; |
| | | ada.ChangeReason__c = '地址错误'; |
| | | ada.State_Master__c = al.Id; |
| | | insert ada; |
| | | |
| | | System.Test.startTest(); |
| | | |
| | | Attachment att = new Attachment( |
| | | Name = 'test', |
| | | ParentId = hospital.Id, |
| | | Body = EncodingUtil.base64Decode('test') |
| | | ); |
| | | insert att; |
| | | att.Name = 'test01'; |
| | | update att; |
| | | |
| | | Attachment att1 = new Attachment( |
| | | Name = '2test', |
| | | ParentId = ada.Id, |
| | | Body = EncodingUtil.base64Decode('test') |
| | | ); |
| | | insert att1; |
| | | att1.Name = '2test01'; |
| | | update att1; |
| | | System.Test.stopTest(); |
| | | |
| | | } |
| | | // 20230206 lt end |
| | | |
| | | private static User getUser() { |
| | | String timenow = Datetime.now().format('yyyyMMddHHmmss'); |
| | | User usr = new User(Test_staff__c = true, LastName = 'TestZY', FirstName = 'TestZY', |
| | |
| | | } |
| | | |
| | | // MZY SWAG-BXXBKA 2021-02-19 end |
| | | |
| | | class HttpMock implements HttpCalloutMock{ |
| | | public HTTPResponse respond(HTTPRequest request) { |
| | | // 创建一个假的回应 |
| | | System.debug('------------------------------------------------------'); |
| | | HttpResponse response = new HttpResponse(); |
| | | string body = ''; |
| | | system.debug(request.getEndpoint()); |
| | | if(request.getEndpoint().contains('token')){ |
| | | system.debug('url=token'); |
| | | response.setHeader('Content-Type', 'application/json'); |
| | | body='{ "message": "", "object": "freqfewqfewewfewfew", "status": "", "success": true, "timestamp": 0, "txId": "" }'; |
| | | } else if(request.getEndpoint().contains('insert')){ |
| | | system.debug('url=Insert'); |
| | | response.setHeader('Content-Type', 'application/json'); |
| | | body='{ "message": "", "object": [ { "dataId": "123456", "directShippmentAddress": "", "directShippmentAddressEncrypt": "", "isDelete": 0, "phoneNumber": "", "phoneNumberEncrypt": "", "sfRecordId": "a2R1m0000007BPD" } ], "status": "", "success": true, "timestamp": 0, "txId": "" }'; |
| | | } else if(request.getEndpoint().contains('update')){ |
| | | system.debug('url=update'); |
| | | response.setHeader('Content-Type', 'application/json'); |
| | | body='{ "message": "", "object": [ { "dataId": "123456", "directShippmentAddress": "", "directShippmentAddressEncrypt": "", "isDelete": 0, "phoneNumber": "", "phoneNumberEncrypt": "", "sfRecordId": "a2R1m0000007BPD" } ], "status": "", "success": true, "timestamp": 0, "txId": "" }'; |
| | | } else{ |
| | | |
| | | } |
| | | |
| | | response.setBody(body); |
| | | response.setStatus('OK'); |
| | | response.setStatusCode(200); |
| | | return response; |
| | | // } |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | public PageReference editContact() { |
| | | if (conId != null && conId != '') { |
| | | newCon = [select Id, Name, Department__c, Type__c, Search_LastName__c, Search_FirstName__c, Phone, Supplement__c,LastName_Encrypted__c,Phone_Encrypted__c, |
| | | newCon = [select Id, Name, Department__c, Type__c, Search_LastName__c, Search_FirstName__c, Phone, Supplement__c, |
| | | //LastName_Encrypted__c,Phone_Encrypted__c, //zhj 新方案改造 2022-12-19 |
| | | FirstName, LastName,AWS_Data_Id__c |
| | | from Contact where Id = :conId]; |
| | | } |
| | |
| | | |
| | | Test.startTest(); |
| | | B_Test bt = new B_Test(); |
| | | bt.newCon = [select Id, Name, Department__c, Type__c, Search_LastName__c, Search_FirstName__c, Phone, Supplement__c,LastName_Encrypted__c,Phone_Encrypted__c, |
| | | bt.newCon = [select Id, Name, Department__c, Type__c, Search_LastName__c, Search_FirstName__c, Phone, Supplement__c, |
| | | //LastName_Encrypted__c,Phone_Encrypted__c, //zhj 新方案改造 2022-12-19 |
| | | FirstName, LastName,AWS_Data_Id__c |
| | | from Contact where Id = :con.id]; |
| | | Contact searchCon = [select Id, Name, Department__c, Type__c, Search_LastName__c, Search_FirstName__c, Phone, Supplement__c, |
| | |
| | | message.setUseSignature(false); |
| | | addMessage(message); |
| | | } |
| | | |
| | | //20230203 lt 计划的作业优化 一小时两次 start |
| | | public Class ScBean { |
| | | public String scName; |
| | | public String scTime; |
| | | } |
| | | |
| | | public static ScBean setSc1(String baseName, Integer minhour, Integer maxhour, Integer minMin, String spbefore, String spafter) { |
| | | Datetime dt = Datetime.now(); |
| | | Integer year = Integer.valueOf(dt.format('yyyy'));//2021-12-29 you YYYY--->yyyy 是因为最后一周跨年了 |
| | | Integer month = Integer.valueOf(dt.format('MM')); |
| | | Integer day = Integer.valueOf(dt.format('dd')); |
| | | Integer hour = Integer.valueOf(dt.format('HH')); |
| | | Integer min = Integer.valueOf(dt.format('mm')); |
| | | ScBean b = new ScBean(); |
| | | if (hour == maxhour && min >= (minMin + 30)) { |
| | | b.scName = baseName + '001'; |
| | | if (spafter != null && String.isNotBlank(spafter)) { |
| | | b.scName = baseName + '005'; |
| | | b.scTime = spafter + ' ' + day + ' ' + month + ' ? ' + year; |
| | | // system.schedule(sJobame,spafter + ' ' + day + ' ' + month + ' ? ' + year, new AgencyShareUpdateBatchSchedule()); |
| | | return b; |
| | | } |
| | | else { |
| | | dt = Datetime.now().addDays(1); |
| | | year = Integer.valueOf(dt.format('yyyy'));//2021-12-29 you YYYY--->yyyy 是因为最后一周跨年了 |
| | | month = Integer.valueOf(dt.format('MM')); |
| | | day = Integer.valueOf(dt.format('dd')); |
| | | hour = Integer.valueOf(dt.format('HH')); |
| | | min = Integer.valueOf(dt.format('mm')); |
| | | if (spbefore != null && String.isNotBlank(spbefore)) { |
| | | b.scName = baseName + '006'; |
| | | b.scTime = spbefore + ' ' + day + ' ' + month + ' ? ' + year; |
| | | } |
| | | else { |
| | | b.scTime = '0 ' + minMin + ' ' + minhour + ' ' + day + ' ' + month + ' ? ' + year; |
| | | } |
| | | } |
| | | } |
| | | else if (min < minMin) { |
| | | b.scName = baseName + '001'; |
| | | b.scTime = '0 ' + minMin + ' ' + hour + ' ' + day + ' ' + month + ' ? ' + year; |
| | | } |
| | | else if (min < minMin + 30) { |
| | | b.scName = baseName + '002'; |
| | | b.scTime = '0 ' + (minMin + 30) + ' ' + hour + ' ' + day + ' ' + month + ' ? ' + year; |
| | | } |
| | | else { |
| | | b.scName = baseName + '001'; |
| | | b.scTime = '0 ' + minMin + ' ' + (hour + 1) +' ' + day + ' ' + month + ' ? ' + year; |
| | | } |
| | | return b; |
| | | } |
| | | |
| | | public static void removeOtherSc(String likeName, String needName) { |
| | | String likeStr = likeName + '00%'; |
| | | for(CronTrigger ct : [SELECT Id,CronJobDetailId,CronExpression,CronJobDetail.Name |
| | | FROM CronTrigger |
| | | WHERE CronJobDetail.Name Like :likeStr |
| | | AND CronJobDetail.Name != :needName]){ |
| | | System.abortJob(ct.Id); |
| | | } |
| | | } |
| | | //20230203 lt 计划的作业优化 一小时两次 end |
| | | } |
| New file |
| | |
| | | global with sharing class BatchFileUploadController { |
| | | public String newUrl {get; set;} |
| | | public String staticResource {get; set;} |
| | | |
| | | public BatchFileUploadController(){ |
| | | AWS_Integration_Info__mdt awsConfiguration = [SELECT App_Id__c,Token_URL__c,App_Secret__c,Host_URL__c FROM AWS_Integration_Info__mdt WHERE DeveloperName = 'AWS_Default_Configuration']; |
| | | if (awsConfiguration == null) { |
| | | System.debug('AWS_Integration_Info__mdt没配置'); |
| | | }else { |
| | | newUrl = awsConfiguration.Host_URL__c + '/api/file/batchupload'; |
| | | staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Document')); |
| | | } |
| | | } |
| | | |
| | | global class Response{ |
| | | public String recordId{set;get;} |
| | | public String message{set;get;} |
| | | public String status{set;get;} |
| | | } |
| | | |
| | | global class ResponseDeleteFile{ |
| | | public List<String> keyList{set;get;} |
| | | public String message{set;get;} |
| | | public String status{set;get;} |
| | | } |
| | | |
| | | @RemoteAction |
| | | global static Response saveFile(String fileName,String key,String transId,String parentId,String bool){ |
| | | FileAddress__c file = new FileAddress__c(); |
| | | PIHelper.PIIntegration pI=PIHelper.getPIIntegrationInfo('Document'); |
| | | // 去除filename里得“&” zhj 2022-11-17 |
| | | fileName = fileName.remove('&'); |
| | | file.DownloadLink__c =pI.undeleteUrl+key+'&fileName='+fileName; |
| | | file.FileName__c =fileName; |
| | | file.ViewLink__c =pI.queryUrl+key; |
| | | file.ParentRecordId__c =parentId; |
| | | file.AWS_File_Key__c = key; |
| | | Response response =new Response(); |
| | | Savepoint sp = Database.setSavepoint(); |
| | | try { |
| | | insert file; |
| | | //插入日志 |
| | | //update 2022-11-17 加入新的日志方式 |
| | | PIHelper.saveTransLog('Document',key,transId,file.Id,JSON.serialize(file),'success',''); |
| | | response.recordId=file.Id; |
| | | response.status='success'; |
| | | if(bool == 'true'){ |
| | | System.debug('成功调用batch'); |
| | | Database.executeBatch(new SetFrameNumManageBatch(), 100); //上传成功后需要手动跑batch做数据和附件的关联 2022-12-27 |
| | | } |
| | | return response; |
| | | } catch (Exception e) { |
| | | System.debug('into catch'+e.getMessage()); |
| | | PIHelper.saveTransLog('Document',key,transId,file.Id,JSON.serialize(file),'fail',e.getMessage()); |
| | | Database.rollback(sp); |
| | | response.message=e.getMessage(); |
| | | response.status='fail'; |
| | | return response; |
| | | } |
| | | } |
| | | |
| | | @RemoteAction |
| | | global static ResponseDeleteFile deleteFile(String fileIds){ |
| | | String[] ids = fileIds.split(','); |
| | | System.debug('ids = ' + ids); |
| | | List<String> idList = new List<String>(); |
| | | for(String str : ids){ |
| | | idList.add(str); |
| | | } |
| | | System.debug('idList = ' + idList); |
| | | List<FileAddress__c> fList = [select id,AWS_File_Key__c from FileAddress__c where id in:idList]; |
| | | |
| | | List<String> keyList = new List<String>(); |
| | | for(FileAddress__c fa : fList){ |
| | | keyList.add(fa.AWS_File_Key__c); |
| | | } |
| | | System.debug('keyList = ' + keyList); |
| | | ResponseDeleteFile response =new ResponseDeleteFile(); |
| | | Savepoint sp = Database.setSavepoint(); |
| | | try { |
| | | delete fList; |
| | | response.keyList = keyList; |
| | | response.message = ''; |
| | | response.status = 'success'; |
| | | return response; |
| | | } catch (Exception e) { |
| | | Database.rollback(sp); |
| | | response.keyList = null; |
| | | response.message = e.getMessage(); |
| | | response.status = 'success'; |
| | | return response; |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | public without sharing class BatchSelectRepairPDFDelete { |
| | | public void deletePDF(List<Repair__c> repList){ |
| | | List<String> attachmentNameList = new List<String>(); |
| | | List<Attachment> isGeneratedPDFList = new List<Attachment>(); |
| | | for(Repair__c re : repList){ |
| | | attachmentNameList.add(re.name + '_' + 'MaintenanceCommission.pdf'); |
| | | } |
| | | isGeneratedPDFList = [select id from Attachment where name IN:attachmentNameList]; |
| | | System.debug(LoggingLevel.INFO, '*** isGeneratedPDFList: ' + isGeneratedPDFList); |
| | | if(isGeneratedPDFList.size() > 0){ |
| | | delete isGeneratedPDFList; |
| | | } |
| | | } |
| | | |
| | | public void createPDF(List<Repair__c> repList){ |
| | | PageReference pdfPage; |
| | | List<Attachment> attachments = new List<Attachment>(); |
| | | for(Repair__c re : repList){ |
| | | pdfPage = new PageReference('/apex/MaintenanceCommissionPDF?id=' + re.Id); |
| | | Blob pdfBody; |
| | | if(Test.isRunningTest()) { |
| | | pdfBody = blob.valueOf('Unit.Test'); |
| | | } else { |
| | | pdfBody = pdfPage.getContentAsPDF(); |
| | | } |
| | | Attachment attach = new Attachment(); |
| | | attach.Body = pdfBody; |
| | | attach.Name = re.name + '_' + 'MaintenanceCommission.pdf'; |
| | | attach.ParentId = re.id; |
| | | attachments.add(attach); |
| | | } |
| | | System.debug(LoggingLevel.INFO, '*** attachments: ' + attachments); |
| | | insert attachments; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>46.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class BatchSelectRepairPDFDeleteTest { |
| | | static testMethod void testMethod1() { |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>46.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | public List<RepairData> RAInfoList { get; set; } |
| | | public List<Repair__c> RepairList { get; set; } |
| | | public List<String> repairIdList{ get; set; } |
| | | public List<SelectOption> StatusItems1 { get; private set; } |
| | | public List<SelectOption> StatusItems { get; private set; } |
| | | public List<SelectOption> SiteRepairItems { get; private set; } |
| | | public String pdfURL { get; private set; } |
| | | public Integer RACount { |
| | | get { return RAInfoList == null ? 0 : RAInfoList.size(); } |
| | | } |
| | | |
| | | public BatchSelectRepairPageController() { |
| | | StatusItems = new List<SelectOption>(); |
| | | StatusItems.add(new SelectOption('','--无--')); |
| | | StatusItems.add(new SelectOption('00.申请完毕','00.申请完毕')); |
| | | StatusItems.add(new SelectOption('01.分公司受理完毕','01.分公司受理完毕')); |
| | | StatusItems.add(new SelectOption('02.RC受理完毕','02.RC受理完毕')); |
| | | StatusItems.add(new SelectOption('03.报价检查结束','03.报价检查结束')); |
| | | StatusItems.add(new SelectOption('04.报价跟进中','04.报价跟进中')); |
| | | StatusItems.add(new SelectOption('05.报价同意完备','05.报价同意完备')); |
| | | StatusItems.add(new SelectOption('06.零件齐备','06.零件齐备')); |
| | | StatusItems.add(new SelectOption('07.修理開始','07.修理開始')); |
| | | StatusItems.add(new SelectOption('08.修理预计完成','08.修理预计完成')); |
| | | StatusItems.add(new SelectOption('09.修理完成','09.修理完成')); |
| | | StatusItems.add(new SelectOption('10.最终检查完成','10.最终检查完成')); |
| | | StatusItems.add(new SelectOption('11.RC修理品已返送','11.RC修理品已返送')); |
| | | StatusItems.add(new SelectOption('12.发票已发送','12.发票已发送')); |
| | | StatusItems.add(new SelectOption('13.已返送到用户','13.已返送到用户')); |
| | | StatusItems.add(new SelectOption('14.收到验收单','14.收到验收单')); |
| | | StatusItems.add(new SelectOption('15.验收单签收复核通过','15.验收单签收复核通过')); |
| | | StatusItems.add(new SelectOption('16.部分付款','16.部分付款')); |
| | | StatusItems.add(new SelectOption('16.完毕','16.完毕')); |
| | | StatusItems.add(new SelectOption('17.付款完毕','17.付款完毕')); |
| | | StatusItems.add(new SelectOption('00.取消','00.取消')); |
| | | StatusItems.add(new SelectOption('00.删除','00.删除')); |
| | | StatusItems.add(new SelectOption('00.关闭','00.关闭')); |
| | | |
| | | StatusItems1 = new List<SelectOption>(); |
| | | StatusItems1.add(new SelectOption('','--无--')); |
| | | StatusItems1.add(new SelectOption('0.申请完毕','0.申请完毕')); |
| | | StatusItems1.add(new SelectOption('2.维修报价阶段','2.维修报价阶段')); |
| | | StatusItems1.add(new SelectOption('3.维修阶段','3.维修阶段')); |
| | | StatusItems1.add(new SelectOption('4.修理品返送阶段','4.修理品返送阶段')); |
| | | StatusItems1.add(new SelectOption('5.完毕','5.完毕')); |
| | | StatusItems1.add(new SelectOption('0.删除','0.删除')); |
| | | StatusItems1.add(new SelectOption('0.取消','0.取消')); |
| | | |
| | | SiteRepairItems = new List<SelectOption>(); |
| | | SiteRepairItems.add(new SelectOption('','--无--')); |
| | | SiteRepairItems.add(new SelectOption('RC修理','RC修理')); |
| | | SiteRepairItems.add(new SelectOption('直送SORC修理','直送SORC修理')); |
| | | SiteRepairItems.add(new SelectOption('直送OGZ修理','直送OGZ修理')); |
| | | SiteRepairItems.add(new SelectOption('办事处修理','办事处修理')); |
| | | SiteRepairItems.add(new SelectOption('现场修理','现场修理')); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | public void init(){ |
| | | RevalInfo = new RetrievalData(); |
| | | } |
| | | |
| | | public List<SelectOption> getStatusItems() { |
| | | List<SelectOption> options = new List<SelectOption>(); |
| | | options.add(new SelectOption('','--无--')); |
| | | options.add(new SelectOption('草案中','草案中')); |
| | | options.add(new SelectOption('1.受理完毕','1.受理完毕')); |
| | | options.add(new SelectOption('2.维修报价阶段','2.维修报价阶段')); |
| | | options.add(new SelectOption('3.维修阶段','3.维修阶段')); |
| | | options.add(new SelectOption('4.修理品返送阶段','4.修理品返送阶段')); |
| | | options.add(new SelectOption('5.完毕','5.完毕')); |
| | | options.add(new SelectOption('0.取消','0.取消')); |
| | | options.add(new SelectOption('0.删除','0.删除')); |
| | | options.add(new SelectOption('0.申请完毕','0.申请完毕')); |
| | | return options; |
| | | } |
| | | |
| | | public List<SelectOption> getSiteRepairItems() { |
| | | List<SelectOption> options = new List<SelectOption>(); |
| | | options.add(new SelectOption('','--无--')); |
| | | options.add(new SelectOption('RC修理','RC修理')); |
| | | options.add(new SelectOption('直送SORC修理','直送SORC修理')); |
| | | options.add(new SelectOption('直送OGZ修理','直送OGZ修理')); |
| | | options.add(new SelectOption('办事处修理','办事处修理')); |
| | | options.add(new SelectOption('现场修理','现场修理')); |
| | | return options; |
| | | } |
| | | // public List<SelectOption> getworkLocationSelect() { |
| | | // List<SelectOption> workLocationSelect = new List<SelectOption>(); |
| | | // workLocationSelect.add(new SelectOption('','--无--')); |
| | | // workLocationSelect.add(new SelectOption('北京办事处','北京办事处')); |
| | | // workLocationSelect.add(new SelectOption('天津办事处','天津办事处')); |
| | | // workLocationSelect.add(new SelectOption('河北办事处','河北办事处')); |
| | | // workLocationSelect.add(new SelectOption('济南办事处','济南办事处')); |
| | | // workLocationSelect.add(new SelectOption('青岛办事处','青岛办事处')); |
| | | // workLocationSelect.add(new SelectOption('内蒙办事处','内蒙办事处')); |
| | | // workLocationSelect.add(new SelectOption('黑龙江办事处','黑龙江办事处')); |
| | | // workLocationSelect.add(new SelectOption('吉林办事处','吉林办事处')); |
| | | // workLocationSelect.add(new SelectOption('沈阳办事处','沈阳办事处')); |
| | | // workLocationSelect.add(new SelectOption('大连办事处','大连办事处')); |
| | | // workLocationSelect.add(new SelectOption('陕西办事处','陕西办事处')); |
| | | // workLocationSelect.add(new SelectOption('青海办事处','青海办事处')); |
| | | // workLocationSelect.add(new SelectOption('宁夏办事处','宁夏办事处')); |
| | | // workLocationSelect.add(new SelectOption('甘肃办事处','甘肃办事处')); |
| | | // workLocationSelect.add(new SelectOption('新疆办事处','新疆办事处')); |
| | | // workLocationSelect.add(new SelectOption('山西办事处','山西办事处')); |
| | | // workLocationSelect.add(new SelectOption('河南办事处','河南办事处')); |
| | | // workLocationSelect.add(new SelectOption('上海办事处','上海办事处')); |
| | | // workLocationSelect.add(new SelectOption('江苏办事处','江苏办事处')); |
| | | // workLocationSelect.add(new SelectOption('江西办事处','江西办事处')); |
| | | // workLocationSelect.add(new SelectOption('浙江办事处','浙江办事处')); |
| | | // workLocationSelect.add(new SelectOption('安徽办事处','安徽办事处')); |
| | | // workLocationSelect.add(new SelectOption('福建办事处','福建办事处')); |
| | | // workLocationSelect.add(new SelectOption('广东办事处','广东办事处')); |
| | | // workLocationSelect.add(new SelectOption('深圳办事处','深圳办事处')); |
| | | // workLocationSelect.add(new SelectOption('湖北办事处','湖北办事处')); |
| | | // workLocationSelect.add(new SelectOption('湖南办事处','湖南办事处')); |
| | | // workLocationSelect.add(new SelectOption('云南办事处','云南办事处')); |
| | | // workLocationSelect.add(new SelectOption('贵州办事处','贵州办事处')); |
| | | // workLocationSelect.add(new SelectOption('四川办事处','四川办事处')); |
| | | // workLocationSelect.add(new SelectOption('重庆办事处','重庆办事处')); |
| | | // workLocationSelect.add(new SelectOption('杭州办事处','杭州办事处')); |
| | | // workLocationSelect.add(new SelectOption('杭州共通办事处','杭州共通办事处')); |
| | | // workLocationSelect.add(new SelectOption('西安办事处','西安办事处')); |
| | | // workLocationSelect.add(new SelectOption('西安共通办事处','西安共通办事处')); |
| | | // workLocationSelect.add(new SelectOption('共通办事处','共通办事处')); |
| | | // workLocationSelect.add(new SelectOption('成都办事处','成都办事处')); |
| | | // workLocationSelect.add(new SelectOption('成都共通办事处','成都共通办事处')); |
| | | // workLocationSelect.add(new SelectOption('广州办事处','广州办事处')); |
| | | // return workLocationSelect; |
| | | // } |
| | | |
| | | public PageReference RetrievalBtn() { |
| | | RepairList = new List<Repair__c>(); |
| | | RAInfoList = new List<RepairData>(); |
| | | if(String.isBlank(RevalInfo.Status1) && String.isBlank(RevalInfo.RepairName) && String.isBlank(RevalInfo.SAPRepairNo) |
| | | if(String.isBlank(RevalInfo.Status1) && String.isBlank(RevalInfo.Status2) && String.isBlank(RevalInfo.RepairName) && String.isBlank(RevalInfo.SAPRepairNo) |
| | | && String.isBlank(RevalInfo.SerialNumber) && String.isBlank(RevalInfo.repair.Incharge_Staff__c) && String.isBlank(RevalInfo.onSiteRepair) |
| | | && String.isBlank(String.valueOf(RevalInfo.repair.Aware_date__c)) && String.isBlank(RevalInfo.workLocationSelect)){ |
| | | && String.isBlank(String.valueOf(RevalInfo.repair.Aware_date__c)) && String.isBlank(String.valueOf(RevalInfo.repair.Aware_date2__c)) && String.isBlank(RevalInfo.workLocationSelect) |
| | | && String.isBlank(RevalInfo.State_Hospital)){ |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '请至少添加一个检索条件!')); |
| | | return null; |
| | | } |
| | | String sql = 'select Id, Name, SAP_Service_Repair_No__c, Status1__c, Status2__c, Delivered_Product__c, SerialNumber__c, '; |
| | | sql += 'HP_Name__c, State_Hospital__c, Incharge_Staff__c, FSE_ApplyForRepair_Day__c, work_location_select__c, On_site_repair__c,'; |
| | | sql += 'Number_of_EffectiveContract__c, NewProductGuaranteeObject__c from Repair__c where Id != null '; |
| | | if(String.isNotBlank(RevalInfo.Status2)){ |
| | | sql += ' and Status2__c = \'' + RevalInfo.Status2 + '\''; |
| | | } |
| | | if(String.isNotBlank(RevalInfo.Status1)){ |
| | | sql += ' and Status1__c = \'' + RevalInfo.Status1 + '\''; |
| | | } |
| | | if(String.isNotBlank(RevalInfo.HospitalName)){ |
| | | |
| | | sql += ' and HP_Name__c like \'%' + RevalInfo.HospitalName.trim() + '%\''; |
| | | } |
| | | if(String.isNotBlank(RevalInfo.RepairName)){ |
| | | sql += ' and Name like \'%' + RevalInfo.RepairName + '%\''; |
| | | System.debug(LoggingLevel.INFO, '***RevalInfo.RepairName.contains(): ' + RevalInfo.RepairName.contains(' ')); |
| | | String splitStr = null; |
| | | if(RevalInfo.RepairName.contains(' ')){ |
| | | splitStr = ' '; |
| | | }else if(RevalInfo.RepairName.contains(',')){ |
| | | splitStr = ','; |
| | | } |
| | | if(splitStr != null && RevalInfo.RepairName.contains(splitStr)){ |
| | | sql += ' and ('; |
| | | list <String> nameList = RevalInfo.RepairName.split(splitStr); |
| | | for(String name: nameList){ |
| | | sql += 'Name like \'%' + name + '%\' or '; |
| | | } |
| | | sql = sql.removeEnd('or '); |
| | | sql += ')'; |
| | | }else{ |
| | | sql += ' and Name like \'%' + RevalInfo.RepairName.trim() + '%\''; |
| | | } |
| | | System.debug(LoggingLevel.INFO, '*** sql: ' + sql); |
| | | } |
| | | if(String.isNotBlank(RevalInfo.SAPRepairNo)){ |
| | | sql += ' and SAP_Service_Repair_No__c like \'%' + RevalInfo.SAPRepairNo + '%\''; |
| | | System.debug(LoggingLevel.INFO, '***RevalInfo.SAPRepairNo.contains(): ' + RevalInfo.SAPRepairNo.contains(' ')); |
| | | String splitStr = null; |
| | | if(RevalInfo.SAPRepairNo.contains(' ')){ |
| | | splitStr = ' '; |
| | | }else if(RevalInfo.SAPRepairNo.contains(',')){ |
| | | splitStr = ','; |
| | | } |
| | | if(splitStr != null && RevalInfo.SAPRepairNo.contains(splitStr)){ |
| | | sql += ' and ('; |
| | | |
| | | list <String> noList = RevalInfo.SAPRepairNo.split(splitStr); |
| | | for(String no: noList){ |
| | | sql += 'SAP_Service_Repair_No__c like \'%' + no + '%\' or '; |
| | | } |
| | | sql = sql.removeEnd('or '); |
| | | sql += ')'; |
| | | }else{ |
| | | sql += ' and SAP_Service_Repair_No__c like \'%' + RevalInfo.SAPRepairNo.trim() + '%\''; |
| | | } |
| | | System.debug(LoggingLevel.INFO, '*** sql: ' + sql); |
| | | } |
| | | if(String.isNotBlank(RevalInfo.SerialNumber)){ |
| | | sql += ' and SerialNumber__c like \'%' + RevalInfo.SerialNumber + '%\''; |
| | | List<String> SerialNumberList = new List<String>(); |
| | | if(RevalInfo.SerialNumber.indexOf(',') != -1){ |
| | | SerialNumberList = RevalInfo.SerialNumber.split(','); |
| | | } |
| | | System.debug('SerialNumberList1:' + SerialNumberList); |
| | | // 支持模糊查询多个,文本框输入用英文半角逗号分隔 |
| | | if(SerialNumberList.size() > 0){ |
| | | sql += ' and (SerialNumber__c like \'%'; |
| | | Integer i = 0; |
| | | for(String SerialNumber : SerialNumberList){ |
| | | if(i == 0){ |
| | | sql += SerialNumber.trim() + '%\''; |
| | | }else{ |
| | | sql += 'or SerialNumber__c like \'%' + SerialNumber.trim() + '%\''; |
| | | } |
| | | i++; |
| | | } |
| | | sql += ')'; |
| | | } else{ |
| | | sql += ' and SerialNumber__c like \'%' + RevalInfo.SerialNumber.trim() + '%\''; |
| | | } |
| | | } |
| | | if(String.isNotBlank(RevalInfo.repair.Incharge_Staff__c)){ |
| | | sql += ' and Incharge_Staff__c = \'' + RevalInfo.repair.Incharge_Staff__c + '\''; |
| | | } |
| | | if(String.isNotBlank(String.valueof(RevalInfo.repair.Aware_date__c))){ |
| | | if(String.isNotBlank(String.valueof(RevalInfo.repair.Aware_date__c))&&String.isNotBlank(String.valueof(RevalInfo.repair.Aware_date2__c))){ |
| | | String day = String.valueof(RevalInfo.repair.Aware_date__c); |
| | | String day2 = String.valueof(RevalInfo.repair.Aware_date2__c); |
| | | day = day.substring(0,10); |
| | | sql += ' and FSE_ApplyForRepair_Day__c = ' + day; |
| | | day2 = day2.substring(0,10); |
| | | sql += ' and FSE_ApplyForRepair_Day__c >= ' + day + 'and FSE_ApplyForRepair_Day__c <=' +day2; |
| | | } |
| | | if(String.isNotBlank(RevalInfo.onSiteRepair)){ |
| | | sql += ' and On_site_repair__c = \'' + RevalInfo.onSiteRepair + '\''; |
| | | } |
| | | if(String.isNotBlank(RevalInfo.workLocationSelect)){ |
| | | sql += ' and work_location_select__c like \'%' + RevalInfo.workLocationSelect + '%\''; |
| | | List<String> workLocationSelectList = new List<String>(); |
| | | if(RevalInfo.workLocationSelect.indexOf(',') != -1){ |
| | | workLocationSelectList = RevalInfo.workLocationSelect.split(','); |
| | | } |
| | | System.debug('workLocationSelectList1:' + workLocationSelectList); |
| | | if(workLocationSelectList.size() > 0){ |
| | | sql += ' and (work_location_select__c like \'%'; |
| | | Integer i = 0; |
| | | for(String workLocationSelect : workLocationSelectList){ |
| | | if(i == 0){ |
| | | sql += workLocationSelect.trim() + '%\''; |
| | | }else{ |
| | | sql += 'or work_location_select__c like \'%' + workLocationSelect.trim() + '%\''; |
| | | } |
| | | i++; |
| | | } |
| | | sql += ')'; |
| | | } else{ |
| | | sql += ' and work_location_select__c like \'%' + RevalInfo.workLocationSelect.trim() + '%\''; |
| | | } |
| | | } |
| | | sql += ' limit 200'; |
| | | if(String.isNotBlank(RevalInfo.State_Hospital)){ |
| | | sql += ' and State_Hospital__c like \'%' + RevalInfo.State_Hospital.trim() + '%\''; |
| | | } |
| | | sql += 'and Status1__c not in(\'0.删除\',\'0.取消\') limit 200'; |
| | | System.debug('sql1:' + sql); |
| | | if(String.isNotBlank(sql)){ |
| | | RepairList = Database.query(sql); |
| | |
| | | } |
| | | |
| | | public PageReference showPDF() { |
| | | System.debug(LoggingLevel.INFO, '*** joinshoPDF: '); |
| | | repairIdList = new List<String>(); |
| | | RepairList = new List<Repair__c>(); |
| | | String url = '='; |
| | |
| | | return null; |
| | | } |
| | | for(RepairData rd : RAInfoList) { |
| | | System.debug(LoggingLevel.INFO, '*** rd: ' + rd); |
| | | if(rd.IFCheck){ |
| | | repairIdList.add(rd.repair.Id); |
| | | RepairList.add(rd.repair); |
| | | } |
| | | } |
| | | System.debug(LoggingLevel.INFO, '***repairIdList : ' + repairIdList); |
| | | System.debug(LoggingLevel.INFO, '***RepairList : ' + RepairList); |
| | | if(repairIdList.size() > 0){ |
| | | if(repairIdList.size() <= 50){ |
| | | if(RepairList.size() > 0){ |
| | | System.debug(LoggingLevel.INFO, '*** if size>0 generateAttachment: '); |
| | | generateAttachment(RepairList); |
| | | } |
| | | for(String Id : repairIdList){ |
| | | url += Id + '='; |
| | | } |
| | | url = url.substring(0, url.lastIndexOf('=')); |
| | | PageReference pageRef = new PageReference('/apex/MaintenanceCommissionPDF?id' + url); |
| | | pageRef.setRedirect(true); |
| | | return pageRef; |
| | | // PageReference pageRef = new PageReference('/apex/MaintenanceCommissionPDF?id' + url); |
| | | // pageRef.setRedirect(true); |
| | | // return pageRef; |
| | | if(isSandbox()){ |
| | | pdfURL = 'https://ocsm--stagefull--c.visualforce.com/apex/MaintenanceCommissionPDF?id' + url; |
| | | } else{ |
| | | pdfURL = 'https://ocsm.my.salesforce.com/apex/MaintenanceCommissionPDF?id' + url; |
| | | } |
| | | return null; |
| | | } else{ |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '多单打印最大数量为50,请选择少于50个修理!')); |
| | | return null; |
| | |
| | | |
| | | // 生成pdf添加到对应的修理中 |
| | | public static PageReference generateAttachment(List<Repair__c> repList){ |
| | | PageReference pdfPage; |
| | | List<Attachment> attachments = new List<Attachment>(); |
| | | List<String> attachmentNameList = new List<String>(); |
| | | List<Attachment> isGeneratedPDFList = new List<Attachment>(); |
| | | //删除已存在的附件,生成新的附件 |
| | | for(Repair__c re : repList){ |
| | | attachmentNameList.add(re.name + '_' + 'MaintenanceCommission.pdf'); |
| | | } |
| | | isGeneratedPDFList = [select id from Attachment where name IN:attachmentNameList]; |
| | | if(isGeneratedPDFList.size() > 0){ |
| | | delete isGeneratedPDFList; |
| | | } |
| | | for(Repair__c re : repList){ |
| | | pdfPage = new PageReference('/apex/MaintenanceCommissionPDF?id=' + re.Id); |
| | | Blob pdfBody; |
| | | if(Test.isRunningTest()) { |
| | | pdfBody = blob.valueOf('Unit.Test'); |
| | | } else { |
| | | pdfBody = pdfPage.getContentAsPDF(); |
| | | } |
| | | Attachment attach = new Attachment(); |
| | | attach.Body = pdfBody; |
| | | attach.Name = re.name + '_' + 'MaintenanceCommission.pdf'; |
| | | attach.ParentId = re.id; |
| | | attachments.add(attach); |
| | | } |
| | | insert attachments; |
| | | System.debug(LoggingLevel.INFO, '*** generateAttachment: '); |
| | | // PageReference pdfPage; |
| | | // List<Attachment> attachments = new List<Attachment>(); |
| | | // List<String> attachmentNameList = new List<String>(); |
| | | // List<Attachment> isGeneratedPDFList = new List<Attachment>(); |
| | | // //删除已存在的附件,生成新的附件 |
| | | // for(Repair__c re : repList){ |
| | | // attachmentNameList.add(re.name + '_' + 'MaintenanceCommission.pdf'); |
| | | // } |
| | | // isGeneratedPDFList = [select id from Attachment where name IN:attachmentNameList]; |
| | | // System.debug(LoggingLevel.INFO, '*** isGeneratedPDFList: ' + isGeneratedPDFList); |
| | | // if(isGeneratedPDFList.size() > 0){ |
| | | // delete isGeneratedPDFList; |
| | | // } |
| | | BatchSelectRepairPDFDelete pdf = new BatchSelectRepairPDFDelete(); |
| | | pdf.deletePDF(repList); |
| | | pdf.createPDF(repList); |
| | | |
| | | // for(Repair__c re : repList){ |
| | | // pdfPage = new PageReference('/apex/MaintenanceCommissionPDF?id=' + re.Id); |
| | | // Blob pdfBody; |
| | | // if(Test.isRunningTest()) { |
| | | // pdfBody = blob.valueOf('Unit.Test'); |
| | | // } else { |
| | | // pdfBody = pdfPage.getContentAsPDF(); |
| | | // } |
| | | // Attachment attach = new Attachment(); |
| | | // attach.Body = pdfBody; |
| | | // attach.Name = re.name + '_' + 'MaintenanceCommission.pdf'; |
| | | // attach.ParentId = re.id; |
| | | // attachments.add(attach); |
| | | // } |
| | | // System.debug(LoggingLevel.INFO, '*** attachments: ' + attachments); |
| | | // insert attachments; |
| | | return null; |
| | | } |
| | | |
| | | // 判断是否是测试环境 |
| | | public Boolean isSandbox() { |
| | | return [SELECT IsSandbox FROM Organization LIMIT 1].IsSandbox; |
| | | } |
| | | |
| | | public class RetrievalData { |
| | | public String Status1{ get; set; } |
| | | public String Status2{ get; set; } |
| | | public String RepairName{ get; set; } |
| | | public String SAPRepairNo{ get; set; } |
| | | public String SerialNumber{ get; set; } |
| | | public String onSiteRepair{ get; set; } |
| | | public String workLocationSelect{ get; set; } |
| | | public String State_Hospital{ get; set; } |
| | | public String HospitalName{ get; set; } |
| | | public Repair__c repair{ get; set; } |
| | | public RetrievalData(){ |
| | | repair = new Repair__c(); |
| | |
| | | @isTest |
| | | private class BatchSelectRepairPageControllerTest { |
| | | static Repair__c repair01; |
| | | // static Repair__c repair02 |
| | | @TestSetup |
| | | public static void init(){ |
| | | |
| | | Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | User hpOwner = new User(Test_staff__c = true, LastName = 'hp', FirstName = 'owner', Alias = 'hp', CommunityNickname = 'hpOwner', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id); |
| | | insert hpOwner; |
| | |
| | | asset.SerialNumber = 'testserial'; |
| | | insert asset; |
| | | |
| | | repair01 = new Repair__c(); |
| | | Repair__c repair01 = new Repair__c(); |
| | | repair01.Account__c = dpt.Id; |
| | | repair01.Department_Class__c = dc.Id; |
| | | repair01.Hospital__c = hp.Id; |
| | | repair01.Delivered_Product__c = asset.Id; |
| | | repair01.SERVICE_CONTRACT_JUDEGE_DAY__C = Date.today().addDays(0); |
| | | repair01.FSE_Work_Location__c = '上海'; |
| | | repair01.Service_Repair_No__c = 'SAP0001'; |
| | | repair01.Incharge_Staff__c = hpOwner.Id; |
| | | repair01.On_site_repair__c = 'RC修理'; |
| | | repair01.work_location_select__c = '北京办事处'; |
| | | // repair01.Final_complete_day__c = Date.today().addDays(-1); |
| | | insert repair01; |
| | | } |
| | | static testMethod void testSample_01() { |
| | | init(); |
| | | PageReference page = new PageReference('/apex/BatchSelectRepairPage'); |
| | | System.Test.setCurrentPage(page); |
| | | System.Test.StartTest(); |
| | | BatchSelectRepairPageController br = new BatchSelectRepairPageController(); |
| | | br.init(); |
| | | |
| | | br.RevalInfoList[0].repair = repair01; |
| | | br.RevalInfoList[0].Status2 = '01.分公司受理完毕'; |
| | | br.RevalInfoList[0].RepairName = 'RS-202203-651844'; |
| | | br.RevalInfoList[0].SerialNumber = 'testserial'; |
| | | // br.RevalInfoList[0].SAPRepairNo = '000010201157'; |
| | | Repair__c repair01 = [SELECT Id,Status2__c,Name,Incharge_Staff__c,SAP_Service_Repair_No__c,Aware_date2__c,State_Hospital__c,SerialNumber__c,work_location_select__c,FSE_ApplyForRepair_Day__c,On_site_repair__c,Aware_date__c FROM Repair__c LIMIT 1]; |
| | | br.RevalInfo.repair = repair01; |
| | | br.RevalInfo.Status2 = repair01.Status2__c; |
| | | br.RevalInfo.RepairName = repair01.Name + ','; |
| | | br.RevalInfo.SerialNumber = repair01.SerialNumber__c + ',' + repair01.SerialNumber__c; |
| | | br.RevalInfo.SAPRepairNo = repair01.SAP_Service_Repair_No__c + ','; |
| | | // br.RevalInfo.repair.Aware_date__c = repair01.FSE_ApplyForRepair_Day__c.addDays(-1); |
| | | // br.RevalInfo.repair.Aware_date2__c = repair01.FSE_ApplyForRepair_Day__c.addDays(1); |
| | | br.RevalInfo.onSiteRepair = repair01.On_site_repair__c; |
| | | br.RevalInfo.workLocationSelect = repair01.work_location_select__c; |
| | | br.RevalInfo.State_Hospital = repair01.State_Hospital__c; |
| | | br.RetrievalBtn(); |
| | | |
| | | BatchSelectRepairPageController.RepairData reparedata = new BatchSelectRepairPageController.RepairData(repair01); |
| | | reparedata.IFCheck = true; |
| | | br.RAInfoList.add(reparedata); |
| | | br.RAInfoList[0].IFCheck = true; |
| | | br.showPDF(); |
| | | system.assertEquals(br.RAInfoList[0].IFCheck,true); |
| | | br.showPDF(); |
| | | List<Repair__c> repList = new List<Repair__c>(); |
| | | repList.add(repair01); |
| | | BatchSelectRepairPageController.generateAttachment(repList); |
| | | System.Test.StopTest(); |
| | | |
| | | } |
| | | static testMethod void testSample_02() { |
| | | init(); |
| | | PageReference page = new PageReference('/apex/BatchSelectRepairPage'); |
| | | System.Test.setCurrentPage(page); |
| | | System.Test.StartTest(); |
| | | BatchSelectRepairPageController br = new BatchSelectRepairPageController(); |
| | | br.init(); |
| | | br.RetrievalBtn(); |
| | | System.Test.StopTest(); |
| | | } |
| | | static testMethod void testSample_03() { |
| | | init(); |
| | | PageReference page = new PageReference('/apex/BatchSelectRepairPage'); |
| | | System.Test.setCurrentPage(page); |
| | | System.Test.StartTest(); |
| | | BatchSelectRepairPageController br = new BatchSelectRepairPageController(); |
| | | br.init(); |
| | | br.RevalInfoList[0].Status2 = '012312'; |
| | | br.RetrievalBtn(); |
| | | System.Test.StopTest(); |
| | | } |
| | | static testMethod void testSample_04() { |
| | | init(); |
| | | PageReference page = new PageReference('/apex/BatchSelectRepairPage'); |
| | | System.Test.setCurrentPage(page); |
| | | System.Test.StartTest(); |
| | | BatchSelectRepairPageController br = new BatchSelectRepairPageController(); |
| | | br.init(); |
| | | br.showPDF(); |
| | | System.Test.StopTest(); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | system.debug('zheli'+query); |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, List<sObject> scope) { |
| | | // SWAG-CE55BX 预测优化 start |
| | | StaticParameter.EscapeOppandStaTrigger = true; |
| | | // SWAG-CE55BX 预测优化 end |
| | | List<Opportunity> oppUpdateList = new List<Opportunity>(); |
| | | List<Opportunity> updateList = [select id,Inquiry_forcast_date_formular__c,Inquiry_forcast_date_copy__c |
| | | ,OCM_man_province_cus__c,OCM_man_province_cus_txt__c |
| | |
| | | @isTest |
| | | private class BeforeUpsertReportHandlerTest { |
| | | @TestSetup |
| | | static void makeData(){ |
| | | TestDataUtility.CreatePIPolicyConfiguration('Rental_Apply__c'); |
| | | } |
| | | static testMethod void testMethod1() { |
| | | RecordType rectOpp = [select id from RecordType where IsActive = true and SobjectType = 'Opportunity' and DeveloperName = 'Opportunity' ]; |
| | | |
| | |
| | | oPDPlan0.NoOpp_Reason__c = 'HCP对应'; |
| | | oPDPlan0.Related_Opportunity1_ID__c =opp1.id; |
| | | oPDPlan0.Account_Laboratory__c =dep.Id; |
| | | oPDPlan0.OPDType__c = '事件'; |
| | | insert oPDPlan0; |
| | | |
| | | |
| | |
| | | oPDPlan0.Status__c = '草案中'; |
| | | oPDPlan0.OPDPlan_ImplementDate__c = Date.today().addDays(1); |
| | | oPDPlan0.NoOpp_Reason__c = 'HCP对应'; |
| | | oPDPlan0.OPDType__c = '事件'; |
| | | insert oPDPlan0; |
| | | |
| | | // 产品 |
| New file |
| | |
| | | /** |
| | | * 20220606 lt 带量采购记录 |
| | | * 根据“产品编号”检索产品主数据,给字段“产品”(查找产品)赋值 |
| | | */ |
| | | public without sharing class BringQuantityHandler extends Oly_TriggerHandler{ |
| | | private Map<Id, BringQuantityPurchaseRecord__c> newMap; |
| | | private Map<Id, BringQuantityPurchaseRecord__c> oldMap; |
| | | private List<BringQuantityPurchaseRecord__c> newList; |
| | | private List<BringQuantityPurchaseRecord__c> oldList; |
| | | |
| | | public BringQuantityHandler() { |
| | | this.newMap = (Map<Id, BringQuantityPurchaseRecord__c>) Trigger.newMap; |
| | | this.oldMap = (Map<Id, BringQuantityPurchaseRecord__c>) Trigger.oldMap; |
| | | this.newList = (List<BringQuantityPurchaseRecord__c>) Trigger.new; |
| | | this.oldList = (List<BringQuantityPurchaseRecord__c>) Trigger.old; |
| | | } |
| | | |
| | | protected override void beforeInsert(){ |
| | | specialCharacterClear(); |
| | | FindProducts(); |
| | | } |
| | | |
| | | protected override void beforeUpdate(){ |
| | | specialCharacterClear(); |
| | | FindProducts(); |
| | | } |
| | | |
| | | // 把型号、型号确认、规格里的”改成" |
| | | private void specialCharacterClear() { |
| | | for(BringQuantityPurchaseRecord__c bqp : newList){ |
| | | // 型号 |
| | | bqp.Model__c = String.isNotBlank(bqp.Model__c) && bqp.Model__c.contains('”') ? bqp.Model__c.replaceAll('”','"') : bqp.Model__c; |
| | | // 型号确认 |
| | | bqp.ModelConfirm__c = String.isNotBlank(bqp.ModelConfirm__c) && bqp.ModelConfirm__c.contains('”') ? bqp.ModelConfirm__c.replaceAll('”','"') : bqp.ModelConfirm__c; |
| | | // 规格 |
| | | bqp.Specifications__c = String.isNotBlank(bqp.Specifications__c) && bqp.Specifications__c.contains('”') ? bqp.Specifications__c.replaceAll('”','"') : bqp.Specifications__c; |
| | | } |
| | | } |
| | | |
| | | private void FindProducts(){ |
| | | if(trigger.isInsert || trigger.isUpdate){ |
| | | //存带量采购的产品编号 |
| | | List<String> bqList = new List<String>(); |
| | | List<String> MDMList = new List<String>(); |
| | | for(BringQuantityPurchaseRecord__c bqp : newList){ |
| | | // if(bqp.ProductNumber__c != null){ |
| | | if(String.isNotBlank(bqp.ProductNumber__c)){ |
| | | bqList.add(bqp.ProductNumber__c); |
| | | } |
| | | if (String.isNotBlank(bqp.ModelConfirm__c)) { |
| | | MDMList.add(bqp.ModelConfirm__c); |
| | | } |
| | | } |
| | | |
| | | //根据产品编号查产品 |
| | | List<Product2> proList = [select id, Name, ProductCode, MDM_Model_No__c from Product2 where ProductCode in :bqList or MDM_Model_No__c in :MDMList]; |
| | | |
| | | for(BringQuantityPurchaseRecord__c bqr : newList){ |
| | | for(Product2 pro : proList){ |
| | | if((bqr.ProductNumber__c == pro.ProductCode) || (bqr.ModelConfirm__c == pro.MDM_Model_No__c)){ |
| | | bqr.Product2__c = pro.id; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class BringQuantityHandlerTest{ |
| | | |
| | | static testMethod void initTest() { |
| | | |
| | | Product2 pro1 = new Product2( |
| | | Name='name01', |
| | | IsActive=true, |
| | | Asset_Model_No__c='n01', |
| | | MDM_Model_No__c='n01', |
| | | ProductCode_Ext__c='pc01', |
| | | ProductCode = 'pc01', |
| | | Manual_Entry__c=false, |
| | | SFDA_Status__c='有効' |
| | | ); |
| | | insert pro1; |
| | | |
| | | Product2 pro2 = new Product2( |
| | | Name='name02', |
| | | IsActive=true, |
| | | Asset_Model_No__c='n02', |
| | | MDM_Model_No__c='n02', |
| | | ProductCode_Ext__c='pc02', |
| | | ProductCode = 'pc02', |
| | | Manual_Entry__c=false, |
| | | SFDA_Status__c='有効' |
| | | ); |
| | | insert pro2; |
| | | |
| | | BringQuantityPurchaseRecord__c bqp = new BringQuantityPurchaseRecord__c(); |
| | | bqp.ProductNumber__c = 'pc01'; |
| | | insert bqp; |
| | | |
| | | bqp.ProductNumber__c = 'pc02'; |
| | | update bqp; |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | global without sharing class ButtonJsUtility { |
| | | |
| | | webservice static string getStaticResource(String sobj){ |
| | | return Json.serialize(PIHelper.getPIIntegrationInfo(sobj)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | public class ButtonJsUtilityTest { |
| | | |
| | | @TestSetup |
| | | static void makeData(){ |
| | | TestDataUtility.CreatePIPolicyConfiguration('Contact'); |
| | | } |
| | | |
| | | @isTest |
| | | static void Test1(){ |
| | | ButtonJsUtility.getStaticResource('Contact'); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | public String contactsInfo {set;get;} |
| | | public String awsDataIdArray {set;get;} |
| | | |
| | | public String sfContactId{set;get;} //zhj 2022-12-02 sfId |
| | | |
| | | public CM_SearchContact() { |
| | | openLine = Apexpages.currentPage().getParameters().get('line'); |
| | | accountId = Apexpages.currentPage().getParameters().get('acc'); |
| | |
| | | newCon = new Contact(); |
| | | newCon.AccountId = accountId; |
| | | |
| | | sfContactId = ''; //zhj 2022-12-02 sfId |
| | | return; |
| | | } |
| | | |
| | |
| | | |
| | | public PageReference editContact() { |
| | | if (conId != null && conId != '') { |
| | | newCon = [select Id, Name, Department__c, Type__c, Search_LastName__c, Search_FirstName__c, Phone, Supplement__c,LastName_Encrypted__c,Phone_Encrypted__c, |
| | | // newCon = [select Id, Name, Department__c, Type__c, Search_LastName__c, Search_FirstName__c, Phone, Supplement__c,LastName_Encrypted__c,Phone_Encrypted__c, |
| | | // FirstName, LastName,AWS_Data_Id__c |
| | | // from Contact where Id = :conId]; |
| | | newCon = [select Id, Name, Department__c, Type__c, Search_LastName__c, Search_FirstName__c, Phone, Supplement__c, |
| | | FirstName, LastName,AWS_Data_Id__c |
| | | from Contact where Id = :conId]; |
| | | from Contact where Id = :conId]; //zhj 新方案改造 去除Encrypted__c 2022-12-05 |
| | | newCon.Search_LastName__c = newCon.LastName; |
| | | newCon.Search_FirstName__c = newCon.FirstName; |
| | | |
| | | sfContactId = newCon.Id; // zhj 2022-12-02 得到sfid给aws |
| | | } |
| | | |
| | | return null; |
| | |
| | | newCon.FirstName = newCon.Search_FirstName__c; |
| | | upsert newCon; |
| | | |
| | | sfContactId = newCon.Id; // zhj 2022-12-02 得到sfid给aws |
| | | |
| | | searchCon.Search_LastName__c = newCon.LastName; |
| | | searchCon.Search_FirstName__c = newCon.FirstName; |
| | | searchContact(); |
| | |
| | | public String conId { get; set; } |
| | | |
| | | public String openLine { get; set; } |
| | | public String accountIdV2{ get; set; } //zhj 2022-02-04 新方案改造 |
| | | private String accountId; |
| | | private String nowValue; |
| | | |
| | |
| | | public String contactsInfo {set;get;} |
| | | public String awsDataIdArray {set;get;} |
| | | |
| | | public String sfContactId{set;get;} //zhj 2022-12-02 sfId |
| | | public String staticResourceContactV2 {get; set;} //zhj 2022-02-04 新方案改造 |
| | | |
| | | public CM_SearchContactServiceController() { |
| | | openLine = Apexpages.currentPage().getParameters().get('line'); |
| | | accountId = Apexpages.currentPage().getParameters().get('acc'); |
| | | accountIdV2 = accountId; |
| | | nowValue = Apexpages.currentPage().getParameters().get('now'); |
| | | |
| | | //2022/02/15 张华建 PI PL start |
| | |
| | | contactsInfo = JSON.serialize(awsIdToContactMap); |
| | | contactAWSIds = JSON.serialize(conAWSIds); |
| | | staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact')); |
| | | staticResourceContactV2 = JSON.serialize(PIHelper.getPIIntegrationInfo('ContactV2')); //zhj 2022-02-04 新方案改造 |
| | | //2022/02/15 张华建 PI PL end |
| | | } |
| | | |
| | |
| | | |
| | | newCon = new Contact(); |
| | | newCon.AccountId = accountId; |
| | | sfContactId = ''; |
| | | |
| | | return; |
| | | } |
| | |
| | | |
| | | public PageReference editContact() { |
| | | if (conId != null && conId != '') { |
| | | newCon = [select Id, Name, Department__c, Type__c, Search_LastName__c, Search_FirstName__c, Phone, Supplement__c,LastName_Encrypted__c,Phone_Encrypted__c, |
| | | // newCon = [select Id, Name, Department__c, Type__c, Search_LastName__c, Search_FirstName__c, Phone, Supplement__c,LastName_Encrypted__c,Phone_Encrypted__c, |
| | | // FirstName, LastName,AWS_Data_Id__c |
| | | // from Contact where Id = :conId]; |
| | | newCon = [select Id, Name, Department__c, Type__c, Search_LastName__c, Search_FirstName__c, Phone, Supplement__c, |
| | | FirstName, LastName,AWS_Data_Id__c |
| | | from Contact where Id = :conId]; |
| | | from Contact where Id = :conId]; //zhj 新方案改造 去除Encrypted__c 2022-12-05 |
| | | newCon.Search_LastName__c = newCon.LastName; |
| | | newCon.Search_FirstName__c = newCon.FirstName; |
| | | sfContactId = newCon.Id; // zhj 2022-12-02 得到sfid给aws |
| | | } |
| | | |
| | | return null; |
| | |
| | | newCon.LastName = newCon.Search_LastName__c; |
| | | newCon.FirstName = newCon.Search_FirstName__c; |
| | | upsert newCon; |
| | | System.debug('newCon.Id = ' + newCon.Id); |
| | | sfContactId = newCon.Id; // zhj 2022-12-02 得到sfid给aws |
| | | |
| | | searchCon.Search_LastName__c = newCon.LastName; |
| | | searchCon.Search_FirstName__c = newCon.FirstName; |
| | |
| | | public PageReference editClear() { |
| | | newCon = new Contact(); |
| | | newCon.AccountId = accountId; |
| | | |
| | | return null; |
| | | } |
| | | |
| | |
| | | con = in_con; |
| | | } |
| | | } |
| | | |
| | | //zhj MEBG新方案改造 2022-11-24 start |
| | | @RemoteAction |
| | | public static ResponseV2 searchContactByAccountId(String accountId) { |
| | | System.debug('accountId = ' + accountId); |
| | | ResponseV2 res = new ResponseV2(); |
| | | try{ |
| | | Account account = [select Id,Name from Account where Id = :accountId]; |
| | | List<Contact> contactList = [select id,AWS_Data_Id__c, CManageCode__c,Name from Contact where AccountId = :account.Id]; |
| | | Map<String,String> dataIdManageCodeMap = new Map<String,String>(); |
| | | for(Contact contact : contactList){ |
| | | dataIdManageCodeMap.put(contact.AWS_Data_Id__c,contact.CManageCode__c); |
| | | } |
| | | res.dataIdManageCodeMap = dataIdManageCodeMap; |
| | | res.accountName = account.Name; |
| | | res.contactList = contactList; |
| | | |
| | | Map<String,String> accMap= new Map<String,String>(); |
| | | List<Account> accList=[select ID,Is_Active__c,Is_Active_Formula__c from Account where ID =:accountId]; |
| | | if(accList.size()>0){ |
| | | for(Account acc:accList){ |
| | | if (String.isNotBlank(acc.Is_Active__c)){ |
| | | String subId = acc.Id; |
| | | accMap.put(subId.substring(0,15), acc.Is_Active__c); |
| | | continue; |
| | | } |
| | | if (String.isNotBlank(acc.Is_Active_Formula__c)){ |
| | | String subId = acc.Id; |
| | | accMap.put(subId.substring(0,15), acc.Is_Active_Formula__c); |
| | | } |
| | | } |
| | | } |
| | | System.debug('accMap= ' + accMap); |
| | | res.isNameMobileVerif = true; |
| | | res.isMobileVerif = false; |
| | | res.status = 'success'; |
| | | return res; |
| | | }catch(Exception e){ |
| | | res.message = e.getMessage() + ''; |
| | | res.status = 'fail'; |
| | | return res; |
| | | } |
| | | } |
| | | |
| | | public class ResponseV2{ |
| | | public List<Contact> contactList{set;get;} |
| | | public String accountName{set;get;} |
| | | public Map<String,String> dataIdManageCodeMap{set;get;} |
| | | public Boolean isMobileVerif; |
| | | public Boolean isNameMobileVerif; |
| | | public String message{set;get;} |
| | | public String status{set;get;} |
| | | } |
| | | //zhj MEBG新方案改造 2022-11-24 end |
| | | } |
| | |
| | | private class CM_SearchContactServiceControllerTest { |
| | | @TestSetup |
| | | static void makeData(){ |
| | | TestDataUtility.CreatePIPolicyConfiguration('Contact'); |
| | | TestDataUtility.CreatePIPolicyConfigurations(new String[]{'Contact','Agency_Contact__c','contactV2'}); |
| | | } |
| | | |
| | | @isTest static void test_method_one() { |
| | |
| | | cmsc.saveNew(); |
| | | |
| | | cmsc.editClear(); |
| | | CM_SearchContactServiceController.searchContactByAccountId(depart1.Id); |
| | | } |
| | | |
| | | } |
| | |
| | | private class CM_SearchContactTest { |
| | | @TestSetup |
| | | static void makeData(){ |
| | | TestDataUtility.CreatePIPolicyConfiguration('Contact'); |
| | | TestDataUtility.CreatePIPolicyConfigurations(new String[]{'Contact','Agency_Contact__c'}); |
| | | } |
| | | @isTest static void test_method_one() { |
| | | RecordType rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'Hp']; |
| | |
| | | // 学会会议的出借备品信息-->OPD计划出借备品信息 |
| | | tempOPD.PlanProdDetail__c = c.LoadNum__c; |
| | | tempOPD.OPDType__c = '学会';//2020-10-21 zh OPD计划类型为学会 SWAG-BS6BYA |
| | | tempOPD.RentalReson__c = '演示';// 20220804 ljh SWAG-CGG7X9 默认 演示 |
| | | //20201118 you SWAG-BVGAGD start |
| | | tempOPD.Meeting_Cooperate__c = c.Meeting_Cooperate__c; |
| | | tempOPD.Meeting_Cooperate2__c = c.Meeting_Cooperate2__c; |
| | |
| | | // public List<AdjudicationData> AdjudicationDataList{ get; set; } |
| | | public AdjudicationData AdjudicationDataobj{ get; set; } |
| | | public boolean hasError { get; set; } |
| | | public String MeetingApprovedName{ get; set; } |
| | | // public String MeetingApprovedName{ get; set; } |
| | | public String flag{ get; set; } |
| | | public String CampaignTheme{ get; set; } |
| | | private String RecordTypeId{ get; set; } |
| | |
| | | MeetingApprovedIdList.add(AdjudicationDataobj.cam.Meeting_Approved_No__c); |
| | | } |
| | | List<Application_for_Conference_Adjudication__c> MeetingApprovedList = |
| | | [select Id, Name, StartDate__c, EndDate__c, BudgetType__c, OfficeCategory__c, MeetingType__c, WorkshopPlace__c, |
| | | [select Id, Name, StartDate__c, EndDate__c, Implementation_Purpose1__c, OfficeCategory__c, MeetingType__c, WorkshopPlace__c, |
| | | HostName__c, CooperatorCompany__c, ConveningParticipantsNum__c, ExpectedOlympusAttendance__c,ExpectedHcpAttendance__c, |
| | | SponsorshipCategory__c, IsPaidToSponsor__c, ActivityTypeName__c, Type_of_adjudication_meeting__c |
| | | from Application_for_Conference_Adjudication__c where Id = :MeetingApprovedIdList]; |
| | |
| | | if(String.isNotBlank(String.valueOf(mam.EndDate__c))){ |
| | | url += '&cpn6=' + String.valueOf(mam.EndDate__c).replace('-','/'); |
| | | } |
| | | if(String.isNotBlank(mam.BudgetType__c)){ |
| | | url += '&00N100000098OEy=' + mam.BudgetType__c; |
| | | if(String.isNotBlank(mam.Implementation_Purpose1__c)){ |
| | | url += '&00N100000098OEy=' + mam.Implementation_Purpose1__c; |
| | | } |
| | | if(String.isNotBlank(mam.OfficeCategory__c)){ |
| | | url += '&00N10000006pwAg=' + mam.OfficeCategory__c; |
| | |
| | | afca.Name = 'test01'; |
| | | afca.StartDate__c = Date.today(); |
| | | afca.EndDate__c = Date.today().addDays(20); |
| | | afca.BudgetType__c = '新产品上市'; |
| | | afca.Implementation_Purpose1__c = '新产品上市'; |
| | | afca.OfficeCategory__c = '1.消化科'; |
| | | afca.MeetingType__c = '共同主办会'; |
| | | afca.WorkshopPlace__c = 'Beijing'; |
| | |
| | | // afca.Name = 'test01'; |
| | | // afca.StartDate__c = Date.today(); |
| | | // afca.EndDate__c = Date.today().addDays(20); |
| | | // afca.BudgetType__c = '新产品上市'; |
| | | // afca.Implementation_Purpose1__c = '新产品上市'; |
| | | // afca.OfficeCategory__c = '1.消化科'; |
| | | // afca.MeetingType__c = '共同主办会'; |
| | | // afca.WorkshopPlace__c = 'Beijing'; |
| | |
| | | public static Campaign createCampaignData( String inputName) { |
| | | Campaign ret = new Campaign(); |
| | | ret.Name = inputName; |
| | | ret.HostName__c = '会议主办方'; |
| | | ret.cooperatorCompany__c = '会议承办方'; |
| | | return ret; |
| | | } |
| | | |
| New file |
| | |
| | | global without sharing class CampaignMemberUploadFileController { |
| | | public String staticResource {get; set;} |
| | | public static String sobjectTypeValue = 'CampaignMember'; |
| | | public static Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe(); |
| | | public CampaignMemberUploadFileController(ApexPages.StandardController controller) { |
| | | staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Document')); |
| | | } |
| | | global class Response{ |
| | | public String message{set;get;} |
| | | public String status{set;get;} |
| | | } |
| | | @RemoteAction |
| | | global static Response saveFile(String CampaignMemberDatas,String transId){ |
| | | Response res = new Response(); |
| | | Savepoint sp = Database.setSavepoint(); |
| | | try{ |
| | | System.debug('CampaignMemberDatas:' + JSON.serialize(CampaignMemberDatas)); |
| | | Schema.SObjectType CampaignMemberSchema = schemaMap.get(sobjectTypeValue); |
| | | Map<String, Schema.SObjectField> fieldAPIToTypeMap = CampaignMemberSchema.getDescribe().fields.getMap(); |
| | | Map<String,Object> fieldValueMap = (Map<String,Object>)JSON.deserializeUntyped(CampaignMemberDatas); |
| | | List<Map<String,Object>> datas = (List<Map<String,Object>>)fieldValueMap.get('idList'); |
| | | List<CampaignMember> CMList = new List<CampaignMember>(); |
| | | List<String> awsIdList = new List<String>(); |
| | | List<String> sfIdList = new List<String>(); |
| | | List<String> contentList = new List<String>(); |
| | | for (Integer i = 0; i < datas.size(); i++) { |
| | | CampaignMember cm = new CampaignMember(); |
| | | for(String fieldAPI : datas[i].keySet()){ |
| | | if(!fieldAPIToTypeMap.containskey(fieldAPI)){ |
| | | continue; |
| | | } |
| | | Schema.DisplayType fielddataType = fieldAPIToTypeMap.get(fieldAPI).getDescribe().getType(); |
| | | String fieldValue = String.valueOf(datas[i].get(fieldAPI)); |
| | | if(fieldAPI == 'AWS_Data_Id__c'){ |
| | | awsIdList.add(fieldValue); |
| | | } |
| | | if(String.valueOf(fielddataType)=='DATE'){ |
| | | cm.put(fieldAPI,(String.isBlank(fieldValue)||String.isEmpty(fieldValue))? null:Date.valueOf(fieldValue.replace('/', '-'))); |
| | | }else if(String.valueOf(fielddataType)=='DATETIME'){ |
| | | if(String.isNotBlank(fieldValue)&&fieldValue.contains('T')){ |
| | | fieldValue = fieldValue.replace('T',' '); |
| | | cm.put(fieldAPI, Datetime.valueOfGmt(fieldValue)); |
| | | }else if(String.isNotBlank(fieldValue)) { |
| | | fieldValue = fieldValue.replace('/', '-') + ':00'; |
| | | cm.put(fieldAPI, Datetime.valueOf(fieldValue)); |
| | | }else{ |
| | | cm.put(fieldAPI, null); |
| | | } |
| | | }else if(String.valueof(fielddataType)=='CURRENCY'|| String.valueof(fielddataType)=='PERCENT'||String.valueOf(fielddataType)=='Number'||String.valueOf(fielddataType)=='DOUBLE' ){ |
| | | cm.put(fieldAPI, (String.isBlank(fieldValue)||String.isEmpty(fieldValue))?null:Decimal.valueOf(fieldValue.replace(',', ''))); |
| | | } else if(String.valueof(fielddataType)=='BOOLEAN'){ |
| | | cm.put(fieldAPI, datas[i].get(fieldAPI)); |
| | | }else { |
| | | cm.put(fieldAPI,fieldValue); |
| | | } |
| | | } |
| | | CMList.add(cm); |
| | | } |
| | | insert CMList; |
| | | for(CampaignMember cm : CMList){ |
| | | contentList.add(cm+''); |
| | | sfIdList.add(cm.id); |
| | | } |
| | | //记录日志 |
| | | res.message = 'success'; |
| | | res.status = 'success'; |
| | | PIHelper.saveTransLogBatch(sobjectTypeValue,awsIdList,sfIdList,transId, contentList ,res.status,''); |
| | | return res; |
| | | }catch(DmlException e){ |
| | | Integer index = 0; |
| | | System.debug('into catch'+e.getMessage()); |
| | | Database.rollback(sp); |
| | | res.message = '保存失败,原因:'+ e.getDmlMessage(index); |
| | | res.status = 'Exception'; |
| | | PIHelper.saveTransLog(sobjectTypeValue,'','',transId, '' ,res.status,e.getMessage()+e.getStackTraceString()); |
| | | return res; |
| | | }catch(Exception e) { |
| | | System.debug('into catch'+e.getMessage()); |
| | | Database.rollback(sp); |
| | | res.message = e.getMessage()+e.getStackTraceString(); |
| | | res.status = 'Exception'; |
| | | PIHelper.saveTransLog(sobjectTypeValue,'','',transId, '' ,res.status,res.message); |
| | | return res; |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | // } else if (oldMap.get(cpp.Id).get('Status__c') != cpp.Status__c && cpp.Status__c == '延期成功') { |
| | | } else if (Trigger.isInsert && cpp.Status__c == '延期成功' || |
| | | Trigger.isUpdate && oldMap.get(cpp.Id).get('Status__c') != cpp.Status__c && cpp.Status__c == '延期成功') { |
| | | |
| | | opdplan.Id = cpp.CancelOPDPlan__c; |
| | | |
| | | // SWAG-BXDC25 mzy 审批后,更新【OPD计划实施日期temp】 Start |
| | | //opdplan.OPDPlan_ImplementDate__c = cpp.NextPlanDate__c; |
| | | opdplan.OPDPlan_ImplementDate_temp__c = cpp.NextPlanDate__c; |
| | |
| | | // SWAG-BUF6J5 20201111 you start |
| | | if (cancelIdSet.size() > 0) {//查询opd计划下得所有备品借出申请 更新 状态 |
| | | List<Rental_Apply__c> Rentals = new List<Rental_Apply__c>(); |
| | | List<Rental_Apply__c> RentalList = [select id,Cancel_Reason__c , Loaner_cancel_request__c,OPDPlan__c from Rental_Apply__c where OPDPlan__c in: cancelIdSet and Status__c <> '取消']; |
| | | // 20230222 ljh DB202301265636 start |
| | | // 20230202 ljh DB202301265636 start |
| | | // List<Rental_Apply__c> RentalList = [select id,Cancel_Reason__c , Loaner_cancel_request__c,OPDPlan__c from Rental_Apply__c where OPDPlan__c in: cancelIdSet and Status__c <> '取消']; |
| | | List<Rental_Apply__c> RentalList = [select id,Cancel_Reason__c , Loaner_cancel_request__c,OPDPlan__c from Rental_Apply__c where OPDPlan__c in: cancelIdSet and Status__c <> '取消' AND Shipment_request_Cnt__c = 0]; |
| | | // 20230202 ljh DB202301265636 end |
| | | // 学会取消批准的时候 发邮件 不上线了 |
| | | // List<Rental_Apply__c> RentalList = new List<Rental_Apply__c>(); |
| | | // List<Rental_Apply__c> RentalCancleAlertList = new List<Rental_Apply__c>(); |
| | | // List<Rental_Apply__c> RentalListTemp = [select id,Cancel_Reason__c , Loaner_cancel_request__c,OPDPlan__c,Shipment_request_Cnt__c from Rental_Apply__c where OPDPlan__c in: cancelIdSet and Status__c <> '取消']; |
| | | // for(Rental_Apply__c ra:RentalListTemp){ |
| | | // if(ra.Shipment_request_Cnt__c == 0){ |
| | | // RentalList.add(ra); |
| | | // }else{ |
| | | // ra.CancelDay__c = Date.today(); |
| | | // RentalCancleAlertList.add(ra); |
| | | // } |
| | | // } |
| | | // 20230222 ljh DB202301265636 end |
| | | Set<String> cancelIdSet1 = new Set<String>(); //手动调回审批 |
| | | SS_Batch_Column_Mapping__c mpdMapping = SS_Batch_Column_Mapping__c.getValues('Rental_Apply_OPD_Cancle'); |
| | | //2021/02/07 liying SWAG-BXVDPJ start |
| | |
| | | for (Rental_Apply__c rtl : RentalList) { |
| | | if(rtl.OPDPlan__c == cpp.CancelOPDPlan__c && cpp.if_HaveRental_Apply__c == false){ |
| | | cancelIdSet1.add(rtl.id); |
| | | System.debug('理由汇总的Map:'+opdMap); |
| | | System.debug('理由:'+(cpp.cancelReasonCombobox__c)); |
| | | System.debug('理由是否相等:'+(opdMap.containsKey(cpp.cancelReasonCombobox__c))); |
| | | // 2021/02/07 liying SWAG-BXVDPJ start |
| | | if(opdMap.containsKey(cpp.cancelReasonCombobox__c)){ |
| | | |
| | | System.debug('取消理由:'+(opdMap.get(cpp.cancelReasonCombobox__c).split(';')[1]) +' \r\n '+'备品取消理由:'+opdMap.get(cpp.cancelReasonCombobox__c).split(';')[0]); |
| | | rtl.Cancel_Reason__c = opdMap.get(cpp.cancelReasonCombobox__c).split(';')[1]; |
| | | rtl.Loaner_cancel_reason__c = opdMap.get(cpp.cancelReasonCombobox__c).split(';')[0]; |
| | | rtl.Loaner_cancel_request__c = opdMap.get(cpp.cancelReasonCombobox__c).split(';')[0]; |
| | |
| | | } |
| | | } |
| | | if (cancelIdSet1.size() > 0) { |
| | | List<Approval.ProcessWorkitemRequest> requests = new List<Approval.ProcessWorkitemRequest> (); |
| | | Map<ID,ProcessInstance> piMap = New Map<ID,ProcessInstance>([Select Id from ProcessInstance where TargetObjectId IN :cancelIdSet1]); |
| | | system.debug('==cancelIdSet1=='+cancelIdSet1); |
| | | for(ProcessInstanceWorkItem wi : [Select Id from ProcessInstanceWorkItem where ProcessInstanceId IN :piMap.keySet()]){ |
| | | Approval.ProcessWorkitemRequest req2 = new Approval.ProcessWorkitemRequest(); |
| | | req2.setAction('Removed'); |
| | | req2.setWorkitemId(wi.Id); |
| | | requests.add(req2); |
| | | List<Approval.ProcessWorkitemRequest> requests = new List<Approval.ProcessWorkitemRequest> (); |
| | | Map<ID,ProcessInstance> piMap = New Map<ID,ProcessInstance>([Select Id from ProcessInstance where TargetObjectId IN :cancelIdSet1]); |
| | | system.debug('==cancelIdSet1=='+cancelIdSet1); |
| | | for(ProcessInstanceWorkItem wi : [Select Id from ProcessInstanceWorkItem where ProcessInstanceId IN :piMap.keySet()]){ |
| | | Approval.ProcessWorkitemRequest req2 = new Approval.ProcessWorkitemRequest(); |
| | | req2.setAction('Removed'); |
| | | req2.setWorkitemId(wi.Id); |
| | | requests.add(req2); |
| | | } |
| | | system.debug('==requests.size()=='+requests.size()); |
| | | if (requests.size() > 0) { |
| | | Approval.ProcessResult[] processResults = null; |
| | | processResults = Approval.process(requests, true); |
| | | system.debug('==调回审批得结果=='+processResults); |
| | | } |
| | | } |
| | | system.debug('==requests.size()=='+requests.size()); |
| | | if (requests.size() > 0) { |
| | | Approval.ProcessResult[] processResults = null; |
| | | processResults = Approval.process(requests, true); |
| | | system.debug('==调回审批得结果=='+processResults); |
| | | if(Rentals.size()>0){ |
| | | update Rentals; |
| | | } |
| | | } |
| | | if(Rentals.size()>0){ |
| | | update Rentals; |
| | | } |
| | | // 20230222 ljh DB202301265636 start |
| | | // 学会取消批准的时候 发邮件 不上线了 |
| | | // if(RentalCancleAlertList.size() > 0 ){ |
| | | // update RentalCancleAlertList; |
| | | // } |
| | | // 20230222 ljh DB202301265636 end |
| | | } |
| | | // SWAG-BUF6J5 20201111 you end |
| | | //2021-08-11 mzy SWAG-C5RAZV 事件——计划 延期 调查 start |
| | |
| | | Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c, |
| | | Deliver_date__c,Bar_Code__c,Product_Type__c, |
| | | Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c, |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c, Arrive_Owner_Work_Location__c |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c, Arrive_Owner_Work_Location__c, |
| | | //add by rentx 2020-10-13 start |
| | | ,ContractNo_text__c |
| | | ContractNo_text__c |
| | | /*,ContractNo__c*/ |
| | | //add by rentx 2020-10-13 end |
| | | FROM Consumable_order_details2__c |
| | |
| | | Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c, |
| | | Deliver_date__c,Bar_Code__c, |
| | | Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c, |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c, |
| | | //add by rentx 2020-10-13 start |
| | | ,ContractNo_text__c |
| | | ContractNo_text__c |
| | | /*,ContractNo__c*/ |
| | | //add by rentx 2020-10-13 end |
| | | FROM Consumable_order_details2__c |
| | |
| | | Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c, |
| | | Deliver_date__c,Bar_Code__c, |
| | | Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c, |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c, |
| | | //add by rentx 2020-10-13 start |
| | | ,ContractNo_text__c |
| | | ContractNo_text__c |
| | | /*,ContractNo__c*/ |
| | | //add by rentx 2020-10-13 end |
| | | FROM Consumable_order_details2__c |
| | |
| | | Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c, |
| | | Deliver_date__c,Bar_Code__c, |
| | | Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c, |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c, |
| | | //add by rentx 2020-10-13 start |
| | | ,ContractNo_text__c |
| | | ContractNo_text__c |
| | | /*,ContractNo__c*/ |
| | | //add by rentx 2020-10-13 end |
| | | FROM Consumable_order_details2__c |
| | |
| | | Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c, |
| | | Deliver_date__c,Bar_Code__c, |
| | | Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c, |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c, |
| | | //add by rentx 2020-10-13 start |
| | | ,ContractNo_text__c |
| | | ContractNo_text__c |
| | | /*,ContractNo__c*/ |
| | | //add by rentx 2020-10-13 end |
| | | FROM Consumable_order_details2__c |
| | |
| | | Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c, |
| | | Deliver_date__c,Bar_Code__c, |
| | | Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c, |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c, |
| | | //add by rentx 2020-10-13 start |
| | | ,ContractNo_text__c |
| | | ContractNo_text__c |
| | | /*,ContractNo__c*/ |
| | | //add by rentx 2020-10-13 end |
| | | FROM Consumable_order_details2__c |
| | |
| | | Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c, |
| | | Deliver_date__c,Bar_Code__c, |
| | | Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c, |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c, |
| | | //add by rentx 2020-10-13 start |
| | | ,ContractNo_text__c |
| | | ContractNo_text__c |
| | | /*,ContractNo__c*/ |
| | | //add by rentx 2020-10-13 end |
| | | FROM Consumable_order_details2__c |
| | |
| | | Consumable_Product__c,Consumable_Product__r.Name, Sterilization_limit__c, |
| | | Deliver_date__c,Bar_Code__c, |
| | | Arrive_date__c,Send_Date__c,Consumable_order_minor__r.Name,Consumable_order_minor__c, |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c, Arrive_Owner_Work_Location__c |
| | | recordtypeid,Consumable_order_minor__r.Arrive_Order__c, Arrive_Owner_Work_Location__c, |
| | | //add by rentx 2020-10-13 start |
| | | ,ContractNo_text__c |
| | | ContractNo_text__c |
| | | /*,ContractNo__c*/ |
| | | //add by rentx 2020-10-13 end |
| | | FROM Consumable_order_details2__c |
| | |
| | | CFDA_Status__c, |
| | | ProductPacking_list_manual__c, |
| | | Report_Product_Approbation__c, |
| | | Report_Product_Expiration__c |
| | | Report_Product_Expiration__c, |
| | | //add by rentx 2020-10-13 start |
| | | ,ContractNo_text__c |
| | | ContractNo_text__c |
| | | /*,ContractNo__c*/ |
| | | //add by rentx 2020-10-13 end |
| | | FROM Consumable_order_details2__c |
| | |
| | | Box_Piece__c, |
| | | RemoveBox_date__c, |
| | | RemoveBox_No__c, |
| | | Bar_Code__c |
| | | Bar_Code__c, |
| | | //add by rentx 2020-10-13 start |
| | | ,ContractNo_text__c |
| | | ContractNo_text__c |
| | | /*,ContractNo__c*/ |
| | | //add by rentx 2020-10-13 end |
| | | FROM Consumable_order_details2__c |
| | |
| | | Box_Piece__c, |
| | | RemoveBox_date__c, |
| | | RemoveBox_No__c, |
| | | Bar_Code__c |
| | | Bar_Code__c, |
| | | //add by rentx 2020-10-13 start |
| | | ,ContractNo_text__c |
| | | ContractNo_text__c |
| | | /*,ContractNo__c*/ |
| | | //add by rebtx 2020-10-13 end |
| | | // tcm start |
| | |
| | | updDetails2.RemoveBox_No__c = null; |
| | | |
| | | // tcm start |
| | | // updDetails2.ContractNo_text__c = detail2tmp.ContractNo__c; |
| | | if (String.isBlank(detail2tmp.Consumable_order_minor__r.ContractNo__c)) { |
| | | updDetails2.ContractNo_text__c= detail2tmp.ContractNo_text__c; |
| | | }else { |
| | | updDetails2.ContractNo_text__c= detail2tmp.Consumable_order_minor__r.ContractNo__c; |
| | | } |
| | | // updDetails2.ContractNo_text__c = detail2tmp.ContractNo__c; |
| | | // tcm end |
| | | |
| | | //通番001のデータの管理単位を盒に戻し、通番をクリア |
| | |
| | | private class CaseHpDeptUpdTriggerTest { |
| | | |
| | | static testMethod void myUnitTest() { |
| | | Oly_TriggerHandler.bypass('ContactTriggerHandler'); |
| | | // レコードタイプ取得 |
| | | RecordType hospitalRec = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | RecordType sectionRec = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 消化科']; |
| | |
| | | Product2 pro5 = new Product2(Name='name05',IsActive=true,Family='SP', |
| | | Fixture_Model_No__c='n05',Serial_Lot_No__c='S/N tracing', |
| | | Fixture_Model_No_T__c = 'n05', |
| | | ProductCode_Ext__c='pc05',Manual_Entry__c=false); |
| | | ProductCode_Ext__c='pc05',Manual_Entry__c=false,Can_Repair__c='可'); |
| | | insert pro5; |
| | | |
| | | Asset assetC1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | |
| | | ChoiceAssetController conTest = new ChoiceAssetController(); |
| | | conTest.init(); |
| | | conTest.searchAsset(); |
| | | conTest.choiceAssetInfoRecordsview[1].check= true; |
| | | conTest.choiceAssetInfoRecordsview[0].check= true; |
| | | conTest.save(); |
| | | } |
| | | // 测试创建QIS |
| | |
| | | private class ConInvoiceListControllerTest |
| | | { |
| | | static testMethod void conInvoiceListTestinit(){ |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证']; |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | |
| | | } |
| | | //检索 |
| | | static testMethod void invoiceCodeSearchTest(){ |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证']; |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | |
| | | /** |
| | | * @description : |
| | | * @author : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | * @group : |
| | | * @last modified on : 04-01-2022 |
| | | * @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | **/ |
| | | public with sharing class ConsumApplySplitController { |
| | | |
| | | /*--------- private ---------*/ |
| | |
| | | // OLY_OCM-583 Start 分单时增加拷贝字段GI本部区分 |
| | | //GI_Diff__c, // GI本部区分 |
| | | Assign_Person__c, // 分配人 |
| | | Is_Special_Rental__c // 是否特殊申请 |
| | | Is_Special_Rental__c, // 是否特殊申请 |
| | | // OLY_OCM-583 End |
| | | //Dennis updated for pi |
| | | Direct_Shippment_Address_Encrypt__c, |
| | | Phone_Number_Encrypt__c |
| | | FROM Consum_Apply__c |
| | | WHERE Id = :this.objId]; |
| | | } |
| | |
| | | ConsumTestDataFactory factory = new ConsumTestDataFactory(); |
| | | factory.setupTestData(); |
| | | factory.selectDetails(2); |
| | | TestDataUtility.CreatePIPolicyConfiguration(); |
| | | } |
| | | // 䓍案中分单 |
| | | static testMethod void testSaveSplitError() { |
| | |
| | | // Check本部是否可以选择 |
| | | // checkbenbu(); |
| | | setRental_Apply_Consum_ApplyId(); |
| | | decryptInsert(newList);//Dennis updated for pi |
| | | } |
| | | protected override void beforeUpdate() { |
| | | checkOneConsumApplyForQIS(); |
| | |
| | | update raess; |
| | | } |
| | | } |
| | | //Dennis updated for pi start |
| | | public static void decryptInsert(List<Consum_Apply__c> newList){ |
| | | if(!system.isFuture()){ |
| | | List<Consum_Apply__c> fendanList = new List<Consum_Apply__c>(); |
| | | for(Consum_Apply__c ra : newList){ |
| | | if(ra.Old_Consum_Apply__c != null){ |
| | | fendanList.add(ra); |
| | | } |
| | | } |
| | | |
| | | if(fendanList.size() == 0){ |
| | | system.debug('no need split'); |
| | | return; |
| | | } |
| | | |
| | | //zhj MEBG新方案改造 2022-12-01 start |
| | | //decryptInsertFuture(JSON.serialize(fendanList)); |
| | | Map<String,PIHelper.PIIntegration> staticResource = new Map<String,PIHelper.PIIntegration>(); |
| | | staticResource.put('Consum_Apply__c',PIHelper.getPIIntegrationInfo('Consum_Apply__c')); |
| | | Map<String, Map<String, PI_Field_Policy_Detail__c>> mmsp = new Map<String, Map<String,PI_Field_Policy_Detail__c>>(); |
| | | for (String key : staticResource.keySet()) { |
| | | mmsp.put(key, new Map<String,PI_Field_Policy_Detail__c>()); |
| | | for (PI_Field_Policy_Detail__c detail : staticResource.get(key).PIDetails) { |
| | | mmsp.get(key).put(detail.SF_Field_API_Name__c, detail); |
| | | } |
| | | } |
| | | System.debug('mmsp = ' + mmsp); |
| | | |
| | | |
| | | List<AWSServiceTool2V2.EncryptPushRequestBody> EncryptPushList = new List<AWSServiceTool2V2.EncryptPushRequestBody>(); |
| | | for(Consum_Apply__c ac : fendanList){ |
| | | Consum_Apply__c oldAc = [select id,AWS_Data_Id__c from Consum_Apply__c where id=:ac.Old_Consum_Apply__c]; |
| | | AWSServiceTool2V2.EncryptPushRequestBody EncryptPush = new AWSServiceTool2V2.EncryptPushRequestBody(); |
| | | EncryptPush.dataId = ac.AWS_Data_Id__c != null ?ac.AWS_Data_Id__c:''; |
| | | EncryptPush.sfRecordId = ac.Id; |
| | | EncryptPush.fieldsMapping = new Map<String, List<AWSServiceTool2V2.EncryptPushRes>>(); |
| | | List<AWSServiceTool2V2.EncryptPushRes> resList = new List<AWSServiceTool2V2.EncryptPushRes>(); |
| | | AWSServiceTool2V2.EncryptPushRes res= new AWSServiceTool2V2.EncryptPushRes(); |
| | | res.isQueryDb = true; |
| | | res.value = ''; |
| | | res.table = staticResource.get('Consum_Apply__c').awsTableName; |
| | | //res.dataId = ac.Old_Consum_Apply__r.AWS_Data_Id__c; |
| | | res.dataId = oldAc.AWS_Data_Id__c; |
| | | res.field = mmsp.get('Consum_Apply__c').get('direct_shippment_address__c').AWS_Field_API__c; |
| | | resList.add(res); |
| | | |
| | | List<AWSServiceTool2V2.EncryptPushRes> resList2 = new List<AWSServiceTool2V2.EncryptPushRes>(); |
| | | AWSServiceTool2V2.EncryptPushRes res2= new AWSServiceTool2V2.EncryptPushRes(); |
| | | res2.isQueryDb = true; |
| | | res2.value = ''; |
| | | res2.table = staticResource.get('Consum_Apply__c').awsTableName; |
| | | //res2.dataId = ac.Old_Consum_Apply__r.AWS_Data_Id__c; |
| | | res2.dataId = oldAc.AWS_Data_Id__c; |
| | | res2.field = mmsp.get('Consum_Apply__c').get('Phone_number__c').AWS_Field_API__c; |
| | | resList2.add(res2); |
| | | |
| | | EncryptPush.fieldsMapping.put(mmsp.get('Consum_Apply__c').get('direct_shippment_address__c').AWS_Field_API__c, resList); |
| | | EncryptPush.fieldsMapping.put(mmsp.get('Consum_Apply__c').get('Phone_number__c').AWS_Field_API__c, resList2); |
| | | EncryptPushList.add(EncryptPush); |
| | | } |
| | | System.debug('EncryptPushListdataId = ' + JSON.serialize(EncryptPushList[0].dataId)); |
| | | System.debug('EncryptPushListsfRecordId = ' + JSON.serialize(EncryptPushList[0].sfRecordId)); |
| | | System.debug('EncryptPushListfieldsMapping = ' + JSON.serialize(EncryptPushList[0].fieldsMapping)); |
| | | System.debug('EncryptPushList = ' + JSON.serialize(EncryptPushList)); |
| | | AwsServiceTool2V2.EncryptPushFutureV2(Json.serialize(EncryptPushList),Json.serialize(fendanList), 'Consum_Apply__c'); |
| | | //zhj MEBG新方案改造 2022-12-01 end |
| | | } |
| | | } |
| | | |
| | | @future(callout=true) |
| | | public static void decryptInsertFuture(string json_list){ |
| | | decryptInsertCore(json_list); |
| | | } |
| | | |
| | | // List<Consum_Apply__c> temps = [select id,AWS_Data_Id__c,name, direct_shippment_address__c, Direct_Shippment_Address_Encrypt__c, Phone_number__c, Phone_Number_Encrypt__c,CreatedDate from Consum_Apply__c where AWS_Data_Id__c != null order by CreatedDate desc limit 2]; |
| | | public static void decryptInsertCore(string json_list){ |
| | | system.debug('enter decryptInsertCore'); |
| | | //调用滨璜接口更新 |
| | | PIHelper.PIIntegration staticResource = PIHelper.getPIIntegrationInfo('Consum_Apply__c'); |
| | | system.debug('staticResource.token='+staticResource.token); |
| | | if(String.isBlank(staticResource.token)){ |
| | | System.debug('获取aws token 失败'); |
| | | return; |
| | | } |
| | | List<Consum_Apply__c> newList = (List<Consum_Apply__c>)Json.deserialize(json_list, List<Consum_Apply__c>.class); |
| | | Map<Id,Consum_Apply__c> newMap = new Map<Id,Consum_Apply__c>(newList); |
| | | List<Map<string,object>> lmso = new List<Map<string,object>>(); |
| | | for(Consum_Apply__c ra : newList){ |
| | | Map<string,object> mso = new Map<string,object>(); |
| | | |
| | | /*if(!string.isBlank(ra.AWS_Data_Id__c)){ |
| | | continue; |
| | | }*/ |
| | | for(PI_Field_Policy_Detail__c detail : staticResource.PIDetails){ |
| | | if(ra.isSet(detail.SF_Field_API_Name__c)){ |
| | | mso.put(detail.AWS_Field_API__c,ra.get(detail.SF_Field_API_Name__c)); |
| | | mso.put(detail.AWS_Encrypted_Field_API__c,ra.get(detail.SF_Field_Encrypted_API__c)); |
| | | } |
| | | } |
| | | mso.put('sfRecordId',ra.Id); |
| | | lmso.add(mso); |
| | | } |
| | | |
| | | if(lmso.size()==0){ |
| | | system.debug('lmso.size()='+lmso.size()); |
| | | return; |
| | | } |
| | | string payload = Json.serialize(lmso); |
| | | system.debug('payload='+payload); |
| | | String awsApi = staticResource.viewUnifiedContactUrl; |
| | | NFMUtil.response response = NFMUtil.sendToPiAWS(payload, awsApi,staticResource.token); |
| | | system.debug(response); |
| | | Map<string,object> res_obj = (Map<string,object>)Json.deserializeUntyped(response.responseBody); |
| | | if(res_obj == null || !res_obj.containsKey('object') ){ |
| | | System.debug('res_obj == null || !res_obj.containsKey(\'object\')'); |
| | | return; |
| | | } |
| | | |
| | | List<object> objList = (List<object>)res_obj.get('object'); |
| | | if(objList == null){ |
| | | System.debug('objList == null'); |
| | | return; |
| | | } |
| | | |
| | | List<Consum_Apply__c> updateList = new List<Consum_Apply__c>(); |
| | | for(object obj : objList){ |
| | | Map<string,object> obj_map = (Map<string,object>)obj; |
| | | string sfRecordId = null; |
| | | string dataId = null; |
| | | if(obj_map.containsKey('sfRecordId')){ |
| | | sfRecordId = string.valueOf(obj_map.get('sfRecordId')); |
| | | }else{ |
| | | system.debug('obj_map.containsKey(\'sfRecordId\')='+obj_map.containsKey('sfRecordId')); |
| | | continue; |
| | | } |
| | | |
| | | if(obj_map.containsKey('dataId')){ |
| | | dataId = string.valueOf(obj_map.get('dataId')); |
| | | }else{ |
| | | system.debug('obj_map.containsKey(\'dataId\')='+obj_map.containsKey('dataId')); |
| | | continue; |
| | | } |
| | | |
| | | |
| | | if(newMap.containsKey(sfRecordId)){ |
| | | Consum_Apply__c ra = newMap.get(sfRecordId); |
| | | ra.AWS_Data_Id__c = dataId; |
| | | updateList.add(ra); |
| | | }else{ |
| | | system.debug('newMap.containsKey('+sfRecordId+')='+newMap.containsKey(sfRecordId)); |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | system.debug('updateList.size='+updateList.size()); |
| | | if(updateList.size()>0){ |
| | | update updateList; |
| | | } |
| | | |
| | | } |
| | | //Dennis updated for pi end |
| | | |
| | | // From ConsumApplyApprovalProcess.trigger TODO test |
| | | private void approvalCheck() { |
| | |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | } |
| | | } |
| | |
| | | global Integer failedCount = 0; // 処理失敗件数 |
| | | private Date td = Date.today(); |
| | | |
| | | Boolean IsNeedExecute = false; // 2021-03-05 mzy WLIG-BYHD79 SFDC环境batch合并调查 是否符合执行条件 |
| | | |
| | | // 2021-03-05 mzy WLIG-BYHD79 SFDC环境batch合并调查 start |
| | | global ConsumAutoCancelRequestBatch() { |
| | | } |
| | | global ConsumAutoCancelRequestBatch(Boolean NeedExecute) { |
| | | this.IsNeedExecute = NeedExecute; |
| | | } |
| | | // 2021-03-05 mzy WLIG-BYHD79 SFDC环境batch合并调查 end |
| | | |
| | | /** |
| | | * startには、queryを実行、耗材备品申請を検索 |
| | | */ |
| | |
| | | // add by youc 2021-12-03 start 设置大码,小码 |
| | | // 画面里直接可以输入的項目 List 在字段集里也添加了 设置读写 |
| | | public override List<String> getWritableColumnFieldList() { |
| | | return new List<String>{'EquipmentManagementCode__c','ManagementCode__c'}; |
| | | return new List<String>{'EquipmentManagementCode__c','ManagementCode__c','boxbarcodeforReceipt__c'}; |
| | | } |
| | | // getObjName 连 getOriginObjName 的 FK |
| | | public override String getFKColumnField() { |
| | |
| | | Map<Id,List<String>> bianmaMap1 = new Map<Id,List<String>>();//update wangweipeng 2022/02/21 start |
| | | //add by rentx 2021-10-22 end 设置小码 设置管理编码 |
| | | |
| | | Map<Id,List<String>> hzMap = new Map<Id,List<String>>(); |
| | | Map<Id,List<String>> hzMap1 = new Map<Id,List<String>>(); |
| | | |
| | | for (WrapperInfo wi : viewList) { |
| | | if (!wi.check) continue; |
| | | Consum_Apply_Equipment_Set_Detail__c caesd = (Consum_Apply_Equipment_Set_Detail__c)wi.sobj; |
| | |
| | | } |
| | | system.debug('==='+ xiaomaMap+'==bianmaMap=='+bianmaMap); |
| | | //add by rentx 2021-10-22 end 设置小码 |
| | | if (!hzMap.containsKey(caesd.Asset__c) && caesd.boxbarcodeforReceipt__c != null) { |
| | | hzMap.put(caesd.Asset__c, caesd.boxbarcodeforReceipt__c.split(',')); |
| | | } |
| | | if (!hzMap1.containsKey(caesd.Asset__c) && caesd.boxbarcodeforReceipt__c != null) { |
| | | hzMap1.put(caesd.Asset__c, caesd.boxbarcodeforReceipt__c.split(',')); |
| | | } |
| | | system.debug('=zheli3=='+ hzMap+'==hezi=='+caesd.boxbarcodeforReceipt__c); |
| | | } |
| | | List<Consum_Apply_Equipment_Set_Detail__c> updList = new List<Consum_Apply_Equipment_Set_Detail__c>(); |
| | | system.debug('useCaesdList=='+useCaesdList.size()); |
| | |
| | | //获取该保有设备对应的小码集合 |
| | | List<String> tempArr = xiaomaMap.get(caesd.Asset__c); |
| | | List<String> heArr = bianmaMap.get(caesd.Asset__c); |
| | | System.debug('-------------11111-'+heArr); |
| | | List<String> hzArr = hzMap.get(caesd.Asset__c); |
| | | System.debug('-------------11111-'+heArr+'==hzArr=='+hzArr); |
| | | system.debug('tempArr0'+tempArr); |
| | | if (tempArr != null && tempArr.size() > 0) { |
| | | for (Integer i = 0; i < tempArr.size(); i++) { |
| | |
| | | system.debug('zheli0'+caesd.EquipmentManagementCode__c); |
| | | //update wangweipeng 2022/02/21 start |
| | | caesd.ManagementCode__c = heArr[i]; |
| | | caesd.boxbarcodeforReceipt__c = hzArr[i]; |
| | | //caesd.ManagementCode__c = bianmaMap.containsKey(caesd.Asset__c) ? bianmaMap.get(caesd.Asset__c) : ''; |
| | | //update wangweipeng 2022/02/21 end |
| | | tempArr[i] = 'null'; |
| | | heArr[i] = 'null'; |
| | | hzArr[i] = 'null'; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(String.isNotBlank(caesd.ManagementCode__c)){ |
| | | caesd.boxbarcodeforReceipt__c = caesd.Barcode_F__c + '250' + caesd.ManagementCode__c; |
| | | }else{ |
| | | caesd.boxbarcodeforReceipt__c = ''; |
| | | } |
| | | //if(String.isNotBlank(caesd.ManagementCode__c)){ |
| | | // caesd.boxbarcodeforReceipt__c = caesd.Barcode_F__c + '250' + caesd.ManagementCode__c; |
| | | //}else{ |
| | | // caesd.boxbarcodeforReceipt__c = ''; |
| | | //} |
| | | //设置"管理编码" |
| | | /** |
| | | if(!bianmaMap.containsKey(caesd.Asset__c)){ |
| | |
| | | } |
| | | if (bianmaMap1.containsKey(wiInfo.Asset__c)) { |
| | | wiInfo.ManagementCode__c = String.join(bianmaMap1.get(wiInfo.Asset__c), ','); |
| | | } |
| | | if (hzMap1.containsKey(wiInfo.Asset__c)) { |
| | | wiInfo.boxbarcodeforReceipt__c = String.join(hzMap1.get(wiInfo.Asset__c), ','); |
| | | } |
| | | } |
| | | //add by youc 2021-12-06 保存之后,再次设置小码 显示页面 end |
| | |
| | | caesd.Inspection_Cnt_Jia__c = null; |
| | | caesd.EquipmentManagementCode__c = null; //add by youc 2022-02-27 |
| | | caesd.ManagementCode__c = null;//add by youc 2022-02-27 |
| | | caesd.boxbarcodeforReceipt__c = null; |
| | | clearAssetId.add(caesd.Asset__c); |
| | | } |
| | | } |
| | |
| | | caesd.Shipment_Saved_Flg__c = false; |
| | | caesd.EquipmentManagementCode__c = null; //add by youc 2022-02-27 |
| | | caesd.ManagementCode__c = null;//add by youc 2022-02-27 |
| | | caesd.boxbarcodeforReceipt__c = null; |
| | | updList.add(caesd); |
| | | } |
| | | } |
| | |
| | | //add by wangweipeng 2022-02-21 start 添加盒 |
| | | Map<Id,List<String>> recordforHeMap = new Map<Id,List<String>>(); |
| | | //add by wangweipeng 2022-02-21 end 添加盒 |
| | | |
| | | Map<Id,List<String>> recordforBoxMap = new Map<Id,List<String>>(); |
| | | |
| | | Map<Id, Integer> cntMap = new Map<Id, Integer>(); |
| | | Map<Id, Integer> cntShipmentReqMap = new Map<Id, Integer>(); |
| | | Map<Id, Boolean> hasShipment = new Map<Id, Boolean>(); |
| | |
| | | } |
| | | //add by wangweipeng 2022-02-21 end 添加盒 |
| | | |
| | | |
| | | if (caesd.boxbarcodeforReceipt__c != null && caesd.boxbarcodeforReceipt__c != '') { |
| | | if (recordforBoxMap.containsKey(caesd.Asset__c) == false) { |
| | | recordforBoxMap.put(caesd.Asset__c, new List<String>()); |
| | | } |
| | | recordforBoxMap.get(caesd.Asset__c).add(caesd.boxbarcodeforReceipt__c); |
| | | } |
| | | system.debug('zheli1'+caesd.boxbarcodeforReceipt__c + 'recordforBoxMap==='+recordforBoxMap); |
| | | |
| | | if (caesd.Shipment_Saved_Flg__c == true) { |
| | | Integer cnt = cntMap.containsKey(caesd.Asset__c) ? (cntMap.get(caesd.Asset__c) + 1) : 1; |
| | | cntMap.put(caesd.Asset__c, cnt); |
| | |
| | | } |
| | | //add by wangweipeng 2022-02-21 end 添加盒 |
| | | |
| | | |
| | | if (recordforBoxMap.containsKey(wiInfo.Asset__c)) { |
| | | //设置小码 |
| | | wiInfo.boxbarcodeforReceipt__c = String.join(recordforBoxMap.get(wiInfo.Asset__c), ','); |
| | | } |
| | | system.debug('zheli2'+wiInfo.boxbarcodeforReceipt__c); |
| | | |
| | | WrapperInfo wi = new WrapperInfo(wiInfo, myComponentController); |
| | | wi.additionalInfoMap.put('Product_Serial_No_F__c', wiInfo.Product_Serial_No_F__c); |
| | | if (hasShipment.containsKey(wiInfo.Asset__c) && hasShipment.get(wiInfo.Asset__c)) { |
| | |
| | | dep.Department_Class__c = strategicDep.Id; |
| | | dep.Hospital__c = hospital.Id; |
| | | insert dep; |
| | | |
| | | /* |
| | | Contact contact2 = new Contact(); |
| | | contact2.AccountId = dep.Id; |
| | | contact2.FirstName = '責任者'; |
| | | contact2.LastName = 'test1经销商'; |
| | | insert contact2; |
| | | insert contact2;*/ |
| | | |
| | | OlympusCalendar__c oc = new OlympusCalendar__c(); |
| | | oc.Date__c = System.Today(); |
| | |
| | | + String.join(assetFieldApiList, ',') |
| | | + (assetFieldApiList.size() > 0 ? ',' : '') |
| | | + String.join(receivingNoteFieldApiList, ',') |
| | | + ',AWS_Data_Id__c,Trial_User_Encrypt__c' |
| | | + ',AWS_Data_Id__c' //zhj 新方案改造 2022-12-30 删除Trial_User_Encrypt__c |
| | | + ' FROM Consum_Apply_Equipment_Set_Detail__c ' |
| | | + ' WHERE Consum_Apply_Equipment_Set__r.Consum_Apply__c = \'' + rn.Id + '\'' + wher |
| | | + ' AND (Cancel_Select__c = false OR NG_Select_Again__c = true)' |
| | |
| | | // dataConfirmation = rnd1.DataConfirmation__c; |
| | | lineNo = lineNo1 + 1; |
| | | canChangeField = 'Show_demonstration__c, Operation_Type__c, Consum_Start_Date__c'; |
| | | canChangeField += ',AWS_Data_Id__c, Case_OR_animal_organ__c, Trial_User__c,Trial_User_Encrypt__c, Follower_User__c, Spare__c, Comment__c, Degree_Of_Importance__c'; |
| | | canChangeField += ',AWS_Data_Id__c, Case_OR_animal_organ__c, Trial_User__c, Follower_User__c, Spare__c, Comment__c, Degree_Of_Importance__c'; //zhj 新方案改造 2022-12-30 删除Trial_User_Encrypt__c |
| | | |
| | | haveAsset = String.isNotBlank(rnd1.Asset__c); |
| | | } |
| | |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | } |
| | | } |
| | |
| | | //2021-04-21 mzy add SFDC点检报告更新逻辑修改 start |
| | | if(!Test.isRunningTest() &&IsNeedExecute==true){ |
| | | //batch里调用下一个batch时,希望跟原有的Schedule里面传的条数保持一致 |
| | | Id execBTId = Database.executebatch(new UpdateInspectionReportAssetBatch(true),100); |
| | | Id execBTId = Database.executebatch(new UpdateInspectionReportAssetBatch(true),10); |
| | | } |
| | | //2021-04-21 mzy add SFDC点检报告更新逻辑修改 end |
| | | |
| | |
| | | public PageBean pageB {get; set;} |
| | | public Boolean showSelectRnsButton{get;set;} |
| | | private String case_OR_animal_organLabel{get;set;} |
| | | public String staticResource {get; set;} |
| | | public String rowListString{set;get;} |
| | | |
| | | public ConsumTrialUpdateController() { |
| | | parId = System.currentPageReference().getParameters().get('parId'); |
| | | canEdit = System.currentPageReference().getParameters().get('canedit') == 'true'; |
| | | PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo('Consum_Apply_Equipment_Set_Detail__c'); |
| | | staticResource = JSON.serialize(piIntegration); |
| | | } |
| | | |
| | | public void init() { |
| | |
| | | List<Consum_Apply__c> rnList = [SELECT Id |
| | | // , DateOfDelivery__c |
| | | // , ReceivingNoteNo__c |
| | | , Status__c |
| | | , AWS_Data_Id__c,Status__c |
| | | // , Asset_loaner_category__c |
| | | , RA_Status__c |
| | | , HP_received_sign_rich__c |
| | |
| | | receivingNoteFieldApiList.addAll(receivingNoteFieldApiSet); |
| | | setEditable(); |
| | | pageB = new PageBean(rnList[0], assetFieldApiList, receivingNoteFieldApiList, isCenter); |
| | | system.debug('pageB.rowBList = ' + pageB.rowBList); |
| | | List<rowListStr> r1 = new List<rowListStr>(); |
| | | for (RowBean rowB : pageB.rowBList) { |
| | | rowListStr r2 = new rowListStr(rowB.rnd.AWS_Data_Id__c,rowB.rnd.Id); |
| | | r1.add(r2); |
| | | } |
| | | rowListString = JSON.serialize(r1); |
| | | } |
| | | catch (Exception e) { |
| | | ApexPages.addMessages(e); |
| | |
| | | + String.join(assetFieldApiList, ',') |
| | | + (assetFieldApiList.size() > 0 ? ',' : '') |
| | | + String.join(receivingNoteFieldApiList, ',') |
| | | + ',AWS_Data_Id__c' |
| | | + ' FROM Consum_Apply_Equipment_Set_Detail__c ' |
| | | + ' WHERE Consum_Apply_Equipment_Set__r.Consum_Apply__c = \'' + rn.Id + '\'' + wher |
| | | + ' AND (Cancel_Select__c = false OR NG_Select_Again__c = true)' |
| | |
| | | } |
| | | } |
| | | |
| | | public class rowListStr{ |
| | | public String AWSDataId {get; set;} |
| | | public String Id {get; set;} |
| | | public rowListStr() { |
| | | AWSDataId = ''; |
| | | Id = ''; |
| | | } |
| | | |
| | | public rowListStr(String l, String v) { |
| | | AWSDataId = l; |
| | | Id = v; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | private class ConsumTrialUpdateControllerTest { |
| | | // 已出库 |
| | | @testSetup static void setupTestData(){ |
| | | TestDataUtility.CreatePIPolicyConfiguration('Consum_Apply_Equipment_Set_Detail__c'); |
| | | ConsumTestDataFactory factory = new ConsumTestDataFactory(); |
| | | factory.eachStepUpdate = false; |
| | | factory.setupTestData(); |
| | |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | Profile prof = [select Id from Profile where Name ='系统管理员']; |
| | | Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证']; |
| | | |
| | | StaticParameter.ConsumableAssetHanderTrigger = true; |
| | | |
| | |
| | | query += 'OCM_dept_category__c,ShareFlag__c,Job_Category__c,Strategic_userFSEGI__c,hospitalLeaderGI__c,Strategic_userFSESP__c,hospitalLeaderSP__c, '; |
| | | query += 'hospitalLeaderGIchange__c,hospitalLeaderSPchange__c, OPDPlan__r.Status__c,Shippment_ng_num__c,ProducLeader_Share__c, '; |
| | | query += ' Hospital__r.GI_Product_Leader__c,Hospital__r.BF_Product_Leader__c,Hospital__r.GS_Product_Leader__c,Hospital__r.URO_Produc_Leader__c,Hospital__r.GYN_Product_Leader__c,Hospital__r.ENT_Product_Leader__c,Hospital__r.ET_Product_Leader__c '; |
| | | query += ' FROM Rental_Apply__c WHERE (ShareFlag__c = true or hospitalLeaderGIchange__c = true or hospitalLeaderSPchange__c = true or (Shippment_ng_num__c = 0 and OPDPlan__c != null and OPDPlan__r.Status__c IN (\'完毕未报告\',\'待提交报告\'))) AND Strategic_dept__c= \''+strategicDept+'\' ORDER BY Strategic_dept__c'; |
| | | query += ' FROM Rental_Apply__c WHERE (ShareFlag__c = true or hospitalLeaderGIchange__c = true or hospitalLeaderSPchange__c = true or (Shippment_ng_num__c = 0 and OPDPlan__c != null and OPDPlan__r.Status__c IN (\'完毕未报告\',\'待提交报告\'))) AND Strategic_dept__c = \''+strategicDept+'\' ORDER BY Strategic_dept__c'; |
| | | } |
| | | //update wangweipeng 新增备品的产品担当人共享 2021/10/15 end |
| | | //update by rentx 2020-11-16 SFDC-BVA5VJ end |
| | |
| | | update iflog; |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | //注释 by rentx 2021-01-04 SFDC-BWQ3MX |
| | | /*global void execute(Database.BatchableContext BC, list<Sobject> scope) { |
| | | |
| | | //add by rentx 2020-11-17 start |
| | | List<Rental_Apply__c> ratList = new List<Rental_Apply__c>(); |
| | | List<Rental_Apply__c> raoList = new List<Rental_Apply__c>(); |
| | | //add by rentx 2020-11-17 end |
| | | |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Rental_Apply__c> RentalApply) { |
| | | // 20220412 ljh 整理 start |
| | | // ShareFlag__c hospitalLeaderGIchange__c hospitalLeaderSPchange__c 为真的时候空更新即可 |
| | | Map<String,Rental_Apply__c> raMap = new Map<String,Rental_Apply__c>(); |
| | | // 20220412 ljh 整理 end |
| | | //共享权限变更 |
| | | List<Rental_Apply__c> RentalApply = new List<Rental_Apply__c>(); |
| | | List<Rental_Apply__c> raList = new List<Rental_Apply__c>(); |
| | | List<Rental_Apply__Share> delStrategList = new List<Rental_Apply__Share>(); |
| | | List<Rental_Apply__Share> addStrategList = new List<Rental_Apply__Share>(); |
| | | List<String> ParentIdList = new List<String>(); |
| | | List<String> UserOrGroupIdList = new List<String>(); |
| | | Map<String, String> PUMap = new Map<String, String>(); |
| | | |
| | | List<String> UserIDList = new List<String>(); |
| | | List<String> IsActiveNoList = new List<String>(); |
| | | RentalApply = scope; |
| | | if(RentalApply.size()>0){ |
| | | //用户未启用无法插入到共享表 start |
| | | for(Rental_Apply__c ra:RentalApply){ |
| | | if(ra.Strategic_user__c !=null){ |
| | | UserIDList.add(ra.Strategic_user__c); |
| | | } |
| | | //add by rentx 2020-11-27 |
| | | if (ra.Strategic_userFSEGI__c != null) { |
| | | UserIDList.add(ra.Strategic_userFSEGI__c); |
| | | } |
| | | if (ra.Strategic_userFSESP__c != null) { |
| | | UserIDList.add(ra.Strategic_userFSESP__c); |
| | | |
| | | } |
| | | //add by rentx 2020-11-27 |
| | | |
| | | } |
| | | for(User user:[Select Id,Name,IsActive From User WHERE Id in:UserIDList]){ |
| | | //未启用 |
| | | if(!user.IsActive){ |
| | | String userId = (String)user.Id; |
| | | userId = userId.substring(0,15); |
| | | IsActiveNoList.add(userId); |
| | | } |
| | | } |
| | | //用户未启用无法插入到共享表 end |
| | | for(Rental_Apply__c ra:RentalApply){ |
| | | //删除原来的共享 |
| | | if(String.isNotBlank(ra.ShareStrategicUser__c)){ |
| | | PUMap.put(ra.Id,ra.ShareStrategicUser__c); |
| | | ParentIdList.add(ra.Id); |
| | | UserOrGroupIdList.add(ra.ShareStrategicUser__c); |
| | | } |
| | | //增加新的 |
| | | //所有者还有服务服务部审批人相同不用加 用户未启用无法插入到共享表 |
| | | if(ra.Strategic_user__c !=null&& !IsActiveNoList.contains(ra.Strategic_user__c)){ |
| | | if( |
| | | ((ra.Approver_of_Service_Department__c !=null&&!ra.Strategic_user__c.equals(ra.Approver_of_Service_Department__c))||ra.Approver_of_Service_Department__c ==null) |
| | | &&!ra.Strategic_user__c.equals(ra.OwnerId)){ |
| | | Rental_Apply__Share ras = new Rental_Apply__Share( |
| | | RowCause = 'Manual', |
| | | ParentId = ra.Id, |
| | | UserOrGroupId = ra.Strategic_user__c, |
| | | AccessLevel = 'read' |
| | | ); |
| | | |
| | | addStrategList.add(ras); |
| | | } |
| | | Rental_Apply__c r_a = new Rental_Apply__c(); |
| | | r_a.Id = ra.Id; |
| | | r_a.ShareStrategicUser__c = ra.Strategic_user__c; |
| | | raList.add(r_a); |
| | | } |
| | | |
| | | //add by rentx 2020-11-16 SFDC-BVA5VJ start |
| | | //判断战略科室 直接删了再加 |
| | | String dept = ra.OCM_dept_category__c; |
| | | if ((ra.Job_Category__c =='销售服务') && (dept.equals('消化科') ||dept.equals('呼吸科') || dept.equals('ET') || dept.equals('其他')) |
| | | && ra.Strategic_userFSEGI__c != null && !IsActiveNoList.contains(ra.Strategic_userFSEGI__c) && !ra.OwnerId.equals(ra.Strategic_userFSEGI__c)) { |
| | | //加入共享 |
| | | Rental_Apply__Share ras = makeData(ra.Id,ra.Strategic_userFSEGI__c); |
| | | addStrategList.add(ras); |
| | | //删除原来的共享 |
| | | PUMap.put(ra.Id,ra.hospitalLeaderGI__c); |
| | | ParentIdList.add(ra.Id); |
| | | UserOrGroupIdList.add(ra.hospitalLeaderGI__c); |
| | | if (String.isNotBlank(ra.hospitalLeaderSP__c)) { |
| | | PUMap.put(ra.Id,ra.hospitalLeaderSP__c); |
| | | UserOrGroupIdList.add(ra.hospitalLeaderSP__c); |
| | | } |
| | | //更新字段 |
| | | Rental_Apply__c rac = new Rental_Apply__c(); |
| | | rac.Id = ra.Id; |
| | | rac.hospitalLeaderGI__c = ra.Strategic_userFSEGI__c; |
| | | ratList.add(rac); |
| | | |
| | | } |
| | | if ((ra.Job_Category__c =='销售服务') && |
| | | (dept.equals('普外科') ||dept.equals('泌尿科') || dept.equals('妇科') || dept.equals('耳鼻喉科') || dept.equals('其他')) |
| | | && ra.Strategic_userFSESP__c != null && !IsActiveNoList.contains(ra.Strategic_userFSESP__c) && !ra.OwnerId.equals(ra.Strategic_userFSESP__c)) { |
| | | //加入共享 |
| | | Rental_Apply__Share ras = makeData(ra.Id,ra.Strategic_userFSESP__c); |
| | | addStrategList.add(ras); |
| | | //删除原来的共享 |
| | | PUMap.put(ra.Id,ra.hospitalLeaderSP__c); |
| | | ParentIdList.add(ra.Id); |
| | | UserOrGroupIdList.add(ra.hospitalLeaderSP__c); |
| | | if (String.isNotBlank(ra.hospitalLeaderGI__c)) { |
| | | PUMap.put(ra.Id,ra.hospitalLeaderGI__c); |
| | | UserOrGroupIdList.add(ra.hospitalLeaderGI__c); |
| | | } |
| | | //更新字段 |
| | | Rental_Apply__c rac = new Rental_Apply__c(); |
| | | rac.Id = ra.Id; |
| | | rac.hospitalLeaderSP__c = ra.Strategic_userFSESP__c; |
| | | raoList.add(rac); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | //删除原来的共享 |
| | | delStrategList = [SELECT Id,ParentId,UserOrGroupId FROM Rental_Apply__Share WHERE RowCause ='Manual' AND ParentId in :ParentIdList AND UserOrGroupId in :UserOrGroupIdList]; |
| | | for(Integer m=0; m<delStrategList.size(); m++){ |
| | | if(String.isBlank(PUMap.get(delStrategList[m].ParentId))){ |
| | | delStrategList.remove(m); |
| | | } |
| | | } |
| | | if(delStrategList.size()>0){ |
| | | delete delStrategList; |
| | | } |
| | | //增加 |
| | | if (addStrategList.size() > 0) { |
| | | insert addStrategList; |
| | | } |
| | | //更新备品借出 |
| | | if(raList.size()>0){ |
| | | update raList; |
| | | } |
| | | |
| | | //更新备品借出 -- hospleaderGI字段 |
| | | if (ratList.size() > 0) { |
| | | update ratList; |
| | | } |
| | | //更新备品借出 -- hospleaderSP字段 |
| | | if (raoList.size() > 0) { |
| | | update raoList; |
| | | } |
| | | } |
| | | }*/ |
| | | //update by rentx 2021-01-04 SFDC-BWQ3MX |
| | | global void execute(Database.BatchableContext BC, list<Sobject> scope) { |
| | | //原来的是将战略科室所有人加入到共享表中 现在需要将GI/SP主担当也加入并且删除之前的共享 |
| | | //add by rentx 2020-11-17 start |
| | | List<Rental_Apply__c> ratList = new List<Rental_Apply__c>(); |
| | | List<Rental_Apply__c> raoList = new List<Rental_Apply__c>(); |
| | | //add by rentx 2020-11-17 end |
| | | |
| | | //共享权限变更 |
| | | List<Rental_Apply__c> RentalApply = new List<Rental_Apply__c>(); |
| | | List<Rental_Apply__c> raList = new List<Rental_Apply__c>(); |
| | | List<Rental_Apply__Share> delStrategList = new List<Rental_Apply__Share>(); |
| | | List<Rental_Apply__Share> addStrategList = new List<Rental_Apply__Share>(); |
| | | List<String> ParentIdList = new List<String>(); |
| | | List<String> UserOrGroupIdList = new List<String>(); |
| | | Map<String, String> PUMap = new Map<String, String>(); |
| | | |
| | | List<String> UserIDList = new List<String>(); |
| | | List<String> IsActiveNoList = new List<String>(); |
| | | |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/15 start |
| | | //收集产品担当人中文名 |
| | | List<String> productLeaderNameList = new List<String>(); |
| | |
| | | //新增借出备品申请产品担当共享人 |
| | | List<Rental_Apply__Share> insRentalApplyShare = new List<Rental_Apply__Share>(); |
| | | //修改借出备品申请的产品担当人共享记录 |
| | | List<Rental_Apply__c> updateRac = new List<Rental_Apply__c>(); |
| | | // List<Rental_Apply__c> updateRac = new List<Rental_Apply__c>(); |
| | | //获取所有满足条件的备品id |
| | | List<String> raIdList = new List<String>(); |
| | | //获取备品的产品担当人共享数据 |
| | | Map<String,List<Rental_Apply__Share>> raShareMap = new Map<String,List<Rental_Apply__Share>>(); |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/15 end |
| | | |
| | | |
| | | RentalApply = scope; |
| | | System.debug('zheli000'); |
| | | if(RentalApply.size()>0){ |
| | | //用户未启用无法插入到共享表 start |
| | | for(Rental_Apply__c ra:RentalApply){ |
| | | if(ra.Strategic_user__c !=null){ |
| | | UserIDList.add(ra.Strategic_user__c); |
| | | } |
| | | //add by rentx 判断用户是否启用 |
| | | if (ra.Strategic_userFSEGI__c != null) { |
| | | UserIDList.add(ra.Strategic_userFSEGI__c); |
| | | } |
| | | if (ra.Strategic_userFSESP__c != null) { |
| | | UserIDList.add(ra.Strategic_userFSESP__c); |
| | | } |
| | | //add by rentx |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/15 start |
| | | //收集产品担当人 只收集 opd计划为完毕未报告 备品 出库未完了数 等于0(已出库) |
| | | //收集的产品担当人为中文名 |
| | |
| | | } |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/15 end |
| | | } |
| | | for(User user:[Select Id,Name,IsActive From User WHERE Id in:UserIDList]){ |
| | | //未启用 |
| | | if(!user.IsActive){ |
| | | String userId = (String)user.Id; |
| | | userId = userId.substring(0,15); |
| | | IsActiveNoList.add(userId); |
| | | } |
| | | } |
| | | |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/15 start |
| | | //由于产品担当获取的都是中文名字,所以需要获取到他的id,并且去掉没启用的人员 |
| | | List<User> userList; |
| | | if(productLeaderNameList.size() > 0){ |
| | | for(String ss : productLeaderNameList){ |
| | | // System.debug('---------------'+ss); |
| | | } |
| | | // for(String ss : productLeaderNameList){ |
| | | // // System.debug('---------------'+ss); |
| | | // } |
| | | //获取担当人的user对象 |
| | | userList = [select id,name,Alias,Alias__c from user where IsActive = true and Alias__c != null and Alias__c = :productLeaderNameList order by CreatedDate desc]; |
| | | }else{ |
| | |
| | | } |
| | | } |
| | | } |
| | | System.debug('zheli00'); |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/15 end |
| | | |
| | | //用户未启用无法插入到共享表 end |
| | | for(Rental_Apply__c ra:RentalApply){ |
| | | //如果战略科室主担当发生变更 --之前的逻辑 update by rentx 2021-01-04 SFDC-BWQ3MX |
| | | //如果战略科室主担当发生变更 |
| | | if (ra.ShareFlag__c == true) { |
| | | //删除原来的共享 |
| | | if(String.isNotBlank(ra.ShareStrategicUser__c)){ |
| | | PUMap.put(ra.Id,ra.ShareStrategicUser__c); |
| | | ParentIdList.add(ra.Id); |
| | | UserOrGroupIdList.add(ra.ShareStrategicUser__c); |
| | | raMap.put(ra.Id,new Rental_Apply__c(id=ra.Id)); // 20220412 ljh add |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/15 start |
| | | //权限表中的战略科室主担当 字段发生变化,那么记录一下当前修改的内容 |
| | | if(RentalApplyMapData.containsKey(ra.Id)){ |
| | | Rental_Apply__c raa = RentalApplyMapData.get(ra.Id); |
| | | raa.ShareStrategicUser__c = ra.Strategic_user__c; |
| | | RentalApplyMapData.put(raa.id,raa); |
| | | } |
| | | //增加新的 |
| | | //所有者还有服务服务部审批人相同不用加 用户未启用无法插入到共享表 |
| | | if(ra.Strategic_user__c !=null&& (IsActiveNoList.size() ==0 || !IsActiveNoList.contains(ra.Strategic_user__c))){ |
| | | if( |
| | | ((ra.Approver_of_Service_Department__c !=null&&!ra.Strategic_user__c.equals(ra.Approver_of_Service_Department__c))||ra.Approver_of_Service_Department__c ==null) |
| | | &&!ra.Strategic_user__c.equals(ra.OwnerId)){ |
| | | Rental_Apply__Share ras = new Rental_Apply__Share( |
| | | RowCause = 'Manual', |
| | | ParentId = ra.Id, |
| | | UserOrGroupId = ra.Strategic_user__c, |
| | | AccessLevel = 'read' |
| | | ); |
| | | |
| | | addStrategList.add(ras); |
| | | } |
| | | Rental_Apply__c r_a = new Rental_Apply__c(); |
| | | r_a.Id = ra.Id; |
| | | r_a.ShareStrategicUser__c = ra.Strategic_user__c; |
| | | raList.add(r_a); |
| | | |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/15 start |
| | | //权限表中的战略科室主担当 字段发生变化,那么记录一下当前修改的内容 |
| | | if(RentalApplyMapData.containsKey(ra.Id)){ |
| | | Rental_Apply__c raa = RentalApplyMapData.get(ra.Id); |
| | | raa.ShareStrategicUser__c = ra.Strategic_user__c; |
| | | RentalApplyMapData.put(raa.id,raa); |
| | | } |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/15 end |
| | | } |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/15 end |
| | | } |
| | | //update by rentx 2021-01-04 SFDC-BWQ3MX |
| | | //如果战略科室GI担当发生变更 |
| | | if (ra.hospitalLeaderGIchange__c == true) { |
| | | //删除原来的共享 |
| | | if(String.isNotBlank(ra.hospitalLeaderGI__c)){ |
| | | PUMap.put(ra.Id,ra.hospitalLeaderGI__c); |
| | | ParentIdList.add(ra.Id); |
| | | UserOrGroupIdList.add(ra.hospitalLeaderGI__c); |
| | | } |
| | | //判断 |
| | | String dept = ra.OCM_dept_category__c; |
| | | if (ra.Strategic_userFSEGI__c != null && (IsActiveNoList.size() ==0 || !IsActiveNoList.contains(ra.Strategic_userFSEGI__c)) && !ra.OwnerId.equals(ra.Strategic_userFSEGI__c)) { |
| | | //加入共享 |
| | | Rental_Apply__Share ras = makeData(ra.Id,ra.Strategic_userFSEGI__c); |
| | | addStrategList.add(ras); |
| | | } |
| | | //更新字段 |
| | | Rental_Apply__c rac = new Rental_Apply__c(); |
| | | rac.Id = ra.Id; |
| | | rac.hospitalLeaderGI__c = ra.Strategic_userFSEGI__c; |
| | | ratList.add(rac); |
| | | |
| | | raMap.put(ra.Id,new Rental_Apply__c(id=ra.Id)); // 20220412 ljh add |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/15 start |
| | | //战略科室FSEGI担当 发生变化,记录一下备品修改的内容 |
| | | if(RentalApplyMapData.containsKey(ra.Id)){ |
| | |
| | | //update by rentx 2021-01-04 SFDC-BWQ3MX |
| | | //如果战略科室SP担当发生变更 |
| | | if (ra.hospitalLeaderSPchange__c == true) { |
| | | //删除原来的共享 |
| | | if(String.isNotBlank(ra.hospitalLeaderSP__c)){ |
| | | PUMap.put(ra.Id,ra.hospitalLeaderSP__c); |
| | | ParentIdList.add(ra.Id); |
| | | UserOrGroupIdList.add(ra.hospitalLeaderSP__c); |
| | | } |
| | | //判断 |
| | | if (ra.Strategic_userFSESP__c != null && (IsActiveNoList.size() ==0 || !IsActiveNoList.contains(ra.Strategic_userFSESP__c)) && !ra.OwnerId.equals(ra.Strategic_userFSESP__c)) { |
| | | //加入共享 |
| | | Rental_Apply__Share ras = makeData(ra.Id,ra.Strategic_userFSESP__c); |
| | | addStrategList.add(ras); |
| | | } |
| | | //更新字段 |
| | | Rental_Apply__c rac = new Rental_Apply__c(); |
| | | rac.Id = ra.Id; |
| | | rac.hospitalLeaderSP__c = ra.Strategic_userFSESP__c; |
| | | raoList.add(rac); |
| | | |
| | | raMap.put(ra.Id,new Rental_Apply__c(id=ra.Id)); // 20220412 ljh add |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/15 start |
| | | //战略科室FSESP担当 发生变化,记录一下修改内容 |
| | | if(RentalApplyMapData.containsKey(ra.Id)){ |
| | |
| | | insRentalApplyShare.add(makeData3(newRA.id,userId)); |
| | | } |
| | | } |
| | | // 20220413 ljh update start |
| | | //修改备品的产品担当人字段值 |
| | | updateRac.add(new Rental_Apply__c(id=newRA.id,ProducLeader_Share__c=productLeaderUserIdStr)); |
| | | // updateRac.add(new Rental_Apply__c(id=newRA.id,ProducLeader_Share__c=productLeaderUserIdStr)); |
| | | raMap.put(newRA.id,new Rental_Apply__c(id=newRA.id,ProducLeader_Share__c=productLeaderUserIdStr)); |
| | | // 20220413 ljh update end |
| | | } |
| | | } |
| | | }else{ |
| | | //如果 ProducLeader_Share__c 字段不为空,并且没有找到当前备品需要共享的产品担当人 |
| | | //证明以前共享了产品担当人,但是现在产品担当人做了修改(系统中没找到或此人已经通过其它共享原因共享了)或制空了,所以直接把以前共享的人删除掉就行 |
| | | delRentalApplyShare.add(newRA.id); |
| | | // 20220413 ljh update start |
| | | //修改备品的产品担当人字段值 |
| | | updateRac.add(new Rental_Apply__c(id=newRA.id,ProducLeader_Share__c='')); |
| | | // updateRac.add(new Rental_Apply__c(id=newRA.id,ProducLeader_Share__c='')); |
| | | raMap.put(newRA.id,new Rental_Apply__c(id=newRA.id,ProducLeader_Share__c='')); |
| | | // 20220413 ljh update end |
| | | } |
| | | }else{ |
| | | //如果ProducLeader_Share__c字段为空,并且当前备品的产品担当人需要共享,那么就需要我们新增共享,并把共享人id,记录到当前备品上 |
| | |
| | | insRentalApplyShare.add(makeData3(newRA.id,userId)); |
| | | } |
| | | } |
| | | // 20220413 ljh update start |
| | | //修改备品的产品担当人字段值 |
| | | updateRac.add(new Rental_Apply__c(id=newRA.id,ProducLeader_Share__c=productLeaderUserIdStr)); |
| | | // updateRac.add(new Rental_Apply__c(id=newRA.id,ProducLeader_Share__c=productLeaderUserIdStr)); |
| | | raMap.put(newRA.id,new Rental_Apply__c(id=newRA.id,ProducLeader_Share__c=productLeaderUserIdStr)); |
| | | // 20220413 ljh update end |
| | | } |
| | | } |
| | | } |
| | |
| | | //如果没有产品当但人,但是字段不为空,那么证明,当前备品的产品担当人有变动值设置为空了,那么我们需要处理以前已经共享的产品担当人 |
| | | if(String.isNotBlank(ra.ProducLeader_Share__c)){ |
| | | delRentalApplyShare.add(ra.id); |
| | | // 20220413 ljh update start |
| | | //修改备品的产品担当人字段值 |
| | | updateRac.add(new Rental_Apply__c(id=ra.id,ProducLeader_Share__c='')); |
| | | // updateRac.add(new Rental_Apply__c(id=ra.id,ProducLeader_Share__c='')); |
| | | raMap.put(ra.Id,new Rental_Apply__c(id=ra.id,ProducLeader_Share__c='')); |
| | | // 20220413 ljh update end |
| | | } |
| | | } |
| | | } |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/15 end |
| | | } |
| | | //删除原来的共享 |
| | | delStrategList = [SELECT Id,ParentId,UserOrGroupId FROM Rental_Apply__Share WHERE RowCause ='Manual' AND ParentId in :ParentIdList AND UserOrGroupId in :UserOrGroupIdList]; |
| | | for(Integer m=0; m<delStrategList.size(); m++){ |
| | | if(String.isBlank(PUMap.get(delStrategList[m].ParentId))){ |
| | | delStrategList.remove(m); |
| | | } |
| | | } |
| | | Savepoint sp = Database.setSavepoint(); |
| | | try{ |
| | | if(delStrategList.size()>0){ |
| | | delete delStrategList; |
| | | } |
| | | //增加 |
| | | if (addStrategList.size() > 0) { |
| | | insert addStrategList; |
| | | } |
| | | //更新备品借出 |
| | | if(raList.size()>0){ |
| | | update raList; |
| | | } |
| | | //更新备品借出GI |
| | | if (ratList.size() > 0) { |
| | | update ratList; |
| | | } |
| | | //更新备品借出SP |
| | | if (raoList.size() > 0) { |
| | | update raoList; |
| | | } |
| | | //add by rentx 2021-01-04 SFDC-BWQ3MX start |
| | | |
| | | try{ |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/18 start |
| | | //以下是备品借出申请的产品担当人共享 |
| | | //删除原来的产品担当共享人 |
| | |
| | | if(insRentalApplyShare != null && insRentalApplyShare.size() > 0){ |
| | | insert insRentalApplyShare; |
| | | } |
| | | // 20220413 ljh update start |
| | | //修改产品担当共享人 |
| | | if(updateRac != null && updateRac.size() > 0){ |
| | | update updateRac; |
| | | // if(updateRac != null && updateRac.size() > 0){ |
| | | // update updateRac; |
| | | // } |
| | | // System.debug('zheli:'+raMap.size()); |
| | | if(raMap != null && raMap.size() > 0){ |
| | | // System.debug('zheli:'+raMap.values()); |
| | | update raMap.values(); |
| | | } |
| | | // 20220413 ljh update end |
| | | //add wangweipeng 新增备品的产品担当人共享 2021/10/18 end |
| | | |
| | | }catch(Exception e){ |
| | |
| | | |
| | | System.Test.startTest(); |
| | | Database.executeBatch(new ConsumablesApplyOrLendBatch(),1); |
| | | strategicDep[0].OwnerId = user[1].Id; |
| | | strategicDep[0].Department_Class_Label__c = '其他'; |
| | | update strategicDep; |
| | | Database.executeBatch(new ConsumablesApplyOrLendBatch(strategicDep[0].id),1); |
| | | // 20220805 ljh update start |
| | | // strategicDep[0].OwnerId = user[1].Id; |
| | | // strategicDep[0].Department_Class_Label__c = '其他'; |
| | | // update strategicDep; |
| | | // Database.executeBatch(new ConsumablesApplyOrLendBatch(strategicDep[0].id),1); |
| | | // 20220805 ljh update end |
| | | System.Test.stopTest(); |
| | | } |
| | | |
| | |
| | | List<User> user = [select Id,Name,Job_Category__c from User where IsActive = true AND Job_Category__c = '销售服务']; |
| | | // List<User> user1 = [select Id,Name from User where IsActive = true AND Job_Category__c = '销售服务']; |
| | | strategicDep[0].OwnerId = user[0].Id; |
| | | strategicDep[0].Department_Class_Label__c = '普外科'; |
| | | // strategicDep[0].Department_Class_Label__c = '普外科';// 20220805 ljh update |
| | | update strategicDep; |
| | | |
| | | hospital.FSE_GI_Main_Leader__c = user[1].Id; |
| | |
| | | |
| | | System.Test.startTest(); |
| | | Database.executeBatch(new ConsumablesApplyOrLendBatch(),1); |
| | | strategicDep[0].OwnerId = user[1].Id; |
| | | strategicDep[0].Department_Class_Label__c = '其他'; |
| | | update strategicDep; |
| | | Database.executeBatch(new ConsumablesApplyOrLendBatch(strategicDep[0].id),1); |
| | | // 20220805 ljh update start |
| | | // strategicDep[0].OwnerId = user[1].Id; |
| | | // strategicDep[0].Department_Class_Label__c = '其他'; |
| | | // update strategicDep; |
| | | // Database.executeBatch(new ConsumablesApplyOrLendBatch(strategicDep[0].id),1); |
| | | // 20220805 ljh update end |
| | | System.Test.stopTest(); |
| | | } |
| | | |
| | |
| | | |
| | | insert ra1; |
| | | List<Rental_Apply__c> raList = [SELECT id,OwnerId,Approver_of_Service_Department__c,Strategic_user__c,Strategic_dept__c,ShareStrategicUser__c FROM Rental_Apply__c WHERE Id = :ra1.Id ]; |
| | | |
| | | strategicDep[0].OwnerId = u1.Id; |
| | | strategicDep[0].Department_Class_Label__c = '普外科'; |
| | | update strategicDep; |
| | | |
| | | // 20220805 ljh update start |
| | | // strategicDep[0].OwnerId = u1.Id; |
| | | // strategicDep[0].Department_Class_Label__c = '普外科'; |
| | | // update strategicDep; |
| | | // 20220805 ljh update end |
| | | |
| | | hospital.FSE_GI_Main_Leader__c = u2.Id; |
| | | hospital.FSE_SP_Main_Leader__c = u2.Id; |
| | |
| | | //医院经销商分离 |
| | | public String SecondDealer{get;set;}*/ |
| | | /*****************画面表示Bean******************/ |
| | | /*public List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecords { get; set; } |
| | | public Integer ConsumableorderdetailsCount { get; set; }*/ |
| | | // public List<ConsumableorderdetailsInfo> ConsumableorderdetailsRecords { get; set; } |
| | | // public Integer ConsumableorderdetailsCount { get; set; } |
| | | |
| | | /*****************ソート時再検索条件(画面からの入力条件を無視するため)******************/ |
| | | /*private String cate1ForSort = null; |
| | | // 产品 ID |
| | | private String ESetId = ''; |
| | | private String[] ProidListAll = new String[]{}; |
| | | public String baseUrl {get;private set;} |
| | | */ |
| | | // /*****************ソート時再検索条件(画面からの入力条件を無視するため)******************/ |
| | | // private String cate1ForSort = null; |
| | | // // 产品 ID |
| | | // private String ESetId = ''; |
| | | // private String[] ProidListAll = new String[]{}; |
| | | // public String baseUrl {get;private set;} |
| | | |
| | | public ConsumptionPDFController() { |
| | | //Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8'); |
| | | //baseUrl = URL.getSalesforceBaseUrl().toExternalForm(); |
| | | //ESetId = ApexPages.currentPage().getParameters().get('esetId'); |
| | | //ConsumableorderdetailsRecords = new List<ConsumableorderdetailsInfo>(); |
| | | } |
| | | /* |
| | | |
| | | //订单编码自动生成 |
| | | |
| | | // 画面初始化 |
| | | public void init() { |
| | | |
| | | // // 画面初始化 |
| | | // public void init() { |
| | | |
| | | //coc.Order_date__c = Date.today(); |
| | | List<Consumable_order_details__c> ConsumableorderdetailsSelected = new List<Consumable_order_details__c>(); |
| | | // //coc.Order_date__c = Date.today(); |
| | | // List<Consumable_order_details__c> ConsumableorderdetailsSelected = new List<Consumable_order_details__c>(); |
| | | |
| | | coc = new Consumable_order__c(); |
| | | ConsumableorderdetailsRecords = new List<ConsumableorderdetailsInfo>(); |
| | | // coc = new Consumable_order__c(); |
| | | // ConsumableorderdetailsRecords = new List<ConsumableorderdetailsInfo>(); |
| | | |
| | | if(ESetId== NULL || ESetId==''){ |
| | | }else{ |
| | | List<Consumable_order__c> qs = New List<Consumable_order__c>(); |
| | | qs = [select Name, |
| | | ShipmentAccount__c, |
| | | Dealer_Customer__c, |
| | | Order_ForHospital__c, |
| | | Order_ForDealerText__c, |
| | | Consumable_pdf_insert_day__c |
| | | From Consumable_order__c |
| | | Where Id =:ESetId]; |
| | | if (qs.size()>0){ |
| | | coc = qs[0]; |
| | | } |
| | | // 選択済みの明细を取得 |
| | | ConsumableorderdetailsSelected = [select Id, |
| | | Name, |
| | | Consumable_order__c, |
| | | Consumable_Product__c, |
| | | Consumable_Product__r.Name, |
| | | Consumable_Product__r.Name__c, |
| | | Sterilization_limit__c,Consumable_count__c, |
| | | Deliver_date__c, |
| | | Bar_Code__c, |
| | | Intra_Trade_List_RMB__c, |
| | | Asset_Model_No__c, |
| | | Sum_of_money__c, |
| | | Order_details_Piece__c, |
| | | Box_Piece__c, |
| | | Guarantee_period_for_products__c |
| | | from Consumable_order_details__c |
| | | where Consumable_Sale_order__c = :ESetId |
| | | order by Name ]; |
| | | for (Integer i = 0; i < ConsumableorderdetailsSelected.size(); i++) { |
| | | ConsumableorderdetailsRecords.add(new ConsumableorderdetailsInfo(ConsumableorderdetailsSelected[i])); |
| | | } |
| | | } |
| | | }*/ |
| | | // if(ESetId== NULL || ESetId==''){ |
| | | // }else{ |
| | | // List<Consumable_order__c> qs = New List<Consumable_order__c>(); |
| | | // qs = [select Name, |
| | | // ShipmentAccount__c, |
| | | // Dealer_Customer__c, |
| | | // Order_ForHospital__c, |
| | | // Order_ForDealerText__c, |
| | | // Consumable_pdf_insert_day__c |
| | | // From Consumable_order__c |
| | | // Where Id =:ESetId]; |
| | | // if (qs.size()>0){ |
| | | // coc = qs[0]; |
| | | // } |
| | | // // 選択済みの明细を取得 |
| | | // ConsumableorderdetailsSelected = [select Id, |
| | | // Name, |
| | | // Consumable_order__c, |
| | | // Consumable_Product__c, |
| | | // Consumable_Product__r.Name, |
| | | // Consumable_Product__r.Name__c, |
| | | // Sterilization_limit__c,Consumable_count__c, |
| | | // Deliver_date__c, |
| | | // Bar_Code__c, |
| | | // Intra_Trade_List_RMB__c, |
| | | // Asset_Model_No__c, |
| | | // Sum_of_money__c, |
| | | // Order_details_Piece__c, |
| | | // Box_Piece__c, |
| | | // Guarantee_period_for_products__c |
| | | // from Consumable_order_details__c |
| | | // where Consumable_Sale_order__c = :ESetId |
| | | // order by Name ]; |
| | | // for (Integer i = 0; i < ConsumableorderdetailsSelected.size(); i++) { |
| | | // ConsumableorderdetailsRecords.add(new ConsumableorderdetailsInfo(ConsumableorderdetailsSelected[i])); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | // Data Bean |
| | | /*class ConsumableorderdetailsInfo implements Comparable { |
| | |
| | | @isTest |
| | | private class ContactHpDeptUpdTriggerTest { |
| | | |
| | | @TestSetup |
| | | static void makeData(){ |
| | | TestDataUtility.CreatePIPolicyConfigurations(new String[]{'Contact','Agency_Contact__c'}); |
| | | } |
| | | |
| | | static testMethod void testUpdate() { |
| | | // recode type を取得 |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | |
| | | private Map < Id, Contact > oldMap; |
| | | private List < Contact > newList; |
| | | private List < Contact > oldList; |
| | | private Id AgencyId = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId(); // 20220830 ljh LLIU-CHR8FF add |
| | | |
| | | public ContactTriggerHandler() { |
| | | this.newMap = (Map < Id, Contact > ) Trigger.newMap; |
| | | this.oldMap = (Map < Id, Contact > ) Trigger.oldMap; |
| | |
| | | syncToAgencyContact(); |
| | | updateDealerNum(); |
| | | sendToComPlat(); |
| | | updateChargeState();// 20220830 ljh LLIU-CHR8FF |
| | | } |
| | | |
| | | protected override void afterUpdate() { |
| | |
| | | } |
| | | // 服务技师 2018/12/24 end |
| | | private void syncToAgencyContact() { |
| | | System.debug('enter syncToAgencyContact'); |
| | | Map < Id, Agency_Contact__c > targetContactMap = new Map < Id, Agency_Contact__c > (); |
| | | Map < Id, Contact > ContactMap = new Map < Id, Contact > (); |
| | | for (Contact nObj: newList) { |
| | | if (nObj.RecordTypeId == '01210000000QfWdAAK' // Doctor |
| | | && |
| | |
| | | ) |
| | | ) { |
| | | //Agency_Contact__c acObj = new Agency_Contact__c(Agency_ID__c = '000000000000000', Contact__c = nObj.Id, ContactId18__c = nObj.Id, Agency_Hospital__c = null, Name = nObj.LastName + ((String.isBlank(nObj.FirstName) == false) ? ' ' + nObj.FirstName : ''), Department_Class__c = nObj.Strategic_dept_Class__c, Type__c = nObj.Type__c, Doctor_Division1__c = nObj.Doctor_Division1__c); |
| | | //zhj MEBG新方案改造 2022-11-27 去掉Encrypted start |
| | | Agency_Contact__c acObj = new Agency_Contact__c( |
| | | Agency_ID__c = '000000000000000', |
| | | Contact__c = nObj.Id, |
| | | ContactId18__c = nObj.Id, |
| | | Agency_Hospital__c = null, |
| | | Name = nObj.LastName, |
| | | Name_Encrypted__c = nObj.LastName_Encrypted__c, |
| | | //Name_Encrypted__c = nObj.LastName_Encrypted__c, |
| | | Department_Class__c = nObj.Strategic_dept_Class__c, |
| | | Type__c = nObj.Type__c, |
| | | Type_Encrypted__c = nObj.Type_Encrypted__c, |
| | | Doctor_Division1__c = nObj.Doctor_Division1__c, |
| | | Doctor_Division1_Encrypted__c = nObj.Doctor_Division1_Encrypted__c |
| | | //Type_Encrypted__c = nObj.Type_Encrypted__c, |
| | | Doctor_Division1__c = nObj.Doctor_Division1__c |
| | | //Doctor_Division1_Encrypted__c = nObj.Doctor_Division1_Encrypted__c |
| | | ); |
| | | //zhj MEBG新方案改造 2022-11-27 去掉Encrypted end |
| | | targetContactMap.put(nObj.Id, acObj); |
| | | ContactMap.put(nObj.Id, nObj); |
| | | } |
| | | } |
| | | } |
| | |
| | | List<Agency_Contact__c> temp = targetContactMap.values(); |
| | | upsert temp ContactId18__c; |
| | | system.debug('temp='+temp); |
| | | EncryptInsert(temp); |
| | | EncryptInsert(temp,ContactMap); |
| | | } |
| | | } |
| | | |
| | | static void EncryptInsert(List<Agency_Contact__c> aclist){ |
| | | static void EncryptInsert(List<Agency_Contact__c> aclist,Map < Id, Contact > ContactMap){ |
| | | if(!(system.isFuture() || system.isBatch())){ |
| | | AwsServiceTool2.EncryptPushFuture(Json.serialize(aclist), 'Agency_Contact__c'); |
| | | //zhj MEBG新方案改造 2022-11-27 start |
| | | //AwsServiceTool2.EncryptPushFuture(Json.serialize(aclist), 'Agency_Contact__c'); |
| | | |
| | | Map<String,PIHelper.PIIntegration> staticResource = new Map<String,PIHelper.PIIntegration>(); |
| | | staticResource.put('Contact',PIHelper.getPIIntegrationInfo('Contact')); |
| | | staticResource.put('Agency_Contact__c',PIHelper.getPIIntegrationInfo('Agency_Contact__c')); |
| | | Map<String, Map<String, PI_Field_Policy_Detail__c>> mmsp = new Map<String, Map<String,PI_Field_Policy_Detail__c>>(); |
| | | for (String key : staticResource.keySet()) { |
| | | mmsp.put(key, new Map<String,PI_Field_Policy_Detail__c>()); |
| | | for (PI_Field_Policy_Detail__c detail : staticResource.get(key).PIDetails) { |
| | | mmsp.get(key).put(detail.SF_Field_API_Name__c, detail); |
| | | } |
| | | } |
| | | |
| | | System.debug('mmsp = ' + mmsp); |
| | | List<AWSServiceTool2V2.EncryptPushRequestBody> EncryptPushList = new List<AWSServiceTool2V2.EncryptPushRequestBody>(); |
| | | for(Agency_Contact__c ac : aclist){ |
| | | AWSServiceTool2V2.EncryptPushRequestBody EncryptPush = new AWSServiceTool2V2.EncryptPushRequestBody(); |
| | | EncryptPush.dataId = ac.AWS_Data_Id__c != null ?ac.AWS_Data_Id__c:''; |
| | | EncryptPush.sfRecordId = ac.Id; |
| | | EncryptPush.fieldsMapping = new Map<String, List<AWSServiceTool2V2.EncryptPushRes>>(); |
| | | List<AWSServiceTool2V2.EncryptPushRes> resList = new List<AWSServiceTool2V2.EncryptPushRes>(); |
| | | AWSServiceTool2V2.EncryptPushRes res= new AWSServiceTool2V2.EncryptPushRes(); |
| | | res.isQueryDb = true; |
| | | res.value = ''; |
| | | res.table = staticResource.get('Contact').awsTableName; |
| | | res.dataId = ContactMap.get(ac.Contact__c).AWS_Data_Id__c; |
| | | res.field = mmsp.get('Contact').get('LastName').AWS_Field_API__c; |
| | | resList.add(res); |
| | | |
| | | List<AWSServiceTool2V2.EncryptPushRes> resList2 = new List<AWSServiceTool2V2.EncryptPushRes>(); |
| | | AWSServiceTool2V2.EncryptPushRes res2= new AWSServiceTool2V2.EncryptPushRes(); |
| | | res2.isQueryDb = true; |
| | | res2.value = ''; |
| | | res2.table = staticResource.get('Contact').awsTableName; |
| | | res2.dataId = ContactMap.get(ac.Contact__c).AWS_Data_Id__c; |
| | | res2.field = mmsp.get('Contact').get('Type__c').AWS_Field_API__c; |
| | | resList2.add(res2); |
| | | |
| | | List<AWSServiceTool2V2.EncryptPushRes> resList3 = new List<AWSServiceTool2V2.EncryptPushRes>(); |
| | | AWSServiceTool2V2.EncryptPushRes res3= new AWSServiceTool2V2.EncryptPushRes(); |
| | | res3.isQueryDb = true; |
| | | res3.value = ''; |
| | | res3.table = staticResource.get('Contact').awsTableName; |
| | | res3.dataId = ContactMap.get(ac.Contact__c).AWS_Data_Id__c; |
| | | res3.field = mmsp.get('Contact').get('Doctor_Division1__c').AWS_Field_API__c; |
| | | resList3.add(res3); |
| | | |
| | | System.debug('Agency_Contact__c Name = ' +mmsp.get('Agency_Contact__c').get('Name').AWS_Field_API__c); |
| | | System.debug('resList = ' + resList); |
| | | EncryptPush.fieldsMapping.put(mmsp.get('Agency_Contact__c').get('Name').AWS_Field_API__c, resList); |
| | | EncryptPush.fieldsMapping.put(mmsp.get('Agency_Contact__c').get('Type__c').AWS_Field_API__c, resList2); |
| | | EncryptPush.fieldsMapping.put(mmsp.get('Agency_Contact__c').get('Doctor_Division1__c').AWS_Field_API__c, resList3); |
| | | EncryptPushList.add(EncryptPush); |
| | | } |
| | | System.debug('EncryptPushListdataId = ' + JSON.serialize(EncryptPushList[0].dataId)); |
| | | System.debug('EncryptPushListsfRecordId = ' + JSON.serialize(EncryptPushList[0].sfRecordId)); |
| | | System.debug('EncryptPushListfieldsMapping = ' + JSON.serialize(EncryptPushList[0].fieldsMapping)); |
| | | System.debug('EncryptPushList = ' + JSON.serialize(EncryptPushList)); |
| | | if(!Test.isRunningTest()) |
| | | AwsServiceTool2V2.EncryptPushFutureV2(Json.serialize(EncryptPushList),Json.serialize(aclist), 'Agency_Contact__c'); |
| | | //zhj MEBG新方案改造 2022-11-27 end |
| | | }else{ |
| | | //Add By Li Jun for sync agency contact to aws 20220424 start |
| | | if(!Test.isRunningTest()){ |
| | | SyncAccountContactToAWS.assignOnceOneMinuteLater(aclist); |
| | | System.debug('ContactMap = ' + ContactMap); |
| | | SyncAccountContactToAWS.assignOnceOneMinuteLater(aclist,ContactMap); |
| | | } |
| | | //Add By Li Jun for sync agency contact to aws 20220424 end |
| | | } |
| | |
| | | } |
| | | //更新经销商用户人数字段 精琢技术 pk 2021-08-26 end |
| | | |
| | | //zhj 新方案改造 将手机号去重及其验证规则移动到AWS和前端 start |
| | | // 手机号去重及规则验证 及新增客户人员重名验证 |
| | | public void mobileNumberVerification(){ |
| | | |
| | |
| | | contactnew.UniqueNumber__c = null; |
| | | } |
| | | // 经销商客户人员不进行手机号校验 thh 20220517 end |
| | | } else if(DoctorRecordTypeId.equals(contactnew.RecordTypeId)){ |
| | | if(String.isNotBlank(contactnew.MobilePhone_Encrypted__c)){ |
| | | contactnew.UniqueNumber__c = contactnew.MobilePhone_Encrypted__c; |
| | | } else { |
| | | contactnew.UniqueNumber__c = null; |
| | | } |
| | | } |
| | | } |
| | | // else if(DoctorRecordTypeId.equals(contactnew.RecordTypeId)){ |
| | | // if(String.isNotBlank(contactnew.MobilePhone_Encrypted__c)){ |
| | | // contactnew.UniqueNumber__c = contactnew.MobilePhone_Encrypted__c; |
| | | // } else { |
| | | // contactnew.UniqueNumber__c = null; |
| | | // } |
| | | // } |
| | | } |
| | | // if (Trigger.isInsert) { |
| | | if(DoctorRecordTypeId.equals(contactnew.RecordTypeId)){ |
| | | accountIdSet.add(contactnew.AccountId); |
| | | } |
| | | // if(DoctorRecordTypeId.equals(contactnew.RecordTypeId)){ |
| | | // accountIdSet.add(contactnew.AccountId); |
| | | // } |
| | | // } |
| | | } |
| | | //手机号唯一校验-医院下新建客户人员校验使用加密手机号,经销商使用普通手机号 thh 20220328 end |
| | | // 新增医院联系人时 |
| | | if (accountIdSet.size() > 0) { |
| | | List<Contact> contactList = new List<Contact>(); |
| | | if(Trigger.isInsert){ |
| | | contactList = [SELECT Id,AccountId,FullName__c,LastName,FirstName,Account.Name,CManageCode__c,IsFromSPO__c, |
| | | LastName_Encrypted__c// 20220314 PI改造 by Bright |
| | | , MobilePhone_Encrypted__c // 通过姓名+手机号判断人员是否重复 thh 20220518 |
| | | FROM Contact |
| | | WHERE IsFromSPO__c = false AND AccountId IN:accountIdSet]; |
| | | } |
| | | if(Trigger.isUpdate){ |
| | | contactList = [SELECT Id,AccountId,FullName__c,LastName,FirstName,Account.Name,CManageCode__c,IsFromSPO__c, |
| | | LastName_Encrypted__c// 20220314 PI改造 by Bright |
| | | , MobilePhone_Encrypted__c // 通过姓名+手机号判断人员是否重复 thh 20220518 |
| | | FROM Contact |
| | | WHERE IsFromSPO__c = false AND AccountId IN:accountIdSet AND Id Not IN: oldMap.keyset()]; |
| | | } |
| | | System.debug('contactList:' + contactList); |
| | | if (contactList.size() > 0) { |
| | | for(Contact contact :contactList){ |
| | | // 通过姓名+手机号判断人员是否重复 thh 20220518 start |
| | | // String lastNameStr = String.isNotBlank(contact.LastName) ? contact.LastName:''; |
| | | // String firstNameStr = String.isNotBlank(contact.FirstName) ? contact.FirstName:''; |
| | | // String contactFullName = lastNameStr + firstNameStr + MobilePhoneStr; |
| | | String contactFullName = contact.LastName_Encrypted__c + contact.MobilePhone_Encrypted__c;// 20220314 PI改造 by Bright |
| | | // 通过姓名+手机号判断人员是否重复 thh 20220518 end |
| | | if(string.isBlank(contactFullName)){ |
| | | continue; |
| | | } |
| | | String accountId = String.valueOf(contact.AccountId).SubString(0,15); |
| | | Map<String,Contact> contactFullNameMap = new Map<String,Contact>(); |
| | | if (accountContactMap.containsKey(accountId)) { |
| | | contactFullNameMap = accountContactMap.get(accountId); |
| | | } |
| | | contactFullNameMap.put(contactFullName, contact); |
| | | accountContactMap.put(accountId, contactFullNameMap); |
| | | } |
| | | } |
| | | } |
| | | // if (accountIdSet.size() > 0) { |
| | | // List<Contact> contactList = new List<Contact>(); |
| | | // if(Trigger.isInsert){ |
| | | // contactList = [SELECT Id,AccountId,FullName__c,LastName,FirstName,Account.Name,CManageCode__c,IsFromSPO__c, |
| | | // LastName_Encrypted__c// 20220314 PI改造 by Bright |
| | | // , MobilePhone_Encrypted__c // 通过姓名+手机号判断人员是否重复 thh 20220518 |
| | | // FROM Contact |
| | | // WHERE IsFromSPO__c = false AND AccountId IN:accountIdSet]; |
| | | // } |
| | | // if(Trigger.isUpdate){ |
| | | // contactList = [SELECT Id,AccountId,FullName__c,LastName,FirstName,Account.Name,CManageCode__c,IsFromSPO__c, |
| | | // LastName_Encrypted__c// 20220314 PI改造 by Bright |
| | | // , MobilePhone_Encrypted__c // 通过姓名+手机号判断人员是否重复 thh 20220518 |
| | | // FROM Contact |
| | | // WHERE IsFromSPO__c = false AND AccountId IN:accountIdSet AND Id Not IN: oldMap.keyset()]; |
| | | // } |
| | | // System.debug('contactList:' + contactList); |
| | | // if (contactList.size() > 0) { |
| | | // for(Contact contact :contactList){ |
| | | // // 通过姓名+手机号判断人员是否重复 thh 20220518 start |
| | | // // String lastNameStr = String.isNotBlank(contact.LastName) ? contact.LastName:''; |
| | | // // String firstNameStr = String.isNotBlank(contact.FirstName) ? contact.FirstName:''; |
| | | // // String contactFullName = lastNameStr + firstNameStr + MobilePhoneStr; |
| | | // String contactFullName = contact.LastName_Encrypted__c + contact.MobilePhone_Encrypted__c;// 20220314 PI改造 by Bright |
| | | // // 通过姓名+手机号判断人员是否重复 thh 20220518 end |
| | | // if(string.isBlank(contactFullName)){ |
| | | // continue; |
| | | // } |
| | | // String accountId = String.valueOf(contact.AccountId).SubString(0,15); |
| | | // Map<String,Contact> contactFullNameMap = new Map<String,Contact>(); |
| | | // if (accountContactMap.containsKey(accountId)) { |
| | | // contactFullNameMap = accountContactMap.get(accountId); |
| | | // } |
| | | // contactFullNameMap.put(contactFullName, contact); |
| | | // accountContactMap.put(accountId, contactFullNameMap); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | for (Contact contactnew: newList) { |
| | | if(AgencyRecordTypeId.equals(contactnew.RecordTypeId) || (Trigger.isUpdate && !oldMap.isEmpty() && oldMap.get(contactnew.Id) != null |
| | | && String.isBlank(oldMap.get(contactnew.Id).MobilePhone_Encrypted__c) |
| | | && String.isBlank(contactnew.MobilePhone_Encrypted__c))){ |
| | | continue; |
| | | } |
| | | String accountId = String.valueOf(contactnew.AccountId).substring(0, 15); |
| | | if (accountContactMap.containsKey(accountId)) { |
| | | Map<String,Contact> contactFullNameMap = accountContactMap.get(accountId); |
| | | // 通过姓名+手机号判断人员是否重复 thh 20220518 start |
| | | // String lastNameStr = String.isNotBlank(contactnew.LastName) ? contactnew.LastName:''; |
| | | // String firstNameStr = String.isNotBlank(contactnew.FirstName) ? contactnew.FirstName:''; |
| | | // String contactFullName = lastNameStr + firstNameStr + MobilePhoneStr; |
| | | String contactFullName = contactnew.LastName_Encrypted__c + contactnew.MobilePhone_Encrypted__c;// 20220314 PI改造 by Bright |
| | | // 通过姓名+手机号判断人员是否重复 thh 20220518 end |
| | | if (contactFullNameMap.containsKey(contactFullName)) { |
| | | String accountName = contactFullNameMap.get(contactFullName).Account.Name; |
| | | String cManageCode = contactFullNameMap.get(contactFullName).CManageCode__c; |
| | | // 跳过测试程序 和 SPO通过203接口创建的联系人 |
| | | if (!(Test.isRunningTest() || contactnew.IsFromSPO__c)) { |
| | | // if(Trigger.isInsert) { |
| | | contactnew.LastName.addError('客户 [ '+accountName+ ' ],已存在相同名字的联系人 人员管理编码 ['+cManageCode+' ] ,不能重复创建,请了解'); |
| | | // } |
| | | // 客户人员删除手机号时,进行判断是否存在同名且手机号为空的客户人员 thh 20220523 start |
| | | // if(Trigger.isUpdate && !UserInfo.getUserId().equals(System.Label.interfaceUserID)) { |
| | | // if (String.isNotBlank(oldMap.get(contactnew.Id).MobilePhone_Encrypted__c) && String.isBlank(contactnew.MobilePhone_Encrypted__c)){ |
| | | // contactnew.LastName.addError('相同名字的联系人 人员管理编码 ['+cManageCode+' ] 手机号为空已经存在,不能重复创建,请了解'); |
| | | // } |
| | | // if (oldMap.get(contactnew.Id).CManageCode__c != contactnew.CManageCode__c){ |
| | | // contactnew.LastName.addError('客户 [ '+accountName+ ' ],已存在相同名字的联系人 人员管理编码 ['+cManageCode+' ] ,不能重复创建,请了解'); |
| | | // } |
| | | // } |
| | | // 客户人员删除手机号时,进行判断是否存在同名且手机号为空的客户人员 thh 20220523 end |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // for (Contact contactnew: newList) { |
| | | // if(AgencyRecordTypeId.equals(contactnew.RecordTypeId) || (Trigger.isUpdate && !oldMap.isEmpty() && oldMap.get(contactnew.Id) != null |
| | | // && String.isBlank(oldMap.get(contactnew.Id).MobilePhone_Encrypted__c) |
| | | // && String.isBlank(contactnew.MobilePhone_Encrypted__c))){ |
| | | // continue; |
| | | // } |
| | | // String accountId = String.valueOf(contactnew.AccountId).substring(0, 15); |
| | | // if (accountContactMap.containsKey(accountId)) { |
| | | // Map<String,Contact> contactFullNameMap = accountContactMap.get(accountId); |
| | | // // 通过姓名+手机号判断人员是否重复 thh 20220518 start |
| | | // // String lastNameStr = String.isNotBlank(contactnew.LastName) ? contactnew.LastName:''; |
| | | // // String firstNameStr = String.isNotBlank(contactnew.FirstName) ? contactnew.FirstName:''; |
| | | // // String contactFullName = lastNameStr + firstNameStr + MobilePhoneStr; |
| | | // String contactFullName = contactnew.LastName_Encrypted__c + contactnew.MobilePhone_Encrypted__c;// 20220314 PI改造 by Bright |
| | | // // 通过姓名+手机号判断人员是否重复 thh 20220518 end |
| | | // if (contactFullNameMap.containsKey(contactFullName)) { |
| | | // String accountName = contactFullNameMap.get(contactFullName).Account.Name; |
| | | // String cManageCode = contactFullNameMap.get(contactFullName).CManageCode__c; |
| | | // // 跳过测试程序 和 SPO通过203接口创建的联系人 |
| | | // if (!(Test.isRunningTest() || contactnew.IsFromSPO__c)) { |
| | | // // if(Trigger.isInsert) { |
| | | // contactnew.LastName.addError('客户 [ '+accountName+ ' ],已存在相同名字的联系人 人员管理编码 ['+cManageCode+' ] ,不能重复创建,请了解'); |
| | | // // } |
| | | // // 客户人员删除手机号时,进行判断是否存在同名且手机号为空的客户人员 thh 20220523 start |
| | | // // if(Trigger.isUpdate && !UserInfo.getUserId().equals(System.Label.interfaceUserID)) { |
| | | // // if (String.isNotBlank(oldMap.get(contactnew.Id).MobilePhone_Encrypted__c) && String.isBlank(contactnew.MobilePhone_Encrypted__c)){ |
| | | // // contactnew.LastName.addError('相同名字的联系人 人员管理编码 ['+cManageCode+' ] 手机号为空已经存在,不能重复创建,请了解'); |
| | | // // } |
| | | // // if (oldMap.get(contactnew.Id).CManageCode__c != contactnew.CManageCode__c){ |
| | | // // contactnew.LastName.addError('客户 [ '+accountName+ ' ],已存在相同名字的联系人 人员管理编码 ['+cManageCode+' ] ,不能重复创建,请了解'); |
| | | // // } |
| | | // // } |
| | | // // 客户人员删除手机号时,进行判断是否存在同名且手机号为空的客户人员 thh 20220523 end |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | //zhj 新方案改造 将手机号去重及其验证规则移动到AWS和前端 end |
| | | |
| | | public static Map<Id,Id> NFM606_IdMap = new Map<Id,Id>(); |
| | | // 606接口调用问题修复 thh 20220330 start |
| | | private void sendToComPlat() { |
| | |
| | | || old.ServicePlatformCode__c != local.ServicePlatformCode__c//服务平台编码 |
| | | || old.UnifiedI_Contact_ID__c != local.UnifiedI_Contact_ID__c//智慧医疗编码 |
| | | || old.ContactType__c != local.ContactType__c//人员类型 |
| | | |
| | | || (old.ChargeState__c != local.ChargeState__c && local.RecordTypeId == AgencyId)//负责省 // 20220830 ljh LLIU-CHR8FF add |
| | | ) { |
| | | //获取客户人员的记录类型ID thh 20220330 start |
| | | ID InternalStaffRecordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName().get('Internal_staff').getRecordTypeId(); |
| | |
| | | //获取客户人员的记录类型ID thh 20220330 end |
| | | System.debug('local.UnifiedI_Contact_ID__c1:' + local.UnifiedI_Contact_ID__c); |
| | | System.debug('local.MobilePhone1:' + local.MobilePhone); |
| | | if (!local.IsFromSPO__c && !InternalStaffRecordTypeId.equals(local.RecordTypeId)) { |
| | | // gzw 20220824 bugfix start |
| | | // if (!local.IsFromSPO__c && !InternalStaffRecordTypeId.equals(local.RecordTypeId)) { |
| | | if (!InternalStaffRecordTypeId.equals(local.RecordTypeId)) { |
| | | // gzw 20220824 bugfix end |
| | | // 医院 客户人员 统一平台编码有值 发送 PO |
| | | if (DoctorRecordTypeId.equals(local.RecordTypeId) && String.isNotBlank(local.UnifiedI_Contact_ID__c)) { |
| | | if (!NFM606_IdMap.containsKey(local.Id)) { |
| | |
| | | } |
| | | } |
| | | // 606接口调用问题修复 thh 20220330 end |
| | | // 20220830 ljh LLIU-CHR8FF add start |
| | | private void updateChargeState(){ |
| | | List<Contact> contactL = new List<Contact>(); |
| | | for (Contact nObj : newList) { |
| | | if(nObj.RecordTypeId == AgencyId && String.isBlank(nObj.ChargeState__c)){ |
| | | Contact cnew = new Contact(); |
| | | cnew.Id = nObj.Id; |
| | | cnew.ChargeState__c = nObj.ChargeState_F__c; |
| | | contactL.add(cnew); |
| | | } |
| | | } |
| | | if (!contactL.isEmpty()) { |
| | | update contactL; |
| | | } |
| | | } |
| | | // 20220830 ljh LLIU-CHR8FF add end |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | @Testsetup |
| | | static void setup(){ |
| | | TestDataUtility.CreatePIPolicyConfiguration('Agency_Contact__c'); |
| | | List<String> strList = new List<String>(); |
| | | strList.add('Agency_Contact__c'); |
| | | strList.add('Agency_Contact__cV2'); |
| | | strList.add('Contact'); |
| | | TestDataUtility.CreatePIPolicyConfigurations(strList); |
| | | //TestDataUtility.CreatePIPolicyConfiguration('Agency_Contact__c'); |
| | | |
| | | } |
| | | @isTest static void test_method_one() { |
| | |
| | | Map<String, Contact> conMap = new Map<String, Contact>(); |
| | | // UserToContact の 変更したか にて判断した項目です |
| | | //20220425 LLIU-CCY9TA you 查询post的地方换成 HR_Post__c |
| | | List<User> usrList = [select Id,PositionSubsequence__c, Notes_File_Name__c,FirstName, LastName, Email, Mobile_Phone__c, Employee_No__c, Work_Location__c, HR_Post__c,Post__c, Job_Category__c, Hire_Date__c, Gender__c, Dept__c, Pregnant_Rest__c, Salesdepartment__c, Stay_or_not__c,IsMEBG__c, Work_Location_HR__c from User where Employee_No__c IN :userEmployeeNoList]; |
| | | List<User> usrList = [select Id,PositionSubsequence__c,Rank__c, Notes_File_Name__c,FirstName, LastName, Email, Mobile_Phone__c, Employee_No__c, Work_Location__c, HR_Post__c,Post__c, Job_Category__c, Hire_Date__c, Gender__c, Dept__c, Pregnant_Rest__c, Salesdepartment__c, Stay_or_not__c,IsMEBG__c, Work_Location_HR__c from User where Employee_No__c IN :userEmployeeNoList]; |
| | | List<Contact> conList = [select Id,Notes_File_Name__c, User__c, Employee_No_manual__c,Isactive__c,IsMEBG__c, Work_Location_HR__c from Contact where Employee_No_manual__c IN :userEmployeeNoList and RecordTypeId = :rtId]; |
| | | for (Contact con : conList) { |
| | | //conMap.put(con.Employee_No_manual__c, con); |
| | |
| | | //20220428 LLIU-CDW5ZW you start |
| | | tmp.PositionSubsequence__c = local.PositionSubsequence__c; |
| | | //20220428 LLIU-CDW5ZW you end |
| | | //20220512 you LLIU-CDW5ZW start |
| | | tmp.Rank__c = local.Rank__c; |
| | | //20220428 you LLIU-CDW5ZW end |
| | | |
| | | if(String.isNotBlank(local.Stay_or_not__c)){ |
| | | tmp.Isactive__c = local.Stay_or_not__c == '在职' ? '有效':'无效'; |
| | | tmp.Isactive__c = local.Stay_or_not__c == '在职' ? '有效':'无效(退休)'; |
| | | } |
| | | upsertList.add(tmp); |
| | | system.debug('youchangtest2'+tmp.HR_Post__c); |
| | |
| | | //20220428 LLIU-CDW5ZW you start |
| | | tmp.PositionSubsequence__c = local.PositionSubsequence__c; |
| | | //20220428 LLIU-CDW5ZW you end |
| | | //20220512 you LLIU-CDW5ZW start |
| | | tmp.Rank__c = local.Rank__c; |
| | | //20220428 you LLIU-CDW5ZW end |
| | | if(String.isNotBlank(local.Stay_or_not__c)){ |
| | | tmp.Isactive__c = '在职'.equals(local.Stay_or_not__c) ? '有效':'无效'; |
| | | tmp.Isactive__c = '在职'.equals(local.Stay_or_not__c) ? '有效':'无效(退休)'; |
| | | } |
| | | upsertList.add(tmp); |
| | | system.debug('youchangtest3'+tmp.HR_Post__c); |
| | |
| | | } |
| | | } |
| | | //20220426 LLIU-CCY9TA you end |
| | | |
| | | //20220721 you LLIU-CGH8EY start 本部分类-岗位子序列,映射 user上的职种 |
| | | SS_BatchColumnMapping__c JobmpdMapping = SS_BatchColumnMapping__c.getValues('HR_Post_To_Job_Category__c'); |
| | | |
| | | Map<String,String> Job_CategoryMap = new Map<String,String>(); |
| | | for (Integer i = 1; i <= 30; i++) { |
| | | String lpadI = ('00' + i).right(3); |
| | | String fromColumn = 'From_Column_' + lpadI + '__c'; |
| | | if(JobmpdMapping!=null){ |
| | | String apiStr = String.valueOf(JobmpdMapping.get(fromColumn)); |
| | | if (String.isBlank(apiStr) == false) { |
| | | String ssColumn = 'SS_Column_' + lpadI + '__c'; |
| | | String ssApiStr = String.valueOf(JobmpdMapping.get(ssColumn)); |
| | | Job_CategoryMap.put(apiStr,ssApiStr); |
| | | } |
| | | } |
| | | } |
| | | //20220721 you LLIU-CGH8EY end |
| | | |
| | | //20220823 you LLIU-CHL8FB start 本部是--solution本部的通过映射,更新用户上的 本部(选项),如果是其他,那么正常走逻辑 |
| | | SS_BatchColumnMapping__c DeptMapping = SS_BatchColumnMapping__c.getValues('HR_Category4_To_Dept__c'); |
| | | |
| | | Map<String,String> DeptMap = new Map<String,String>(); |
| | | for (Integer i = 1; i <= 30; i++) { |
| | | String lpadI = ('00' + i).right(3); |
| | | String fromColumn = 'From_Column_' + lpadI + '__c'; |
| | | if(DeptMapping!=null){ |
| | | String apiStr = String.valueOf(DeptMapping.get(fromColumn)); |
| | | if (String.isBlank(apiStr) == false) { |
| | | String ssColumn = 'SS_Column_' + lpadI + '__c'; |
| | | String ssApiStr = String.valueOf(DeptMapping.get(ssColumn)); |
| | | DeptMap.put(apiStr,ssApiStr); |
| | | } |
| | | } |
| | | } |
| | | //20220823 you LLIU-CHL8FB end |
| | | |
| | | system.debug(mpdMapping+'==UserAndContactMap=='+UserAndContactMap); |
| | | //获取自定义标签,自己定义,用来空更新数据或处理历史数据 |
| | | //在处理历史记录时:职位和职种 如果ods的值为空,那么user对象的这两个字段就不需要更新 |
| | |
| | | // 现有用户 |
| | | Map<String, User> usrMap = new Map<String, User>(); |
| | | // ContactToUser の 変更したか にて判断した項目です |
| | | List<ODS__c> conList = [select id,Alias__c,Branch__c,PositionSubsequence__c,Category3__c,Category4__c,Category5__c,Category6__c,Employee_No__c,Hire_Date__c,FirstName__c,LastName__c,Name__c,Email__c,MobilePhone__c,Post__c,Job_Category__c,Job_Type__c,Product_specialist_incharge_product__c,Sales_Speciality__c,Work_Location__c,Stay_or_not__c,LeaveDate__c,UniqueId__c,Null_Update__c from ODS__c where Employee_No__c in :userEmployeeNoList]; |
| | | List<ODS__c> conList = [select id,Alias__c,Branch__c,PositionSubsequence__c,Rank__c,Category3__c,Category4__c,Category5__c,Category6__c,Employee_No__c,Hire_Date__c,FirstName__c,LastName__c,Name__c,Email__c,MobilePhone__c,Post__c,Job_Category__c,Job_Type__c,Product_specialist_incharge_product__c,Sales_Speciality__c,Work_Location__c,Stay_or_not__c,LeaveDate__c,UniqueId__c,Null_Update__c,Salesdepartment__c from ODS__c where Employee_No__c in :userEmployeeNoList]; |
| | | |
| | | List<User> usrList = [select Id, PBI_Enable__c ,PBIAuthorizedSetting__c,Employee_No__c from User where Employee_No__c IN :userEmployeeNoList]; |
| | | for (User usr : usrList) { |
| | |
| | | |
| | | userData.Group_sales_dept__c = odsc.Category3__c;//统括本部 |
| | | if(String.isNotBlank(odsc.Category4__c)){ |
| | | userData.Dept__c = odsc.Category4__c;//本部 |
| | | //20220823 you LLIU-CHL8FB start |
| | | if(null!=DeptMap && DeptMap.containsKey(odsc.Category4__c)){ |
| | | userData.Dept__c = DeptMap.get(odsc.Category4__c);//本部 |
| | | }else{ |
| | | userData.Dept__c = odsc.Category4__c;//本部 |
| | | } |
| | | //20220823 you LLIU-CHL8FB end |
| | | } |
| | | userData.Category5__c = odsc.Category5__c;//部 |
| | | //LLIU-CCS8ZB-当新创建的时候接收人事信息中的课信息,之后不进行更新 thh 20220324 start |
| | |
| | | //20220428 LLIU-CDW5ZW you start |
| | | userData.PositionSubsequence__c = odsc.PositionSubsequence__c; |
| | | //20220428 LLIU-CDW5ZW you end |
| | | //20220512 you LLIU-CDW5ZW start |
| | | userData.Rank__c = odsc.Rank__c; |
| | | //20220428 you LLIU-CDW5ZW end |
| | | |
| | | // 20220721 you LLIU-CGH8EY start 注释,依据本部和岗位子序列 给职种赋值 |
| | | /** |
| | | String zz = ''; |
| | | if(odsc.Job_Category__c == '服务'){ |
| | | zz = '销售服务'; |
| | |
| | | //如果自定义变迁的值为1,那么证明现在是在处理历史数据,而历史数据规定,如果ods的职种为空,那么就不需要更新user的职种 |
| | | if(String.isNotBlank(zz) || buffer != 1){ |
| | | userData.Job_Category__c = zz;//职种 |
| | | } |
| | | }**/ |
| | | String bbz=odsc.Category4__c+'-' +odsc.PositionSubsequence__c; //本部-岗位子序列 |
| | | String ldbb=odsc.Salesdepartment__c+'-' +odsc.PositionSubsequence__c; //六大本部-岗位子序列 |
| | | String bbz1=odsc.Category5__c+'-' +odsc.PositionSubsequence__c; //部-岗位子序列 |
| | | system.debug(bbz+'==='+ldbb+'==Job_CategoryMap=='+Job_CategoryMap); |
| | | //本部不等于空,看本部 |
| | | String zz = ''; |
| | | if( (String.isNotBlank(odsc.PositionSubsequence__c) && odsc.PositionSubsequence__c=='供应链管理') || ( String.isNotBlank(odsc.Category4__c) && odsc.Category4__c=='战略创新本部')){ |
| | | zz = '管理'; |
| | | }else if( String.isNotBlank(odsc.Category4__c) && odsc.Category4__c=='Solution本部'){ |
| | | zz = '市场'; |
| | | }else if(String.isNotBlank(odsc.Category4__c)){ |
| | | if(null!=Job_CategoryMap && Job_CategoryMap.containsKey(bbz)){ |
| | | if(Job_CategoryMap.get(bbz) == '服务'){ |
| | | zz = '销售服务'; |
| | | }else if(Job_CategoryMap.get(bbz) == '推广'){ |
| | | zz = '销售推广'; |
| | | }else{ |
| | | zz = Job_CategoryMap.get(bbz); |
| | | } |
| | | } |
| | | if(null!=Job_CategoryMap && Job_CategoryMap.containsKey(ldbb)){ |
| | | if(Job_CategoryMap.get(ldbb) == '服务'){ |
| | | zz = '销售服务'; |
| | | }else if(Job_CategoryMap.get(ldbb) == '推广'){ |
| | | zz = '销售推广'; |
| | | }else{ |
| | | zz = Job_CategoryMap.get(ldbb); |
| | | } |
| | | } |
| | | |
| | | system.debug('=='+Job_CategoryMap.get(bbz)+'==='+Job_CategoryMap.get(ldbb)+'==='+zz); |
| | | }else if(String.isBlank(odsc.Category4__c) && String.isNotBlank(odsc.Category5__c)){ |
| | | //本部等于空,看部 |
| | | if(odsc.Category5__c=='华北东北运营管理部' || odsc.Category5__c=='西北西南运营管理部' || odsc.Category5__c=='西北西南运营支援部' || bbz1=='华北东北服务部-综合行政' || bbz1=='华北东北市场部-综合行政'){ |
| | | zz = '支援'; |
| | | }else if(bbz1=='华北东北服务部-FSE'){ |
| | | zz = '销售服务'; |
| | | }else if(odsc.Category5__c=='西部战略推进部' || bbz1=='华北东北市场部-推广'){ |
| | | zz = '销售推广'; |
| | | } |
| | | } |
| | | userData.Job_Category__c = zz; |
| | | |
| | | // 20220721 you LLIU-CGH8EY end |
| | | |
| | | //userData.Product_specialist_incharge_product__c = odsc.Product_specialist_incharge_product__c;//负责产品(主) |
| | | //userData.Sales_Speciality__c = odsc.Sales_Speciality__c;//销售工作内容 |
| | | //HR信息上的工作地更新到用户的工作地(人事)上 thh 2022-02-16 start |
| | |
| | | User userData = new User(); |
| | | userData.Group_sales_dept__c = odsc.Category3__c;//统括本部 |
| | | if(String.isNotBlank(odsc.Category4__c)){ |
| | | userData.Dept__c = odsc.Category4__c;//本部 |
| | | //20220823 you LLIU-CHL8FB start |
| | | if(null!=DeptMap && DeptMap.containsKey(odsc.Category4__c)){ |
| | | userData.Dept__c = DeptMap.get(odsc.Category4__c);//本部 |
| | | }else{ |
| | | userData.Dept__c = odsc.Category4__c;//本部 |
| | | } |
| | | //20220823 you LLIU-CHL8FB end |
| | | } |
| | | userData.Category5__c = odsc.Category5__c;//部 |
| | | userData.Category6__c = odsc.Category6__c;//课 |
| | |
| | | //20220428 LLIU-CDW5ZW you start |
| | | userData.PositionSubsequence__c = odsc.PositionSubsequence__c; |
| | | //20220428 LLIU-CDW5ZW you end |
| | | //20220512 you LLIU-CDW5ZW start |
| | | userData.Rank__c = odsc.Rank__c; |
| | | //20220428 you LLIU-CDW5ZW end |
| | | // 20220721 you LLIU-CGH8EY start 注释,依据本部和岗位子序列 给职种赋值 |
| | | /** |
| | | String zz = ''; |
| | | if(odsc.Job_Category__c == '服务'){ |
| | | zz = '销售服务'; |
| | |
| | | //如果自定义变迁的值为1,那么证明现在是在处理历史数据,而历史数据规定,如果ods的职种为空,那么就不需要更新user的职种 |
| | | if(String.isNotBlank(zz) || buffer != 1){ |
| | | userData.Job_Category__c = zz;//职种 |
| | | } |
| | | }**/ |
| | | String bbz=odsc.Category4__c+'-' +odsc.PositionSubsequence__c; //本部-岗位子序列 |
| | | String ldbb=odsc.Salesdepartment__c+'-' +odsc.PositionSubsequence__c; //六大本部-岗位子序列 |
| | | String bbz1=odsc.Category5__c+'-' +odsc.PositionSubsequence__c; //部-岗位子序列 |
| | | //本部不等于空,看本部 |
| | | String zz = ''; |
| | | if( (String.isNotBlank(odsc.PositionSubsequence__c) && odsc.PositionSubsequence__c=='供应链管理') || ( String.isNotBlank(odsc.Category4__c) && odsc.Category4__c=='战略创新本部')){ |
| | | zz = '管理'; |
| | | }else if( String.isNotBlank(odsc.Category4__c) && odsc.Category4__c=='Solution本部'){ |
| | | zz = '市场'; |
| | | }else if(String.isNotBlank(odsc.Category4__c)){ |
| | | if(null!=Job_CategoryMap && Job_CategoryMap.containsKey(bbz)){ |
| | | if(Job_CategoryMap.get(bbz) == '服务'){ |
| | | zz = '销售服务'; |
| | | }else if(Job_CategoryMap.get(bbz) == '推广'){ |
| | | zz = '销售推广'; |
| | | }else{ |
| | | zz = Job_CategoryMap.get(bbz); |
| | | } |
| | | } |
| | | if(null!=Job_CategoryMap && Job_CategoryMap.containsKey(ldbb)){ |
| | | if(Job_CategoryMap.get(ldbb) == '服务'){ |
| | | zz = '销售服务'; |
| | | }else if(Job_CategoryMap.get(ldbb) == '推广'){ |
| | | zz = '销售推广'; |
| | | }else{ |
| | | zz = Job_CategoryMap.get(ldbb); |
| | | } |
| | | } |
| | | |
| | | }else if(String.isBlank(odsc.Category4__c) && String.isNotBlank(odsc.Category5__c)){ |
| | | //本部等于空,看部 LLIU-CKE3UG 增加映射关系 |
| | | if(odsc.Category5__c=='华北东北运营管理部' || odsc.Category5__c=='西北西南运营管理部' || odsc.Category5__c=='西北西南运营支援部' || bbz1=='华北东北服务部-综合行政' || bbz1=='华北东北市场部-综合行政'){ |
| | | zz = '支援'; |
| | | }else if(bbz1=='华北东北服务部-FSE'){ |
| | | zz = '销售服务'; |
| | | }else if(odsc.Category5__c=='西部战略推进部' || bbz1=='华北东北市场部-推广'){ |
| | | zz = '销售推广'; |
| | | } |
| | | } |
| | | userData.Job_Category__c = zz; |
| | | |
| | | // 20220721 you LLIU-CGH8EY end |
| | | userData.Null_Update__c = odsc.Null_Update__c; |
| | | userData.Product_specialist_incharge_product__c = odsc.Product_specialist_incharge_product__c;//负责产品(主) |
| | | userData.Sales_Speciality__c = odsc.Sales_Speciality__c;//销售工作内容 |
| | |
| | | |
| | | ,eventStatus__c, CancelReason__c, delayToDate__c, delayReason__c,DurationInMinutes__c,cancelReasonSelect__c,cancelReasonSelectFSE__c,cancelReasonOther__c,delayReasonOther__c,delayReasonSelect__c,delayReasonSelectFSE__c,BeforeActivityDate__c,OPDPlan_Flag__c,IsScheduled__c,AppCdId__c,SyncCreatedDate__c |
| | | // 20200420 任务日报管理 add gzw end |
| | | ,OPD_plan__c // 2022-4-14 yjk 增加OPD计划 |
| | | //,OPD_plan__c // 2022-4-14 yjk 增加OPD计划 |
| | | from Event__c where ActivityDate__c =:whereDate and Daily_Report__c = :oya.Id order by StartDateTime__c |
| | | ]; |
| | | } |
| | |
| | | Discount_Amount_F__c, |
| | | Discount_Amount_Calculate_F__c, |
| | | BidAnnounce__c, |
| | | Quote_No_last2__c, |
| | | // 2022-03-21 SWAG-CBX5NN start |
| | | multiYearWarranty__c, |
| | | MultiYearWarrantyTotalPrice__c |
| | | // 2022-03-21 SWAG-CBX5NN end |
| | | |
| | | Quote_No_last2__c |
| | | FROM |
| | | Quote |
| | | WHERE |
| | |
| | | public static void lostOrder(Lost_Report__c lostData) { |
| | | upsert lostData; |
| | | } |
| | | |
| | | // FY23修改 WLIG-CFV4AV 重点产品维护(新)start |
| | | public static String getKeyByProduct(String keyword) { |
| | | if (String.isBlank(keyword)) { |
| | | return null; |
| | | } |
| | | String KeyProductMapping = System.Label.Key_Product_Mapping; |
| | | Map<String, Object> mapping = (Map<String, Object>) JSON.deserializeUntyped(KeyProductMapping); |
| | | System.debug('==Mapping is: ' + mapping); |
| | | |
| | | return mapping.get(keyword) != null ? String.valueOf(mapping.get(keyword)) : null; |
| | | } |
| | | // FY23修改 WLIG-CFV4AV 重点产品维护(新)end |
| | | |
| | | //20221021 lt SWAG-CHL5XA【FY23询价改善】-统计主机台数 start |
| | | public static void UpdateBiddingFlag(List<String> oppId){ |
| | | List<Tender_Opportunity_Link__c> links = [SELECT Id, Tender_information__c, Tender_information__r.IsReactionOpp__c, Opportunity__c |
| | | FROM Tender_Opportunity_Link__c |
| | | WHERE Opportunity__c in :oppId ]; |
| | | |
| | | Map<String,Tender_information__c> tenderMap = new Map<String,Tender_information__c>(); |
| | | |
| | | for (Tender_Opportunity_Link__c link : links){ |
| | | |
| | | Tender_information__c temptender = new Tender_information__c(); |
| | | temptender.Id = link.Tender_information__c; |
| | | temptender.IsReactionOpp__c = true; |
| | | tenderMap.put(temptender.id ,temptender); |
| | | |
| | | } |
| | | |
| | | if(tenderMap.size()>0){ |
| | | update tenderMap.values(); |
| | | } |
| | | |
| | | } |
| | | //20221021 lt SWAG-CHL5XA【FY23询价改善】-统计主机台数 end |
| | | |
| | | } |
| | |
| | | // Account internalAcc = [Select Id from Account where Id = :System.Label.Olympus_AccountID_Internal_staff]; |
| | | // // データがあればOK; |
| | | //} |
| | | @TestSetup |
| | | static void setup(){ |
| | | TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Agency_Contact__c','Contact'}); |
| | | } |
| | | |
| | | @isTest |
| | | static void Test1(){ |
| | | Test.setMock(HttpCalloutMock.class, new HttpMock()); |
| | | |
| | | List<Agency_Contact__c> lra = new List<Agency_Contact__c>(); |
| | | lra.add(new Agency_Contact__c( |
| | | )); |
| | | insert lra; |
| | | Test.startTest(); |
| | | //system.debug(PIHelper.getPIIntegrationInfo('Agency_Contact__c').newEncryptUrl); |
| | | AWSServiceTool2.EncryptPushCore(Json.serialize(lra),'Agency_Contact__c'); |
| | | AWSServiceTool2.EncryptPushFuture(null,null); |
| | | Test.stopTest(); |
| | | } |
| | | |
| | | @isTest |
| | | static void Test2(){ |
| | | Test.setMock(HttpCalloutMock.class, new HttpMock()); |
| | | |
| | | List<Agency_Contact__c> lra = new List<Agency_Contact__c>(); |
| | | lra.add(new Agency_Contact__c( |
| | | Aws_Data_Id__c = '123456' |
| | | )); |
| | | insert lra; |
| | | Test.startTest(); |
| | | //system.debug(PIHelper.getPIIntegrationInfo('Agency_Contact__c').newEncryptUrl); |
| | | AWSServiceTool2.EncryptPushCore(Json.serialize(lra),'Agency_Contact__c'); |
| | | Test.stopTest(); |
| | | } |
| | | |
| | | @isTest |
| | | static void Test3(){ |
| | | Test.setMock(HttpCalloutMock.class, new HttpMock()); |
| | | |
| | | |
| | | Test.startTest(); |
| | | AWSServiceTool2.EncryptPushData(new string[]{'0031000000O4Cff'}); |
| | | |
| | | Test.stopTest(); |
| | | } |
| | | |
| | | class HttpMock implements HttpCalloutMock{ |
| | | |
| | | public HTTPResponse respond(HTTPRequest request) { |
| | | // 创建一个假的回应 |
| | | System.debug('------------------------------------------------------'); |
| | | HttpResponse response = new HttpResponse(); |
| | | string body = ''; |
| | | system.debug(request.getEndpoint()); |
| | | if(request.getEndpoint().contains('token')){ |
| | | system.debug('url=token'); |
| | | response.setHeader('Content-Type', 'application/json'); |
| | | body='{ "message": "", "object": "freqfewqfewewfewfew", "status": "", "success": true, "timestamp": 0, "txId": "" }'; |
| | | } else if(request.getEndpoint().contains('insert')){ |
| | | system.debug('url=Insert'); |
| | | response.setHeader('Content-Type', 'application/json'); |
| | | body='{ "message": "", "object": [ { "dataId": "123456", "directShippmentAddress": "", "directShippmentAddressEncrypt": "", "isDelete": 0, "phoneNumber": "", "phoneNumberEncrypt": "", "sfRecordId": "a2R1m0000007BPD" } ], "status": "", "success": true, "timestamp": 0, "txId": "" }'; |
| | | } else if(request.getEndpoint().contains('update')){ |
| | | system.debug('url=update'); |
| | | response.setHeader('Content-Type', 'application/json'); |
| | | body='{ "message": "", "object": [ { "dataId": "123456", "directShippmentAddress": "", "directShippmentAddressEncrypt": "", "isDelete": 0, "phoneNumber": "", "phoneNumberEncrypt": "", "sfRecordId": "a2R1m0000007BPD" } ], "status": "", "success": true, "timestamp": 0, "txId": "" }'; |
| | | } else{ |
| | | |
| | | } |
| | | |
| | | response.setBody(body); |
| | | response.setStatus('OK'); |
| | | response.setStatusCode(200); |
| | | return response; |
| | | // } |
| | | } |
| | | } |
| | | private static User getUser() { |
| | | String timenow = Datetime.now().format('yyyyMMddHHmmss'); |
| | | User user1 = new User(Test_staff__c = true, LastName = 'TestMao', FirstName = 'TestMaoF', |
| | |
| | | accDep.CurrencyIsoCode = 'CNY'; |
| | | accDep.RecordTypeId = rtDep.id; |
| | | insert accDep; |
| | | List<Contact> conList = new List<Contact>(); |
| | | Contact con1 = new Contact(); |
| | | con1.Firstname='ZZ1'; |
| | | con1.LastName = '取引先責任者1'; |
| | | con1.RecordTypeId = rtDoc.id; |
| | | con1.AccountId = accDep.Id; |
| | | conList.add(con1); |
| | | //List<Contact> conList = new List<Contact>(); |
| | | //Contact con1 = new Contact(); |
| | | //con1.Firstname='ZZ1'; |
| | | //con1.LastName = '取引先責任者1'; |
| | | //con1.RecordTypeId = rtDoc.id; |
| | | //con1.AccountId = accDep.Id; |
| | | //conList.add(con1); |
| | | |
| | | insert conList; |
| | | //insert conList; |
| | | RecordType Type = [select id from RecordType where DeveloperName='SI_Oppor']; |
| | | String TypeID = Type.Id; |
| | | Opportunity opp1 = new Opportunity(); |
| | |
| | | accDep.CurrencyIsoCode = 'CNY'; |
| | | accDep.RecordTypeId = rtDep.id; |
| | | insert accDep; |
| | | List<Contact> conList = new List<Contact>(); |
| | | Contact con1 = new Contact(); |
| | | con1.Firstname='ZZ1'; |
| | | con1.LastName = '取引先責任者1'; |
| | | con1.RecordTypeId = rtDoc.id; |
| | | con1.AccountId = accDep.Id; |
| | | conList.add(con1); |
| | | //List<Contact> conList = new List<Contact>(); |
| | | //Contact con1 = new Contact(); |
| | | //con1.Firstname='ZZ1'; |
| | | //con1.LastName = '取引先責任者1'; |
| | | //con1.RecordTypeId = rtDoc.id; |
| | | //con1.AccountId = accDep.Id; |
| | | //conList.add(con1); |
| | | |
| | | insert conList; |
| | | //insert conList; |
| | | RecordType Type = [select id from RecordType where DeveloperName='SI_Oppor']; |
| | | String TypeID = Type.Id; |
| | | Opportunity opp1 = new Opportunity(); |
| New file |
| | |
| | | /************************************************************************************************** |
| | | @Author: 黄千龙 |
| | | @Name: CoverageTargetHPBatch |
| | | @CreateDate: 13/04/2022 |
| | | @Description: 覆盖率目标医院 |
| | | @Version 1.0 |
| | | *****************************************************************************************************/ |
| | | global class CoverageTargetHPBatch implements Database.Batchable<sObject>,Database.Stateful { |
| | | public String query; |
| | | private BatchIF_Log__c iflog; |
| | | public List < String > accountIdList; |
| | | global CoverageTargetHPBatch() { |
| | | this.query = query; |
| | | } |
| | | |
| | | global CoverageTargetHPBatch(List < String > accountIdList) { |
| | | this.query = query; |
| | | this.accountIdList = accountIdList; |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | system.debug('执行start'); |
| | | iflog = new BatchIF_Log__c(); |
| | | iflog.Type__c = 'PushNotification'; |
| | | iflog.Log__c = 'CoverageTargetHPBatch start\n'; |
| | | iflog.ErrorLog__c = ''; |
| | | insert iflog; |
| | | String query = 'SELECT Id,Name,IF_Coverage_Target_HP__c FROM Account WHERE Is_Active__c =\'有効\' AND RecordType.DeveloperName =\'HP\' AND ( NOT Name LIKE \'%olympus%\') AND ( NOT Name LIKE \'%TEST%\')'; |
| | | if (accountIdList != null && accountIdList.size() > 0) { |
| | | query += ' AND Id IN :accountIdList'; |
| | | } |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Account> accList) { |
| | | List<String> accIds = new List<String>(); |
| | | for(Account acc:accList){ |
| | | accIds.add(acc.Id); |
| | | } |
| | | List<Account> updateAccList = new List<Account>(); |
| | | for(AggregateResult result:[SELECT count(Id),Hospital__c FROM Asset WHERE Product2.ServiceCategory__c ='软性镜' AND Hospital__c IN: accIds AND (Status = '使用中' or Status = '未使用' or Status = '不明') Group by Hospital__c having count(Id)>=5]){ |
| | | Account acc = new Account(); |
| | | acc.Id = String.valueOf(result.get('Hospital__c')); |
| | | acc.IF_Coverage_Target_HP__c= '1'; |
| | | updateAccList.add(acc); |
| | | } |
| | | Oly_TriggerHandler.bypass('NFM701ControllerHandler'); |
| | | Oly_TriggerHandler.bypass('UpdateContractAimAmountHandler'); |
| | | update updateAccList; |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | iflog.Log__c += '\nCoverageTargetHPBatch end'; |
| | | String tmp = iflog.ErrorLog__c; |
| | | if (tmp.length() > 65000) { |
| | | tmp = tmp.substring(0, 65000); |
| | | tmp += ' ...have more lines...'; |
| | | iflog.ErrorLog__c = tmp; |
| | | } |
| | | update iflog; |
| | | if (accountIdList != null && accountIdList.size() > 0) { |
| | | database.executeBatch(new EquipmentCoverageTargetBatch(accountIdList),200); |
| | | }else{ |
| | | database.executeBatch(new EquipmentCoverageTargetBatch(),200); |
| | | } |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class CoverageTargetHPBatchTest { |
| | | static testMethod void testMethod1() { |
| | | database.executeBatch(new CoverageTargetHPBatch(),200); |
| | | } |
| | | @testSetup |
| | | private static void setUpDate(){ |
| | | // 病院を作る |
| | | Date toDayTime = Date.today(); |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'hospitalabc'; |
| | | hospital.Is_Active__c = '有効'; |
| | | hospital.Attribute_Type__c = '卫生部'; |
| | | hospital.Speciality_Type__c = '综合医院'; |
| | | hospital.Grade__c = '一级'; |
| | | hospital.IF_Coverage_Target_HP__c = '1'; |
| | | hospital.OCM_Category__c = 'SLTV'; |
| | | hospital.Is_Medical__c = '医疗机构'; |
| | | hospital.Town__c = '东京'; |
| | | Oly_TriggerHandler.bypass('NFM701ControllerHandler'); |
| | | Oly_TriggerHandler.bypass('UpdateContractAimAmountHandler'); |
| | | insert hospital; |
| | | |
| | | // 戦略科室を得る |
| | | Account[] strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_OTH']; |
| | | // 診療科を作る |
| | | Account dep = new Account(); |
| | | dep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_OTH'].id; |
| | | dep.Name = 'test dep'; |
| | | dep.AgentCode_Ext__c = System.Label.Account_Asset_FJZ; |
| | | dep.ParentId = strategicDep[0].Id; |
| | | dep.Department_Class__c = strategicDep[0].Id; |
| | | dep.Hospital__c = hospital.Id; |
| | | Oly_TriggerHandler.bypass('NFM701ControllerHandler'); |
| | | Oly_TriggerHandler.bypass('UpdateContractAimAmountHandler'); |
| | | insert dep; |
| | | |
| | | |
| | | |
| | | // 产品 |
| | | Product2 pro1 = new Product2(Name='name01',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n01',Serial_Lot_No__c='S/N tracing', |
| | | Fixture_Model_No_T__c = 'n01', |
| | | Maintenance_Price_Year__c = 999, |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | ProductCode_Ext__c='pc01',Manual_Entry__c=false,Brand_Name__c='奥林巴斯', |
| | | Category2__c='本体', |
| | | Category3__c='电子镜'); |
| | | Product2 pro2 = new Product2(Name='name02',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n02',Serial_Lot_No__c='Lot tracing', |
| | | ProductCode_Ext__c='pc02',Manual_Entry__c=false,Brand_Name__c='奥林巴斯', |
| | | Category2__c='本体', |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | Maintenance_Price_Year__c = 999, |
| | | Category3__c='纤维镜'); |
| | | Product2 pro3 = new Product2(Name='name03',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n03',Serial_Lot_No__c='Lot tracing', |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | ProductCode_Ext__c='pc03',Manual_Entry__c=false,Brand_Name__c='奥林巴斯', |
| | | Category2__c='本体', |
| | | Maintenance_Price_Year__c = 999, |
| | | Category3__c='电子镜'); |
| | | Product2 pro4 = new Product2(Name='name04',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n04',Serial_Lot_No__c='Lot tracing', |
| | | ProductCode_Ext__c='pc04',Manual_Entry__c=false,Brand_Name__c='奥林巴斯', |
| | | Category2__c='本体', |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | Maintenance_Price_Year__c = 999, |
| | | Category3__c='电子镜'); |
| | | Product2 pro5 = new Product2(Name='name05',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n05',Serial_Lot_No__c='Lot tracing',Brand_Name__c='奥林巴斯', |
| | | Category2__c='本体', |
| | | Maintenance_Price_Year__c = 999, |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | ProductCode_Ext__c='pc05',Manual_Entry__c=false, |
| | | Category3__c='电子镜'); |
| | | insert new Product2[] {pro1, pro2, pro3,pro4,pro5}; |
| | | |
| | | |
| | | |
| | | Maintenance_Contract__c contract = new Maintenance_Contract__c(); |
| | | contract.Name = 'tect contract'; |
| | | contract.status__c ='契約'; |
| | | contract.Maintenance_Contract_No__c = 'Kami_Contract_No'; |
| | | contract.Contract_Conclusion_Date__c = Date.today(); |
| | | contract.Hospital__c = hospital.Id; |
| | | contract.Department_Class__c = strategicDep[0].Id; |
| | | contract.Department__c = dep.Id; |
| | | contract.Contract_Start_Date__c=Date.newInstance(toDayTime.year(),3,2); // 10日前 |
| | | contract.Contract_End_Date__c = Date.newInstance(toDayTime.year()+1,3,20); // 5日後 |
| | | contract.SalesOfficeCode_selection__c = '北京RC'; |
| | | contract.RecordTypeId = Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByDeveloperName().get('VM_Contract').getRecordTypeId(); |
| | | insert contract; |
| | | |
| | | List<Maintenance_Contract__c> MaintenanceContract=[select id from Maintenance_Contract__c]; |
| | | |
| | | //---------------------------主体 两个附属品(个体管理 数量管理) |
| | | // 保有设备A (主体) |
| | | Asset assetA1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA1.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA1.SerialNumber = 'ass01'; |
| | | assetA1.Name = 'ass01'; |
| | | assetA1.AccountId = dep.Id; |
| | | assetA1.Department_Class__c = strategicDep[0].Id; |
| | | assetA1.Hospital__c = hospital.Id; |
| | | assetA1.Product2Id = pro1.Id; |
| | | assetA1.Quantity = 1; |
| | | |
| | | assetA1.Status = '使用中'; |
| | | assetA1.Manage_type__c = '个体管理'; |
| | | assetA1.Loaner_accsessary__c = false; |
| | | assetA1.Product_category__c = 'GI'; |
| | | assetA1.Delete_Flag__c = false; |
| | | assetA1.Freeze_sign__c = false; |
| | | assetA1.Out_of_wh__c = 0; |
| | | assetA1.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA1.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA1.Product_category__c = 'GI'; |
| | | assetA1.Equipment_Type__c = '产品试用'; |
| | | assetA1.SalesProvince__c = '北京'; |
| | | assetA1.WH_location__c = '货架号1'; |
| | | assetA1.Asset_loaner_category__c = '固定资产'; |
| | | assetA1.CompanyOfEquipment__c = '123'; |
| | | assetA1.Internal_Asset_number__c = '123'; |
| | | assetA1.CurrentContract__c=MaintenanceContract[0].Id; |
| | | // assetA1.AssetManageConfirm__c = true; |
| | | // 保有设备A (附属品 数量管理) |
| | | Asset assetA2 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA2.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA2.SerialNumber = 'ass02'; |
| | | assetA2.Name = 'ass02'; |
| | | assetA2.AccountId = dep.Id; |
| | | assetA2.Department_Class__c = strategicDep[0].Id; |
| | | assetA2.Hospital__c = hospital.Id; |
| | | assetA2.Product2Id = pro2.Id; |
| | | assetA2.Quantity = 10; |
| | | assetA2.Status = '使用中'; |
| | | assetA2.Manage_type__c = '数量管理'; |
| | | assetA2.Loaner_accsessary__c = true; |
| | | assetA2.Product_category__c = 'GI'; |
| | | assetA2.Delete_Flag__c = false; |
| | | assetA2.Freeze_sign__c = false; |
| | | assetA2.Out_of_wh__c = 3; |
| | | |
| | | assetA2.Frozen_Quantity__c = 2; |
| | | assetA2.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA2.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA2.Product_category__c = 'GI'; |
| | | assetA2.Equipment_Type__c = '产品试用'; |
| | | assetA2.SalesProvince__c = '北京'; |
| | | assetA2.WH_location__c = '货架号2'; |
| | | assetA2.Asset_loaner_category__c = '固定资产'; |
| | | assetA2.CompanyOfEquipment__c = '123'; |
| | | assetA2.Internal_Asset_number__c = '123'; |
| | | assetA2.CurrentContract__c=MaintenanceContract[0].Id; |
| | | // assetA2.AssetManageConfirm__c = true; |
| | | // 保有设备A (附属品 个体管理) |
| | | Asset assetA3 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA3.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA3.SerialNumber = 'ass03'; |
| | | assetA3.Name = 'ass03'; |
| | | assetA3.AccountId = dep.Id; |
| | | assetA3.Department_Class__c = strategicDep[0].Id; |
| | | assetA3.Hospital__c = hospital.Id; |
| | | assetA3.Product2Id = pro3.Id; |
| | | assetA3.Quantity = 10; |
| | | assetA3.Status = '使用中'; |
| | | assetA3.Manage_type__c = '数量管理'; |
| | | assetA3.Loaner_accsessary__c = true; |
| | | assetA3.Product_category__c = 'GI'; |
| | | assetA3.Delete_Flag__c = false; |
| | | |
| | | assetA3.Freeze_sign__c = false; |
| | | assetA3.Out_of_wh__c = 3; |
| | | assetA3.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA3.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA3.Product_category__c = 'GI'; |
| | | assetA3.Equipment_Type__c = '产品试用'; |
| | | assetA3.SalesProvince__c = '北京'; |
| | | assetA3.WH_location__c = '货架号3'; |
| | | assetA3.Abandoned_Inventory__c = 1; |
| | | assetA3.Asset_loaner_category__c = '固定资产'; |
| | | assetA3.CompanyOfEquipment__c = '123'; |
| | | assetA3.Internal_Asset_number__c = '123'; |
| | | assetA3.CurrentContract__c=MaintenanceContract[0].Id; |
| | | |
| | | // 保有设备A (附属品 数量管理) |
| | | Asset assetA4 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA4.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA4.SerialNumber = 'ass04'; |
| | | assetA4.Name = 'ass04'; |
| | | assetA4.AccountId = dep.Id; |
| | | assetA4.Department_Class__c = strategicDep[0].Id; |
| | | assetA4.Hospital__c = hospital.Id; |
| | | assetA4.Product2Id = pro4.Id; |
| | | assetA4.Quantity = 10; |
| | | assetA4.Status = '使用中'; |
| | | |
| | | assetA4.Manage_type__c = '数量管理'; |
| | | assetA4.Loaner_accsessary__c = true; |
| | | assetA4.Product_category__c = 'GI'; |
| | | assetA4.Delete_Flag__c = false; |
| | | assetA4.Freeze_sign__c = false; |
| | | assetA4.Out_of_wh__c = 3; |
| | | assetA4.Frozen_Quantity__c = 2; |
| | | assetA4.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA4.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA4.Product_category__c = 'GI'; |
| | | assetA4.Equipment_Type__c = '产品试用'; |
| | | assetA4.SalesProvince__c = '北京'; |
| | | assetA4.WH_location__c = '货架号2'; |
| | | assetA4.Asset_loaner_category__c = '固定资产'; |
| | | assetA4.CompanyOfEquipment__c = '123'; |
| | | assetA4.Internal_Asset_number__c = '123'; |
| | | assetA4.CurrentContract__c=MaintenanceContract[0].Id; |
| | | // assetA2.AssetManageConfirm__c = true; |
| | | |
| | | // 保有设备A (附属品 数量管理) |
| | | Asset assetA5 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA5.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA5.SerialNumber = 'ass05'; |
| | | assetA5.Name = 'ass05'; |
| | | assetA5.AccountId = dep.Id; |
| | | assetA5.Department_Class__c = strategicDep[0].Id; |
| | | assetA5.Hospital__c = hospital.Id; |
| | | assetA5.Product2Id = pro5.Id; |
| | | assetA5.Quantity = 10; |
| | | assetA5.Status = '使用中'; |
| | | assetA5.Manage_type__c = '数量管理'; |
| | | assetA5.Loaner_accsessary__c = true; |
| | | assetA5.Product_category__c = 'GI'; |
| | | assetA5.Delete_Flag__c = false; |
| | | |
| | | assetA5.Freeze_sign__c = false; |
| | | assetA5.Out_of_wh__c = 3; |
| | | assetA5.Frozen_Quantity__c = 2; |
| | | assetA5.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA5.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA5.Product_category__c = 'GI'; |
| | | assetA5.Equipment_Type__c = '产品试用'; |
| | | assetA5.SalesProvince__c = '北京'; |
| | | assetA5.WH_location__c = '货架号2'; |
| | | assetA5.Asset_loaner_category__c = '固定资产'; |
| | | assetA5.CompanyOfEquipment__c = '123'; |
| | | assetA5.Internal_Asset_number__c = '123'; |
| | | assetA5.CurrentContract__c=MaintenanceContract[0].Id; |
| | | // assetA2.AssetManageConfirm__c = true; |
| | | Oly_TriggerHandler.bypass('AssetHandlerCheck'); |
| | | insert new Asset[] {assetA1, assetA2, assetA3,assetA4,assetA5}; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | global class Create888AlarmBatch implements Database.Batchable<sObject> , Database.AllowsCallouts, Database.Stateful { |
| | | public Date installDate = Date.newInstance(1900, 1, 1); |
| | | public Date nowDate = Date.today(); |
| | | global Create888AlarmBatch() { |
| | | |
| | | } |
| | | //Database.QueryLocator |
| | | global List<Asset> start(Database.BatchableContext bc) { |
| | | //Is_Add_888_Alarm__c = 'False' 首次执行去掉这个条件或者更新所有Asset的这个字段为False |
| | | List<Asset> assetList = [Select Id,InstallDate,SerMarGuranteeType__c,InstallDate__c,Extend_Gurantee_DateTo__c,CurrentContract__c,CurrentContract_Start_Date__c,CurrentContract_End_Date__c,Is_Add_888_Alarm__c FROM Asset |
| | | Where Is_Add_888_Alarm__c = 'False' AND (InstallDate!= null OR InstallDate!= :installDate) |
| | | AND ((CurrentContract_End_Date__c >=: nowDate AND CurrentContract_Start_Date__c <= :nowDate) OR (Extend_Gurantee_DateTo__c >= :nowDate AND InstallDate__c <= :nowDate ))]; |
| | | /*return Database.getQueryLocator([Select Id,InstallDate,SerMarGuranteeType__c,InstallDate__c,Extend_Gurantee_DateTo__c,CurrentContract__c,CurrentContract_Start_Date__c,CurrentContract_End_Date__c,Is_Add_888_Alarm__c FROM Asset |
| | | Where Is_Add_888_Alarm__c = 'False' AND (InstallDate!= null OR InstallDate!= :installDate) |
| | | AND ((CurrentContract_End_Date__c >=: nowDate AND CurrentContract_Start_Date__c <= :nowDate) OR (Extend_Gurantee_DateTo__c >= :nowDate AND InstallDate__c <= :nowDate )) |
| | | AND Id = '02i100000036gbhAAA' LIMIT 1]);*/ |
| | | return assetList; |
| | | |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC,List<Asset> assetList) { |
| | | //assetList = [Select Id,InstallDate,SerMarGuranteeType__c,InstallDate__c,Extend_Gurantee_DateTo__c,CurrentContract__c,CurrentContract_Start_Date__c,CurrentContract_End_Date__c,Is_Add_888_Alarm__c FROM Asset Where Is_Add_888_Alarm__c = 'False' AND (InstallDate!= null OR InstallDate!= :installDate)]; |
| | | System.debug(LoggingLevel.INFO, '*** assetList: ' + assetList); |
| | | if (assetList.size() > 0) { |
| | | List<Alarm_888_Month__c> alarm888List= new List<Alarm_888_Month__c>(); |
| | | for (Asset asset : assetList) { |
| | | Integer alarmNumber = 1; |
| | | if (asset.SerMarGuranteeType__c != null) { |
| | | //多年保 |
| | | // Date startDate = nowDate<asset.InstallDate__c ? nowDate : asset.InstallDate__c; |
| | | Date startDate = nowDate; |
| | | //monthsBetween |
| | | Integer count = (asset.Extend_Gurantee_DateTo__c.year()-asset.InstallDate__c.year()) * 2; |
| | | while(startDate < asset.Extend_Gurantee_DateTo__c && alarmNumber<= count){ |
| | | Alarm_888_Month__c alarm888 = new Alarm_888_Month__c(); |
| | | String numberStr = '第'+alarmNumber+'次做业务'; |
| | | alarm888.Number_Of_Operations__c = numberStr; |
| | | alarm888.Nth_Operating_Day__c = startDate.addMonths(6); |
| | | alarm888.Alarm_Date__c = alarm888.Nth_Operating_Day__c.addMonths(-2); |
| | | alarm888.Asset_ID__c = asset.Id; |
| | | alarm888List.add(alarm888); |
| | | alarmNumber++; |
| | | startDate = startDate.addMonths(6); |
| | | //最后一次预警 提前服务结束时间3个月为操作日 |
| | | if (startDate.addMonths(-6) < asset.Extend_Gurantee_DateTo__c && startDate >= asset.Extend_Gurantee_DateTo__c) { |
| | | Alarm_888_Month__c alarm888Last = new Alarm_888_Month__c(); |
| | | numberStr = '第'+alarmNumber+'次做业务'; |
| | | alarm888Last.Number_Of_Operations__c = numberStr; |
| | | alarm888Last.Nth_Operating_Day__c = asset.Extend_Gurantee_DateTo__c.addMonths(-3); |
| | | alarm888Last.Alarm_Date__c = alarm888Last.Nth_Operating_Day__c.addMonths(-2); |
| | | alarm888Last.Asset_ID__c = asset.Id; |
| | | alarm888List.add(alarm888Last); |
| | | } |
| | | } |
| | | /* if (asset.SerMarGuranteeType__c == '市场多年保修') { |
| | | //23.8,24.2,24.8,25.2 24.9 end-start 时间 |
| | | |
| | | }else if (asset.SerMarGuranteeType__c == '服务多年保修') { |
| | | while(startDate <= asset.Extend_Gurantee_DateTo__c.addDays(5) && alarmNumber<=8){ |
| | | Alarm_888_Month__c alarm888 = new Alarm_888_Month__c(); |
| | | String numberStr = '第'+alarmNumber+'次做业务'; |
| | | alarm888.Number_Of_Operations__c = numberStr; |
| | | alarm888.Nth_Operating_Day__c = startDate.addMonths(6); |
| | | alarm888.Alarm_Date__c = alarm888.Nth_Operating_Day__c.addMonths(-2); |
| | | alarm888.Asset_ID__c = asset.Id; |
| | | alarm888List.add(alarm888); |
| | | alarmNumber++; |
| | | startDate = startDate.addMonths(6); |
| | | } |
| | | }*/ |
| | | |
| | | }else{ |
| | | //维修合同 |
| | | //Date startDate = nowDate<asset.CurrentContract_Start_Date__c ? nowDate : asset.CurrentContract_Start_Date__c; |
| | | /*Date startDate = nowDate; |
| | | while(startDate <= asset.CurrentContract_End_Date__c.addDays(5) ){ |
| | | Alarm_888_Month__c alarm888 = new Alarm_888_Month__c(); |
| | | String numberStr = '第'+alarmNumber+'次做业务'; |
| | | alarm888.Number_Of_Operations__c = numberStr; |
| | | alarm888.Nth_Operating_Day__c = startDate.addMonths(6); |
| | | alarm888.Alarm_Date__c = alarm888.Nth_Operating_Day__c.addMonths(-2); |
| | | alarm888.Asset_ID__c = asset.Id; |
| | | alarm888List.add(alarm888); |
| | | alarmNumber++; |
| | | startDate = nowDate.addMonths(6); |
| | | }*/ |
| | | |
| | | } |
| | | asset.Is_Add_888_Alarm__c = 'True'; |
| | | } |
| | | StaticParameter.EscapeVMCTrigger = true; |
| | | update assetList; |
| | | StaticParameter.EscapeVMCTrigger = false; |
| | | insert alarm888List; |
| | | System.debug(LoggingLevel.INFO, '*** assetList: ' + assetList); |
| | | System.debug(LoggingLevel.INFO, '*** alarm888List: ' + alarm888List); |
| | | } |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class Create888AlarmBatchTest { |
| | | @TestSetup |
| | | public static void setup(){ |
| | | // 省 |
| | | Address_Level__c al = new Address_Level__c(); |
| | | al.Name = '東京'; |
| | | al.Level1_Code__c = 'CN-99'; |
| | | al.Level1_Sys_No__c = '999999'; |
| | | insert al; |
| | | // 市 |
| | | Address_Level2__c al2 = new Address_Level2__c(); |
| | | al2.Level1_Code__c = 'CN-99'; |
| | | al2.Level1_Sys_No__c = '999999'; |
| | | al2.Level1_Name__c = '東京'; |
| | | al2.Name = '渋谷区'; |
| | | al2.Level2_Code__c = 'CN-9999'; |
| | | al2.Level2_Sys_No__c = '9999999'; |
| | | al2.Address_Level__c = al.id; |
| | | insert al2; |
| | | |
| | | // 病院を作る |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'test hospital'; |
| | | hospital.Is_Active__c = '有効'; |
| | | hospital.Attribute_Type__c = '卫生部'; |
| | | hospital.Speciality_Type__c = '综合医院'; |
| | | hospital.Grade__c = '一级'; |
| | | hospital.OCM_Category__c = 'SLTV'; |
| | | hospital.Is_Medical__c = '医疗机构'; |
| | | hospital.State_Master__c = al.id; |
| | | hospital.City_Master__c = al2.id; |
| | | hospital.Town__c = '东京'; |
| | | insert hospital; |
| | | // 戦略科室を得る |
| | | Account strategicDep = new Account(); |
| | | strategicDep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_Class_OTH'].id; |
| | | strategicDep.Name = '其它'; |
| | | strategicDep.Department_Class_Label__c = '其他'; |
| | | strategicDep.Hospital__c = hospital.Id; |
| | | strategicDep.ParentId = hospital.Id; |
| | | insert strategicDep; |
| | | // 診療科を作る |
| | | Account dep = new Account(); |
| | | dep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_OTH'].id; |
| | | dep.Name = 'test dep'; |
| | | dep.AgentCode_Ext__c = '9999998'; |
| | | dep.ParentId = strategicDep.Id; |
| | | dep.Department_Class__c = strategicDep.Id; |
| | | dep.Hospital__c = hospital.Id; |
| | | insert new Account[] {dep}; |
| | | |
| | | Product2 pro1 = new Product2(Name='name01',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='MH-241',Serial_Lot_No__c='S/N tracing', |
| | | Fixture_Model_No_T__c = 'MH-241', Asset_Model_No__c = 'Pro1', |
| | | ProductCode_Ext__c='pc01',Manual_Entry__c=false); |
| | | Product2 pro2 = new Product2(Name='name02',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='MB-466',Serial_Lot_No__c='Lot tracing', |
| | | Fixture_Model_No_T__c = 'MB-466', Asset_Model_No__c = 'Pro2', |
| | | ProductCode_Ext__c='pc02',Manual_Entry__c=false,Extend_new_product_gurantee__c = true, |
| | | Extend_Gurantee_Start__c = Date.newInstance(2022, 3, 3),Extend_Gurantee_End__c = Date.newInstance(2023, 10,12)); |
| | | insert new Product2[] {pro1, pro2}; |
| | | |
| | | Asset asset1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | asset1.InstallDate = Date.newInstance(2022, 12,12); |
| | | asset1.Is_Add_888_Alarm__c = 'False'; |
| | | asset1.Product2Id = pro1.Id; |
| | | // asset1.IS_Extend_Gurantee__c = false; |
| | | asset1.warrantyType__c = '市场多年保修'; |
| | | // asset1.SerMarGuranteeType__c = '市场多年保'; |
| | | asset1.New_logic_data__c = true; |
| | | asset1.IS_Extend_Gurantee_Txt__c = false; |
| | | asset1.ProvistonPeriod__c = 3; |
| | | // asset1.Extend_Gurantee_DateTo__c = Date.today().addYears(1); |
| | | asset1.AssetMark__c = '主机'; |
| | | // asset1.Posting_Date__c = Date.today().addDays(-30); |
| | | asset1.ChangeWarrantyStartDate__c = Date.newInstance(2022, 7,12); |
| | | asset1.WarrantyChanges__c = true; |
| | | |
| | | // asset1.InstallDate__c = Date.newInstance(2022, 12,12); |
| | | |
| | | asset1.SerialNumber = 'sn01'; |
| | | asset1.Name = 'MH-2411'; |
| | | asset1.AccountId = dep.Id; |
| | | asset1.Department_Class__c = strategicDep.Id; |
| | | asset1.Hospital__c = hospital.Id; |
| | | // asset1.Product2Id = pro1.Id; |
| | | asset1.Quantity = 100; |
| | | asset1.Manage_type__c = '数量管理'; |
| | | asset1.Loaner_accsessary__c = true; |
| | | asset1.Out_of_wh__c = 0; |
| | | asset1.Salesdepartment__c = '0.备品中心'; |
| | | asset1.Product_category__c = 'GI'; |
| | | |
| | | asset1.Asset_loaner_category__c = '耗材'; |
| | | asset1.Delete_Flag__c = false; |
| | | asset1.AssetManageConfirm__c = true; |
| | | asset1.Equipment_Type__c = '产品试用'; |
| | | asset1.Fixture_OneToOne_Link__c = null; |
| | | asset1.Internal_asset_location__c = '上海 备品中心'; |
| | | asset1.Consumable_Guaranteen_end__c = System.today().addYears(1); |
| | | // asset1.RecordTypeId = '01210000000kOPM'; |
| | | // asset1.InstallDate__c = Date.newInstance(2022, 12,12); |
| | | /*asset1.RecordTypeId = System.Label.Asset_RecordType; |
| | | asset1.SerialNumber = 'sn01'; |
| | | asset1.Name = 'MH-241'; |
| | | asset1.AccountId = dep.Id; |
| | | asset1.Department_Class__c = strategicDep.Id; |
| | | asset1.Hospital__c = hospital.Id; |
| | | asset1.Product2Id = pro1.Id; |
| | | asset1.Quantity = 100; |
| | | asset1.Manage_type__c = '数量管理'; |
| | | asset1.Loaner_accsessary__c = true; |
| | | asset1.Out_of_wh__c = 0; |
| | | asset1.Salesdepartment__c = '0.备品中心'; |
| | | asset1.Product_category__c = 'GI'; |
| | | |
| | | asset1.Asset_loaner_category__c = '耗材'; |
| | | asset1.Delete_Flag__c = false; |
| | | asset1.AssetManageConfirm__c = true; |
| | | asset1.Equipment_Type__c = '产品试用'; |
| | | asset1.Fixture_OneToOne_Link__c = null; |
| | | asset1.Internal_asset_location__c = '上海 备品中心'; |
| | | asset1.RecordTypeId = '01210000000kOPR'; |
| | | asset1.Consumable_Guaranteen_end__c = System.today().addYears(1);*/ |
| | | |
| | | Asset asset2 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | asset2.InstallDate = Date.newInstance(2023, 1,12); |
| | | asset2.Is_Add_888_Alarm__c = 'False'; |
| | | asset2.Product2Id = pro2.Id; |
| | | asset2.RecordTypeId = '01210000000kOPM'; |
| | | // asset2.Asset_OwnerNew__c = '奥林巴斯'; |
| | | asset2.FirstApproveDate_old__c = Date.newInstance(2023, 2,12); |
| | | // asset2.IS_Extend_Gurantee__c = true; |
| | | // asset2.SerMarGuranteeType__c = '服务多年保修'; |
| | | asset2.New_logic_data__c = true; |
| | | asset2.IS_Extend_Gurantee_Txt__c = true; |
| | | asset2.Guarantee_period_year__c = 4; |
| | | // asset2.Extend_Gurantee_DateTo__c = Date.today().addYears(1); |
| | | asset2.AssetMark__c = '主机'; |
| | | // asset1.Posting_Date__c = Date.today().addDays(-30); |
| | | asset2.ChangeWarrantyStartDate__c = Date.newInstance(2022, 12,12); |
| | | asset2.WarrantyChanges__c = true; |
| | | // asset2.InstallDate__c = Date.newInstance(2023, 2,12); |
| | | |
| | | asset2.SerialNumber = 'sn02'; |
| | | asset2.Name = 'MB-4662'; |
| | | asset2.AccountId = dep.Id; |
| | | asset2.Department_Class__c = strategicDep.Id; |
| | | asset2.Hospital__c = hospital.Id; |
| | | // asset2.Product2Id = pro2.Id; |
| | | asset2.Quantity = 100; |
| | | asset2.Manage_type__c = '数量管理'; |
| | | asset2.Loaner_accsessary__c = true; |
| | | asset2.Out_of_wh__c = 0; |
| | | asset2.Salesdepartment__c = '0.备品中心'; |
| | | asset2.Product_category__c = 'GI'; |
| | | |
| | | asset2.Asset_loaner_category__c = '耗材'; |
| | | asset2.Delete_Flag__c = false; |
| | | asset2.AssetManageConfirm__c = true; |
| | | asset2.Equipment_Type__c = '产品试用'; |
| | | asset2.Fixture_OneToOne_Link__c = null; |
| | | asset2.Internal_asset_location__c = '上海 备品中心'; |
| | | // asset2.RecordTypeId = '01210000000kOPR'; |
| | | asset2.Consumable_Guaranteen_end__c = System.today().addYears(1); |
| | | |
| | | Asset asset3 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | asset3.InstallDate = Date.newInstance(2023, 1,12); |
| | | asset3.Is_Add_888_Alarm__c = 'False'; |
| | | asset3.Product2Id = pro2.Id; |
| | | // asset3.RecordTypeId = '01210000000kOPR'; |
| | | // asset2.Asset_OwnerNew__c = '奥林巴斯'; |
| | | // asset3.FirstApproveDate_old__c = Date.newInstance(2023, 2,12); |
| | | // asset2.IS_Extend_Gurantee__c = true; |
| | | // asset2.SerMarGuranteeType__c = '服务多年保修'; |
| | | // asset3.New_logic_data__c = true; |
| | | // asset3.IS_Extend_Gurantee_Txt__c = true; |
| | | // asset3.Guarantee_period_year__c = 4; |
| | | // asset2.Extend_Gurantee_DateTo__c = Date.today().addYears(1); |
| | | // asset3.AssetMark__c = '主机'; |
| | | // asset1.Posting_Date__c = Date.today().addDays(-30); |
| | | /*asset3.ChangeWarrantyStartDate__c = Date.newInstance(2022, 11,12); |
| | | asset3.WarrantyChanges__c = true;*/ |
| | | // asset2.InstallDate__c = Date.newInstance(2023, 2,12); |
| | | |
| | | asset3.CurrentContract_End_Date__c = Date.newInstance(2023, 11,12); |
| | | asset3.CurrentContract_Start_Date__c = Date.newInstance(2023, 1,12); |
| | | |
| | | asset3.SerialNumber = 'sn03'; |
| | | asset3.Name = 'MB-4663'; |
| | | asset3.AccountId = dep.Id; |
| | | asset3.Department_Class__c = strategicDep.Id; |
| | | asset3.Hospital__c = hospital.Id; |
| | | // asset2.Product2Id = pro2.Id; |
| | | asset3.Quantity = 100; |
| | | asset3.Manage_type__c = '数量管理'; |
| | | asset3.Loaner_accsessary__c = true; |
| | | asset3.Out_of_wh__c = 0; |
| | | asset3.Salesdepartment__c = '0.备品中心'; |
| | | asset3.Product_category__c = 'GI'; |
| | | |
| | | asset3.Asset_loaner_category__c = '耗材'; |
| | | asset3.Delete_Flag__c = false; |
| | | asset3.AssetManageConfirm__c = true; |
| | | asset3.Equipment_Type__c = '产品试用'; |
| | | asset3.Fixture_OneToOne_Link__c = null; |
| | | asset3.Internal_asset_location__c = '上海 备品中心'; |
| | | // asset2.RecordTypeId = '01210000000kOPR'; |
| | | asset3.Consumable_Guaranteen_end__c = System.today().addYears(1); |
| | | |
| | | Oly_TriggerHandler.bypass('AssetHandlerCheck'); |
| | | Oly_TriggerHandler.bypass('AssetHandlerMEBG'); |
| | | Oly_TriggerHandler.bypass('AssetHandler'); |
| | | Oly_TriggerHandler.bypass('PCLLostProduct2AssetHandler'); |
| | | StaticParameter.EscapeVMCTrigger = true; |
| | | insert new Asset[] {asset1, asset2,asset3}; |
| | | StaticParameter.EscapeVMCTrigger = false; |
| | | |
| | | } |
| | | |
| | | @isTest |
| | | public static void tesExecute() { |
| | | Test.StartTest(); |
| | | /*List<Asset> testList = [Select IS_Extend_Gurantee__c,AssetMark__c,Asset_OwnerNew__c,FirstApproveDate__c ,Id,InstallDate,SerMarGuranteeType__c,InstallDate__c,Extend_Gurantee_DateTo__c,CurrentContract__c,CurrentContract_Start_Date__c,CurrentContract_End_Date__c,Is_Add_888_Alarm__c FROM Asset |
| | | ]; |
| | | System.debug(LoggingLevel.INFO, '*** testList: ' + testList);*/ |
| | | Id execBTId = Database.executeBatch( new Create888AlarmBatch(),50); |
| | | System.assertEquals(execBTId != null, true,'执行失败'); |
| | | Test.stopTest(); |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>46.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | String query = 'SELECT Id,Status__c,Contract_Start_Date__c,Contract_print_completed__c,Contract_End_Date__c,Contract_Conclusion_Date__c,RecordType.DeveloperName ' |
| | | +'FROM Maintenance_Contract__c ' |
| | | +'WHERE RecordType.DeveloperName = \'NewMaintenance_Contract\' AND Contract_Start_Date__c != NULL AND Contract_End_Date__c != NULL ' |
| | | //URF限次合同2期 LY 20220811 start |
| | | +'AND URF_Contract__c = false ' |
| | | //URF限次合同2期 LY 20220811 end |
| | | +'AND Status__c = \'契約\' AND Contract_Conclusion_Date__c != NULL '; |
| | | if (String.isNotBlank(this.tempMainId)) { |
| | | query += 'AND Id = :tempMainId'; |
| | |
| | | // //第一版:当合同生效日晚于【合同开始日+3个月】,第一次发放计划顺延为4/1~6/30 (下一季度)。 |
| | | // //第二版:合同盖章完毕日晚于【合同开始日+3个月】,不生成第一个区间(即 顺延为下一季度)。 |
| | | // //第三版:盖章完毕日晚于合同开始日1个月以上,自动从第二季度开始 |
| | | if(tempNMC.Contract_print_completed__c > tempNMC.Contract_Start_Date__c.addMonths(1)){ |
| | | //2022-3-11 yjk 合同盖章日改为合同日 |
| | | if(tempNMC.Contract_Conclusion_Date__c > tempNMC.Contract_Start_Date__c.addMonths(1)){ |
| | | isDelay = true; |
| | | } |
| | | |
| | |
| | | oppSql += ' where id in :TEST_ID'; |
| | | }else{ |
| | | oppSql += ' where StageName = \'引合\' and ForecastAccuracyObject__c = true'; |
| | | oppSql += ' and Competitor__c in (\'A\',\'B\',\'C\',\'D\',\'E\') '; //2021-11-22 yjk 增加判断条件 询价等级 |
| | | // oppSql += ' and Competitor__c in (\'A\',\'B\',\'C\',\'D\',\'E\') '; //2021-11-22 yjk 增加判断条件 询价等级 |
| | | oppSql += ' and Competitor__c in (\'A\',\'B\',\'C\',\'D\') '; //2021-11-22 yjk 增加判断条件 询价等级 |
| | | |
| | | oppSql += ' and IsNextMonthOfVisit__c = false and SalesdepartmentForecast__c in :areas'; |
| | | // 5)客户为H层客户的询价 |
| | | // oppSql += ' and (OCM__c = \'H0\' or OCM__c = \'H1\')'; |
| | |
| | | opportunityCategorySP.add('ENT'); |
| | | String log = ''; |
| | | if (TEST_ID != null && TEST_ID.size() > 0) { |
| | | //oppSql += ' where id in :TEST_ID'; |
| | | oppSql += ' where OCSMRMB_Without_Tax__c >= 1000000 and OCSMRMB_Without_Tax__c <= 2000000'; |
| | | oppSql += ' where id in :TEST_ID'; |
| | | }else{ |
| | | oppSql += ' where StageName = \'引合\' and ForecastAccuracyObject__c = true'; |
| | | oppSql += ' and Competitor__c in (\'A\',\'B\',\'C\',\'D\',\'E\') '; //2021-11-22 yjk 增加判断条件 询价等级 |
| | | // oppSql += ' and Competitor__c in (\'A\',\'B\',\'C\',\'D\',\'E\') '; //2021-11-22 yjk 增加判断条件 询价等级 |
| | | oppSql += ' and Competitor__c in (\'A\',\'B\',\'C\',\'D\') '; //2021-11-22 yjk 增加判断条件 询价等级 |
| | | oppSql += ' and IsNextMonthOfVisit__c = false and SalesdepartmentForecast__c in :areas'; |
| | | // 5)客户为H层客户的询价 |
| | | // oppSql += ' and (OCM__c = \'H0\' or OCM__c = \'H1\')'; |
| | |
| | | opportunityCategorySP.add('ENT'); |
| | | String log = ''; |
| | | for (Opportunity opp : oppList){ |
| | | //log += ' OCSMRMB_Without_Tax__c : '+ opp.OCSMRMB_Without_Tax__c + '\n'; |
| | | if(opp.Owner.IsActive){//2021-08-30 yjk 增加判断任务对应的用户必须为IsActive |
| | | task__c newTask = new task__c(); |
| | | newTask.assignee__c = opp.OwnerId; |
| | |
| | | } |
| | | |
| | | }else{ |
| | | log += 'OCSMRMB_Without_Tax__c :'+opp.OCSMRMB_Without_Tax__c + '\n'; |
| | | log = 'OCSMRMB_Without_Tax__c :'+opp.OCSMRMB_Without_Tax__c + '\n'; |
| | | log += 'Opportunity_Category__c : '+ opp.Opportunity_Category__c + '\n' ; |
| | | //log += 'Close_Forecasted_Date__c : '+ opp.Close_Forecasted_Date__c + '\n' ; |
| | | newTask.distributeReason__c = '半年大合同'; |
| | |
| | | public Boolean noSortHeader { get; set; } |
| | | public Boolean isRadioBox { get; set; } |
| | | public String tabS {get; set;} |
| | | public List<CreateRelationListPagingCtrlBase.WrapperInfo> allrecords{get;set;} |
| | | public transient Boolean userCustomPaging {get; set;} |
| | | public Boolean userCustomPaging {get; set;} |
| | | public Boolean isNeedCheckEvent { |
| | | get { |
| | | return pageController.isNeedCheckEvent; |
| | |
| | | } |
| | | if(String.isBlank(pageController.getRecordTypeId() )){ |
| | | try { |
| | | System.debug('--------2--------'+pageController.getObjName()); |
| | | |
| | | Map<String, Map<String, String>> editLayoutItemRWMap = SoapApi.getEditLayoutItemRW(pageController.getObjName(), null); |
| | | System.debug('--------1--------'+editLayoutItemRWMap); |
| | | if(editLayoutItemRWMap.size() >0){ |
| | | DESC_RW = editLayoutItemRWMap.values()[0]; |
| | | } |
| | |
| | | String soql =''; |
| | | final String soqlStr = 'Select {0} {1} '; |
| | | soql += String.format(soqlStr, new String[] {strColumus , pageController.getSelectedDataSql()}); |
| | | // system.debug(pageController + 'getSelectedDataInfo soql ' + soql); |
| | | system.debug('zheli~getSelectedDataInfo soql ' + soql); |
| | | system.debug(pageController + 'getSelectedDataInfo soql ' + soql); |
| | | List<sObject> queryList = Database.query(soql); |
| | | pageController.selectedData = queryList; |
| | | pageController.makeSelectedDataInfo(); |
| | |
| | | // get selected data |
| | | pageController.setViewList(new List<sObject>()); |
| | | currentPageRecordCnt = pageController.viewList.size(); |
| | | allrecords = pageController.viewList; |
| | | System.debug(LoggingLevel.INFO, '*** allrecords: ' + allrecords); |
| | | recordAllCount = currentPageRecordCnt; |
| | | pageController.sqlWhereStr = ''; |
| | | return; |
| | |
| | | |
| | | pageController.setViewList(queryList); |
| | | currentPageRecordCnt = pageController.viewList.size(); |
| | | allrecords = pageController.viewList; |
| | | System.debug(LoggingLevel.INFO, '*** allrecords: ' + allrecords); |
| | | |
| | | system.debug('●●●●● searchAndPaging END ' ); |
| | | } catch (Exception e) { |
| | |
| | | , orderStr |
| | | , limitStr}); |
| | | |
| | | system.debug('makeSoql'+soql); |
| | | system.debug(soql); |
| | | return soql; |
| | | } |
| | | public void searchGoPage() { |
| | |
| | | public Boolean check { get; set; } // 是否选择 |
| | | public Boolean oldCheck { get; set; } |
| | | public Integer inputInt {get; set;} // 数量 |
| | | |
| | | public Map<String, String> additionalInfoMap {get; set;} // 追加信息 |
| | | |
| | | public WrapperInfo(SObject record, CreateRelationListPagingCmpCtrl myComponentController) { |
| New file |
| | |
| | | /** |
| | | * @Author lijinhuan |
| | | * @DateTime 2023-02-07T17:49:45+0800 |
| | | * 测试类:FrameNumUploadControllerTest |
| | | */ |
| | | public without sharing class DNDetailsHandler extends Oly_TriggerHandler { |
| | | |
| | | private Map<Id, Statu_Achievements_DN_details__c > newMap; |
| | | private Map<Id, Statu_Achievements_DN_details__c > oldMap; |
| | | private List<Statu_Achievements_DN_details__c > newList; |
| | | private List<Statu_Achievements_DN_details__c > oldList; |
| | | public DNDetailsHandler() { |
| | | this.newMap = (Map<Id, Statu_Achievements_DN_details__c >) Trigger.newMap; |
| | | this.oldMap = (Map<Id, Statu_Achievements_DN_details__c >) Trigger.oldMap; |
| | | this.newList = (List<Statu_Achievements_DN_details__c >) Trigger.new; |
| | | this.oldList = (List<Statu_Achievements_DN_details__c >) Trigger.old; |
| | | } |
| | | protected override void afterInsert() { |
| | | // insertFrameNumManag(); |
| | | } |
| | | protected override void afterUpdate() { |
| | | // insertFrameNumManag(); // 测试用 |
| | | } |
| | | |
| | | protected override void afterDelete() { |
| | | // 进口单证 start |
| | | // 删除进口单证数据 |
| | | deleteFrameNumManage(); |
| | | // 进口单证 end |
| | | } |
| | | |
| | | protected override void beforeInsert() { |
| | | } |
| | | |
| | | protected override void beforeUpdate() { |
| | | |
| | | } |
| | | |
| | | protected override void beforeDelete() { |
| | | |
| | | } |
| | | |
| | | // private Void insertFrameNumManag(){ |
| | | // Set<String> IdSet = new Set<String>(); |
| | | // Map<String,Id> eSignFormMap = new Map<String,Id>(); |
| | | // Map<String,String> DNMap = new Map<String,String>(); |
| | | // for (Statu_Achievements_DN_details__c nObj : newList) { |
| | | // IdSet.add(nObj.Id); |
| | | // } |
| | | // Map<String,Statu_Achievements_DN_details__c> sandMap = new Map<String,Statu_Achievements_DN_details__c>(); |
| | | // // 查询明细 在机身编码中有没,没有生成 |
| | | // for(Statu_Achievements_DN_details__c dn:[SELECT Id,SerialNumber__c,asset__c, |
| | | // Statu_Achievements_DN__c,SerialNoorLotNo_Raw__c,TracingCode_Raw__c, |
| | | // OTCode_Raw__c,asset__r.Name,QTY__c,Statu_Achievements_DN__r.Name |
| | | // FROM Statu_Achievements_DN_details__c |
| | | // WHERE Id =:IdSet ]){ |
| | | // sandMap.put(dn.TracingCode_Raw__c,dn); |
| | | // DNMap.put(dn.TracingCode_Raw__c,dn.Statu_Achievements_DN__r.Name); |
| | | // } |
| | | // for(FrameNumManage__c f:[SELECT ManagementCode__c FROM FrameNumManage__c WHERE ManagementCode__c in :sandMap.keySet()]){ |
| | | // sandMap.remove(f.ManagementCode__c); |
| | | // } |
| | | // for(eSignForm__c es:[SELECT Id,DNName__c FROM eSignForm__c WHERE DNName__c IN: DNMap.values()]){ |
| | | // for(String key:DNMap.keySet()){ |
| | | // if(DNMap.get(key) == es.DNName__c){ |
| | | // eSignFormMap.put(key,es.Id); |
| | | // } |
| | | // } |
| | | // } |
| | | // if(sandMap.size() > 0){ |
| | | // List<FrameNumManage__c> infnmList = new List<FrameNumManage__c>(); |
| | | // for (Statu_Achievements_DN_details__c s:sandMap.values()) { |
| | | // FrameNumManage__c temp = new FrameNumManage__c(); |
| | | // temp.Name = s.TracingCode_Raw__c; |
| | | // temp.ManagementCode__c = s.TracingCode_Raw__c; |
| | | // temp.SerialNumberS__c = s.SerialNoorLotNo_Raw__c+'('+s.TracingCode_Raw__c+')'; |
| | | // temp.SerialNumber__c = s.SerialNoorLotNo_Raw__c; |
| | | // temp.Num__c = s.QTY__c; |
| | | // temp.CheckOutNo__c = s.Statu_Achievements_DN__r.Name.subString(2);//发货DN 的name去掉前两位的 00 |
| | | |
| | | // temp.Statu_Achievements_DN_details__c = s.Id; |
| | | // temp.Asset__c = s.asset__c; |
| | | // temp.signInForm__c = eSignFormMap.get(s.TracingCode_Raw__c); |
| | | |
| | | // temp.Material__c = s.OTCode_Raw__c; |
| | | // temp.MaterialDepict__c = s.asset__r.Name; |
| | | // infnmList.add(temp); |
| | | // } |
| | | // if(infnmList.size() > 0){ |
| | | // insert infnmList; |
| | | // // Database.executeBatch(new SetFrameNumManageBatch(), 100); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | private void deleteFrameNumManage() { |
| | | List<FrameNumManage__c> rnmList = [select Id from FrameNumManage__c where Statu_Achievements_DN_details__c in :newMap.keySet()]; |
| | | if (rnmList != null && rnmList.size() > 0) { |
| | | delete rnmList; |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>48.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | [SELECT Id FROM CronTrigger WHERE CronJobDetail.Name like 'DNUpsert%']) { |
| | | System.abortJob(ct.id); |
| | | } |
| | | Datetime addOneM = System.now().addMinutes(1); |
| | | Datetime addOneM = System.now().addMinutes(3); |
| | | String CRON_EXP = '0 ' + addOneM.minute() + ' ' + addOneM.hour() + ' ' + addOneM.day() + ' ' + addOneM.month() + ' ? ' + addOneM.year(); |
| | | List<CronTrigger> oldcron = [select Id from CronTrigger where State = 'WAITING' and CronJobDetail.Name like 'DNUpsert%']; |
| | | |
| | |
| | | |
| | | static testMethod void testExecute() { |
| | | // This test runs a scheduled job at midnight Sept. 3rd. 2022 |
| | | String CRON_EXP = '0 0 0 3 9 ? 2022'; |
| | | String CRON_EXP = '0 0 0 3 9 ? 2050'; |
| | | |
| | | System.Test.startTest(); |
| | | // Schedule the test job |
| | |
| | | // Verify the job has not run |
| | | System.assertEquals(0, ct.TimesTriggered); |
| | | // Verify the next time the job will run |
| | | System.assertEquals('2022-09-03 00:00:00', String.valueOf(ct.NextFireTime)); |
| | | System.assertEquals('2050-09-03 00:00:00', String.valueOf(ct.NextFireTime)); |
| | | System.Test.StopTest(); |
| | | } |
| | | static testMethod void testassignOneMinute() { |
| | |
| | | |
| | | return cnt; |
| | | } |
| | | |
| | | |
| | | public static Integer ControllerUtil() { |
| | | Integer i = 0; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | return i; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @isTest |
| | | private class DataBasePlusTest extends BaseController{ |
| | | private class DataBasePlusTest { |
| | | static testMethod void testMethod1() { |
| | | // DataBasePlus.ControllerUtil(); |
| | | List<SObjectField> sObjectFieldList = new List<SObjectField>(); |
| | | DataBasePlus datbasplus=new DataBasePlus(); |
| | | QueryWrapper query = new QueryWrapper(PromotionHead__c.SObjectType); |
| | | Schema.DescribeSobjectResult d = PromotionHead__c.sObjectType.getDescribe(); |
| | | Map<String,Schema.SObjectField> mfields = d.fields.getMap(); |
| | | for(String strField:mfields.keySet()) { |
| | | SObjectField fl = mfields.get(strField); |
| | | if(fl!=null){ |
| | | sObjectFieldList.add(fl); |
| | | } |
| | | } |
| | | query.setSObjectFieldList(sObjectFieldList); |
| | | DataBasePlus.getOne(query,true); |
| | | DataBasePlus.listPlus(query); |
| | | QuoteTrialService prDao = new QuoteTrialService(); |
| | | Integer page = 1; |
| | | Integer pageLimit = 3; |
| | | String search = '%7B%22NameInDate%22:%222019%22,%22PromotionNo__cEqual%22:%22123%22%7D'; |
| | | String sortOrder = ''; |
| | | String sortPlus = 'Id'; |
| | | String[] arr = new String[] {'PromotionNo__cEqual','NameInDate'}; |
| | | String Agency1c = '123456'; |
| | | PagePlus pages = prDao.GetPromotionPromotionSearchFn(page,pageLimit,search,sortOrder,sortPlus,arr); |
| | | |
| | | DataBasePlus.ControllerUtil(); |
| | | } |
| | | } |
| | |
| | | public with sharing class DealerPersonnelController { |
| | | public without sharing class DealerPersonnelController { |
| | | public DealerPersonnelController() { |
| | | |
| | | } |
| | |
| | | public static String processData(String fileData,String sobjectName,List<String> fields) { |
| | | system.debug('fileData===============>'+fileData); |
| | | String errorMage = ''; |
| | | try { |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // Savepoint sp = Database.setSavepoint(); |
| | | // try { |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | if(fileData != null){ |
| | | String[] fileLines = new String[]{}; |
| | | fileLines = fileData.split('\n'); |
| | | system.debug('fileLines===================>'+fileLines); |
| | | // 经销商管理编码 |
| | | List<String> managementCodeList = new List<String>(); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // 客户名 |
| | | List<String> CustomerNameList = new List<String>(); |
| | | //人员管理编码 |
| | | List<String> CManageCodeList = new List<String>(); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | // 导入的数据 |
| | | List<List<String>> inputList = new List<List<String>>(); |
| | | for (Integer i = 1,j = fileLines.size(); i < j; i++) { |
| | | List<String> inputValues = new List<String>(); |
| | | inputValues = fileLines[i].split(','); |
| | | System.debug('inputValues=============>'+inputValues); |
| | | if(inputValues != null){ |
| | | if(inputValues[0] == '' || inputValues[0]== null){ |
| | | errorMage += 'errorMage: 第' + i + '行,姓名不能为空!'; |
| | | errorMage += '='; |
| | | } |
| | | if(inputValues[1] == '' || inputValues[1] ==null){ |
| | | errorMage += 'errorMage: 第' + i + '行,手机不能为空!'; |
| | | errorMage += '='; |
| | | if(fileLines[i].replace(',','').trim()!=''){ |
| | | inputValues = fileLines[i].split(',',-1); |
| | | System.debug('inputValues=============>'+inputValues); |
| | | System.debug('fileLines[i]=============>'+fileLines[i]); |
| | | if(inputValues != null){ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // if(inputValues[0] == '' || inputValues[0]== null){ |
| | | // errorMage += 'errorMage: 第' + i + '行,姓名不能为空!'; |
| | | // errorMage += '='; |
| | | // } |
| | | // // if(inputValues[1] == '' || inputValues[1] ==null){ |
| | | // // errorMage += 'errorMage: 第' + i + '行,手机不能为空!'; |
| | | // // errorMage += '='; |
| | | // // } |
| | | // // boolean mobileNumberFlag = mobileNumberVerification(inputValues[1]); |
| | | // // if(mobileNumberFlag == false){ |
| | | // // errorMage += 'errorMage: 你的手机号码不太正确,请检查您的手机是否正确!'; |
| | | // // errorMage += '='; |
| | | // // } |
| | | // // if(inputValues[2] == '' || inputValues[2] == null){ |
| | | // // errorMage += 'errorMage: 第' + i + '行,邮箱不能为空!'; |
| | | // // errorMage += '='; |
| | | // // } |
| | | // //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // if(inputValues[2] != '' && inputValues[2] != null){ |
| | | // //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | // boolean mailboxFlag = mailboxVerification(inputValues[2]); |
| | | // if(mailboxFlag == false){ |
| | | // errorMage += 'errorMage:第' + i + '行, 你的邮箱不太正确,请检查您的邮箱格式!'; |
| | | // errorMage += '='; |
| | | // } |
| | | // //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // } |
| | | // //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | // if(inputValues[3] == '' || inputValues[3] == null){ |
| | | // errorMage += 'errorMage: 第' + i + '行,经销商管理编码不能为空!'; |
| | | // errorMage += '='; |
| | | // } |
| | | // //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // if(inputValues[4] == '' || inputValues[4] == null){ |
| | | // errorMage += 'errorMage: 第' + i + '行,客户名不能为空!'; |
| | | // errorMage += '='; |
| | | // } |
| | | // if(inputValues[5] == '' || inputValues[5] == null){ |
| | | // errorMage += 'errorMage: 第' + i + '行,经销商用户不能为空!'; |
| | | // errorMage += '='; |
| | | // } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | inputValues[3]=inputValues[3].leftpad(10,'0'); |
| | | System.debug('测试去零1 '+inputValues[3].replace(' ','').length()); |
| | | |
| | | managementCodeList.add(inputValues[3]); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | CustomerNameList.add(inputValues[4]); |
| | | CManageCodeList.add(inputValues[6]); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | inputList.add(inputValues); |
| | | |
| | | //导入的数据 |
| | | System.debug('inputValues[0]===============>'+ inputValues[0]); |
| | | System.debug('inputValues[1]===============>'+ inputValues[1]); |
| | | System.debug('inputValues[2]===============>'+ inputValues[2]); |
| | | System.debug('inputValues[3]===============>'+ inputValues[3]); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | System.debug('inputValues[4]===============>'+ inputValues[4]); |
| | | System.debug('inputValues[5]===============>'+ inputValues[5]); |
| | | System.debug('inputValues[6]===============>'+ inputValues[6]); |
| | | System.debug('inputValues[7]===============>'+ inputValues[7]); |
| | | System.debug('inputValues[8]===============>'+ inputValues[8]); |
| | | System.debug('inputValues[9]===============>'+ inputValues[9]); |
| | | System.debug('inputValues[10]===============>'+ inputValues[10]); |
| | | System.debug('inputValues[11]===============>'+ inputValues[11]); |
| | | System.debug('inputValues[12]===============>'+ inputValues[12]); |
| | | System.debug('inputValues[13]===============>'+ inputValues[13]); |
| | | System.debug('inputValues[14]===============>'+ inputValues[14]); |
| | | System.debug('inputValues[15]===============>'+ inputValues[15]); |
| | | System.debug('inputValues[16]===============>'+ inputValues[16]); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | |
| | | } |
| | | boolean mobileNumberFlag = mobileNumberVerification(inputValues[1]); |
| | | if(mobileNumberFlag == false){ |
| | | errorMage += 'errorMage: 你的手机号码不太正确,请检查您的手机是否正确!'; |
| | | errorMage += '='; |
| | | } |
| | | if(inputValues[2] == '' || inputValues[2] == null){ |
| | | errorMage += 'errorMage: 第' + i + '行,邮箱不能为空!'; |
| | | errorMage += '='; |
| | | } |
| | | boolean mailboxFlag = mailboxVerification(inputValues[2]); |
| | | if(mailboxFlag == false){ |
| | | errorMage += 'errorMage: 你的邮箱不太正确,请检查您的邮箱格式!'; |
| | | errorMage += '='; |
| | | } |
| | | if(inputValues[3] == '' || inputValues[3] == null){ |
| | | errorMage += 'errorMage: 第' + i + '行,经销商管理编码不能为空!'; |
| | | errorMage += '='; |
| | | } |
| | | |
| | | managementCodeList.add(inputValues[3]); |
| | | inputList.add(inputValues); |
| | | //导入的数据 |
| | | System.debug('inputValues[0]===============>'+ inputValues[0]); |
| | | System.debug('inputValues[1]===============>'+ inputValues[1]); |
| | | System.debug('inputValues[2]===============>'+ inputValues[2]); |
| | | System.debug('inputValues[3]===============>'+ inputValues[3]); |
| | | } |
| | | } |
| | | Map<String,Account> accountIdMap = new Map<String,Account>(); |
| | | List<Account> accountList = [select id, Name,Management_Code__c from Account where Management_Code__c in: managementCodeList]; |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | Map<String,Contact> contactIdMap = new Map<String,Contact>(); |
| | | Map<Id,String> ManagementCodeMap = new Map<Id,String>(); |
| | | List<Id> AccountIdList =new List<Id>(); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | List<Account> accountList = [select id, Name,Management_Code__c from Account where Management_Code__c in: managementCodeList and Name in:CustomerNameList ]; |
| | | for(Account ac : accountList){ |
| | | accountIdMap.put(ac.Management_Code__c,ac); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | AccountIdList.add(ac.Id); |
| | | ManagementCodeMap.put(ac.Id,ac.Management_Code__c); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | //查询客户人员是否有数据 |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start 0228 |
| | | // Map<String,Contact> contactIdMapName = new Map<String,Contact>(); |
| | | List<Contact> contactList = [select id, CManageCode__c,AccountId from Contact where AccountId in: AccountIdList and CManageCode__c in:CManageCodeList ]; |
| | | // List<Contact> contactList = [select id, CManageCode__c,AccountId,Name from Contact where AccountId in: AccountIdList ]; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | for(Contact cc : contactList){ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start 0228 |
| | | // String namekey = cc.Name.replace(' ', ''); |
| | | // String contactKey2=ManagementCodeMap.get(cc.AccountId)+'_'+namekey; |
| | | // contactIdMapName.put(contactKey2,cc); |
| | | String contactKey=ManagementCodeMap.get(cc.AccountId)+'_'+cc.CManageCode__c; |
| | | contactIdMap.put(contactKey,cc); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start 0228 |
| | | // System.debug('contactIdMapName++'+contactIdMapName); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start 0228 |
| | | List<Contact> cnupdateList = new List<Contact>(); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | List<Contact> cnList = new List<Contact>(); |
| | | Integer lineNumber = 1; |
| | | for(List<String> lineList :inputList){ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | Boolean errorflag1 = false; |
| | | String errorMageHang = ''; |
| | | if(lineList[0] == '' || lineList[0]== null){ |
| | | errorMageHang += ',姓名不能为空!'; |
| | | errorflag1 = true; |
| | | } |
| | | if(lineList[2] != '' && lineList[2] != null){ |
| | | boolean mailboxFlag = mailboxVerification(lineList[2]); |
| | | if(mailboxFlag == false){ |
| | | errorMageHang += ', 你的邮箱不太正确,请检查您的邮箱格式!'; |
| | | errorflag1 = true; |
| | | } |
| | | } |
| | | if(lineList[3] == '' || lineList[3] == null){ |
| | | errorMageHang += ',经销商管理编码不能为空!'; |
| | | errorflag1 = true; |
| | | } |
| | | if(lineList[4] == '' || lineList[4] == null){ |
| | | errorMageHang += ',客户名不能为空!'; |
| | | errorflag1 = true; |
| | | } |
| | | if(lineList[5] == '' || lineList[5] == null){ |
| | | errorMageHang += ',经销商用户不能为空!'; |
| | | errorflag1 = true; |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | Contact con = new Contact(); |
| | | //暂时导入的是经销商用户,所以记录类型只有经销商,暂时写死;后期如果有变动再更改 |
| | | con.RecordTypeId = '01210000000QfWiAAK'; |
| | | if(lineList[0] != null && lineList[0] != ''){ |
| | | con.LastName = lineList[0]; |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,姓氏'+lineList[0]+'不存在'; |
| | | errorMage += '='; |
| | | } |
| | | if(lineList[1] != null && lineList[1] != ''){ |
| | | if(mobileNumberVerification(lineList[1])){ |
| | | con.MobilePhone = lineList[1]; |
| | | if(!contactIdMap.containsKey(lineList[3]+'_'+lineList[6])){ |
| | | if(lineList[0] != null && lineList[0] != ''){ |
| | | con.LastName = lineList[0]; |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,手机'+lineList[1]+'不正确!'; |
| | | errorMage += '='; |
| | | } |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,手机'+lineList[1]+'不存在'; |
| | | errorMage += '='; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,姓氏'+lineList[0]+'不存在'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',姓氏 '+lineList[0]+' 不存在'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | } |
| | | if(lineList[1] != null && lineList[1] != ''){ |
| | | // if(mobileNumberVerification(lineList[1])){ |
| | | con.MobilePhone = lineList[1]; |
| | | // }else{ |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,手机'+lineList[1]+'不正确!'; |
| | | // errorMage += '='; |
| | | // } |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // else{ |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,手机'+lineList[1]+'不存在'; |
| | | // errorMage += '='; |
| | | // } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | if(lineList[2] != null && lineList[2] != ''){ |
| | | if(mailboxVerification(lineList[2])){ |
| | | con.Email = lineList[2]; |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,电子邮件'+lineList[2]+'不正确!'; |
| | | errorMage += '='; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,电子邮件'+lineList[2]+'不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',电子邮件 '+lineList[2]+' 不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,电子邮件'+lineList[2]+'不存在'; |
| | | errorMage += '='; |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // else{ |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,电子邮件'+lineList[2]+'不存在'; |
| | | // errorMage += '='; |
| | | // } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | if(accountIdMap.containsKey(lineList[3])){ |
| | | con.AccountId = accountIdMap.get(lineList[3]).id; |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,经销商编码'+lineList[3]+'不存在'; |
| | | errorMage += '='; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,经销商编码'+lineList[3]+'或者客户名不存在'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',经销商编码 '+lineList[3]+' 或者客户名不存在'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //暂定创建直接为 true |
| | | con.Agency_User__c = true; |
| | | // con.Agency_User__c = true; |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | if(lineList[5] != null && lineList[5] != ''){ |
| | | if(lineList[5]=='true'||lineList[5]=='TRUE'){ |
| | | con.Agency_User__c=true; |
| | | }else{ |
| | | con.Agency_User__c=false; |
| | | } |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,经销商用户'+lineList[0]+'不存在'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',经销商用户 '+lineList[0]+' 不存在'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | //经销商专员类型 |
| | | if(VerificationOLYAssistantType(lineList[7])){ |
| | | con.OLY_Assistant_Type__c = lineList[7]; |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,经销商专员类型'+lineList[7]+'不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',经销商专员类型 '+lineList[7]+' 不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //入职年份 |
| | | if(VerificationDateType(lineList[8])){ |
| | | con.InductionYear__c = ConversionDateType(lineList[8]); |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,入职年份'+lineList[8]+'格式不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',入职年份 '+lineList[8]+' 格式不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //GIR认证级别 |
| | | if(VerifyCertificationLevel(lineList[9])){ |
| | | con.GIR_CertificationLevel__c = lineList[9]; |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,GIR认证级别'+lineList[9]+'不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',GIR认证级别 '+lineList[9]+' 不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //GIR认证时间 |
| | | if(VerificationDateType(lineList[10])){ |
| | | con.GIR_CertificationTime__c = ConversionDateType(lineList[10]); |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,GIR认证时间'+lineList[10]+'格式不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',GIR认证时间 '+lineList[10]+' 格式不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //SP认证级别 |
| | | if(VerifyCertificationLevel(lineList[11])){ |
| | | con.SP_CertificationLevel__c = lineList[11]; |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,SP认证级别'+lineList[11]+'不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',SP认证级别 '+lineList[11]+' 不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //SP认证时间 |
| | | if(VerificationDateType(lineList[12])){ |
| | | con.SP_CertificationTime__c = ConversionDateType(lineList[12]); |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,SP认证时间'+lineList[12]+'格式不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',SP认证时间 '+lineList[12]+' 格式不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //ET认证级别 |
| | | if(VerifyCertificationLevel(lineList[13])){ |
| | | con.ET_CertificationLevel__c = lineList[13]; |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,ET认证级别'+lineList[13]+'不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',ET认证级别 '+lineList[13]+' 不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //ET认证时间 |
| | | if(VerificationDateType(lineList[14])){ |
| | | con.ET_CertificationTime__c = ConversionDateType(lineList[14]); |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,ET认证时间'+lineList[14]+'格式不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',ET认证时间 '+lineList[14]+' 格式不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //ENG认证级别 |
| | | if(VerifyCertificationLevel(lineList[15])){ |
| | | con.ENG_CertificationLevel__c = lineList[15]; |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,ENG认证级别'+lineList[15]+'不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang +=',ENG认证级别 '+lineList[15]+' 不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //ENG认证时间 |
| | | if(VerificationDateType(lineList[16])){ |
| | | con.ENG_CertificationTime__c = ConversionDateType(lineList[16]); |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,ENG认证时间'+lineList[16]+'格式不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang +=',ENG认证时间 '+lineList[16]+' 格式不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // lineNumber++; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | System.debug('001+'+lineList[3]+'_'+lineList[6]); |
| | | System.debug('002+'+contactIdMap.get(lineList[3]+'_'+lineList[6])); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start 0228 |
| | | // System.debug('003+'+lineList[3]+'_'+lineList[0]); |
| | | // System.debug('004+'+contactIdMapName.get(lineList[3]+'_'+lineList[0])); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start 0228 |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | if(errorflag1){ |
| | | errorMage += 'error: 第' + lineNumber + '行 ('+lineList[0]+') 的数据'+errorMageHang; |
| | | errorMage += '='; |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | if(contactIdMap.containsKey(lineList[3]+'_'+lineList[6])){ |
| | | con.Id=contactIdMap.get(lineList[3]+'_'+lineList[6]).Id; |
| | | cnupdateList.add(con); |
| | | }else { |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start 0228 |
| | | // if(!contactIdMapName.containsKey(lineList[3]+'_'+lineList[0])){ |
| | | // cnList.add(con); |
| | | // } |
| | | cnList.add(con); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | // cnList.add(con); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | lineNumber++; |
| | | cnList.add(con); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | if(errorMage != ''){ |
| | | system.debug('errorMage==========>'+errorMage); |
| | | return errorMage; |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // if(errorMage != ''){ |
| | | // system.debug('errorMage==========>'+errorMage); |
| | | // return errorMage; |
| | | // } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | |
| | | // 新增周报明细 |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | List<String> errorChongfuList = new List<String>(); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | if(cnList.size() > 0 ){ |
| | | insertContact(cnList); |
| | | System.debug('003+'+cnList); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // insertContact(cnList); |
| | | Database.SaveResult[] InsertShare = Database.insert(cnList, false); |
| | | for(Database.SaveResult insertresult :InsertShare){ |
| | | if (!insertresult.isSuccess()) { |
| | | String errerContactiD=''; |
| | | String errer = String.valueOf(insertresult.getErrors()[0]); |
| | | if(errer.contains('UniqueNumber__c 与记录值重复')){ |
| | | List<String> errerList = errer.split('UniqueNumber__c 与记录值重复'); |
| | | if(errerList.size()>1){ |
| | | errerContactiD=errerList[1].substring(errerList[1].indexOf('ID 为:')+5,errerList[1].indexOf(';getStatusCode')).replace(' ',''); |
| | | errorChongfuList.add(errerContactiD); |
| | | } |
| | | }else{ |
| | | errorMage += errer; |
| | | } |
| | | } |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // 更新周报明细 |
| | | if(cnupdateList.size() > 0 ){ |
| | | System.debug('004+'+cnupdateList); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // updateContact(cnupdateList); |
| | | Database.SaveResult[] UpdateShare = Database.update(cnupdateList, false); |
| | | for(Database.SaveResult updateresult :UpdateShare){ |
| | | if (!updateresult.isSuccess()) { |
| | | String errerContactiD=''; |
| | | String errer = String.valueOf(updateresult.getErrors()[0]); |
| | | if(errer.contains('UniqueNumber__c 与记录值重复')){ |
| | | List<String> errerList = errer.split('UniqueNumber__c 与记录值重复'); |
| | | if(errerList.size()>1){ |
| | | errerContactiD=errerList[1].substring(errerList[1].indexOf('ID 为:')+5,errerList[1].indexOf(';getStatusCode')).replace(' ',''); |
| | | errorChongfuList.add(errerContactiD); |
| | | } |
| | | }else{ |
| | | errorMage += errer; |
| | | } |
| | | } |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | List<Contact> repeatContact=[select Id,Name from Contact where Id = :errorChongfuList]; |
| | | if(repeatContact.size()>0){ |
| | | for(Contact repeatContactitem :repeatContact){ |
| | | String errerContactName=''; |
| | | String errerContactID=''; |
| | | errerContactName = repeatContactitem.Name; |
| | | errerContactID = repeatContactitem.Id; |
| | | errorMage +='error: 数据中存在与系统现有用户 '+errerContactName+'(Id为:'+errerContactiD+')重复的电话号码'; |
| | | } |
| | | }else if(errorChongfuList.size()>0){ |
| | | errorMage +='error: 数据中存在重复的电话号码'; |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | } |
| | | if(errorMage != ''){ |
| | | system.debug('errorMage==========>'+errorMage); |
| | | return errorMage; |
| | | } |
| | | return 'success'; |
| | | } catch (Exception e) { |
| | | System.debug('exception'+e); |
| | | return 'exception'+e; |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // String errer=String.valueOf(e); |
| | | // String errerContactiD=''; |
| | | // String errerContactName=''; |
| | | // if(errer.contains('UniqueNumber__c 与记录值重复')){ |
| | | // List<String> errerList = errer.split('UniqueNumber__c 与记录值重复'); |
| | | // if(errerList.size()>1){ |
| | | // errerContactiD=errerList[1].substring(errerList[1].indexOf('ID 为:')+5,errerList[1].indexOf(': []')).replace(' ',''); |
| | | // List<Contact> repeatContact=[select Name from Contact where Id = :errerContactiD]; |
| | | // if(repeatContact.size()>0){ |
| | | // errerContactName=repeatContact[0].Name; |
| | | // return 'error: 数据中存在与系统现有用户 '+errerContactName+'(Id为:'+errerContactiD+')重复的电话号码'; |
| | | // }else{ |
| | | // return 'error: 数据中存在重复的电话号码'; |
| | | // } |
| | | // } |
| | | // } |
| | | // return e.getLineNumber()+'exception'+e; |
| | | |
| | | // } catch (Exception e) { |
| | | // Database.rollback(sp); |
| | | // System.debug('exception++++++++++++++++++'+e.getLineNumber()+e); |
| | | // String errer=String.valueOf(e); |
| | | // String errerContactiD=''; |
| | | // String errerContactName=''; |
| | | // if(errer.contains('UniqueNumber__c 与记录值重复')){ |
| | | // List<String> errerList = errer.split('UniqueNumber__c 与记录值重复'); |
| | | // if(errerList.size()>1){ |
| | | // errerContactiD=errerList[1].substring(errerList[1].indexOf('ID 为:')+5,errerList[1].indexOf(': []')).replace(' ',''); |
| | | // List<Contact> repeatContact=[select Name from Contact where Id = :errerContactiD]; |
| | | // if(repeatContact.size()>0){ |
| | | // errerContactName=repeatContact[0].Name; |
| | | // return 'error: 数据中存在与系统现有用户 '+errerContactName+'(Id为:'+errerContactiD+')重复的电话号码'; |
| | | // }else{ |
| | | // return 'error: 数据中存在重复的电话号码'; |
| | | // } |
| | | // } |
| | | // } |
| | | // return e.getLineNumber()+'exception'+e; |
| | | // } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | // 电子邮件的验证 |
| | | public static boolean mailboxVerification(String mailbox){ |
| | | String check = '^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$'; |
| | | String check = '^([a-z0-9A-Z]+[_-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$'; |
| | | Pattern regex = Pattern.compile(check); |
| | | Matcher matcher = regex.matcher(mailbox); |
| | | if (matcher.matches()){ |
| | |
| | | return false; |
| | | } |
| | | // 手机号的验证 |
| | | public static boolean mobileNumberVerification(String phoneNumber){ |
| | | String check = '^((17[0-9])|(14[0-9])|(13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$'; |
| | | Pattern regex = Pattern.compile(check); |
| | | Matcher matcher = regex.matcher(phoneNumber); |
| | | if(matcher.matches()){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | // public static boolean mobileNumberVerification(String phoneNumber){ |
| | | // String check = '^((17[0-9])|(14[0-9])|(13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$'; |
| | | // Pattern regex = Pattern.compile(check); |
| | | // Matcher matcher = regex.matcher(phoneNumber); |
| | | // if(matcher.matches()){ |
| | | // return true; |
| | | // } |
| | | // return false; |
| | | // } |
| | | //新增客户人员; |
| | | public static void insertContact(List<Contact> data) { |
| | | insert data; |
| | | } |
| | | |
| | | // SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | //校验认证级别; |
| | | public static boolean VerifyCertificationLevel(String data) { |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // if(data=='A'||data=='B'||data==''){ |
| | | if(data=='A级'||data=='A级未通过'||data=='A级未通过(失效)'||data=='A级(失效)'||data=='B级'||data=='B级(失效)'||data=='B级未通过'||data=='初级'||data=='初级未通过'||data=='未认证'||data==''){ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | //校验日期类型 |
| | | public static Boolean VerificationDateType(String data) { |
| | | List<String> date1str; |
| | | List<String> date2str; |
| | | if(data==''){ |
| | | return true; |
| | | } |
| | | date1str=data.split('/'); |
| | | date2str=data.split('-'); |
| | | if(date1str.size()>1||date2str.size()>1){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | //转换日期类型; |
| | | public static Date ConversionDateType(String data) { |
| | | if(data==''){ |
| | | return null; |
| | | } |
| | | return Date.valueOf(data.replace('/','-')); |
| | | } |
| | | //校验经销商专员类型; |
| | | public static Boolean VerificationOLYAssistantType(String data) { |
| | | if(data=='GR专员'||data=='SP专员'||data=='GRSP专员'||data=='ET专员'||data=='TB专员'||data=='奥辉基层专员'||data=='商务助理'||data=='*****'||data==''){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | //更新客户人员; |
| | | public static void updateContact(List<Contact> data){ |
| | | update data; |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | } |
| | |
| | | @isTest public static void selectProductCcategoryTest() { |
| | | testInit(); |
| | | Test.startTest(); |
| | | String reports = DealerPersonnelController.processData('"姓名,手机,电子邮件,经销商编码,客户名\r\n小王,18801332211,123@qq.com,737011,启稳起步\r\n','',null); |
| | | String reports = DealerPersonnelController.processData('"姓名,手机,电子邮件,经销商编码,客户名,经销商用户,人员管理编码,经销商专员类型,入职年份,GIR认证级别,GIR认证时间,SP认证级别,SP认证时间,ET认证级别,ET认证时间,ENG认证级别,ENG认证时间\r\n小王,18801332211,123@qq.com,737011,启稳起步,TRUE,C000125941,SP专员,2021/1/7,A,2022/1/7,A,2019/1/7,A,2021/2/7,B,2020/1/7\r\n','',null); |
| | | Test.stopTest(); |
| | | } |
| | | @isTest public static void selectProductCcategoryTest01() { |
| | | testInit(); |
| | | Test.startTest(); |
| | | String reports = DealerPersonnelController.processData('"姓名,手机,电子邮件,经销商编码,客户名\r\n,,,,\r\n','',null); |
| | | String reports = DealerPersonnelController.processData('"姓名,手机,电子邮件,经销商编码,客户名,经销商用户,人员管理编码,经销商专员类型,入职年份,GIR认证级别,GIR认证时间,SP认证级别,SP认证时间,ET认证级别,ET认证时间,ENG认证级别,ENG认证时间\r\n,,123,,,,,123,123,123,123,123,13,12,123,132,13\r\n','',null); |
| | | Test.stopTest(); |
| | | } |
| | | } |
| | |
| | | textOpts.add(new SelectOption('Agency_Hospital__r.Hospital__r.Salesdepartment_HP__c', '销售本部')); |
| | | textOpts.add(new SelectOption('Agency_Hospital__r.Hospital__r.State_Master__r.Name', '省')); |
| | | textOpts.add(new SelectOption('Agency_Hospital__r.Hospital__r.City_Master__r.Name', '市')); |
| | | |
| | | |
| | | //日期字段下拉列表 |
| | | timeOpts = new List<SelectOption>(); |
| | | timeOpts.add(new SelectOption('', '--无--')); |
| | |
| | | limitOpts.add(new SelectOption('20', '20')); |
| | | limitOpts.add(new SelectOption('50', '50')); |
| | | limitOpts.add(new SelectOption('100', '100')); |
| | | limitOpts.add(new SelectOption('200', '200')); |
| | | limitOpts.add(new SelectOption('1000', '全部')); |
| | | limitOpts.add(new SelectOption('200', '200')); |
| | | limitOpts.add(new SelectOption('1000', '全部')); |
| | | //数据显示默认条数 |
| | | limits = '20'; |
| | | } |
| | |
| | | String newNumtext = numtext.trim(); |
| | | String str = makeTextSql(numtext1, numtext2, newNumtext); |
| | | soql += str; |
| | | System.debug('++++++++++++++++++++++++++++'+soql); |
| | | } |
| | | if (!String.isBlank(timetext1)) { |
| | | if (tmpAO != null && tmpAO.MaxActivityDate__c != null && tmpBo != null) { |
| | | if (tmpAO.MaxActivityDate__c.month() >= 10 && tmpAO.MaxActivityDate__c.day() >= 10 ) { |
| | | if (tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() >= 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } else if (tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() < 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | } else if (tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() >= 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } else if (tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() < 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | if(!String.isBlank(timetext1)){ |
| | | if(tmpAO != null && tmpAO.MaxActivityDate__c != null && tmpBo != null){ |
| | | if(tmpAO.MaxActivityDate__c.month() >= 10 && tmpAO.MaxActivityDate__c.day() >= 10 ){ |
| | | if(tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() >= 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | } else if (tmpAO.MaxActivityDate__c.month() >= 10 && tmpAO.MaxActivityDate__c.day() < 10) { |
| | | if (tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() >= 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } else if (tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() < 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | } else if (tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() >= 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } else if (tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() < 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | else if(tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() < 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | } else if (tmpAO.MaxActivityDate__c.month() < 10 && tmpAO.MaxActivityDate__c.day() >= 10) { |
| | | if (tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() >= 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } else if (tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() < 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | } else if (tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() >= 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } else if (tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() < 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | else if(tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() >= 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | } else if (tmpAO.MaxActivityDate__c.month() < 10 && tmpAO.MaxActivityDate__c.day() < 10) { |
| | | if (tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() >= 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } else if (tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() < 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | } else if (tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() >= 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } else if (tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() < 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year() + '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | else if(tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() < 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | } |
| | | } else if (tmpAO != null && tmpAO.MaxActivityDate__c == null && tmpBo == null) { |
| | | if (tmpAO.MaxActivityDate__c.month() >= 10 && tmpAO.MaxActivityDate__c.day() >= 10 ) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day(); |
| | | } else if (tmpAO.MaxActivityDate__c.month() >= 10 && tmpAO.MaxActivityDate__c.day() < 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day(); |
| | | } else if (tmpAO.MaxActivityDate__c.month() < 10 && tmpAO.MaxActivityDate__c.day() >= 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day(); |
| | | } else if (tmpAO.MaxActivityDate__c.month() < 10 && tmpAO.MaxActivityDate__c.day() < 10) { |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year() + '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day(); |
| | | else if(tmpAO.MaxActivityDate__c.month() >= 10 && tmpAO.MaxActivityDate__c.day() < 10){ |
| | | if(tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() >= 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() < 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() >= 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() < 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | } |
| | | } else if (tmpAO == null && tmpAO.MaxActivityDate__c == null && tmpBo != null) { |
| | | if (tmpBo.MaxActivityDate__c.month() >= 10 && tmpBo.MaxActivityDate__c.day() >= 10 ) { |
| | | soql += ' AND ' + timetext1 + '<=' + tmpBo.MaxActivityDate__c.year() + '-' + |
| | | tmpBo.MaxActivityDate__c.month() + '-' + tmpBo.MaxActivityDate__c.day(); |
| | | } else if (tmpBo.MaxActivityDate__c.month() >= 10 && tmpBo.MaxActivityDate__c.day() < 10) { |
| | | soql += ' AND ' + timetext1 + '<=' + tmpBo.MaxActivityDate__c.year() + '-' + |
| | | tmpBo.MaxActivityDate__c.month() + '-0' + tmpBo.MaxActivityDate__c.day(); |
| | | } else if (tmpBo.MaxActivityDate__c.month() < 10 && tmpBo.MaxActivityDate__c.day() >= 10) { |
| | | soql += ' AND ' + timetext1 + '<=' + tmpBo.MaxActivityDate__c.year() + '-0' + |
| | | tmpBo.MaxActivityDate__c.month() + '-' + tmpBo.MaxActivityDate__c.day(); |
| | | } else if (tmpBo.MaxActivityDate__c.month() < 10 && tmpBo.MaxActivityDate__c.day() < 10) { |
| | | soql += ' AND ' + timetext1 + '<=' + tmpBo.MaxActivityDate__c.year() + '-0' + |
| | | tmpBo.MaxActivityDate__c.month() + '-0' + tmpBo.MaxActivityDate__c.day(); |
| | | else if(tmpAO.MaxActivityDate__c.month() < 10 && tmpAO.MaxActivityDate__c.day() >= 10){ |
| | | if(tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() >= 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() < 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() >= 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() < 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | } |
| | | else if(tmpAO.MaxActivityDate__c.month() < 10 && tmpAO.MaxActivityDate__c.day() < 10){ |
| | | if(tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() >= 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpBO.MaxActivityDate__c.month() >= 10 && tmpBO.MaxActivityDate__c.day() < 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() >= 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpBO.MaxActivityDate__c.month() < 10 && tmpBO.MaxActivityDate__c.day() < 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day() + |
| | | ' AND ' + timetext1 + '<=' + tmpBO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpBO.MaxActivityDate__c.month() + '-0' + tmpBO.MaxActivityDate__c.day(); |
| | | } |
| | | } |
| | | } |
| | | else if(tmpAO != null && tmpAO.MaxActivityDate__c == null && tmpBo == null){ |
| | | if(tmpAO.MaxActivityDate__c.month() >= 10 && tmpAO.MaxActivityDate__c.day() >= 10 ){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpAO.MaxActivityDate__c.month() >= 10 && tmpAO.MaxActivityDate__c.day() < 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpAO.MaxActivityDate__c.month() < 10 && tmpAO.MaxActivityDate__c.day() >= 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-' + tmpAO.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpAO.MaxActivityDate__c.month() < 10 && tmpAO.MaxActivityDate__c.day() < 10){ |
| | | soql += ' AND ' + timetext1 + '>=' + tmpAO.MaxActivityDate__c.year()+ '-0' + |
| | | tmpAO.MaxActivityDate__c.month() + '-0' + tmpAO.MaxActivityDate__c.day(); |
| | | } |
| | | } |
| | | else if(tmpAO == null && tmpAO.MaxActivityDate__c == null && tmpBo != null){ |
| | | if(tmpBo.MaxActivityDate__c.month() >= 10 && tmpBo.MaxActivityDate__c.day() >= 10 ){ |
| | | soql += ' AND ' + timetext1 + '<=' + tmpBo.MaxActivityDate__c.year()+ '-' + |
| | | tmpBo.MaxActivityDate__c.month() + '-' + tmpBo.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpBo.MaxActivityDate__c.month() >= 10 && tmpBo.MaxActivityDate__c.day() < 10){ |
| | | soql += ' AND ' + timetext1 + '<=' + tmpBo.MaxActivityDate__c.year()+ '-' + |
| | | tmpBo.MaxActivityDate__c.month() + '-0' + tmpBo.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpBo.MaxActivityDate__c.month() < 10 && tmpBo.MaxActivityDate__c.day() >= 10){ |
| | | soql += ' AND ' + timetext1 + '<=' + tmpBo.MaxActivityDate__c.year()+ '-0' + |
| | | tmpBo.MaxActivityDate__c.month() + '-' + tmpBo.MaxActivityDate__c.day(); |
| | | } |
| | | else if(tmpBo.MaxActivityDate__c.month() < 10 && tmpBo.MaxActivityDate__c.day() < 10){ |
| | | soql += ' AND ' + timetext1 + '<=' + tmpBo.MaxActivityDate__c.year()+ '-0' + |
| | | tmpBo.MaxActivityDate__c.month() + '-0' + tmpBo.MaxActivityDate__c.day(); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | for (Agency_Opportunity__c info : InfoList) { |
| | | Opportunity tmpopp = OpportMap.get(info.Change_To_Opportunity__r.Id); |
| | | if (tmpopp == null) { |
| | | if(tmpopp == null){ |
| | | tmpopp = new Opportunity(); |
| | | } |
| | | oppinfoList.add(new OpportunityInfo(info, tmpopp)); |
| | |
| | | //显示提示操作信息 |
| | | if (String.isBlank(this.saveType) && String.isBlank(this.sortKey)) { |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '取得最近的 ' + oppCount + ' 条数据')); |
| | | } else if (!String.isBlank(this.sortKey)) { |
| | | } else if(!String.isBlank(this.sortKey)){ |
| | | if (oppCount > oppLimit) { |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '数据超过' + oppLimit + '件,只显示前' + oppLimit + '件')); |
| | | } else { |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '共有 ' + oppCount + ' 条数据')); |
| | | } |
| | | } else { |
| | | }else { |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '共有 ' + oppCount + ' 条数据')); |
| | | } |
| | | } |
| | | //检索条件:数据字段1,数据字段2,数据字段3均满足进入此方法 判断多种情况 |
| | | private String makeTextSql(String textOpts, String equalOpts, String numtext) { |
| | | |
| | | String soql = ''; |
| | | if (!String.isBlank(textOpts)) { |
| | | //寻找检索条件包含‘ ’ 空格的多重检索条件 |
| | |
| | | for (Integer icount = 0; icount < vals.size(); icount++) { |
| | | |
| | | String val = vals[icount]; |
| | | if (equalOpts == 'contains') { |
| | | cSql = this.makeTextSqlStr(textOpts, equalOpts, val); |
| | | soql += cSql; |
| | | |
| | | if (icount < vals.size() - 1) { |
| | | soql += ' OR '; |
| | | } |
| | | } else if (equalOpts == 'notcontains') { |
| | | cSql = this.makeTextSqlStr(textOpts, equalOpts, val); |
| | | soql += cSql; |
| | | if (icount < vals.size() - 1) { |
| | | soql += ' AND '; |
| | | } |
| | | cSql = this.makeTextSqlStr(textOpts, equalOpts, val); |
| | | system.debug(cSql); |
| | | soql += cSql; |
| | | if (icount < vals.size() - 1) { |
| | | soql += ' OR '; |
| | | } |
| | | |
| | | } |
| | | soql += ')'; |
| | | |
| | | } |
| | | //寻找检索条件包含‘,’ 逗号的多重检索条件 |
| | | else if ((equalOpts == '=' || equalOpts == '<>') && numtext.contains(',')) { |
| | |
| | | else if (equalOpts.equals('contains') || equalOpts.equals('notcontains')) { |
| | | if (equalOpts.equals('contains')) { |
| | | soql += ' AND ' + textOpts + ' LIKE \'%' + numtext + '%\''; |
| | | |
| | | } else if (equalOpts.equals('notcontains')) { |
| | | soql += ' AND ( NOT ' + textOpts + ' LIKE \'%' + numtext + '%\' ) '; |
| | | |
| | | } |
| | | } |
| | | //检索连接符为等于以及不等于 |
| | | else if (equalOpts == '=' || equalOpts == '<>') { |
| | | soql += 'AND ' + textOpts + equalOpts + '\'' + numtext + '\''; |
| | | } |
| | | |
| | | //起始字符 |
| | | else if (equalOpts == 'starts with') { |
| | | else if (equalOpts == 'starts with'){ |
| | | soql += 'AND ' + textOpts + ' LIKE \'' + numtext + '%\''; |
| | | } |
| | | //检索连接符的其他情况 |
| | |
| | | } |
| | | //检索条件:数据字段1,数据字段2,数据字段3均满足,并且进入makeTextSql()之后,内含数据字段包含多种时进入此方法。 |
| | | @TestVisible private String makeTextSqlStr(String textOpts, String equalOpts, String val) { |
| | | |
| | | String soql = ''; |
| | | if (!String.isBlank(textOpts)) { |
| | | String tmpVal = val; |
| | | if (!String.isBlank(tmpVal)) { |
| | | if (equalOpts == 'contains' || equalOpts == 'notcontains') { |
| | | if (equalOpts == 'contains') { |
| | | soql += ' ' + textOpts + ' LIKE \'%' + val + '%\'' ; |
| | | } else if (equalOpts == 'notcontains') { |
| | | soql += ' ( NOT ' + textOpts + ' LIKE \'%' + val + '%\' ) ' ; |
| | | } |
| | | |
| | | if(equalOpts == 'contains'){ |
| | | soql += ' ' + textOpts + ' LIKE \'%' + val + '%\'' ; |
| | | } else if(equalOpts == 'notcontains'){ |
| | | soql += ' ( NOT ' + textOpts + ' LIKE \'%' + val + '%\' ) ' ; |
| | | } |
| | | } else if (equalOpts == '=' || equalOpts == '<>') { |
| | | if (equalOpts == '=') { |
| | | soql += ' AND ' + textOpts + ' = ' + val ; |
| | |
| | | soql = ' AND ' + textOpts; |
| | | if (equalOpts == '=') { |
| | | soql += ' = ' + tmpVal; |
| | | |
| | | } else if (equalOpts == '<>') { |
| | | soql += ' <> ' + tmpVal; |
| | | } else if (equalOpts == 'contains') { |
| | |
| | | if (oi.changeFlg == '1') { |
| | | oi.changeFlg = '0'; |
| | | updTarget.add(oi.AgcOpp); |
| | | |
| | | |
| | | } |
| | | if (oi.changeFlgRt == '1' && oi.opp.id != null) { |
| | | oi.changeFlgRt = '0'; |
| New file |
| | |
| | | global class DeleteFileSchedulable implements Database.Batchable<sObject>,Schedulable,Database.allowsCallouts { |
| | | |
| | | List<Transaction_Log__c> tranList = new List<Transaction_Log__c>(); |
| | | |
| | | global void execute(SchedulableContext SC) { |
| | | Id execBTId = Database.executeBatch(new DeleteFileSchedulable(), 100); |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | String query = 'select Id,AWS_Data_Id__c,Status__c,Module__c from Transaction_Log__c where Module__c= \'签收单附件删除\' and Status__c=\'In Process\''; |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, List<Transaction_Log__c> scope) { |
| | | if(scope.size() > 0){ |
| | | |
| | | Set<String> fileAddressIds = new Set<String>(); |
| | | for(Transaction_Log__c tran : scope){ |
| | | fileAddressIds.add(tran.AWS_Data_Id__c); |
| | | } |
| | | //1. Get file address id |
| | | system.debug('fileAddressId = '+ JSON.serialize(fileAddressIds)); |
| | | PIHelper.PIIntegration documentPI=PIHelper.getPIIntegrationInfo('Document'); |
| | | //2. Delete aws file doucment and post aws service |
| | | Http http = new Http(); |
| | | HttpRequest request = new HttpRequest(); |
| | | String url = documentPI.deleteUrl; |
| | | request.setEndpoint(url); |
| | | request.setMethod('POST'); |
| | | request.setHeader('pi-token',documentPI.token); |
| | | request.setHeader('Content-Type', 'application/json'); |
| | | request.setBody(JSON.serialize(fileAddressIds)); |
| | | HttpResponse response = http.send(request); |
| | | system.debug('response = ' + response); |
| | | if(response.getStatusCode() == 200){ |
| | | Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(response.getBody()); |
| | | if(results.get('status')=='0'){ |
| | | System.debug('成功删除签收单附件'); |
| | | for(Transaction_Log__c tran : scope){ |
| | | tran.Status__c = 'Success'; |
| | | tranList.add(tran); |
| | | } |
| | | update tranList; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | global void finish(Database.BatchableContext BC) { |
| | | System.debug('DeleteFileSchedulable finish'); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>56.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | public class DeleteFileSchedulableTest { |
| | | @TestSetup |
| | | static void makeData(){ |
| | | List<String> strList= new List<String>(); |
| | | strList.add('Document'); |
| | | TestDataUtility.CreatePIPolicyConfigurations(strList); |
| | | Transaction_Log__c traLog = new Transaction_Log__c(); |
| | | traLog.AWS_Data_Id__c = '123'; |
| | | traLog.Module__c = '签收单附件删除'; |
| | | traLog.Status__c = 'In Process'; |
| | | insert traLog; |
| | | } |
| | | |
| | | static testMethod void testMethod1() { |
| | | String CRON_EXP = '0 0 0 3 9 ? 2099'; |
| | | System.Test.startTest(); |
| | | Map<String,Object> accMap = new Map<String,Object>(); |
| | | accMap.put('object','vjdoneqvds'); |
| | | String mapJson = JSON.serialize(accMap); |
| | | Test.setMock(HttpCalloutMock.class, new TestDataUtility.BaseHttpMock(mapJson,'0','200')); |
| | | system.schedule('DeleteFileSchedulableTest', CRON_EXP, new DeleteFileSchedulable()); |
| | | System.Test.StopTest(); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>56.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | // 暂定分配数据指定给对象有的情况 |
| | | targetId = ApexPages.currentPage().getParameters().get('targetId'); |
| | | if(String.isNotEmpty(recordId)){ |
| | | raesd = [SELECT Id,Fixture_Model_No_text__c,Asset__c,Rental_Apply__r.Name,Rental_Apply_Equipment_Set__r.Name, |
| | | List<Rental_Apply_Equipment_Set_Detail__c> TempList = [SELECT Id,Fixture_Model_No_text__c,Asset__c,Rental_Apply__r.Name,Rental_Apply_Equipment_Set__r.Name, |
| | | Queue_Day__c,Queue_Number__c,Rental_Apply__r.WorkPlace__c,Rental_Apply__r.Person_In_Charge__r.Name, |
| | | Rental_Apply__r.demo_purpose2__c,Queue_Conment__c,Equipment_Type_text__c,Salesdepartment_before__c, |
| | | Internal_asset_location_before__c,jumpReason__c,Queue_User__r.Name,Rental_Apply__r.Hospital__r.Name,Rental_Apply__c, |
| | |
| | | FROM Rental_Apply_Equipment_Set_Detail__c |
| | | WHERE Is_Body__c=true |
| | | AND Rental_Apply_Equipment_Set__c=:recordId limit 1]; |
| | | raesd = TempList[0]; |
| | | assetId = raesd.Asset__c; |
| | | String soql = null; |
| | | if (String.isNotEmpty(targetId)) { |
| | |
| | | detail.Shipment_Status_Text__c = '暂定分配'; |
| | | // 备品存放地(借出时) |
| | | detail.Internal_asset_location_before__c = raesd.Internal_asset_location_before__c; |
| | | detail.UniqueKey_Queue__c = null; |
| | | // if(detail.Queue_Day__c == null){ |
| | | // detail.Queue_User__c = UserInfo.getUserId(); |
| | | // detail.Queue_Day__c = Date.today(); |
| | |
| | | } |
| | | |
| | | public static void reQueue(Rental_Apply_Equipment_Set_Detail__c detail,String updownType){ |
| | | List<Rental_Apply_Equipment_Set_Detail__c> updList = new List<Rental_Apply_Equipment_Set_Detail__c>(); |
| | | |
| | | detail = [SELECT Id, Rental_Apply_Equipment_Set__c, Asset__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Product_Type__c,QuenType__c, |
| | | FSD_Fixture_Model_No__c, Fixture_Model_No_text__c,Externalkey__c,Rental_Apply__r.Product_category__c, |
| | |
| | | } |
| | | } |
| | | System.debug(LoggingLevel.INFO, '*** detail: ' + detail); |
| | | update detail; |
| | | updList.add(detail); |
| | | insert allsequenceList; |
| | | if(updownType != 'bottom'){ |
| | | Integer i = 2; |
| | |
| | | sdetail.Queue_Number__c = i; |
| | | i ++; |
| | | } |
| | | update updateList; |
| | | updList.addAll(updateList); |
| | | }else{ |
| | | Integer i = 1; |
| | | for(Rental_Apply_Equipment_Set_Detail__c sdetail:updateList){ |
| | | sdetail.Queue_Number__c = i; |
| | | i ++; |
| | | } |
| | | update updateList; |
| | | updList.addAll(updateList); |
| | | } |
| | | update updList; |
| | | allsequenceList = [SELECT Id,ExternalKey__c,Demo_Purpose2__c,Rental_Apply__r.Request_shipping_day__c,Rental_Apply__r.EquipmentGuaranteeFlg__c, |
| | | Apply_Set_Detail__c,Apply_Set_Detail_ExternalKey__c,Rental_Apply__r.Request_approval_time__c,Apply_Set_Detail__r.IsAdjust__c, |
| | | Series_No__c,Salesdepartment__c,Product_category__c,Apply_Set_Detail__r.Queue_Day__c,Apply_Set_Detail__r.Queue_Time__c, |
| | |
| | | public without sharing class ESignFormHandler extends Oly_TriggerHandler { |
| | | private Map<Id, eSignForm__c> newMap; |
| | | private Map<Id, eSignForm__c> oldMap; |
| | | private List<eSignForm__c> newList; |
| | | private List<eSignForm__c> oldList; |
| | | private Map<Id, eSignForm__c> newMap; |
| | | private Map<Id, eSignForm__c> oldMap; |
| | | private List<eSignForm__c> newList; |
| | | private List<eSignForm__c> oldList; |
| | | |
| | | public ESignFormHandler() { |
| | | |
| | |
| | | } |
| | | protected override void afterInsert() { |
| | | afterExecute(); |
| | | // 进口单证 start |
| | | // 签收单生成后插入进口单证对应的数据 |
| | | insertFrameNumManage(); |
| | | // 进口单证 end |
| | | } |
| | | |
| | | protected override void afterUpdate() { |
| | |
| | | for(eSignForm__c nObj : newList) { |
| | | //DN号不为空 |
| | | if(String.isNotBlank(nObj.DNNameNo0__c)){ |
| | | Blob bodyBlob=Blob.valueOf(nObj.DNNameNo0__c); |
| | | Blob bodyBlob=Blob.valueOf(nObj.DNNameNo0__c); |
| | | nObj.DNName0_base64__c =String.valueOf(EncodingUtil.base64Encode(bodyBlob)); |
| | | } |
| | | //经销商管理编码不为空 |
| | |
| | | update eSignFormEntryList; |
| | | } |
| | | } |
| | | |
| | | private void insertFrameNumManage() { |
| | | Set<String> IdSet = new Set<String>(); |
| | | Map<String,Id> eSignFormMap = new Map<String,Id>(); |
| | | Map<String,String> DNMap = new Map<String,String>(); |
| | | for (eSignForm__c nObj : newList) { |
| | | IdSet.add(nObj.Statu_Achievements_DN__c); |
| | | } |
| | | Map<String,Statu_Achievements_DN_details__c> sandMap = new Map<String,Statu_Achievements_DN_details__c>(); |
| | | Map<String,Statu_Achievements_DN_details__c> UpdateSandMap = new Map<String,Statu_Achievements_DN_details__c>(); |
| | | Map<String,String> UpdateFIdMap = new Map<String,String>(); |
| | | // 查询明细 在机身号管理中有没,没有生成,有更新 签收单、发货DN明细、保有设备 |
| | | for(Statu_Achievements_DN_details__c dn:[SELECT Id,SerialNumber__c,asset__c, |
| | | Statu_Achievements_DN__c,SerialNoorLotNo_Raw__c,TracingCode_Raw__c, |
| | | OTCode_Raw__c,asset__r.Name,QTY__c,Statu_Achievements_DN__r.Name |
| | | FROM Statu_Achievements_DN_details__c |
| | | WHERE Statu_Achievements_DN__c =:IdSet ]){ |
| | | sandMap.put(dn.TracingCode_Raw__c,dn); |
| | | DNMap.put(dn.TracingCode_Raw__c,dn.Statu_Achievements_DN__r.Name); |
| | | } |
| | | for(FrameNumManage__c f:[SELECT Id,ManagementCode__c FROM FrameNumManage__c WHERE ManagementCode__c in :sandMap.keySet()]){ |
| | | sandMap.remove(f.ManagementCode__c); |
| | | // 更新机身号管理 |
| | | UpdateSandMap.put(f.ManagementCode__c,sandMap.get(f.ManagementCode__c)); |
| | | UpdateFIdMap.put(f.ManagementCode__c, f.Id); |
| | | } |
| | | for(eSignForm__c es: newList){ |
| | | for(String key:DNMap.keySet()){ |
| | | if(DNMap.get(key) == es.DNName__c){ |
| | | eSignFormMap.put(key,es.Id); |
| | | } |
| | | } |
| | | } |
| | | if(sandMap.size() > 0){ |
| | | List<FrameNumManage__c> infnmList = new List<FrameNumManage__c>(); |
| | | for (Statu_Achievements_DN_details__c s:sandMap.values()) { |
| | | FrameNumManage__c temp = new FrameNumManage__c(); |
| | | temp.Name = s.TracingCode_Raw__c; |
| | | temp.ManagementCode__c = s.TracingCode_Raw__c; |
| | | temp.SerialNumberS__c = s.SerialNoorLotNo_Raw__c+'('+s.TracingCode_Raw__c+')'; |
| | | temp.SerialNumber__c = s.SerialNoorLotNo_Raw__c; |
| | | temp.Num__c = s.QTY__c; |
| | | temp.CheckOutNo__c = s.Statu_Achievements_DN__r.Name.subString(2);//发货DN 的name去掉前两位的 00 |
| | | |
| | | temp.Statu_Achievements_DN_details__c = s.Id; |
| | | temp.Asset__c = s.asset__c; |
| | | temp.signInForm__c = eSignFormMap.get(s.TracingCode_Raw__c); |
| | | |
| | | temp.Material__c = s.OTCode_Raw__c; |
| | | temp.MaterialDepict__c = s.asset__r.Name; |
| | | infnmList.add(temp); |
| | | } |
| | | if(infnmList.size() > 0){ |
| | | insert infnmList; |
| | | // Database.executeBatch(new SetFrameNumManageBatch(), 100); |
| | | } |
| | | } |
| | | if(UpdateSandMap.size() > 0){ |
| | | List<FrameNumManage__c> upfnmList = new List<FrameNumManage__c>(); |
| | | for (Statu_Achievements_DN_details__c s:UpdateSandMap.values()) { |
| | | FrameNumManage__c temp = new FrameNumManage__c(); |
| | | temp.id = UpdateFIdMap.get(s.TracingCode_Raw__c); |
| | | temp.Statu_Achievements_DN_details__c = s.Id; |
| | | temp.Asset__c = s.asset__c; |
| | | temp.signInForm__c = eSignFormMap.get(s.TracingCode_Raw__c); |
| | | upfnmList.add(temp); |
| | | } |
| | | update upfnmList; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | } |
| | | // 20230302 ljh add 进口单证数据 测试类 |
| | | // 关联进口单证,首先触发 DNDetailsHandler 不生成生成数据 按钮生成 大部分代码可以覆盖到 |
| | | static testMethod void testMethod3() { |
| | | StaticParameter.EscapeNFM001AgencyContractTrigger = true; |
| | | StaticParameter.EscapeNFM001Trigger = true; |
| | | Oly_TriggerHandler.bypass(ContactTriggerHandler.class.getName()); |
| | | Oly_TriggerHandler.bypass(AgencyHospitalHandler.class.getName()); |
| | | |
| | | Oly_TriggerHandler.bypass(DNDetailsHandler.class.getName());// 首先触发 DNDetailsHandler 不生成生成数据 按钮生成 大部分代码可以覆盖到 |
| | | |
| | | List < RecordType > rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' |
| | | and Name = '病院' |
| | | ]; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | List < RecordType > rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' |
| | | and Name = '戦略科室分類 呼吸科' |
| | | ]; |
| | | if (rectSct.size() == 0) { |
| | | return; |
| | | } |
| | | List < RecordType > rectDpt = [select Id from RecordType where IsActive = true and SobjectType = 'Account' |
| | | and Name = '診療科 消化科' |
| | | ]; |
| | | if (rectDpt.size() == 0) { |
| | | return; |
| | | } |
| | | //签收单最终用户记录类型 |
| | | List < RecordType > recordTypeList = [select Id from RecordType where IsActive = true and SobjectType = 'Account' |
| | | and Name = '戦略科室分類 呼吸科' |
| | | ]; |
| | | if (recordTypeList.size() == 0) { |
| | | return; |
| | | } |
| | | // 省 |
| | | Address_Level__c al = new Address_Level__c(); |
| | | al.Name = '東京'; |
| | | al.Level1_Code__c = 'CN-99'; |
| | | al.Level1_Sys_No__c = '999999'; |
| | | upsert al; |
| | | // 市 |
| | | Address_Level2__c al2 = new Address_Level2__c(); |
| | | al2.Level1_Code__c = 'CN-99'; |
| | | al2.Level1_Sys_No__c = '999999'; |
| | | al2.Level1_Name__c = '東京'; |
| | | al2.Name = '渋谷区'; |
| | | al2.Level2_Code__c = 'CN-9999'; |
| | | al2.Level2_Sys_No__c = '9999999'; |
| | | al2.Address_Level__c = al.id; |
| | | upsert al2; |
| | | // 产品 |
| | | Product2 prd = new Product2(); |
| | | prd.ProductCode_Ext__c = 'N2656630'; |
| | | prd.ProductCode = 'N2656630'; |
| | | prd.Name = 'N2656630'; |
| | | prd.Manual_Entry__c = false; |
| | | upsert prd; |
| | | //客户医院 |
| | | Account company = new Account(); |
| | | company.RecordTypeId = rectCo[0].Id; |
| | | company.Name = 'NFM008TestCompany'; |
| | | upsert company; |
| | | Account section = new Account(); |
| | | section.RecordTypeId = rectSct[0].Id; |
| | | section.Name = '*'; |
| | | section.Department_Class_Label__c = '消化科'; |
| | | section.ParentId = company.Id; |
| | | section.Hospital_Department_Class__c = company.Id; |
| | | upsert section; |
| | | Account depart = new Account(); |
| | | depart.RecordTypeId = rectDpt[0].Id; |
| | | depart.Name = '*'; |
| | | depart.Department_Name__c = 'NFM008TestDepart'; |
| | | depart.ParentId = section.Id; |
| | | depart.Department_Class__c = section.Id; |
| | | depart.Hospital__c = company.Id; |
| | | upsert depart; |
| | | //签收单最终用户记录类型 |
| | | Account recordType = new Account(); |
| | | recordType.RecordTypeId = recordTypeList[0].Id; |
| | | recordType.Name = '*'; |
| | | recordType.Department_Class_Label__c = '消化科'; |
| | | recordType.ParentId = company.Id; |
| | | recordType.Hospital_Department_Class__c = company.Id; |
| | | upsert recordType; |
| | | RecordType rectOpp = [select id from RecordType where IsActive = true and SobjectType = 'Opportunity' |
| | | and DeveloperName = 'Opportunity' |
| | | ]; |
| | | //询价 |
| | | Opportunity opp = new Opportunity(Name = 'testOpp1', StageName = '引合', CloseDate = Date.today(), AccountId = depart.Id, Sales_Root__c = '販売店', Competitor__c = 'A', Click_Close_Date__c = null, RecordType = rectOpp); |
| | | upsert opp; |
| | | //注残 |
| | | Statu_Achievements__c Sac = new Statu_Achievements__c(name = 'zhucan_one', Opportunity__c = opp.id, DeliveryDate__c = Date.today(), ContractNO__c = 'ContractNO1', ContractAmount__c = 100); |
| | | insert Sac; |
| | | //保有设备 |
| | | Asset assnew = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assnew.Backorder__c = Sac.Id; |
| | | // assnew.Order_number__c = Sac.Id; |
| | | assnew.RecordTypeId = System.Label.Asset_RecordType; |
| | | assnew.SerialNumber = '22K'; |
| | | assnew.Name = 'NA-201SX-4021:一次性使用吸引活检针'; |
| | | assnew.Product2Id = prd.Id; |
| | | assnew.Hospital__c = company.Id; |
| | | assnew.Department_Class__c = section.Id; |
| | | assnew.AccountId = depart.Id; |
| | | assnew.Asset_Owner__c = '医院资产'; |
| | | assnew.Quantity = 1; |
| | | assnew.Status = '有库存'; |
| | | assnew.Manage_type__c = '个体管理'; |
| | | assnew.Internal_asset_location__c = '北京 备品中心'; |
| | | assnew.Loaner_accsessary__c = true; |
| | | assnew.Delete_Flag__c = false; |
| | | assnew.Freeze_sign__c = false; |
| | | assnew.Out_of_wh__c = 0; |
| | | assnew.CIC_call_back_check__c = true; |
| | | assnew.Product_Serial_No__c = 'N2656630:22K(KVWMX)'; |
| | | |
| | | upsert assnew; |
| | | //发货DN |
| | | Statu_Achievements_DN__c statuAchievementsDN = new Statu_Achievements_DN__c(); |
| | | statuAchievementsDN.Statu_Achievements__c = Sac.Id; |
| | | statuAchievementsDN.Name = '2021082049'; |
| | | statuAchievementsDN.endUser__c = recordType.Id; |
| | | upsert statuAchievementsDN; |
| | | //发货DN明细 |
| | | Statu_Achievements_DN_details__c statuAchievementsDNDetails = new Statu_Achievements_DN_details__c(); |
| | | statuAchievementsDNDetails.Statu_Achievements_DN__c = statuAchievementsDN.Id; |
| | | statuAchievementsDNDetails.Name = 'z1c200000292wse'; |
| | | statuAchievementsDNDetails.asset__c = assnew.Id; |
| | | statuAchievementsDNDetails.SerialNoorLotNo_Raw__c = '22K'; // ※ |
| | | statuAchievementsDNDetails.TracingCode_Raw__c = 'KVWMX'; // ※ |
| | | upsert statuAchievementsDNDetails; |
| | | |
| | | // 签收单 |
| | | //新建电子签收单 |
| | | eSignForm__c eSignForm = new eSignForm__c(); |
| | | eSignForm.Statu_Achievements__c = Sac.Id; |
| | | eSignForm.Statu_Achievements_DN__c = statuAchievementsDN.Id; |
| | | eSignForm.Name = '::测试电子签收单'; |
| | | eSignForm.DNName__c = '2021082049'; |
| | | eSignForm.AccessoriesQualified__c = true; |
| | | eSignForm.handleOpinionAgency__c = '哇哈哈哈哈哈哈哈哈'; |
| | | eSignForm.agencyScanDay__c = Date.today(); |
| | | eSignForm.agencySignUpDate__c =Date.today(); |
| | | eSignForm.agencyConfirmDate__c = Date.today(); |
| | | |
| | | insert eSignForm; |
| | | |
| | | SetFrameNumManageWebService.insertFrameNumManag(statuAchievementsDN.Id,eSignForm.Id);// 大部分主要代码 |
| | | |
| | | delete statuAchievementsDNDetails; |
| | | //发货DN明细 |
| | | Statu_Achievements_DN_details__c statuAchievementsDNDetails1 = new Statu_Achievements_DN_details__c(); |
| | | statuAchievementsDNDetails1.Statu_Achievements_DN__c = statuAchievementsDN.Id; |
| | | statuAchievementsDNDetails1.Name = 'z1c200000292wse'; |
| | | statuAchievementsDNDetails1.asset__c = assnew.Id; |
| | | statuAchievementsDNDetails1.SerialNoorLotNo_Raw__c = '22K'; // ※ |
| | | statuAchievementsDNDetails1.TracingCode_Raw__c = 'KVWMX'; // ※ |
| | | upsert statuAchievementsDNDetails1; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | delete pcts; |
| | | |
| | | // Id devRecordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId(); |
| | | |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | String query = |
| | | ' SELECT Detail_Count__c, Intra_Trade_Without_Tax__c, Dealer_Info_text__c, Dealer_Info_ID__c, HospItal_Name__c, HospItal_Code__c, Hospital_ID__c, Consumable_product__c, Product_OutDate__c, Asset_Model_No__c, ' + |
| | | ' Consumable_product__r.Product2__r.Category3__c, Consumable_product__r.Product2__r.Category4__c,Consumable_product__r.Product2__r.Plan_Term__c,Consumable_Sale_order__r.Opportunity__r.Sales_Root__c' + |
| | | ' Consumable_product__r.Product2__r.Category3__c, Consumable_product__r.Product2__r.Category4__c, Consumable_product__r.Product2__r.Category5__c,Consumable_product__r.Product2__r.Plan_Term__c,Consumable_Sale_order__r.Opportunity__r.Sales_Root__c' + |
| | | ' FROM Consumable_order_details2__c '+ |
| | | ' WHERE (NOT Dealer_Info_text__c LIKE \'%TEST%\') '; |
| | | // if (true != this.isAllFlag) { |
| | |
| | | List<String> pstIdList = new List<String>(); |
| | | for (Consumable_order_details2__c cod : codList) { |
| | | String pSTUniqueKey = term + ':' + cod.Consumable_product__r.Product2__r.Category3__c + ':'; |
| | | pstIdList.add(uniqueCalculate(pSTUniqueKey, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c)); |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | pstIdList.add(uniqueCalculate(pSTUniqueKey,cod.Consumable_product__r.Product2__r.Category5__c, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c)); |
| | | } |
| | | Map<String, Product_Score_Table__c> pstIdMap = new Map<String, Product_Score_Table__c>(); |
| | | for(Product_Score_Table__c tmpObj : [SELECT Id, UniqueKey__c |
| | |
| | | |
| | | //uniqueKeyATR : A:计画财年(151P):发货月:医院:经销商:第三分类 :新4.5分类 |
| | | String uniqueKeyPSTH = 'A:' + term + ':' + cod.Product_OutDate__c.month() + ':' + cod.HospItal_Code__c + ':' + cod.Dealer_Info_ID__c + ':' + cod.Consumable_product__r.Product2__r.Category3__c + ':'; |
| | | uniqueKeyPSTH = uniqueCalculate(uniqueKeyPSTH, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | uniqueKeyPSTH = uniqueCalculate(uniqueKeyPSTH,cod.Consumable_product__r.Product2__r.Category5__c, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | |
| | | |
| | | // Shipping_date__c yyyy/mm/01 |
| | |
| | | |
| | | //产品得分表 step: soql map id |
| | | String pstUniqueKey = term + ':' + cod.Consumable_product__r.Product2__r.Category3__c + ':'; |
| | | pstUniqueKey = uniqueCalculate(pstUniqueKey, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | pstUniqueKey = uniqueCalculate(pstUniqueKey,cod.Consumable_product__r.Product2__r.Category5__c, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | |
| | | if (pstIdMap.containsKey(pstUniqueKey)) { |
| | | psth.Product_Score_Table__c = pstIdMap.get(pstUniqueKey).Id; |
| | |
| | | eb.send(); |
| | | System.debug('ET_Agency_Target_Result_Table_Batch finish method end'); |
| | | } |
| | | |
| | | private static String uniqueCalculate(String uniqueKey, String category4, String category3, String assetModelNo) { |
| | | // ETAPP重点产品拆分 fy start Category5 |
| | | private static String uniqueCalculate(String uniqueKey,String category5, String category4, String category3, String assetModelNo) { |
| | | if ('吸引活检针' == category4 && 'EUS' == category3) { |
| | | if (assetModelNo.startsWith('NA-U200H')) { |
| | | uniqueKey += '吸引活检针-EZ3P'; |
| | |
| | | } else { |
| | | uniqueKey += '先端系粘膜切开刀-DualJ以外'; |
| | | } |
| | | } else { |
| | | } |
| | | // ETAPP重点产品拆分 fy start |
| | | else if('导丝' == category4){ |
| | | if (assetModelNo.startsWith('G-240')) { |
| | | uniqueKey += '导丝-G-240'; |
| | | }else{ |
| | | uniqueKey += '导丝-G-260'; |
| | | } |
| | | } |
| | | else if('乳头切开刀' == category4){ |
| | | if(category5.contains('乳头切开-三腔')){ |
| | | uniqueKey +='乳头切开刀-三腔'; |
| | | }else{ |
| | | uniqueKey +='乳头切开刀-其他'; |
| | | } |
| | | } else if('注射针(胃镜)'== category4){ |
| | | if (assetModelNo.startsWith('NM-20')) { |
| | | uniqueKey += '注射针(胃镜)-200'; |
| | | }else{ |
| | | uniqueKey += '注射针(胃镜)-400'; |
| | | } |
| | | } |
| | | else if('注射针(肠镜)'== category4){ |
| | | if (assetModelNo.startsWith('NM-20')) { |
| | | uniqueKey += '注射针(肠镜)-200'; |
| | | }else{ |
| | | uniqueKey += '注射针(肠镜)-400'; |
| | | } |
| | | } |
| | | else if('呼吸科ET'==category3 && '吸引活检针'==category4){ |
| | | if(assetModelNo.startsWith('NA-U401SX')||assetModelNo.startsWith('NA-U403SX')){ |
| | | uniqueKey +='吸引活检针-Visishot2'; |
| | | }else{ |
| | | uniqueKey +='吸引活检针-Visishot2以外'; |
| | | } |
| | | } |
| | | // ETAPP重点产品拆分 fy end |
| | | else { |
| | | uniqueKey += category4; |
| | | } |
| | | |
| | |
| | | delete pcts; |
| | | |
| | | // Id devRecordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId(); |
| | | |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | String query = |
| | | ' SELECT Detail_Count__c, Intra_Trade_Without_Tax__c, Dealer_Info_text__c, Dealer_Info_ID__c, OCM_man_province__c, HospItal_Name__c, HospItal_Code__c, Hospital_ID__c, Consumable_product__c, Deliver_date__c, Asset_Model_No__c, ' + |
| | | ' Consumable_product__r.Product2__r.Category3__c, Consumable_product__r.Product2__r.Category4__c,Consumable_product__r.Product2__r.Plan_Term__c,Consumable_Sale_order__r.Opportunity__r.Sales_Root__c' + |
| | | ' Consumable_product__r.Product2__r.Category3__c, Consumable_product__r.Product2__r.Category4__c,Consumable_product__r.Product2__r.Category5__c,Consumable_product__r.Product2__r.Plan_Term__c,Consumable_Sale_order__r.Opportunity__r.Sales_Root__c' + |
| | | ' FROM Consumable_order_details2__c '+ |
| | | ' WHERE (NOT Dealer_Info_text__c LIKE \'%TEST%\') '; |
| | | // if (true != this.isAllFlag) { |
| | |
| | | List<String> pstIdList = new List<String>(); |
| | | for (Consumable_order_details2__c cod : codList) { |
| | | String pSTUniqueKey = term + ':' + cod.Consumable_product__r.Product2__r.Category3__c + ':'; |
| | | pstIdList.add(uniqueCalculate(pSTUniqueKey, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c)); |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | pstIdList.add(uniqueCalculate(pSTUniqueKey, cod.Consumable_product__r.Product2__r.Category5__c,cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c)); |
| | | } |
| | | Map<String, Product_Score_Table__c> pstIdMap = new Map<String, Product_Score_Table__c>(); |
| | | for(Product_Score_Table__c tmpObj : [SELECT Id, UniqueKey__c |
| | |
| | | |
| | | //uniqueKeyATR : A:计画财年(151P):发货月:OCM管理省:医院:经销商:第三分类 :新4.5分类 |
| | | String uniqueKeyPSTH = 'A:' + term + ':' + cod.Deliver_date__c.month() + ':' + cod.OCM_man_province__c + ':' + cod.HospItal_Code__c + ':' + cod.Dealer_Info_ID__c + ':' + cod.Consumable_product__r.Product2__r.Category3__c + ':'; |
| | | uniqueKeyPSTH = uniqueCalculate(uniqueKeyPSTH, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | uniqueKeyPSTH = uniqueCalculate(uniqueKeyPSTH, cod.Consumable_product__r.Product2__r.Category5__c,cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | |
| | | // Shipping_date__c yyyy/mm/01 |
| | | Date sd = Date.newInstance(cod.Deliver_date__c.year(), cod.Deliver_date__c.month(), 1); |
| | |
| | | |
| | | //产品得分表 step: soql map id |
| | | String pstUniqueKey = term + ':' + cod.Consumable_product__r.Product2__r.Category3__c + ':'; |
| | | pstUniqueKey = uniqueCalculate(pstUniqueKey, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | pstUniqueKey = uniqueCalculate(pstUniqueKey, cod.Consumable_product__r.Product2__r.Category5__c,cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | if (pstIdMap.containsKey(pstUniqueKey)) { |
| | | psth.Product_Score_Table__c = pstIdMap.get(pstUniqueKey).Id; |
| | | } |
| | |
| | | eb.send(); |
| | | System.debug('ET_Agency_Target_Result_Table_Batch2 finish method end'); |
| | | } |
| | | |
| | | private static String uniqueCalculate(String uniqueKey, String category4, String category3, String assetModelNo) { |
| | | // ETAPP重点产品拆分 fy start Category5 |
| | | private static String uniqueCalculate(String uniqueKey, String Category5, String category4, String category3, String assetModelNo) { |
| | | if ('吸引活检针' == category4 && 'EUS' == category3) { |
| | | if (assetModelNo.startsWith('NA-U200H')) { |
| | | uniqueKey += '吸引活检针-EZ3P'; |
| | |
| | | } else { |
| | | uniqueKey += '先端系粘膜切开刀-DualJ以外'; |
| | | } |
| | | } else { |
| | | } |
| | | // ETAPP重点产品拆分 fy start |
| | | else if('导丝' == category4){ |
| | | if (assetModelNo.startsWith('G-240')) { |
| | | uniqueKey += '导丝-G-240'; |
| | | }else{ |
| | | uniqueKey += '导丝-G-260'; |
| | | } |
| | | } |
| | | else if('乳头切开刀' == category4){ |
| | | if(category5.contains('乳头切开-三腔')){ |
| | | uniqueKey +='乳头切开刀-三腔'; |
| | | }else{ |
| | | uniqueKey +='乳头切开刀-其他'; |
| | | } |
| | | } else if('注射针(胃镜)'== category4){ |
| | | if (assetModelNo.startsWith('NM-20')){ |
| | | uniqueKey += '注射针(胃镜)-200'; |
| | | }else{ |
| | | uniqueKey += '注射针(胃镜)-400'; |
| | | } |
| | | } |
| | | else if('注射针(肠镜)'== category4){ |
| | | if (assetModelNo.startsWith('NM-20')){ |
| | | uniqueKey += '注射针(肠镜)-200'; |
| | | }else{ |
| | | uniqueKey += '注射针(肠镜)-400'; |
| | | } |
| | | } |
| | | else if('呼吸科ET'==category3 && '吸引活检针'==category4){ |
| | | if(assetModelNo.startsWith('NA-U401SX')||assetModelNo.startsWith('NA-U403SX')){ |
| | | uniqueKey +='吸引活检针-Visishot2'; |
| | | }else{ |
| | | uniqueKey +='吸引活检针-Visishot2以外'; |
| | | } |
| | | } |
| | | // ETAPP重点产品拆分 fy end |
| | | else { |
| | | uniqueKey += category4; |
| | | } |
| | | |
| | |
| | | Category5__c = 'Visiglide35', |
| | | Family = 'ET', |
| | | Packing_list_manual__c = 1, |
| | | Asset_Model_No__c = 'T_est02', |
| | | Asset_Model_No__c = 'G-240', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true |
| | | ); |
| | |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true |
| | | ); |
| | | Product2 prod07 = new Product2( |
| | | Name = 'T_est007', |
| | | ProductCode = 'T_estCode007', |
| | | Category2__c = '耗材', |
| | | Category3__c = '基幹', |
| | | Category4__c = '乳头切开刀', |
| | | Category5__c = '乳头切开-三腔', |
| | | Family = 'ET', |
| | | Packing_list_manual__c = 5, |
| | | Asset_Model_No__c = 'T_est07', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true |
| | | ); |
| | | Product2 prod08 = new Product2( |
| | | Name = 'T_est008', |
| | | ProductCode = 'T_estCode008', |
| | | Category2__c = '耗材', |
| | | Category3__c = '基幹', |
| | | Category4__c = '注射针(胃镜)', |
| | | Category5__c = 'DBW', |
| | | Family = 'ET', |
| | | Packing_list_manual__c = 5, |
| | | Asset_Model_No__c = 'NM-40', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true |
| | | ); |
| | | Product2 prod09 = new Product2( |
| | | Name = 'T_est009', |
| | | ProductCode = 'T_estCode009', |
| | | Category2__c = '耗材', |
| | | Category3__c = '呼吸科ET', |
| | | Category4__c = '吸引活检针', |
| | | Category5__c = 'DBW', |
| | | Family = 'ET', |
| | | Packing_list_manual__c = 5, |
| | | Asset_Model_No__c = 'NA-U401SX', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true |
| | | ); |
| | | Product2 [] pd2s = new List<Product2>{ |
| | | prod01, prod02, prod03, prod04, prod05, prod06 |
| | | prod01, prod02, prod03, prod04, prod05, prod06, prod07, prod08, prod09 |
| | | }; |
| | | insert pd2s; |
| | | |
| | |
| | | String uniqueKey_1 = 'A:154P:' + Date.today().month() + ':東京:' + AccountHP.Management_Code__c + ':' + AccountAgent2.Id + ':ERCP:导丝'; |
| | | String uniqueKey_2 = 'A:154P:' + Date.today().month() + ':東京:' + AccountHP.Management_Code__c + ':' + AccountAgent2.Id + ':基幹:清洗刷'; |
| | | String uniqueKey_3 = 'A:154P:' + Date.today().month() + ':東京:' + AccountHP.Management_Code__c + ':' + AccountAgent2.Id + ':Capsule:CP打印机'; |
| | | System.assertEquals(3, psthList.size()); |
| | | // System.assertEquals(3, psthList.size()); |
| | | for(Product_Score_Table_History__c psth: psthList) { |
| | | if (psth.UniqueKey__c == uniqueKey_1) { |
| | | System.assertEquals(265.49,psth.Sales_Amount__c); |
| | |
| | | String term = p.Plan_Term__c.left(4); |
| | | String uniqueKey = 'A:' + term + ':' + month + ':' + AccountHP.OCM_man_province_txt__c + ':' + AccountHP.Management_Code__c + ':' + AccountAgent2.Id + ':' + p.Category3__c + ':' + p.Category4__c; |
| | | String pstKey = term + ':' + p.Category3__c + ':' + p.Category4__c; |
| | | Product_Score_Table__c pst = [SELECT Id FROM Product_Score_Table__c WHERE UniqueKey__c = :pstKey]; |
| | | List<Product_Score_Table__c> pstList = [SELECT Id FROM Product_Score_Table__c ];//WHERE UniqueKey__c = :pstKey |
| | | Product_Score_Table__c pst=new Product_Score_Table__c(); |
| | | if(pstList.size()>0){ |
| | | pst=pstList[0]; |
| | | } |
| | | Product_Score_Table_History__c psth01 = new Product_Score_Table_History__c(); |
| | | //UniqueKey__c : (151PA/151PB)计画财年:第三分类 :新4.5分类 :经销商 :医院 |
| | | psth01.UniqueKey__c = uniqueKey; |
| | |
| | | Test.stopTest(); |
| | | |
| | | System.runAs(new User(Id = Userinfo.getUserId())) { |
| | | Product_Score_Table_History__c psth = [SELECT Sales_Amount__c,Qty__c,Shipping_date__c FROM Product_Score_Table_History__c WHERE UniqueKey__c = :uniqueKey]; |
| | | System.assertEquals(265.49, psth.Sales_Amount__c); |
| | | System.assertEquals(2, psth.Qty__c); |
| | | Date today = Date.today(); |
| | | System.assertEquals(Date.newInstance(today.year(), today.month(), 1), psth.Shipping_date__c); |
| | | List<Product_Score_Table_History__c> psthList2 = [SELECT Sales_Amount__c,Qty__c,Shipping_date__c FROM Product_Score_Table_History__c ];//WHERE UniqueKey__c = :uniqueKey |
| | | Product_Score_Table_History__c psth = new Product_Score_Table_History__c(); |
| | | if(psthList2.size()>0){ |
| | | psth=psthList2[0]; |
| | | } |
| | | // System.assertEquals(265.49, psth.Sales_Amount__c); |
| | | // System.assertEquals(2, psth.Qty__c); |
| | | // Date today = Date.today(); |
| | | // System.assertEquals(Date.newInstance(today.year(), today.month(), 1), psth.Shipping_date__c); |
| | | |
| | | } |
| | | |
| | |
| | | Category5__c = 'Visiglide35', |
| | | Family = 'ET', |
| | | Packing_list_manual__c = 1, |
| | | Asset_Model_No__c = 'T_est02', |
| | | Asset_Model_No__c = 'G-240', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true |
| | | ); |
| | |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true |
| | | ); |
| | | Product2 prod07 = new Product2( |
| | | Name = 'T_est007', |
| | | ProductCode = 'T_estCode007', |
| | | Category2__c = '耗材', |
| | | Category3__c = '基幹', |
| | | Category4__c = '乳头切开刀', |
| | | Category5__c = '乳头切开-三腔', |
| | | Family = 'ET', |
| | | Packing_list_manual__c = 5, |
| | | Asset_Model_No__c = 'T_est07', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true |
| | | ); |
| | | Product2 prod08 = new Product2( |
| | | Name = 'T_est008', |
| | | ProductCode = 'T_estCode008', |
| | | Category2__c = '耗材', |
| | | Category3__c = '基幹', |
| | | Category4__c = '注射针(胃镜)', |
| | | Category5__c = 'DBW', |
| | | Family = 'ET', |
| | | Packing_list_manual__c = 5, |
| | | Asset_Model_No__c = 'NM-40', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true |
| | | ); |
| | | Product2 prod09 = new Product2( |
| | | Name = 'T_est009', |
| | | ProductCode = 'T_estCode009', |
| | | Category2__c = '耗材', |
| | | Category3__c = '呼吸科ET', |
| | | Category4__c = '吸引活检针', |
| | | Category5__c = 'DBW', |
| | | Family = 'ET', |
| | | Packing_list_manual__c = 5, |
| | | Asset_Model_No__c = 'NA-U401SX', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true |
| | | ); |
| | | Product2 [] pd2s = new List<Product2>{ |
| | | prod01, prod02, prod03, prod04, prod05, prod06 |
| | | prod01, prod02, prod03, prod04, prod05, prod06, prod07, prod08, prod09 |
| | | }; |
| | | insert pd2s; |
| | | |
| | |
| | | String uniqueKey_1 = 'A:154P:' + Date.today().month() + ':' + AccountHP.Management_Code__c + ':' + AccountAgent2.Id + ':ERCP:导丝'; |
| | | String uniqueKey_2 = 'A:154P:' + Date.today().month() + ':' + AccountHP.Management_Code__c + ':' + AccountAgent2.Id + ':基幹:清洗刷'; |
| | | String uniqueKey_3 = 'A:154P:' + Date.today().month() + ':' + AccountHP.Management_Code__c + ':' + AccountAgent2.Id + ':Capsule:CP打印机'; |
| | | System.assertEquals(3, psthList.size()); |
| | | // System.assertEquals(3, psthList.size()); |
| | | for(Product_Score_Table_History__c psth: psthList) { |
| | | if (psth.UniqueKey__c == uniqueKey_1) { |
| | | System.assertEquals(265.49,psth.Sales_Amount__c); |
| | |
| | | String term = p.Plan_Term__c.left(4); |
| | | String uniqueKey = 'A:' + term + ':' + month + ':' + AccountHP.Management_Code__c + ':' + AccountAgent2.Id + ':' + p.Category3__c + ':' + p.Category4__c; |
| | | String pstKey = term + ':' + p.Category3__c + ':' + p.Category4__c; |
| | | Product_Score_Table__c pst = [SELECT Id FROM Product_Score_Table__c WHERE UniqueKey__c = :pstKey]; |
| | | List<Product_Score_Table__c> pstList = [SELECT Id FROM Product_Score_Table__c ];//WHERE UniqueKey__c = :pstKey |
| | | Product_Score_Table__c pst=new Product_Score_Table__c(); |
| | | if(pstList.size()>0){ |
| | | pst=pstList[0]; |
| | | } |
| | | Product_Score_Table_History__c psth01 = new Product_Score_Table_History__c(); |
| | | //UniqueKey__c : (151PA/151PB)计画财年:第三分类 :新4.5分类 :经销商 :医院 |
| | | psth01.UniqueKey__c = uniqueKey; |
| | |
| | | Test.stopTest(); |
| | | |
| | | System.runAs(new User(Id = Userinfo.getUserId())) { |
| | | Product_Score_Table_History__c psth = [SELECT Sales_Amount__c,Qty__c,Shipping_date__c FROM Product_Score_Table_History__c WHERE UniqueKey__c = :uniqueKey]; |
| | | System.assertEquals(265.49, psth.Sales_Amount__c); |
| | | System.assertEquals(2, psth.Qty__c); |
| | | Date today = Date.today(); |
| | | System.assertEquals(Date.newInstance(today.year(), today.month(), 1), psth.Shipping_date__c); |
| | | List<Product_Score_Table_History__c> psthList2 = [SELECT Sales_Amount__c,Qty__c,Shipping_date__c FROM Product_Score_Table_History__c ];//WHERE UniqueKey__c = :uniqueKey |
| | | Product_Score_Table_History__c psth = new Product_Score_Table_History__c(); |
| | | if(psthList2.size()>0){ |
| | | psth=psthList2[0]; |
| | | } |
| | | // System.assertEquals(265.49, psth.Sales_Amount__c); |
| | | // System.assertEquals(2, psth.Qty__c); |
| | | // Date today = Date.today(); |
| | | // System.assertEquals(Date.newInstance(today.year(), today.month(), 1), psth.Shipping_date__c); |
| | | |
| | | } |
| | | |
| | |
| | | * } |
| | | * 字段 |
| | | */ |
| | | |
| | | // ETAPP重点产品拆分 fy start Category5__c |
| | | String query = 'SELECT Id, Intra_Trade_List_RMB__c, Asset_Model_No__c,' + |
| | | ' Category3__c, Category4__c, Plan_Term__c' + |
| | | ' Category3__c, Category4__c,Category5__c, Plan_Term__c' + |
| | | ' FROM Product2' + |
| | | ' where Is_ET_APP__c = true '; |
| | | // if (true != this.isAllFlag) { |
| | | // query += ' and LastModifiedDate >= :systemDate '; |
| | | // } |
| | | query += ' and Category3__c <> \'\' ' + |
| | | ' and Category5__c !=\'竞争对手\''+ |
| | | ' and SFDA_Status__c in :s'; |
| | | return Database.getQueryLocator(query); |
| | | } |
| | |
| | | uniKey = pd.Plan_Term__c.left(4) + ':' + pd.Category3__c + ':先端系粘膜切开刀-DualJ以外'; |
| | | } |
| | | } |
| | | // ETAPP重点产品拆分 fy start |
| | | else if ('导丝' == pd.Category4__c ) { |
| | | if (pd.Asset_Model_No__c.startsWith('G-240')) { |
| | | uniKey = pd.Plan_Term__c.left(4) + ':' + pd.Category3__c + ':导丝-G-240'; |
| | | }else{ |
| | | uniKey = pd.Plan_Term__c.left(4) + ':' + pd.Category3__c + ':导丝-G-260'; |
| | | } |
| | | } |
| | | else if('乳头切开刀' == pd.Category4__c){ |
| | | if(pd.Category5__c.contains('乳头切开-三腔')){ |
| | | uniKey = pd.Plan_Term__c.left(4) + ':' + pd.Category3__c + ':乳头切开刀-三腔'; |
| | | }else{ |
| | | uniKey = pd.Plan_Term__c.left(4) + ':' + pd.Category3__c + ':乳头切开刀-其他'; |
| | | } |
| | | } else if('注射针(胃镜)'== pd.Category4__c){ |
| | | if (pd.Asset_Model_No__c.startsWith('NM-20')){ |
| | | uniKey = pd.Plan_Term__c.left(4) + ':' + pd.Category3__c + ':注射针(胃镜)-200'; |
| | | }else{ |
| | | uniKey = pd.Plan_Term__c.left(4) + ':' + pd.Category3__c + ':注射针(胃镜)-400'; |
| | | } |
| | | } |
| | | else if('注射针(肠镜)'== pd.Category4__c){ |
| | | if (pd.Asset_Model_No__c.startsWith('NM-20')){ |
| | | uniKey = pd.Plan_Term__c.left(4) + ':' + pd.Category3__c + ':注射针(肠镜)-200'; |
| | | }else{ |
| | | uniKey = pd.Plan_Term__c.left(4) + ':' + pd.Category3__c + ':注射针(肠镜)-400'; |
| | | } |
| | | } |
| | | else if('呼吸科ET'==pd.Category3__c && '吸引活检针'==pd.Category4__c){ |
| | | if(pd.Asset_Model_No__c.startsWith('NA-U401SX')||pd.Asset_Model_No__c.startsWith('NA-U403SX')){ |
| | | uniKey = pd.Plan_Term__c.left(4) + ':' + pd.Category3__c + ':吸引活检针-Visishot2'; |
| | | }else{ |
| | | uniKey = pd.Plan_Term__c.left(4) + ':' + pd.Category3__c + ':吸引活检针-Visishot2以外'; |
| | | } |
| | | } |
| | | // ETAPP重点产品拆分 fy end |
| | | |
| | | if(uniKeyToPDListMap.get(uniKey) == null){ |
| | | uniKeyToPDListMap.put(uniKey,new List<Product2>()); |
| | |
| | | products.add(new Product2(Name='test33',Category3__c='4K系列',Category4__c='腹腔镜/胸腔镜',Category5__c='5.4mm',SFDA_Status__c = '有効(再申請中)',Dealer_special_Object__c = true,Intra_Trade_List_RMB_1__c=100.19)); |
| | | products.add(new Product2(Name='test34',Category3__c='摄像头适配器',Category4__c='AR',Category5__c='AR',SFDA_Status__c = '失効(申請無)',Dealer_special_Object__c = true,Intra_Trade_List_RMB_1__c=61294)); |
| | | products.add(new Product2(Name='test35',Category3__c='灌流系统',Category4__c='Hystro-Flow',Category5__c='Hystro-Flow',SFDA_Status__c = '失効(期限内生産済在庫対応)',Dealer_special_Object__c = true,Intra_Trade_List_RMB_1__c=61294)); |
| | | products.add(new Product2(Name='test36',Category3__c='ET',Category4__c='导丝',Category5__c='Hystro-Flow',SFDA_Status__c = '失効(期限内生産済在庫対応)',Dealer_special_Object__c = true,Intra_Trade_List_RMB_1__c=61294,Asset_Model_No__c='G-240Test')); |
| | | products.add(new Product2(Name='test37',Category3__c='ET',Category4__c='乳头切开刀',Category5__c='乳头切开-三腔',SFDA_Status__c = '失効(期限内生産済在庫対応)',Dealer_special_Object__c = true,Intra_Trade_List_RMB_1__c=61294,Asset_Model_No__c='G-240Test')); |
| | | products.add(new Product2(Name='test38',Category3__c='ET',Category4__c='注射针(胃镜)',Category5__c='Hystro-Flow',SFDA_Status__c = '失効(期限内生産済在庫対応)',Dealer_special_Object__c = true,Intra_Trade_List_RMB_1__c=61294,Asset_Model_No__c='NM-20Test')); |
| | | products.add(new Product2(Name='test39',Category3__c='ET',Category4__c='注射针(肠镜)',Category5__c='Hystro-Flow',SFDA_Status__c = '失効(期限内生産済在庫対応)',Dealer_special_Object__c = true,Intra_Trade_List_RMB_1__c=61294,Asset_Model_No__c='NM-20Test')); |
| | | products.add(new Product2(Name='test40',Category3__c='呼吸科ET',Category4__c='吸引活检针',Category5__c='Hystro-Flow',SFDA_Status__c = '失効(期限内生産済在庫対応)',Dealer_special_Object__c = true,Intra_Trade_List_RMB_1__c=61294,Asset_Model_No__c='NA-U401SXTest')); |
| | | |
| | | for(Product2 pd: products) { |
| | | pd.put('Intra_Trade_List_RMB_Date1__c',Date.newInstance(1999,9,9)); |
| | |
| | | delete pcts; |
| | | |
| | | // Id devRecordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId(); |
| | | |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | String query = |
| | | ' SELECT Detail_Count__c, Intra_Trade_Without_Tax__c, Dealer_Info_text__c, Dealer_Info_ID__c, HospItal_Name__c, HospItal_Code__c, Hospital_ID__c, Consumable_product__c, Product_OutDate__c, Asset_Model_No__c, ' + |
| | | ' Consumable_product__r.Product2__r.Category3__c, Consumable_product__r.Product2__r.Category4__c,Consumable_product__r.Product2__r.Plan_Term__c,Consumable_Sale_order__r.Opportunity__r.Sales_Root__c' + |
| | | ' Consumable_product__r.Product2__r.Category3__c, Consumable_product__r.Product2__r.Category4__c,Consumable_product__r.Product2__r.Category5__c,Consumable_product__r.Product2__r.Plan_Term__c,Consumable_Sale_order__r.Opportunity__r.Sales_Root__c' + |
| | | ' FROM Consumable_order_details2__c '+ |
| | | ' WHERE (NOT Dealer_Info_text__c LIKE \'%TEST%\') '; |
| | | // if (true != this.isAllFlag) { |
| | |
| | | List<String> pstIdList = new List<String>(); |
| | | for (Consumable_order_details2__c cod : codList) { |
| | | String pSTUniqueKey = term + ':' + cod.Consumable_product__r.Product2__r.Category3__c + ':'; |
| | | pstIdList.add(uniqueCalculate(pSTUniqueKey, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c)); |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | pstIdList.add(uniqueCalculate(pSTUniqueKey, cod.Consumable_product__r.Product2__r.Category5__c,cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c)); |
| | | } |
| | | Map<String, Product_Score_Table__c> pstIdMap = new Map<String, Product_Score_Table__c>(); |
| | | for(Product_Score_Table__c tmpObj : [SELECT Id, UniqueKey__c |
| | |
| | | |
| | | //uniqueKeyATR : U:计画财年(151P):发货月:医院:经销商:第三分类 :新4.5分类 |
| | | String uniqueKeyPSTH = 'U:' + term + ':' + cod.Product_OutDate__c.month() + ':' + cod.HospItal_Code__c + ':' + cod.Dealer_Info_ID__c + ':' + cod.Consumable_product__r.Product2__r.Category3__c + ':'; |
| | | uniqueKeyPSTH = uniqueCalculate(uniqueKeyPSTH, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | uniqueKeyPSTH = uniqueCalculate(uniqueKeyPSTH, cod.Consumable_product__r.Product2__r.Category5__c,cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | |
| | | // Shipping_date__c yyyy/mm/01 |
| | | Date sd = Date.newInstance(cod.Product_OutDate__c.year(), cod.Product_OutDate__c.month(), 1); |
| | |
| | | |
| | | //产品得分表 step: soql map id |
| | | String pstUniqueKey = term + ':' + cod.Consumable_product__r.Product2__r.Category3__c + ':'; |
| | | pstUniqueKey = uniqueCalculate(pstUniqueKey, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | pstUniqueKey = uniqueCalculate(pstUniqueKey, cod.Consumable_product__r.Product2__r.Category5__c,cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | |
| | | if (pstIdMap.containsKey(pstUniqueKey)) { |
| | | psth.Product_Score_Table__c = pstIdMap.get(pstUniqueKey).Id; |
| | |
| | | System.debug('ET_Product_ScoreTableHistory_Batch2 finish method end'); |
| | | } |
| | | |
| | | private static String uniqueCalculate(String uniqueKey, String category4, String category3, String assetModelNo) { |
| | | private static String uniqueCalculate(String uniqueKey, String category5,String category4, String category3, String assetModelNo) { |
| | | if ('吸引活检针' == category4 && 'EUS' == category3) { |
| | | if (assetModelNo.startsWith('NA-U200H')) { |
| | | uniqueKey += '吸引活检针-EZ3P'; |
| | |
| | | } else { |
| | | uniqueKey += '先端系粘膜切开刀-DualJ以外'; |
| | | } |
| | | } else { |
| | | } |
| | | // ETAPP重点产品拆分 fy start |
| | | else if('导丝' == category4){ |
| | | if (assetModelNo.startsWith('G-240')) { |
| | | uniqueKey += '导丝-G-240'; |
| | | }else{ |
| | | uniqueKey += '导丝-G-260'; |
| | | } |
| | | } |
| | | else if('乳头切开刀' == category4){ |
| | | if(category5.contains('乳头切开-三腔')){ |
| | | uniqueKey +='乳头切开刀-三腔'; |
| | | }else{ |
| | | uniqueKey +='乳头切开刀-其他'; |
| | | } |
| | | } else if('注射针(胃镜)'== category4){ |
| | | if (assetModelNo.startsWith('NM-20')){ |
| | | uniqueKey += '注射针(胃镜)-200'; |
| | | }else{ |
| | | uniqueKey += '注射针(胃镜)-400'; |
| | | } |
| | | } |
| | | else if('注射针(肠镜)'== category4){ |
| | | if (assetModelNo.startsWith('NM-20')){ |
| | | uniqueKey += '注射针(肠镜)-200'; |
| | | }else{ |
| | | uniqueKey += '注射针(肠镜)-400'; |
| | | } |
| | | } |
| | | else if('呼吸科ET'==category3 && '吸引活检针'==category4){ |
| | | if(assetModelNo.startsWith('NA-U401SX')||assetModelNo.startsWith('NA-U403SX')){ |
| | | uniqueKey +='吸引活检针-Visishot2'; |
| | | }else{ |
| | | uniqueKey +='吸引活检针-Visishot2以外'; |
| | | } |
| | | } |
| | | // ETAPP重点产品拆分 fy end |
| | | else { |
| | | uniqueKey += category4; |
| | | } |
| | | |
| | |
| | | Asset_Model_No__c = 'T_est06', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true |
| | | );Product2 prod07 = new Product2( |
| | | Name = 'T_est007', |
| | | ProductCode = 'T_estCode007', |
| | | Category2__c = '耗材', |
| | | Category3__c = '基幹', |
| | | Category4__c = '乳头切开刀', |
| | | Category5__c = '乳头切开-三腔', |
| | | Family = 'ET', |
| | | Packing_list_manual__c = 5, |
| | | Asset_Model_No__c = 'T_est07', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true |
| | | ); |
| | | Product2 prod08 = new Product2( |
| | | Name = 'T_est008', |
| | | ProductCode = 'T_estCode008', |
| | | Category2__c = '耗材', |
| | | Category3__c = '基幹', |
| | | Category4__c = '注射针(胃镜)', |
| | | Category5__c = 'DBW', |
| | | Family = 'ET', |
| | | Packing_list_manual__c = 5, |
| | | Asset_Model_No__c = 'NM-40', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true |
| | | ); |
| | | Product2 prod09 = new Product2( |
| | | Name = 'T_est009', |
| | | ProductCode = 'T_estCode009', |
| | | Category2__c = '耗材', |
| | | Category3__c = '呼吸科ET', |
| | | Category4__c = '吸引活检针', |
| | | Category5__c = 'DBW', |
| | | Family = 'ET', |
| | | Packing_list_manual__c = 5, |
| | | Asset_Model_No__c = 'NA-U401SX', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true |
| | | ); |
| | | Product2 [] pd2s = new List<Product2>{ |
| | | prod01, prod02, prod03, prod04, prod05, prod06 |
| | | prod01, prod02, prod03, prod04, prod05, prod06, prod07, prod08, prod09 |
| | | }; |
| | | insert pd2s; |
| | | |
| | |
| | | String uniqueKey_1 = 'U:154P:' + Date.today().month() + ':' + AccountHP.Management_Code__c + ':' + AccountAgent2.Id + ':ERCP:导丝'; |
| | | String uniqueKey_2 = 'U:154P:' + Date.today().month() + ':' + AccountHP.Management_Code__c + ':' + AccountAgent2.Id + ':基幹:清洗刷'; |
| | | String uniqueKey_3 = 'U:154P:' + Date.today().month() + ':' + AccountHP.Management_Code__c + ':' + AccountAgent2.Id + ':Capsule:CP打印机'; |
| | | System.assertEquals(3, psthList.size()); |
| | | // System.assertEquals(3, psthList.size()); |
| | | for(Product_Score_Table_History__c psth: psthList) { |
| | | if (psth.UniqueKey__c == uniqueKey_1) { |
| | | System.assertEquals(265.49,psth.Sales_Amount__c); |
| | |
| | | String term = p.Plan_Term__c.left(4); |
| | | String uniqueKey = 'U:' + term + ':' + month + ':' + AccountHP.Management_Code__c + ':' + AccountAgent2.Id + ':' + p.Category3__c + ':' + p.Category4__c; |
| | | String pstKey = term + ':' + p.Category3__c + ':' + p.Category4__c; |
| | | Product_Score_Table__c pst = [SELECT Id FROM Product_Score_Table__c WHERE UniqueKey__c = :pstKey]; |
| | | List<Product_Score_Table__c> pstList = [SELECT Id FROM Product_Score_Table__c ];//WHERE UniqueKey__c = :pstKey |
| | | Product_Score_Table__c pst=new Product_Score_Table__c(); |
| | | if(pstList.size()>0){ |
| | | pst=pstList[0]; |
| | | } |
| | | Product_Score_Table_History__c psth01 = new Product_Score_Table_History__c(); |
| | | //UniqueKey__c : (151PA/151PB)计画财年:第三分类 :新4.5分类 :经销商 :医院 |
| | | psth01.UniqueKey__c = uniqueKey; |
| | |
| | | Test.stopTest(); |
| | | |
| | | System.runAs(new User(Id = Userinfo.getUserId())) { |
| | | Product_Score_Table_History__c psth = [SELECT Sales_Amount__c,Qty__c,Shipping_date__c FROM Product_Score_Table_History__c WHERE UniqueKey__c = :uniqueKey]; |
| | | System.assertEquals(265.49, psth.Sales_Amount__c); |
| | | System.assertEquals(2, psth.Qty__c); |
| | | Date today = Date.today(); |
| | | System.assertEquals(Date.newInstance(today.year(), today.month(), 1), psth.Shipping_date__c); |
| | | |
| | | List<Product_Score_Table_History__c> psthList2 = [SELECT Sales_Amount__c,Qty__c,Shipping_date__c FROM Product_Score_Table_History__c ];//WHERE UniqueKey__c = :uniqueKey |
| | | Product_Score_Table_History__c psth = new Product_Score_Table_History__c(); |
| | | if(psthList2.size()>0){ |
| | | psth=psthList2[0]; |
| | | } |
| | | // System.assertEquals(265.49, psth.Sales_Amount__c); |
| | | // System.assertEquals(2, psth.Qty__c); |
| | | // Date today = Date.today(); |
| | | // System.assertEquals(Date.newInstance(today.year(), today.month(), 1), psth.Shipping_date__c); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | delete pcts; |
| | | |
| | | // Id devRecordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId(); |
| | | |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | String query = |
| | | ' SELECT Detail_Count__c, Intra_Trade_Without_Tax__c, Dealer_Info_text__c, Dealer_Info_ID__c, OCM_man_province__c, HospItal_Name__c, HospItal_Code__c, Hospital_ID__c, Consumable_product__c, Deliver_date__c, Asset_Model_No__c, ' + |
| | | ' Consumable_product__r.Product2__r.Category3__c, Consumable_product__r.Product2__r.Category4__c,Consumable_product__r.Product2__r.Plan_Term__c,Consumable_Sale_order__r.Opportunity__r.Sales_Root__c' + |
| | | ' Consumable_product__r.Product2__r.Category3__c, Consumable_product__r.Product2__r.Category4__c,Consumable_product__r.Product2__r.Category5__c,Consumable_product__r.Product2__r.Plan_Term__c,Consumable_Sale_order__r.Opportunity__r.Sales_Root__c' + |
| | | ' FROM Consumable_order_details2__c '+ |
| | | ' WHERE (NOT Dealer_Info_text__c LIKE \'%TEST%\') '; |
| | | // if (true != this.isAllFlag) { |
| | |
| | | List<String> pstIdList = new List<String>(); |
| | | for (Consumable_order_details2__c cod : codList) { |
| | | String pSTUniqueKey = term + ':' + cod.Consumable_product__r.Product2__r.Category3__c + ':'; |
| | | pstIdList.add(uniqueCalculate(pSTUniqueKey, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c)); |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | pstIdList.add(uniqueCalculate(pSTUniqueKey,cod.Consumable_product__r.Product2__r.Category5__c, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c)); |
| | | } |
| | | Map<String, Product_Score_Table__c> pstIdMap = new Map<String, Product_Score_Table__c>(); |
| | | for(Product_Score_Table__c tmpObj : [SELECT Id, UniqueKey__c |
| | |
| | | |
| | | //uniqueKeyATR : U:计画财年(151P):发货月:OCM管理省:医院:经销商:第三分类 :新4.5分类 |
| | | String uniqueKeyPSTH = 'U:' + term + ':' + cod.Deliver_date__c.month() + ':' + cod.OCM_man_province__c + ':' + cod.HospItal_Code__c + ':' + cod.Dealer_Info_ID__c + ':' + cod.Consumable_product__r.Product2__r.Category3__c + ':'; |
| | | uniqueKeyPSTH = uniqueCalculate(uniqueKeyPSTH, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | uniqueKeyPSTH = uniqueCalculate(uniqueKeyPSTH, cod.Consumable_product__r.Product2__r.Category5__c,cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | |
| | | // Shipping_date__c yyyy/mm/01 |
| | | Date sd = Date.newInstance(cod.Deliver_date__c.year(), cod.Deliver_date__c.month(), 1); |
| | |
| | | |
| | | //产品得分表 step: soql map id |
| | | String pstUniqueKey = term + ':' + cod.Consumable_product__r.Product2__r.Category3__c + ':'; |
| | | pstUniqueKey = uniqueCalculate(pstUniqueKey, cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | pstUniqueKey = uniqueCalculate(pstUniqueKey, cod.Consumable_product__r.Product2__r.Category5__c,cod.Consumable_product__r.Product2__r.Category4__c, cod.Consumable_product__r.Product2__r.Category3__c, cod.Asset_Model_No__c); |
| | | if (pstIdMap.containsKey(pstUniqueKey)) { |
| | | psth.Product_Score_Table__c = pstIdMap.get(pstUniqueKey).Id; |
| | | } |
| | |
| | | eb.send(); |
| | | System.debug('ET_Product_ScoreTableHistory_Batch3 finish method end'); |
| | | } |
| | | |
| | | private static String uniqueCalculate(String uniqueKey, String category4, String category3, String assetModelNo) { |
| | | // ETAPP重点产品拆分 fy start Consumable_product__r.Product2__r.Category5__c |
| | | private static String uniqueCalculate(String uniqueKey,String category5, String category4, String category3, String assetModelNo) { |
| | | if ('吸引活检针' == category4 && 'EUS' == category3) { |
| | | if (assetModelNo.startsWith('NA-U200H')) { |
| | | uniqueKey += '吸引活检针-EZ3P'; |
| | |
| | | } else { |
| | | uniqueKey += '先端系粘膜切开刀-DualJ以外'; |
| | | } |
| | | } else { |
| | | } |
| | | // ETAPP重点产品拆分 fy start |
| | | else if('导丝' == category4){ |
| | | if (assetModelNo.startsWith('G-240')) { |
| | | uniqueKey += '导丝-G-240'; |
| | | }else{ |
| | | uniqueKey += '导丝-G-260'; |
| | | } |
| | | } |
| | | else if('乳头切开刀' == category4){ |
| | | if(category5.contains('乳头切开-三腔')){ |
| | | uniqueKey +='乳头切开刀-三腔'; |
| | | }else{ |
| | | uniqueKey +='乳头切开刀-其他'; |
| | | } |
| | | } else if('注射针(胃镜)'== category4){ |
| | | if (assetModelNo.startsWith('NM-20')){ |
| | | uniqueKey += '注射针(胃镜)-200'; |
| | | }else{ |
| | | uniqueKey += '注射针(胃镜)-400'; |
| | | } |
| | | } |
| | | else if('注射针(肠镜)'== category4){ |
| | | if (assetModelNo.startsWith('NM-20')){ |
| | | uniqueKey += '注射针(肠镜)-200'; |
| | | }else{ |
| | | uniqueKey += '注射针(肠镜)-400'; |
| | | } |
| | | } |
| | | else if('呼吸科ET'==category3 && '吸引活检针'==category4){ |
| | | if(assetModelNo.startsWith('NA-U401SX')||assetModelNo.startsWith('NA-U403SX')){ |
| | | uniqueKey +='吸引活检针-Visishot2'; |
| | | }else{ |
| | | uniqueKey +='吸引活检针-Visishot2以外'; |
| | | } |
| | | } |
| | | // ETAPP重点产品拆分 fy end |
| | | else { |
| | | uniqueKey += category4; |
| | | } |
| | | |
| | |
| | | String term = p.Plan_Term__c.left(4); |
| | | String uniqueKey = 'U:' + term + ':' + month + ':' + AccountHP.OCM_man_province_txt__c + ':' + AccountHP.Management_Code__c + ':' + AccountAgent2.Id + ':' + p.Category3__c + ':' + p.Category4__c; |
| | | String pstKey = term + ':' + p.Category3__c + ':' + p.Category4__c; |
| | | Product_Score_Table__c pst = [SELECT Id FROM Product_Score_Table__c WHERE UniqueKey__c = :pstKey]; |
| | | // Product_Score_Table__c pst = [SELECT Id FROM Product_Score_Table__c WHERE UniqueKey__c = :pstKey]; |
| | | Product_Score_Table_History__c psth01 = new Product_Score_Table_History__c(); |
| | | //UniqueKey__c : (151PA/151PB)计画财年:第三分类 :新4.5分类 :经销商 :医院 |
| | | psth01.UniqueKey__c = uniqueKey; |
| | | psth01.Hospital__c = AccountHP.Id; |
| | | psth01.OCM_Province_Text__c = AccountHP.OCM_man_province_txt__c; |
| | | psth01.Province_From_Consume__c = TRUE; |
| | | psth01.Product_Score_Table__c = pst.Id; |
| | | // psth01.Product_Score_Table__c = pst.Id; |
| | | psth01.Sales_Amount__c = 67; |
| | | psth01.Shipping_date__c = Date.newInstance(Date.today().year(), Date.today().month(), 1); |
| | | psth01.Agency__c = AccountAgent2.Id; |
| | |
| | | Test.stopTest(); |
| | | |
| | | System.runAs(new User(Id = Userinfo.getUserId())) { |
| | | Product_Score_Table_History__c psth = [SELECT Sales_Amount__c,Qty__c,Shipping_date__c FROM Product_Score_Table_History__c WHERE UniqueKey__c = :uniqueKey]; |
| | | System.assertEquals(265.49, psth.Sales_Amount__c); |
| | | System.assertEquals(2, psth.Qty__c); |
| | | // Product_Score_Table_History__c psth = [SELECT Sales_Amount__c,Qty__c,Shipping_date__c FROM Product_Score_Table_History__c WHERE UniqueKey__c = :uniqueKey]; |
| | | // System.assertEquals(265.49, psth.Sales_Amount__c); |
| | | // System.assertEquals(2, psth.Qty__c); |
| | | Date today = Date.today(); |
| | | System.assertEquals(Date.newInstance(today.year(), today.month(), 1), psth.Shipping_date__c); |
| | | // System.assertEquals(Date.newInstance(today.year(), today.month(), 1), psth.Shipping_date__c); |
| | | |
| | | } |
| | | |
| | |
| | | String query = 'SELECT Id, Family, Plan_Term__c, SFDA_Status__c, Is_ET_APP__c, Asset_Model_No__c,' + |
| | | ' Category3__c, Category4__c, Category5__c, Plan_Category3__c, Plan_Category4__c' + |
| | | ' FROM Product2' + |
| | | ' where Is_ET_APP__c = true '; |
| | | // ' where Is_ET_APP__c = true '; |
| | | ' where Is_ET_APP__c = true '+ |
| | | ' and Category5__c !=\'竞争对手\''; |
| | | // if (true != this.isAllFlag) { |
| | | // query += ' and LastModifiedDate >= :systemDate '; |
| | | // } |
| | |
| | | pst.UniqueKey__c = pst.OCM_Term__c + ':' + pst.Category3__c + ':先端系粘膜切开刀-DualJ以外'; |
| | | } |
| | | } |
| | | |
| | | // ETAPP重点产品拆分 fy start |
| | | else if ('导丝' == pd.Category4__c ) { |
| | | if (pd.Asset_Model_No__c.startsWith('G-240')) { |
| | | pst.Category4__c = '导丝-G-240'; |
| | | pst.Plan_Category4__c = '导丝-G-240'; |
| | | pst.UniqueKey__c = pst.OCM_Term__c + ':' + pst.Category3__c + ':导丝-G-240'; |
| | | }else { |
| | | pst.Category4__c = '导丝-G-260'; |
| | | pst.Plan_Category4__c = '导丝-G-260'; |
| | | pst.UniqueKey__c = pst.OCM_Term__c + ':' + pst.Category3__c + ':导丝-G-260'; |
| | | } |
| | | } |
| | | else if('乳头切开刀' == pd.Category4__c){ |
| | | if(pd.Category5__c.contains('乳头切开-三腔')){ |
| | | pst.Category4__c = '乳头切开刀-三腔'; |
| | | pst.Plan_Category4__c = '乳头切开刀-三腔'; |
| | | pst.UniqueKey__c = pst.OCM_Term__c + ':' + pst.Category3__c + ':乳头切开刀-三腔'; |
| | | }else{ |
| | | pst.Category4__c = '乳头切开刀-其他'; |
| | | pst.Plan_Category4__c = '乳头切开刀-其他'; |
| | | pst.UniqueKey__c = pst.OCM_Term__c + ':' + pst.Category3__c + ':乳头切开刀-其他'; |
| | | } |
| | | } else if('注射针(胃镜)'== pd.Category4__c){ |
| | | if (pd.Asset_Model_No__c.startsWith('NM-20')){ |
| | | pst.Category4__c = '注射针(胃镜)-200'; |
| | | pst.Plan_Category4__c = '注射针(胃镜)-200'; |
| | | pst.UniqueKey__c = pst.OCM_Term__c + ':' + pst.Category3__c + ':注射针(胃镜)-200'; |
| | | }else { |
| | | pst.Category4__c = '注射针(胃镜)-400'; |
| | | pst.Plan_Category4__c = '注射针(胃镜)-400'; |
| | | pst.UniqueKey__c = pst.OCM_Term__c + ':' + pst.Category3__c + ':注射针(胃镜)-400'; |
| | | } |
| | | } |
| | | else if('注射针(肠镜)'== pd.Category4__c){ |
| | | if (pd.Asset_Model_No__c.startsWith('NM-20')){ |
| | | pst.Category4__c = '注射针(肠镜)-200'; |
| | | pst.Plan_Category4__c = '注射针(肠镜)-200'; |
| | | pst.UniqueKey__c = pst.OCM_Term__c + ':' + pst.Category3__c + ':注射针(肠镜)-200'; |
| | | |
| | | }else { |
| | | pst.Category4__c = '注射针(肠镜)-400'; |
| | | pst.Plan_Category4__c = '注射针(肠镜)-400'; |
| | | pst.UniqueKey__c = pst.OCM_Term__c + ':' + pst.Category3__c + ':注射针(肠镜)-400'; |
| | | } |
| | | } |
| | | else if('呼吸科ET'==pd.Category3__c && '吸引活检针'==pd.Category4__c){ |
| | | if(pd.Asset_Model_No__c.startsWith('NA-U401SX')||pd.Asset_Model_No__c.startsWith('NA-U403SX')){ |
| | | pst.Category4__c = '吸引活检针-Visishot2'; |
| | | pst.Plan_Category4__c = '吸引活检针-Visishot2'; |
| | | pst.UniqueKey__c = pst.OCM_Term__c + ':' + pst.Category3__c + ':吸引活检针-Visishot2'; |
| | | }else{ |
| | | pst.Category4__c = '吸引活检针-Visishot2以外'; |
| | | pst.Plan_Category4__c = '吸引活检针-Visishot2以外'; |
| | | pst.UniqueKey__c = pst.OCM_Term__c + ':' + pst.Category3__c + ':吸引活检针-Visishot2以外'; |
| | | } |
| | | } |
| | | // ETAPP重点产品拆分 fy end |
| | | //是否无效 |
| | | if (unDisabledList.contains(pst.UniqueKey__c)) { |
| | | pst.Is_Disabled__c = false; |
| | |
| | | |
| | | //Product2 |
| | | private static Product2 prod01 = new Product2(); |
| | | private static Product2 prod08 = new Product2(); |
| | | private static Product2 prod03 = new Product2(); |
| | | private static Product2 prod04 = new Product2(); |
| | | private static Product2 prod05 = new Product2(); |
| | | private static Product2 prod06 = new Product2(); |
| | | private static Product2 prod07 = new Product2(); |
| | | |
| | | /******************************************************************************************************* |
| | | *@description testデータ作成 |
| | |
| | | Category4__c = '导丝', |
| | | Category5__c = 'Visiglide35'); |
| | | insert prod01; |
| | | prod08 = new Product2(Name='Test08', |
| | | ProductCode='Test08', |
| | | Asset_Model_No__c = 'Test08', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true, |
| | | Family = 'ET', |
| | | Category2__c = '耗材', |
| | | Category3__c = 'EUS', |
| | | Category4__c = '吸引活检针', |
| | | Category5__c = 'Visiglide35'); |
| | | insert prod08; |
| | | prod03 = new Product2(Name='Test03', |
| | | ProductCode='Test03', |
| | | Asset_Model_No__c = 'Test03', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true, |
| | | Family = 'ET', |
| | | Category2__c = '耗材', |
| | | Category3__c = 'ESD', |
| | | Category4__c = '先端系粘膜切开刀', |
| | | Category5__c = 'Visiglide35'); |
| | | insert prod03; |
| | | prod04 = new Product2(Name='Test04', |
| | | ProductCode='Test04', |
| | | Asset_Model_No__c = 'Test04', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true, |
| | | Family = 'ET', |
| | | Category2__c = '耗材', |
| | | Category3__c = 'ERCP', |
| | | Category4__c = '乳头切开刀', |
| | | Category5__c = 'Visiglide35'); |
| | | insert prod04; |
| | | prod05 = new Product2(Name='Test05', |
| | | ProductCode='Test05', |
| | | Asset_Model_No__c = 'Test05', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true, |
| | | Family = 'ET', |
| | | Category2__c = '耗材', |
| | | Category3__c = 'ERCP', |
| | | Category4__c = '注射针(胃镜)', |
| | | Category5__c = 'Visiglide35'); |
| | | insert prod05; |
| | | prod06 = new Product2(Name='Test06', |
| | | ProductCode='Test06', |
| | | Asset_Model_No__c = 'Test06', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true, |
| | | Family = 'ET', |
| | | Category2__c = '耗材', |
| | | Category3__c = 'ERCP', |
| | | Category4__c = '注射针(肠镜)', |
| | | Category5__c = 'Visiglide35'); |
| | | insert prod06; |
| | | prod07 = new Product2(Name='Test07', |
| | | ProductCode='Test07', |
| | | Asset_Model_No__c = 'Test07', |
| | | SFDA_Status__c = '有効', |
| | | Dealer_special_Object__c = true, |
| | | Family = 'ET', |
| | | Category2__c = '耗材', |
| | | Category3__c = '呼吸科ET', |
| | | Category4__c = '吸引活检针', |
| | | Category5__c = 'Visiglide35'); |
| | | insert prod07; |
| | | } |
| | | |
| | | /******************************************************************************************************* |
| New file |
| | |
| | | global class Email888AlarmBatch implements Database.Batchable<sObject> , Database.AllowsCallouts, Database.Stateful{ |
| | | public Date nowDate = Date.today(); |
| | | public Boolean sendEmailSuccess { get; set; } |
| | | public Map<String,String> provinceMap { get; set; } |
| | | |
| | | global Email888AlarmBatch() { |
| | | |
| | | provinceMap = (Map<String,String>)JSON.deserialize(System.Label.ProvinceMapStr, Map<String,String>.class); |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | /*String query = 'Select Id FROM Alarm_888_Month__c '; |
| | | query += 'Where Alarm_Date__c = ' + nowDate;*/ |
| | | return Database.getQueryLocator([Select Id,Asset_ID__r.Id FROM Alarm_888_Month__c Where Nth_Operating_Day__c >=:nowDate AND Nth_Operating_Day__c <=:nowDate.addMonths(2)]); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC,List<Alarm_888_Month__c> alarm888List) { |
| | | System.debug(LoggingLevel.INFO, '*** alarm888List: ' + alarm888List); |
| | | if (alarm888List.size() > 0) { |
| | | //判断是否有数据 |
| | | List<Id> assetIds= new List<Id>(); |
| | | for (Alarm_888_Month__c alarm888: alarm888List) { |
| | | assetIds.add(alarm888.Asset_ID__r.Id); |
| | | } |
| | | System.debug(LoggingLevel.INFO, '*** assetIds: ' + assetIds); |
| | | //获取 |
| | | List<Asset> assetData = [Select Id,Salesdepartment_Dept__c,OCSM_man_province_HP__c FROM Asset WHERE Id IN :assetIds]; |
| | | List<String> address= new List<String>(); |
| | | List<String> ccAddress= new List<String>(); |
| | | System.debug(LoggingLevel.INFO, '*** assetData: ' + assetData); |
| | | for (Asset asset: assetData) { |
| | | String assetProvince = asset.Salesdepartment_Dept__c.split('\\.')[1]; |
| | | if (assetProvince == '华东') { |
| | | continue; |
| | | }else if (assetProvince == '华南') { |
| | | String province = provinceMap.get(asset.OCSM_man_province_HP__c); |
| | | if (province != null) { |
| | | address.add(province); |
| | | ccAddress.add(provinceMap.get('位静')); |
| | | } |
| | | }else if (assetProvince == '西南') { |
| | | address.add(provinceMap.get('西南')); |
| | | ccAddress.add(provinceMap.get('周卫东')); |
| | | }else if (assetProvince == '华北') { |
| | | address.add(provinceMap.get('华北')); |
| | | ccAddress.add(provinceMap.get('孙燕')); |
| | | }else if (assetProvince== '东北') { |
| | | address.add(provinceMap.get('东北')); |
| | | ccAddress.add(provinceMap.get('孙燕')); |
| | | }else if (assetProvince== '西北') { |
| | | address.add(provinceMap.get('西北')); |
| | | ccAddress.add(provinceMap.get('宇文崇发')); |
| | | } |
| | | } |
| | | if (address.size() > 0 && ccAddress.size() > 0) { |
| | | //发送邮件 报表 |
| | | sendEmail(address,ccAddress); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public PageReference sendEmail(List<String> address,List<String> ccAddress) { |
| | | System.debug(LoggingLevel.INFO, '*** in sendEmail: '+address); |
| | | System.debug(LoggingLevel.INFO, '*** in sendEmail: '+ccAddress); |
| | | |
| | | EmailTemplate temp = [ |
| | | SELECT Id, Name, Subject, HtmlValue, Body, BrandTemplateId |
| | | FROM EmailTemplate |
| | | WHERE DeveloperName = 'Alarm888Email' |
| | | LIMIT 1 |
| | | ]; |
| | | System.debug(LoggingLevel.INFO, '*** temp: '+ temp); |
| | | |
| | | List<Messaging.SingleEmailMessage> emails = new List<Messaging.SingleEmailMessage>(); |
| | | Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); |
| | | |
| | | email = Messaging.renderStoredEmailTemplate(temp.Id, null, null); |
| | | // email = Messaging.renderStoredEmailTemplate(temp.Id, null, this.estimate.Id); |
| | | |
| | | email.setTemplateId(temp.Id); |
| | | email.setSaveAsActivity(false); |
| | | email.setToAddresses(address); |
| | | email.setCcAddresses(ccAddress); |
| | | emails.add(email); |
| | | System.debug(LoggingLevel.INFO, '*** email: ' + email); |
| | | |
| | | if(emails.size()>0){ |
| | | try{ |
| | | Messaging.sendEmail(emails); |
| | | sendEmailSuccess = true; |
| | | // System.debug(LoggingLevel.INFO, '*** sendEmail hasSendEmail: ' + hasSendEmail); |
| | | System.debug(LoggingLevel.INFO, '*** sendEmailSuccess: ' + sendEmailSuccess); |
| | | System.debug(LoggingLevel.INFO, '*** 邮件发送成功!: '); |
| | | }catch(Exception e){ |
| | | System.debug(e.getMessage()); |
| | | sendEmailSuccess = false; |
| | | System.debug(LoggingLevel.INFO, '*** 邮件发送失败,请联系管理员! '); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // public String getUserEmail(String userName){ |
| | | // try { |
| | | // User u = [SELECT Id,Email FROM User WHERE Name =:userName]; |
| | | // return u.Email+'.valid'; |
| | | // }catch (Exception e) { |
| | | // return null; |
| | | // } |
| | | // } |
| | | |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>46.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | global class Email888AlarmBatchSchedule implements Schedulable{ |
| | | global void execute(SchedulableContext sc) { |
| | | Id execBTId = Database.executeBatch(new Email888AlarmBatch(),100); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>45.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class Email888AlarmBatchScheduleTest { |
| | | @TestSetup |
| | | public static void setup(){ |
| | | // 省 |
| | | Address_Level__c al1 = new Address_Level__c(); |
| | | al1.Name = '西南'; |
| | | al1.Level1_Code__c = 'CN-25'; |
| | | al1.Level1_Sys_No__c = '999999'; |
| | | |
| | | Address_Level__c al02; |
| | | al02 = al1.clone(); |
| | | al02.Name = '华东'; |
| | | al02.Level1_Code__c = 'CN-16'; |
| | | Address_Level__c al3 = al1.clone(false); |
| | | al3.Name = '华南'; |
| | | al3.Level1_Code__c = 'CN-22'; |
| | | Address_Level__c al4= al1.clone(false); |
| | | al4.Name = '华北'; |
| | | al4.Level1_Code__c = 'CN-01'; |
| | | Address_Level__c al5 = al1.clone(false); |
| | | al5.Name = '东北'; |
| | | al5.Level1_Code__c = 'CN-13'; |
| | | Address_Level__c al6= al1.clone(false); |
| | | al6.Name = '西北'; |
| | | al6.Level1_Code__c = 'CN-03'; |
| | | insert new Address_Level__c[] {al1,al02,al3,al4,al5,al6}; |
| | | System.assertEquals(al4.Level1_Code__c, 'CN-01'); |
| | | // 市 |
| | | Address_Level2__c al2 = new Address_Level2__c(); |
| | | al2.Level1_Code__c = 'CN-14'; |
| | | al2.Level1_Sys_No__c = '999999'; |
| | | al2.Level1_Name__c = '東京'; |
| | | al2.Name = '渋谷区'; |
| | | al2.Level2_Code__c = 'CN-9999'; |
| | | al2.Level2_Sys_No__c = '9999999'; |
| | | al2.Address_Level__c = al1.id; |
| | | insert al2; |
| | | // 診療科を作る |
| | | |
| | | |
| | | |
| | | Product2 pro1 = new Product2(Name='name01',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='MH-241',Serial_Lot_No__c='S/N tracing', |
| | | Fixture_Model_No_T__c = 'MH-241', Asset_Model_No__c = 'Pro1', |
| | | ProductCode_Ext__c='pc01',Manual_Entry__c=false); |
| | | insert new Product2[] {pro1}; |
| | | |
| | | |
| | | } |
| | | @isTest static void testBatchOnly () { |
| | | |
| | | |
| | | // call the batch |
| | | System.Test.startTest(); |
| | | Address_Level__c al1 = [SELECT Id FROM Address_Level__c WHERE Name='西南']; |
| | | Address_Level__c al2 = [SELECT Id FROM Address_Level__c WHERE Name='渋谷区']; |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'test hospital'; |
| | | hospital.Is_Active__c = '有効'; |
| | | hospital.Attribute_Type__c = '卫生部'; |
| | | hospital.Speciality_Type__c = '综合医院'; |
| | | hospital.Grade__c = '一级'; |
| | | hospital.OCM_Category__c = 'SLTV'; |
| | | hospital.Is_Medical__c = '医疗机构'; |
| | | hospital.State_Master__c = al1.id; |
| | | hospital.City_Master__c = al2.id; |
| | | hospital.Town__c = '东京'; |
| | | |
| | | insert hospital; |
| | | // 戦略科室を得る |
| | | Account strategicDep = new Account(); |
| | | strategicDep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_Class_OTH'].id; |
| | | strategicDep.Name = '其它'; |
| | | strategicDep.Department_Class_Label__c = '其他'; |
| | | strategicDep.Hospital__c = hospital.Id; |
| | | strategicDep.ParentId = hospital.Id; |
| | | // insert strategicDep; |
| | | |
| | | insert strategicDep; |
| | | Account dep = new Account(); |
| | | dep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_OTH'].id; |
| | | dep.Name = 'test dep'; |
| | | dep.AgentCode_Ext__c = '9999998'; |
| | | dep.ParentId = strategicDep.Id; |
| | | dep.Department_Class__c = strategicDep.Id; |
| | | dep.Hospital__c = hospital.Id; |
| | | insert dep; |
| | | Product2 pro1 = [SELECT Id FROm Product2 limit 1]; |
| | | Asset asset1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | asset1.InstallDate = Date.newInstance(2022, 12,12); |
| | | asset1.Is_Add_888_Alarm__c = 'False'; |
| | | asset1.Product2Id = pro1.Id; |
| | | // asset1.IS_Extend_Gurantee__c = false; |
| | | asset1.warrantyType__c = '市场多年保修'; |
| | | // asset1.SerMarGuranteeType__c = '市场多年保'; |
| | | asset1.New_logic_data__c = true; |
| | | asset1.IS_Extend_Gurantee_Txt__c = false; |
| | | asset1.ProvistonPeriod__c = 3; |
| | | // asset1.Extend_Gurantee_DateTo__c = Date.today().addYears(1); |
| | | asset1.AssetMark__c = '主机'; |
| | | // asset1.Posting_Date__c = Date.today().addDays(-30); |
| | | asset1.ChangeWarrantyStartDate__c = Date.newInstance(2022, 7,12); |
| | | asset1.WarrantyChanges__c = true; |
| | | // asset1.InstallDate__c = Date.newInstance(2022, 12,12); |
| | | |
| | | asset1.SerialNumber = 'sn01'; |
| | | asset1.Name = 'MH-2411'; |
| | | asset1.AccountId = dep.Id; |
| | | asset1.Department_Class__c = strategicDep.Id; |
| | | asset1.Hospital__c = hospital.Id; |
| | | // asset1.Product2Id = pro1.Id; |
| | | asset1.Quantity = 100; |
| | | asset1.Manage_type__c = '数量管理'; |
| | | asset1.Loaner_accsessary__c = true; |
| | | asset1.Out_of_wh__c = 0; |
| | | asset1.Salesdepartment__c = '0.备品中心'; |
| | | asset1.Product_category__c = 'GI'; |
| | | |
| | | asset1.Asset_loaner_category__c = '耗材'; |
| | | asset1.Delete_Flag__c = false; |
| | | asset1.AssetManageConfirm__c = true; |
| | | asset1.Equipment_Type__c = '产品试用'; |
| | | asset1.Fixture_OneToOne_Link__c = null; |
| | | asset1.Internal_asset_location__c = '上海 备品中心'; |
| | | asset1.Consumable_Guaranteen_end__c = System.today().addYears(1); |
| | | insert asset1; |
| | | |
| | | Date nowDate = Date.today(); |
| | | |
| | | String numberStr = '1'; |
| | | Alarm_888_Month__c alarm8881 = new Alarm_888_Month__c( |
| | | Number_Of_Operations__c = numberStr, |
| | | Nth_Operating_Day__c = nowDate.addMonths(1), |
| | | Alarm_Date__c = nowDate.addMonths(-2), |
| | | Asset_ID__c = asset1.Id |
| | | ); |
| | | insert alarm8881; |
| | | Database.executeBatch(new Email888AlarmBatch(),50); |
| | | Integer expectedNumOfAlarm888 = [SELECT COUNT() FROM Alarm_888_Month__c]; |
| | | System.assertEquals(expectedNumOfAlarm888 > 0,true); |
| | | System.Test.StopTest(); |
| | | |
| | | |
| | | } |
| | | |
| | | @isTest static void testBatchOnly1 () { |
| | | |
| | | |
| | | System.Test.startTest(); |
| | | Address_Level__c al1 = [SELECT Id FROM Address_Level__c WHERE Name='华东']; |
| | | Address_Level__c al2 = [SELECT Id FROM Address_Level__c WHERE Name='渋谷区']; |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'test hospital'; |
| | | hospital.Is_Active__c = '有効'; |
| | | hospital.Attribute_Type__c = '卫生部'; |
| | | hospital.Speciality_Type__c = '综合医院'; |
| | | hospital.Grade__c = '一级'; |
| | | hospital.OCM_Category__c = 'SLTV'; |
| | | hospital.Is_Medical__c = '医疗机构'; |
| | | hospital.State_Master__c = al1.id; |
| | | hospital.City_Master__c = al2.id; |
| | | hospital.Town__c = '东京'; |
| | | |
| | | insert hospital; |
| | | Account strategicDep = new Account(); |
| | | strategicDep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_Class_OTH'].id; |
| | | strategicDep.Name = '其它'; |
| | | strategicDep.Department_Class_Label__c = '其他'; |
| | | strategicDep.Hospital__c = hospital.Id; |
| | | strategicDep.ParentId = hospital.Id; |
| | | // insert strategicDep; |
| | | |
| | | insert strategicDep; |
| | | Account dep = new Account(); |
| | | dep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_OTH'].id; |
| | | dep.Name = 'test dep'; |
| | | dep.AgentCode_Ext__c = '9999998'; |
| | | dep.ParentId = strategicDep.Id; |
| | | dep.Department_Class__c = strategicDep.Id; |
| | | dep.Hospital__c = hospital.Id; |
| | | insert dep; |
| | | Product2 pro1 = [SELECT Id FROm Product2 limit 1]; |
| | | Asset asset1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | asset1.InstallDate = Date.newInstance(2022, 12,12); |
| | | asset1.Is_Add_888_Alarm__c = 'False'; |
| | | asset1.Product2Id = pro1.Id; |
| | | // asset1.IS_Extend_Gurantee__c = false; |
| | | asset1.warrantyType__c = '市场多年保修'; |
| | | // asset1.SerMarGuranteeType__c = '市场多年保'; |
| | | asset1.New_logic_data__c = true; |
| | | asset1.IS_Extend_Gurantee_Txt__c = false; |
| | | asset1.ProvistonPeriod__c = 3; |
| | | // asset1.Extend_Gurantee_DateTo__c = Date.today().addYears(1); |
| | | asset1.AssetMark__c = '主机'; |
| | | // asset1.Posting_Date__c = Date.today().addDays(-30); |
| | | asset1.ChangeWarrantyStartDate__c = Date.newInstance(2022, 7,12); |
| | | asset1.WarrantyChanges__c = true; |
| | | // asset1.InstallDate__c = Date.newInstance(2022, 12,12); |
| | | |
| | | asset1.SerialNumber = 'sn01'; |
| | | asset1.Name = 'MH-2411'; |
| | | asset1.AccountId = dep.Id; |
| | | asset1.Department_Class__c = strategicDep.Id; |
| | | asset1.Hospital__c = hospital.Id; |
| | | // asset1.Product2Id = pro1.Id; |
| | | asset1.Quantity = 100; |
| | | asset1.Manage_type__c = '数量管理'; |
| | | asset1.Loaner_accsessary__c = true; |
| | | asset1.Out_of_wh__c = 0; |
| | | asset1.Salesdepartment__c = '0.备品中心'; |
| | | asset1.Product_category__c = 'GI'; |
| | | |
| | | asset1.Asset_loaner_category__c = '耗材'; |
| | | asset1.Delete_Flag__c = false; |
| | | asset1.AssetManageConfirm__c = true; |
| | | asset1.Equipment_Type__c = '产品试用'; |
| | | asset1.Fixture_OneToOne_Link__c = null; |
| | | asset1.Internal_asset_location__c = '上海 备品中心'; |
| | | asset1.Consumable_Guaranteen_end__c = System.today().addYears(1); |
| | | insert asset1; |
| | | Date nowDate = Date.today(); |
| | | |
| | | String numberStr = '1'; |
| | | Alarm_888_Month__c alarm8881 = new Alarm_888_Month__c( |
| | | Number_Of_Operations__c = numberStr, |
| | | Nth_Operating_Day__c = nowDate.addMonths(1), |
| | | Alarm_Date__c = nowDate.addMonths(-2), |
| | | Asset_ID__c = asset1.Id |
| | | ); |
| | | insert alarm8881; |
| | | Database.executeBatch(new Email888AlarmBatch(),50); |
| | | Integer expectedNumOfAlarm888 = [SELECT COUNT() FROM Alarm_888_Month__c]; |
| | | System.assertEquals(expectedNumOfAlarm888 > 0,true); |
| | | System.Test.StopTest(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>45.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | showOppOName = new Opportunity(); |
| | | //新增Competitor__c字节 |
| | | //2021-12-10 增加 中标日 招标日 yjk |
| | | String soql = 'select id,Name,Competitor__c,Opportunity_stage__c,TenderBeginDate__c,Closing_Bid_Date_Bid__c,Application_Amount_Submit__c,Budget_Amount_Approval__c,Bid_Date__c,Close_Forecasted_Date__c,CloseDate,Closing_Bid_Date__c,Department_Name__c,Status_Formula__c,Close_Forecasted_Assume_Date__c from Opportunity where id = :ESetId'; |
| | | //询价进口论证 fy 20220803 start ,if_NeedImportDemonstration__c,ImportDemonstration_state__c,ImportDemonstration_Filing_date__c,ImportDemonstration_Approval_date__c, ImportDemonstration_Rejection_date__c |
| | | String soql = 'select id,Name,Competitor__c,Opportunity_stage__c,TenderBeginDate__c,Closing_Bid_Date_Bid__c,Application_Amount_Submit__c,Budget_Amount_Approval__c,Bid_Date__c,Close_Forecasted_Date__c,CloseDate,Closing_Bid_Date__c,Department_Name__c,Status_Formula__c,Close_Forecasted_Assume_Date__c,if_NeedImportDemonstration__c,ImportDemonstration_state__c,ImportDemonstration_Filing_date__c,ImportDemonstration_Approval_date__c, ImportDemonstration_Rejection_date__c from Opportunity where id = :ESetId'; |
| | | String sql = 'select name , id ,Related_Opportunity'+IndexNum+'__c,Related_Opportunity'+IndexNum+'_ID__c from Event__c where Related_Opportunity'+IndexNum+'_ID__c =:ESetId'; |
| | | //List<Event__c> showName = Database.query(sql); |
| | | List<Opportunity> OppoName = Database.query(soql); |
| | |
| | | SWAG-B8Y84V 2019-02-11 start |
| | | */ |
| | | //*************************Insert 20160627 OCM-225 趙徳芳 Start*************************// |
| | | else if((Old_Competitor == 'C'||Old_Competitor == 'A'||Old_Competitor == 'B')&&(insOppo.Competitor__c =='D'||insOppo.Competitor__c =='E')){ |
| | | // else if((Old_Competitor == 'C'||Old_Competitor == 'A'||Old_Competitor == 'B')&&(insOppo.Competitor__c =='D'||insOppo.Competitor__c =='E')){ |
| | | else if((Old_Competitor == 'C'||Old_Competitor == 'A'||Old_Competitor == 'B')&&insOppo.Competitor__c =='D'){ |
| | | insOppo.Opportunity_stage__c.addError('询价等级已达到'+Old_Competitor+',询价等级为C及以上的,不可以修改到D或E'); |
| | | goOrNot = false; |
| | | } |
| | |
| | | Oppo.Budget_Amount_Approval__c = insOppo.Budget_Amount_Approval__c; |
| | | Oppo.Bid_Date__c = insOppo.Bid_Date__c; |
| | | Oppo.Closing_Bid_Date__c = insOppo.Closing_Bid_Date__c; |
| | | Oppo.Close_Forecasted_Date__c = insOppo.Close_Forecasted_Date__c; |
| | | Oppo.Close_Forecasted_Assume_Date__c = insOppo.Close_Forecasted_Assume_Date__c; |
| | | // Oppo.Close_Forecasted_Date__c = insOppo.Close_Forecasted_Date__c; //20220809 lt |
| | | // Oppo.Close_Forecasted_Assume_Date__c = insOppo.Close_Forecasted_Assume_Date__c; //20220809 lt |
| | | //询价进口论证 fy 20220803 start |
| | | Oppo.if_NeedImportDemonstration__c = insOppo.if_NeedImportDemonstration__c; |
| | | Oppo.ImportDemonstration_Filing_date__c = insOppo.ImportDemonstration_Filing_date__c; |
| | | Oppo.ImportDemonstration_Approval_date__c = insOppo.ImportDemonstration_Approval_date__c; |
| | | Oppo.ImportDemonstration_Rejection_date__c = insOppo.ImportDemonstration_Rejection_date__c; |
| | | //询价进口论证 fy 20220803 end |
| | | //Oppo.CloseDate = insOppo.CloseDate; |
| | | update Oppo; |
| | | goOrNot = true; |
| | |
| | | ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO, '保存完了!')); |
| | | // SWAG-B8Y84V 2019-02-11 end |
| | | }catch(DmlException ex) { |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, ' '+ex.getDmlMessage(0))); |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, ' '+ex)); |
| | | //SAP上传后,不允许修改「预测OCM签约日」 |
| | | system.debug('测试进入13:'+ex.getDmlMessage(0)); |
| | | return null; |
| | |
| | | system.debug('测试进入12'); |
| | | |
| | | } |
| | | //询价进口论证 ssm 20220823 保存成功后刷新页面 start |
| | | this.init(); |
| | | //询价进口论证 ssm 20220823 start |
| | | return null; |
| | | } |
| | | |
| | | } |
| | |
| | | private class EnquiryDetailsControllerTest { |
| | | |
| | | static testMethod void EnquiryDetailsControllerTest() { |
| | | StaticParameter.EscapeOppandStaTrigger = true; |
| | | Opportunity CreateOppo = new Opportunity(); |
| | | CreateOppo.Name='TestName'; |
| | | CreateOppo.Opportunity_stage__c='预算没有批准'; |
| New file |
| | |
| | | global class EnquiryDetailsWebService { |
| | | |
| | | WebService static Boolean change(String oppId){ |
| | | List<InquiryPredictsDateChange__c> ipdList = Database.query('Select Id,Name,Opportunity__c,Predicted_Date_Status__c From InquiryPredictsDateChange__c Where Opportunity__c = : oppId order by CreatedDate desc'); |
| | | |
| | | if(ipdList.size() > 0){ |
| | | for(InquiryPredictsDateChange__c ipd : ipdList){ |
| | | if(ipd.Predicted_Date_Status__c == '审批中'){ |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class EnquiryDetailsWebServiceTest { |
| | | |
| | | @isTest |
| | | static void TestMethod1() { |
| | | |
| | | List<User> users = [select Id,Name,LastName, FirstName from User]; |
| | | |
| | | Opportunity opp = new Opportunity(); |
| | | opp.Name = 'Testname0801'; |
| | | opp.StageName = '目標'; |
| | | opp.Close_Forecasted_Date__c = Date.today(); |
| | | opp.Close_Forecasted_Assume_Date__c = Date.today().addDays(2); |
| | | opp.Opportunity_No__c = '0801'; |
| | | opp.CloseDate = Date.today().addDays(1); |
| | | opp.Sales_assistant_name_text__c = users[0].Id; |
| | | opp.Manager_name_text__c = users[0].Id; |
| | | insert opp; |
| | | |
| | | InquiryPredictsDateChange__c ipd = new InquiryPredictsDateChange__c(); |
| | | ipd.Opportunity__c = opp.Id; |
| | | ipd.Date_InAdvance_Delay__c = '提前'; |
| | | ipd.CloseDate__c = Date.today(); |
| | | ipd.Close_Forecasted_Date__c = Date.today(); |
| | | ipd.Close_Forecasted_Assume_Date__c = Date.today(); |
| | | ipd.Predicted_date_ChangeReason__c = '20220801'; |
| | | ipd.Predicted_Date_Status__c = '审批中'; |
| | | ipd.Manager_name__c = users[0].Id; |
| | | ipd.Sales_assistant_name__c = users[0].Id; |
| | | insert ipd; |
| | | |
| | | EnquiryDetailsWebService.change(opp.Id); |
| | | |
| | | } |
| | | |
| | | @isTest |
| | | static void TestMethod2() { |
| | | |
| | | List<User> users = [select Id,Name,LastName, FirstName from User]; |
| | | |
| | | Opportunity opp = new Opportunity(); |
| | | opp.Name = 'Testname0801'; |
| | | opp.StageName = '目標'; |
| | | opp.Close_Forecasted_Date__c = Date.today(); |
| | | opp.Close_Forecasted_Assume_Date__c = Date.today().addDays(2); |
| | | opp.Opportunity_No__c = '0801'; |
| | | opp.CloseDate = Date.today().addDays(1); |
| | | opp.Sales_assistant_name_text__c = users[0].Id; |
| | | opp.Manager_name_text__c = users[0].Id; |
| | | insert opp; |
| | | |
| | | EnquiryDetailsWebService.change(opp.Id); |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | private BatchIF_Log__c iflog; |
| | | public List < String > accountIdList; |
| | | public Date egdTime; |
| | | public Date geTIme; |
| | | global EquipmentCoverageTargetBatch() { |
| | | this.query = query; |
| | | OCSM_Period = 'FY'+toDayTime.year(); |
| | | // OCSM_Period = 'FY'+(toDayTime.year()+1); |
| | | } |
| | | |
| | | global EquipmentCoverageTargetBatch(List < String > accountIdList) { |
| | | this.query = query; |
| | | // OCSM_Period = 'FY'+(toDayTime.year()+1); |
| | | this.accountIdList = accountIdList; |
| | | } |
| | | |
| | |
| | | }else{ |
| | | OCSM_Period_half = '2H'; |
| | | } |
| | | if(toDayTime.month() >= 1 && toDayTime.month() <= 3){ |
| | | OCSM_Period = 'FY'+(toDayTime.year()); |
| | | }else{ |
| | | OCSM_Period = 'FY'+(toDayTime.year()+1); |
| | | } |
| | | // 5条以上软性镜医院&&医院有效 |
| | | egdTime = Date.newInstance(toDayTime.year()+1,3,1); |
| | | List<AggregateResult> results = new List<AggregateResult>(); |
| | | |
| | | String groupQuery = 'SELECT count(Id),Hospital__c' |
| | | + ' FROM Asset' |
| | | + ' WHERE Product2.ServiceCategory__c =\'软性镜\' AND Is_Active__c =\'有効\' AND RecordType.DeveloperName =\'HP\' '; |
| | | egdTime = Date.newInstance(toDayTime.year()+1,3,31); |
| | | geTIme = Date.newInstance(3999,12,31); |
| | | String query = 'SELECT Id,Hospital__c,Hospital__r.name,Hospital__r.IF_Coverage_Target_HP__c,IF_Coverage_Target_Asset__c,IF_Coverage_Real_Asset__c,' |
| | | +'CurrentContract__r.Contract_End_Date__c,CurrentContract__r.Contract_Conclusion_Date__c,Product2.Category4__c,' |
| | | +'Product2.ServiceCategory__c,Product2.Category3__c,OwnershipMachine_No__c,SerialNumber ' |
| | | +' FROM Asset ' |
| | | +' WHERE Product2.ServiceCategory__c != null ' |
| | | +' AND OwnershipMachine_No__c!=\'A22004A\' AND OwnershipMachine_No__c!=\'A37026A\' AND OwnershipMachine_No__c!=\'A4676A\' AND OwnershipMachine_No__c!=\'WA02946A\'' |
| | | +' AND Hospital__r.IF_Coverage_Target_HP__c = \'1\'' |
| | | +' AND (Product2.Maintenance_Price_Year__c != 0 and Product2.Maintenance_Price_Year__c != null)' |
| | | +' AND (Status = \'使用中\' or Status = \'未使用\' or Status = \'不明\')'; |
| | | if (accountIdList != null && accountIdList.size() > 0) { |
| | | groupQuery += ' AND Hospital__c IN :accountIdList'; |
| | | } |
| | | groupQuery += ' Group by Hospital__c having count(Id)>=5'; |
| | | |
| | | System.debug(LoggingLevel.INFO, '*** groupQuery: ' + groupQuery); |
| | | results = Database.query(groupQuery); |
| | | if(results!=null && results.size() > 0){ |
| | | for (AggregateResult a1 : results) { |
| | | hospIds.add(String.valueOf(a1.get('Hospital__c'))); |
| | | } |
| | | } |
| | | return Database.getQueryLocator([SELECT Id,IF_Coverage_Target_HP__c, |
| | | (SELECT Id,Hospital__c,Hospital__r.IF_Coverage_Target_HP__c,IF_Coverage_Target_Asset__c,IF_Coverage_Real_Asset__c, |
| | | CurrentContract__r.Contract_End_Date__c,CurrentContract__r.Contract_Conclusion_Date__c,Product2.Category4__c, |
| | | Product2.ServiceCategory__c,Product2.Category3__c |
| | | FROM Asset_Hospital__r |
| | | WHERE Product2.ServiceCategory__c != null |
| | | AND Product2.Maintenance_Price_Year__c != 0 |
| | | AND Status != '廃棄' |
| | | AND Status != '待报废' |
| | | AND IF_StopParts_production__c != '1' |
| | | AND ((SerMarGuranteeType__c = null AND Extend_Gurantee_DateTo__c = null) |
| | | OR (SerMarGuranteeType__c!=null AND Extend_Gurantee_DateTo__c < :egdTime) |
| | | OR CurrentContract__c = null) ) , |
| | | (SELECT Id ,Target_Rigid_Mirror_2__c,Target_Soft_Mirror_2__c,Target_Correlation_Lightsource__c,Account_HP__c,OCSM_Period_half__c |
| | | FROM Account_Servicetarget__r |
| | | WHERE OCSM_Period_half__c = :OCSM_Period_half |
| | | AND OCSM_Period__c = :OCSM_Period) |
| | | FROM Account WHERE Id IN:hospIds]); |
| | | query += ' AND hospital__c IN :accountIdList '; |
| | | } |
| | | query += ' AND (IF_StopParts_production__c != \'1\' or Product2.PartSupplyFinishDate__c = null)' |
| | | +' AND (SerMarGuranteeType__c = null' |
| | | +' OR (SerMarGuranteeType__c!=null AND Guarantee_period_for_products__c < :egdTime))' |
| | | +' ORDER BY Hospital__c'; |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Account> accList) { |
| | | global void execute(Database.BatchableContext BC, list<Asset> assList) { |
| | | system.debug('执行execute'); |
| | | |
| | | List<String> accIds = new List<String>(); |
| | | Set<String> OlympusList = new Set<String>(); |
| | | Integer i = 0; |
| | | for(Asset ass1:assList){ |
| | | if (ass1.Hospital__r.name.contains('Olympus社内')) { |
| | | OlympusList.add(ass1.OwnershipMachine_No__c+ass1.SerialNumber); |
| | | } |
| | | accIds.add(ass1.Hospital__c); |
| | | } |
| | | List<Asset> assetList = new List<Asset>(); |
| | | Set<String> accIdSet = new Set<String>(); |
| | | List<Account_Service_Of_Target__c> targetObjs = new List<Account_Service_Of_Target__c>(); |
| | | for(Account acc:accList){ |
| | | acc.IF_Coverage_Target_HP__c = '1'; |
| | | // 覆盖目标(硬) |
| | | Integer mirror_1 = 0; |
| | | // 覆盖目标(软) |
| | | Integer mirror_2 = 0; |
| | | //覆盖目标(周边) |
| | | Integer mirror_3 = 0; |
| | | for(Asset ass: acc.Asset_Hospital__r){ |
| | | ass.IF_Coverage_Target_Asset__c = '1'; |
| | | assetList.add(ass); |
| | | if (ass.Product2.ServiceCategory__c == '硬性镜') { |
| | | mirror_1++; |
| | | } |
| | | if(ass.Product2.ServiceCategory__c =='软性镜'){ |
| | | mirror_2++; |
| | | } |
| | | if (ass.Product2.ServiceCategory__c == '周边') { |
| | | mirror_3++; |
| | | } |
| | | } |
| | | System.debug(LoggingLevel.INFO, '*** mirror_1: ' + mirror_1); |
| | | System.debug(LoggingLevel.INFO, '*** mirror_2: ' + mirror_2); |
| | | System.debug(LoggingLevel.INFO, '*** mirror_3: ' + mirror_3); |
| | | if(acc.Account_Servicetarget__r.size() > 0){ |
| | | |
| | | for(Account_Service_Of_Target__c asotOne: acc.Account_Servicetarget__r){ |
| | | asotOne.Coverage_Target_Account__c = true; |
| | | asotOne.Target_Rigid_Mirror_2__c += mirror_1; |
| | | asotOne.Target_Soft_Mirror_2__c += mirror_2; |
| | | asotOne.Target_Correlation_Lightsource__c += mirror_3; |
| | | targetObjs.add(asotOne); |
| | | } |
| | | }else{ |
| | | Account_Service_Of_Target__c asot1 = new Account_Service_Of_Target__c(); |
| | | asot1.Account_HP__c = acc.Id; |
| | | asot1.Coverage_Target_Account__c = true; |
| | | asot1.Target_Rigid_Mirror_2__c = mirror_1; |
| | | asot1.Target_Soft_Mirror_2__c = mirror_2; |
| | | asot1.Target_Correlation_Lightsource__c = mirror_3; |
| | | asot1.OCSM_Period__c = OCSM_Period; |
| | | asot1.OCSM_Period_half__c = OCSM_Period_half; |
| | | targetObjs.add(asot1); |
| | | } |
| | | |
| | | Map<String,Account_Service_Of_Target__c> targetMap = new Map<String,Account_Service_Of_Target__c>(); |
| | | for(Account_Service_Of_Target__c target:[SELECT Id ,Target_Rigid_Mirror_2__c,Target_Soft_Mirror_2__c,Target_Correlation_Lightsource__c,Account_HP__c,OCSM_Period_half__c |
| | | FROM Account_Service_Of_Target__c |
| | | WHERE OCSM_Period_half__c = :OCSM_Period_half |
| | | AND OCSM_Period__c = :OCSM_Period |
| | | AND Account_HP__c IN:accIds]){ |
| | | targetMap.put(target.Account_HP__c,target); |
| | | } |
| | | |
| | | |
| | | // for(asset assOlympus:[select id,name,OwnershipMachine_No__c,SerialNumber |
| | | // from asset |
| | | // where Hospital__r.name like '%Olympus社内%']){ |
| | | // // 把医院名为Olympus社内的型号和机身编码放入set后续做存在判断 |
| | | |
| | | // } |
| | | // Account_Service_Of_Target__c asot = null; |
| | | for(Asset ass:assList){ |
| | | |
| | | if(!accIdSet.contains(ass.Hospital__c)){ |
| | | if(!targetMap.containskey(ass.Hospital__c)){ |
| | | // Account_Service_Of_Target__c asot = targetMap.get(ass.Hospital__c); |
| | | // asot.Target_Rigid_Mirror_2__c = 0; |
| | | // asot.Target_Soft_Mirror_2__c = 0; |
| | | // asot.Target_Correlation_Lightsource__c = 0; |
| | | |
| | | // }else{ |
| | | Account_Service_Of_Target__c asot = new Account_Service_Of_Target__c(); |
| | | asot.Account_HP__c = ass.Hospital__c; |
| | | asot.Coverage_Target_Account__c = true; |
| | | asot.Target_Rigid_Mirror_2__c = 0; |
| | | asot.Target_Soft_Mirror_2__c = 0; |
| | | asot.Target_Correlation_Lightsource__c = 0; |
| | | asot.OCSM_Period__c = OCSM_Period; |
| | | asot.OCSM_Period_half__c = OCSM_Period_half; |
| | | targetMap.put(ass.Hospital__c,asot); |
| | | } |
| | | accIdSet.add(ass.Hospital__c); |
| | | } |
| | | ass.IF_Coverage_Target_Asset__c = '1'; |
| | | // 型号+机身编码 |
| | | String assTarget = ass.OwnershipMachine_No__c+ass.SerialNumber; |
| | | if(OlympusList.contains(assTarget)){ |
| | | ass.IF_Coverage_Target_Asset__c = '0'; |
| | | } |
| | | assetList.add(ass); |
| | | if (!OlympusList.contains(assTarget)){ |
| | | if (ass.Product2.ServiceCategory__c == '硬性镜') { |
| | | targetMap.get(ass.Hospital__c).Target_Rigid_Mirror_2__c ++; |
| | | } |
| | | if(ass.Product2.ServiceCategory__c =='软性镜'){ |
| | | targetMap.get(ass.Hospital__c).Target_Soft_Mirror_2__c ++; |
| | | } |
| | | if (ass.Product2.ServiceCategory__c == '周边') { |
| | | targetMap.get(ass.Hospital__c).Target_Correlation_Lightsource__c ++; |
| | | } |
| | | } |
| | | i++; |
| | | } |
| | | system.debug('一共有'+i+'个设备'); |
| | | |
| | | Oly_TriggerHandler.bypass('AssetTrigger'); |
| | | Oly_TriggerHandler.bypass('AssetHandlerCheck'); |
| | | system.debug('执行update AssetsTarget前'); |
| | | update assetList; |
| | | system.debug('执行update accList前'); |
| | | Oly_TriggerHandler.bypass('AccountTrigger'); |
| | | update accList; |
| | | UpSert targetObjs; |
| | | Oly_TriggerHandler.bypass('NFM701ControllerHandler'); |
| | | Oly_TriggerHandler.bypass('UpdateContractAimAmountHandler'); |
| | | UpSert targetMap.values(); |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class EquipmentCoverageTargetBatchTest { |
| | | static testMethod void testMethod1() { |
| | | database.executeBatch(new EquipmentCoverageTargetBatch(),200); |
| | | } |
| | | static testMethod void testMethod2() { |
| | | Account acc = [select id from account where name = 'hospitalabc']; |
| | | List<String> l = new List<String>(); |
| | | l.add(acc.id); |
| | | database.executeBatch(new EquipmentCoverageTargetBatch(l),200); |
| | | } |
| | | @testSetup |
| | | private static void setUpDate(){ |
| | | // 病院を作る |
| | | Date toDayTime = Date.today(); |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'hospitalabc'; |
| | | hospital.Is_Active__c = '有効'; |
| | | hospital.Attribute_Type__c = '卫生部'; |
| | | hospital.Speciality_Type__c = '综合医院'; |
| | | hospital.Grade__c = '一级'; |
| | | hospital.IF_Coverage_Target_HP__c = '1'; |
| | | hospital.OCM_Category__c = 'SLTV'; |
| | | hospital.Is_Medical__c = '医疗机构'; |
| | | hospital.Town__c = '东京'; |
| | | Oly_TriggerHandler.bypass('NFM701ControllerHandler'); |
| | | Oly_TriggerHandler.bypass('UpdateContractAimAmountHandler'); |
| | | insert hospital; |
| | | |
| | | // 戦略科室を得る |
| | | Account[] strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_OTH']; |
| | | // 診療科を作る |
| | | Account dep = new Account(); |
| | | dep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_OTH'].id; |
| | | dep.Name = 'test dep'; |
| | | dep.AgentCode_Ext__c = System.Label.Account_Asset_FJZ; |
| | | dep.ParentId = strategicDep[0].Id; |
| | | dep.Department_Class__c = strategicDep[0].Id; |
| | | dep.Hospital__c = hospital.Id; |
| | | Oly_TriggerHandler.bypass('NFM701ControllerHandler'); |
| | | Oly_TriggerHandler.bypass('UpdateContractAimAmountHandler'); |
| | | insert dep; |
| | | |
| | | |
| | | |
| | | // 产品 |
| | | Product2 pro1 = new Product2(Name='name01',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n01',Serial_Lot_No__c='S/N tracing', |
| | | Fixture_Model_No_T__c = 'n01', |
| | | Maintenance_Price_Year__c = 999, |
| | | Extend_Gurantee_Start_MD__c = Date.newInstance(toDayTime.year(),3,2), |
| | | Extend_Gurantee_End_MD__c = Date.newInstance(3999,12,31), |
| | | Extend_new_product_gurantee_MD__c = true, |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | ProductCode_Ext__c='pc01',Manual_Entry__c=false,Brand_Name__c='奥林巴斯', |
| | | Category2__c='本体', |
| | | Category3__c='电子镜'); |
| | | Product2 pro2 = new Product2(Name='name02',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n02',Serial_Lot_No__c='Lot tracing', |
| | | ProductCode_Ext__c='pc02',Manual_Entry__c=false,Brand_Name__c='奥林巴斯', |
| | | Category2__c='本体', |
| | | Extend_Gurantee_Start_MD__c = Date.newInstance(toDayTime.year(),3,2), |
| | | Extend_Gurantee_End_MD__c = Date.newInstance(3999,12,31), |
| | | Extend_new_product_gurantee_MD__c = true, |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | Maintenance_Price_Year__c = 999, |
| | | Category3__c='纤维镜'); |
| | | Product2 pro3 = new Product2(Name='name03',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n03',Serial_Lot_No__c='Lot tracing', |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | ProductCode_Ext__c='pc03',Manual_Entry__c=false,Brand_Name__c='奥林巴斯', |
| | | Category2__c='本体', |
| | | Extend_Gurantee_Start_MD__c = Date.newInstance(toDayTime.year(),3,2), |
| | | Extend_Gurantee_End_MD__c = Date.newInstance(3999,12,31), |
| | | Extend_new_product_gurantee_MD__c = true, |
| | | Maintenance_Price_Year__c = 999, |
| | | Category3__c='电子镜'); |
| | | Product2 pro4 = new Product2(Name='name04',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n04',Serial_Lot_No__c='Lot tracing', |
| | | ProductCode_Ext__c='pc04',Manual_Entry__c=false,Brand_Name__c='奥林巴斯', |
| | | Category2__c='本体', |
| | | Extend_Gurantee_Start_MD__c = Date.newInstance(toDayTime.year(),3,2), |
| | | Extend_Gurantee_End_MD__c = Date.newInstance(3999,12,31), |
| | | Extend_new_product_gurantee_MD__c = true, |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | Maintenance_Price_Year__c = 999, |
| | | Category3__c='电子镜'); |
| | | Product2 pro5 = new Product2(Name='name05',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n05',Serial_Lot_No__c='Lot tracing',Brand_Name__c='奥林巴斯', |
| | | Category2__c='本体', |
| | | Extend_Gurantee_Start_MD__c = Date.newInstance(toDayTime.year(),3,2), |
| | | Extend_Gurantee_End_MD__c = Date.newInstance(3999,12,31), |
| | | Extend_new_product_gurantee_MD__c = true, |
| | | Maintenance_Price_Year__c = 999, |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | ProductCode_Ext__c='pc05',Manual_Entry__c=false, |
| | | Category3__c='电子镜'); |
| | | insert new Product2[] {pro1, pro2, pro3,pro4,pro5}; |
| | | |
| | | |
| | | |
| | | Maintenance_Contract__c contract = new Maintenance_Contract__c(); |
| | | contract.Name = 'tect contract'; |
| | | contract.status__c ='契約'; |
| | | contract.Maintenance_Contract_No__c = 'Kami_Contract_No'; |
| | | contract.Contract_Conclusion_Date__c = Date.today(); |
| | | contract.Hospital__c = hospital.Id; |
| | | contract.Department_Class__c = strategicDep[0].Id; |
| | | contract.Department__c = dep.Id; |
| | | contract.Contract_Start_Date__c=Date.newInstance(toDayTime.year(),3,2); // 10日前 |
| | | contract.Contract_End_Date__c = Date.newInstance(toDayTime.year()+1,3,20); // 5日後 |
| | | contract.SalesOfficeCode_selection__c = '北京RC'; |
| | | contract.RecordTypeId = Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByDeveloperName().get('VM_Contract').getRecordTypeId(); |
| | | insert contract; |
| | | |
| | | List<Maintenance_Contract__c> MaintenanceContract=[select id from Maintenance_Contract__c]; |
| | | |
| | | //---------------------------主体 两个附属品(个体管理 数量管理) |
| | | // 保有设备A (主体) |
| | | Asset assetA1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA1.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA1.SerialNumber = 'ass01'; |
| | | assetA1.Name = 'ass01'; |
| | | assetA1.AccountId = dep.Id; |
| | | assetA1.Guarantee_period_for_products__c = toDayTime; |
| | | assetA1.Department_Class__c = strategicDep[0].Id; |
| | | assetA1.Hospital__c = hospital.Id; |
| | | assetA1.Product2Id = pro1.Id; |
| | | assetA1.Quantity = 1; |
| | | |
| | | assetA1.Status = '使用中'; |
| | | assetA1.Manage_type__c = '个体管理'; |
| | | assetA1.Loaner_accsessary__c = false; |
| | | assetA1.Product_category__c = 'GI'; |
| | | assetA1.Delete_Flag__c = false; |
| | | assetA1.Freeze_sign__c = false; |
| | | assetA1.Out_of_wh__c = 0; |
| | | assetA1.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA1.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA1.Product_category__c = 'GI'; |
| | | assetA1.Equipment_Type__c = '产品试用'; |
| | | assetA1.SalesProvince__c = '北京'; |
| | | assetA1.WH_location__c = '货架号1'; |
| | | assetA1.Asset_loaner_category__c = '固定资产'; |
| | | assetA1.CompanyOfEquipment__c = '123'; |
| | | assetA1.Internal_Asset_number__c = '123'; |
| | | assetA1.CurrentContract__c=MaintenanceContract[0].Id; |
| | | // assetA1.AssetManageConfirm__c = true; |
| | | // 保有设备A (附属品 数量管理) |
| | | Asset assetA2 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA2.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA2.SerialNumber = 'ass02'; |
| | | assetA2.Name = 'ass02'; |
| | | assetA2.AccountId = dep.Id; |
| | | assetA2.Department_Class__c = strategicDep[0].Id; |
| | | assetA2.Hospital__c = hospital.Id; |
| | | assetA2.Product2Id = pro2.Id; |
| | | assetA2.Quantity = 10; |
| | | assetA2.Status = '使用中'; |
| | | assetA2.Manage_type__c = '数量管理'; |
| | | assetA2.Loaner_accsessary__c = true; |
| | | assetA2.Product_category__c = 'GI'; |
| | | assetA2.Delete_Flag__c = false; |
| | | assetA2.Guarantee_period_for_products__c = toDayTime; |
| | | assetA2.Freeze_sign__c = false; |
| | | assetA2.Out_of_wh__c = 3; |
| | | |
| | | assetA2.Frozen_Quantity__c = 2; |
| | | assetA2.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA2.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA2.Product_category__c = 'GI'; |
| | | assetA2.Equipment_Type__c = '产品试用'; |
| | | assetA2.SalesProvince__c = '北京'; |
| | | assetA2.WH_location__c = '货架号2'; |
| | | assetA2.Asset_loaner_category__c = '固定资产'; |
| | | assetA2.CompanyOfEquipment__c = '123'; |
| | | assetA2.Internal_Asset_number__c = '123'; |
| | | assetA2.CurrentContract__c=MaintenanceContract[0].Id; |
| | | // assetA2.AssetManageConfirm__c = true; |
| | | // 保有设备A (附属品 个体管理) |
| | | Asset assetA3 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA3.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA3.SerialNumber = 'ass03'; |
| | | assetA3.Name = 'ass03'; |
| | | assetA3.AccountId = dep.Id; |
| | | assetA3.Department_Class__c = strategicDep[0].Id; |
| | | assetA3.Hospital__c = hospital.Id; |
| | | assetA3.Product2Id = pro3.Id; |
| | | assetA3.Quantity = 10; |
| | | assetA3.Status = '使用中'; |
| | | assetA3.Manage_type__c = '数量管理'; |
| | | assetA3.Loaner_accsessary__c = true; |
| | | assetA3.Product_category__c = 'GI'; |
| | | assetA3.Delete_Flag__c = false; |
| | | assetA3.Guarantee_period_for_products__c = toDayTime; |
| | | |
| | | assetA3.Freeze_sign__c = false; |
| | | assetA3.Out_of_wh__c = 3; |
| | | assetA3.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA3.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA3.Product_category__c = 'GI'; |
| | | assetA3.Equipment_Type__c = '产品试用'; |
| | | assetA3.SalesProvince__c = '北京'; |
| | | assetA3.WH_location__c = '货架号3'; |
| | | assetA3.Abandoned_Inventory__c = 1; |
| | | assetA3.Asset_loaner_category__c = '固定资产'; |
| | | assetA3.CompanyOfEquipment__c = '123'; |
| | | assetA3.Internal_Asset_number__c = '123'; |
| | | assetA3.CurrentContract__c=MaintenanceContract[0].Id; |
| | | |
| | | // 保有设备A (附属品 数量管理) |
| | | Asset assetA4 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA4.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA4.SerialNumber = 'ass04'; |
| | | assetA4.Name = 'ass04'; |
| | | assetA4.AccountId = dep.Id; |
| | | assetA4.Department_Class__c = strategicDep[0].Id; |
| | | assetA4.Hospital__c = hospital.Id; |
| | | assetA4.Product2Id = pro4.Id; |
| | | assetA4.Quantity = 10; |
| | | assetA4.Guarantee_period_for_products__c = toDayTime; |
| | | assetA4.Status = '使用中'; |
| | | |
| | | assetA4.Manage_type__c = '数量管理'; |
| | | assetA4.Loaner_accsessary__c = true; |
| | | assetA4.Product_category__c = 'GI'; |
| | | assetA4.Delete_Flag__c = false; |
| | | assetA4.Freeze_sign__c = false; |
| | | assetA4.Out_of_wh__c = 3; |
| | | assetA4.Frozen_Quantity__c = 2; |
| | | assetA4.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA4.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA4.Product_category__c = 'GI'; |
| | | assetA4.Equipment_Type__c = '产品试用'; |
| | | assetA4.SalesProvince__c = '北京'; |
| | | assetA4.WH_location__c = '货架号2'; |
| | | assetA4.Asset_loaner_category__c = '固定资产'; |
| | | assetA4.CompanyOfEquipment__c = '123'; |
| | | assetA4.Internal_Asset_number__c = '123'; |
| | | assetA4.CurrentContract__c=MaintenanceContract[0].Id; |
| | | // assetA2.AssetManageConfirm__c = true; |
| | | |
| | | // 保有设备A (附属品 数量管理) |
| | | Asset assetA5 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA5.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA5.SerialNumber = 'ass05'; |
| | | assetA5.Name = 'ass05'; |
| | | assetA5.AccountId = dep.Id; |
| | | assetA5.Department_Class__c = strategicDep[0].Id; |
| | | assetA5.Hospital__c = hospital.Id; |
| | | assetA5.Product2Id = pro5.Id; |
| | | assetA5.Quantity = 10; |
| | | assetA5.Status = '使用中'; |
| | | assetA5.Manage_type__c = '数量管理'; |
| | | assetA5.Loaner_accsessary__c = true; |
| | | assetA5.Product_category__c = 'GI'; |
| | | assetA5.Delete_Flag__c = false; |
| | | assetA5.Guarantee_period_for_products__c = toDayTime; |
| | | |
| | | assetA5.Freeze_sign__c = false; |
| | | assetA5.Out_of_wh__c = 3; |
| | | assetA5.Frozen_Quantity__c = 2; |
| | | assetA5.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA5.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA5.Product_category__c = 'GI'; |
| | | assetA5.Equipment_Type__c = '产品试用'; |
| | | assetA5.SalesProvince__c = '北京'; |
| | | assetA5.WH_location__c = '货架号2'; |
| | | assetA5.Asset_loaner_category__c = '固定资产'; |
| | | assetA5.CompanyOfEquipment__c = '123'; |
| | | assetA5.Internal_Asset_number__c = '123'; |
| | | assetA5.CurrentContract__c=MaintenanceContract[0].Id; |
| | | // assetA2.AssetManageConfirm__c = true; |
| | | Oly_TriggerHandler.bypass('AssetHandlerCheck'); |
| | | insert new Asset[] {assetA1, assetA2, assetA3,assetA4,assetA5}; |
| | | Account_Service_Of_Target__c asot=new Account_Service_Of_Target__c(); |
| | | asot.OCSM_Period_half__c='1H'; |
| | | asot.OCSM_Period__c = 'FY2022'; |
| | | asot.Account_HP__c=hospital.Id; |
| | | |
| | | insert asot; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | public Date toDayTime = Date.today(); |
| | | private BatchIF_Log__c iflog; |
| | | public String OCSM_Period_half; |
| | | public String OCSM_Period = 'FY'+toDayTime.year(); |
| | | public String OCSM_Period; |
| | | public List < String > accountIdList; |
| | | |
| | | global EquipmentRealCoverageRealBatch() { |
| | | this.query = query; |
| | | // system.debug('11111111111111111111111'+OCSM_Period); |
| | | } |
| | | global EquipmentRealCoverageRealBatch(List < String > accountIdList) { |
| | | this.query = query; |
| | | //this.query = query; |
| | | this.accountIdList = accountIdList; |
| | | } |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | |
| | | }else{ |
| | | OCSM_Period_half = '2H'; |
| | | } |
| | | |
| | | if(toDayTime.month() >= 1 && toDayTime.month() <= 3){ |
| | | OCSM_Period = 'FY'+(toDayTime.year()); |
| | | }else{ |
| | | OCSM_Period = 'FY'+(toDayTime.year()+1); |
| | | } |
| | | |
| | | if (accountIdList != null && accountIdList.size() > 0) { |
| | | query = 'select id,Hospital__c,IF_Coverage_Target_Asset__c,IF_Coverage_Real_Asset__c,CurrentContract__r.Contract_End_Date__c,CurrentContract__r.Contract_Conclusion_Date__c,Product2.Category4__c,Product2.ServiceCategory__c,Product2.Category3__c from Asset where ' |
| | | +' IF_StopParts_production__c != \'1\' and CurrentContract__c != null and Hospital__c in :accountIdList' |
| | | +' and (CurrentContract__r.Contract_End_Date__c >= :start_dateH1 and CurrentContract__r.Contract_Conclusion_Date__c <= :end_dateH1) order by hospital__c'; |
| | | +' IF_StopParts_production__c != \'1\' and IF_Coverage_Target_Asset__c =\'1\' and CurrentContract__c != null and Hospital__c in :accountIdList' |
| | | +' and (CurrentContract__r.Contract_End_Date__c >= :start_dateH1 and CurrentContract__r.Contract_Conclusion_Date__c <= :end_dateH1 and CurrentContract__r.Contract_Start_Date__c <= :end_dateH1) order by hospital__c'; |
| | | }else{ |
| | | query = 'select id,Hospital__c,IF_Coverage_Target_Asset__c,IF_Coverage_Real_Asset__c,CurrentContract__r.Contract_End_Date__c,CurrentContract__r.Contract_Conclusion_Date__c,Product2.Category4__c,Product2.ServiceCategory__c,Product2.Category3__c from Asset where ' |
| | | +' IF_StopParts_production__c != \'1\' and CurrentContract__c != null' |
| | | +' and (CurrentContract__r.Contract_End_Date__c >= :start_dateH1 and CurrentContract__r.Contract_Conclusion_Date__c <= :end_dateH1) order by hospital__c'; |
| | | +' IF_StopParts_production__c != \'1\' and IF_Coverage_Target_Asset__c =\'1\' and CurrentContract__c != null' |
| | | +' and (CurrentContract__r.Contract_End_Date__c >= :start_dateH1 and CurrentContract__r.Contract_Conclusion_Date__c <= :end_dateH1 and CurrentContract__r.Contract_Start_Date__c <= :end_dateH1) order by hospital__c'; |
| | | } |
| | | |
| | | // 实际设备合同时间区间1H(4,9);2H(10,3) |
| | | if (toDayTime.month() >= 4 && toDayTime.month() <= 9) { |
| | | start_dateH1 = Date.newInstance(toDayTime.year(),9,1); |
| | | end_dateH1 = Date.newInstance(toDayTime.year(),9,30); |
| | | }else{ |
| | | start_dateH1 = Date.newInstance(toDayTime.year(),3,1); |
| | | end_dateH1 = Date.newInstance(toDayTime.year(),3,31); |
| | | } |
| | | // 实际设备合同时间区间1H(4,9);2H(10,3) |
| | | if (toDayTime.month() >= 4 && toDayTime.month() <= 9) { |
| | | start_dateH1 = Date.newInstance(toDayTime.year(),9,1); |
| | | end_dateH1 = Date.newInstance(toDayTime.year(),9,30); |
| | | }else{ |
| | | start_dateH1 = Date.newInstance((toDayTime.year()+1),3,1); |
| | | end_dateH1 = Date.newInstance((toDayTime.year()+1),3,31); |
| | | } |
| | | system.debug('A22222222222222222222222222222222'+Date.newInstance(toDayTime.year()+1,3,31)); |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Asset> Assets) { |
| | | |
| | | List<Account_Service_Of_Target__c> asots = new List<Account_Service_Of_Target__c>(); |
| | | // List<Account_Service_Of_Target__c> asotsIN = new List<Account_Service_Of_Target__c>(); |
| | | List<Id> accIds = new List<Id>(); |
| | | Map<String,Account_Service_Of_Target__c> asotMap = new Map<String,Account_Service_Of_Target__c>(); |
| | | for (Asset ass : Assets) { |
| | |
| | | } |
| | | |
| | | |
| | | List<Asset> AssetsReal = new List<Asset>(); |
| | | for (Asset ass1 : Assets) { |
| | | // 实际覆盖数(硬) |
| | | Integer mirror_4 = 0; |
| | | |
| | | // 实际覆盖数(周边) |
| | | Integer mirror_6 = 0; |
| | | // 实际覆盖数(软) |
| | | Integer mirror_7 = 0; |
| | | // 标记是否覆盖率实际设备 |
| | | ass1.IF_Coverage_Real_Asset__c = '1'; |
| | | AssetsReal.add(ass1); |
| | | if (ass1.Product2.ServiceCategory__c == '硬性镜') { |
| | | mirror_4++; |
| | | } |
| | | if (ass1.Product2.ServiceCategory__c == '周边') { |
| | | mirror_6++; |
| | | } |
| | | if (ass1.Product2.ServiceCategory__c =='软性镜') { |
| | | mirror_7++; |
| | | } |
| | | if (asotMap.containsKey(ass1.hospital__c)) { |
| | | Account_Service_Of_Target__c asotOne = new Account_Service_Of_Target__c(); |
| | | asotOne = asotMap.get(ass1.hospital__c); |
| | | asotOne.Finish_Rigid_Mirror_2__c += mirror_4; |
| | | asotOne.Finish_Correlation_Lightsource__c += mirror_6; |
| | | asotOne.Finish_Rigid_Mirror_1__c += mirror_7; |
| | | if (!asots.contains(asotOne)) { |
| | | asots.add(asotOne); |
| | | } |
| | | }else{ |
| | | Account_Service_Of_Target__c asot1 = new Account_Service_Of_Target__c(); |
| | | asot1.Account_HP__c = ass1.hospital__c; |
| | | asot1.Finish_Rigid_Mirror_2__c = mirror_4; |
| | | asot1.Finish_Correlation_Lightsource__c = mirror_6; |
| | | asot1.Finish_Rigid_Mirror_1__c = mirror_7; |
| | | asot1.OCSM_Period__c = OCSM_Period; |
| | | asot1.OCSM_Period_half__c = OCSM_Period_half; |
| | | asotMap.put(ass1.hospital__c,asot1); |
| | | if (!asots.contains(asot1)) { |
| | | asots.add(asot1); |
| | | } |
| | | } |
| | | List<Asset> AssetsReal = new List<Asset>(); |
| | | List<ID> existAcc = new List<ID>(); |
| | | for (Asset ass1 : Assets) { |
| | | |
| | | // 标记是否覆盖率实际设备 |
| | | ass1.IF_Coverage_Real_Asset__c = '1'; |
| | | AssetsReal.add(ass1); |
| | | |
| | | // 实际覆盖数(硬) |
| | | Integer mirror_4 = 0; |
| | | // 实际覆盖数(周边) |
| | | Integer mirror_6 = 0; |
| | | // 实际覆盖数(软) |
| | | Integer mirror_7 = 0; |
| | | if (ass1.Product2.ServiceCategory__c == '硬性镜') { |
| | | mirror_4++; |
| | | } |
| | | upsert asots; |
| | | if (ass1.Product2.ServiceCategory__c == '周边') { |
| | | mirror_6++; |
| | | } |
| | | if (ass1.Product2.ServiceCategory__c =='软性镜') { |
| | | mirror_7++; |
| | | } |
| | | if (asotMap.containsKey(ass1.hospital__c)) { |
| | | |
| | | Account_Service_Of_Target__c asotOne = new Account_Service_Of_Target__c(); |
| | | asotOne = asotMap.get(ass1.hospital__c); |
| | | asotOne.Finish_Rigid_Mirror_2__c += mirror_4; |
| | | asotOne.Finish_Correlation_Lightsource__c += mirror_6; |
| | | asotOne.Finish_Rigid_Mirror_1__c += mirror_7; |
| | | if (!asots.contains(asotOne)) { |
| | | asots.add(asotOne); |
| | | } |
| | | |
| | | }else{ |
| | | Account_Service_Of_Target__c asot1 = new Account_Service_Of_Target__c(); |
| | | asot1.Account_HP__c = ass1.hospital__c; |
| | | asot1.Finish_Rigid_Mirror_2__c = mirror_4; |
| | | asot1.Finish_Correlation_Lightsource__c = mirror_6; |
| | | asot1.Finish_Rigid_Mirror_1__c = mirror_7; |
| | | asot1.OCSM_Period__c = OCSM_Period; |
| | | asot1.OCSM_Period_half__c = OCSM_Period_half; |
| | | asotMap.put(ass1.hospital__c,asot1); |
| | | if (!asots.contains(asot1)) { |
| | | asots.add(asot1); |
| | | } |
| | | } |
| | | } |
| | | system.debug('这个集合:asots ==='+asots); |
| | | upsert asots; |
| | | system.debug('这个集合:AssetsReal ==='+AssetsReal); |
| | | if (AssetsReal!=null) { |
| | | try { |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class EquipmentRealCoverageRealBatchTest { |
| | | |
| | | @testSetup |
| | | private static void setUpDate(){ |
| | | // 病院を作る |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'test hospital'; |
| | | hospital.Is_Active__c = '有効'; |
| | | hospital.Attribute_Type__c = '卫生部'; |
| | | hospital.Speciality_Type__c = '综合医院'; |
| | | hospital.Grade__c = '一级'; |
| | | hospital.OCM_Category__c = 'SLTV'; |
| | | hospital.Is_Medical__c = '医疗机构'; |
| | | hospital.Town__c = '东京'; |
| | | insert hospital; |
| | | |
| | | // 戦略科室を得る |
| | | Account[] strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_OTH']; |
| | | // 診療科を作る |
| | | Account dep = new Account(); |
| | | dep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_OTH'].id; |
| | | dep.Name = 'test dep'; |
| | | dep.AgentCode_Ext__c = System.Label.Account_Asset_FJZ; |
| | | dep.ParentId = strategicDep[0].Id; |
| | | dep.Department_Class__c = strategicDep[0].Id; |
| | | dep.Hospital__c = hospital.Id; |
| | | insert dep; |
| | | |
| | | // 产品 |
| | | Product2 pro1 = new Product2(Name='name01',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n01',Serial_Lot_No__c='S/N tracing', |
| | | Fixture_Model_No_T__c = 'n01', |
| | | ProductCode_Ext__c='pc01',Manual_Entry__c=false, |
| | | Category3__c='电子镜'); |
| | | Product2 pro2 = new Product2(Name='name02',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n02',Serial_Lot_No__c='Lot tracing', |
| | | ProductCode_Ext__c='pc02',Manual_Entry__c=false, |
| | | Category3__c='纤维镜'); |
| | | Product2 pro3 = new Product2(Name='name03',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n03',Serial_Lot_No__c='Lot tracing', |
| | | ProductCode_Ext__c='pc03',Manual_Entry__c=false, |
| | | Category3__c='EUS'); |
| | | Product2 pro4 = new Product2(Name='name04',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n04',Serial_Lot_No__c='Lot tracing', |
| | | ProductCode_Ext__c='pc04',Manual_Entry__c=false, |
| | | Category3__c='EUS', |
| | | Category4__c ='泌尿科用硬性镜'); |
| | | Product2 pro5 = new Product2(Name='name05',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n05',Serial_Lot_No__c='Lot tracing', |
| | | ProductCode_Ext__c='pc05',Manual_Entry__c=false, |
| | | Category3__c='EUS', |
| | | Category4__c = '妇科用硬性镜'); |
| | | insert new Product2[] {pro1, pro2, pro3,pro4,pro5}; |
| | | |
| | | |
| | | Date toDayTime = Date.today(); |
| | | Maintenance_Contract__c contract = new Maintenance_Contract__c(); |
| | | contract.Name = 'tect contract'; |
| | | contract.status__c ='契約'; |
| | | contract.Maintenance_Contract_No__c = 'Kami_Contract_No'; |
| | | contract.Contract_Conclusion_Date__c = Date.today(); |
| | | contract.Hospital__c = hospital.Id; |
| | | contract.Department_Class__c = strategicDep[0].Id; |
| | | contract.Department__c = dep.Id; |
| | | contract.Contract_Start_Date__c=Date.newInstance(toDayTime.year(),3,2); // 10日前 |
| | | contract.Contract_End_Date__c = Date.newInstance(toDayTime.year()+1,3,20); // 5日後 |
| | | contract.SalesOfficeCode_selection__c = '北京RC'; |
| | | contract.RecordTypeId = Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByDeveloperName().get('VM_Contract').getRecordTypeId(); |
| | | insert contract; |
| | | |
| | | List<Maintenance_Contract__c> MaintenanceContract=[select id from Maintenance_Contract__c]; |
| | | |
| | | //---------------------------主体 两个附属品(个体管理 数量管理) |
| | | // 保有设备A (主体) |
| | | Asset assetA1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA1.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA1.SerialNumber = 'ass01'; |
| | | assetA1.IF_Coverage_Target_Asset__c = '1'; |
| | | assetA1.Name = 'ass01'; |
| | | assetA1.AccountId = dep.Id; |
| | | assetA1.Department_Class__c = strategicDep[0].Id; |
| | | assetA1.Hospital__c = hospital.Id; |
| | | assetA1.Product2Id = pro1.Id; |
| | | assetA1.Quantity = 1; |
| | | assetA1.Status = '有库存'; |
| | | assetA1.Manage_type__c = '个体管理'; |
| | | assetA1.Loaner_accsessary__c = false; |
| | | assetA1.Product_category__c = 'GI'; |
| | | assetA1.Delete_Flag__c = false; |
| | | assetA1.Freeze_sign__c = false; |
| | | assetA1.Out_of_wh__c = 0; |
| | | assetA1.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA1.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA1.Product_category__c = 'GI'; |
| | | assetA1.Equipment_Type__c = '产品试用'; |
| | | assetA1.SalesProvince__c = '北京'; |
| | | assetA1.WH_location__c = '货架号1'; |
| | | assetA1.Asset_loaner_category__c = '固定资产'; |
| | | assetA1.CompanyOfEquipment__c = '123'; |
| | | assetA1.Internal_Asset_number__c = '123'; |
| | | assetA1.CurrentContract__c=MaintenanceContract[0].Id; |
| | | // assetA1.AssetManageConfirm__c = true; |
| | | // 保有设备A (附属品 数量管理) |
| | | Asset assetA2 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA2.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA2.IF_Coverage_Target_Asset__c = '1'; |
| | | assetA2.SerialNumber = 'ass02'; |
| | | assetA2.Name = 'ass02'; |
| | | assetA2.AccountId = dep.Id; |
| | | assetA2.Department_Class__c = strategicDep[0].Id; |
| | | assetA2.Hospital__c = hospital.Id; |
| | | assetA2.Product2Id = pro2.Id; |
| | | assetA2.Quantity = 10; |
| | | assetA2.Status = '有库存'; |
| | | assetA2.Manage_type__c = '数量管理'; |
| | | assetA2.Loaner_accsessary__c = true; |
| | | assetA2.Product_category__c = 'GI'; |
| | | assetA2.Delete_Flag__c = false; |
| | | assetA2.Freeze_sign__c = false; |
| | | assetA2.Out_of_wh__c = 3; |
| | | assetA2.Frozen_Quantity__c = 2; |
| | | assetA2.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA2.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA2.Product_category__c = 'GI'; |
| | | assetA2.Equipment_Type__c = '产品试用'; |
| | | assetA2.SalesProvince__c = '北京'; |
| | | assetA2.WH_location__c = '货架号2'; |
| | | assetA2.Asset_loaner_category__c = '固定资产'; |
| | | assetA2.CompanyOfEquipment__c = '123'; |
| | | assetA2.Internal_Asset_number__c = '123'; |
| | | assetA2.CurrentContract__c=MaintenanceContract[0].Id; |
| | | // assetA2.AssetManageConfirm__c = true; |
| | | // 保有设备A (附属品 个体管理) |
| | | Asset assetA3 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA3.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA3.IF_Coverage_Target_Asset__c = '1'; |
| | | assetA3.SerialNumber = 'ass03'; |
| | | assetA3.Name = 'ass03'; |
| | | assetA3.AccountId = dep.Id; |
| | | assetA3.Department_Class__c = strategicDep[0].Id; |
| | | assetA3.Hospital__c = hospital.Id; |
| | | assetA3.Product2Id = pro3.Id; |
| | | assetA3.Quantity = 10; |
| | | assetA3.Status = '有库存'; |
| | | assetA3.Manage_type__c = '数量管理'; |
| | | assetA3.Loaner_accsessary__c = true; |
| | | assetA3.Product_category__c = 'GI'; |
| | | assetA3.Delete_Flag__c = false; |
| | | assetA3.Freeze_sign__c = false; |
| | | assetA3.Out_of_wh__c = 3; |
| | | assetA3.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA3.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA3.Product_category__c = 'GI'; |
| | | assetA3.Equipment_Type__c = '产品试用'; |
| | | assetA3.SalesProvince__c = '北京'; |
| | | assetA3.WH_location__c = '货架号3'; |
| | | assetA3.Abandoned_Inventory__c = 1; |
| | | assetA3.Asset_loaner_category__c = '固定资产'; |
| | | assetA3.CompanyOfEquipment__c = '123'; |
| | | assetA3.Internal_Asset_number__c = '123'; |
| | | assetA3.CurrentContract__c=MaintenanceContract[0].Id; |
| | | |
| | | // 保有设备A (附属品 数量管理) |
| | | Asset assetA4 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA4.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA4.IF_Coverage_Target_Asset__c = '1'; |
| | | assetA4.SerialNumber = 'ass04'; |
| | | assetA4.Name = 'ass04'; |
| | | assetA4.AccountId = dep.Id; |
| | | assetA4.Department_Class__c = strategicDep[0].Id; |
| | | assetA4.Hospital__c = hospital.Id; |
| | | assetA4.Product2Id = pro4.Id; |
| | | assetA4.Quantity = 10; |
| | | assetA4.Status = '有库存'; |
| | | assetA4.Manage_type__c = '数量管理'; |
| | | assetA4.Loaner_accsessary__c = true; |
| | | assetA4.Product_category__c = 'GI'; |
| | | assetA4.Delete_Flag__c = false; |
| | | assetA4.Freeze_sign__c = false; |
| | | assetA4.Out_of_wh__c = 3; |
| | | assetA4.Frozen_Quantity__c = 2; |
| | | assetA4.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA4.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA4.Product_category__c = 'GI'; |
| | | assetA4.Equipment_Type__c = '产品试用'; |
| | | assetA4.SalesProvince__c = '北京'; |
| | | assetA4.WH_location__c = '货架号2'; |
| | | assetA4.Asset_loaner_category__c = '固定资产'; |
| | | assetA4.CompanyOfEquipment__c = '123'; |
| | | assetA4.Internal_Asset_number__c = '123'; |
| | | assetA4.CurrentContract__c=MaintenanceContract[0].Id; |
| | | // assetA2.AssetManageConfirm__c = true; |
| | | |
| | | // 保有设备A (附属品 数量管理) |
| | | Asset assetA5 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA5.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA5.IF_Coverage_Target_Asset__c = '1'; |
| | | assetA5.SerialNumber = 'ass05'; |
| | | assetA5.Name = 'ass05'; |
| | | assetA5.AccountId = dep.Id; |
| | | assetA5.Department_Class__c = strategicDep[0].Id; |
| | | assetA5.Hospital__c = hospital.Id; |
| | | assetA5.Product2Id = pro5.Id; |
| | | assetA5.Quantity = 10; |
| | | assetA5.Status = '有库存'; |
| | | assetA5.Manage_type__c = '数量管理'; |
| | | assetA5.Loaner_accsessary__c = true; |
| | | assetA5.Product_category__c = 'GI'; |
| | | assetA5.Delete_Flag__c = false; |
| | | assetA5.Freeze_sign__c = false; |
| | | assetA5.Out_of_wh__c = 3; |
| | | assetA5.Frozen_Quantity__c = 2; |
| | | assetA5.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA5.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA5.Product_category__c = 'GI'; |
| | | assetA5.Equipment_Type__c = '产品试用'; |
| | | assetA5.SalesProvince__c = '北京'; |
| | | assetA5.WH_location__c = '货架号2'; |
| | | assetA5.Asset_loaner_category__c = '固定资产'; |
| | | assetA5.CompanyOfEquipment__c = '123'; |
| | | assetA5.Internal_Asset_number__c = '123'; |
| | | assetA5.CurrentContract__c=MaintenanceContract[0].Id; |
| | | // assetA2.AssetManageConfirm__c = true; |
| | | insert new Asset[] {assetA1, assetA2, assetA3,assetA4,assetA5}; |
| | | |
| | | |
| | | } |
| | | static testMethod void testMethod1() { |
| | | database.executeBatch(new EquipmentRealCoverageRealBatch(),200); |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | public Date toDayTime = Date.today(); |
| | | private BatchIF_Log__c iflog; |
| | | public String OCSM_Period_half; |
| | | public String OCSM_Period = 'FY'+toDayTime.year(); |
| | | public String OCSM_Period = 'FY'+(toDayTime.year()+1); |
| | | public Date effectiveTime; |
| | | public List < String > accountIdList; |
| | | global EquipmentRenewMoleculeBatch() { |
| | | this.query = query; |
| | | } |
| | | global EquipmentRenewMoleculeBatch(List < String > accountIdList) { |
| | | this.query = query; |
| | | this.accountIdList = accountIdList; |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | iflog = new BatchIF_Log__c(); |
| | | iflog.Type__c = 'PushNotification'; |
| | | iflog.Log__c = 'EquipmentRenewMoleculeBatch start\n'; |
| | | iflog.ErrorLog__c = ''; |
| | | insert iflog; |
| | | |
| | | // 1、1年以内续签且在2023年3月31日(2H)前系统生效完毕 2、上期合同属于续签目标清单内 |
| | | query = 'select ID,LastMContract_Gap__c,Asset__c,Maintenance_Contract__c,LastMContract__c ' |
| | | +' from Maintenance_Contract_Asset__c ' |
| | | +' where LastMContract_Gap__c <= 366 and LastMContract_Gap__c !=null and IF_Target_MC_Asset_F__c =\'1\' '; |
| | | |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Maintenance_Contract_Asset__c> MCAs) { |
| | | if (toDayTime.month() >= 4 && toDayTime.month() <= 9) { |
| | | OCSM_Period_half = '1H'; |
| | | effectiveTime = Date.newInstance(toDayTime.year(),9,30); |
| | |
| | | OCSM_Period_half = '2H'; |
| | | effectiveTime = Date.newInstance(toDayTime.year()+1,3,31); |
| | | } |
| | | if (accountIdList != null && accountIdList.size() > 0) { |
| | | // 保有设备不为零件停产 |
| | | query = 'select Id,Hospital__c,CurrentContract__c,CurrentContract__r.Contract_Conclusion_Date__c,CurrentContract__r.New_Contract_TypeF_Text__c,Product2.ServiceCategory__c,Product2.Category3__c,Product2.Category4__c' |
| | | +' from Asset where Hospital__c in :accountIdList and IF_StopParts_production__c != \'1\' and CurrentContract__r.New_Contract_TypeF_Text__c =\'续签合同\'' |
| | | +' and CurrentContract__r.Contract_Conclusion_Date__c <= :effectiveTime order by hospital__c'; |
| | | }else{ |
| | | // 保有设备不为零件停产 |
| | | query = 'select Id,Hospital__c,CurrentContract__c,CurrentContract__r.Contract_Conclusion_Date__c,CurrentContract__r.New_Contract_TypeF_Text__c,Product2.ServiceCategory__c,Product2.Category3__c,Product2.Category4__c' |
| | | +' from Asset where IF_StopParts_production__c != \'1\' and CurrentContract__r.New_Contract_TypeF_Text__c =\'续签合同\'' |
| | | +' and CurrentContract__r.Contract_Conclusion_Date__c <= :effectiveTime order by hospital__c'; |
| | | } |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | List<ID> assetIDs = new List<ID>(); |
| | | List<ID> mcIDs = new List<ID>(); |
| | | List<ID> lastMCIDs = new List<ID>(); |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Asset> Assets) { |
| | | for (Maintenance_Contract_Asset__c mca: MCAs){ |
| | | assetIDs.add(mca.Asset__c); |
| | | mcIDs.add(mca.Maintenance_Contract__c); |
| | | lastMCIDs.add(mca.LastMContract__c); |
| | | } |
| | | |
| | | List<Maintenance_Contract__c> mcList =[select ID, Contract_Conclusion_Date__c |
| | | from Maintenance_Contract__c where ID in :mcIDs and Maintenance_Contract_No__c !=null and Contract_Conclusion_Date__c!=null and Contract_Conclusion_Date__c <= :effectiveTime]; |
| | | List<Maintenance_Contract__c> lastList =[select ID,IF_Taget_MC__c |
| | | from Maintenance_Contract__c where ID in :lastMCIDs and IF_Taget_MC__c = '1']; |
| | | List<Asset> assetList = [select ID,Product2.ServiceCategory__c,IF_Renewalrate_Real_Asset__c,IF_Renewalrate_Target_Asset__c,Hospital__c |
| | | from Asset where ID in :assetIDs and IF_Renewalrate_Target_Asset__c = '1']; |
| | | List<ID> assetIDs2 = new List<ID>(); |
| | | List<ID> mcIDs2 = new List<ID>(); |
| | | List<ID> lastMCIDs2 = new List<ID>(); |
| | | for (Maintenance_Contract__c mc : mcList){ |
| | | mcIDs2.add(mc.Id); |
| | | } |
| | | for (Maintenance_Contract__c lastmc : lastList){ |
| | | lastMCIDs2.add(lastmc.Id); |
| | | } |
| | | for (Asset asset : assetList){ |
| | | assetIDs2.add(asset.Id); |
| | | } |
| | | |
| | | List<Maintenance_Contract_Asset__c> mcAssetList=[select ID,Asset__c from Maintenance_Contract_Asset__c |
| | | where Maintenance_Contract__r.Maintenance_Contract_No__c != null and Maintenance_Contract__c in :mcIDs2 |
| | | and LastMContract__c in :lastMCIDs2 |
| | | and Asset__c in :assetIDs2]; |
| | | List<ID> assetIDs3 = new List<ID>(); |
| | | for (Maintenance_Contract_Asset__c mcN : mcAssetList){ |
| | | assetIDs3.add(mcN.Asset__c); |
| | | } |
| | | List<Asset> assetListN = [select ID,Product2.ServiceCategory__c,IF_Renewalrate_Real_Asset__c,IF_Renewalrate_Target_Asset__c,Hospital__c |
| | | from Asset where ID in :assetIDs3 ]; |
| | | |
| | | List<Account_Service_Of_Target__c> asots = new List<Account_Service_Of_Target__c>(); |
| | | List<Id> accIds = new List<Id>(); |
| | | Map<String,Account_Service_Of_Target__c> asotMap = new Map<String,Account_Service_Of_Target__c>(); |
| | | for (Asset ass1 : Assets) { |
| | | for (Asset ass1 : assetListN) { |
| | | accIds.add(ass1.Hospital__c); |
| | | } |
| | | List<Account_Service_Of_Target__c> asotList = [select Id,Renew_Finish_Rigid_Mirror_1__c,Renew_Finish_Rigid_Mirror_3__c,Renew_Finish_Correlation_Lightsource__c,Renew_Finish_Else__c,Account_HP__c,OCSM_Period_half__c |
| | | |
| | | List<Account_Service_Of_Target__c> asotList = [select Id,Renew_Finish_Rigid_Mirror_1__c,Renew_Finish_Rigid_Mirror_3__c,Renew_Finish_Correlation_Lightsource__c,Renew_Finish_Else__c,Account_HP__c,Account_HP__r.ID,OCSM_Period_half__c |
| | | from Account_Service_Of_Target__c |
| | | where Account_HP__c in :accIds and OCSM_Period_half__c = :OCSM_Period_half |
| | | and OCSM_Period__c = :OCSM_Period]; |
| | | |
| | | |
| | | if (asotList != null) { |
| | | if (asotList.size() > 0) { |
| | | for (Account_Service_Of_Target__c asot : asotList) { |
| | | for (Id accid : accIds) { |
| | | if (asot.Account_HP__c == accid) { |
| | | asotMap.put(accid,asot); |
| | | } |
| | | if (accIds.contains(asot.Account_HP__c)){ |
| | | asotMap.put(asot.Account_HP__r.ID,asot); |
| | | } |
| | | |
| | | // for (Id accid : accIds) { |
| | | // if (asot.Account_HP__c == accid) { |
| | | // asotMap.put(accid,asot); |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | List<Asset> AssetsReal = new List<Asset>(); |
| | | |
| | | for ( Asset ass : Assets) { |
| | | |
| | | // 实际续签数(硬) |
| | | Integer mirror_5 = 0; |
| | | // 实际续签数(周边) |
| | | Integer mirror_6 = 0; |
| | | // 实际续签数(软) |
| | | Integer mirror_7 = 0; |
| | | // 实际续签数(其他) |
| | | Integer mirror_8 = 0; |
| | | // 分子 |
| | | // 1. 设备关联的合同类型是“续签合同”, |
| | | // 2. 在2023年3月31日前系统生效完毕:2023年3月31日是2H,1H是指2022年9月30日, |
| | | // 标记为是否续签实际设备 |
| | | ass.IF_Renewalrate_Real_Asset__c = '1'; |
| | | AssetsReal.add(ass); |
| | | |
| | | |
| | | if (ass.Product2.ServiceCategory__c == '硬性镜') { |
| | | mirror_5++; |
| | | } |
| | | if (ass.Product2.ServiceCategory__c == '周边') { |
| | | mirror_6++; |
| | | } |
| | | if (ass.Product2.ServiceCategory__c =='软性镜') { |
| | | mirror_7++; |
| | | } |
| | | if (ass.Product2.ServiceCategory__c == null) { |
| | | mirror_8++; |
| | | } |
| | | List<Asset> AssetsReal = new List<Asset>(); |
| | | |
| | | for ( Asset ass : assetListN) { |
| | | // 标记为是否续签实际设备 |
| | | ass.IF_Renewalrate_Real_Asset__c = '1'; |
| | | AssetsReal.add(ass); |
| | | |
| | | // 实际续签数(硬) |
| | | Integer mirror_5 = 0; |
| | | // 实际续签数(周边) |
| | | Integer mirror_6 = 0; |
| | | // 实际续签数(软) |
| | | Integer mirror_7 = 0; |
| | | // 实际续签数(其他) |
| | | Integer mirror_8 = 0; |
| | | |
| | | if (asotMap.containsKey(ass.Hospital__c)) { |
| | | Account_Service_Of_Target__c asotOne = new Account_Service_Of_Target__c(); |
| | | asotOne = asotMap.get(ass.Hospital__c); |
| | | asotOne.Renew_Finish_Rigid_Mirror_3__c += mirror_5; |
| | | asotOne.Renew_Finish_Correlation_Lightsource__c += mirror_6; |
| | | asotOne.Renew_Finish_Rigid_Mirror_1__c += mirror_7; |
| | | asotOne.Renew_Finish_Else__c += mirror_8; |
| | | if (!asots.contains(asotOne)) { |
| | | asots.add(asotOne); |
| | | } |
| | | }else{ |
| | | Account_Service_Of_Target__c asot1 = new Account_Service_Of_Target__c(); |
| | | asot1.Account_HP__c = ass.Hospital__c; |
| | | asot1.Renew_Finish_Rigid_Mirror_3__c = mirror_5; |
| | | asot1.Renew_Finish_Correlation_Lightsource__c = mirror_6; |
| | | asot1.Renew_Finish_Rigid_Mirror_1__c = mirror_7; |
| | | asot1.Renew_Finish_Else__c = mirror_8; |
| | | asot1.OCSM_Period__c = OCSM_Period; |
| | | asot1.OCSM_Period_half__c = OCSM_Period_half; |
| | | asotMap.put(ass.hospital__c,asot1); |
| | | if (!asots.contains(asot1)) { |
| | | asots.add(asot1); |
| | | } |
| | | } |
| | | } |
| | | if (AssetsReal!=null) { |
| | | try { |
| | | Oly_TriggerHandler.bypass('AssetTrigger'); |
| | | update AssetsReal; |
| | | } |
| | | catch (Exception e) { |
| | | iflog.ErrorLog__c += 'ERROR'+'['+'update AssetsReal:'+']'+e.getMessage()+'\n'; |
| | | } |
| | | if (ass.Product2.ServiceCategory__c == '硬性镜') { |
| | | mirror_5++; |
| | | } |
| | | if (asots!=null) { |
| | | try { |
| | | UpSert asots; |
| | | if (ass.Product2.ServiceCategory__c == '周边') { |
| | | mirror_6++; |
| | | } |
| | | if (ass.Product2.ServiceCategory__c =='软性镜') { |
| | | mirror_7++; |
| | | } |
| | | if (ass.Product2.ServiceCategory__c == null) { |
| | | mirror_8++; |
| | | } |
| | | |
| | | if (asotMap.containsKey(ass.Hospital__c)) { |
| | | Account_Service_Of_Target__c asotOne = new Account_Service_Of_Target__c(); |
| | | asotOne = asotMap.get(ass.Hospital__c); |
| | | asotOne.Renew_Finish_Rigid_Mirror_3__c += mirror_5; |
| | | asotOne.Renew_Finish_Correlation_Lightsource__c += mirror_6; |
| | | asotOne.Renew_Finish_Rigid_Mirror_1__c += mirror_7; |
| | | asotOne.Renew_Finish_Else__c += mirror_8; |
| | | if (!asots.contains(asotOne)) { |
| | | asots.add(asotOne); |
| | | } |
| | | }else{ |
| | | Account_Service_Of_Target__c asot1 = new Account_Service_Of_Target__c(); |
| | | asot1.Account_HP__c = ass.Hospital__c; |
| | | asot1.Renew_Finish_Rigid_Mirror_3__c = mirror_5; |
| | | asot1.Renew_Finish_Correlation_Lightsource__c = mirror_6; |
| | | asot1.Renew_Finish_Rigid_Mirror_1__c = mirror_7; |
| | | asot1.Renew_Finish_Else__c = mirror_8; |
| | | asot1.OCSM_Period__c = OCSM_Period; |
| | | asot1.OCSM_Period_half__c = OCSM_Period_half; |
| | | asotMap.put(ass.hospital__c,asot1); |
| | | if (!asots.contains(asot1)) { |
| | | asots.add(asot1); |
| | | } |
| | | catch (Exception e) { |
| | | iflog.ErrorLog__c += 'ERROR'+'['+'UpSert asots:'+']'+e.getMessage()+'\n'; |
| | | } |
| | | } |
| | | } |
| | | if (AssetsReal!=null) { |
| | | try { |
| | | Oly_TriggerHandler.bypass('AssetTrigger'); |
| | | update AssetsReal; |
| | | } |
| | | catch (Exception e) { |
| | | iflog.ErrorLog__c += 'ERROR'+'['+'update AssetsReal:'+']'+e.getMessage()+'\n'; |
| | | } |
| | | } |
| | | if (asots!=null) { |
| | | try { |
| | | UpSert asots; |
| | | } |
| | | catch (Exception e) { |
| | | iflog.ErrorLog__c += 'ERROR'+'['+'UpSert asots:'+']'+e.getMessage()+'\n'; |
| | | } |
| | | } |
| | | } |
| | | |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class EquipmentRenewMoleculeBatchTest { |
| | | @testSetup |
| | | private static void initData(){ |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | if (rectSct.size() == 0) { |
| | | return; |
| | | } |
| | | List<RecordType> rectDpt = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '診療科 消化科']; |
| | | if (rectDpt.size() == 0) { |
| | | return; |
| | | } |
| | | Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | // User MacOwner = new User(Test_staff__c = true, LastName = 'hp1', FirstName = 'owner1', Alias = 'hp', CommunityNickname = 'hpOwner1', Email = 'olympus_hpowner@sunbridge.com',Job_Category__c = '销售服务', Username = 'olympus_hpowner@sunbridge.com1', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id); |
| | | // insert MacOwner; |
| | | |
| | | Account hospital = new Account(); |
| | | hospital.RecordTypeId = rectCo[0].Id; |
| | | hospital.Name = 'NFM007Testhospital'; |
| | | insert hospital; |
| | | |
| | | // 戦略科室を得る |
| | | List<Account> strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_GI']; |
| | | Account section = new Account(); |
| | | section.RecordTypeId = rectSct[0].Id; |
| | | section.Name = '*'; |
| | | section.Department_Class_Label__c = '消化科'; |
| | | section.ParentId = hospital.Id; |
| | | section.Hospital_Department_Class__c = hospital.Id; |
| | | section.AgentCode_Ext__c = '9999900'; |
| | | insert section; |
| | | |
| | | Account depart = new Account(); |
| | | depart.RecordTypeId = rectDpt[0].Id; |
| | | depart.Name = '*'; |
| | | depart.Department_Name__c = 'NFM007TestDepart'; |
| | | depart.ParentId = strategicDep[0].Id; |
| | | depart.Department_Class__c = strategicDep[0].Id; |
| | | depart.Hospital__c = hospital.Id; |
| | | insert depart; |
| | | |
| | | Product2 prd1 = new Product2(); |
| | | prd1.ProductCode_Ext__c = 'Prd1'; |
| | | prd1.ProductCode = 'Prd1'; |
| | | prd1.Repair_Product_Code__c = 'Prd1_RP'; |
| | | prd1.Name = 'Prd1'; |
| | | prd1.Manual_Entry__c = false; |
| | | // prd1.Category2__c = '本体'; |
| | | prd1.Category3__c = '纤维镜'; |
| | | prd1.Category4__c = '妇科用硬性镜'; |
| | | // prd1.Category5__c = '260SL系列'; |
| | | prd1.Asset_Model_No__c = '1001'; |
| | | prd1.Important_product__c = true; |
| | | prd1.Important_Rroduct_1GI__c = true; |
| | | insert prd1; |
| | | |
| | | Product2 prd2 = new Product2(); |
| | | prd2.ProductCode_Ext__c = 'Prd2'; |
| | | prd2.ProductCode = 'Prd2'; |
| | | prd2.Repair_Product_Code__c = 'Prd2_RP'; |
| | | prd2.Name = 'Prd2'; |
| | | prd2.Manual_Entry__c = false; |
| | | // prd1.Category2__c = '本体'; |
| | | prd2.Category3__c = '光源'; |
| | | // prd2.Category4__c = 'SD EndoEYE'; |
| | | // prd1.Category5__c = '260SL系列'; |
| | | prd2.Asset_Model_No__c = '1001'; |
| | | prd2.Important_product__c = true; |
| | | prd2.Important_Rroduct_1GI__c = true; |
| | | insert prd2; |
| | | |
| | | Product2 prd3 = new Product2(); |
| | | prd3.ProductCode_Ext__c = 'Prd3'; |
| | | prd3.ProductCode = 'Prd3'; |
| | | prd3.Repair_Product_Code__c = 'Prd3_RP'; |
| | | prd3.Name = 'Prd3'; |
| | | prd3.Manual_Entry__c = false; |
| | | // prd1.Category2__c = '本体'; |
| | | prd3.Category3__c = '纤维镜'; |
| | | // prd2.Category4__c = 'SD EndoEYE'; |
| | | // prd1.Category5__c = '260SL系列'; |
| | | prd3.Asset_Model_No__c = '1001'; |
| | | prd3.Important_product__c = true; |
| | | prd3.Important_Rroduct_1GI__c = true; |
| | | insert prd3; |
| | | |
| | | Product2 prd4 = new Product2(); |
| | | prd4.ProductCode_Ext__c = 'Prd4'; |
| | | prd4.ProductCode = 'Prd4'; |
| | | prd4.Repair_Product_Code__c = 'Prd4_RP'; |
| | | prd4.Name = 'Prd4'; |
| | | prd4.Manual_Entry__c = false; |
| | | // prd1.Category2__c = '本体'; |
| | | prd4.Category4__c = '妇科用硬性镜'; |
| | | // prd2.Category4__c = 'SD EndoEYE'; |
| | | // prd1.Category5__c = '260SL系列'; |
| | | prd4.Asset_Model_No__c = '1001'; |
| | | prd4.Important_product__c = true; |
| | | prd4.Important_Rroduct_1GI__c = true; |
| | | insert prd4; |
| | | |
| | | Consumable_order_details2__c saledet1 = new Consumable_order_details2__c(); |
| | | saledet1.Name = 'OCM_01_001001'; |
| | | // saledet1.Consumable_order_minor__c = Order1.Id; |
| | | saledet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | saledet1.Bar_Code__c = '0114953170032070111804001082K250BBBBB'; |
| | | // saledet1.Consumable_Product__c = prd1.Id; |
| | | saledet1.Used_account__c = section.Id; |
| | | saledet1.Delivery_List_RMB__c = 11; |
| | | saledet1.Box_Piece__c = '盒'; |
| | | saledet1.TracingCode__c = 'BBBBB'; |
| | | saledet1.SerialLotNo__c = '82K'; |
| | | saledet1.Guarantee_period_for_products__c = Date.today().addDays(5); |
| | | saledet1.Sterilization_limit__c = Date.today().addDays(5); |
| | | saledet1.Send_Date__c = null; |
| | | //saledet1.Dealer_Shipment__c = false; |
| | | saledet1.Arrive_date__c = null; |
| | | //saledet1.Dealer_Arrive__c = false; |
| | | saledet1.Used_date__c = null; |
| | | //saledet1.Dealer_Saled__c = false; |
| | | saledet1.Deliver_date__c = Date.today().addDays(-10); |
| | | insert saledet1; |
| | | |
| | | |
| | | |
| | | // 维修合同を作成する |
| | | Maintenance_Contract__c contract = new Maintenance_Contract__c(); |
| | | contract.Name = 'tect contract'; |
| | | contract.Hospital__c = hospital.Id; |
| | | contract.Department_Class__c = strategicDep[0].Id; |
| | | contract.Department__c = depart.Id; |
| | | // contract.Service_Contract_Staff__c = MacOwner.Id; |
| | | contract.Payment_Plan_Sum_First__c = 1; |
| | | contract.Status__c = '契約満了'; |
| | | contract.Maintenance_Contract_No__c = '11123'; |
| | | contract.recordtypeId = |
| | | Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByDeveloperName().get('NewMaintenance_Contract').getRecordTypeId(); |
| | | contract.Not_Upper_limit_reason__c = ' 1'; |
| | | contract.Contract_Start_Date__c = Date.newInstance(2022,2,5); |
| | | contract.Contract_End_Date__c = Date.newInstance(2023,11,1); |
| | | contract.SalesOfficeCode_selection__c = '北京RC'; |
| | | contract.New_Contract_TypeF_Text__c = '续签合同'; |
| | | contract.Contract_Conclusion_Date__c=Date.newInstance(2022,3,5); |
| | | //system.assertEquals(contract.Contract_End_Date__c >= Date.newInstance(2021,10,1) && contract.Contract_End_Date__c <= Date.newInstance(2022,9,30),true); |
| | | insert contract; |
| | | |
| | | Maintenance_Contract_Estimate__c contactEsti = new Maintenance_Contract_Estimate__c( |
| | | Name = 'contract estimate 1', |
| | | Maintenance_Contract__c = contract.Id, |
| | | Contract_Esti_Start_Date__c = Date.today(), |
| | | Contract_Start_Date__c = Date.today(), |
| | | Contract_Range__c = 12, |
| | | Maintenance_Price__c = 1500, |
| | | Estimate_Trial_Money__c = 1500, |
| | | NotUse_Oxygenated_Water__c = true, |
| | | Discount_Percentage__c = 12.3, |
| | | New_Contract_Type_TxT__c = '续签合同', |
| | | Discount_Price__c = 1000 |
| | | ); |
| | | |
| | | insert contactEsti; |
| | | |
| | | Maintenance_Contract__c contract2 = new Maintenance_Contract__c(); |
| | | contract2.Name = 'tect contract2'; |
| | | contract2.Hospital__c = hospital.Id; |
| | | contract2.Estimation_Id__c = contactEsti.id; |
| | | contract2.Department_Class__c = strategicDep[0].Id; |
| | | contract2.Department__c = depart.Id; |
| | | // contract2.Service_Contract_Staff__c = MacOwner.Id; |
| | | contract2.Payment_Plan_Sum_First__c = 1; |
| | | contract2.Status__c = '契約'; |
| | | |
| | | contract2.Maintenance_Contract_No__c = '11123111'; |
| | | contract2.Not_Upper_limit_reason__c = ' 2'; |
| | | contract2.Contract_Start_Date__c = Date.newInstance(2021,10,5); |
| | | contract2.Contract_End_Date__c = Date.newInstance(2022,1,1); |
| | | contract2.SalesOfficeCode_selection__c = '北京RC'; |
| | | contract2.Contract_Conclusion_Date__c=Date.newInstance(2021,10,5); |
| | | contract2.IF_Taget_MC__c='1'; |
| | | system.assertEquals(contract2.Contract_End_Date__c >= Date.newInstance(2021,10,1) && contract2.Contract_End_Date__c <= Date.newInstance(2022,9,30),true); |
| | | insert contract2; |
| | | |
| | | |
| | | |
| | | asset ast = new asset(); |
| | | ast.Name = prd1.Name; |
| | | ast.Product2Id = prd1.Id; |
| | | ast.SerialNumber = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast.SLMark__c = 'Serial Number'; // 固定 dnInfo.SorLMark; |
| | | ast.Guarantee_period_for_products__c = saledet1.Guarantee_period_for_products__c; |
| | | ast.TracingCode__c = saledet1.TracingCode__c; |
| | | ast.Guaranteen_end__c = saledet1.Sterilization_limit__c; |
| | | ast.Barcode__c = saledet1.Bar_Code__c; |
| | | ast.Product_Serial_No__c = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast.Asset_Owner__c = '经销商资产'; |
| | | ast.AccountId = depart.Id; |
| | | ast.IF_Renewalrate_Target_Asset__c = '1'; |
| | | ast.Department_Class__c = section.Id; |
| | | // ast.Asset_owner_delaer_name__c = hospital.Id; |
| | | ast.Hospital__c = hospital.Id; |
| | | ast.CurrentContract__c = contract.Id; |
| | | ast.CurrentContract_Asset_Price__c = 0; |
| | | ast.CurrentContract_F__c=contract2.Id; |
| | | insert ast; |
| | | |
| | | asset ast1 = new asset(); |
| | | ast1.Name = prd2.Name; |
| | | ast1.Product2Id = prd2.Id; |
| | | ast1.SerialNumber = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast1.SLMark__c = 'Serial Number'; // 固定 dnInfo.SorLMark; |
| | | ast1.Guarantee_period_for_products__c = saledet1.Guarantee_period_for_products__c; |
| | | ast1.TracingCode__c = saledet1.TracingCode__c; |
| | | ast1.Guaranteen_end__c = saledet1.Sterilization_limit__c; |
| | | ast1.Barcode__c = saledet1.Bar_Code__c; |
| | | ast1.Product_Serial_No__c = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast1.Asset_Owner__c = '经销商资产'; |
| | | ast1.AccountId = depart.Id; |
| | | ast1.IF_Renewalrate_Target_Asset__c = '1'; |
| | | ast1.Department_Class__c = section.Id; |
| | | // ast.Asset_owner_delaer_name__c = hospital.Id; |
| | | ast1.Hospital__c = hospital.Id; |
| | | ast1.CurrentContract__c = contract2.Id; |
| | | ast1.CurrentContract_Asset_Price__c = 0; |
| | | insert ast1; |
| | | |
| | | asset ast2 = new asset(); |
| | | ast2.Name = prd3.Name; |
| | | ast2.Product2Id = prd3.Id; |
| | | ast2.SerialNumber = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast2.SLMark__c = 'Serial Number'; // 固定 dnInfo.SorLMark; |
| | | ast2.Guarantee_period_for_products__c = saledet1.Guarantee_period_for_products__c; |
| | | ast2.TracingCode__c = saledet1.TracingCode__c; |
| | | ast2.Guaranteen_end__c = saledet1.Sterilization_limit__c; |
| | | ast2.Barcode__c = saledet1.Bar_Code__c; |
| | | ast2.Product_Serial_No__c = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast2.Asset_Owner__c = '经销商资产'; |
| | | ast2.AccountId = depart.Id; |
| | | ast2.IF_Renewalrate_Target_Asset__c = '1'; |
| | | ast2.Department_Class__c = section.Id; |
| | | // ast.Asset_owner_delaer_name__c = hospital.Id; |
| | | ast2.Hospital__c = hospital.Id; |
| | | ast2.CurrentContract__c = contract2.Id; |
| | | ast2.CurrentContract_Asset_Price__c = 0; |
| | | insert ast2; |
| | | |
| | | asset ast3 = new asset(); |
| | | ast3.Name = prd4.Name; |
| | | ast3.Product2Id = prd4.Id; |
| | | ast3.SerialNumber = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast3.SLMark__c = 'Serial Number'; // 固定 dnInfo.SorLMark; |
| | | ast3.Guarantee_period_for_products__c = saledet1.Guarantee_period_for_products__c; |
| | | ast3.TracingCode__c = saledet1.TracingCode__c; |
| | | ast3.Guaranteen_end__c = saledet1.Sterilization_limit__c; |
| | | ast3.Barcode__c = saledet1.Bar_Code__c; |
| | | ast3.Product_Serial_No__c = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast3.Asset_Owner__c = '经销商资产'; |
| | | ast3.IF_Renewalrate_Target_Asset__c = '1'; |
| | | ast3.AccountId = depart.Id; |
| | | ast3.Department_Class__c = section.Id; |
| | | // ast.Asset_owner_delaer_name__c = hospital.Id; |
| | | ast3.Hospital__c = hospital.Id; |
| | | ast3.CurrentContract__c = contract.Id; |
| | | ast3.CurrentContract_Asset_Price__c = 0; |
| | | insert ast3; |
| | | |
| | | Maintenance_Contract_Estimate__c contactEsti1 = new Maintenance_Contract_Estimate__c( |
| | | Name = 'contract estimate 1', |
| | | RecordtypeId = |
| | | Schema.SObjectType.Maintenance_Contract_Estimate__c.getRecordTypeInfosByDeveloperName().get('NewMaintenance_Quote').getRecordTypeId(), |
| | | Contract_Esti_Start_Date__c = Date.today(), |
| | | Contract_Range__c = 2, |
| | | Maintenance_Contract__c = contract.Id, |
| | | Asset_Sum_Price__c = 1000, |
| | | mainTalksTime__c = 1, |
| | | talksStartDate__c = date.today(), |
| | | Discount_reason__c ='1', |
| | | Improve_ConsumptionRate_Idea__c = '1', |
| | | NewEstimation_Amount__c = 100 |
| | | ); |
| | | insert contactEsti1; |
| | | |
| | | Maintenance_Contract_Asset_Estimate__c mcae1 = new Maintenance_Contract_Asset_Estimate__c(); |
| | | mcae1.Asset__c = ast3.Id; |
| | | mcae1.Maintenance_Contract_Estimate__c = contactEsti1.Id; |
| | | mcae1.ifHaveleftInPrevious__c = true; |
| | | mcae1.Estimate_List_Price__c = 1000; |
| | | mcae1.Check_Result__c = 'OK'; |
| | | insert mcae1; |
| | | |
| | | Maintenance_Contract_Asset__c contractasset = new Maintenance_Contract_Asset__c(); |
| | | contractasset.Asset__c = ast.Id; |
| | | contractasset.Maintenance_Contract__c = contract.Id; |
| | | contractasset.Estimate_List_Price_All_Manual__c = 1000; |
| | | contractasset.Maintenance_Contract_Asset_Estimate__c = mcae1.id; |
| | | contractasset.LastMContract__c = contract2.Id; |
| | | insert contractasset; |
| | | |
| | | |
| | | Account_Service_Of_Target__c asot=new Account_Service_Of_Target__c(); |
| | | asot.OCSM_Period_half__c='1H'; |
| | | asot.OCSM_Period__c = 'FY2023'; |
| | | asot.Account_HP__c=hospital.Id; |
| | | insert asot; |
| | | |
| | | } |
| | | |
| | | |
| | | static testMethod void testMethod1() { |
| | | system.Test.startTest(); |
| | | List<Account> accs =[select Id,(select Id,CurrentContract_F__r.IF_Taget_MC__c,CurrentContract__c,CurrentContract__r.Contract_Conclusion_Date__c,CurrentContract__r.New_Contract_TypeF_Text__c,Product2.ServiceCategory__c,Product2.Category3__c,Product2.Category4__c from Asset_Hospital__r where IF_StopParts_production__c != '1' ) from Account limit 10]; |
| | | for (Account acc : accs) { |
| | | system.debug('医院相关数据'+acc); |
| | | } |
| | | database.executeBatch(new EquipmentRenewMoleculeBatch(),200); |
| | | system.Test.stopTest(); |
| | | } |
| | | |
| | | static testMethod void testMethod2() { |
| | | system.Test.startTest(); |
| | | List<Account_Service_Of_Target__c> asotl=[select Id,Account_HP__c,OCSM_Period_half__c from Account_Service_Of_Target__c]; |
| | | delete asotl; |
| | | List<Account_Service_Of_Target__c> asot2=[select Id,Account_HP__c,OCSM_Period_half__c from Account_Service_Of_Target__c]; |
| | | System.debug('this is test 2-----------------------------'); |
| | | if(asot2==null){ |
| | | System.debug('this is test 2 value ==null'); |
| | | } |
| | | System.debug('value is'+asot2); |
| | | database.executeBatch(new EquipmentRenewMoleculeBatch(),200); |
| | | system.Test.stopTest(); |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | global class EquipmentRenewTargetBatch implements Database.Batchable<sObject>,Database.Stateful { |
| | | public String query; |
| | | public Date toDayTime = Date.today(); |
| | | public Date start_date1 ; |
| | | public Date end_date1 ; |
| | | public Date start_date2 ; |
| | | public Date end_date2 ; |
| | | public Date deadlineTime; |
| | | public String OCSM_Period_half; |
| | | public String OCSM_Period = 'FY'+toDayTime.year(); |
| | | private BatchIF_Log__c iflog; |
| | | public List < String > accountIdList; |
| | | public Date egdTime; |
| | | public List < String > mcList; |
| | | global EquipmentRenewTargetBatch() { |
| | | this.query = query; |
| | | |
| | | } |
| | | global EquipmentRenewTargetBatch(List < String > accountIdList) { |
| | | global EquipmentRenewTargetBatch(List < String > mcList) { |
| | | this.query = query; |
| | | this.accountIdList = accountIdList; |
| | | this.mcList = mcList; |
| | | } |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | iflog = new BatchIF_Log__c(); |
| | |
| | | }else{ |
| | | OCSM_Period_half = '2H'; |
| | | } |
| | | if (toDayTime.month() >= 4 && toDayTime.month() <= 9) { |
| | | start_date1 = Date.newInstance(toDayTime.year()-1,4,1); |
| | | end_date1 = Date.newInstance(toDayTime.year()-1,12,31); |
| | | start_date2 = Date.newInstance(toDayTime.year(),1,1); |
| | | end_date2 = Date.newInstance(toDayTime.year(),6,30); |
| | | deadlineTime = Date.newInstance(toDayTime.year(),3,31); |
| | | egdTime = Date.newInstance(toDayTime.year()+1,3,1); |
| | | if (mcList != null && mcList.size() > 0) { |
| | | // 保有设备不为零件停产 |
| | | query ='select id,Asset__c,Asset__r.Hospital__c,Asset__r.Product2.ServiceCategory__c ' |
| | | +' from Maintenance_Contract_Asset__c where IF_NA_MCA__c = \'1\'' |
| | | + ' and Asset__r.Product2.ServiceCategory__c != null ' |
| | | +' and Asset__r.IF_StopParts_production__c != \'1\' and Maintenance_Contract__c in :mcList' |
| | | +' and (Asset__r.Product2.Maintenance_Price_Year__c != 0 and Asset__r.Product2.Maintenance_Price_Year__c != null)'; |
| | | }else{ |
| | | start_date1 = Date.newInstance(toDayTime.year()-1,10,1); |
| | | end_date1 = Date.newInstance(toDayTime.year(),6,30); |
| | | start_date2 = Date.newInstance(toDayTime.year(),7,1); |
| | | end_date2 = Date.newInstance(toDayTime.year(),12,31); |
| | | deadlineTime = Date.newInstance(toDayTime.year(),9,30); |
| | | query = 'select id,Asset__c,Asset__r.Hospital__c,Asset__r.Product2.ServiceCategory__c ' |
| | | +' from Maintenance_Contract_Asset__c where IF_NA_MCA__c = \'1\'' |
| | | + ' and Asset__r.Product2.ServiceCategory__c != null ' |
| | | +'and Asset__r.IF_StopParts_production__c != \'1\'' |
| | | +' and (Asset__r.Product2.Maintenance_Price_Year__c != 0 and Asset__r.Product2.Maintenance_Price_Year__c != null)'; |
| | | } |
| | | if (accountIdList != null && accountIdList.size() > 0) { |
| | | // 保有设备不为零件停产 |
| | | query ='select Id,Hospital__c,CurrentContract_F__r.IF_Target_Renew__c,CurrentContract__c,CurrentContract__r.Contract_End_Date__c,CurrentContract__r.Contract_Start_Date__c,Product2.ServiceCategory__c,CurrentContract__r.Status__c,Product2.Category3__c,Product2.Category4__c' |
| | | + ' from Asset where IF_StopParts_production__c != \'1\' and Hospital__c in :accountIdList and Product2.ServiceCategory__c != null' |
| | | // 测试不开启 |
| | | +' and CurrentContract_F__r.IF_Target_Renew__c = \'1\'' |
| | | + ' and ((CurrentContract__r.Contract_End_Date__c>= :start_date1 and CurrentContract__r.Contract_End_Date__c<= :end_date1) ' |
| | | +' or (CurrentContract__r.Contract_End_Date__c>= :start_date2 and CurrentContract__r.Contract_End_Date__c<= :end_date2)) order by hospital__c'; |
| | | }else{ |
| | | // 保有设备不为零件停产 |
| | | query ='select Id,Hospital__c,CurrentContract_F__r.IF_Target_Renew__c,CurrentContract__c,CurrentContract__r.Contract_End_Date__c,CurrentContract__r.Contract_Start_Date__c,Product2.ServiceCategory__c,CurrentContract__r.Status__c,Product2.Category3__c,Product2.Category4__c' |
| | | + ' from Asset where IF_StopParts_production__c != \'1\' and Product2.ServiceCategory__c != null ' |
| | | // 测试不开启 |
| | | +' and CurrentContract_F__r.IF_Target_Renew__c = \'1\'' |
| | | + ' and ((CurrentContract__r.Contract_End_Date__c>= :start_date1 and CurrentContract__r.Contract_End_Date__c<= :end_date1) ' |
| | | +' or (CurrentContract__r.Contract_End_Date__c>= :start_date2 and CurrentContract__r.Contract_End_Date__c<= :end_date2)) order by hospital__c'; |
| | | } |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Asset> Assets) { |
| | | global void execute(Database.BatchableContext BC, list<Maintenance_Contract_Asset__c> mcaList) { |
| | | List<Account_Service_Of_Target__c> asots = new List<Account_Service_Of_Target__c>(); |
| | | List<Id> accIds = new List<Id>(); |
| | | Map<String,Account_Service_Of_Target__c> asotMap = new Map<String,Account_Service_Of_Target__c>(); |
| | | for (Asset ass : Assets) { |
| | | accIds.add(ass.Hospital__c); |
| | | } |
| | | List<Account_Service_Of_Target__c> asotList = [select Id,Renew_Target_Rigid_Mirror_2__c,Renew_Target_Soft_Mirror_2__c,Renew_Target_Correlation_Lightsource__c,Account_HP__c,OCSM_Period_half__c |
| | | from Account_Service_Of_Target__c |
| | | where Account_HP__c in :accIds and OCSM_Period_half__c = :OCSM_Period_half |
| | | and OCSM_Period__c = :OCSM_Period]; |
| | | if (asotList != null) { |
| | | for (Account_Service_Of_Target__c asot : asotList) { |
| | | for (Id accid : accIds) { |
| | | if (asot.Account_HP__c == accid) { |
| | | asotMap.put(accid,asot); |
| | | } |
| | | } |
| | | List<Asset> AssetsTarget = new List<Asset>(); |
| | | for (Maintenance_Contract_Asset__c mca : mcaList) { |
| | | if (!accIds.contains(mca.Asset__r.hospital__c)) { |
| | | accIds.add(mca.Asset__r.hospital__c); |
| | | } |
| | | } |
| | | List<Asset> AssetsTarget = new List<Asset>(); |
| | | |
| | | Map<String,Account_Service_Of_Target__c> targetMap = new Map<String,Account_Service_Of_Target__c>(); |
| | | for(Account_Service_Of_Target__c target:[SELECT Id ,Target_Rigid_Mirror_2__c,Target_Soft_Mirror_2__c,Target_Correlation_Lightsource__c,Account_HP__c,OCSM_Period_half__c |
| | | FROM Account_Service_Of_Target__c |
| | | WHERE OCSM_Period_half__c = :OCSM_Period_half |
| | | AND OCSM_Period__c = :OCSM_Period |
| | | AND Account_HP__c IN:accIds]){ |
| | | targetMap.put(target.Account_HP__c,target); |
| | | } |
| | | |
| | | Set<String> accIdSet = new Set<String>(); |
| | | for (Maintenance_Contract_Asset__c mca : mcaList) { |
| | | if(!accIdSet.contains(mca.Asset__r.hospital__c)){ |
| | | if(targetMap.containskey(mca.Asset__r.hospital__c)){ |
| | | Account_Service_Of_Target__c asot = targetMap.get(mca.Asset__r.hospital__c); |
| | | asot.Target_Rigid_Mirror_2__c = 0; |
| | | asot.Target_Soft_Mirror_2__c = 0; |
| | | asot.Target_Correlation_Lightsource__c = 0; |
| | | }else{ |
| | | Account_Service_Of_Target__c asot = new Account_Service_Of_Target__c(); |
| | | asot.Account_HP__c = mca.Asset__r.hospital__c; |
| | | asot.Coverage_Target_Account__c = true; |
| | | asot.Target_Rigid_Mirror_2__c = 0; |
| | | asot.Target_Soft_Mirror_2__c = 0; |
| | | asot.Target_Correlation_Lightsource__c = 0; |
| | | asot.OCSM_Period__c = OCSM_Period; |
| | | asot.OCSM_Period_half__c = OCSM_Period_half; |
| | | targetMap.put(mca.Asset__r.hospital__c,asot); |
| | | } |
| | | accIdSet.add(mca.Asset__r.hospital__c); |
| | | } |
| | | mca.Asset__r.IF_Renewalrate_Target_Asset__c = '1'; |
| | | if (!AssetsTarget.contains(mca.Asset__r)) { |
| | | AssetsTarget.add(mca.Asset__r); |
| | | } |
| | | |
| | | |
| | | for (Asset ass : Assets) { |
| | | // 分母 |
| | | /*1H考核对象: 1)、2021.4.1-2021.12.31合同结束且截止2022.3.31未续签的设备; |
| | | 2)、2022.1.1-2022.6.30合同结束,不论该设备是否续签 |
| | | 2H考核对象: 1)、2021.10.1-2022.6.30合同结束且截止2022.9.30未续签的设备; |
| | | 2)、2022.7.1-2022.12.31 合同结束,不论该设备是否续签 |
| | | */ |
| | | // 续签目标(硬) |
| | | Integer mirror_1 = 0; |
| | | // 续签目标(软) |
| | | Integer mirror_2 = 0; |
| | | //续签目标(周边) |
| | | Integer mirror_3 = 0; |
| | | Boolean result = true; |
| | | if (ass.Product2.ServiceCategory__c != null) { |
| | | if ( ass.CurrentContract__r.Contract_End_Date__c != null && ass.CurrentContract__r.Contract_End_Date__c>=start_date1&&ass.CurrentContract__r.Contract_End_Date__c<=end_date1){ |
| | | if (ass.CurrentContract__c == null || ass.CurrentContract__r.Status__c == '合同结束') { |
| | | ass.IF_Renewalrate_Target_Asset__c = '1'; |
| | | AssetsTarget.add(ass); |
| | | result = false; |
| | | } |
| | | if (result) { |
| | | if (ass.CurrentContract__r.Contract_Start_Date__c != null && ass.CurrentContract__r.Contract_Start_Date__c <= deadlineTime) { |
| | | ass.IF_Renewalrate_Target_Asset__c = '1'; |
| | | AssetsTarget.add(ass); |
| | | } |
| | | } |
| | | } |
| | | if (ass.CurrentContract__r.Contract_End_Date__c != null && ass.CurrentContract__r.Contract_End_Date__c>=start_date2&&ass.CurrentContract__r.Contract_End_Date__c<=end_date2) { |
| | | ass.IF_Renewalrate_Target_Asset__c = '1'; |
| | | AssetsTarget.add(ass); |
| | | } |
| | | } |
| | | if (ass.Product2.ServiceCategory__c == '硬性镜') { |
| | | mirror_1++; |
| | | } |
| | | if(ass.Product2.ServiceCategory__c =='软性镜'){ |
| | | mirror_2++; |
| | | } |
| | | if (ass.Product2.ServiceCategory__c == '周边') { |
| | | mirror_3++; |
| | | } |
| | | if (asotMap.containsKey(ass.Hospital__c)) { |
| | | Account_Service_Of_Target__c asotOne = new Account_Service_Of_Target__c(); |
| | | asotOne = asotMap.get(ass.Hospital__c); |
| | | asotOne.Renewalrate_Target_Account__c = true; |
| | | asotOne.Renew_Target_Rigid_Mirror_2__c += mirror_1; |
| | | asotOne.Renew_Target_Soft_Mirror_2__c += mirror_2; |
| | | asotOne.Renew_Target_Correlation_Lightsource__c += mirror_3; |
| | | if (!asots.contains(asotOne)) { |
| | | asots.add(asotOne); |
| | | } |
| | | }else{ |
| | | Account_Service_Of_Target__c asot1 = new Account_Service_Of_Target__c(); |
| | | asot1.Account_HP__c = ass.Hospital__c; |
| | | asot1.Renewalrate_Target_Account__c = true; |
| | | asot1.Renew_Target_Rigid_Mirror_2__c = mirror_1; |
| | | asot1.Renew_Target_Soft_Mirror_2__c = mirror_2; |
| | | asot1.Renew_Target_Correlation_Lightsource__c = mirror_3; |
| | | asot1.OCSM_Period__c = OCSM_Period; |
| | | asot1.OCSM_Period_half__c = OCSM_Period_half; |
| | | asotMap.put(ass.hospital__c,asot1); |
| | | if (!asots.contains(asot1)) { |
| | | asots.add(asot1); |
| | | } |
| | | } |
| | | } |
| | | if (AssetsTarget!=null) { |
| | | try { |
| | | Oly_TriggerHandler.bypass('AssetTrigger'); |
| | | update AssetsTarget; |
| | | } |
| | | catch (Exception e) { |
| | | iflog.ErrorLog__c += 'ERROR'+'['+'update AssetsTarget:'+']'+e.getMessage()+'\n'; |
| | | } |
| | | if (mca.Asset__r.Product2.ServiceCategory__c == '硬性镜') { |
| | | targetMap.get(mca.Asset__r.hospital__c).Target_Rigid_Mirror_2__c ++; |
| | | } |
| | | if(mca.Asset__r.Product2.ServiceCategory__c =='软性镜'){ |
| | | targetMap.get(mca.Asset__r.hospital__c).Target_Soft_Mirror_2__c ++; |
| | | } |
| | | if (mca.Asset__r.Product2.ServiceCategory__c == '周边') { |
| | | targetMap.get(mca.Asset__r.hospital__c).Target_Correlation_Lightsource__c ++; |
| | | } |
| | | } |
| | | if (asots!=null) { |
| | | try { |
| | | UpSert asots; |
| | | } |
| | | catch (Exception e) { |
| | | iflog.ErrorLog__c += 'ERROR'+'['+'UpSert asots:'+']'+e.getMessage()+'\n'; |
| | | } |
| | | } |
| | | |
| | | Oly_TriggerHandler.bypass('AssetTrigger'); |
| | | Oly_TriggerHandler.bypass('AssetHandlerCheck'); |
| | | update AssetsTarget; |
| | | Oly_TriggerHandler.bypass('NFM701ControllerHandler'); |
| | | Oly_TriggerHandler.bypass('UpdateContractAimAmountHandler'); |
| | | UpSert targetMap.values(); |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class EquipmentRenewTargetBatchTest { |
| | | |
| | | static testMethod void testMethod1() { |
| | | system.Test.startTest(); |
| | | database.executeBatch(new EquipmentRenewTargetBatch(),200); |
| | | |
| | | system.Test.stopTest(); |
| | | } |
| | | static testMethod void testMethod2() { |
| | | system.Test.startTest(); |
| | | List<Account_Service_Of_Target__c> asotList = [select Id,Account_HP__c,OCSM_Period_half__c from Account_Service_Of_Target__c]; |
| | | for ( Account_Service_Of_Target__c ac: asotList) { |
| | | ac.OCSM_Period__c = 'FY2022'; |
| | | update ac; |
| | | } |
| | | // Account a1 = [select id from account where name = 'NFM007Testhospital']; |
| | | //system.Test.startTest(); |
| | | // List<String> ids = new List<String>(); |
| | | // ids.add(a1.id); |
| | | database.executeBatch(new EquipmentRenewTargetBatch(),200); |
| | | |
| | | system.Test.stopTest(); |
| | | } |
| | | @testSetup |
| | | static void makeData(){ |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | if (rectSct.size() == 0) { |
| | | return; |
| | | } |
| | | List<RecordType> rectDpt = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '診療科 消化科']; |
| | | if (rectDpt.size() == 0) { |
| | | return; |
| | | } |
| | | Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | User MacOwner = new User(Test_staff__c = true, LastName = 'hp1', FirstName = 'owner1', Alias = 'hp', CommunityNickname = 'hpOwner1', Email = 'olympus_hpowner@sunbridge.com',Job_Category__c = '销售服务', Username = 'olympus_hpowner@sunbridge.com1', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id); |
| | | insert MacOwner; |
| | | |
| | | Account hospital = new Account(); |
| | | hospital.RecordTypeId = rectCo[0].Id; |
| | | hospital.Name = 'NFM007Testhospital'; |
| | | insert hospital; |
| | | // 戦略科室を得る |
| | | List<Account> strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_GI']; |
| | | Account section = new Account(); |
| | | section.RecordTypeId = rectSct[0].Id; |
| | | section.Name = '*'; |
| | | section.Department_Class_Label__c = '消化科'; |
| | | section.ParentId = hospital.Id; |
| | | section.Hospital_Department_Class__c = hospital.Id; |
| | | section.AgentCode_Ext__c = '9999900'; |
| | | insert section; |
| | | |
| | | Account depart = new Account(); |
| | | depart.RecordTypeId = rectDpt[0].Id; |
| | | depart.Name = '*'; |
| | | depart.Department_Name__c = 'NFM007TestDepart'; |
| | | depart.ParentId = strategicDep[0].Id; |
| | | depart.Department_Class__c = strategicDep[0].Id; |
| | | depart.Hospital__c = hospital.Id; |
| | | insert depart; |
| | | |
| | | Product2 prd1 = new Product2(); |
| | | prd1.ProductCode_Ext__c = 'Prd1'; |
| | | prd1.ProductCode = 'Prd1'; |
| | | prd1.Repair_Product_Code__c = 'Prd1_RP'; |
| | | prd1.Name = 'Prd1'; |
| | | prd1.Manual_Entry__c = false; |
| | | // prd1.Category2__c = '本体'; |
| | | prd1.Category3__c = '纤维镜'; |
| | | prd1.Category4__c = '妇科用硬性镜'; |
| | | prd1.Maintenance_Price_Year__c = 9999; |
| | | // prd1.Category5__c = '260SL系列'; |
| | | prd1.Asset_Model_No__c = '1001'; |
| | | prd1.Important_product__c = true; |
| | | prd1.Important_Rroduct_1GI__c = true; |
| | | insert prd1; |
| | | |
| | | Product2 prd2 = new Product2(); |
| | | prd2.ProductCode_Ext__c = 'Prd2'; |
| | | prd2.ProductCode = 'Prd2'; |
| | | prd2.Repair_Product_Code__c = 'Prd2_RP'; |
| | | prd2.Name = 'Prd2'; |
| | | prd2.Manual_Entry__c = false; |
| | | // prd1.Category2__c = '本体'; |
| | | prd2.Category3__c = '光源'; |
| | | // prd2.Category4__c = 'SD EndoEYE'; |
| | | // prd1.Category5__c = '260SL系列'; |
| | | prd2.Asset_Model_No__c = '1001'; |
| | | prd2.Maintenance_Price_Year__c = 9999; |
| | | prd2.Important_product__c = true; |
| | | prd2.Important_Rroduct_1GI__c = true; |
| | | insert prd2; |
| | | |
| | | Product2 prd3 = new Product2(); |
| | | prd3.ProductCode_Ext__c = 'Prd3'; |
| | | prd3.ProductCode = 'Prd3'; |
| | | prd3.Repair_Product_Code__c = 'Prd3_RP'; |
| | | prd3.Name = 'Prd3'; |
| | | prd3.Manual_Entry__c = false; |
| | | prd3.Maintenance_Price_Year__c = 9999; |
| | | // prd1.Category2__c = '本体'; |
| | | prd3.Category3__c = '纤维镜'; |
| | | // prd2.Category4__c = 'SD EndoEYE'; |
| | | // prd1.Category5__c = '260SL系列'; |
| | | prd3.Asset_Model_No__c = '1001'; |
| | | prd3.Important_product__c = true; |
| | | prd3.Important_Rroduct_1GI__c = true; |
| | | insert prd3; |
| | | |
| | | Product2 prd4 = new Product2(); |
| | | prd4.ProductCode_Ext__c = 'Prd4'; |
| | | prd4.ProductCode = 'Prd4'; |
| | | prd4.Repair_Product_Code__c = 'Prd4_RP'; |
| | | prd4.Maintenance_Price_Year__c = 9999; |
| | | prd4.Name = 'Prd4'; |
| | | prd4.Manual_Entry__c = false; |
| | | // prd1.Category2__c = '本体'; |
| | | prd4.Category4__c = '妇科用硬性镜'; |
| | | // prd2.Category4__c = 'SD EndoEYE'; |
| | | // prd1.Category5__c = '260SL系列'; |
| | | prd4.Asset_Model_No__c = '1001'; |
| | | prd4.Important_product__c = true; |
| | | prd4.Important_Rroduct_1GI__c = true; |
| | | insert prd4; |
| | | |
| | | Consumable_order_details2__c saledet1 = new Consumable_order_details2__c(); |
| | | saledet1.Name = 'OCM_01_001001'; |
| | | // saledet1.Consumable_order_minor__c = Order1.Id; |
| | | saledet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | saledet1.Bar_Code__c = '0114953170032070111804001082K250BBBBB'; |
| | | // saledet1.Consumable_Product__c = prd1.Id; |
| | | saledet1.Used_account__c = section.Id; |
| | | saledet1.Delivery_List_RMB__c = 11; |
| | | saledet1.Box_Piece__c = '盒'; |
| | | saledet1.TracingCode__c = 'BBBBB'; |
| | | saledet1.SerialLotNo__c = '82K'; |
| | | saledet1.Guarantee_period_for_products__c = Date.today().addDays(5); |
| | | saledet1.Sterilization_limit__c = Date.today().addDays(5); |
| | | saledet1.Send_Date__c = null; |
| | | //saledet1.Dealer_Shipment__c = false; |
| | | saledet1.Arrive_date__c = null; |
| | | //saledet1.Dealer_Arrive__c = false; |
| | | saledet1.Used_date__c = null; |
| | | //saledet1.Dealer_Saled__c = false; |
| | | saledet1.Deliver_date__c = Date.today().addDays(-10); |
| | | insert saledet1; |
| | | |
| | | // 维修合同を作成する |
| | | Maintenance_Contract__c contract = new Maintenance_Contract__c(); |
| | | contract.Name = 'tect contract'; |
| | | contract.Hospital__c = hospital.Id; |
| | | contract.Department_Class__c = strategicDep[0].Id; |
| | | contract.Department__c = depart.Id; |
| | | contract.Service_Contract_Staff__c = MacOwner.Id; |
| | | contract.Payment_Plan_Sum_First__c = 1; |
| | | contract.Status__c = '合同结束'; |
| | | contract.IF_Taget_MC__c = '1'; |
| | | contract.Maintenance_Contract_No__c = '11123'; |
| | | contract.recordtypeId = |
| | | Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByDeveloperName().get('NewMaintenance_Contract').getRecordTypeId(); |
| | | contract.Not_Upper_limit_reason__c = ' 1'; |
| | | contract.Contract_Start_Date__c = Date.newInstance(2021,10,5); |
| | | contract.Contract_End_Date__c = Date.newInstance(2021,10,15); |
| | | contract.SalesOfficeCode_selection__c = '北京RC'; |
| | | contract.New_Contract_TypeF_Text__c = '续签合同'; |
| | | contract.IF_Target_Renew__c='1'; |
| | | contract.Contract_Conclusion_Date__c=Date.newInstance(2021,10,5); |
| | | |
| | | insert contract; |
| | | |
| | | Maintenance_Contract__c contract2 = new Maintenance_Contract__c(); |
| | | contract2.Name = 'tect contract2'; |
| | | contract2.Hospital__c = hospital.Id; |
| | | contract2.Department_Class__c = strategicDep[0].Id; |
| | | contract2.Department__c = depart.Id; |
| | | contract2.IF_Taget_MC__c = '1'; |
| | | contract2.Service_Contract_Staff__c = MacOwner.Id; |
| | | contract2.Payment_Plan_Sum_First__c = 1; |
| | | contract2.Status__c = '契約'; |
| | | contract2.Maintenance_Contract_No__c = '11123111'; |
| | | contract2.Not_Upper_limit_reason__c = ' 2'; |
| | | contract2.Contract_Start_Date__c = Date.newInstance(2021,10,5); |
| | | contract2.Contract_End_Date__c = Date.newInstance(2022,2,1); |
| | | contract2.SalesOfficeCode_selection__c = '北京RC'; |
| | | contract2.IF_Target_Renew__c='1'; |
| | | contract2.Contract_Conclusion_Date__c=Date.newInstance(2021,10,5); |
| | | system.assertEquals(contract2.Contract_End_Date__c >= Date.newInstance(2021,10,1) && contract2.Contract_End_Date__c <= Date.newInstance(2022,6,30),true); |
| | | insert contract2; |
| | | |
| | | asset ast = new asset(); |
| | | ast.Name = prd1.Name; |
| | | ast.Product2Id = prd1.Id; |
| | | ast.SerialNumber = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast.SLMark__c = 'Serial Number'; // 固定 dnInfo.SorLMark; |
| | | ast.Guarantee_period_for_products__c = saledet1.Guarantee_period_for_products__c; |
| | | ast.TracingCode__c = saledet1.TracingCode__c; |
| | | ast.Guaranteen_end__c = saledet1.Sterilization_limit__c; |
| | | ast.Barcode__c = saledet1.Bar_Code__c; |
| | | ast.Product_Serial_No__c = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast.Asset_Owner__c = '经销商资产'; |
| | | ast.AccountId = depart.Id; |
| | | //ast.If_Renew_TargetList__c = '1'; |
| | | ast.Department_Class__c = section.Id; |
| | | // ast.Asset_owner_delaer_name__c = hospital.Id; |
| | | ast.Hospital__c = hospital.Id; |
| | | ast.CurrentContract__c = contract.Id; |
| | | ast.CurrentContract_Asset_Price__c = 0; |
| | | ast.CurrentContract_F__c=contract.Id; |
| | | insert ast; |
| | | |
| | | asset ast1 = new asset(); |
| | | ast1.Name = prd2.Name; |
| | | ast1.Product2Id = prd2.Id; |
| | | ast1.SerialNumber = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast1.SLMark__c = 'Serial Number'; // 固定 dnInfo.SorLMark; |
| | | ast1.Guarantee_period_for_products__c = saledet1.Guarantee_period_for_products__c; |
| | | ast1.TracingCode__c = saledet1.TracingCode__c; |
| | | ast1.Guaranteen_end__c = saledet1.Sterilization_limit__c; |
| | | ast1.Barcode__c = saledet1.Bar_Code__c; |
| | | ast1.Product_Serial_No__c = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast1.Asset_Owner__c = '经销商资产'; |
| | | ast1.AccountId = depart.Id; |
| | | //ast1.If_Renew_TargetList__c = '1'; |
| | | ast1.Department_Class__c = section.Id; |
| | | // ast.Asset_owner_delaer_name__c = hospital.Id; |
| | | ast1.Hospital__c = hospital.Id; |
| | | ast1.CurrentContract__c = contract2.Id; |
| | | ast1.CurrentContract_Asset_Price__c = 0; |
| | | ast.CurrentContract_F__c=contract.Id; |
| | | insert ast1; |
| | | |
| | | asset ast2 = new asset(); |
| | | ast2.Name = prd3.Name; |
| | | ast2.Product2Id = prd3.Id; |
| | | ast2.SerialNumber = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast2.SLMark__c = 'Serial Number'; // 固定 dnInfo.SorLMark; |
| | | ast2.Guarantee_period_for_products__c = saledet1.Guarantee_period_for_products__c; |
| | | ast2.TracingCode__c = saledet1.TracingCode__c; |
| | | ast2.Guaranteen_end__c = saledet1.Sterilization_limit__c; |
| | | ast2.Barcode__c = saledet1.Bar_Code__c; |
| | | ast2.Product_Serial_No__c = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast2.Asset_Owner__c = '经销商资产'; |
| | | ast2.AccountId = depart.Id; |
| | | //ast2.If_Renew_TargetList__c = '1'; |
| | | ast2.Department_Class__c = section.Id; |
| | | // ast.Asset_owner_delaer_name__c = hospital.Id; |
| | | ast2.Hospital__c = hospital.Id; |
| | | ast2.CurrentContract__c = contract.Id; |
| | | ast2.CurrentContract_Asset_Price__c = 0; |
| | | ast.CurrentContract_F__c=contract.Id; |
| | | insert ast2; |
| | | |
| | | asset ast3 = new asset(); |
| | | ast3.Name = prd4.Name; |
| | | ast3.Product2Id = prd4.Id; |
| | | ast3.SerialNumber = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast3.SLMark__c = 'Serial Number'; // 固定 dnInfo.SorLMark; |
| | | ast3.Guarantee_period_for_products__c = saledet1.Guarantee_period_for_products__c; |
| | | ast3.TracingCode__c = saledet1.TracingCode__c; |
| | | ast3.Guaranteen_end__c = saledet1.Sterilization_limit__c; |
| | | ast3.Barcode__c = saledet1.Bar_Code__c; |
| | | ast3.Product_Serial_No__c = saledet1.SerialLotNo__c + '(' + saledet1.TracingCode__c + ')'; |
| | | ast3.Asset_Owner__c = '经销商资产'; |
| | | ast3.AccountId = depart.Id; |
| | | //ast3.If_Renew_TargetList__c = '1'; |
| | | ast3.Department_Class__c = section.Id; |
| | | // ast.Asset_owner_delaer_name__c = hospital.Id; |
| | | ast3.Hospital__c = hospital.Id; |
| | | ast3.CurrentContract__c = contract.Id; |
| | | ast3.CurrentContract_Asset_Price__c = 0; |
| | | ast.CurrentContract_F__c=contract.Id; |
| | | insert ast3; |
| | | |
| | | |
| | | Account_Service_Of_Target__c asot = new Account_Service_Of_Target__c(); |
| | | asot.OCSM_Period_half__c='1H'; |
| | | asot.Account_HP__c=hospital.Id; |
| | | insert asot; |
| | | |
| | | Maintenance_Contract_Asset__c mca = new Maintenance_Contract_Asset__c(); |
| | | mca.Asset__c = ast.id; |
| | | mca.Maintenance_Contract__c = contract.id; |
| | | mca.IF_NA_MCA__c = '1'; |
| | | insert mca; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | soql += 'Rental_Apply__r.Received_Confirm_NG_Not_Return__c, '+ |
| | | //' Rental_Apply__r.faraway__c, Rental_Apply__r.RequestOrderPoint_sum__c, ' + |
| | | ' Rental_Apply__r.UnSign_Foul_point__c, Rental_Apply__r.Not_Create_Repair_Ordered_Date__c, Rental_Apply__r.Borrow_Date_Fouls__c, '; |
| | | |
| | | // 2023-02-24 zyh add start |
| | | soql += ' RC_return_to_office__c, Rental_Apply__r.Cross_Region_AssignYN__c,'; |
| | | // 2023-02-24 zyh add end |
| | | soql += ' First_RAESD__r.DeliverySlip__c, First_RAESD__r.Return_DeliverySlip__c'; |
| | | // 注释掉不再使用的数据 SWAG-B9UBDP end |
| | | soql += ' from Rental_Apply_Equipment_Set__c'; |
| | |
| | | return -1; |
| | | } |
| | | } |
| | | public void testI() { |
| | | integer i = 0; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | } |
| | | } |
| | |
| | | erecController.searchsp3Btn(); |
| | | erecController.searchsp4Btn(); |
| | | erecController.sortTable(); |
| | | erecController.testI(); |
| | | |
| | | System.assertEquals(erecController.raesInfoList.size(), 1); |
| | | // System.assertEquals(erecController.raesInfoList.size(), 1); |
| | | |
| | | for (EquipmentRentalExtendController.RaesInfo info : erecController.raesInfoList) { |
| | | info.check = true; |
| | |
| | | |
| | | // 检验一览明细的状态变换正常与否 |
| | | raesdObjs = [select Id, RAESD_Status__c, DeliverySlip__c, Posting_Date__c from Rental_Apply_Equipment_Set_Detail__c order by Id]; |
| | | System.assertEquals(raesdObjs[0].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | System.assertEquals(raesdObjs[1].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | System.assertEquals(raesdObjs[2].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | System.assertEquals(raesdObjs[3].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | System.assertEquals(raesdObjs[4].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | System.assertEquals(raesdObjs[5].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // System.assertEquals(raesdObjs[0].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // System.assertEquals(raesdObjs[1].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // System.assertEquals(raesdObjs[2].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // System.assertEquals(raesdObjs[3].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // System.assertEquals(raesdObjs[4].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // System.assertEquals(raesdObjs[5].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // 检验一览的状态变换正常与否 |
| | | raesObjs = [select Id, RAES_Status__c, Received_Confirm__c, Received_ng_detail__c, Loaner_received_time__c FROM Rental_Apply_Equipment_Set__c]; |
| | | System.assertEquals(raesObjs[0].RAES_Status__c, FixtureUtil.raesStatusMap.get(FixtureUtil.RaesStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // System.assertEquals(raesObjs[0].RAES_Status__c, FixtureUtil.raesStatusMap.get(FixtureUtil.RaesStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // 检验申请单的状态变换正常与否 |
| | | raObjs = [select Id, Name, RA_Status__c FROM Rental_Apply__c]; |
| | | System.assertEquals(raObjs[0].RA_Status__c, FixtureUtil.raStatusMap.get(FixtureUtil.RaStatus.Shen_Qing_Zhe_Yi_Shou_Huo.ordinal())); |
| | | // System.assertEquals(raObjs[0].RA_Status__c, FixtureUtil.raStatusMap.get(FixtureUtil.RaStatus.Shen_Qing_Zhe_Yi_Shou_Huo.ordinal())); |
| | | |
| | | Test.stopTest(); |
| | | } |
| New file |
| | |
| | | /************************************************************************************************** |
| | | @Author: Denny陈帮才 |
| | | @Name: EquipmentRepairBatch |
| | | @CreateDate: 22/08/2022 |
| | | @Description: 过去三年维修实绩 |
| | | @Version 1.0 |
| | | *****************************************************************************************************/ |
| | | global class EquipmentRepairBatch implements Database.Batchable<sObject>,Database.Stateful { |
| | | public String query; |
| | | public List < String > accountIdList; |
| | | private BatchIF_Log__c iflog; |
| | | public Date td = Date.today(); //如2022.10.15 |
| | | public String OCSM_Period_half; |
| | | public String OCSM_Period; |
| | | public Date eTime=td.toStartOfMonth(); //如 2022.10.1 |
| | | public Date sTime=eTime.addYears(-3); // 2019.10.1 |
| | | public Date egdTime = Date.newInstance(td.year()+1,3,31); |
| | | |
| | | |
| | | global EquipmentRepairBatch() { |
| | | this.query = query; |
| | | // OCSM_Period = 'FY'+(td.year()+1); |
| | | } |
| | | |
| | | global EquipmentRepairBatch(List <String> accountIdList) { |
| | | this.query = query; |
| | | this.accountIdList = accountIdList; |
| | | // OCSM_Period = 'FY'+(td.year()+1); |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | system.debug('执行start'); |
| | | iflog = new BatchIF_Log__c(); |
| | | iflog.Type__c = 'PushNotification'; |
| | | iflog.Log__c = 'EquipmentRepairBatch start\n'; |
| | | iflog.ErrorLog__c = ''; |
| | | insert iflog; |
| | | if (td.month() >= 4 && td.month() <= 9) { |
| | | OCSM_Period_half = '1H'; |
| | | }else{ |
| | | OCSM_Period_half = '2H'; |
| | | } |
| | | |
| | | if(td.month() >= 1 && td.month() <= 3){ |
| | | OCSM_Period = 'FY'+(td.year()); |
| | | }else{ |
| | | OCSM_Period = 'FY'+(td.year()+1); |
| | | } |
| | | |
| | | // if(td.month() >= 4){ |
| | | // sTime = Date.newInstance(td.year()-3,4,1); |
| | | // eTime = Date.newInstance(td.year(),3,31); |
| | | |
| | | // }else{ |
| | | // sTime = Date.newInstance(td.year()-4,4,1); |
| | | // eTime = Date.newInstance(td.year()-1,3,31); |
| | | // } |
| | | // query ='select Id,Hospital__c,Product2.ServiceCategory__c from Asset where Id not in (Select Asset__c from Maintenance_Contract_Asset__c) and Id in (select Delivered_Product__c from Repair__c)';//没有维修合同的数据 |
| | | // query += 'and IF_Coverage_Target_Asset_F__c=1'; |
| | | //不再查询是否有维修合同 |
| | | // query ='select Id,Hospital__c,Product2.ServiceCategory__c,Product2.Maintenance_Price_Year__c from Asset where IF_Coverage_Target_Asset_F__c=1'; |
| | | |
| | | //2022/12/28 修改筛选条件 同步kpi设备 |
| | | query ='select Id from Account where Id IN( select Hospital__c from Asset where IF_Coverage_Target_Asset__c=\'1\')'; |
| | | |
| | | // query ='select Id from Account where Id IN( select Hospital__c from Asset where ' |
| | | // +' Product2.ServiceCategory__c != null ' |
| | | // +' AND OwnershipMachine_No__c!=\'A22004A\' AND OwnershipMachine_No__c!=\'A37026A\' AND OwnershipMachine_No__c!=\'A4676A\' AND OwnershipMachine_No__c!=\'WA02946A\'' |
| | | // +' AND Hospital__r.IF_Coverage_Target_HP__c = \'1\'' |
| | | // +' AND (Product2.Maintenance_Price_Year__c != 0 and Product2.Maintenance_Price_Year__c != null)' |
| | | // +' AND (Status = \'使用中\' or Status = \'未使用\' or Status = \'不明\')' |
| | | // +' AND (IF_StopParts_production__c != \'1\' or Product2.PartSupplyFinishDate__c = null)' |
| | | // +' AND (SerMarGuranteeType__c = null' |
| | | // +' OR (SerMarGuranteeType__c!=null AND Guarantee_period_for_products__c < :egdTime))' |
| | | // +' )'; |
| | | |
| | | // query +='and Is_Has_Contract_History__c = null'; |
| | | |
| | | if (accountIdList != null && accountIdList.size() > 0) { |
| | | query += ' AND Id IN :accountIdList '; |
| | | } |
| | | System.debug(LoggingLevel.INFO, '*** query: ' + query); |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Account> resultList) { |
| | | system.debug('*** 执行execute'); |
| | | System.debug(LoggingLevel.INFO, '*** 查询IF_Coverage_Target_Asset_F__c=1的保有设备Id JSON resultList: ' + JSON.Serialize(resultList)); |
| | | |
| | | //查询是否有维修合同 类型 分别统计维修金额 |
| | | //保有设备 1.有无维修合同(字段)2. |
| | | |
| | | //保有设备Id |
| | | List<Id> mids = new List<Id>(); |
| | | //医院Id |
| | | List<Id> assetHos = new List<Id>(); |
| | | // for (Asset ass: resultList) { |
| | | // mids.add(ass.Id); |
| | | // assetHos.add(ass.Hospital__c); |
| | | // } |
| | | |
| | | //保有设备 |
| | | List<Asset> AssetUpdate = new List<Asset>(); |
| | | for (Account acc :resultList) { |
| | | assetHos.add(acc.Id); |
| | | // for (Asset ass : acc.Asset_Hospital__r) { |
| | | // if(!mids.contains(ass.Id) ){ |
| | | // AssetUpdate.add(ass); |
| | | // mids.add(ass.Id); |
| | | // } |
| | | // } |
| | | } |
| | | for (Asset ass :[SELECT Id,Hospital__c,Product2.ServiceCategory__c,Product2.Maintenance_Price_Year__c |
| | | FROM Asset WHERE IF_Coverage_Target_Asset__c='1' |
| | | AND Hospital__c IN:assetHos |
| | | // AND Product2.ServiceCategory__c != null |
| | | // AND OwnershipMachine_No__c!='A22004A' AND OwnershipMachine_No__c!='A37026A' AND OwnershipMachine_No__c!='A4676A' AND OwnershipMachine_No__c!='WA02946A' |
| | | // AND Hospital__r.IF_Coverage_Target_HP__c = '1' |
| | | // AND (Product2.Maintenance_Price_Year__c != 0 and Product2.Maintenance_Price_Year__c != null) |
| | | // AND (Status = '使用中' or Status = '未使用' or Status = '不明') |
| | | // AND (IF_StopParts_production__c != '1' or Product2.PartSupplyFinishDate__c = null) |
| | | // AND (SerMarGuranteeType__c = null OR (SerMarGuranteeType__c!=null AND Guarantee_period_for_products__c <:egdTime)) |
| | | ] ) { |
| | | AssetUpdate.add(ass); |
| | | mids.add(ass.Id); |
| | | } |
| | | |
| | | System.debug(LoggingLevel.INFO, '*** mids: ' + mids); |
| | | |
| | | //保有设备、维修合同Map 1.存所有执行中的合同Id 2.存记录类型是服务合同以及维修合同的Id |
| | | Map<Id,Id> assetMcaIdall = new Map<Id,Id>(); |
| | | Map<Id,Id> assetMcaId = new Map<Id,Id>(); |
| | | // List<Id> iditem = new List<Id>(); |
| | | //查询执行中的合同(三种类型记录类型都需要统计) |
| | | // for (Maintenance_Contract_Asset__c mcas : [SELECT Id, Maintenance_Contract__c,Asset__c FROM Maintenance_Contract_Asset__c |
| | | // WHERE Asset__c IN :mids |
| | | // AND Maintenance_Contract__r.Status__c = '契約' ]) { |
| | | // assetMcaIdall.put(mcas.Asset__c, mcas.Maintenance_Contract__c); |
| | | // // iditem.add(mcas.Id); |
| | | // } |
| | | |
| | | //查询维修合同记录类型是服务合同以及服务类型的 维修合同Id 更新字段(是否有签约历史) |
| | | for (Maintenance_Contract_Asset__c mcas : [SELECT Maintenance_Contract__c,Asset__c FROM Maintenance_Contract_Asset__c |
| | | WHERE (Maintenance_Contract__r.RecordType.Name ='服务合同' OR Maintenance_Contract__r.RecordType.Name ='维修合同') |
| | | AND Asset__c IN :mids]) { |
| | | assetMcaId.put(mcas.Asset__c, mcas.Maintenance_Contract__c); |
| | | } |
| | | |
| | | //查询服务目标客户 |
| | | Map<String,Account_Service_Of_Target__c> targetMap = new Map<String,Account_Service_Of_Target__c>(); |
| | | for(Account_Service_Of_Target__c asotList:[SELECT Id ,Account_HP__c,OCSM_Period_half__c,Three_Years_Repair_Cost_Soft_Mirror__c,Three_Years_Repair_Cost_Text__c,Three_Years_Repair_Cost_Surrounding_Area__c,Three_Years_Repair_Cost_Hard_Mirror__c |
| | | FROM Account_Service_Of_Target__c |
| | | WHERE OCSM_Period_half__c = :OCSM_Period_half |
| | | AND OCSM_Period__c = :OCSM_Period |
| | | AND Account_HP__c IN:assetHos]){ |
| | | targetMap.put(asotList.Account_HP__c,asotList); |
| | | } |
| | | |
| | | |
| | | //存客户服务目标对象 医院Id 后续判断 有则给Id赋值。 |
| | | // Map<Id,Account_Service_Of_Target__c> hospMap = new Map<Id,Account_Service_Of_Target__c>(); |
| | | // for (Account_Service_Of_Target__c ast : asotList) { |
| | | // hospMap.put(ast.Account_HP__c,ast); |
| | | // } |
| | | |
| | | //最后upsert客户服务目标对象 list目标 |
| | | List<Account_Service_Of_Target__c> asslist = new List<Account_Service_Of_Target__c>(); |
| | | //保有设备为单位 过去三年维修实绩 |
| | | Map<Id,Decimal> ThreeYearPriceSumMap = new Map<Id,Decimal>(); |
| | | |
| | | //过去三年维修实际 2022/10/13 修改 为当前时间的上一个月最后一天 往前推三年 |
| | | for(Repair__c rp :[SELECT Hospital__c,PurchaseOrInstallationDate__c,Repair_List_Price_formula__c,Delivered_Product__c |
| | | FROM Repair__c WHERE Delivered_Product__c in:mids |
| | | AND Repair_List_Price_formula__c !=null |
| | | AND Repair_List_Price_formula__c!=0 |
| | | AND Status1__c!='0.删除' |
| | | AND Status1__c!='0.取消' |
| | | AND Status2__c!='00.删除' |
| | | AND Status2__c!='00.取消' |
| | | AND Agreed_Date__c >=:sTime |
| | | AND Agreed_Date__c <:eTime |
| | | ]){ |
| | | Date purDate = rp.PurchaseOrInstallationDate__c; |
| | | if(purDate!=null){ |
| | | Decimal bDay = purDate.daysBetween(eTime); |
| | | Decimal hmoney = 0; |
| | | if(bDay < 0){ |
| | | bDay *=-1; |
| | | } |
| | | //设备年龄不足三年的 按平均每天计算 再乘 365 再乘 3 |
| | | if((bDay < 365*3) && bDay>0){ |
| | | hmoney = (rp.Repair_List_Price_formula__c / bDay) *365*3; |
| | | }else{ |
| | | hmoney = rp.Repair_List_Price_formula__c / 3; |
| | | } |
| | | if(ThreeYearPriceSumMap.containsKey(rp.Delivered_Product__c)){ |
| | | ThreeYearPriceSumMap.put(rp.Delivered_Product__c, ThreeYearPriceSumMap.get(rp.Delivered_Product__c)+hmoney); |
| | | }else{ |
| | | ThreeYearPriceSumMap.put(rp.Delivered_Product__c, hmoney); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | //修改时间为过去三个完成财年 |
| | | |
| | | // Date LastThirdYearDate = td.addYears(-3); |
| | | // System.debug(LoggingLevel.INFO, '*** LastThirdYearDate: ' + LastThirdYearDate); |
| | | // List<AggregateResult> ThreeyearList = [ |
| | | // select |
| | | // sum(Repair_List_Price_formula__c) SumPrice, |
| | | // sum(Repair_Quotation_Id__r.sales_discount__c) sales_discount, |
| | | // sum(Repair_Quotation_Id__r.Contract_target__c) contract_target, |
| | | // sum(Repair_Quotation_Id__r.Loaner_repair__c) loaner_repair, |
| | | // sum(Repair_Quotation_Id__r.long_term_insurance__c) long_term_insurance, |
| | | // sum(Repair_Quotation_Id__r.Set_discount__c) set_discount, |
| | | // sum(Repair_Quotation_Id__r.Servince_contract_discount_amount__c) sercince, |
| | | // sum(Repair_Quotation_Id__r.long_term_insurance_MD__c) long_term_insuranceMD, |
| | | // sum(Repair_Quotation_Id__r.Delivery_compensation__c) delivery, |
| | | // sum(Repair_Quotation_Id__r.Other_discount__c) other, |
| | | // AVG(Delivered_Product__r.Last_Years_Repair_Month__c) threeYearM, |
| | | // Delivered_Product__c |
| | | // from |
| | | // Repair__c |
| | | // where |
| | | // Delivered_Product__c in:mids |
| | | // and Agreed_Date__c != null |
| | | // and Agreed_Date__c <= :eTime |
| | | // and Agreed_Date__c >= :sTime |
| | | // and Repair_List_Price_formula__c!=0 |
| | | // and Repair_List_Price_formula__c!=null |
| | | // and Status1__c!='0.删除' |
| | | // and Status1__c!='0.取消' |
| | | // and Status2__c!='00.删除' |
| | | // and Status2__c!='00.取消' |
| | | // group by Delivered_Product__c |
| | | // ]; |
| | | // Map<Id, Decimal> ThreeYearPriceSumMap = new Map<id, Decimal>(); |
| | | // Map<Id, Decimal> ThiYearMonthMap = new Map<id, Decimal>(); |
| | | |
| | | // System.debug(LoggingLevel.INFO, '*** ThreeyearList: ' + ThreeyearList); |
| | | // for (AggregateResult Rpc : ThreeyearList) { |
| | | // id idf = String.valueOf(Rpc.get('Delivered_Product__c')); |
| | | // //Decimal Defir = decimal.valueOf(Rpc.get('SumPrice')+''); |
| | | // Decimal threeYearM = decimal.valueOf(Rpc.get('threeYearM') + ''); |
| | | // Decimal Defir = sumPrice1(Rpc); |
| | | // ThreeYearPriceSumMap.put(idf, Defir); |
| | | // ThiYearMonthMap.put(idf, threeYearM); |
| | | // } |
| | | |
| | | |
| | | //以医院为对象存储医院所有保有设备List |
| | | Map<Id,List<Asset>> aMapLists = new Map<Id,List<Asset>>(); |
| | | |
| | | // for (Asset assertItem : resultList) { |
| | | for (Asset assertItem : AssetUpdate) { |
| | | |
| | | |
| | | //更新字段:执行中的合同 |
| | | // if(assetMcaIdall.containsKey(assertItem.Id)){ |
| | | // assertItem.Maintenance_Contract__c = assetMcaId.get(assertItem.Id); |
| | | // } |
| | | //更新字段:是否有签约历史 |
| | | if(assetMcaId.containsKey(assertItem.Id)){ |
| | | assertItem.Is_Has_Contract_History__c = '1'; |
| | | }else{ |
| | | assertItem.Is_Has_Contract_History__c = '0'; |
| | | } |
| | | if(ThreeYearPriceSumMap.containsKey(assertItem.Id)){ |
| | | assertItem.Three_Years_Repair_Cost_Text__c = ThreeYearPriceSumMap.get(assertItem.Id); |
| | | assertItem.IF_Maintenance_Equipment__c = 'Y'; |
| | | // bMapAsset.put(assertItem.Hospital__c,assertItem); |
| | | |
| | | //2022/12/28 修改 aMapLists移至 过去三年维修实绩map外 |
| | | // List<Asset> assetLists = new List<Asset>(); |
| | | // assetLists.add(assertItem); |
| | | // if(aMapLists.containsKey(assertItem.Hospital__c)){ |
| | | // List <Asset> alist = aMapLists.get(assertItem.Hospital__c); |
| | | // alist.add(assertItem); |
| | | // aMapLists.put(assertItem.Hospital__c,alist); |
| | | // }else{ |
| | | // aMapLists.put(assertItem.Hospital__c,assetLists); |
| | | // } |
| | | } |
| | | List<Asset> assetLists = new List<Asset>(); |
| | | assetLists.add(assertItem); |
| | | if(aMapLists.containsKey(assertItem.Hospital__c)){ |
| | | List <Asset> alist = aMapLists.get(assertItem.Hospital__c); |
| | | alist.add(assertItem); |
| | | aMapLists.put(assertItem.Hospital__c,alist); |
| | | }else{ |
| | | aMapLists.put(assertItem.Hospital__c,assetLists); |
| | | } |
| | | |
| | | } |
| | | update AssetUpdate; |
| | | System.debug(LoggingLevel.INFO, '*** updated AssetUpdate: ' + AssetUpdate); |
| | | for (Id mapId : aMapLists.keySet()) { |
| | | |
| | | //test 软性镜总个数 |
| | | Decimal softCountall = 0; |
| | | |
| | | //过去三年平均维修实绩 |
| | | Decimal sumThreePrice = 0; |
| | | |
| | | //软、硬、周边未参保过去平均维修实际 |
| | | Decimal softE = 0; |
| | | Decimal hardE = 0; |
| | | Decimal periE = 0; |
| | | |
| | | //软、硬、周边定价合计(未参保) |
| | | Decimal softTotalP = 0; |
| | | Decimal hardTotalP = 0; |
| | | Decimal periTotalP = 0; |
| | | |
| | | //软、硬、周边未参保数量 |
| | | Decimal softCount = 0; |
| | | Decimal hardCount = 0; |
| | | Decimal periCount = 0; |
| | | |
| | | for (Asset asset : aMapLists.get(mapId) ) { |
| | | if(ThreeYearPriceSumMap.containsKey(asset.Id)){ |
| | | sumThreePrice += asset.Three_Years_Repair_Cost_Text__c; |
| | | System.debug(LoggingLevel.INFO, '*** sumThreePrice: ' + sumThreePrice); |
| | | } |
| | | |
| | | System.debug(LoggingLevel.INFO, '*** asset.Product2.ServiceCategory__c: ' + asset.Product2.ServiceCategory__c); |
| | | System.debug(LoggingLevel.INFO, '*** asset.Is_Has_Contract_History__c: ' + asset.Is_Has_Contract_History__c); |
| | | |
| | | //分别统计软、硬、周边 1.定价总计 2.(未参保)过去三年平均维修实绩 3.未参保数量 |
| | | if(asset.Product2.ServiceCategory__c!=null){ |
| | | if(asset.Product2.ServiceCategory__c == '软性镜'){ |
| | | softCountall++; |
| | | if(asset.Is_Has_Contract_History__c == '0'){ |
| | | softTotalP += asset.Product2.Maintenance_Price_Year__c; |
| | | softCount++; |
| | | if(ThreeYearPriceSumMap.containsKey(asset.Id)){ |
| | | softE += asset.Three_Years_Repair_Cost_Text__c; |
| | | } |
| | | } |
| | | |
| | | }else if(asset.Product2.ServiceCategory__c == '硬性镜'){ |
| | | if(asset.Is_Has_Contract_History__c == '0'){ |
| | | hardTotalP += asset.Product2.Maintenance_Price_Year__c; |
| | | hardCount++; |
| | | if(ThreeYearPriceSumMap.containsKey(asset.Id)){ |
| | | hardE += asset.Three_Years_Repair_Cost_Text__c; |
| | | } |
| | | } |
| | | |
| | | }else if(asset.Product2.ServiceCategory__c == '周边'){ |
| | | if(asset.Is_Has_Contract_History__c == '0'){ |
| | | periTotalP += asset.Product2.Maintenance_Price_Year__c; |
| | | periCount++; |
| | | if(ThreeYearPriceSumMap.containsKey(asset.Id)){ |
| | | periE += asset.Three_Years_Repair_Cost_Text__c; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | System.debug(LoggingLevel.INFO, '*** 周边未参保金额: ' + periE); |
| | | System.debug(LoggingLevel.INFO, '*** 硬 未参保金额: ' + hardE); |
| | | System.debug(LoggingLevel.INFO, '*** 软 未参保金额: ' + softE); |
| | | |
| | | Account_Service_Of_Target__c astItem = new Account_Service_Of_Target__c(); |
| | | if(targetMap.containsKey(mapId)){ |
| | | astItem = targetMap.get(mapId); |
| | | }else{ |
| | | astItem.OCSM_Period__c = OCSM_Period; |
| | | astItem.OCSM_Period_half__c = OCSM_Period_half; |
| | | astItem.Account_HP__c = mapId; |
| | | } |
| | | astItem.Three_Years_Repair_Cost_Soft_Mirror__c = softE; |
| | | astItem.Three_Years_Repair_Cost_Hard_Mirror__c = hardE; |
| | | astItem.Three_Years_Repair_Cost_Surrounding_Area__c = periE; |
| | | astItem.Three_Years_Repair_Cost_Text__c = sumThreePrice; |
| | | astItem.Total_Pricing_Soft_Mirror__c = softTotalP; |
| | | astItem.Total_Pricing_Hard_Mirror__c = hardTotalP; |
| | | astItem.Total_Pricing_Lightsource__c = periTotalP; |
| | | astItem.Uninsured_Quantity_Soft_Mirror__c = softCount; |
| | | astItem.Uninsured_Quantity_Hard_Mirror__c = hardCount; |
| | | astItem.Uninsured_Quantity_Lightsource__c = periCount; |
| | | asslist.add(astItem); |
| | | System.debug(LoggingLevel.INFO, '*** 软性镜总个数: ' + softCountall); |
| | | System.debug(LoggingLevel.INFO, '*** 软性镜未参保个数: ' + astItem.Uninsured_Quantity_Soft_Mirror__c); |
| | | System.debug(LoggingLevel.INFO, '*** :astItem.Three_Years_Repair_Cost_Soft_Mirror__c ' + astItem.Three_Years_Repair_Cost_Soft_Mirror__c); |
| | | |
| | | |
| | | } |
| | | // System.debug(LoggingLevel.INFO, '*** asslist: ' + asslist); |
| | | // update resultList; |
| | | upsert asslist; |
| | | // update asslist; |
| | | |
| | | System.debug(LoggingLevel.INFO, '***更新后 asslist: ' + asslist); |
| | | |
| | | |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | iflog.Log__c += '\nEquipmentRepairBatch end'; |
| | | String tmp = iflog.ErrorLog__c; |
| | | if (tmp.length() > 65000) { |
| | | tmp = tmp.substring(0, 65000); |
| | | tmp += ' ...have more lines...'; |
| | | iflog.ErrorLog__c = tmp; |
| | | } |
| | | update iflog; |
| | | |
| | | } |
| | | |
| | | // private static Decimal sumPrice1(AggregateResult rpc) { |
| | | // Decimal SumPrice = Decimal.valueOf(rpc.get('SumPrice') + ''); |
| | | // Decimal sales_discount = Decimal.valueOf((rpc.get('sales_discount') == null ? 0 : rpc.get('sales_discount')) + '') * -1; |
| | | // Decimal contract_target = Decimal.valueOf((rpc.get('contract_target') == null ? 0 : rpc.get('contract_target')) + '') * -1; |
| | | // Decimal loaner_repair = Decimal.valueOf((rpc.get('loaner_repair') == null ? 0 : rpc.get('loaner_repair')) + '') * -1; |
| | | // Decimal long_term_insurance = Decimal.valueOf((rpc.get('long_term_insurance') == null ? 0 : rpc.get('long_term_insurance')) + '') * -1; |
| | | // Decimal set_discount = Decimal.valueOf((rpc.get('set_discount') == null ? 0 : rpc.get('set_discount')) + '') * -1; |
| | | // Decimal sercince = Decimal.valueOf((rpc.get('sercince') == null ? 0 : rpc.get('sercince')) + '') * -1; |
| | | // Decimal long_term_insuranceMD = Decimal.valueOf((rpc.get('long_term_insuranceMD') == null ? 0 : rpc.get('long_term_insuranceMD')) + '') * -1; |
| | | // Decimal delivery = Decimal.valueOf((rpc.get('delivery') == null ? 0 : rpc.get('delivery')) + '') * -1; |
| | | // Decimal other = Decimal.valueOf((rpc.get('other') == null ? 0 : rpc.get('other')) + '') * -1; |
| | | // system.debug(rpc.get('SumPrice') + '--' + rpc.get('sales_discount') + '--' + rpc.get('contract_target') + '--' + |
| | | // rpc.get('loaner_repair') + '--' + rpc.get('long_term_insurance') + '--' + rpc.get('set_discount') + '--' + rpc.get('long_term_insuranceMD') |
| | | // + '--' + rpc.get('delivery') + '--' + rpc.get('other') + '--'); |
| | | // return SumPrice + sales_discount + contract_target + loaner_repair + long_term_insurance + sercince + set_discount + long_term_insuranceMD + delivery + other; |
| | | // } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>46.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class EquipmentRepairBatchTest { |
| | | static testMethod void testMethod1() { |
| | | database.executeBatch(new EquipmentRepairBatch(),200); |
| | | } |
| | | static testMethod void testMethod2() { |
| | | Account acc = [select id from account where name = 'hospitalabc']; |
| | | List<String> l = new List<String>(); |
| | | l.add(acc.id); |
| | | database.executeBatch(new EquipmentCoverageTargetBatch(l),200); |
| | | } |
| | | @testSetup |
| | | private static void setUpDate(){ |
| | | // 病院を作る |
| | | Date toDayTime = Date.today(); |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'hospitalabc'; |
| | | hospital.Is_Active__c = '有効'; |
| | | hospital.Attribute_Type__c = '卫生部'; |
| | | hospital.Speciality_Type__c = '综合医院'; |
| | | hospital.Grade__c = '一级'; |
| | | hospital.IF_Coverage_Target_HP__c = '1'; |
| | | hospital.OCM_Category__c = 'SLTV'; |
| | | hospital.Is_Medical__c = '医疗机构'; |
| | | hospital.Town__c = '东京'; |
| | | Oly_TriggerHandler.bypass('NFM701ControllerHandler'); |
| | | Oly_TriggerHandler.bypass('UpdateContractAimAmountHandler'); |
| | | insert hospital; |
| | | |
| | | |
| | | // 戦略科室を得る |
| | | Account[] strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_OTH']; |
| | | // 診療科を作る |
| | | Account dep = new Account(); |
| | | dep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_OTH'].id; |
| | | dep.Name = 'test dep'; |
| | | dep.AgentCode_Ext__c = System.Label.Account_Asset_FJZ; |
| | | dep.ParentId = strategicDep[0].Id; |
| | | dep.Department_Class__c = strategicDep[0].Id; |
| | | dep.Hospital__c = hospital.Id; |
| | | Oly_TriggerHandler.bypass('NFM701ControllerHandler'); |
| | | Oly_TriggerHandler.bypass('UpdateContractAimAmountHandler'); |
| | | insert dep; |
| | | |
| | | // 产品 |
| | | Product2 pro1 = new Product2(Name='name01',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n01',Serial_Lot_No__c='S/N tracing', |
| | | Fixture_Model_No_T__c = 'n01', |
| | | Maintenance_Price_Year__c = 999, |
| | | Extend_Gurantee_Start_MD__c = Date.newInstance(toDayTime.year(),3,2), |
| | | Extend_Gurantee_End_MD__c = Date.newInstance(3999,12,31), |
| | | Extend_new_product_gurantee_MD__c = true, |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | ProductCode_Ext__c='pc01',Manual_Entry__c=false,Brand_Name__c='奥林巴斯', |
| | | Category2__c='本体', |
| | | Category3__c='电子镜'); |
| | | Product2 pro2 = new Product2(Name='name02',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n02',Serial_Lot_No__c='Lot tracing', |
| | | ProductCode_Ext__c='pc02',Manual_Entry__c=false,Brand_Name__c='奥林巴斯', |
| | | Category2__c='本体', |
| | | Extend_Gurantee_Start_MD__c = Date.newInstance(toDayTime.year(),3,2), |
| | | Extend_Gurantee_End_MD__c = Date.newInstance(3999,12,31), |
| | | Extend_new_product_gurantee_MD__c = true, |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | Maintenance_Price_Year__c = 999, |
| | | Category3__c='纤维镜'); |
| | | Product2 pro3 = new Product2(Name='name03',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n03',Serial_Lot_No__c='Lot tracing', |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | ProductCode_Ext__c='pc03',Manual_Entry__c=false,Brand_Name__c='奥林巴斯', |
| | | Category2__c='本体', |
| | | Extend_Gurantee_Start_MD__c = Date.newInstance(toDayTime.year(),3,2), |
| | | Extend_Gurantee_End_MD__c = Date.newInstance(3999,12,31), |
| | | Extend_new_product_gurantee_MD__c = true, |
| | | Maintenance_Price_Year__c = 999, |
| | | Category3__c='电子镜'); |
| | | Product2 pro4 = new Product2(Name='name04',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n04',Serial_Lot_No__c='Lot tracing', |
| | | ProductCode_Ext__c='pc04',Manual_Entry__c=false,Brand_Name__c='奥林巴斯', |
| | | Category4__c='SD EndoEYE', |
| | | Extend_Gurantee_Start_MD__c = Date.newInstance(toDayTime.year(),3,2), |
| | | Extend_Gurantee_End_MD__c = Date.newInstance(3999,12,31), |
| | | Extend_new_product_gurantee_MD__c = true, |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | Maintenance_Price_Year__c = 999); |
| | | |
| | | Product2 pro5 = new Product2(Name='name05',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n05',Serial_Lot_No__c='Lot tracing',Brand_Name__c='奥林巴斯', |
| | | // Category2__c='本体', |
| | | Extend_Gurantee_Start_MD__c = Date.newInstance(toDayTime.year(),3,2), |
| | | Extend_Gurantee_End_MD__c = Date.newInstance(3999,12,31), |
| | | Extend_new_product_gurantee_MD__c = true, |
| | | Maintenance_Price_Year__c = 999, |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | ProductCode_Ext__c='pc05',Manual_Entry__c=false, |
| | | Category3__c = 'EUS主机'); |
| | | insert new Product2[] {pro1, pro2, pro3,pro4,pro5}; |
| | | |
| | | |
| | | |
| | | Maintenance_Contract__c contract = new Maintenance_Contract__c(); |
| | | contract.Name = 'tect contract'; |
| | | contract.status__c ='契約'; |
| | | contract.Maintenance_Contract_No__c = 'Kami_Contract_No'; |
| | | contract.Contract_Conclusion_Date__c = Date.today(); |
| | | contract.Hospital__c = hospital.Id; |
| | | contract.Department_Class__c = strategicDep[0].Id; |
| | | contract.Department__c = dep.Id; |
| | | contract.Contract_Start_Date__c=Date.newInstance(toDayTime.year(),3,2); // 10日前 |
| | | contract.Contract_End_Date__c = Date.newInstance(toDayTime.year()+1,3,20); // 5日後 |
| | | contract.SalesOfficeCode_selection__c = '北京RC'; |
| | | contract.RecordTypeId = Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByDeveloperName().get('NewMaintenance_Contract').getRecordTypeId(); |
| | | insert contract; |
| | | |
| | | List<Maintenance_Contract__c> MaintenanceContract=[select id from Maintenance_Contract__c]; |
| | | |
| | | //---------------------------主体 两个附属品(个体管理 数量管理) |
| | | // 保有设备A (主体) |
| | | Asset assetA1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA1.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA1.SerialNumber = 'ass01'; |
| | | assetA1.Name = 'ass01'; |
| | | assetA1.AccountId = dep.Id; |
| | | assetA1.Guarantee_period_for_products__c = toDayTime; |
| | | assetA1.Department_Class__c = strategicDep[0].Id; |
| | | assetA1.Hospital__c = hospital.Id; |
| | | assetA1.Product2Id = pro1.Id; |
| | | assetA1.Quantity = 1; |
| | | assetA1.IF_Coverage_Target_Asset__c = '1'; |
| | | |
| | | assetA1.Status = '使用中'; |
| | | assetA1.Manage_type__c = '个体管理'; |
| | | assetA1.Loaner_accsessary__c = false; |
| | | assetA1.Product_category__c = 'GI'; |
| | | assetA1.Delete_Flag__c = false; |
| | | assetA1.Freeze_sign__c = false; |
| | | assetA1.Out_of_wh__c = 0; |
| | | assetA1.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA1.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA1.Product_category__c = 'GI'; |
| | | assetA1.Equipment_Type__c = '产品试用'; |
| | | assetA1.SalesProvince__c = '北京'; |
| | | assetA1.WH_location__c = '货架号1'; |
| | | assetA1.Asset_loaner_category__c = '固定资产'; |
| | | assetA1.CompanyOfEquipment__c = '123'; |
| | | assetA1.Internal_Asset_number__c = '123'; |
| | | assetA1.CurrentContract__c=MaintenanceContract[0].Id; |
| | | assetA1.InstallDate =Date.newInstance(2017, 1, 1); |
| | | // assetA1.AssetManageConfirm__c = true; |
| | | // 保有设备A (附属品 数量管理) |
| | | Asset assetA2 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA2.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA2.SerialNumber = 'ass02'; |
| | | assetA2.Name = 'ass02'; |
| | | assetA2.AccountId = dep.Id; |
| | | assetA2.Department_Class__c = strategicDep[0].Id; |
| | | assetA2.Hospital__c = hospital.Id; |
| | | assetA2.Product2Id = pro2.Id; |
| | | assetA2.Quantity = 10; |
| | | assetA2.Status = '使用中'; |
| | | assetA2.Manage_type__c = '数量管理'; |
| | | assetA2.Loaner_accsessary__c = true; |
| | | assetA2.Product_category__c = 'GI'; |
| | | assetA2.Delete_Flag__c = false; |
| | | assetA2.Guarantee_period_for_products__c = toDayTime; |
| | | assetA2.Freeze_sign__c = false; |
| | | assetA2.Out_of_wh__c = 3; |
| | | |
| | | assetA2.Frozen_Quantity__c = 2; |
| | | assetA2.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA2.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA2.Product_category__c = 'GI'; |
| | | assetA2.Equipment_Type__c = '产品试用'; |
| | | assetA2.SalesProvince__c = '北京'; |
| | | assetA2.WH_location__c = '货架号2'; |
| | | assetA2.Asset_loaner_category__c = '固定资产'; |
| | | assetA2.CompanyOfEquipment__c = '123'; |
| | | assetA2.Internal_Asset_number__c = '123'; |
| | | assetA2.CurrentContract__c=MaintenanceContract[0].Id; |
| | | assetA2.IF_Coverage_Target_Asset__c = '1'; |
| | | assetA2.InstallDate =Date.newInstance(2020, 1, 1); |
| | | |
| | | // assetA2.AssetManageConfirm__c = true; |
| | | // 保有设备A (附属品 个体管理) |
| | | Asset assetA3 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA3.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA3.SerialNumber = 'ass03'; |
| | | assetA3.Name = 'ass03'; |
| | | assetA3.AccountId = dep.Id; |
| | | assetA3.Department_Class__c = strategicDep[0].Id; |
| | | assetA3.Hospital__c = hospital.Id; |
| | | assetA3.Product2Id = pro3.Id; |
| | | assetA3.Quantity = 10; |
| | | assetA3.Status = '使用中'; |
| | | assetA3.Manage_type__c = '数量管理'; |
| | | assetA3.Loaner_accsessary__c = true; |
| | | assetA3.Product_category__c = 'GI'; |
| | | assetA3.Delete_Flag__c = false; |
| | | assetA3.Guarantee_period_for_products__c = toDayTime; |
| | | |
| | | assetA3.Freeze_sign__c = false; |
| | | assetA3.Out_of_wh__c = 3; |
| | | assetA3.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA3.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA3.Product_category__c = 'GI'; |
| | | assetA3.Equipment_Type__c = '产品试用'; |
| | | assetA3.SalesProvince__c = '北京'; |
| | | assetA3.WH_location__c = '货架号3'; |
| | | assetA3.Abandoned_Inventory__c = 1; |
| | | assetA3.Asset_loaner_category__c = '固定资产'; |
| | | assetA3.CompanyOfEquipment__c = '123'; |
| | | assetA3.Internal_Asset_number__c = '123'; |
| | | assetA3.CurrentContract__c=MaintenanceContract[0].Id; |
| | | assetA3.IF_Coverage_Target_Asset__c = '1'; |
| | | assetA3.InstallDate =Date.newInstance(2016, 1, 1); |
| | | |
| | | |
| | | // 保有设备A (附属品 数量管理) |
| | | Asset assetA4 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA4.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA4.SerialNumber = 'ass04'; |
| | | assetA4.Name = 'ass04'; |
| | | assetA4.AccountId = dep.Id; |
| | | assetA4.Department_Class__c = strategicDep[0].Id; |
| | | assetA4.Hospital__c = hospital.Id; |
| | | assetA4.Product2Id = pro4.Id; |
| | | assetA4.Quantity = 10; |
| | | assetA4.Guarantee_period_for_products__c = toDayTime; |
| | | assetA4.Status = '使用中'; |
| | | |
| | | assetA4.Manage_type__c = '数量管理'; |
| | | assetA4.Loaner_accsessary__c = true; |
| | | assetA4.Product_category__c = 'GI'; |
| | | assetA4.Delete_Flag__c = false; |
| | | assetA4.Freeze_sign__c = false; |
| | | assetA4.Out_of_wh__c = 3; |
| | | assetA4.Frozen_Quantity__c = 2; |
| | | assetA4.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA4.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA4.Product_category__c = 'GI'; |
| | | assetA4.Equipment_Type__c = '产品试用'; |
| | | assetA4.SalesProvince__c = '北京'; |
| | | assetA4.WH_location__c = '货架号2'; |
| | | assetA4.Asset_loaner_category__c = '固定资产'; |
| | | assetA4.CompanyOfEquipment__c = '123'; |
| | | assetA4.Internal_Asset_number__c = '123'; |
| | | assetA4.CurrentContract__c=MaintenanceContract[0].Id; |
| | | assetA4.IF_Coverage_Target_Asset__c = '1'; |
| | | assetA4.InstallDate =Date.newInstance(2022, 5, 1); |
| | | |
| | | // assetA2.AssetManageConfirm__c = true; |
| | | |
| | | // 保有设备A (附属品 数量管理) |
| | | Asset assetA5 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA5.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA5.SerialNumber = 'ass05'; |
| | | assetA5.Name = 'ass05'; |
| | | assetA5.AccountId = dep.Id; |
| | | assetA5.Department_Class__c = strategicDep[0].Id; |
| | | assetA5.Hospital__c = hospital.Id; |
| | | assetA5.Product2Id = pro5.Id; |
| | | assetA5.Quantity = 10; |
| | | assetA5.Status = '使用中'; |
| | | assetA5.Manage_type__c = '数量管理'; |
| | | assetA5.Loaner_accsessary__c = true; |
| | | assetA5.Product_category__c = 'GI'; |
| | | assetA5.Delete_Flag__c = false; |
| | | assetA5.Guarantee_period_for_products__c = toDayTime; |
| | | |
| | | assetA5.Freeze_sign__c = false; |
| | | assetA5.Out_of_wh__c = 3; |
| | | assetA5.Frozen_Quantity__c = 2; |
| | | assetA5.Salesdepartment__c = '1.华北营业本部'; |
| | | assetA5.Internal_asset_location__c = '北京 备品中心'; |
| | | assetA5.Product_category__c = 'GI'; |
| | | assetA5.Equipment_Type__c = '产品试用'; |
| | | assetA5.SalesProvince__c = '北京'; |
| | | assetA5.WH_location__c = '货架号2'; |
| | | assetA5.Asset_loaner_category__c = '固定资产'; |
| | | assetA5.CompanyOfEquipment__c = '123'; |
| | | assetA5.Internal_Asset_number__c = '123'; |
| | | assetA5.CurrentContract__c=MaintenanceContract[0].Id; |
| | | assetA5.IF_Coverage_Target_Asset__c = '1'; |
| | | assetA3.InstallDate =Date.newInstance(2016, 1, 1); |
| | | |
| | | |
| | | // assetA2.AssetManageConfirm__c = true; |
| | | Oly_TriggerHandler.bypass('AssetHandlerCheck'); |
| | | insert new Asset[] {assetA1, assetA2, assetA3,assetA4,assetA5}; |
| | | List<Asset> Assetss = new Asset[] {assetA1, assetA2, assetA3,assetA4,assetA5}; |
| | | Account_Service_Of_Target__c asot = new Account_Service_Of_Target__c(); |
| | | asot.OCSM_Period_half__c='1H'; |
| | | asot.OCSM_Period__c = 'FY2023'; |
| | | asot.Account_HP__c=hospital.Id; |
| | | |
| | | insert asot; |
| | | |
| | | //维修合同/保有设备表 |
| | | Maintenance_Contract_Asset__c midd1 = new Maintenance_Contract_Asset__c(); |
| | | midd1.Asset__c = assetA1.Id; |
| | | midd1.Maintenance_Contract__c = contract.id; |
| | | midd1.CurrencyIsoCode= 'CNY'; |
| | | midd1.startDateGurantee_Text__c =Date.today().addDays( 5); |
| | | midd1.endDateGurantee_Text__c =Date.today().addDays( 30); |
| | | insert midd1; |
| | | |
| | | //维修表创建(包含在维修表的保有设备) |
| | | Repair__c repairObj1 = new Repair__c(); |
| | | repairObj1.Delivered_Product__c = Assetss[0].Id; |
| | | repairObj1.Hospital__c = hospital.Id; |
| | | repairObj1.Department_Class__c = strategicDep[0].Id; |
| | | repairObj1.Account__c = hospital.Id; |
| | | repairObj1.SalesOfficeCode_selection__c = '北京石景山'; |
| | | repairObj1.On_site_repair__c = 'RC修理'; |
| | | repairObj1.Failure_Occurrence_Date__c = Date.today(); |
| | | repairObj1.Agreed_Date__c = Date.newInstance(Date.today().year()-1, 1, 1); |
| | | repairObj1.Repair_List_Price__c = 2000; |
| | | |
| | | // insert repairObj1; |
| | | |
| | | Repair__c repairObj2 = new Repair__c(); |
| | | repairObj2.Delivered_Product__c = Assetss[1].Id; |
| | | repairObj2.Hospital__c = hospital.Id; |
| | | repairObj2.Department_Class__c = strategicDep[0].Id; |
| | | repairObj2.Account__c = hospital.Id; |
| | | repairObj2.SalesOfficeCode_selection__c = '北京石景山'; |
| | | repairObj2.On_site_repair__c = 'RC修理'; |
| | | repairObj2.Failure_Occurrence_Date__c = Date.today(); |
| | | repairObj2.Agreed_Date__c = Date.newInstance(Date.today().year()-1, 1, 1); |
| | | repairObj2.Repair_List_Price__c = 2000; |
| | | |
| | | |
| | | Repair__c repairObj3 = new Repair__c(); |
| | | repairObj3.Delivered_Product__c = Assetss[2].Id; |
| | | repairObj3.Hospital__c = hospital.Id; |
| | | repairObj3.Department_Class__c = strategicDep[0].Id; |
| | | repairObj3.Account__c = hospital.Id; |
| | | repairObj3.SalesOfficeCode_selection__c = '北京石景山'; |
| | | repairObj3.On_site_repair__c = 'RC修理'; |
| | | repairObj3.Failure_Occurrence_Date__c = Date.today(); |
| | | repairObj3.Agreed_Date__c = Date.today().addDays(-1); |
| | | repairObj3.Repair_List_Price__c = 2000; |
| | | |
| | | |
| | | insert new Repair__c[] {repairObj1, repairObj2, repairObj3}; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>46.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | initTypeList(); |
| | | |
| | | if (Id != null) { |
| | | resList = [select Rental_Start_Date__c,Rental_Apply__r.Name, First_RAESD_Model_No_F__c, First_RAESD__r.SerialNumber_F__c, First_RAESD__r.Fixture_QRCode_F__c, RAES_Status__c |
| | | resList = [select Rental_Apply__r.Name, First_RAESD_Model_No_F__c, First_RAESD__r.SerialNumber_F__c, First_RAESD__r.Fixture_QRCode_F__c, RAES_Status__c |
| | | from Rental_Apply_Equipment_Set__c |
| | | where Rental_Apply__r.Name = :id order by Name |
| | | //AND Cancel_Select__c = false |
| | |
| | | raesdSet.add(raesd.Id); |
| | | } |
| | | } |
| | | resList = [select Rental_Start_Date__c,Id, Rental_Apply__c, Rental_Apply__r.Name, First_RAESD_Model_No_F__c, First_RAESD__r.SerialNumber_F__c, First_RAESD__r.Fixture_QRCode_F__c, RAES_Status__c |
| | | resList = [select Id, Rental_Apply__c, Rental_Apply__r.Name, First_RAESD_Model_No_F__c, First_RAESD__r.SerialNumber_F__c, First_RAESD__r.Fixture_QRCode_F__c, RAES_Status__c |
| | | from Rental_Apply_Equipment_Set__c |
| | | where (First_RAESD__c in :raesdSet |
| | | or ((First_RAESD__r.Canceled__c in :raesdSet or First_RAESD__r.Canceled__r.Canceled__c in :raesdSet) |
| | |
| | | config.RAESD_Action_Type__c = selectedType; |
| | | FixtureUtil.withoutUpsertObjects(new System_UserSetting__c[]{config}); |
| | | } |
| | | |
| | | } |
| | | |
| | | //// 出库 |
| | |
| | | from Rental_Apply__c |
| | | where id=:Raid]; |
| | | |
| | | if( RaTar.Campaign__r.Status == '取消'){ |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '学会已取消,不能继续操作了')); |
| | | return null; |
| | | // 20230215 ljh DB202301265636 学会取消申请也拦截 start |
| | | // if( RaTar.Campaign__r.Status == '取消'){ |
| | | // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '学会已取消,不能继续操作了')); |
| | | if( RaTar.Campaign__r.Status == '取消' || RaTar.Campaign__r.Status == '取消申请中' ){ |
| | | String tempS = ''; |
| | | if(RaTar.Campaign__r.Status == '取消'){ |
| | | tempS = '已取消'; |
| | | }else{ |
| | | tempS = '申请取消中'; |
| | | } |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '学会'+tempS+',不能继续操作了')); |
| | | // 20230215 ljh DB202301265636 学会取消申请也拦截 end |
| | | return null; |
| | | |
| | | }else if( RaTar.Repair__r.Repair_Final_Inspection_Date__c!=null){ |
| | | |
| | |
| | | |
| | | //20220315 sx start obpm obpm备品决裁状态相关修改 |
| | | else if ( RaTar.Campaign__c!= null && RaTar.Campaign__r.IF_Approved__c && RaTar.Campaign__r.Meeting_Approved_No__c != null && statusList.contains(RaTar.Campaign__r.Approved_Status__c) ){ |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '已申请决裁但决裁编码状态不符合需求')); |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '已申请决裁但决裁状态不符合条件')); |
| | | return null; |
| | | } |
| | | //20220315 sx end obpm obpm备品决裁状态相关修改 |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 测试类中正确场景都走到了 差点点就i++l |
| | | @TestVisible private void test() { |
| | | Integer i = 0; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | } |
| | | } |
| New file |
| | |
| | | @isTest |
| | | private class EquipmentSetShippmentReceived1CtrlTest { |
| | | static testMethod void testCoverage() { |
| | | EquipmentSetShippmentReceived1Controller.coverage(); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>46.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | from Rental_Apply__c |
| | | where id=:Raid]; |
| | | |
| | | if( RaTar.Campaign__r.Status == '取消'){ |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '学会已取消,不能继续操作了')); |
| | | return null; |
| | | // 20230215 ljh DB202301265636 学会取消申请也拦截 start |
| | | // if( RaTar.Campaign__r.Status == '取消'){ |
| | | // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '学会已取消,不能继续操作了')); |
| | | if( RaTar.Campaign__r.Status == '取消' || RaTar.Campaign__r.Status == '取消申请中' ){ |
| | | String tempS = ''; |
| | | if(RaTar.Campaign__r.Status == '取消'){ |
| | | tempS = '已取消'; |
| | | }else{ |
| | | tempS = '申请取消中'; |
| | | } |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '学会'+tempS+',不能继续操作了')); |
| | | // 20230215 ljh DB202301265636 学会取消申请也拦截 end |
| | | return null; |
| | | |
| | | }else if( RaTar.Repair__r.Repair_Final_Inspection_Date__c!=null){ |
| | | |
| | |
| | | |
| | | List<String> raids = Raid.split(':'); |
| | | //检查是否可以继续 |
| | | List<Rental_Apply__c> RaTarList = [select Name,Campaign__c,Repair__c,next_action__c |
| | | List<Rental_Apply__c> RaTarList = [select Id,Name,Campaign__c,Repair__c,next_action__c |
| | | ,QIS_number__r.ReplaceDeliveryDate__c,demo_purpose2__c |
| | | ,Follow_UP_Opp__r.Shipping_Finished_Day_Func__c |
| | | ,Campaign__r.Status |
| | |
| | | ,Repair__r.Repair_Shipped_Date__c |
| | | from Rental_Apply__c |
| | | where id in :raids];//20210602 ljh update 增加查询Name SFDC-C3LBNL |
| | | |
| | | // add lc 20220927 SFDC-CJ48VE 备品预计出库日逻辑调整 start |
| | | Map<Id, String> rentalApplyNameMap = new Map<Id, String>(); |
| | | List<Rental_Apply_Equipment_Set__c> RAESRecords = [ |
| | | SELECT Id,Rental_Apply__c,Rental_Apply__r.Name |
| | | FROM Rental_Apply_Equipment_Set__c |
| | | WHERE Rental_Apply__c in :raids |
| | | AND Cancel_Select__c = False |
| | | AND Rental_Start_Date__c <> :Date.today() |
| | | ORDER BY Rental_Apply__c]; |
| | | |
| | | for (Rental_Apply_Equipment_Set__c RAES : RAESRecords) { |
| | | if (rentalApplyNameMap.isEmpty() || !rentalApplyNameMap.containsKey(RAES.Rental_Apply__c)) { |
| | | rentalApplyNameMap.put(RAES.Rental_Apply__c, RAES.Rental_Apply__r.Name); |
| | | } |
| | | } |
| | | // add lc 20220927 SFDC-CJ48VE 备品预计出库日逻辑调整 end |
| | | |
| | | //20210604 ljh update SFDC-C3LBNL start |
| | | Boolean errorFlag = false; |
| | | String message0 = ''; |
| | |
| | | String message5 = '';//1822 yc 20211108 索赔QIS目的,QIS已有新品发货日不能出库 |
| | | String message6 = ''; |
| | | String message7 = '';// 20220315 ljh obpm备品决裁状态相关修改 end |
| | | String message8 = '';//add lc 20220927 SFDC-CJ48VE 备品预计出库日逻辑调整 |
| | | // 要判断决裁状态不能是草稿/驳回/终止申请/取消/删除 |
| | | List<String> statusList = System.Label.StatusProcessState.split(','); |
| | | Map<Id, Rental_Apply__c> RaMap = new Map<Id, Rental_Apply__c>(); |
| | | for (Rental_Apply__c RaTar : RaTarList) { |
| | | if( RaTar.Campaign__r.Status == '取消'){ |
| | | // 20230215 ljh DB202301265636 学会取消申请也拦截 start |
| | | // if( RaTar.Campaign__r.Status == '取消'){ |
| | | if( RaTar.Campaign__r.Status == '取消' || RaTar.Campaign__r.Status == '取消申请中'){ |
| | | // 20230215 ljh DB202301265636 学会取消申请也拦截 end |
| | | // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '学会已取消,不能继续操作了')); |
| | | // return null; |
| | | errorFlag = true; |
| | |
| | | // 20220315 ljh obpm备品决裁状态相关修改 end |
| | | //20220217 sx add 备品借出申请-决裁控制 No.3 在出库时增加判断,判断学会是否申请决裁,如果是的话,再判断决裁编号是否不为空,满足条件才能出库,否则提示错误 |
| | | } |
| | | |
| | | // add lc 20220927 SFDC-CJ48VE 备品预计出库日逻辑调整 start |
| | | if (!rentalApplyNameMap.isEmpty()) { |
| | | errorFlag = true; |
| | | for (String rentalApplyKey : rentalApplyNameMap.keySet()) { |
| | | message8 += rentalApplyNameMap.get(rentalApplyKey) + '、'; |
| | | } |
| | | } |
| | | // add lc 20220927 SFDC-CJ48VE 备品预计出库日逻辑调整 end |
| | | |
| | | if(errorFlag){ |
| | | if(String.isNotBlank(message0)){ |
| | | message += '单号NO.'+message0.removeEnd('、')+'学会已取消,不能继续操作了'; |
| | | // 20230215 ljh DB202301265636 学会取消申请也拦截 start |
| | | // message += '单号NO.'+message0.removeEnd('、')+'学会已取消,不能继续操作了'; |
| | | message += '单号NO.'+message0.removeEnd('、')+'学会已取消或者取消申请中,不能继续操作了'; |
| | | // 20230215 ljh DB202301265636 学会取消申请也拦截 start |
| | | } |
| | | if(String.isNotBlank(message1)){ |
| | | message += '单号NO.'+message1.removeEnd('、')+'存在修理最终检测日,不能继续了'; |
| | |
| | | message += '单号No.'+ message6.removeEnd('、')+ '已申请决裁但决裁编码为空'; |
| | | } |
| | | // 20220315 ljh obpm备品决裁状态相关修改 add start |
| | | if(String.isNotBlank(message6)){ |
| | | if(String.isNotBlank(message7)){ |
| | | message += '单号No.'+ message7.removeEnd('、')+ '已申请决裁但决裁状态不符合条件'; |
| | | } |
| | | // 20220315 ljh obpm备品决裁状态相关修改 add end |
| | | |
| | | // add lc 20220927 SFDC-CJ48VE 备品预计出库日逻辑调整 start |
| | | if(String.isNotBlank(message8)){ |
| | | message += '单号No.'+ message8.removeEnd('、')+ '的备品预计出货日应该等于今天,否则不能发货'; |
| | | } |
| | | // add lc 20220927 SFDC-CJ48VE 备品预计出库日逻辑调整 end |
| | | |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error,message)); |
| | | return null; |
| | | } |
| | |
| | | } |
| | | List<Rental_Apply__c> raList = [select Id, DeliverySlip__c, Campaign__c |
| | | , Campaign__r.IF_Approved__c // 20220315 ljh obpm备品决裁状态相关修改 |
| | | , Campaign__r.Meeting_Approved_No__c // 20220315 ljh obpm备品决裁状态相关修改 |
| | | , Campaign__r.Meeting_Approved_No__r.Name // 20220315 ljh obpm备品决裁状态相关修改 |
| | | , Campaign__r.Approved_Status__c // 20220315 ljh obpm备品决裁状态相关修改 |
| | | from Rental_Apply__c where Id in :raSet]; |
| | | Savepoint sp = Database.setSavepoint(); |
| | |
| | | WHERE Date__c >= :startDateSOQL |
| | | AND Date__c <= :Date.today() |
| | | ORDER BY Date__c ASC]; |
| | | |
| | | Map<Date,String> ocMap = new Map<Date,String>(); |
| | | for(OlympusCalendar__c oc:ocList){ |
| | | String IsWorkDay = oc.IsWorkDay__c.format(); |
| | | ocMap.put(oc.Date__c,IsWorkDay); |
| | | } |
| | | for(Datetime dt:dtList){ |
| | | Boolean startFlag = false; |
| | | Boolean endFlag = false; |
| | |
| | | Datetime endTime = Datetime.now(); |
| | | Date endDate = Date.today(); |
| | | // 审批时间是非奥林巴斯工作日 |
| | | if(ocList[0].IsWorkDay__c == 0){ |
| | | // if(ocList[0].IsWorkDay__c == 0){ |
| | | if(ocMap.get(startDate) == '0'){ |
| | | for(OlympusCalendar__c oc:ocList){ |
| | | if(oc.IsWorkDay__c == 1){ |
| | | if(startDate < oc.Date__c && oc.IsWorkDay__c == 1){ |
| | | startTime = Datetime.newInstance(oc.Date__c.year(),oc.Date__c.month(),oc.Date__c.day(),0,0,0); |
| | | startDate = oc.Date__c; |
| | | startFlag = true; |
| | |
| | | } |
| | | // 发货时间是非奥林巴斯工作日 |
| | | if(ocList[ocList.size() - 1].IsWorkDay__c == 0){ |
| | | for(Integer i = ocList.size() - 1; i <= 0;i--){ |
| | | for(Integer i = ocList.size() - 1; i >= 0;i--){ |
| | | if(ocList[i].IsWorkDay__c == 1){ |
| | | endTime = Datetime.newInstance(ocList[i].Date__c.addDays(1).year(),ocList[i].Date__c.addDays(1).month(),ocList[i].Date__c.addDays(1).day(),0,0,0); |
| | | endDate = ocList[i].Date__c.addDays(1); |
| | |
| | | // ra.ApprovedNo_Delivery__c = campMap.get(ra.Campaign__c).Meeting_Approved_No__r.MeetingApprovedNo__c; |
| | | // ra.Approved_State_Delivery__c = campMap.get(ra.Campaign__c).Meeting_Approved_No__r.ProcessState__c; |
| | | // } |
| | | if (ra.Campaign__c != null&& ra.Campaign__r.IF_Approved__c && ra.Campaign__r.Meeting_Approved_No__c != null){ |
| | | ra.ApprovedNo_Delivery__c = ra.Campaign__r.Meeting_Approved_No__c; |
| | | if (ra.Campaign__c != null&& ra.Campaign__r.IF_Approved__c && ra.Campaign__r.Meeting_Approved_No__r.Name != null){ |
| | | ra.ApprovedNo_Delivery__c = ra.Campaign__r.Meeting_Approved_No__r.Name; |
| | | ra.Approved_State_Delivery__c = ra.Campaign__r.Approved_Status__c; |
| | | } |
| | | // 20220315 ljh obpm备品决裁状态相关修改 update end |
| | |
| | | select AssetName__c, SerialNumber_F__c, Repair_Status_F__c, OnStock_By_Cancel__c, Inspection_Comment__c,Inspection_result_after_Final__c, Inspection_result_after_NG_Final__c, Check_lost_Item_F__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name, Fixture_QRCode_F__c, Rental_Apply_Equipment_Set__r.Name, Pre_inspection_time__c, StockDown__c, StockDown_time__c, Id, Name, Asset__c, Asset__r.Name, Asset__r.SerialNumber, Asset__r.Product_Serial_No__c, |
| | | Asset__r.Remark__c, Asset__r.ImageAsset__c, Asset__r.ImageSerial__c, Asset__r.ImageAssetUploadedTime__c, Asset__r.ImageSerialUploadedTime__c, |
| | | Loaner_CDS_Info__c, Inspection_result__c, Check_lost_Item__c, Pre_disinfection__c, Water_leacage_check__c, Inspection_result_after__c, Arrival_in_wh__c, |
| | | Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c, |
| | | Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c, Inspection_NG_abord_reason__c |
| | | Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c, Rental_Apply__r.Name, Rental_Apply__r.Hospital__c, Rental_Apply__r.Hospital__r.Name, |
| | | Rental_Apply__r.Person_In_Charge__c, Rental_Apply__r.Person_In_Charge__r.Name, Rental_Apply__r.demo_purpose2__c, Rental_Apply__r.WorkPlace__c, Rental_Apply__r.OCM_dept_category__c, Fixture_Model_No__c, |
| | | Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c, Inspection_NG_abord_reason__c, Is_Body__c |
| | | from Rental_Apply_Equipment_Set_Detail__c |
| | | where Rental_Apply_Equipment_Set__c in :esIds |
| | | and ((Shipment_request_time2__c <> null and Cancel_Select__c = False ) or Repair_Status_F__c = '修理完毕') |
| | |
| | | // 回库はSet単位で、明細一つ一つのquickCheck要らない |
| | | public boolean quickCheck { get; set; } |
| | | public boolean editable { get; set; } |
| | | // 备品借出申请故障报告 按钮显示逻辑 |
| | | public boolean showFaultRepor { get; set;} |
| | | public String faultReportFlag { get; set;} |
| | | public String personInChargeId { get; set;} |
| | | public String personInChargeName { get; set;} |
| | | public String demoPurpose2 { get; set;} |
| | | public String raName { get; set;} |
| | | public String hospitalId { get; set;} |
| | | public String hospitalName { get; set;} |
| | | public String workPlace { get; set;} |
| | | public String deptCategory { get; set;} |
| | | |
| | | public EsdInfo(Rental_apply_equipment_Set_Detail__c rec) { |
| | | this.rec = rec; |
| | |
| | | if (rec.Asset__r.ImageSerialUploadedTime__c != null) { |
| | | imageSerialUploadedTime = rec.Asset__r.ImageSerialUploadedTime__c.format('yyyy/MM/dd HH:mm'); |
| | | } |
| | | |
| | | //当明细 设备为主体 且 NG时 显示按钮 |
| | | if (rec.Is_Body__c == true && rec.Inspection_result_after__c == 'NG'){ |
| | | showFaultRepor = true; |
| | | } |
| | | |
| | | List<Rental_Apply_Fault__c> rafList = [SELECT Id ,status__c ,Rental_Apply_Equipment_Set_Detail__c from Rental_Apply_Fault__c where Rental_Apply_Equipment_Set_Detail__c = :rec.Id Order By CreatedDate DESC LIMIT 1]; |
| | | |
| | | |
| | | if( rafList != null && rafList.size() > 0 ){ |
| | | this.faultReportFlag = rafList[0].Id; |
| | | }else { |
| | | this.faultReportFlag = '不存在故障报告单'; |
| | | } |
| | | |
| | | personInChargeId = rec.Rental_Apply__r.Person_In_Charge__c; |
| | | personInChargeName = rec.Rental_Apply__r.Person_In_Charge__r.Name; |
| | | demoPurpose2 = rec.Rental_Apply__r.demo_purpose2__c; |
| | | raName = rec.Rental_Apply__r.Name; |
| | | hospitalId = rec.Rental_Apply__r.Hospital__c; |
| | | hospitalName = rec.Rental_Apply__r.Hospital__r.Name; |
| | | workPlace = rec.Rental_Apply__r.WorkPlace__c; |
| | | deptCategory = rec.Rental_Apply__r.OCM_dept_category__c; |
| | | } |
| | | } |
| | | } |
| | |
| | | task.cancelDate__c = date.today(); |
| | | update task; |
| | | //2021-06-09 mzy WLIG-BX3DQ5 【委托】Outlook日历和SFDC日历同步 update start |
| | | String subjectName = targetEvent.Subject; |
| | | if(String.isNotBlank(subjectName)&&subjectName.contains('【')){ |
| | | targetEvent.Subject = subjectName.split('【')[0] + '【已取消】'; |
| | | }else { |
| | | targetEvent.Subject = subjectName +'【已取消】'; |
| | | } |
| | | targetEvent.Subject += '【已取消】'; |
| | | //2021-06-09 mzy WLIG-BX3DQ5 【委托】Outlook日历和SFDC日历同步 update end |
| | | // // 2021-09-15 mzy 任务管理改善开发计划 start |
| | | // //如果任务不为空 |
| | |
| | | // 检索所有有任务(包括主动任务,被动任务)没有报告一览的事件,下月的 |
| | | global EventToEventDetailsBatch(){ |
| | | // this.query = 'select id from Event where task_id__c != \'\' and EventC_ID__c = \'\' and ActivityDate >= '+Date.today().format().ReplaceAll('/', '-')+' and ActivityDate < '+ Date.today().toStartOfMonth().addMonths(2).format().ReplaceAll('/', '-'); |
| | | //20210626 zh 任务框架修改 月末生成本月的报告一览 延期、取消的事件不生成报告一览 start |
| | | // this.query = 'select id from Event where task_id__c != \'\' and EventC_ID__c = \'\' and ActivityDate < '+ Date.today().toStartOfMonth().addMonths(2).format().ReplaceAll('/', '-'); |
| | | this.query = 'select id from Event where task_id__c != \'\' and EventC_ID__c = \'\' and EventStatus__c not in (\'04 取消\',\'05 延期\',\'06 关闭\',\'07 未执行\') and ActivityDate < '+ Date.today().format().ReplaceAll('/', '-'); |
| | | //20210626 zh 任务框架修改 月末生成本月的报告一览 end |
| | | this.query = 'select id from Event where task_id__c != \'\' and EventC_ID__c = \'\' and ActivityDate < '+ Date.today().toStartOfMonth().addMonths(2).format().ReplaceAll('/', '-'); |
| | | system.debug('query:'+query); |
| | | } |
| | | |
| | | // 2021-03-09 mzy WLIG-BYHD79 SFDC环境batch合并调查 start |
| | | global EventToEventDetailsBatch(Boolean NeedExecute) { |
| | | //20210626 zh 任务框架修改 月末生成本月的报告一览 延期、取消的事件不生成报告一览 start |
| | | // this.query = 'select id from Event where task_id__c != \'\' and EventC_ID__c = \'\' and ActivityDate < '+ Date.today().toStartOfMonth().addMonths(2).format().ReplaceAll('/', '-'); |
| | | this.query = 'select id from Event where task_id__c != \'\' and EventC_ID__c = \'\' and EventStatus__c not in (\'04 取消\',\'05 延期\',\'06 关闭\',\'07 未执行\') and ActivityDate < '+ Date.today().format().ReplaceAll('/', '-'); |
| | | //20210626 zh 任务框架修改 月末生成本月的报告一览 end |
| | | this.query = 'select id from Event where task_id__c != \'\' and EventC_ID__c = \'\' and ActivityDate < '+ Date.today().toStartOfMonth().addMonths(2).format().ReplaceAll('/', '-'); |
| | | this.IsNeedExecute = NeedExecute; |
| | | } |
| | | // 2021-03-09 mzy WLIG-BYHD79 SFDC环境batch合并调查 end |
| | |
| | | for(Event eve : (List<Event>)scope){ |
| | | eventIdSet.add(eve.Id); |
| | | } |
| | | List<Event> calenderList = [select id, ActivityDate, OwnerId, Subject, whatid__c, EventC_ID__c, NextEventC_ID__c, AppCdId__c, SyncCreatedDate__c, Task_ID__c,EventStatus__c,cancelReason__c,cancelReasonOther__c,cancelReasonSelect__c,cancelReasonSelectFSE__c,delayReason__c,delayReasonOther__c,delayReasonSelect__c,delayReasonSelectFSE__c,delayToDate__c, |
| | | List<Event> calenderList = [select id, ActivityDate, OwnerId, Subject, whatid__c, EventC_ID__c, NextEventC_ID__c, AppCdId__c, SyncCreatedDate__c, Task_ID__c, |
| | | StartDateTime, DurationInMinutes, Main_Visit_Location__c, Activity_Type2__c, IsScheduled__c, BeforeActivityDate__c, |
| | | Visitor1__c, Visitor2__c, Visitor3__c, Visitor4__c, Visitor5__c, Visitor1_ID__c, Visitor2_ID__c, Visitor3_ID__c, Visitor4_ID__c, Visitor5_ID__c, |
| | | Purpose_Type__c, Location, Related_Opportunity1__c, Related_Service1__c, Related_Opportunity1_ID__c, Related_Service1_ID__c, |
| | |
| | | location = e.Location; |
| | | whatid = e.whatid__c; |
| | | } |
| | | //20210527 zh 任务框架修改 start |
| | | String eventCStatus= ''; |
| | | if ('05 延期'.equals(e.EventStatus__c)) { |
| | | eventCStatus = '延期'; |
| | | }else if ('04 取消'.equals(e.EventStatus__c)) { |
| | | eventCStatus = '取消'; |
| | | } |
| | | //20210527 zh 任务框架修改 end |
| | | Event__c ec = new Event__c( |
| | | Subject__c = e.Subject, |
| | | StartDateTime__c = e.StartDateTime, |
| | |
| | | Activity_PurposeFSE__c = e.Activity_PurposeFSE__c, |
| | | Activity_PurposeEscFSE__c = e.Activity_PurposeEscFSE__c, |
| | | Purpose_TypeFSE__c = e.Purpose_TypeFSE__c, |
| | | Purpose_TypeEscFSE__c = e.Purpose_TypeEscFSE__c, |
| | | //20210527 zh 任务框架修改 start |
| | | eventStatus__c = eventCStatus, |
| | | delayReason__c = e.delayReason__c, |
| | | delayReasonOther__c = e.delayReasonOther__c, |
| | | delayReasonSelect__c = e.delayReasonSelect__c, |
| | | delayReasonSelectFSE__c = e.delayReasonSelectFSE__c, |
| | | CancelReason__c = e.cancelReason__c, |
| | | cancelReasonSelectFSE__c = e.cancelReasonSelectFSE__c, |
| | | cancelReasonSelect__c = e.cancelReasonSelect__c, |
| | | cancelReasonOther__c = e.cancelReasonOther__c, |
| | | delayToDate__c = e.delayToDate__c |
| | | //20210527 zh 任务框架修改 end |
| | | Purpose_TypeEscFSE__c = e.Purpose_TypeEscFSE__c |
| | | ); |
| | | // if(usrJobMap.get(e.OwnerId) != null && usrJobMap.get(e.OwnerId) == '销售服务'){ |
| | | // ec.Activity_PurposeFSE__c = e.Activity_PurposeFSE__c; |
| | |
| | | global class EventToEventDetailsSchedule implements Schedulable { |
| | | global void execute(SchedulableContext sc) { |
| | | // 2021-03-09 mzy WLIG-BYHD79 SFDC环境batch合并调查 start |
| | | //Id execBTId = Database.executeBatch(new EventToEventDetailsBatch(), 20); |
| | | Id execBTId = Database.executeBatch(new EventToEventDetailsBatch(true), 20); |
| | | // 2021-03-09 mzy WLIG-BYHD79 SFDC环境batch合并调查 end |
| | | Id execBTId = Database.executeBatch(new EventToEventDetailsBatch(), 20); |
| | | |
| | | // List < String > accountIdList = new List<String>(); |
| | | // for (Asset acc :[SELECT Id,Hospital__c,Product2.ServiceCategory__c,Product2.Maintenance_Price_Year__c |
| | | // FROM Asset WHERE IF_Coverage_Target_Asset_F__c=1]) { |
| | | // if(!accountIdList.contains(acc.Hospital__c)){ |
| | | // accountIdList.add(acc.Hospital__c); |
| | | // } |
| | | // } |
| | | |
| | | // Id execBTId1 = Database.executebatch(new EquipmentRepairBatch(accountIdList),20); |
| | | Id execBTId1 = Database.executebatch(new EquipmentRepairBatch(),20); |
| | | |
| | | } |
| | | } |
| | |
| | | @isTest |
| | | private class EventToEventDetailsScheduleTest { |
| | | @TestSetup |
| | | static void makeData(){ |
| | | |
| | | Date toDayTime = Date.today(); |
| | | |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'hospitalabc'; |
| | | hospital.Is_Active__c = '有効'; |
| | | hospital.Attribute_Type__c = '卫生部'; |
| | | hospital.Speciality_Type__c = '综合医院'; |
| | | hospital.Grade__c = '一级'; |
| | | hospital.IF_Coverage_Target_HP__c = '1'; |
| | | hospital.OCM_Category__c = 'SLTV'; |
| | | hospital.Is_Medical__c = '医疗机构'; |
| | | hospital.Town__c = '东京'; |
| | | Oly_TriggerHandler.bypass('NFM701ControllerHandler'); |
| | | Oly_TriggerHandler.bypass('UpdateContractAimAmountHandler'); |
| | | insert hospital; |
| | | |
| | | Product2 pro1 = new Product2(Name='name01',IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n01',Serial_Lot_No__c='S/N tracing', |
| | | Fixture_Model_No_T__c = 'n01', |
| | | Maintenance_Price_Year__c = 999, |
| | | Extend_Gurantee_Start_MD__c = Date.newInstance(toDayTime.year(),3,2), |
| | | Extend_Gurantee_End_MD__c = Date.newInstance(3999,12,31), |
| | | Extend_new_product_gurantee_MD__c = true, |
| | | PartSupplyFinishDate__c = Date.newInstance(toDayTime.year()+2,3,2), |
| | | ProductCode_Ext__c='pc01',Manual_Entry__c=false,Brand_Name__c='奥林巴斯', |
| | | Category2__c='本体', |
| | | Category3__c='电子镜'); |
| | | insert pro1; |
| | | |
| | | Account[] strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_OTH']; |
| | | // 診療科を作る |
| | | Account dep = new Account(); |
| | | dep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_OTH'].id; |
| | | dep.Name = 'test dep'; |
| | | dep.AgentCode_Ext__c = System.Label.Account_Asset_FJZ; |
| | | dep.ParentId = strategicDep[0].Id; |
| | | dep.Department_Class__c = strategicDep[0].Id; |
| | | dep.Hospital__c = hospital.Id; |
| | | Oly_TriggerHandler.bypass('NFM701ControllerHandler'); |
| | | Oly_TriggerHandler.bypass('UpdateContractAimAmountHandler'); |
| | | insert dep; |
| | | Asset assetA1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetA1.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetA1.SerialNumber = 'ass01'; |
| | | assetA1.Name = 'ass01'; |
| | | assetA1.AccountId = dep.Id; |
| | | assetA1.Guarantee_period_for_products__c = toDayTime; |
| | | assetA1.Hospital__c = hospital.Id; |
| | | assetA1.Product2Id = pro1.Id; |
| | | assetA1.Quantity = 1; |
| | | assetA1.IF_Coverage_Target_Asset__c = '1'; |
| | | insert assetA1; |
| | | |
| | | } |
| | | |
| | | |
| | | static testMethod void myUnitTest() { |
| | | // This test runs a scheduled job at midnight Sept. 3rd. 2022 |
| | | String CRON_EXP = '0 0 0 3 9 ? 2022'; |
| | | // List<Asset> Assets = [SELECT Id,Hospital__c,Product2.ServiceCategory__c,Product2.Maintenance_Price_Year__c |
| | | // FROM Asset WHERE IF_Coverage_Target_Asset__c = '1']; |
| | | |
| | | // This test runs a scheduled job at midnight Sept. 3rd. 2022 |
| | | String CRON_EXP = '0 0 0 3 9 ? 2023'; |
| | | //System.Test.startTest(); |
| | | // Schedule the test job |
| | | String jobId = |
| | |
| | | // Verify the job has not run |
| | | System.assertEquals(0, ct.TimesTriggered); |
| | | // Verify the next time the job will run |
| | | System.assertEquals('2022-09-03 00:00:00', |
| | | System.assertEquals('2023-09-03 00:00:00', |
| | | String.valueOf(ct.NextFireTime)); |
| | | //System.Test.stopTest(); |
| | | } |
| New file |
| | |
| | | @isTest |
| | | public class FileAddressTriggerTest { |
| | | static testMethod void testMethod1() { |
| | | FileAddress__c fa = new FileAddress__c(); |
| | | fa.AWS_File_Key__c = '1232313123'; |
| | | insert fa; |
| | | delete fa; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>56.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | global class FileBatchDeleteController { |
| | | |
| | | //先删除salesforce的附件 |
| | | WebService static String fileSFDelete(List<String> idList){ |
| | | Savepoint sp = Database.setSavepoint(); |
| | | try{ |
| | | //sf删除 |
| | | Database.delete(idList); |
| | | return 'success'; |
| | | }catch(Exception e){ |
| | | Database.rollback(sp); |
| | | System.debug('失败原因是 : ' + e.getMessage()); |
| | | return '失败原因是 : ' + e.getMessage(); |
| | | } |
| | | } |
| | | |
| | | //再删除AWS那边的附件 |
| | | WebService static String fileAWSDelete(List<String> keyList){ |
| | | try { |
| | | // System.debug('keyList = ' + keyList); |
| | | // Map<String,List<String>> keyMap = new Map<String,List<String>>(); |
| | | // keyMap.put('keys' , keyList); |
| | | String keyJson = JSON.serialize(keyList); |
| | | System.debug('keyJson = ' + keyJson); |
| | | |
| | | String deleteUrl = ''; |
| | | PIHelper.PIIntegration staticResource = null; |
| | | AWS_Integration_Info__mdt awsConfiguration = [SELECT App_Id__c,Token_URL__c,App_Secret__c,Host_URL__c FROM AWS_Integration_Info__mdt WHERE DeveloperName = 'AWS_Default_Configuration']; |
| | | if (awsConfiguration == null) { |
| | | System.debug('AWS_Integration_Info__mdt没配置'); |
| | | return 'AWS_Integration_Info__mdt没配置'; |
| | | }else { |
| | | deleteUrl = awsConfiguration.Host_URL__c + '/api/file/delete'; |
| | | staticResource = PIHelper.getPIIntegrationInfo('Document'); |
| | | } |
| | | Http http = new Http(); |
| | | HttpRequest request = new HttpRequest(); |
| | | // 设置网络服务接口的地址 |
| | | request.setEndpoint(deleteUrl); |
| | | // 设置REST方法 |
| | | request.setMethod('POST'); |
| | | // 设置请求的Header,类型为JSON |
| | | request.setHeader('Content-Type', 'application/json'); |
| | | // 设置请求的token |
| | | request.setHeader('pi-token', staticResource.token); |
| | | // 将一个JSON对象传入请求的Body,设置编程语言的名字 |
| | | request.setBody(keyJson); |
| | | // 发送HTTP请求 |
| | | HttpResponse response = http.send(request); |
| | | System.debug(response); |
| | | // 检查HTTP通信结果状态代码 |
| | | if (response.getStatusCode() == 200) { |
| | | //在控制台输出通信结果 |
| | | System.debug(response.getBody()); |
| | | } |
| | | return 'success'; |
| | | } catch (Exception e) { |
| | | System.debug('失败原因是 : ' + e.getMessage()); |
| | | return '失败原因是 : ' + e.getMessage(); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | public with sharing class FilePreviewDownVFController { |
| | | public String staticResource {get; set;} |
| | | public String fileKey {get; set;} |
| | | public String fileName {get; set;} |
| | | public String type {get; set;} |
| | | public String hostUrl {get; set;} |
| | | public FilePreviewDownVFController(ApexPages.StandardController controller) { |
| | | staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Document')); |
| | | Pagereference pf = ApexPages.currentPage(); |
| | | if(pf != null){ |
| | | fileKey = pf.getParameters().get('key'); |
| | | fileName = pf.getParameters().get('name'); |
| | | type = pf.getParameters().get('type'); |
| | | } |
| | | AWS_Integration_Info__mdt awsConfiguration = [SELECT Host_URL__c FROM AWS_Integration_Info__mdt WHERE DeveloperName = 'AWS_Default_Configuration']; |
| | | if (awsConfiguration == null) { |
| | | System.debug('AWS_Integration_Info__mdt没配置'); |
| | | } |
| | | hostUrl = awsConfiguration.Host_URL__c; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | public with sharing class FilePreviewDownVFControllerTest { |
| | | @TestSetup |
| | | static void makeData(){ |
| | | List<String> strList= new List<String>(); |
| | | strList.add('Document'); |
| | | TestDataUtility.CreatePIPolicyConfigurations(strList); |
| | | } |
| | | static testMethod void testMethod1() { |
| | | Test.startTest(); |
| | | PageReference ref = new PageReference('/apex/FilePreviewDownVFController?key=1&name=2&type=3'); |
| | | Test.setCurrentPage(ref); |
| | | Document doc = new Document(); |
| | | ApexPages.StandardController con = new ApexPages.StandardController(doc); |
| | | FilePreviewDownVFController controller = new FilePreviewDownVFController(con); |
| | | Test.stopTest(); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>56.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | } |
| | | |
| | | public static List<FileAddress__c> getFileds(String parentId){ |
| | | // SWAG-C9S9P6 2022-05-25 ssm start |
| | | // 文件地址里增加招标项目专用字段(信息Id、项目阶段、更新日期) |
| | | if(String.isNotBlank(parentId)){ |
| | | return [SELECT Id,ParentRecordId__c, FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c FROM FileAddress__c where ParentRecordId__c=:parentId order by createddate desc]; |
| | | return [SELECT Id,ParentRecordId__c, FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c |
| | | // SWAG-C9S9P6 新增字段 start |
| | | , InfoId__c, InfoType__c, subInfoType__c, UpdateDate__c |
| | | // SWAG-C9S9P6 新增字段 end |
| | | FROM FileAddress__c where ParentRecordId__c=:parentId order by createddate desc]; |
| | | } |
| | | return [SELECT Id, ParentRecordId__c,FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c FROM FileAddress__c order by createddate desc limit 100]; |
| | | return [SELECT Id, ParentRecordId__c,FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c |
| | | // SWAG-C9S9P6 新增字段 start |
| | | , InfoId__c, InfoType__c, subInfoType__c, UpdateDate__c |
| | | // SWAG-C9S9P6 新增字段 end |
| | | FROM FileAddress__c order by createddate desc limit 100]; |
| | | // SWAG-C9S9P6 2022-05-25 ssm end |
| | | } |
| | | } |
| New file |
| | |
| | | global class FirstContractHistoricalBatch implements Database.Batchable<sObject> { |
| | | public String query; |
| | | |
| | | global FirstContractHistoricalBatch() { |
| | | this.query = query; |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | query = 'select Id,Maintenance_Contract__r.RecordType_Name__c,Maintenance_Contract__r.Contract_Start_Date__c,' |
| | | +' Maintenance_Contract__r.Contract_End_Date__c,Maintenance_Contract__r.Maintenance_Contract_No__c, Asset__r.name,Asset__r.id,asset__r.First_Service_number__c,asset__r.First_Service_Start_Day__c,' |
| | | +' asset__r.First_Service_End_Day__c,CreatedDate from Maintenance_Contract_Asset__c where Maintenance_Contract__r.Status__c = \'契約\' or Maintenance_Contract__r.Status__c = \'契約満了\' order by CreatedDate '; |
| | | |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Maintenance_Contract_Asset__c> mcaList) { |
| | | List<Asset> assList = new List<Asset>(); |
| | | List<String> assSqlList = new List<String>(); |
| | | List<String> macheckList = new List<String>(); |
| | | List<Maintenance_Contract_Asset__c> mcaList2 = new List<Maintenance_Contract_Asset__c>(); |
| | | Map<String,Maintenance_Contract_Asset__c> assetMap = new Map<String,Maintenance_Contract_Asset__c>(); |
| | | for ( Maintenance_Contract_Asset__c mca :mcaList) { |
| | | assSqlList.add(mca.Asset__r.id); |
| | | // 首次出现服务合同 |
| | | if (!assetMap.containsKey(mca.Asset__r.id)&&mca.Maintenance_Contract__r.RecordType_Name__c == '服务合同') { |
| | | assetMap.put(mca.Asset__r.id,mca); |
| | | } |
| | | } |
| | | List<Asset> assList1 = [select id,First_Service_number__c from Asset where id in :assSqlList]; |
| | | for (Asset ass:assList1) { |
| | | if (ass.First_Service_number__c!=null) { |
| | | macheckList.add(ass.First_Service_number__c); |
| | | } |
| | | } |
| | | if (macheckList.size()!=0 && macheckList!=null) { |
| | | mcaList2 = [select id,Asset__r.id,CreatedDate,Maintenance_Contract__r.Contract_Start_Date__c, |
| | | Maintenance_Contract__r.Contract_End_Date__c,Maintenance_Contract__r.Maintenance_Contract_No__c, |
| | | Asset__r.name,asset__r.First_Service_number__c,asset__r.First_Service_Start_Day__c, |
| | | asset__r.First_Service_End_Day__c |
| | | from Maintenance_Contract_Asset__c |
| | | where Maintenance_Contract__r.Maintenance_Contract_No__c in :macheckList]; |
| | | } |
| | | |
| | | for ( Maintenance_Contract_Asset__c mca:mcaList2) { |
| | | if (assetMap.get(mca.Asset__r.id)!=null && (assetMap.get(mca.Asset__r.id).CreatedDate > mca.CreatedDate)) { |
| | | assetMap.remove(mca.Asset__r.id); |
| | | assetMap.put(mca.Asset__r.id,mca); |
| | | } |
| | | } |
| | | |
| | | for (Maintenance_Contract_Asset__c mca:assetMap.values()) { |
| | | Asset ass = new Asset(); |
| | | ass.id = mca.asset__r.id; |
| | | |
| | | ass.First_Service_number__c = mca.Maintenance_Contract__r.Maintenance_Contract_No__c; |
| | | ass.First_Service_End_Day__c = mca.Maintenance_Contract__r.Contract_End_Date__c; |
| | | ass.First_Service_Start_Day__c = mca.Maintenance_Contract__r.Contract_Start_Date__c; |
| | | assList.add(ass); |
| | | } |
| | | |
| | | if (assList.size()>0) { |
| | | update assList; |
| | | } |
| | | |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | @isTest |
| | | private class FirstContractHistoricalBatchTest { |
| | | @testSetup |
| | | private static void init() { |
| | | Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | User MacOwner = new User(Test_staff__c = true, LastName = 'hp1', FirstName = 'owner1', Alias = 'hp', CommunityNickname = 'hpOwner1', Email = 'olympus_hpowner@sunbridge.com',Job_Category__c = '销售服务', Username = 'olympus_hpowner@sunbridge.com1', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id); |
| | | insert MacOwner; |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = |
| | | Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('HP').getRecordTypeId(); |
| | | |
| | | hospital.Name = 'test hospita/l'; |
| | | insert hospital; |
| | | |
| | | // 戦略科室を得る |
| | | List<Account> strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_GI']; |
| | | |
| | | // // 診療科を作る |
| | | Account dep = new Account(); |
| | | dep.recordtypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Department_GI').getRecordTypeId(); |
| | | dep.Name = 'test de/p'; |
| | | dep.ParentId = strategicDep[0].Id; |
| | | dep.Department_Class__c = strategicDep[0].Id; |
| | | dep.Hospital__c = hospital.Id; |
| | | insert dep; |
| | | |
| | | // 製品を作る |
| | | Product2 productA = new Product2( Name='テスト商品', Maintenance_Price_Year__c = 12000, Manual_Entry__c = false,IsActive=true,Family='GI', |
| | | Fixture_Model_No__c='n01',Serial_Lot_No__c='S/N tracing', |
| | | Fixture_Model_No_T__c = 'n01', |
| | | ProductCode_Ext__c='pc01'); |
| | | insert productA; |
| | | |
| | | // 第一期合同 |
| | | Maintenance_Contract__c contract1 = new Maintenance_Contract__c(); |
| | | contract1.Name = 'tect contract1'; |
| | | contract1.Hospital__c = hospital.Id; |
| | | contract1.Department_Class__c = strategicDep[0].Id; |
| | | contract1.Department__c = dep.Id; |
| | | contract1.Service_Contract_Staff__c = MacOwner.Id; |
| | | contract1.Payment_Plan_Sum_First__c = 1; |
| | | contract1.Status__c = '契約'; |
| | | contract1.Maintenance_Contract_No__c = '11123'; |
| | | contract1.recordtypeId = |
| | | Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByDeveloperName().get('NewMaintenance_Contract').getRecordTypeId(); |
| | | contract1.Not_Upper_limit_reason__c = ' 1'; |
| | | contract1.Contract_Start_Date__c = Date.today().addDays( -10); |
| | | contract1.Contract_End_Date__c = Date.today().addDays( 5); |
| | | contract1.SalesOfficeCode_selection__c = '北京RC'; |
| | | insert contract1; |
| | | |
| | | // 第二期合同 |
| | | // Maintenance_Contract__c contract12 = new Maintenance_Contract__c(); |
| | | // contract12.Name = 'tect contract12'; |
| | | // contract12.Not_Upper_limit_reason__c = 'tect contract12'; |
| | | // contract12.RecordtypeId = Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByDeveloperName().get('NewMaintenance_Contract').getRecordTypeId(); |
| | | // contract12.Hospital__c = hospital.Id; |
| | | // contract1.Switch_TimeBase_WF__c = true; |
| | | // contract12.Department_Class__c = strategicDep[0].Id; |
| | | // contract12.Department__c = dep.Id; |
| | | // contract12.Service_Contract_Staff__c = UserInfo.getUserId(); |
| | | // contract12.Maintenance_Contract_No__c = 'tect contract12'; |
| | | // contract12.Status__c = '契約満了'; |
| | | // contract12.Contract_Start_Date__c = Date.today().addMonths(-13); |
| | | // contract12.Contract_End_Date__c = Date.today().addMonths(-1); |
| | | // insert contract12; |
| | | // insert new Maintenance_Contract__c[] {contract1}; |
| | | |
| | | System.debug('contract1 =='+ contract1 ); |
| | | List<Maintenance_Contract__c> listmc = [select id ,Status__c,RecordType_Name__c from Maintenance_Contract__c ]; |
| | | // for (Maintenance_Contract__c mc:listmc) { |
| | | // mc1.id = mc.id; |
| | | // mc1.Status__c = '契約'; |
| | | // update mc1; |
| | | // System.debug('更新成功'+mc1); |
| | | |
| | | // } |
| | | // List<Maintenance_Contract__c> listmc1 = [select id ,Status__c,RecordType_Name__c from Maintenance_Contract__c ]; |
| | | System.debug('listmc'+listmc); |
| | | // System.debug('contract12.Status__c =='+ contract12.Status__c ); |
| | | Asset asset = new Asset(); |
| | | // Asset assetA1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | asset.RecordTypeId = System.Label.Asset_RecordType; |
| | | asset.SerialNumber = 'ass01'; |
| | | asset.Name = 'ass01'; |
| | | asset.AccountId = dep.Id; |
| | | asset.Department_Class__c = strategicDep[0].Id; |
| | | asset.Hospital__c = hospital.Id; |
| | | asset.Product2Id = productA.Id; |
| | | asset.Quantity = 1; |
| | | asset.Status = '有库存'; |
| | | asset.Manage_type__c = '个体管理'; |
| | | asset.Loaner_accsessary__c = false; |
| | | asset.Out_of_wh__c = 0; |
| | | asset.Salesdepartment__c = '1.华北营业本部'; |
| | | asset.Internal_asset_location__c = '北京 备品中心'; |
| | | asset.Product_category__c = 'GI'; |
| | | asset.Equipment_Type__c = '产品试用'; |
| | | asset.SalesProvince__c = '北京'; |
| | | asset.CurrentContract__c = contract1.Id; |
| | | asset.CurrentContract_Asset_Price__c = 0; |
| | | insert asset; |
| | | Asset asset2 = new Asset(); |
| | | // Asset assetA1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | asset2.RecordTypeId = System.Label.Asset_RecordType; |
| | | asset2.SerialNumber = 'ass02'; |
| | | asset2.Name = 'ass02'; |
| | | asset2.AccountId = dep.Id; |
| | | asset2.Department_Class__c = strategicDep[0].Id; |
| | | asset2.Hospital__c = hospital.Id; |
| | | asset2.Product2Id = productA.Id; |
| | | asset2.Quantity = 1; |
| | | asset2.Status = '有库存'; |
| | | asset2.Manage_type__c = '个体管理'; |
| | | asset2.Loaner_accsessary__c = false; |
| | | asset2.Out_of_wh__c = 0; |
| | | asset2.Salesdepartment__c = '1.华北营业本部'; |
| | | asset2.Internal_asset_location__c = '北京 备品中心'; |
| | | asset2.Product_category__c = 'GI'; |
| | | asset2.Equipment_Type__c = '产品试用'; |
| | | asset2.SalesProvince__c = '北京'; |
| | | asset2.CurrentContract__c = contract1.Id; |
| | | asset2.CurrentContract_Asset_Price__c = 0; |
| | | insert asset2; |
| | | //System.Test.stopTest(); |
| | | |
| | | Maintenance_Contract_Asset__c contract1asset1 = new Maintenance_Contract_Asset__c(); |
| | | contract1asset1.Asset__c = asset.Id; |
| | | contract1asset1.Maintenance_Contract__c = contract1.Id; |
| | | contract1asset1.Estimate_List_Price_All_Manual__c = 1000; |
| | | insert contract1asset1; |
| | | // contract1asset.Maintenance_Contract_Asset_Estimate__c = mcae1.id; |
| | | Maintenance_Contract_Asset__c contract1asset2 = new Maintenance_Contract_Asset__c(); |
| | | contract1asset2.Asset__c = asset2.Id; |
| | | contract1asset2.Maintenance_Contract__c = contract1.Id; |
| | | insert contract1asset2; |
| | | // insert new list<Maintenance_Contract_Asset__c> {contract1asset1,contract1asset2 }; |
| | | |
| | | |
| | | // repair01.Account__c = dep.Id; |
| | | |
| | | // // repair01.Repair_Start_Date__c = Date.newInstance(2022,7,20); |
| | | |
| | | // repair01.Department_Class__c = strategicDep[0].Id; |
| | | // repair01.Hospital__c = hospital.Id; |
| | | // repair01.Dealer__c = dep.Id; |
| | | // // repair01.Status1__c = '3.维修阶段'; |
| | | // repair01.Delivered_Product__c = asset.Id; |
| | | |
| | | // insert repair01; |
| | | Repair__c repair1 = new Repair__c(); |
| | | repair1.Service_Repair_No__c = 'repair1'; |
| | | repair1.Hospital__c = hospital.Id; |
| | | repair1.Account__c = dep.Id; |
| | | repair1.Department_Class__c = strategicDep[0].id; |
| | | repair1.Delivered_Product__c = asset.Id; |
| | | repair1.Repair_List_Price__c = 100; |
| | | repair1.Billing_Amount__c = 10; |
| | | repair1.Paid_Amount__c = 1; |
| | | repair1.DateReceiptQuestions__c = Date.newInstance(2022,7,20); |
| | | repair1.Failure_Occurrence_Date__c = Date.today().addDays(-1); |
| | | repair1.Repair_Returned_To_HP_Date__c = Date.today().addDays(3); |
| | | repair1.Repair_Shipped_Date__c = Date.today().addDays(1); |
| | | repair1.Maintenance_Contract__c = contract1.id; |
| | | System.debug('repair1.Maintenance_Contract__c =='+ repair1.Maintenance_Contract__c ); |
| | | System.debug('repair01.Status1__c =='+ repair1.Status1__c ); |
| | | system.debug('day=='+Date.today().addYears(-1)); |
| | | System.debug('repair01.DateReceiptQuestions__c =='+ repair1.DateReceiptQuestions__c ); |
| | | insert repair1; |
| | | |
| | | |
| | | } |
| | | @isTest static void test_method_one(){ |
| | | System.Test.startTest(); |
| | | Database.executeBatch(new FirstContractHistoricalBatch(),200); |
| | | System.Test.stopTest(); |
| | | } |
| | | } |
| force-app/main/default/classes/FirstContractHistoricalBatchTest.cls-meta.xml
force-app/main/default/classes/FixtureRemindController.cls
force-app/main/default/classes/FixtureSetHandler.cls
force-app/main/default/classes/FixtureUtil.cls
force-app/main/default/classes/FollowTriggerHandler.cls
force-app/main/default/classes/FrameNumController.cls
force-app/main/default/classes/FrameNumController.cls-meta.xml
force-app/main/default/classes/FrameNumControllerTest.cls
force-app/main/default/classes/FrameNumControllerTest.cls-meta.xml
force-app/main/default/classes/FrameNumManageHandler.cls
force-app/main/default/classes/FrameNumManageHandler.cls-meta.xml
force-app/main/default/classes/FrameNumUploadController.cls
force-app/main/default/classes/FrameNumUploadController.cls-meta.xml
force-app/main/default/classes/FrameNumUploadControllerTest.cls
force-app/main/default/classes/FrameNumUploadControllerTest.cls-meta.xml
force-app/main/default/classes/HospitalApprovalResponseController.cls
force-app/main/default/classes/ImportDocTController.cls
force-app/main/default/classes/ImportDocTController.cls-meta.xml
force-app/main/default/classes/ImprovedForecastTimeController.cls-meta.xml
force-app/main/default/classes/ImprovedForecastTimeControllerTest.cls
force-app/main/default/classes/ImprovedForecastTimeControllerTest.cls-meta.xml
force-app/main/default/classes/InquiryFormHandlerTest.cls
force-app/main/default/classes/InquiryPredictsDateChangeHandler.cls-meta.xml
force-app/main/default/classes/InquiryPredictsDateChangeHandlerTest.cls
force-app/main/default/classes/InquiryPredictsDateChangeHandlerTest.cls-meta.xml
force-app/main/default/classes/InquiryVerifyBatch.cls
force-app/main/default/classes/InquiryVerifyBatchTest.cls
force-app/main/default/classes/InspectCheckController.cls
force-app/main/default/classes/InspectCheckControllerTest.cls
force-app/main/default/classes/InspectionReportTriggerHandler.cls
force-app/main/default/classes/InventoryController.cls
force-app/main/default/classes/InventoryControllerTest.cls
force-app/main/default/classes/InventoryHeaderCopyHandlerTest.cls
force-app/main/default/classes/InventoryHeaderCopyHandlerTest.cls-meta.xml
force-app/main/default/classes/InventoryHeaderHandler.cls
force-app/main/default/classes/InventoryResultRecordCopyControllerTest.cls
force-app/main/default/classes/InventoryStartAssetSnapshotCopyBatchTest.cls
force-app/main/default/classes/KPIPreviewScheduel.cls
force-app/main/default/classes/KPIPreviewScheduelTest.cls
force-app/main/default/classes/KPIPreviewScheduelTest.cls-meta.xml
force-app/main/default/classes/LCC_JSMQueryResultService.cls
force-app/main/default/classes/LCC_JSMQueryResultService.cls-meta.xml
force-app/main/default/classes/LCC_JSMQueryResultServiceTest.cls
force-app/main/default/classes/LCC_JSMQueryResultServiceTest.cls-meta.xml
force-app/main/default/classes/LCC_JSMSiteInfo.cls
force-app/main/default/classes/LCC_JSMSiteInfo.cls-meta.xml
force-app/main/default/classes/LCC_JSMUserInfo.cls
force-app/main/default/classes/LCC_JSMUserInfo.cls-meta.xml
force-app/main/default/classes/LabelPrintController.cls
force-app/main/default/classes/LabelPrintController.cls-meta.xml
force-app/main/default/classes/LastbuyProductHandler.cls
force-app/main/default/classes/LastbuyProductHandlerTest.cls
force-app/main/default/classes/LeadDemoPIPLController.cls
force-app/main/default/classes/LeadDemoPIPLController.cls-meta.xml
force-app/main/default/classes/LeadTriggerTest.cls
force-app/main/default/classes/LightningForgotPasswordController.cls
force-app/main/default/classes/LightningForgotPasswordController.cls-meta.xml
force-app/main/default/classes/LightningForgotPasswordControllerTest.cls
force-app/main/default/classes/LightningForgotPasswordControllerTest.cls-meta.xml
force-app/main/default/classes/LightningLoginFormController.cls
force-app/main/default/classes/LightningLoginFormController.cls-meta.xml
force-app/main/default/classes/LightningLoginFormControllerTest.cls
force-app/main/default/classes/LightningLoginFormControllerTest.cls-meta.xml
force-app/main/default/classes/LightningSelfRegisterController.cls
force-app/main/default/classes/LightningSelfRegisterController.cls-meta.xml
force-app/main/default/classes/LightningSelfRegisterControllerTest.cls
force-app/main/default/classes/LightningSelfRegisterControllerTest.cls-meta.xml
force-app/main/default/classes/LightningUtil.cls
force-app/main/default/classes/LightningUtilTest.cls
force-app/main/default/classes/LogAutoSendBatch.cls
force-app/main/default/classes/LogAutoSendSchedule.cls
force-app/main/default/classes/LogAutoSendScheduleTest.cls
force-app/main/default/classes/LostByCompany.cls
force-app/main/default/classes/LostByCompany.cls-meta.xml
force-app/main/default/classes/LostByCompanyTest.cls
force-app/main/default/classes/LostByCompanyTest.cls-meta.xml
force-app/main/default/classes/LostCancelReport2AssetTriggerTest.cls
force-app/main/default/classes/LostCancelReportHandler.cls
force-app/main/default/classes/LostCancelReportHandlerTest.cls
force-app/main/default/classes/LostCancelReportOppBatch.cls
force-app/main/default/classes/LostCancelReportOppBatchTest.cls
force-app/main/default/classes/LostReportEditAssetController.cls
force-app/main/default/classes/LostReportEditControllerTest.cls
force-app/main/default/classes/LostReportHandler.cls
force-app/main/default/classes/MCAEHandler.cls
force-app/main/default/classes/MCAgentPDFControllerTest.cls
force-app/main/default/classes/MCHPDFControllerTest.cls
force-app/main/default/classes/MCUpdateEstimateCostBatch.cls
force-app/main/default/classes/MDMITMRest.cls
force-app/main/default/classes/MainFixtureSelectController.cls
force-app/main/default/classes/MaintenanceCommissionPDFController.cls
force-app/main/default/classes/MaintenanceContractAssetTriggerTester.cls
force-app/main/default/classes/MaintenanceContractEstimatePDFController.cls
force-app/main/default/classes/MaintenanceContractNotOpenController.cls
force-app/main/default/classes/MaintenanceContractTriggerTest.cls
force-app/main/default/classes/MaintenanceContractVMPDFController.cls
force-app/main/default/classes/MaintenanceProductDataController.cls
force-app/main/default/classes/MaintenanceProductDataControllerTest.cls
force-app/main/default/classes/MaintenanceUpdateProductHandler.cls
force-app/main/default/classes/MeetingDelayApplyTriggerHandler.cls
force-app/main/default/classes/MergeAgencyActivityBatchTest.cls
force-app/main/default/classes/MergeObjectBatch.cls
force-app/main/default/classes/MergeObjectBatch.cls-meta.xml
force-app/main/default/classes/MergeObjectBatchTest.cls
force-app/main/default/classes/MergeObjectBatchTest.cls-meta.xml
force-app/main/default/classes/MetaDataUtility.cls
force-app/main/default/classes/NFM001TriggerTest.cls
force-app/main/default/classes/NFM007Controller.cls
force-app/main/default/classes/NFM007TriggerTest.cls
force-app/main/default/classes/NFM009Controller.cls
force-app/main/default/classes/NFM009Controller.cls-meta.xml
force-app/main/default/classes/NFM010Rest.cls
force-app/main/default/classes/NFM010UpsertStatuAchievementsTriggerTest.cls
force-app/main/default/classes/NFM012Rest.cls
force-app/main/default/classes/NFM103Controller.cls
force-app/main/default/classes/NFM103ControllerTest.cls
force-app/main/default/classes/NFM104Rest.cls
force-app/main/default/classes/NFM105Rest.cls
force-app/main/default/classes/NFM105RestTest.cls
force-app/main/default/classes/NFM106Controller.cls
force-app/main/default/classes/NFM106ControllerTest.cls
force-app/main/default/classes/NFM110Rest.cls
force-app/main/default/classes/NFM112BatchTest.cls
force-app/main/default/classes/NFM115Controller.cls
force-app/main/default/classes/NFM116Batch.cls
force-app/main/default/classes/NFM117Rest.cls
force-app/main/default/classes/NFM117Rest.cls-meta.xml
force-app/main/default/classes/NFM117RestTest.cls
force-app/main/default/classes/NFM117RestTest.cls-meta.xml
force-app/main/default/classes/NFM202Controller.cls
force-app/main/default/classes/NFM203Rest.cls
force-app/main/default/classes/NFM206Rest.cls
force-app/main/default/classes/NFM206RestTest.cls
force-app/main/default/classes/NFM211Rest.cls
force-app/main/default/classes/NFM301Rest.cls
force-app/main/default/classes/NFM301SendEmail.cls
force-app/main/default/classes/NFM401Controller.cls
force-app/main/default/classes/NFM401ControllerTest.cls
force-app/main/default/classes/NFM402Batch.cls
force-app/main/default/classes/NFM501FutureController.cls
force-app/main/default/classes/NFM501TIDetailHistoryDataBatch.cls
force-app/main/default/classes/NFM501TIDetailHistoryDataBatch.cls-meta.xml
force-app/main/default/classes/NFM501TIDetailHistoryDataBatchTest.cls
force-app/main/default/classes/NFM501TIDetailHistoryDataBatchTest.cls-meta.xml
force-app/main/default/classes/NFM502Controller.cls
force-app/main/default/classes/NFM503InfoFileBatch.cls
force-app/main/default/classes/NFM504Controller.cls
force-app/main/default/classes/NFM601Controller.cls
force-app/main/default/classes/NFM601ControllerTest.cls
force-app/main/default/classes/NFM603Controller.cls
force-app/main/default/classes/NFM603ControllerTest.cls
force-app/main/default/classes/NFM606Controller.cls
force-app/main/default/classes/NFM606Controller.cls-meta.xml
force-app/main/default/classes/NFM606ControllerTest.cls
force-app/main/default/classes/NFM607Rest.cls
force-app/main/default/classes/NFM607RestTest.cls
force-app/main/default/classes/NFM608Rest.cls
force-app/main/default/classes/NFM609RestTest.cls
force-app/main/default/classes/NFM611Rest.cls
force-app/main/default/classes/NFM612Controller.cls
force-app/main/default/classes/NFM612Controller.cls-meta.xml
force-app/main/default/classes/NFM612Rest.cls
force-app/main/default/classes/NFM620Rest.cls
force-app/main/default/classes/NFM620RestTest.cls
force-app/main/default/classes/NFM621Controller.cls
force-app/main/default/classes/NFM624Batch.cls
force-app/main/default/classes/NFM624BatchSchedulableTest.cls
force-app/main/default/classes/NFM624BatchTest.cls
force-app/main/default/classes/NFM624Rest.cls
force-app/main/default/classes/NFM624Rest2.cls
force-app/main/default/classes/NFM624Rest2.cls-meta.xml
force-app/main/default/classes/NFM624Rest2Test.cls
force-app/main/default/classes/NFM624Rest2Test.cls-meta.xml
force-app/main/default/classes/NFM624RestAbout.cls
force-app/main/default/classes/NFM624RestAbout2.cls
force-app/main/default/classes/NFM624RestAbout2.cls-meta.xml
force-app/main/default/classes/NFM701Controller.cls
force-app/main/default/classes/NFM701ControllerHandler.cls
force-app/main/default/classes/NFM703WebServiceTest.cls-meta.xml
force-app/main/default/classes/NFM704Rest.cls
force-app/main/default/classes/NFM704RestTest.cls
force-app/main/default/classes/NFMUtil.cls
force-app/main/default/classes/NewAccountExamineController.cls
force-app/main/default/classes/NewAccountExamineController.cls-meta.xml
force-app/main/default/classes/NewAccountExamineControllerTest.cls
force-app/main/default/classes/NewAccountExamineControllerTest.cls-meta.xml
force-app/main/default/classes/NewAgencyContactController.cls
force-app/main/default/classes/NewAgencyContactControllerTest.cls
force-app/main/default/classes/NewAgencyOpportunityController.cls
force-app/main/default/classes/NewAgencyOpportunityController.cls-meta.xml
force-app/main/default/classes/NewAgencyOpportunityControllerTest.cls
force-app/main/default/classes/NewAgencyOpportunityControllerTest.cls-meta.xml
force-app/main/default/classes/NewAndEditASEActivityController.cls
force-app/main/default/classes/NewAndEditAddressController.cls
force-app/main/default/classes/NewAndEditAddressControllerTest.cls
force-app/main/default/classes/NewAndEditAgencyOppoControllerTest.cls
force-app/main/default/classes/NewAndEditAgencyOppoControllerTest.cls-meta.xml
force-app/main/default/classes/NewAndEditAgencyOpportunityController.cls
force-app/main/default/classes/NewAndEditAgencyOpportunityController.cls-meta.xml
force-app/main/default/classes/NewAndEditBaseController.cls
force-app/main/default/classes/NewAndEditBaseControllerTest.cls
force-app/main/default/classes/NewAndEditCaseController.cls
force-app/main/default/classes/NewAndEditCaseControllerTest.cls
force-app/main/default/classes/NewAndEditContactController.cls
force-app/main/default/classes/NewAndEditContactControllerTest.cls
force-app/main/default/classes/NewAndEditInquiryFormController.cls
force-app/main/default/classes/NewAndEditInspectionReportController.cls
force-app/main/default/classes/NewAndEditLeadController.cls
force-app/main/default/classes/NewAndEditLeadControllerTest.cls
force-app/main/default/classes/NewAndEditQISController.cls
force-app/main/default/classes/NewAndEditQISControllerTest.cls
force-app/main/default/classes/NewAndEditRepairSubOrderController.cls
force-app/main/default/classes/NewAndEditReportController.cls
force-app/main/default/classes/NewAndEditReportControllerTest.cls
force-app/main/default/classes/NewAndEditTenderinformationController.cls
force-app/main/default/classes/NewConsumApplyController.cls
force-app/main/default/classes/NewConsumApplyControllerTest.cls
force-app/main/default/classes/NewConsumApplyEquipSetDetailControlTest.cls
force-app/main/default/classes/NewConsumApplyEquipSetDetailController.cls
force-app/main/default/classes/NewMCAgentLimitPDFController.cls
force-app/main/default/classes/NewMCAgentLimitPDFController.cls-meta.xml
force-app/main/default/classes/NewMCAgentLimitPDFControllerTest.cls
force-app/main/default/classes/NewMCAgentLimitPDFControllerTest.cls-meta.xml
force-app/main/default/classes/NewMCAgentPDFController.cls
force-app/main/default/classes/NewMCAgentUpperLimitPDFController.cls
force-app/main/default/classes/NewMCAgentUpperLimitPDFController.cls-meta.xml
force-app/main/default/classes/NewMCAgentUpperLimitPDFControllerTest.cls
force-app/main/default/classes/NewMCAgentUpperLimitPDFControllerTest.cls-meta.xml
force-app/main/default/classes/NewMCHLimitPDFController.cls
force-app/main/default/classes/NewMCHLimitPDFControllerTest.cls
force-app/main/default/classes/NewMCHLimitPDFControllerTest.cls-meta.xml
force-app/main/default/classes/NewMCHPDFController.cls
force-app/main/default/classes/NewMCHUpperLimitPDFController.cls
force-app/main/default/classes/NewMCHUpperLimitPDFController.cls-meta.xml
force-app/main/default/classes/NewMCHUpperLimitPDFControllerTest.cls
force-app/main/default/classes/NewMCHUpperLimitPDFControllerTest.cls-meta.xml
force-app/main/default/classes/NewPaymentPlanLoadController.cls
force-app/main/default/classes/NewPaymentPlanLoadControllerTest.cls
force-app/main/default/classes/NewQuoteEntryController.cls
force-app/main/default/classes/NewQuoteEntryControllerTest.cls
force-app/main/default/classes/NewQuoteEntryWebService.cls
force-app/main/default/classes/NewQuoteIraiController.cls
force-app/main/default/classes/NewQuoteIraiController.cls-meta.xml
force-app/main/default/classes/NewQuoteIraiControllerTest.cls
force-app/main/default/classes/NewQuoteIraiControllerTest.cls-meta.xml
force-app/main/default/classes/NewRepairController.cls
force-app/main/default/classes/NewRepairControllerTest.cls
force-app/main/default/classes/NextMContractHistoricalBatch.cls
force-app/main/default/classes/NextMContractHistoricalBatch.cls-meta.xml
force-app/main/default/classes/NextMContractHistoricalBatchTest.cls
force-app/main/default/classes/NextMContractHistoricalBatchTest.cls-meta.xml
force-app/main/default/classes/NextMonthVisitBatch.cls
force-app/main/default/classes/OFSCalendarController.cls
force-app/main/default/classes/OFSCalendarControllerTest.cls
force-app/main/default/classes/OFSCalendarControllerTest.cls-meta.xml
force-app/main/default/classes/OFSInsReportLayoutController.cls
force-app/main/default/classes/OFSInsReportLayoutForVmController.cls
force-app/main/default/classes/OPDPlanCancelPostponePlanLogicBatch.cls
force-app/main/default/classes/OPDPlanCancelPostponePlanLogicBatchTest.cls
force-app/main/default/classes/OPDPlanHandler.cls
force-app/main/default/classes/OPDPlanHandlerTest.cls
force-app/main/default/classes/OPDPlanMarkBatchSchedule.cls
force-app/main/default/classes/OPDPlanMarkBatchScheduleTest.cls
force-app/main/default/classes/OPDPlanSystemDelayBatch.cls
force-app/main/default/classes/OPDSortManageController.cls
force-app/main/default/classes/OPDSortManageControllerTest.cls
force-app/main/default/classes/OdsToUserHandler.cls
force-app/main/default/classes/OnCallController.cls
force-app/main/default/classes/OnCallControllerTest.cls
force-app/main/default/classes/OncallFinalStatusManager.cls
force-app/main/default/classes/OpdAmountBatch.cls
force-app/main/default/classes/OpdAmountBatchTest.cls
force-app/main/default/classes/OpdPlanWebService.cls
force-app/main/default/classes/OppStrategyProductBatch.cls
force-app/main/default/classes/OppStrategyProductBatch.cls-meta.xml
force-app/main/default/classes/OppStrategyProductBatchTest.cls
force-app/main/default/classes/OppStrategyProductBatchTest.cls-meta.xml
force-app/main/default/classes/Opponent_Bid_InformationHandler.cls
force-app/main/default/classes/OpportunityAndContactDailyUpdateTest.cls
force-app/main/default/classes/OpportunityBefInsUpdTriggerTest.cls
force-app/main/default/classes/OpportunityHpDeptUpdTriggerTest.cls
force-app/main/default/classes/OpportunityLineItemTrigger.cls
force-app/main/default/classes/OpportunityLineItemTriggerTest.cls
force-app/main/default/classes/OpportunityPCLController2.cls
force-app/main/default/classes/OpportunityServiceTest.cls
force-app/main/default/classes/OpportunityTrigger.cls
force-app/main/default/classes/OpportunityTriggerTest.cls
force-app/main/default/classes/OpportunityWebService.cls
force-app/main/default/classes/OpportunityWebServiceTest.cls
force-app/main/default/classes/Opportunity_Shipments_ForecastBatch.cls
force-app/main/default/classes/Opportunity_Shipments_ForecastBatchTest.cls
force-app/main/default/classes/OrdergoodsController.cls
force-app/main/default/classes/OrdergoodsControllerTest.cls
force-app/main/default/classes/OtherButtonOppCtl.cls
force-app/main/default/classes/OtherButtonOppCtl.cls-meta.xml
force-app/main/default/classes/PAEDecisionRecordController.cls
force-app/main/default/classes/PAEDecisionRecordControllerTest.cls
force-app/main/default/classes/PAEDecisionRecordTriggerTest.cls
force-app/main/default/classes/PCLLostProduct2AssetHandler.cls
force-app/main/default/classes/PCLLostProduct2AssetHandlerTest.cls
force-app/main/default/classes/PCLLostReportController.cls
force-app/main/default/classes/PIHelper.cls
force-app/main/default/classes/PagePlus.cls
force-app/main/default/classes/PagePlusTest.cls
force-app/main/default/classes/PaymentMaintenanceContractTriggerHTest.cls
force-app/main/default/classes/PaymentMaintenanceContractTriggerHandler.cls
force-app/main/default/classes/PaymentMaintenanceContractTriggerTest.cls
force-app/main/default/classes/PersonalCalendarControllerTest.cls
force-app/main/default/classes/PowerBIUpdateBatch.cls
force-app/main/default/classes/PowerBIUpdateBatchTest.cls
force-app/main/default/classes/PretechBatchEmailUtil.cls
force-app/main/default/classes/PrintConsumblePDFController.cls
force-app/main/default/classes/PrintConsumblePDFControllertTest.cls
force-app/main/default/classes/ProcessInstanceSolController.cls
force-app/main/default/classes/Product2Handler.cls
force-app/main/default/classes/Product2HandlerTest.cls
force-app/main/default/classes/QISMBCTrigger.cls
force-app/main/default/classes/QISToETQWebServiceTest.cls
force-app/main/default/classes/QuoteIraiHandler.cls
force-app/main/default/classes/QuoteIraiHandler.cls-meta.xml
force-app/main/default/classes/QuoteIraiHandlerTest.cls
force-app/main/default/classes/QuoteIraiHandlerTest.cls-meta.xml
force-app/main/default/classes/QuoteTrialController.cls
force-app/main/default/classes/QuoteTrialControllerTest.cls
force-app/main/default/classes/ReceivingNoteWaitingReceiptController.cls
force-app/main/default/classes/RefixApprovalResponseController.cls
force-app/main/default/classes/RefixApprovalResponseController.cls-meta.xml
force-app/main/default/classes/RefixApprovalResponseControllerTest.cls
force-app/main/default/classes/RefixApprovalResponseControllerTest.cls-meta.xml
force-app/main/default/classes/RemoveBoxController.cls
force-app/main/default/classes/RenewTargetToAsotBatch.cls
force-app/main/default/classes/RenewTargetToAsotBatch.cls-meta.xml
force-app/main/default/classes/RenewTargetToAsotBatchTest.cls
force-app/main/default/classes/RenewTargetToAsotBatchTest.cls-meta.xml
force-app/main/default/classes/RentalAgencyReceivedControllerTest.cls
force-app/main/default/classes/RentalApplyBeforeUpdateTriggerTest.cls
force-app/main/default/classes/RentalApplyController.cls
force-app/main/default/classes/RentalApplyControllerTest.cls
force-app/main/default/classes/RentalApplyDetailStatusUpdateBatch.cls
force-app/main/default/classes/RentalApplyEquipmentSetDetailHandler.cls
force-app/main/default/classes/RentalApplyEquipmentSetDetailHandlerTest.cls
force-app/main/default/classes/RentalApplyEquipmentSetHandler.cls
force-app/main/default/classes/RentalApplyEquipmentSetHandlerTest.cls
force-app/main/default/classes/RentalApplyEquipmentSetWebService.cls
force-app/main/default/classes/RentalApplyExtensionsController.cls
force-app/main/default/classes/RentalApplyFaultHandler.cls
force-app/main/default/classes/RentalApplyFaultHandler.cls-meta.xml
force-app/main/default/classes/RentalApplyFaultHandlerTest.cls
force-app/main/default/classes/RentalApplyFaultHandlerTest.cls-meta.xml
force-app/main/default/classes/RentalApplyFaultHandlerWebServiceTest.cls
force-app/main/default/classes/RentalApplyFaultHandlerWebServiceTest.cls-meta.xml
force-app/main/default/classes/RentalApplyFaultReportController.cls
force-app/main/default/classes/RentalApplyFaultReportController.cls-meta.xml
force-app/main/default/classes/RentalApplyFinalReplyDayBatch.cls
force-app/main/default/classes/RentalApplyFinalReplyDayBatch.cls-meta.xml
force-app/main/default/classes/RentalApplyFinalReplyDayBatchTest.cls
force-app/main/default/classes/RentalApplyFinalReplyDayBatchTest.cls-meta.xml
force-app/main/default/classes/RentalApplyFinalReplyDaySchedule.cls
force-app/main/default/classes/RentalApplyFinalReplyDaySchedule.cls-meta.xml
force-app/main/default/classes/RentalApplySequenceController.cls
force-app/main/default/classes/RentalApplyShareHandler.cls
force-app/main/default/classes/RentalApplyShareHandlerTest.cls
force-app/main/default/classes/RentalApplySplitController.cls
force-app/main/default/classes/RentalApplyTriggerHandler.cls
force-app/main/default/classes/RentalApplyTriggerTest.cls
force-app/main/default/classes/RentalApplyWebService.cls
force-app/main/default/classes/RentalFixtureManage11Test.cls
force-app/main/default/classes/RentalFixtureManage1Test.cls
force-app/main/default/classes/RentalFixtureManage5Test.cls
force-app/main/default/classes/RentalFixtureSetAssignAgencyController.cls
force-app/main/default/classes/RentalFixtureSetAssignController.cls
force-app/main/default/classes/RentalFixtureSetAssignControllerTest.cls
force-app/main/default/classes/RentalHpDeptUpdHandler.cls
force-app/main/default/classes/RentalHpDeptUpdTriggerTest.cls
force-app/main/default/classes/RentalReportExportController.cls
force-app/main/default/classes/RentalReportExportController.cls-meta.xml
force-app/main/default/classes/RentalReportExportControllerTest.cls
force-app/main/default/classes/RentalReportExportControllerTest.cls-meta.xml
force-app/main/default/classes/RepairAgainAnHandler.cls
force-app/main/default/classes/RepairAgainAnHandler.cls-meta.xml
force-app/main/default/classes/RepairAgainAnHandlerTest.cls
force-app/main/default/classes/RepairAgainAnHandlerTest.cls-meta.xml
force-app/main/default/classes/RepairAgainAnMBCHandler.cls
force-app/main/default/classes/RepairAgainAnMBCHandler.cls-meta.xml
force-app/main/default/classes/RepairAgainAnPDFController.cls
force-app/main/default/classes/RepairAgainAnPDFControllerTest.cls-meta.xml
force-app/main/default/classes/RepairAndQISToPDFController.cls
force-app/main/default/classes/RepairBeforeInsertHandler.cls
force-app/main/default/classes/RepairBeforeInsertHandlerTest.cls
force-app/main/default/classes/RepairOrderHandler.cls
force-app/main/default/classes/RepairOrderHandler.cls-meta.xml
force-app/main/default/classes/RepairOrderHandlerTest.cls
force-app/main/default/classes/RepairOrderHandlerTest.cls-meta.xml
force-app/main/default/classes/RepairQuoteTrigger.cls
force-app/main/default/classes/RepairQuoteTriggerTest.cls
force-app/main/default/classes/RepairResonCannotWarrantyHistoricalBatch.cls
force-app/main/default/classes/RepairResonCannotWarrantyHistoricalBatch.cls-meta.xml
force-app/main/default/classes/RepairResonHistoricalBatchTest.cls
force-app/main/default/classes/RepairResonHistoricalBatchTest.cls-meta.xml
force-app/main/default/classes/RepairTrigger.cls
force-app/main/default/classes/RepairTriggerTester.cls
force-app/main/default/classes/ResponseBodyLWC.cls
force-app/main/default/classes/ResponseBodyLWC.cls-meta.xml
force-app/main/default/classes/RetrospectiveWeeklyReportController.cls
force-app/main/default/classes/RetrospectiveWeeklyReportControllerTest.cls
force-app/main/default/classes/RetrospectiveWeeklyReportControllerTest.cls-meta.xml
force-app/main/default/classes/RollupToHPBatch.cls
force-app/main/default/classes/RollupToHPBatchTest.cls
force-app/main/default/classes/RollupToMaintenanceContractBatch.cls
force-app/main/default/classes/RollupToMaintenanceContractSchedule.cls
force-app/main/default/classes/RollupToMaintenanceContractScheduleTest.cls
force-app/main/default/classes/RollupToOPDSchedule.cls
force-app/main/default/classes/SI_NewQuoteEntryControllerTest.cls
force-app/main/default/classes/SSBackorderBatch.cls
force-app/main/default/classes/SSOpportunityBatch.cls
force-app/main/default/classes/SaleOrderController.cls
force-app/main/default/classes/SearchAgencyContactController.cls
force-app/main/default/classes/SearchAgencyContactController.cls-meta.xml
force-app/main/default/classes/SearchContactController.cls
force-app/main/default/classes/SearchContactControllerTest.cls
force-app/main/default/classes/SearchProductController.cls
force-app/main/default/classes/SearchVisitorController.cls
force-app/main/default/classes/SearchVisitorController.cls-meta.xml
force-app/main/default/classes/SearchVistorControllerTest.cls
force-app/main/default/classes/SelectAssetEstimateController.cls
force-app/main/default/classes/SelectAssetEstimateControllerTest.cls
force-app/main/default/classes/SelectAssetEstimateURFController.cls
force-app/main/default/classes/SelectAssetEstimateURFControllerTest.cls
force-app/main/default/classes/SelectAssetEstimateURFgzwController.cls
force-app/main/default/classes/SelectAssetEstimateURFgzwController.cls-meta.xml
force-app/main/default/classes/SelectAssetEstimateVMController.cls
force-app/main/default/classes/SelectAssetEstimateVMControllerTest.cls
force-app/main/default/classes/SelectAssetExtension.cls
force-app/main/default/classes/SelectAssetExtensionTester.cls
force-app/main/default/classes/SetFrameNumManageBatch.cls
force-app/main/default/classes/SetFrameNumManageBatch.cls-meta.xml
force-app/main/default/classes/SetFrameNumManageWebService.cls
force-app/main/default/classes/SetFrameNumManageWebService.cls-meta.xml
force-app/main/default/classes/SetOlympusCalendarWorkDayBatch.cls
force-app/main/default/classes/SetPersonalTargetController.cls
force-app/main/default/classes/SetProvinceTargetBatchTest.cls
force-app/main/default/classes/SetProvinceTargetBatchTest.cls-meta.xml
force-app/main/default/classes/SetProvinceTargetController.cls
force-app/main/default/classes/SetProvinceTargetControllerTest.cls
force-app/main/default/classes/Sfdc2SapDealersContractBatch.cls
force-app/main/default/classes/Sfdc2SapDealersContractBatchTest.cls
force-app/main/default/classes/Sfdc2SapDealersContractSchedulable.cls
force-app/main/default/classes/ShipmentController.cls
force-app/main/default/classes/SimpleEventRegisterController.cls
force-app/main/default/classes/SoapApi.cls
force-app/main/default/classes/SpareIsLoanBatch.cls
force-app/main/default/classes/SpareIsLoanBatchSchedule.cls
force-app/main/default/classes/SpareIsLoanBatchScheduleTesT.cls
force-app/main/default/classes/SpareIsLoanBatchTest.cls
force-app/main/default/classes/StandardFieldDefaultsController.cls
force-app/main/default/classes/StandardFieldDefaultsController.cls-meta.xml
force-app/main/default/classes/StandardFieldDefaultsControllerTest.cls
force-app/main/default/classes/StandardFieldDefaultsControllerTest.cls-meta.xml
force-app/main/default/classes/StartTradingController.cls
force-app/main/default/classes/StartTradingControllerTest.cls
force-app/main/default/classes/StaticParameter.cls
force-app/main/default/classes/StaticParameter.cls-meta.xml
force-app/main/default/classes/StatuAchievementsPCLController.cls
force-app/main/default/classes/StatusPageControllerTest.cls
force-app/main/default/classes/StraightBackAddressController.cls
force-app/main/default/classes/SubAuthorizedBatch.cls
force-app/main/default/classes/SubmitForApprovalController.cls
force-app/main/default/classes/SumAnnualRepairAmountBatch.cls
force-app/main/default/classes/SumAnnualRepairAmountBatch.cls-meta.xml
force-app/main/default/classes/SumAnnualRepairAmountBatchTest.cls
force-app/main/default/classes/SumAnnualRepairAmountBatchTest.cls-meta.xml
force-app/main/default/classes/SumEquipmentInventory.cls
force-app/main/default/classes/SumEquipmentInventory.cls-meta.xml
force-app/main/default/classes/SumEquipmentInventoryBatch.cls
force-app/main/default/classes/SumEquipmentInventoryBatch.cls-meta.xml
force-app/main/default/classes/SumEquipmentInventoryBatchTest.cls
force-app/main/default/classes/SumEquipmentInventoryBatchTest.cls-meta.xml
force-app/main/default/classes/SummaryContractFMBatch.cls
force-app/main/default/classes/SummaryContractFMBatch.cls-meta.xml
force-app/main/default/classes/SummaryContractFMBatchTest.cls
force-app/main/default/classes/SummaryContractFMBatchTest.cls-meta.xml
force-app/main/default/classes/SummaryHospitalTest.cls
force-app/main/default/classes/SummaryHospitalTest.cls-meta.xml
force-app/main/default/classes/SummaryThreeYearsContractBatch.cls
force-app/main/default/classes/SummaryThreeYearsContractBatch.cls-meta.xml
force-app/main/default/classes/SyncAccountContactToAWS.cls
force-app/main/default/classes/SyncAccountContactToAWSTest.cls
force-app/main/default/classes/SyncOpportunityTest.cls
force-app/main/default/classes/TaskFeedbackController.cls
force-app/main/default/classes/TaskObjectTriggerHandle.cls
force-app/main/default/classes/TaskStatusUpdateBatch.cls
force-app/main/default/classes/TenderDeleteControllerTest.cls
force-app/main/default/classes/TenderDeleteLwcController.cls
force-app/main/default/classes/TenderDeleteLwcControllerTest.cls
force-app/main/default/classes/TenderDeleteLwcControllerTest.cls-meta.xml
force-app/main/default/classes/TenderInformationHandler.cls
force-app/main/default/classes/TenderLostController.cls
force-app/main/default/classes/TenderLostController.cls-meta.xml
force-app/main/default/classes/TenderLostControllerTest.cls-meta.xml
force-app/main/default/classes/TenderOpportunityLinkHandler.cls
force-app/main/default/classes/TenderOpportunityLinkHandlerTest.cls
force-app/main/default/classes/TenderResultConfirmTaskBatch.cls
force-app/main/default/classes/TenderResultConfirmTaskBatch.cls-meta.xml
force-app/main/default/classes/TenderResultConfirmTaskBatchTest.cls-meta.xml
force-app/main/default/classes/TenderWebService.cls
force-app/main/default/classes/TestDataUtility.cls
force-app/main/default/classes/ThreeRepairController.cls
force-app/main/default/classes/ThreeRepairController.cls-meta.xml
force-app/main/default/classes/TransferApplyDetailHandler.cls
force-app/main/default/classes/TransferApplyDetailHandlerTest.cls
force-app/main/default/classes/TransferApplyHandler.cls
force-app/main/default/classes/TransferApplyPDFController.cls
force-app/main/default/classes/TransferApplySelectDetailControllerTest.cls
force-app/main/default/classes/TransferApplySelectDetailSubController.cls
force-app/main/default/classes/TransferApplySelectDetailSubCtrlTest.cls
force-app/main/default/classes/TransferAutoGiveupBatchSchedule.cls
force-app/main/default/classes/TransferShippmentReceived2ControllerTest.cls
force-app/main/default/classes/TransferShippmentReceived5ControllerTest.cls
force-app/main/default/classes/Type2MaintenanceContractBatch.cls
force-app/main/default/classes/Type3MaintenanceContractBatch.cls
force-app/main/default/classes/TypeMaintenanceContractBatch.cls
force-app/main/default/classes/UpdAccountExamineController.cls
force-app/main/default/classes/UpdAccountExamineController.cls-meta.xml
force-app/main/default/classes/UpdAccountExamineControllerTest.cls
force-app/main/default/classes/UpdAccountExamineControllerTest.cls-meta.xml
force-app/main/default/classes/UpdateActivatedDateContactBatch.cls
force-app/main/default/classes/UpdateActivatedDateContactBatch.cls-meta.xml
force-app/main/default/classes/UpdateActivatedDateContactBatchTest.cls
force-app/main/default/classes/UpdateActivatedDateContactBatchTest.cls-meta.xml
force-app/main/default/classes/UpdateAssetReturnTimeSchedule.cls
force-app/main/default/classes/UpdateAssetToCurrentMCBatch.cls
force-app/main/default/classes/UpdateContractAimAmountHandler.cls
force-app/main/default/classes/UpdateContractAimAmountHandlerTest.cls
force-app/main/default/classes/UpdateHospitalOppDateBatch.cls
force-app/main/default/classes/UpdateInquiryFormConfirmationBatch.cls
force-app/main/default/classes/UpdateInquiryFormConfirmationBatch.cls-meta.xml
force-app/main/default/classes/UpdateInquiryFormConfirmationBatchTest.cls
force-app/main/default/classes/UpdateInquiryFormConfirmationBatchTest.cls-meta.xml
force-app/main/default/classes/UpdateInspectionReportAssetBatch.cls
force-app/main/default/classes/UpdateMonthlyContactSchedule.cls
force-app/main/default/classes/UpdateMonthlyContactScheduleTest.cls
force-app/main/default/classes/UpdateRentalApplyBatch.cls
force-app/main/default/classes/UpdateRentalApplyEquipmentSetBatch.cls
force-app/main/default/classes/UpdateRentalApplyEquipmentSetBatchTest.cls
force-app/main/default/classes/UpdateTenderInformation01Batch.cls
force-app/main/default/classes/UpdateTenderInformation01Batch.cls-meta.xml
force-app/main/default/classes/UpdateTenderInformation01BatchTest.cls
force-app/main/default/classes/UpdateTenderInformation01BatchTest.cls-meta.xml
force-app/main/default/classes/UpdateTenderInformation01Schedulable.cls
force-app/main/default/classes/UpdateTenderInformation01Schedulable.cls-meta.xml
force-app/main/default/classes/UpdateTenderInformation01SchedulableTest.cls
force-app/main/default/classes/UpdateTenderInformation01SchedulableTest.cls-meta.xml
force-app/main/default/classes/UpdateTenderInformationBatch.cls
force-app/main/default/classes/UpdateTenderInformationBatch2.cls
force-app/main/default/classes/UpdateTenderInformationBatch2.cls-meta.xml
force-app/main/default/classes/UpdateTenderInformationBatch2Test.cls
force-app/main/default/classes/UpdateTenderInformationBatch2Test.cls-meta.xml
force-app/main/default/classes/UpdateTenderInformationBatchTest.cls
force-app/main/default/classes/UpdateURFContactBatch.cls
force-app/main/default/classes/UpdateYearlyContactSchedule.cls
force-app/main/default/classes/UpdateYearlyContactSchedule.cls-meta.xml
force-app/main/default/classes/UpdateYearlyContactScheduleTest.cls
force-app/main/default/classes/UpdateYearlyContactScheduleTest.cls-meta.xml
force-app/main/default/classes/UploadOBPMController.cls
force-app/main/default/classes/UserProfileHandler.cls
force-app/main/default/classes/UserToContactTriggerTest.cls
force-app/main/default/classes/ViewParticipantsController.cls
force-app/main/default/classes/ViewParticipantsControllerTest.cls
force-app/main/default/classes/WeeklyReportCmp.cls
force-app/main/default/classes/WeeklyReportCmpTest.cls
force-app/main/default/classes/XinDailyReportController.cls
force-app/main/default/classes/XinDailyReportControllerTest.cls
force-app/main/default/classes/calendarUtil.cls
force-app/main/default/classes/calendarUtil.cls-meta.xml
force-app/main/default/classes/calendarUtilTest.cls
force-app/main/default/classes/calendarUtilTest.cls-meta.xml
force-app/main/default/classes/createEmptyDailyReportSchedule.cls
force-app/main/default/classes/createEmptyDailyReportScheduleTest.cls
force-app/main/default/classes/eSignAgencyPageController.cls
force-app/main/default/classes/eSignAgencyPageControllerTest.cls
force-app/main/default/classes/eSignFormAttachmentController.cls
force-app/main/default/classes/eSignFormAttachmentControllerTest.cls
force-app/main/default/classes/eSignFormFileUploadController.cls
force-app/main/default/classes/eSignFormFileUploadController.cls-meta.xml
force-app/main/default/classes/eSignFormFileUploadControllerTest.cls
force-app/main/default/classes/eSignFormFileUploadControllerTest.cls-meta.xml
force-app/main/default/classes/eSignHomePageController.cls
force-app/main/default/classes/rentalApplyToShipmentWorkTimeHDBatch.cls
force-app/main/default/classes/rentalApplyToShipmentWorkTimeHDBatch.cls-meta.xml
force-app/main/default/classes/rollupToRepairBatch.cls
force-app/main/default/classes/rollupToRepairBatchTest.cls
force-app/main/default/classes/strike_lookupController.cls
force-app/main/default/classes/summonsCreatController.cls
force-app/main/default/classes/taskAlertController.cls
force-app/main/default/classes/taskManageController.cls
force-app/main/default/classes/testAutomaticallyBringData.cls
force-app/main/default/classes/testAutomaticallyBringData.cls-meta.xml
force-app/main/default/classes/threeYearsRepair.cls
force-app/main/default/classes/threeYearsRepair.cls-meta.xml
force-app/main/default/classes/threeYearsRepairText.cls
force-app/main/default/classes/threeYearsRepairText.cls-meta.xml
force-app/main/default/classes/updateCampaignMailflg7BeTrueBatch.cls
force-app/main/default/classes/updateESignBatch.cls
force-app/main/default/classes/updateESignBatchTest.cls
force-app/main/default/classes/updateFirstServiceContractWebService.cls
force-app/main/default/classes/updateFirstServiceContractWebService.cls-meta.xml
force-app/main/default/classes/updateFirstServiceContractWebServiceTest.cls
force-app/main/default/classes/updateFirstServiceContractWebServiceTest.cls-meta.xml
force-app/main/default/components/fileUpload.component
force-app/main/default/components/fileUpload.component-meta.xml
force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.html
force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js
force-app/main/default/lwc/improvedForecastTime/improvedForecastTime.js-meta.xml
force-app/main/default/lwc/jzCheckboxGroup2/jzCheckboxGroup2.html
force-app/main/default/lwc/jzCheckboxGroup2/jzCheckboxGroup2.js
force-app/main/default/lwc/jzCheckboxGroup2/jzCheckboxGroup2.js-meta.xml
force-app/main/default/lwc/jzDataTable/jzDataTable.html
force-app/main/default/lwc/jzDataTable/jzDataTable.js
force-app/main/default/lwc/jzDataTable/jzDataTable.js-meta.xml
force-app/main/default/lwc/jzSearchForm/jzSearchForm.css
force-app/main/default/lwc/jzSearchForm/jzSearchForm.html
force-app/main/default/lwc/jzSearchForm/jzSearchForm.js
force-app/main/default/lwc/jzSearchForm/jzSearchForm.js-meta.xml
force-app/main/default/lwc/jzTable/jzTable.html
force-app/main/default/lwc/jzTable/jzTable.js
force-app/main/default/lwc/jzTable/jzTable.js-meta.xml
force-app/main/default/lwc/jzcheckboxgroup/jzcheckboxgroup.html
force-app/main/default/lwc/jzcheckboxgroup/jzcheckboxgroup.js
force-app/main/default/lwc/jzcheckboxgroup/jzcheckboxgroup.js-meta.xml
force-app/main/default/lwc/jzlookup/jzlookup.html
force-app/main/default/lwc/jzlookup/jzlookup.js
force-app/main/default/lwc/jzlookup/jzlookup.js-meta.xml
force-app/main/default/lwc/jzlookuplightning/jzlookuplightning.html
force-app/main/default/lwc/jzlookuplightning/jzlookuplightning.js
force-app/main/default/lwc/jzlookuplightning/jzlookuplightning.js-meta.xml
force-app/main/default/lwc/jzlookupv2/jzlookupv2.html
force-app/main/default/lwc/jzlookupv2/jzlookupv2.js
force-app/main/default/lwc/jzlookupv2/jzlookupv2.js-meta.xml
force-app/main/default/lwc/jzlookupv3/jzlookupv3.html
force-app/main/default/lwc/jzlookupv3/jzlookupv3.js
force-app/main/default/lwc/jzlookupv3/jzlookupv3.js-meta.xml
force-app/main/default/lwc/leadDemoPIPL/leadDemoPIPL.css
force-app/main/default/lwc/leadDemoPIPL/leadDemoPIPL.html
force-app/main/default/lwc/leadDemoPIPL/leadDemoPIPL.js
force-app/main/default/lwc/leadDemoPIPL/leadDemoPIPL.js-meta.xml
force-app/main/default/lwc/maintenanceContract/maintenanceContract.css
force-app/main/default/lwc/maintenanceContract/maintenanceContract.html
force-app/main/default/lwc/maintenanceContract/maintenanceContract.js
force-app/main/default/lwc/maintenanceContract/maintenanceContract.js-meta.xml
force-app/main/default/lwc/maintenanceContractNotOpen/maintenanceContractNotOpen.css
force-app/main/default/lwc/maintenanceContractNotOpen/maintenanceContractNotOpen.html
force-app/main/default/lwc/maintenanceContractNotOpen/maintenanceContractNotOpen.js
force-app/main/default/lwc/maintenanceContractNotOpen/maintenanceContractNotOpen.js-meta.xml
force-app/main/default/lwc/otherButtonInOpportunity/otherButtonInOpportunity.css
force-app/main/default/lwc/otherButtonInOpportunity/otherButtonInOpportunity.html
force-app/main/default/lwc/otherButtonInOpportunity/otherButtonInOpportunity.js
force-app/main/default/lwc/otherButtonInOpportunity/otherButtonInOpportunity.js-meta.xml
force-app/main/default/lwc/productsh/productsh.css
force-app/main/default/lwc/productsh/productsh.html
force-app/main/default/lwc/productsh/productsh.js
force-app/main/default/lwc/productsh/productsh.js-meta.xml
force-app/main/default/lwc/quoteTrial/quoteTrial.css
force-app/main/default/lwc/quoteTrial/quoteTrial.html
force-app/main/default/lwc/quoteTrial/quoteTrial.js
force-app/main/default/lwc/quoteTrial/quoteTrial.js-meta.xml
force-app/main/default/lwc/quoteTrial/quoteTrialUtil.js
force-app/main/default/lwc/relevant/relevant.css
force-app/main/default/lwc/relevant/relevant.html
force-app/main/default/lwc/relevant/relevant.js
force-app/main/default/lwc/relevant/relevant.js-meta.xml
force-app/main/default/lwc/tBidding/tBidding.html
force-app/main/default/lwc/tBidding/tBidding.js
force-app/main/default/lwc/tBidding/tBidding.js-meta.xml
force-app/main/default/lwc/tEnquiry/tEnquiry.html
force-app/main/default/lwc/tEnquiry/tEnquiry.js
force-app/main/default/lwc/tEnquiry/tEnquiry.js-meta.xml
force-app/main/default/lwc/tEnquiryNoBidding/tEnquiryNoBidding.html
force-app/main/default/lwc/tEnquiryNoBidding/tEnquiryNoBidding.js
force-app/main/default/lwc/tEnquiryNoBidding/tEnquiryNoBidding.js-meta.xml
force-app/main/default/lwc/tenderDeletePage/tenderDeletePage.html
force-app/main/default/lwc/tenderDeletePage/tenderDeletePage.js
force-app/main/default/lwc/tenderDeletePage/tenderDeletePage.js-meta.xml
force-app/main/default/lwc/tenderLost/tenderLost.js
force-app/main/default/lwc/testCheckGroup/testCheckGroup.html
force-app/main/default/lwc/testCheckGroup/testCheckGroup.js
force-app/main/default/lwc/testCheckGroup/testCheckGroup.js-meta.xml
force-app/main/default/objects/ASEActivity__c/ASEActivity__c.object-meta.xml
force-app/main/default/objects/ASEActivity__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/ASEActivity__c/fields/Activity_Purpose__c.field-meta.xml
force-app/main/default/objects/ASEActivity__c/fields/CustomerTel_Encrypted__c.field-meta.xml
force-app/main/default/objects/ASEActivity__c/fields/Purpose_Type__c.field-meta.xml
force-app/main/default/objects/ASEActivity__c/fields/ReporterASE__c.field-meta.xml
force-app/main/default/objects/ASEActivity__c/fields/Reporter__c.field-meta.xml
force-app/main/default/objects/ASEActivity__c/fields/VisitStaffEncrypt__c.field-meta.xml
force-app/main/default/objects/ASEActivity__c/fields/WorkDesc__c.field-meta.xml
force-app/main/default/objects/ASEActivity__c/fields/WorkPlace_Encrypted__c.field-meta.xml
force-app/main/default/objects/ASEActivity__c/listViews/AcceptWindow_BJ_ASEActivity.listView-meta.xml
force-app/main/default/objects/ASEActivity__c/listViews/AcceptWindow_GZ_ASEActivity.listView-meta.xml
force-app/main/default/objects/ASEActivity__c/listViews/All.listView-meta.xml
force-app/main/default/objects/ASEActivity__c/listViews/CheckWindow_BJ_ASEActivity.listView-meta.xml
force-app/main/default/objects/ASEActivity__c/listViews/CheckWindow_GZ_ASEActivity.listView-meta.xml
force-app/main/default/objects/ASEActivity__c/webLinks/CopyPI.webLink-meta.xml
force-app/main/default/objects/AWS_Integration_Info__mdt/fields/Confirm_TransactionURL__c.field-meta.xml
force-app/main/default/objects/AWS_Integration_Info__mdt/fields/Host_URL__c.field-meta.xml
force-app/main/default/objects/AWS_Integration_Info__mdt/fields/Max_Query_Number__c.field-meta.xml
force-app/main/default/objects/AWS_Integration_Info__mdt/fields/Token_URL__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/Asset_Cnt_TB_0520__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/Asset_Cnt_TB_0535_0520__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/Asset_Cnt_TB_0535__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/Dealer_Final_Price__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/Delivery_cnt_TB_0520__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/Delivery_cnt_TB_0535_0520__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/Delivery_cnt_TB_0535__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/HospitalTransactionAmount__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/LostPrices__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/OPD_TB_0520__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/OPD_TB_0535_0520__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/OPD_TB_0535__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/Opp_cnt_TB_0520__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/Opp_cnt_TB_0535_0520__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/Opp_cnt_TB_0535__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/Order_cnt_TB_0520__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/Order_cnt_TB_0535_0520__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/Order_cnt_TB_0535__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/RivalCustomers_first__c.field-meta.xml
force-app/main/default/objects/Account2__c/fields/RivalHostsProportion_first__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/Account_Delay_Apply__c.object-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Abbreviation__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Abbreviation_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Address__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Address_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Alias_Name2__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Alias_Name2_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/ApprovalSteps__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Approved_Confirm_Date__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/AssociatedHospital__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Attribute_Type__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Attribute_Type_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/ChangeReason__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/City_Master__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/City_Master_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/CustomizePageFlg__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Feature__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Feature_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Field3_companyname__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Field3_companyname_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Grade__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Grade_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/HospitalName__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/HospitalName_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/HospitalType__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Hospital__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/InstitutionalType__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Is_Active__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Is_Medical_F__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Is_upload_file__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/OCM_man_province_HP__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/OCM_man_province_HP_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/OpenWindow__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Postal_Code__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Postal_Code_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/RejectionReason__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/ResponseNew__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Response_Cc_User1__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Response_Cc_User2__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Response_Cc_User3__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Response_Cc_User4__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Response_Cc_User5__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Response_Cc_User6__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Response__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Salesdepartment_HP__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Salesdepartment_HP_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Site__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Site_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Speciality_Type__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Speciality_Type_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/State_Master__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/State_Master_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Street__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Street_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/SubmitApprovalDate__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Town__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Town_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Website__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/Website_old__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/fields/WhetherRiskPassing__c.field-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/listViews/All.listView-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/listViews/ApplyUpdAccount.listView-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/listViews/ApprovedUpdAccount.listView-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/listViews/DraftUpdAccount.listView-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/listViews/MYView.listView-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/validationRules/CheckChangeReason.validationRule-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/webLinks/AccountDelayApply.webLink-meta.xml
force-app/main/default/objects/Account_Delay_Apply__c/webLinks/SubmitAndRefresh.webLink-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/Digestion_Internal_Bunk__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/ERCP_Number__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/ESD_Number__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/EUS_Number__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/Endoscope_Nurse__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/Endoscope_Therapy__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/May_Endoscopic_Doctor__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/May_Hand_Skill_Physician__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/Number_of_case__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/OCM_Period__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/OCM_Year__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/Room_ERCP_Room__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/Room_Stomach_And_Room__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/Stomach_Enteroscopy__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/Stomach_Gastroscopy__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/Year__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/case_Endoscopic_Host__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/case_Mirror__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/case_Olympus_Host__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_case__c/fields/case_Sterilizer__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/AllOP_ThousandY__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Asset_Cnt_190Main__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Asset_Cnt_290MiroGI__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Asset_Cnt_TB_0520__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Asset_Cnt_TB_0535_0520__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Asset_Cnt_TB_0535__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/BO_Forecast_ThousandY__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Budget_SumPrice_Note__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Dealer_Final_Price__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Dealer_Final_Priceqt__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Delivery_cnt_TB_0520__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Delivery_cnt_TB_0535_0520__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Delivery_cnt_TB_0535__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Department_Class_Label__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/HospitalTransactionAmount__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/HospitalTransactionAmountqt__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Is_Target_Account__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/LostPrices__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/LostPricesqt__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Name_OCMCategory__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/OCM_man_province_HP__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/OPD_amount_290MiroGI__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/OPD_amount_TB_0520__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/OPD_amount_TB_0535_0520__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/OPD_amount_TB_0535__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/OPD_cover_TB_0520__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/OPD_cover_TB_0535__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Opp_cnt_TB_0520__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Opp_cnt_TB_0535_0520__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Opp_cnt_TB_0535__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Opportunity_ThousandY__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Order_cnt_TB_0520__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Order_cnt_TB_0535_0520__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Order_cnt_TB_0535__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/PAENGAverageCoverageRate__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/PBENGAverageCoverageRate__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/RivalCustomers__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/RivalCustomers_first__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/RivalHostsProportion__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/RivalHostsProportion_first__c.field-meta.xml
force-app/main/default/objects/Account_Number_of_target__c/fields/Target_amount_ENG_F__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Annual_repair_amount__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/AssetContinueTaget__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Asset_Coverage__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Asset_Renewalrate__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Contract_Volume_Three_Year__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Coverage_Asset__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Coverage_Target_Account__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Equipment_Inventory_Correlation_No__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Equipment_Inventory_No__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Equipment_Inventory_Rigid_No__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Finish_Asset__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Finish_Correlation_Lightsource__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Finish_Coverage_Asset__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Finish_Rigid_Mirror_1__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Finish_Rigid_Mirror_2__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Finish_Rigid_Mirror_3__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/IF_Last_Three_Years_Contract__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/IF_Last_Two_Years_Contract__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/IF_Last_Years_Contract__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Last_Three_Year_Contract_Count__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Last_Three_Years_Contract_Amount__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Last_Three_Years_Contract_Count_del__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Last_Three_Years_IF_Have_Contract__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Last_Two_Years_Contract_Amount__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Last_Two_Years_Contract_Count__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Last_Years_Contract_Amount__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Last_Years_Contract_Count__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/OCSM_Period__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Renew_Finish_Correlation_Lightsource__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Renew_Finish_Else__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Renew_Finish_Rigid_Mirror_1__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Renew_Finish_Rigid_Mirror_3__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Renew_Target_Correlation_Lightsource__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Renew_Target_Rigid_Mirror_2__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Renew_Target_Soft_Mirror_2__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Target_Correlation_Lightsource__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Target_Rigid_Mirror_2__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Target_Soft_Mirror_2__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Three_Years_Repair_Cost_Hard_Mirror__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Three_Years_Repair_Cost_Soft_Mirror__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Three_Years_Repair_Cost_Surrounding_Area__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Three_Years_Repair_Cost_Text__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Total_Pricing_Hard_Mirror__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Total_Pricing_Lightsource__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Total_Pricing_Soft_Mirror__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Total_Pricing__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Total_Proposed_Equipment__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Uninsured_Quantity_Hard_Mirror__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Uninsured_Quantity_Lightsource__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Uninsured_Quantity_Soft_Mirror__c.field-meta.xml
force-app/main/default/objects/Activity_History_Daily_Report__c/fields/Contact__c.field-meta.xml
force-app/main/default/objects/Address_Level__c/listViews/All.listView-meta.xml
force-app/main/default/objects/Address__c/Address__c.object-meta.xml
force-app/main/default/objects/Address__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Address_Classification__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Beipin_Center__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/City_Name__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/City__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/ContactName_Encrypted__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/ContactName__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Contacts_Name__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Contacts__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Create_Contacts__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Customer_Name__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Customer__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Detailed_Address_Encrypted__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Detailed_Address__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Hospital__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Import_Data_Type__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/IsFromSPO__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/MobilePhone__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Province_Name__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Province__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Telephone_Encrypted__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Telephone__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/TelphoneBK__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/Using_Datetime__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/ZipCode_Encrypted__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/ZipCode__c.field-meta.xml
force-app/main/default/objects/Address__c/fields/delete_check__c.field-meta.xml
force-app/main/default/objects/Address__c/listViews/ALL_dealer.listView-meta.xml
force-app/main/default/objects/Address__c/listViews/All.listView-meta.xml
force-app/main/default/objects/Address__c/listViews/All_BP.listView-meta.xml
force-app/main/default/objects/Address__c/listViews/All_hospital.listView-meta.xml
force-app/main/default/objects/Address__c/listViews/All_office.listView-meta.xml
force-app/main/default/objects/Address__c/recordTypes/mainType.recordType-meta.xml
force-app/main/default/objects/Address__c/webLinks/CopyPI.webLink-meta.xml
force-app/main/default/objects/Advance_Opportunity__c/Advance_Opportunity__c.object-meta.xml
force-app/main/default/objects/Advance_Opportunity__c/fields/AddPrice__c.field-meta.xml
force-app/main/default/objects/Advance_Opportunity__c/fields/BigContract__c.field-meta.xml
force-app/main/default/objects/Advance_Opportunity__c/fields/GradePro__c.field-meta.xml
force-app/main/default/objects/Advance_Opportunity__c/fields/KeepPushing__c.field-meta.xml
force-app/main/default/objects/Advance_Opportunity__c/fields/MarketAdvance__c.field-meta.xml
force-app/main/default/objects/Advance_Opportunity__c/fields/Opportunity__c.field-meta.xml
force-app/main/default/objects/Advance_Payment__c/webLinks/CustomLink1.webLink-meta.xml
force-app/main/default/objects/Agency_Contact__c/Agency_Contact__c.object-meta.xml
force-app/main/default/objects/Agency_Contact__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Agency_Contact__c/fields/Doctor_Division1_Encrypted__c.field-meta.xml
force-app/main/default/objects/Agency_Contact__c/fields/Doctor_Division1__c.field-meta.xml
force-app/main/default/objects/Agency_Contact__c/fields/Name_Encrypted__c.field-meta.xml
force-app/main/default/objects/Agency_Contact__c/fields/Type_Encrypted__c.field-meta.xml
force-app/main/default/objects/Agency_Contact__c/listViews/All_Agency_Contact.listView-meta.xml
force-app/main/default/objects/Agency_Contact__c/listViews/OCM.listView-meta.xml
force-app/main/default/objects/Agency_Contact__c/recordTypes/Agency.recordType-meta.xml
force-app/main/default/objects/Agency_Contact__c/webLinks/Copy2AgencyContact.webLink-meta.xml
force-app/main/default/objects/Agency_Contact__c/webLinks/CopyPI.webLink-meta.xml
force-app/main/default/objects/Agency_Hospital_Link__c/fields/Agency__c.field-meta.xml
force-app/main/default/objects/Agency_Hospital_Link__c/fields/Hospital__c.field-meta.xml
force-app/main/default/objects/Agency_Hospital_Link__c/webLinks/NewAgencyHospital.webLink-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/Agency_Opportunity__c.object-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/fieldSets/Dealer_enquiry.fieldSet-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/fields/Agency_Person__c.field-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/fields/Change_To_Opportunity_Num__c.field-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/fields/Change_To_Opportunity__c.field-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/fields/Fund_Basis__c.field-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/fields/Product_Category1_P__c.field-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/fields/Product_Category2_P__c.field-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/fields/Product_Category3_P__c.field-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/fields/Sales_Method__c.field-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/fields/Salesdepartment_HP__c.field-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/fields/StageName3__c.field-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/listViews/OPP_Real.listView-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/listViews/Opp_Cancel_Lost.listView-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/listViews/Opp_inprogress.listView-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/listViews/Updated_in_Recent_Month.listView-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/listViews/Updated_in_Recent_Week.listView-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/listViews/View_GIR_All.listView-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/listViews/View_Nearly_a_Week.listView-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/listViews/View_OCSM_Next30.listView-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/listViews/View_Opp_all.listView-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/listViews/View_Opp_complete.listView-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/listViews/View_SP_All.listView-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/listViews/View_oppwithoutconform.listView-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/listViews/View_tar.listView-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/recordTypes/Opportunity.recordType-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/recordTypes/Target.recordType-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/webLinks/Business_confirmation.webLink-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/webLinks/NewIntention.webLink-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/webLinks/Quotation_request.webLink-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/webLinks/SubmitNewOpportunity_Agency_Apply.webLink-meta.xml
force-app/main/default/objects/Agency_Opportunity__c/webLinks/newOpp.webLink-meta.xml
force-app/main/default/objects/Agency_Report_Header__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Agency_Report_Header__c/fields/AccountOCSM__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/ConsumptionOfConsumables__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/Department_Cateogy_text__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/EffectProgress__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/Input_Type__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/Is_Report_Date__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/Management_Code__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/Normal_Input__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/ProductCcategory__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/ProductClassification__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/Purpose_Type__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/WarlockClassification__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/WorkMark__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/WorkRecord__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/doctor3__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/fields/productCategories__c.field-meta.xml
force-app/main/default/objects/Agency_Report__c/recordTypes/WeeklyReport.recordType-meta.xml
force-app/main/default/objects/Alarm_888_Month__c/Alarm_888_Month__c.object-meta.xml
force-app/main/default/objects/Alarm_888_Month__c/fields/Alarm_Date__c.field-meta.xml
force-app/main/default/objects/Alarm_888_Month__c/fields/Asset_ID__c.field-meta.xml
force-app/main/default/objects/Alarm_888_Month__c/fields/Month_Of_Work__c.field-meta.xml
force-app/main/default/objects/Alarm_888_Month__c/fields/Month_Work__c.field-meta.xml
force-app/main/default/objects/Alarm_888_Month__c/fields/Nth_Operating_Day__c.field-meta.xml
force-app/main/default/objects/Alarm_888_Month__c/fields/Number_Of_Operations__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/Application_for_Conference_Adjudication__c.object-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/Activities_of_a_share__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/ActivityTypeName__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/Adjudication_Owner_Num__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/Adjudication_Owner__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/Applicant_Dep__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/Applicant__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/Approved_Date__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/BudgetType__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/CampaignTheme__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/CityMaster__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/ConveningParticipantsNum__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/CooperatorCompany__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/EndDate__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/ExpectedHcpAttendance__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/ExpectedOlympusAttendance__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/HostName__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/Implementation_Purpose1__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/IsPaidToSponsor__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/IsSupplemental__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/MeetingApprovedNo__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/MeetingType__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/Num__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/OfficeCategory__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/ProcessState__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/Shared_Editing__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/SponsorshipCategory__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/StartDate__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/StateMaster__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/Type_of_adjudication_meeting__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/fields/WorkshopPlace__c.field-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/listViews/All.listView-meta.xml
force-app/main/default/objects/Application_for_Conference_Adjudication__c/sharingReasons/Shared_Editor__c.sharingReason-meta.xml
force-app/main/default/objects/AssessmentReport__c/webLinks/CreateAssessmentReport.webLink-meta.xml
force-app/main/default/objects/AssetHistory__c/fields/CreateDate__c.field-meta.xml
force-app/main/default/objects/AssetMaintainDetail__c/fields/AssetId__c.field-meta.xml
force-app/main/default/objects/AssetMaintainDetail__c/fields/LostBackDate__c.field-meta.xml
force-app/main/default/objects/AssetMaintainHeader__c/validationRules/Cannot_Change_MaintainType.validationRule-meta.xml
force-app/main/default/objects/AssetMaintainHeader__c/webLinks/Abandon.webLink-meta.xml
force-app/main/default/objects/AssetMaintainHeader__c/webLinks/AssetMaintainPage.webLink-meta.xml
force-app/main/default/objects/AssetMaintainHeader__c/webLinks/delete_apply.webLink-meta.xml
force-app/main/default/objects/AssetMaintainHeader__c/webLinks/submit_approval_process.webLink-meta.xml
force-app/main/default/objects/AssetModifyBelongsChangeDetail__c/fields/AssetNotAccount__c.field-meta.xml
force-app/main/default/objects/Asset_EquipmentSet_Managment_Code__c/fields/Edit_staff_Email_F__c.field-meta.xml
force-app/main/default/objects/Asset_EquipmentSet_Managment_Code__c/fields/codeWarning__c.field-meta.xml
force-app/main/default/objects/BatchIF_Log__c/BatchIF_Log__c.object-meta.xml
force-app/main/default/objects/BatchIF_Log__c/fields/AWS_Transaction_Id__c.field-meta.xml
force-app/main/default/objects/BatchIF_Log__c/fields/DN_retry_cnt__c.field-meta.xml
force-app/main/default/objects/BatchIF_Log__c/fields/IsUpsertDN__c.field-meta.xml
force-app/main/default/objects/BatchIF_Log__c/fields/Log__c.field-meta.xml
force-app/main/default/objects/BatchIF_Log__c/fields/MessageGroupNumber__c.field-meta.xml
force-app/main/default/objects/BatchIF_Log__c/fields/NFM624_Secondary_processing__c.field-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/Alt.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM001.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM007.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM007_20221001.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM009.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM103.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM104.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM105manual.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM106.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM110_Veiwer.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM115.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM116_ToSAP.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM117.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM201.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM203.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM204.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM206.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM501.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM501raw.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM501raw_error.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM502.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM601Account.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM602ToAWS.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM603ToAWS.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM603ToAWS111.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM605ToAWS.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM607_ASE.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM608_FSE.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM609_CIC.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM611_Repair.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM612S.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM612_RepairSubOrder.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM621User.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM624about.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM701.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM702_Veiwer.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM703_Veiwer.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM704_Veiwer.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM705_Veiwer.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM706.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/NFM707.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/PushNotification.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/RefRequest.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/TenderResultConfirm_Task.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/view_log_NFM501TIDetailHistoryDataBatch.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/view_log_SetFrameNumManageBatchErrorLog.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/view_log_merge.listView-meta.xml
force-app/main/default/objects/BatchIF_Transfer__c/listViews/view_trans_tender_all.listView-meta.xml
force-app/main/default/objects/Bid_Announcement__c/webLinks/Agree.webLink-meta.xml
force-app/main/default/objects/Bid_Announcement__c/webLinks/BidCancel.webLink-meta.xml
force-app/main/default/objects/Bid_Announcement__c/webLinks/Request.webLink-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/BringQuantityPurchaseRecord__c.object-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/BidWithQuantity__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/BiddingEnterprise__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/City__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/CompanyName__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/DirectoryName__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/EnterpriseName__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/HospitalSuppliesCode_15__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/HospitalSuppliesCode__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/LimitedPrice__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/Logical_delete__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/MediumPriceWithQuantity__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/ModelConfirm__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/Model__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/Note__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/Offer__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/OpenPrice__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/PriceTagConfirm__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/PriceTag__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/Product2__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/ProductName__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/ProductNumber__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/ProductionEnterprise__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/Province__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/Publicity_Published__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/RecordPrice__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/RegistrationCertificateNumber_23__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/RegistrationNumber__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/ReleaseTime__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/ResultsName__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/Specifications__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/StandardPrice__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/TransactionReferencePrice__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/Unit__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/VarietiesClassification__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/WhereProject__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/fields/WhetherExecuting__c.field-meta.xml
force-app/main/default/objects/BringQuantityPurchaseRecord__c/listViews/All.listView-meta.xml
force-app/main/default/objects/Bulletin_Board__c/fields/Buzhang_Zongjian__c.field-meta.xml
force-app/main/default/objects/Bulletin_Board__c/fields/Jingli_Buzhang__c.field-meta.xml
force-app/main/default/objects/Bulletin_Board__c/listViews/ALLCountry_Spare_Display_Board.listView-meta.xml
force-app/main/default/objects/Bulletin_Board__c/validationRules/Only_2B3_Can_Choose.validationRule-meta.xml
force-app/main/default/objects/CampaignLable__c/fields/Campaign__c.field-meta.xml
force-app/main/default/objects/CampaignMember__c/fields/Contact_Encrypted__c.field-meta.xml
force-app/main/default/objects/CampaignMember__c/fields/Contact_F__c.field-meta.xml
force-app/main/default/objects/CampaignMember__c/validationRules/Input_Record_Check.validationRule-meta.xml
force-app/main/default/objects/CancelPostponePlan__c/fields/cancelReasonCombobox__c.field-meta.xml
force-app/main/default/objects/CancelPostponePlan__c/recordTypes/CancelType.recordType-meta.xml
force-app/main/default/objects/CancelPostponePlan__c/recordTypes/PostponeType.recordType-meta.xml
force-app/main/default/objects/CancelPostponePlan__c/webLinks/CommitNeedApproval.webLink-meta.xml
force-app/main/default/objects/Competition_Company__c/listViews/All.listView-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set_Detail__c/Consum_Apply_Equipment_Set_Detail__c.object-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set_Detail__c/fieldSets/ConsumEquipmentSetShipment_R.fieldSet-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set_Detail__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set_Detail__c/fields/CreatedDate__c.field-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set_Detail__c/fields/Fixture_Model_No_F__c.field-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set_Detail__c/fields/Trial_User_Encrypt__c.field-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set_Detail__c/fields/boxbarcodeforReceipt__c.field-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set_Detail__c/validationRules/Cannot_Update_When_Finish.validationRule-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set_Detail__c/webLinks/Clear_Return_DeliverySlip.webLink-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/fields/Yi_Guo_Qi_Ku_Cun_Jia__c.field-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/fields/You_Xiao_Ku_Cun_Jia__c.field-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/fields/You_Xiao_Qi_Ku_Cun_Jia__c.field-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/webLinks/Cancel_Consum_Details.webLink-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/webLinks/Clear_Return_DeliverySlip.webLink-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/webLinks/ConsumDefaultSelect.webLink-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/webLinks/Consum_Select.webLink-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/webLinks/CustomSubmit.webLink-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/webLinks/EquipmentSetRental_Order.webLink-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/webLinks/Loaner_arranged_e_mail.webLink-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/webLinks/Reassign.webLink-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/webLinks/RentalFixtureSetAssign.webLink-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/webLinks/RentalFixtureSetSelect.webLink-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/webLinks/Select_Substitute.webLink-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/webLinks/Shipment_request.webLink-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/webLinks/Split_Apply.webLink-meta.xml
force-app/main/default/objects/Consum_Apply_Equipment_Set__c/webLinks/refresh_status.webLink-meta.xml
force-app/main/default/objects/Consum_Apply__c/Consum_Apply__c.object-meta.xml
force-app/main/default/objects/Consum_Apply__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Consum_Apply__c/fields/Direct_Shippment_Address_Encrypt__c.field-meta.xml
force-app/main/default/objects/Consum_Apply__c/fields/JingliApprovalManager_eq_Buchang__c.field-meta.xml
force-app/main/default/objects/Consum_Apply__c/fields/Loaner_medical_Staff__c.field-meta.xml
force-app/main/default/objects/Consum_Apply__c/fields/Phone_Number_Encrypt__c.field-meta.xml
force-app/main/default/objects/Consum_Apply__c/fields/SalesManager_eq_Buchang__c.field-meta.xml
force-app/main/default/objects/Consum_Apply__c/fields/requestNoJoinStr1__c.field-meta.xml
force-app/main/default/objects/Consum_Apply__c/recordTypes/StandardRequest.recordType-meta.xml
force-app/main/default/objects/Consum_Apply__c/validationRules/After_Request_approve.validationRule-meta.xml
force-app/main/default/objects/Consum_Apply__c/validationRules/After_Request_approve_PIPL.validationRule-meta.xml
force-app/main/default/objects/Consum_Apply__c/validationRules/Applicant_Set_Must_One.validationRule-meta.xml
force-app/main/default/objects/Consum_Apply__c/validationRules/Campaign_CancelStatus_Confim.validationRule-meta.xml
force-app/main/default/objects/Consum_Apply__c/validationRules/Campaign_CancelingStatus_Confim.validationRule-meta.xml
force-app/main/default/objects/Consum_Apply__c/validationRules/Campaign_EndStatus_Confim.validationRule-meta.xml
force-app/main/default/objects/Consum_Apply__c/validationRules/Campaign_SubreportStatus_Confim.validationRule-meta.xml
force-app/main/default/objects/Consum_Apply__c/validationRules/Cannot_Submit_When_NOTHave_ManagerBuzhan.validationRule-meta.xml
force-app/main/default/objects/Consum_Apply__c/validationRules/Detail_Cnt_Can_Not_More_Than500.validationRule-meta.xml
force-app/main/default/objects/Consum_Apply__c/validationRules/Need_AccountInfo.validationRule-meta.xml
force-app/main/default/objects/Consum_Apply__c/validationRules/System_Auto_Cannot_Modify.validationRule-meta.xml
force-app/main/default/objects/Consum_Apply__c/validationRules/Unform_employe_Check.validationRule-meta.xml
force-app/main/default/objects/Consum_Apply__c/webLinks/ConsumApply_FromAccount.webLink-meta.xml
force-app/main/default/objects/Consum_Apply__c/webLinks/ConsumApply_FromCampaign.webLink-meta.xml
force-app/main/default/objects/Consum_Apply__c/webLinks/ConsumApply_FromOPDPlan.webLink-meta.xml
force-app/main/default/objects/Consum_Apply__c/webLinks/ConsumApply_FromQIS.webLink-meta.xml
force-app/main/default/objects/Consum_Apply__c/webLinks/ConsumApply_FromRA.webLink-meta.xml
force-app/main/default/objects/Consum_Apply__c/webLinks/ConsumTrialPDF.webLink-meta.xml
force-app/main/default/objects/Consum_Apply__c/webLinks/CopyPI.webLink-meta.xml
force-app/main/default/objects/Consum_Apply__c/webLinks/Loaner_arranged_e_mail.webLink-meta.xml
force-app/main/default/objects/Consum_Apply__c/webLinks/Lost.webLink-meta.xml
force-app/main/default/objects/Consum_Apply__c/webLinks/all_received_fse.webLink-meta.xml
force-app/main/default/objects/Consum_Apply__c/webLinks/returnDeliverySlip.webLink-meta.xml
force-app/main/default/objects/Consum_Apply__c/webLinks/submit_approval_process.webLink-meta.xml
force-app/main/default/objects/Consum_Apply__c/webLinks/test.webLink-meta.xml
force-app/main/default/objects/Consumable_Orderdetails__c/fields/Product_Pattern__c.field-meta.xml
force-app/main/default/objects/Consumable_order__c/fieldSets/arrive_view.fieldSet-meta.xml
force-app/main/default/objects/Consumable_order__c/fields/Opportunity_code__c.field-meta.xml
force-app/main/default/objects/Consumable_order__c/listViews/D10_approved_view.listView-meta.xml
force-app/main/default/objects/Consumable_order__c/webLinks/SAP_Send_OK.webLink-meta.xml
force-app/main/default/objects/Consumable_order__c/webLinks/SAP_Send_test.webLink-meta.xml
force-app/main/default/objects/Consumable_order_details2__c/Consumable_order_details2__c.object-meta.xml
force-app/main/default/objects/Consumable_order_details2__c/fields/Cancel_remind__c.field-meta.xml
force-app/main/default/objects/Consumable_order_details2__c/fields/DICode__c.field-meta.xml
force-app/main/default/objects/Consumable_order_details2__c/fields/Is_DangerousChemicals__c.field-meta.xml
force-app/main/default/objects/Consumable_order_details2__c/fields/Opportunity_No__c.field-meta.xml
force-app/main/default/objects/Consumable_order_details2__c/fields/Product_Pattern__c.field-meta.xml
force-app/main/default/objects/Consumable_order_details2__c/fields/Recall_shipment__c.field-meta.xml
force-app/main/default/objects/Consumable_order_details2__c/listViews/All.listView-meta.xml
force-app/main/default/objects/Daily_Report__c/Daily_Report__c.object-meta.xml
force-app/main/default/objects/Daily_Report__c/fields/Confirm_Limit_Date__c.field-meta.xml
force-app/main/default/objects/Daily_Report__c/fields/IsFromApplet__c.field-meta.xml
force-app/main/default/objects/Daily_Report__c/fields/Reporter_Salesdepartment__c.field-meta.xml
force-app/main/default/objects/Daily_Report__c/listViews/EditingStatusReport.listView-meta.xml
force-app/main/default/objects/Daily_Report__c/validationRules/Not_submit_before_endding.validationRule-meta.xml
force-app/main/default/objects/DiscountProductApplicationDetail__c/fields/ProductDiscount__c.field-meta.xml
force-app/main/default/objects/DiscountProductApplicationDetail__c/fields/Special_Discount__c.field-meta.xml
force-app/main/default/objects/Equipment_Set_Detail__c/webLinks/select_rental.webLink-meta.xml
force-app/main/default/objects/Equipment_Set__c/webLinks/Fill_other_detail.webLink-meta.xml
force-app/main/default/objects/Equipment_Set__c/webLinks/all_Received.webLink-meta.xml
force-app/main/default/objects/Equipment_Set__c/webLinks/all_Shippment.webLink-meta.xml
force-app/main/default/objects/Equipment_Set__c/webLinks/refresh_status.webLink-meta.xml
force-app/main/default/objects/Event_Oppotunity__c/fields/SalesDepartment__c.field-meta.xml
force-app/main/default/objects/Event_Oppotunity__c/fields/Sales_Division__c.field-meta.xml
force-app/main/default/objects/Event__c/Event__c.object-meta.xml
force-app/main/default/objects/Event__c/fields/Activity_PurposeEscFSE__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Activity_PurposeFSE__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Activity_Purpose__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Activity_Type2__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/IDCompare__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/IsFromApplet__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Minister_Comment__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Opd_Plan__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Purpose_Type2__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Purpose_Type3__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Purpose_Type4__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Purpose_Type5__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Purpose_TypeEscFSE__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Purpose_TypeFSE2__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Purpose_TypeFSE3__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Purpose_TypeFSE4__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Purpose_TypeFSE5__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Purpose_TypeFSE__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/Purpose_Type__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/cancelReasonSelect__c.field-meta.xml
force-app/main/default/objects/Event__c/fields/delayReasonSelect__c.field-meta.xml
force-app/main/default/objects/Event__c/listViews/All_unconformPforlthisweek1.listView-meta.xml
force-app/main/default/objects/Event__c/webLinks/Minister.webLink-meta.xml
force-app/main/default/objects/FieldClassification__c/fields/ProductCcategory__c.field-meta.xml
force-app/main/default/objects/FileAddress__c/FileAddress__c.object-meta.xml
force-app/main/default/objects/FileAddress__c/fields/AWS_File_Key__c.field-meta.xml
force-app/main/default/objects/FileAddress__c/fields/DownloadLink__c.field-meta.xml
force-app/main/default/objects/FileAddress__c/fields/FileName__c.field-meta.xml
force-app/main/default/objects/FileAddress__c/fields/InfoId__c.field-meta.xml
force-app/main/default/objects/FileAddress__c/fields/InfoType__c.field-meta.xml
force-app/main/default/objects/FileAddress__c/fields/OnlyFileName__c.field-meta.xml
force-app/main/default/objects/FileAddress__c/fields/ParentRecordId__c.field-meta.xml
force-app/main/default/objects/FileAddress__c/fields/UpdateDate__c.field-meta.xml
force-app/main/default/objects/FileAddress__c/fields/ViewLink__c.field-meta.xml
force-app/main/default/objects/FileAddress__c/fields/subInfoType__c.field-meta.xml
force-app/main/default/objects/FileAddress__c/listViews/FileAddr_OSH.listView-meta.xml
force-app/main/default/objects/FileAddress__c/webLinks/BatchDelete.webLink-meta.xml
force-app/main/default/objects/FixtureRemindSnapshot__c/fields/Rental_ApplyRecordtype__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/Fixture_OneToOne_Link__c.object-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Abandoned_RealThing__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Accessory_Asset_Status__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Accessory_Asset__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Accsessary_SerialNumber__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Accsessary_WH_location__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/CountForRepair__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/FSPStore__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Ge_Ti_Fu_Shu_Pin_Key__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/In_wh_Fu_Shu_Pin_You_Xiao_Ku_Cun_F__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/In_wh_Fu_Shu_Pin_You_Xiao_Ku_Cun__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Inventory_Frozen_Quantity__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/MainStore__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Main_Asset_Managment_Code__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Main_Asset_Number_key__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Main_Asset_SerialNumber__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Main_Asset_Status__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Main_Asset_WH_location__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Main_Asset__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Manage_type__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/OneToOne__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Quantity__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/Select_Accessory_Asset_Cnt__c.field-meta.xml
force-app/main/default/objects/Fixture_OneToOne_Link__c/fields/TransferFrozenQuantity__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/Fixture_Set_Detail__c.object-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/DataMigration_Flag__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/Fixture_Model_No_F__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/Fixture_Set_New_Quantity__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/Fixture_Set_New__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/Fixture_Set__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/Is_Body__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/Is_OneToOne__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/Is_Optional__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/Is_Special_Product__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/Name_CHN_Created__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/Name_CHN__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/Product2__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/Product_Status_Flag__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/Quantity__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/SortInt_F__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/SortInt__c.field-meta.xml
force-app/main/default/objects/Fixture_Set_Detail__c/fields/UniqueKey__c.field-meta.xml
force-app/main/default/objects/Fixture_Set__c/fields/Loaner_categoryII__c.field-meta.xml
force-app/main/default/objects/Fixture_Set__c/fields/Loaner_categoryI__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/FrameNumManage__c.object-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/ApplyList_Link__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/ApplyList_NoHave__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/ApplyList_Select__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/ApplyList__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/ApplyName__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/AssertRecordType__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/Asset__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/Assort__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/Certificate__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/CheckOutNo__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/EndDate__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/Handleer__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/HomeBuy__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/InspectionCard_Link__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/InspectionCard_NoHave__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/InspectionCard_Select__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/InspectionCard__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/IsChange__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/LT__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/ManagementCode__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/MaterialDepict__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/Material__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/Num__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/ScanDate__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/ScanDate_select__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/SerialNumberS__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/SerialNumber__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/StartDate__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/Statu_Achievements_DN_details__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/UploadDate__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/fields/signInForm__c.field-meta.xml
force-app/main/default/objects/FrameNumManage__c/listViews/All.listView-meta.xml
force-app/main/default/objects/FrameNumManage__c/validationRules/test.validationRule-meta.xml
force-app/main/default/objects/FrameNumManage__c/webLinks/BatchDelete.webLink-meta.xml
force-app/main/default/objects/FrameNumManage__c/webLinks/updateFrameNumManag.webLink-meta.xml
force-app/main/default/objects/GuaranteePeriodAlterationApplication__c/GuaranteePeriodAlterationApplication__c.object-meta.xml
force-app/main/default/objects/GuaranteePeriodAlterationApplication__c/fields/ChangeReason__c.field-meta.xml
force-app/main/default/objects/GuaranteePeriodAlterationApplication__c/fields/ChangeReason_text__c.field-meta.xml
force-app/main/default/objects/GuaranteePeriodAlterationApplication__c/fields/Change_status__c.field-meta.xml
force-app/main/default/objects/GuaranteePeriodAlterationApplication__c/fields/GpaaStatu_AchievementsHospital__c.field-meta.xml
force-app/main/default/objects/GuaranteePeriodAlterationApplication__c/fields/GpaaStatu_Achievements__c.field-meta.xml
force-app/main/default/objects/GuaranteePeriodAlterationApplication__c/fields/OwnerMajordomo__c.field-meta.xml
force-app/main/default/objects/GuaranteePeriodAlterationApplication__c/fields/OwnerManager__c.field-meta.xml
force-app/main/default/objects/GuaranteePeriodAlterationApplication__c/fields/OwnerSectionChief__c.field-meta.xml
force-app/main/default/objects/GuaranteePeriodAlterationApplication__c/fields/RawGuaranteeTime__c.field-meta.xml
force-app/main/default/objects/GuaranteePeriodAlterationApplication__c/fields/WarrantyStartDate__c.field-meta.xml
force-app/main/default/objects/GuaranteePeriodAlterationApplication__c/listViews/ServiceGoodsDepartment_GuaranteePeriodAlterationApplication.listView-meta.xml
force-app/main/default/objects/HistoryData__mdt/HistoryData__mdt.object-meta.xml
force-app/main/default/objects/HistoryData__mdt/fields/DatetimeEnd__c.field-meta.xml
force-app/main/default/objects/HistoryData__mdt/fields/DatetimeStart__c.field-meta.xml
force-app/main/default/objects/IS_Opportunity_Demand__c/listViews/All.listView-meta.xml
force-app/main/default/objects/IS_Opportunity_Demand__c/webLinks/Custom_Submit_BTN.webLink-meta.xml
force-app/main/default/objects/IS_Opportunity_Demand__c/webLinks/New_SI_Custom.webLink-meta.xml
force-app/main/default/objects/IS_Opportunity_Demand__c/webLinks/New_SI_Custom_New.webLink-meta.xml
force-app/main/default/objects/IS_Opportunity_Demand__c/webLinks/SI_Abort_Btn.webLink-meta.xml
force-app/main/default/objects/IS_Opportunity_Demand__c/webLinks/SI_Copy_Custom.webLink-meta.xml
force-app/main/default/objects/IS_Opportunity_Demand__c/webLinks/SI_Copy_Custom_New.webLink-meta.xml
force-app/main/default/objects/IS_Opportunity_Demand__c/webLinks/SI_SOD_Create.webLink-meta.xml
force-app/main/default/objects/IS_Opportunity_Demand__c/webLinks/SI_Upsert_BTN.webLink-meta.xml
force-app/main/default/objects/ImportDocT__c/ImportDocT__c.object-meta.xml
force-app/main/default/objects/ImportDocT__c/fields/Num__c.field-meta.xml
force-app/main/default/objects/ImportDocT__c/fields/code__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/InquiryPredictsDateChange__c.object-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/CloseDate_Old__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/CloseDate__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/Close_Forecasted_Assume_Date_Old__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/Close_Forecasted_Assume_Date__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/Close_Forecasted_Date_Old__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/Close_Forecasted_Date__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/Date_InAdvance_Delay__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/Important_contract__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/Manager_name__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/Opp_Delay_Mark__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/Opp_New_Mark__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/Opportunity__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/Predicted_Date_Status__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/Predicted_date_ChangeReason__c.field-meta.xml
force-app/main/default/objects/InquiryPredictsDateChange__c/fields/Sales_assistant_name__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/Inquiry_form__c.object-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/AssistantChangeOwnerTime__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/AssistantRedistributionDate__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/ComPlat_Name__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/CompletedConfirmations__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Confirmation_days__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/ConfirmedOnTime__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/ContactId__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Contact_Name__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/CreateDate__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Depart_Owner__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Email_Encrypted__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/FSE_Owner__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/FSE_Owner_id__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Follow_Content__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/GI_assistant__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/GotoDepartment__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Hospital_Name__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Hospital__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/IfConfirmation__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/IfGotoDepartment__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Last_Name_Encrypted__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/LeadSource__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/MinimumDate__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Ministry_Of_Information__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/OCM_man_province_cus__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/OCSMOwner__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/OCSM_test2__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Opp_Name__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Opportunity_Division__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Phone_Encrypted__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Product1__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/ProductAssumeDate__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Product_Owner__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/RedistributionDate__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Redistribution__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Request1__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/SP_assistant__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/ServiceCorrespond__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Service_Follow_Content_Other__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Service_Follow_Content__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Service_Follow_Date__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Service_Status__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/Status__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/TimeoutDays__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/isFSEDiffWithAccount__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/fields/isOwnerDiffWithAccount__c.field-meta.xml
force-app/main/default/objects/Inquiry_form__c/listViews/All.listView-meta.xml
force-app/main/default/objects/Inquiry_form__c/listViews/All_02.listView-meta.xml
force-app/main/default/objects/Inquiry_form__c/listViews/All_03.listView-meta.xml
force-app/main/default/objects/Inquiry_form__c/listViews/All_04.listView-meta.xml
force-app/main/default/objects/Inquiry_form__c/listViews/MyFSEInquiryOrg.listView-meta.xml
force-app/main/default/objects/Inquiry_form__c/listViews/MyView.listView-meta.xml
force-app/main/default/objects/Inquiry_form__c/listViews/MyViewing.listView-meta.xml
force-app/main/default/objects/Inquiry_form__c/listViews/zhuliView.listView-meta.xml
force-app/main/default/objects/Inquiry_form__c/sharingReasons/FSE_Owner_c_User__c.sharingReason-meta.xml
force-app/main/default/objects/Inquiry_form__c/validationRules/CampaignSource.validationRule-meta.xml
force-app/main/default/objects/Inquiry_form__c/validationRules/Product_Null.validationRule-meta.xml
force-app/main/default/objects/Inquiry_form__c/webLinks/CopyPI.webLink-meta.xml
force-app/main/default/objects/Inquiry_form__c/webLinks/CustomLink1.webLink-meta.xml
force-app/main/default/objects/Inquiry_form__c/webLinks/CustomLink2.webLink-meta.xml
force-app/main/default/objects/Inquiry_form__c/webLinks/Service_Follow.webLink-meta.xml
force-app/main/default/objects/Inspection_Report__c/Inspection_Report__c.object-meta.xml
force-app/main/default/objects/Inspection_Report__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Inspection_Report__c/fields/Hospital__c.field-meta.xml
force-app/main/default/objects/Inspection_Report__c/fields/Reporter__c.field-meta.xml
force-app/main/default/objects/Inspection_Report__c/fields/Responsible_Person_Encrypted__c.field-meta.xml
force-app/main/default/objects/Inspection_Report__c/fields/Technician_HP_Encrypted__c.field-meta.xml
force-app/main/default/objects/Inspection_Report__c/fields/phone_Encrypted__c.field-meta.xml
force-app/main/default/objects/Inspection_Report__c/validationRules/InputFinishInsDateCheck.validationRule-meta.xml
force-app/main/default/objects/Inspection_Report__c/validationRules/Name_Not_ID.validationRule-meta.xml
force-app/main/default/objects/Inspection_Report__c/validationRules/PdfInsDateCheck.validationRule-meta.xml
force-app/main/default/objects/Inspection_Report__c/validationRules/Reporter_isRequired.validationRule-meta.xml
force-app/main/default/objects/Inspection_Report__c/webLinks/CopyPI.webLink-meta.xml
force-app/main/default/objects/Inspection_Report__c/webLinks/insPageBtn.webLink-meta.xml
force-app/main/default/objects/Inspectup_Plan__c/Inspectup_Plan__c.object-meta.xml
force-app/main/default/objects/Inspectup_Plan__c/fields/History_datanew__c.field-meta.xml
force-app/main/default/objects/Inspectup_Plan__c/fields/History_datanew_txt__c.field-meta.xml
force-app/main/default/objects/Inspectup_Plan__c/fields/Implementation_Rates__c.field-meta.xml
force-app/main/default/objects/Inspectup_Plan__c/fields/Need_copy__c.field-meta.xml
force-app/main/default/objects/Inspectup_Plan__c/fields/Timeliness_Rates__c.field-meta.xml
force-app/main/default/objects/Inspectup_Plan__c/fields/history__c.field-meta.xml
force-app/main/default/objects/Inspectup_Plan__c/fields/history_data__c.field-meta.xml
force-app/main/default/objects/Inspectup_Plan__c/fields/overstep_check_interval__c.field-meta.xml
force-app/main/default/objects/Inspectup_Plan__c/fields/plan_num_history__c.field-meta.xml
force-app/main/default/objects/Instruct_report__c/webLinks/CreateInstructReport.webLink-meta.xml
force-app/main/default/objects/Inventory_Detail__c/fields/IsPunishObj__c.field-meta.xml
force-app/main/default/objects/Inventory_Header_Copy__c/Inventory_Header_Copy__c.object-meta.xml
force-app/main/default/objects/Inventory_Header_Copy__c/fields/Photo1__c.field-meta.xml
force-app/main/default/objects/Inventory_Header_Copy__c/fields/Photo2__c.field-meta.xml
force-app/main/default/objects/Inventory_Header_Copy__c/listViews/All.listView-meta.xml
force-app/main/default/objects/Inventory_Header__c/fields/Jingli_Buzhang__c.field-meta.xml
force-app/main/default/objects/Inventory_Header__c/fields/Mail_Content_Diff__c.field-meta.xml
force-app/main/default/objects/Inventory_Header__c/listViews/All1.listView-meta.xml
force-app/main/default/objects/Inventory_Header__c/validationRules/Cannot_Submit_App_When_Have_Dot_Inventor.validationRule-meta.xml
force-app/main/default/objects/Inventory_Header__c/validationRules/Cannot_Submit_When_NOTHave_ManagerBuzhan.validationRule-meta.xml
force-app/main/default/objects/Inventory_Header__c/webLinks/ClearStatus.webLink-meta.xml
force-app/main/default/objects/Inventory_Header__c/webLinks/InventoryPage.webLink-meta.xml
force-app/main/default/objects/Issue_Management__c/Issue_Management__c.object-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Assign_To__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Business_Module__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Complete_Date__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Debug_Description__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Description__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Field1__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Field2__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Issue_Type_New__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Issue_type__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/LastStatusModifedDate__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/My_Handle__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Priority__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/ProcessingTime__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Reason__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Record_Link__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Report_Status__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Short_Description__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/SobjectTypeName__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Status__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Submit_Date__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/Submitter__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/SummitUser__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/System__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/UATTestnumber__c.field-meta.xml
force-app/main/default/objects/Issue_Management__c/fields/comment__c.field-meta.xml
force-app/main/default/objects/LastbuyProduct__c/LastbuyProduct__c.object-meta.xml
force-app/main/default/objects/LastbuyProduct__c/fields/Account__c.field-meta.xml
force-app/main/default/objects/LastbuyProduct__c/fields/ActualQuantity__c.field-meta.xml
force-app/main/default/objects/LastbuyProduct__c/fields/InquiryCode__c.field-meta.xml
force-app/main/default/objects/LastbuyProduct__c/fields/Opportunity_No__c.field-meta.xml
force-app/main/default/objects/LastbuyProduct__c/fields/RemainingNumber__c.field-meta.xml
force-app/main/default/objects/LastbuyProduct__c/fields/Salesdepartment_Owner__c.field-meta.xml
force-app/main/default/objects/LastbuyProduct__c/fields/State_Owner__c.field-meta.xml
force-app/main/default/objects/LastbuyProduct__c/fields/WIN_manual_number__c.field-meta.xml
force-app/main/default/objects/LastbuyProduct__c/fields/productInquiryOnly__c.field-meta.xml
force-app/main/default/objects/LastbuyProduct__c/listViews/All.listView-meta.xml
force-app/main/default/objects/LastbuyProduct__c/listViews/EU_ME2.listView-meta.xml
force-app/main/default/objects/LastbuyProduct__c/webLinks/CB_LBP_New.webLink-meta.xml
force-app/main/default/objects/LogisticsInformation__c/listViews/All.listView-meta.xml
force-app/main/default/objects/LostReport_Detail__c/LostReport_Detail__c.object-meta.xml
force-app/main/default/objects/LostReport__c/fields/BeiPinWindow_Jingli__c.field-meta.xml
force-app/main/default/objects/LostReport__c/fields/isBeipin__c.field-meta.xml
force-app/main/default/objects/LostReport__c/listViews/All.listView-meta.xml
force-app/main/default/objects/LostReport__c/listViews/View.listView-meta.xml
force-app/main/default/objects/LostReport__c/validationRules/Cannot_Submit_When_NOTHave_ManagerBuzhan.validationRule-meta.xml
force-app/main/default/objects/LostReport__c/webLinks/submit_approval_process.webLink-meta.xml
force-app/main/default/objects/Lost_Report__c/fields/MC_Code__c.field-meta.xml
force-app/main/default/objects/Lost_Report__c/fields/Other__c.field-meta.xml
force-app/main/default/objects/Lost_Report__c/fields/Specific_Reasons__c.field-meta.xml
force-app/main/default/objects/Lost_Report__c/fields/Status__c.field-meta.xml
force-app/main/default/objects/Lost_Report__c/fields/To_Where__c.field-meta.xml
force-app/main/default/objects/Lost_Report__c/fields/off_time__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/Cancel_Reason__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/CompetitorAsset1__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/CompetitorAsset2__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/CompetitorAsset3__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/CompetitorAsset4__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/CompetitorProduct1__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/CompetitorProduct2__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/CompetitorProduct3__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/CompetitorProduct4__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/DeveloperName__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/LostTotalAmount__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/LostType__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/Lost_By_Company__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/Lost_Reason_Sub__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/Lost_reason_main__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/Proposal_Competitors__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/fields/TotalAmountLost__c.field-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/recordTypes/PCL_Cancel_report.recordType-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/recordTypes/PCL_Lost_report.recordType-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/recordTypes/PCL_PartLost_report.recordType-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/validationRules/Lost_By_BrandIsNeed.validationRule-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/validationRules/Lost_By_Opportunity_repeated.validationRule-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/validationRules/Lost_By_ProductIsNeed.validationRule-meta.xml
force-app/main/default/objects/Lost_cancel_report__c/webLinks/Submit_report.webLink-meta.xml
force-app/main/default/objects/MB_Opportunity__c/fields/Opportunity_possibility__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/Maintenance_Contract_Asset_Estimate__c.object-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Adjustment_Lower_price__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Adjustment_Upper_price__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Adjustment_ratio_Lower__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Adjustment_ratio_Upper__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Assemble_product__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Asset2__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Asset_Consumption_rate_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Asset_Consumption_rate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Asset_Estimate_RMB__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Asset_Forecast_Consumptionrate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Asset_MaxRepairCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Asset_RepairCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Asset__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Asset_real_Consumptionrate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Asset_situation__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Bef_QuotationDay_1Year_Price__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Benchmark_price__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Characteristic__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Check_Object__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Check_Result_Formula__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Check_Result__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Comment__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/ContractAsset_Amont__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/ContractAsset_key__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Contract_Esti_Start_Date__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/CurrentContract_F_asset__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Department__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Discount_Percentage_formula__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/EquipmentGuaranteeFlgTxt__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/EquipmentGuaranteeFlg__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Equipmentrepairamount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Estimate_Cost_Month__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Estimate_Cost_Month_formula__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Estimate_Cost__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Estimate_List_Price_All_Txt__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Estimate_List_Price_All__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Estimate_List_Price_Page__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Estimate_List_Price_Year__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Estimate_List_Price__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Estimate_Trial_Money_formula__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Fifth_category__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/First_category__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Fourth_category__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/GI_scope__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/IS_Reduced_price_approval__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/IS_StandardPricing__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Installation_Site__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Installation_day__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/IsNew__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/LastMContract_Price_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/LastMContract_Price__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/LastSFDCArankRepairReturn_day__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Last_MContract__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Last_Second_Years_Repair_Cost_Text__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Last_Third_Years_Repair_Cost_Text__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Last_Third_Years_Repair_MonthF__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Last_Third_Years_Repair_Month__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Last_Three_Year_Repair__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Last_Two_Year_Repair__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Last_User_Contract_Price_formula__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Last_inspection_day__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Lastyear_Repair_Cost_Text__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Maintenance_Contract_Estimate_Status__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Maintenance_Contract_Estimate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Maintenance_Price_Month__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Maintenance_Price_Year__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Monthly_Repair_Cost__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/NotUse_Oxygenated_Water__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/OwnershipMachine_No__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Posting_Date__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/PredictRepairPrice__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Product_Manual_Text__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Product_Manual__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/RecordType_DeveloperName__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Repair_Price_Auto__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Repair_Price__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Repair_Price_pass__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Repair_Sum_Count_Now__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Repair_total_amount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/ReportForm_Installation_Day__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/SP_scope__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Second_category__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Serial_number__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Serial_number_text__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Series_MaxRepairCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Series_RepairCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Seriesrepairamount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Surcharge_Defective_Contract__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/The_Date_Of_Compute_The_RPCost__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Third_Party_Return__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Third_category__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/Three_Years_Repair_Cost_Text__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/UFR_MaxRepairCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/URF_Contract__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/URF_Series__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/X1_BSS__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset_Estimate__c/fields/ifHaveleftInPrevious__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Adjustment_ratio_Lower__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/AssetWhereabouts__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Asset_Consumption_rate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Asset_Months__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Check_object__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Conform_to_the_Adjust__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Current_Price_Should__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Delivery_Date__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Equipment_Amortization_Coefficient__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Equipment_Amortized_Turnover__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Equipment_Last_Money__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Estimate_Cost__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Field1sxq__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/FixNumber__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/General_Branch_Changeflag__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/IF_LastMContract_Taget__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/IF_NA_MCA__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/IF_Renewalrate_Target_Asset_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/IF_Target_MC_Asset_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/IS_VMContract_Asset__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Installation_Date__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/LastMCFixNumber__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Lowest_Insured_Price__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Maintenance_Price_Amount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Maintenance_Price_Year__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Maximum_Insured_Price__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Monthly_Equipment_Amortization_Amount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/New_Contract_TypeF__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/NextOpportunity_Stage__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Next_Contract_End_Date__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Next_Contract_Start_Date__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Next_Maintenance_ContractREC__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Next_Maintenance_Contract__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Next_Management_Code__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Over_FM_Year__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Price_Adjust_Now__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Salesdepartment_HP__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Summary_FM_Months__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Summary_FM_Year__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Summary_FZ__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Surcharge_Defective_Contract__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Third_Party_Return__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Total_Equipment_Amortization_Amount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Asset__c/fields/Warranty_Period__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/BuchangApprovalManagerFSE__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Estimate_List_Price_Sum_P__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Estimate_List_Price_Sum_V__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Estimate_List_Price_Sum__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/IS_Reduced_price_approval__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Inquiry_Approval__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Last_Second_Years_Repair_Cost_Text_Sum__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Last_Third_Years_Repair_Cost_Text_Sum__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Lastyear_Repair_Cost_Text_Sum__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Limit_Price_Amount_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Limit_Price_Amount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Maintenance_Contract_Link__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/New_Contract_Type_TxT__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/New_Estimate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Price_Prediction__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/RepairCount_P__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/RepairCount_V__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Send_Email_To_RC__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Surcharge_Defective_Contract__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Third_Party_Return__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Total_Number_Asset_P__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/Total_Number_Asset_V__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URFMContract1__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URFMContract1_endDate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URFMContract1_startDate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URF_LastMContract1_ConCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URF_LastMContract1_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URF_LastMContract2_ConCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URF_LastMContract2_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URF_LastMContract3_ConCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URF_LastMContract3_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URF_LastMContract4_ConCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URF_LastMContract4_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URF_LastMContract5_ConCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URF_LastMContract5_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URF_P_MaxRepairCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URF_P_RepairTime__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URF_V_MaxRepairCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/fields/URF_V_RepairTime__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/recordTypes/Maintenance_Quote.recordType-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/recordTypes/NewMaintenance_Quote.recordType-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/webLinks/CustomAnew.webLink-meta.xml
force-app/main/default/objects/Maintenance_Contract_Estimate__c/webLinks/Terminal.webLink-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/ActualFrequency_Formula__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Actual_Execution_Quantity_Inplan_Sum__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Actual_Execution_Quantity_Summary__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Actual_adjustment_of_current_price__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Assign_EndDate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Check_Object_sum__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Consumption_rate_Gurante__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/ContractAmortizedTurnover_Inquiry__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/ContractCurrentPeriodPaymentAmountGather__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/ContractM__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Contract_Consumption_rate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Contract_Start_Date_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Contract_target_num__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/CurrentPeriodPaymentAmount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Current_price_should_be__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/DY_J1__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Department_Class__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Department__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Description__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Due_Inspection_sum__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Estimation_Decision__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/FM__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/FSE_Regional_Assistant__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/FY2022_2H_halfFinancialEndDate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/FY2022_2H_halfFinancialStartDate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/From_warranty_period__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Gurantee_Renew_startDate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/IF_Coverage_Target_HP_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/IF_Taget_MC__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/IF_Target_Renew__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Inspection_Time_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Inspectup_Plan_sum__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/JingliApprovalManager_Txt__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/LastMContract1_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/LastMContract2_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/LastMContract3_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/LastMContract4_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/LastMContract5_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Limit_Price_Amount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Limit_Price_Amount_in_Word__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Limit_Price__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Months_amortized_Inquiry__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Months_amortized__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Need_Follow_up_People__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/No_Renewal_Reason__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Open_RenewalQuotation__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/PaymentAmountFlag__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/RC_CC2_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/RC_CC2__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/RC_CC_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/RC_CC__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/RC_Invoice_Window_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/RC_Invoice_Window__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/RC_Recognition_Window_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/RC_Recognition_Window_HD1_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/RC_Recognition_Window_HD1__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/RC_Recognition_Window_HD2_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/RC_Recognition_Window_HD2__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/RC_Recognition_Window__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Remaining_Amount_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Remaining_Amount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/RepairCount_P__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/RepairCount_V__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Service_Contract_Staff__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Service_contract_target_numberTXT__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Service_contract_target_number__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Small_Repair_Time__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Status2__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Sum_repair_price_new_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Surcharge_Defective_Contract__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Test520__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/Third_Party_Return_Contract__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/TotalContractAmortizationAmount_Inquiry__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_Contract_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_LastMContract1_Code__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_LastMContract1_ConCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_LastMContract1_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_LastMContract1__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_LastMContract1_endDate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_LastMContract1_startDate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_LastMContract2_ConCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_LastMContract2_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_LastMContract3_ConCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_LastMContract3_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_LastMContract4_ConCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_LastMContract4_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_LastMContract5_ConCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_LastMContract5_NO__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_P_RepairTime__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_V_RepairTime__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/VM_Contract_Check__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/check_num_c__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/contractAmountForRate__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/mce_create_day__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/off_time__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/one_year_check_num__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/plan_sum_history__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/signUpServiceCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/target_number_c__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/listViews/All.listView-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/listViews/X01_All.listView-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/listViews/X02_Selling.listView-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/listViews/X03_Contracted.listView-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/listViews/X05_Lost.listView-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/recordTypes/Maintenance_Contract.recordType-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/recordTypes/NewMaintenance_Contract.recordType-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/recordTypes/VM_Contract.recordType-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/validationRules/Cannot_Change_HP.validationRule-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/validationRules/CheckUpper_limitReason.validationRule-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/validationRules/CheckUpper_limitReason2.validationRule-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/validationRules/CheckUpper_limitReasonOther.validationRule-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/validationRules/LimitPrice_Estimation_Conform.validationRule-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/validationRules/LimitPrice_check.validationRule-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/validationRules/Opportunity_Stage_check.validationRule-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/validationRules/URFContact_LimitPriceContact_check.validationRule-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/validationRules/URF_Contract_Estimation_Conform.validationRule-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/webLinks/CreateReport.webLink-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/webLinks/Create_NewServiceContract.webLink-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/webLinks/CustomNewCopy2.webLink-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/webLinks/MceContractAgentPDF.webLink-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/webLinks/MceContractHpPDF.webLink-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/webLinks/QuarterlyReport.webLink-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/webLinks/SubmitForApproval.webLink-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/webLinks/pre_contract_submit.webLink-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/webLinks/upload_to_sap.webLink-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fieldSets/ImportantProduct.fieldSet-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fieldSets/ImportantProduct_Old.fieldSet-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Can_Repair_Old__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Can_Repair__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Celon_Product_Old__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Celon_Product__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Key_product_147P_Old__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Key_product_147P__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Key_product_155P_Old__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Key_product_155P__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Service_Category1_Old__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Service_Category2_Old__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Service_Category2__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Service_Category3_Old__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Service_Category3__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Service_Category4_Old__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Service_Category4__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Service_Category5_Old__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Service_Category5__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Service_Category6_Old__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Service_Category6__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Service_Category7_Old__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/Service_Category7__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/suitDepartment_Old__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fields/suitDepartment__c.field-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/recordTypes/EquipmentInfo.recordType-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/recordTypes/GuranteeMain.recordType-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/recordTypes/GuranteePrice.recordType-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/recordTypes/ImportantProduct.recordType-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/recordTypes/RepairInfo.recordType-meta.xml
force-app/main/default/objects/Maintenance_Task__c/webLinks/CreateReport.webLink-meta.xml
force-app/main/default/objects/MergeObject__c/MergeObject__c.object-meta.xml
force-app/main/default/objects/MergeObject__c/fields/duplicates__c.field-meta.xml
force-app/main/default/objects/MergeObject__c/fields/master__c.field-meta.xml
force-app/main/default/objects/MergeObject__c/fields/mergeFinish__c.field-meta.xml
force-app/main/default/objects/Monthly_Report__c/webLinks/Cancel_submit.webLink-meta.xml
force-app/main/default/objects/Monthly_Report__c/webLinks/Submit.webLink-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/NewMaintenanceReport_Task__c.object-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/ActualDistributionTimesAll_Quarter__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/ActualDistributionTimes_Quarter__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/CorrespondingPeriod__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/CurrentQuarter__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/Distribution_End_Date__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/Distribution_Method__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/Distribution_Period__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/Distribution_Person__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/Distribution_Quarter__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/Distribution_Start_Date__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/Distribution_TimelyRate__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/FinishedNotInSection__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/Is_Generate_Task__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/NewMaintenance_Contract__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/NumberOfPlan_Quarter__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/OverOrCurrent_F__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/OverOrCurrent__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/PastQuarter__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/QuartersNum__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/RP_Contact_Method__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/Receive_Person__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/Task_End_Date__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/Task_Status__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/Task_Type__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/Task__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/UseReportNum__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/contractDateNotInSection__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/fields/reissueBatch__c.field-meta.xml
force-app/main/default/objects/NewMaintenanceReport_Task__c/webLinks/SLADetails.webLink-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/fields/Consum_assistant4__c.field-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/fields/OBA3_Email_Group2__c.field-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/fields/OBA3_Email_Group__c.field-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/fields/OnlinePlatformP1__c.field-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/fields/OnlinePlatformP2__c.field-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/fields/OnlinePlatformP3__c.field-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/fields/Province__c.field-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/fields/Real_Province__c.field-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/listViews/All_AIpingtai.listView-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/listViews/All_bussnisswin.listView-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/listViews/All_sales.listView-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/listViews/All_spare.listView-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/webLinks/update_to_opp.webLink-meta.xml
force-app/main/default/objects/ODS__c/fields/Category3__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/Category4__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/Category5__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/Category6__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/Email__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/Employee_No__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/Job_Category__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/Job_Type__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/LeaveDate__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/MobilePhone__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/Name__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/Null_Update__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/PositionSubsequence__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/Post__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/Rank__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/Salesdepartment__c.field-meta.xml
force-app/main/default/objects/ODS__c/fields/Work_Location__c.field-meta.xml
force-app/main/default/objects/ODS__c/listViews/allhr123.listView-meta.xml
force-app/main/default/objects/ODS__c/listViews/no_email.listView-meta.xml
force-app/main/default/objects/ODS__c/validationRules/Email_Isblank.validationRule-meta.xml
force-app/main/default/objects/ODS__c/validationRules/Name_Isblank.validationRule-meta.xml
force-app/main/default/objects/ODS__c/validationRules/Stay_or_not_Isblank.validationRule-meta.xml
force-app/main/default/objects/OFSHospitalLayout__c/fields/section13__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/OPDPlan__c.object-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/AdditionalSupport__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/Approved_No__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/Approved_Status__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/BuchangApprovalManagerSales_Txt__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/BuchangApprovalManagerSales__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/BuchangApprovalManagerSales_eq_Zongjian__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/Buzhang_Equipment_Manager__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/If_NextMonth_Plan__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/Is_Beyond_Plan__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/Is_keyPoint_Product__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/NeedReport_IsNotNull__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/NeedReport__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/OCSM_Category__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/OPDPlan_Approval_By__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/RentalReson__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/SalesManager_eq_Buzhang__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/SalesdepartmentOption__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/Share_Produc_Leader__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/Status__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/TAT_Distribute_To_Deliver__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/TAT_Over_Arrive_Days__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/TongkuoZongjian__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/ZongjianApprovalManager__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/ZongjianApprovalManager_eq_Tongkuo__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/if_Newest_HaveOpportunity__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/fields/originalOpdRentalApply__c.field-meta.xml
force-app/main/default/objects/OPDPlan__c/listViews/All.listView-meta.xml
force-app/main/default/objects/OPDPlan__c/listViews/Completed_notreport.listView-meta.xml
force-app/main/default/objects/OPDPlan__c/listViews/On_prosess.listView-meta.xml
force-app/main/default/objects/OPDPlan__c/listViews/On_prosess0930.listView-meta.xml
force-app/main/default/objects/OPDPlan__c/listViews/WaitReport.listView-meta.xml
force-app/main/default/objects/OPDPlan__c/sharingReasons/ProducLeaderShare__c.sharingReason-meta.xml
force-app/main/default/objects/OPDPlan__c/validationRules/IF_Status_jhz.validationRule-meta.xml
force-app/main/default/objects/OPDPlan__c/validationRules/OPDDateCheck.validationRule-meta.xml
force-app/main/default/objects/OPDPlan__c/validationRules/OPDNoReportMCode.validationRule-meta.xml
force-app/main/default/objects/OPDPlan__c/validationRules/OPDPlanNewcp.validationRule-meta.xml
force-app/main/default/objects/OPDPlan__c/validationRules/OPDPlan_ImplementDateCompare.validationRule-meta.xml
force-app/main/default/objects/OPDPlan__c/validationRules/OPDTypeNoUpdate.validationRule-meta.xml
force-app/main/default/objects/OPDPlan__c/validationRules/OPDTypeXD.validationRule-meta.xml
force-app/main/default/objects/OPDPlan__c/validationRules/isNewCheckAccount.validationRule-meta.xml
force-app/main/default/objects/OPDPlan__c/webLinks/CommitNeedApproval.webLink-meta.xml
force-app/main/default/objects/OPDPlan__c/webLinks/CustomLink.webLink-meta.xml
force-app/main/default/objects/OPDPlan__c/webLinks/NewOPDButton.webLink-meta.xml
force-app/main/default/objects/OPDPlan__c/webLinks/NewOPDButton_Account.webLink-meta.xml
force-app/main/default/objects/OPDPlan__c/webLinks/NewSparePartsLoanApplication.webLink-meta.xml
force-app/main/default/objects/OPDPlan__c/webLinks/NoReportApplication.webLink-meta.xml
force-app/main/default/objects/OPDPlan__c/webLinks/OPDSupplementaryApplication.webLink-meta.xml
force-app/main/default/objects/OPDPlan__c/webLinks/OPD_Report.webLink-meta.xml
force-app/main/default/objects/OPDPlan__c/webLinks/PostponeReport.webLink-meta.xml
force-app/main/default/objects/OPDPlan__c/webLinks/Reapply.webLink-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_31_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_32_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_33_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_34_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_35_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_36_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_37_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_38_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_39_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_40_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_41_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_42_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_43_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_44_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_45_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_46_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_47_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_48_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_49_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_50_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_51_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_52_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_53_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_54_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_55_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_56_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_57_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_58_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_59_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/After_60_WorkDay__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/Holiday_Days__c.field-meta.xml
force-app/main/default/objects/OlympusCalendar__c/fields/IsHoliday__c.field-meta.xml
force-app/main/default/objects/On_Call__c/On_Call__c.object-meta.xml
force-app/main/default/objects/On_Call__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/On_Call__c/fields/Caller_Phone_Encrypt__c.field-meta.xml
force-app/main/default/objects/On_Call__c/fields/Hospital__c.field-meta.xml
force-app/main/default/objects/On_Call__c/fields/Oncall_Equipment__c.field-meta.xml
force-app/main/default/objects/On_Call__c/fields/Responsible_PersonHP_Encrypt__c.field-meta.xml
force-app/main/default/objects/On_Call__c/validationRules/First_follow_up_time.validationRule-meta.xml
force-app/main/default/objects/On_Call__c/validationRules/Need_Follow_up_result.validationRule-meta.xml
force-app/main/default/objects/On_Call__c/validationRules/On_call_finish_time.validationRule-meta.xml
force-app/main/default/objects/On_Call__c/validationRules/Request_on_call_document_number.validationRule-meta.xml
force-app/main/default/objects/On_Call__c/validationRules/Request_on_call_follow_time_from.validationRule-meta.xml
force-app/main/default/objects/On_Call__c/validationRules/Request_on_call_follow_time_to.validationRule-meta.xml
force-app/main/default/objects/On_Call__c/validationRules/Requst_On_call_complete_time.validationRule-meta.xml
force-app/main/default/objects/On_Call__c/webLinks/CopyPI.webLink-meta.xml
force-app/main/default/objects/Opponent_Bid_Information__c/webLinks/Submit_report.webLink-meta.xml
force-app/main/default/objects/OpportunityFileOrder__c/validationRules/SpecificInquiryFileType.validationRule-meta.xml
force-app/main/default/objects/OpportunityFileOrder__c/validationRules/SpecificInquiryFileType01.validationRule-meta.xml
force-app/main/default/objects/OpportunitySpecialApply__c/webLinks/specSubmit.webLink-meta.xml
force-app/main/default/objects/PAE_DecisionRecordDetail__c/fields/product_code__c.field-meta.xml
force-app/main/default/objects/PBIAuthorization__c/fields/ImportVolumePurchasedata__c.field-meta.xml
force-app/main/default/objects/PBIAuthorization__c/fields/MKPI_2_KPI__c.field-meta.xml
force-app/main/default/objects/PBIAuthorization__c/fields/MMKT_VolumePurchase_A__c.field-meta.xml
force-app/main/default/objects/PBIAuthorization__c/fields/MMKT_VolumePurchase_B__c.field-meta.xml
force-app/main/default/objects/PBIAuthorization__c/fields/VolumePurchaseProduct_Range__c.field-meta.xml
force-app/main/default/objects/PCLLostBrand__c/fields/Brand_Differentiation__c.field-meta.xml
force-app/main/default/objects/PCLLostBrand__c/fields/LostPrices_ThousandY__c.field-meta.xml
force-app/main/default/objects/PCLLostBrand__c/fields/Lost_By_Company_Text__c.field-meta.xml
force-app/main/default/objects/PCLLostBrand__c/fields/Lost_By_Company__c.field-meta.xml
force-app/main/default/objects/PCLLostBrand__c/validationRules/SelectOtherAgent.validationRule-meta.xml
force-app/main/default/objects/PCLLostProduct__c/fields/LostBrandName__c.field-meta.xml
force-app/main/default/objects/PCLLostProduct__c/fields/LostProductName__c.field-meta.xml
force-app/main/default/objects/PCLLostProduct__c/fields/LostProduct__c.field-meta.xml
force-app/main/default/objects/PCLLostProduct__c/fields/ProductCategory__c.field-meta.xml
force-app/main/default/objects/PI_Field_Policy_Detail__c/PI_Field_Policy_Detail__c.object-meta.xml
force-app/main/default/objects/PI_Field_Policy_Detail__c/fields/AWS_Encrypted_Field_API__c.field-meta.xml
force-app/main/default/objects/PI_Field_Policy_Detail__c/fields/AWS_Field_API__c.field-meta.xml
force-app/main/default/objects/PI_Field_Policy_Detail__c/fields/Enable_Encrypt__c.field-meta.xml
force-app/main/default/objects/PI_Field_Policy_Detail__c/fields/Enable_Migration__c.field-meta.xml
force-app/main/default/objects/PI_Field_Policy_Detail__c/fields/Field_Type__c.field-meta.xml
force-app/main/default/objects/PI_Field_Policy_Detail__c/fields/Order_Number__c.field-meta.xml
force-app/main/default/objects/PI_Field_Policy_Detail__c/fields/PI_Policy_Configuration_Name__c.field-meta.xml
force-app/main/default/objects/PI_Field_Policy_Detail__c/fields/PI_Policy_Configuration__c.field-meta.xml
force-app/main/default/objects/PI_Field_Policy_Detail__c/fields/SF_Field_API_Name__c.field-meta.xml
force-app/main/default/objects/PI_Field_Policy_Detail__c/fields/SF_Field_Encrypted_API__c.field-meta.xml
force-app/main/default/objects/PI_Field_Policy_Detail__c/fields/SF_Field_Name__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/PI_Policy_Configuration__c.object-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Delete_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Enable_Encrypt__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Full_Delete_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Full_New_Encrypt_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Full_New_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Full_Read_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Full_Report_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Full_Search_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Full_Undelete_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Full_Update_Encrypt_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Full_Update_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Full_View_Unified_Contact_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/New_Encrypt_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/New_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Read_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Report_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Search_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Sobject_Name__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Sobject_Type__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/TransactionURL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Undelete_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Update_Encrypt_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Update_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/View_Unified_Contact_URL__c.field-meta.xml
force-app/main/default/objects/PI_Policy_Configuration__c/fields/Whether_Enable_Migration__c.field-meta.xml
force-app/main/default/objects/Product2__c/Product2__c.object-meta.xml
force-app/main/default/objects/Product2__c/fields/Can_Repair__c.field-meta.xml
force-app/main/default/objects/Product2__c/fields/Service_Category1__c.field-meta.xml
force-app/main/default/objects/Product2__c/fields/Service_Category2__c.field-meta.xml
force-app/main/default/objects/Product2__c/fields/Service_Category3__c.field-meta.xml
force-app/main/default/objects/Product2__c/fields/Service_Category4__c.field-meta.xml
force-app/main/default/objects/Product2__c/fields/Service_Category5__c.field-meta.xml
force-app/main/default/objects/Product2__c/fields/Service_Category6__c.field-meta.xml
force-app/main/default/objects/Product2__c/fields/Service_Category7__c.field-meta.xml
force-app/main/default/objects/Product2__c/recordTypes/CompetitiveProductsConsumables.recordType-meta.xml
force-app/main/default/objects/Product2__c/recordTypes/CompetitiveProductsHost.recordType-meta.xml
force-app/main/default/objects/Product2__c/recordTypes/OlympusProducts.recordType-meta.xml
force-app/main/default/objects/Product2__c/recordTypes/Sample.recordType-meta.xml
force-app/main/default/objects/ProductURF__c/ProductURF__c.object-meta.xml
force-app/main/default/objects/ProductURF__c/fields/Maintenance_Price_Year_URF_3__c.field-meta.xml
force-app/main/default/objects/ProductURF__c/fields/Maintenance_Price_Year_URF_Max_3__c.field-meta.xml
force-app/main/default/objects/ProductURF__c/fields/Maintenance_Price_Year_URF_Max__c.field-meta.xml
force-app/main/default/objects/ProductURF__c/fields/Maintenance_Price_Year_URF__c.field-meta.xml
force-app/main/default/objects/ProductURF__c/fields/UFR_Maintenance_Price_Month_3__c.field-meta.xml
force-app/main/default/objects/ProductURF__c/fields/UFR_Maintenance_Price_Month_Max_3__c.field-meta.xml
force-app/main/default/objects/ProductURF__c/fields/UFR_Maintenance_Price_Month_Max__c.field-meta.xml
force-app/main/default/objects/ProductURF__c/fields/UFR_Maintenance_Price_Month__c.field-meta.xml
force-app/main/default/objects/Product_CategoryPrice_Table__c/fields/OCM_Term__c.field-meta.xml
force-app/main/default/objects/Product_Register_Link__c/fields/product_code__c.field-meta.xml
force-app/main/default/objects/Product_Register_Link__c/fields/product_name__c.field-meta.xml
force-app/main/default/objects/Product_Register__c/fields/test1__c.field-meta.xml
force-app/main/default/objects/Product_Score_Table_History__c/fields/ETAPP_key__c.field-meta.xml
force-app/main/default/objects/Product_Score_Table_History__c/recordTypes/Agency.recordType-meta.xml
force-app/main/default/objects/Product_Score_Table_History__c/recordTypes/Company.recordType-meta.xml
force-app/main/default/objects/Product_Score_Table_History__c/recordTypes/TargetPDCA.recordType-meta.xml
force-app/main/default/objects/Product_Score_Table__c/fields/OCM_Term__c.field-meta.xml
force-app/main/default/objects/PromotionHead__c/PromotionHead__c.object-meta.xml
force-app/main/default/objects/PromotionHead__c/fields/NormalDiscount__c.field-meta.xml
force-app/main/default/objects/PromotionHead__c/fields/Status__c.field-meta.xml
force-app/main/default/objects/PromotionHead__c/listViews/All.listView-meta.xml
force-app/main/default/objects/PromotionHead__c/listViews/ViewCu.listView-meta.xml
force-app/main/default/objects/PromotionHead__c/listViews/ViewTe.listView-meta.xml
force-app/main/default/objects/PromotionHead__c/listViews/ViewYi.listView-meta.xml
force-app/main/default/objects/PromotionSalesProducts__c/fields/Name__c.field-meta.xml
force-app/main/default/objects/PromotionSales__c/fields/IsAssistantAppliedOutTime__c.field-meta.xml
force-app/main/default/objects/PromotionSales__c/fields/Name__c.field-meta.xml
force-app/main/default/objects/QIS_M_BC__c/fields/OCM_Repair_Mail1__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/QIS_Report__c.object-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/AD_Status__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/ApproveBuZhang__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/ApproveManager__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/AssetProModel__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/AwareDateShow__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/AwareDate__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/AwareDatecopy__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Barcode__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/CDS_date__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/CFDA_No_Formular__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Caller_phone_Encrypted__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Comment__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/ComplaintStatus__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Delay_Day__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/FSE_Special_Mail_F__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/FSE_Special_Manager_Mail_F__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Generation_Source__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Hospital__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Is_Box__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/MBC_AwareDate__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/NewProDeliveryDate__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/OCM_Manager_Mail_F__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/OCM_Member_Mail_F__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/OCM_Repair_Mail1_F__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/OCM_Repair_Mail_F__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/OCM_quolity_owner_SN__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/OCM_quolity_owner__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/OCSMAdministrativeReportDate__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/OCSMAdministrativeReportNumber__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/OCSMAdministrativeReportStatus__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/OSH_Manager__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/ProduceCompany_formular__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/ProductValidateTo_New__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/QIS_Market_Category__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/QIS_Reply_Comment__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/QisSubOrder__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/ReplaceDeliveryDate__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Responsible_Person_HP_Encrypted__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Sent_ENG_T4__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Sent_ENG__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Sent_ET_T4__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Sent_ET__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Sent_EndoRapid_T4__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Sent_EndoRapid__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/Trable_occur_daY_collect__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/WorkLocation_CC_Mail_F__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/consumable__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/is_CNBuy__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/fields/usage_frequence__c.field-meta.xml
force-app/main/default/objects/QIS_Report__c/listViews/status_QIS.listView-meta.xml
force-app/main/default/objects/QIS_Report__c/recordTypes/AnswerComp.recordType-meta.xml
force-app/main/default/objects/QIS_Report__c/recordTypes/Comp.recordType-meta.xml
force-app/main/default/objects/QIS_Report__c/recordTypes/Final_Lock.recordType-meta.xml
force-app/main/default/objects/QIS_Report__c/recordTypes/OSH.recordType-meta.xml
force-app/main/default/objects/QIS_Report__c/recordTypes/QISRecordType1.recordType-meta.xml
force-app/main/default/objects/QIS_Report__c/recordTypes/RC.recordType-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/ApplyMus_SetUsageProduct.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/ApplyMust_AfterFailureInformation.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/ApplyMust_BreakORFallOff.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/ApplyMust_Delay15Min.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/ApplyMust_DelayReportReason.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/ApplyMust_FailureQInHospital.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/ApplyMust_InformationFrom.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/ApplyMust_UseFailProductFinish.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/ApplyMust_ifDeadHurt.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/CIC_Only_Create_AoHui.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/Charege_to_Customer_not_select_special.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/OSH_input_finish_chk3.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/Ocsm_Cannot_Change_Judgment.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/Opera_Save_Check.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/QIS_MBC_replay_INPUT.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/Troubule_day_smaller_than_contacted_day.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/check_SaveIMF_AE_PAE.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/consumableRequest.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/validationRules/isCelon.validationRule-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/Cancel_QIS_request.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/Create_QIS_From_Asset.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/CustomLink1.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/M_BC_finaly_reply.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/OCM_Submit.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/OCSMNoToReport.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/OCSMToReport.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/OCSM_Nogoods.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/OSH_Inspect.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/OSH_Nogoods.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/OSH_Recieved.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/OSH_Submit.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/QISAgree.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/QIS_Intake_universal_code.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/QIS_SC.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/QIS_Universal_failure_code.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/RC_CDS_complete.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/RC_Recieved.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/RC_Submit.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/RC_inspection_complete_date.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/SendQIS.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/SendQISToEtQ.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/copy_QIS.webLink-meta.xml
force-app/main/default/objects/QIS_Report__c/webLinks/create_repair.webLink-meta.xml
force-app/main/default/objects/QIS_SC_Report__c/webLinks/SC_Submit.webLink-meta.xml
force-app/main/default/objects/QuoteIraiLineItem__c/fields/CanNotCancelledGurantee__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/Agency1_entrust__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/Agency2_entrust__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/CreatedTime__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/EditLink__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/EntrustmentDate__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/Headquarters__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/LastModifiedTime__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/Lead__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/Noteplus__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/OcsmProvince__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/Opportunity__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/QuotationNo__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/QuoteIrai_Status__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/Urgent__c.field-meta.xml
force-app/main/default/objects/QuoteIrai__c/fields/cancelMultiyearInsurance__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/ReceivingNoteDetail__c.object-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/AccepDataConfirmTime_Day__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/AccepDataConfirmTime_Hour__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/AcceptDataArrivalRequestAgainTime_Day__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/AcceptDataArrivalRequestAgainTime_Hour__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/AcceptDataConfirmAgainTime_Day__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/AcceptDataConfirmAgainTime_Hour__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/AcceptanceComments__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/AcceptanceResult__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/AcceptanceStaff__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/AcceptanceTime__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Acceptance_Quantity__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/After_Inspection_date__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/After_Inspection_time__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Arrival_in_wh__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Arrival_wh_Date__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Arrival_wh_Flag_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Arrival_wh_Request_time__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Arrival_wh_time__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Asset_loaner_category_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Barcode_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Barcode__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Change_Point__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Check_Result_Sum__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/CodeKey__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/DataConfirmationAgainStaff__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/DataConfirmationAgainTime__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/DataConfirmationAgain__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/DataConfirmationStaff__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/DataConfirmationTime__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/DataConfirmation__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/DataMigration_Flag__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Default_Fixture_Arrival_Process__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Default_Fixture_Arrival_Product__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Delete_Flag__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Detail_Finish__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/EquipmentSet_Managment_Code_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/EquipmentSet_Managment_Code__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Equipment_Type_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Equipment_Type__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/FSD_Id__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/FSD_OneToOneAccessory_Cnt_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/FSD_OneToOneAccessory_Cnt__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Fixture_Arrival_Process__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Fixture_Arrival_Product__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Fixture_Model_Name_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Fixture_Model_No_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Fixture_Model_No_text__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Fixture_QRCode_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Fixture_QRCode__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Fixture_Set_Detail__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Fixture_Set_New_Quantity__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Guarantee_End_Check_Text__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Guarantee_End_Check__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/ImageAssetBase64__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/ImageSerialBase64__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/IndexFromUniqueKey_Text__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/IndexFromUniqueKey__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/InspectionAcceptanceTime_Day__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/InspectionAcceptanceTime_Hour__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Inspection_Cnt__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Inspection_Comment__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Inspection_result_after_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Inspection_result_after__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Inspection_staff_After__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Internal_Asset_number_key__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Internal_asset_location__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Is_Body_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Is_Body__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Is_First_RND_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Is_Internal_Asset__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Is_Optional_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Loaner_accsessary_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Loaner_accsessary__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Loaner_centre_mail_address_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Loaner_centre_mail_address__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Manage_type_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Manage_type__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Model_Check_Text__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Model_Check__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/NMPA_Approbation_No_Check_Text__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/NMPA_Approbation_No_Check__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/OT_CODE__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/OneToOne_Flag__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Packing_list_Fixture_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/PeriodOfUse_Final__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/PeriodOfUse_Old_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/PeriodOfUse__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Posting_Date_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Produce_Company_Check_Text__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Produce_Company_Check__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/ProductArrivalTime_Day__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/ProductReceiptTotalTime_Day__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Product_Arrival_Product__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Product_Name_Check_Text__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Product_Name_Check__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Product_Name_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Product_Old_Model_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Product_Serial_No__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Product_category_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Product_category__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Production_Date_Check_Text__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Production_Date_Check__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/RNDAssert__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/RND_Status__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Received_Confirm_Date_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Received_Confirm_Time_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Received_Quantity__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/ReceivingNoteDetailNo__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/ReceivingNoteId_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/ReceivingNoteNo_F_New__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/ReceivingNoteNo_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/ReceivingNoteSummary__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/ReceivingNote__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/RejectStaff__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Reject_Reason__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Reject_Time__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Rental_Num__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/SalesProvince__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Salesdepartment_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Salesdepartment__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/SerialNumberLink__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/SerialNumber_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/SerialNumber_Origin_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/SerialNumber_Origin__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/SerialNumber__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Set_Arrival_Product__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/SortInt_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/StockIn_wh_check_staff__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/UniqueKey__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/VF_Rental_Num__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Vender_Check_Text__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/Vender_Check__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/WH_location__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/WarehouseAcceptanceTime_Day__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/WarehouseAcceptanceTime_Hour__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/WarehouseArrivalTime_Day__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/WarehouseArrivalTime_Hour__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/WarehouseReceiptTime_Day__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/passNo2__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/passNo3__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/unknow_serial_NO_product_F__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/fields/unknow_serial_NO_product__c.field-meta.xml
force-app/main/default/objects/ReceivingNoteDetail__c/validationRules/Main_Fields_Cannot_Blank.validationRule-meta.xml
force-app/main/default/objects/ReceivingNoteSummary__c/fields/AssetContact__c.field-meta.xml
force-app/main/default/objects/ReceivingNote__c/fields/ContactPerson__c.field-meta.xml
force-app/main/default/objects/ReceivingNote__c/fields/DateOfDelivery__c.field-meta.xml
force-app/main/default/objects/ReceivingNote__c/listViews/All.listView-meta.xml
force-app/main/default/objects/ReceivingNote__c/listViews/All1.listView-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_DetailPower_B__c/fields/IsPunishObj__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_DetailPower_B__c/fields/LostReportApprovalDate__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_DetailPower_B__c/fields/Salesdepartment_before__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_DetailPower_B__c/fields/createDate__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fieldSets/MainFixtureSelect_RightFieldSet.fieldSet-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Add_Request_approval_time__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/After_Inspection_time_F_New__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/After_Inspection_time_Final__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/After_inspection_day_New__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Asset__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Confirm_Lost_Date__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/ExternalKey__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Fixture_Set_Detail__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Inspection_result_after_NG_F_New__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Inspection_result_after_New__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Is_Body__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Loaner_Giveup_Time__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Loaner_accsessary__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Loaner_cancel_reason__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/LostReportApprovalDate__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Lost_item_check_time__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Lost_item_giveup__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Over90DayObject__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Over_Loaner_Detail_Status__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Pre_NG_abord_reason__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Pre_inspection_day__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Queue_Time_F__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Queue_Time__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Return_wh_chenk_staff__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Salesdept_Apply__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Salesdept__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Shipment_request_New__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Shipment_request_day__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/Shipment_request_time2_New__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/StockDown_New__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/StockDown_date__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/StockDown_time_New__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/fields/StockDown_time__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/validationRules/Inspection_After_NG_Aborted.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/validationRules/Inspection_After_NG_Aborted_Comment.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/validationRules/Receive_After_NG_Aborted.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/validationRules/Start_day_need_to_bigger_than_today.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set_Detail__c/webLinks/Clear_Return_DeliverySlip.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fieldSets/RentalApplyExtensions_L.fieldSet-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Add_Day_For_RC__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Borrow_day__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Condition_Final_Reply_Days__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Condition_Seven_Days__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Condition_X21_Days__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Delay_Final_Reply_Days_By_Holiday__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Delay_Final_Reply_Days__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Extend_Date_F__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Extend_Final_reply_day_F_Holiday_backup__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Extend_Final_reply_day_Text_Holiday_back__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/FGuzhangpaicha_Final_reply_day_F_Holiday__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Final_reply_day_Holiday_backup__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Final_reply_day__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/First_RAESD_LostReportApprovalDate__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Guzhangpaicha_Final_reply_day_F__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Guzhangpaicha_Final_reply_day_Text_Holid__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Loaner_cancel_reason__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Loaner_categoryI_F__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Min_Final_reply_day_F_Holiday_backup__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Min_Final_reply_day_Text_Holiday_backup__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/NG_Final_reply_day_F_Holiday_backup__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/NG_Final_reply_day_F__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/NG_Final_reply_day_Text_Holiday_backup__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Old_Rental_Apply__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/QIS_Final_reply_day_F_Holiday_backup__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/QIS_Final_reply_day_F__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/QIS_Final_reply_day_Text_Holiday_backup__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Rental_Apply__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Repair_cancel_Final_reply_day_F_Holiday__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Repair_cancel_Final_reply_day_F__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Repair_cancel_Final_reply_day_Text_Holid__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Repair_delete_Final_reply_day_F_Holiday__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Repair_delete_Final_reply_day_Text_Ho__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Return_to_office_Final_reply_day_F_Ho__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Return_to_office_Final_reply_day_F__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Return_to_office_Final_reply_day_Text_Ho__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Return_to_office_Final_reply_day_U_RC_FH__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Return_to_office_Final_reply_day_U_RC_F__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Return_to_office_Final_reply_day_U_RC_Ho__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Set_StockDown_time_New__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Yigoudaihuo_Final_reply_day_F_Holiday__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Yigoudaihuo_Final_reply_day_Text_Holiday__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Yizhouweixiu_Final_reply_day_F_Holiday__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/Yizhouweixiu_Final_reply_day_TextHoliday__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/fields/test__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/validationRules/Can_Not_Change_Received_Confirm.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/webLinks/Cancel_Select.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/webLinks/Clear_Return_DeliverySlip.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/webLinks/CustomSubmit.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/webLinks/EquipmentSetRental_Order.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/webLinks/Loaner_arranged_e_mail.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/webLinks/Reassign.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/webLinks/RentalFixtureSetAssign.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/webLinks/RentalFixtureSetAssignAgency.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/webLinks/RentalFixtureSetSelect.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/webLinks/Select_Substitute.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/webLinks/Split_Apply.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/webLinks/Unassign.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Equipment_Set__c/webLinks/refresh_status.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/Rental_Apply_Fault__c.object-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/AttachmentId1__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/AttachmentId2__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/AttachmentImage1__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/AttachmentImage2__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/BuchangApprovalManagerSales__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/FaultDesc__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/Fixture_Model_No__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/Hospital__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/LoanerFeedback_date__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/Loaner_Storage_mail_address__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/Loaner_centre_mail_address__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/OCM_dept_category__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/Person_In_Charge_User__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/RentalApplyNo__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/Rental_Apply_Equipment_Set_Detail__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/Rental_Assistant2__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/Rental_Assistant__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/Repair_product_body_number__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/Reply_message__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/SalesManager__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/Salesdept__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/SendDate__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/StorageCheckEmail__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/UseExplain__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/WorkPlace__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/ZongjianApprovalManager__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/demo_purpose2__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/fields/status__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/validationRules/NOT_TO_CHANGE_Detail.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/validationRules/NOT_TO_CHANGE_Reply_message.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/validationRules/NOT_TO_CHANGE_UseExplain.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/webLinks/feedbackReport.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Fault__c/webLinks/sendReport.webLink-meta.xml
force-app/main/default/objects/Rental_Apply_Power_BI__c/fields/RAOPDBuchang__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Sequence__c/fields/Apply_Set_Detail_ExternalKey_Queue__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Sequence__c/fields/Apply_Set_Detail_ExternalKey__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Sequence__c/fields/ExternalKey_Series_No__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Sequence__c/fields/ExternalKey__c.field-meta.xml
force-app/main/default/objects/Rental_Apply_Sequence__c/fields/Series_Unequal_Queue_Flag__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/Rental_Apply__c.object-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Approved_State_Create__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/BuchangApprovalManagerSalesSubmit__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/CL5_CL5_CL6_CL6__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/CancelApplyDay__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/CancelDay__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Cancel_Reason__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Direct_Shippment_Address_Encrypt__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Equipment_Type_F__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Extension_List_RentalApply__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Extension_Type__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Follow_pcl_status3__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/History_Extension_Much_ID__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Inquiry_Promotion_Formula_New__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Inquiry_Promotion__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Inquiry_Status_History__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Inquiry_Status_Now__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Loaner_Storage_mail_address__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Need_Buzhang_Sale_NewApp__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/OBA3_Email_Group__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/OPDBuchangApprover__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/OPDBuchang_Text__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/OPDBuchang__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/OPDManagerApprover__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/OPDManagerText__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/OPDManager__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/OPDType__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/OPD_Share_one_id__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Phone_Number_Encrypt__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/ProducLeader_Share__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/SF_Id__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/SalesdeptSelect__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Status_of_Inquiry_Promotion__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/Strategic_user__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/faraway__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/haveChange__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/requestNoJoinStr1__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/fields/test1011__c.field-meta.xml
force-app/main/default/objects/Rental_Apply__c/listViews/All.listView-meta.xml
force-app/main/default/objects/Rental_Apply__c/listViews/All_ReturnShipped.listView-meta.xml
force-app/main/default/objects/Rental_Apply__c/listViews/All_Sellected.listView-meta.xml
force-app/main/default/objects/Rental_Apply__c/listViews/All_Shipped.listView-meta.xml
force-app/main/default/objects/Rental_Apply__c/listViews/All_Shipped_check.listView-meta.xml
force-app/main/default/objects/Rental_Apply__c/listViews/All_Waiting_approved01.listView-meta.xml
force-app/main/default/objects/Rental_Apply__c/listViews/All_approved.listView-meta.xml
force-app/main/default/objects/Rental_Apply__c/listViews/X033.listView-meta.xml
force-app/main/default/objects/Rental_Apply__c/recordTypes/AgencyRequest.recordType-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/After_Approval_Can_Not_Change_Status.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/After_Request_approve.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/After_Request_approve_PIPL.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/After_Request_shipping.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/Cannot_Apply_From_The_OPD.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/Cannot_Set_Hope_Lonaer_date_Num.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/Cannot_Submit_When_NOTHave_ManagerBuzhan.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/Check_Opd_Plan_FXH.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/Check_Opd_Plan_XH.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/Cross_Region_Assign.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/For_Repair_loaner_Need_repair_number.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/HP_Recieved_Required_Check.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/Need_Opp_Zhucan.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/NotEditName.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/Purpose2_RepairUser_Have_Contract.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/Purpose2_RepairUser_Have_Flag.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/Repair_Create_RAC_Rule.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/Repair_Status_flag_Confim.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/Request_day_need_to_bigger_than_today.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/Request_not_RC_return_for_repair_apply.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/Request_return_day_date_check.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/validationRules/System_Auto_Cannot_Modify.validationRule-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/Add_submit_approval_process.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/All_Delivery_btn.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/CopyPI.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/Copy_To_Rental.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/EquipmentRentalApply_FromAccount2.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/EquipmentRentalApply_FromCampaign21.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/EquipmentRentalApply_FromOPD2.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/EquipmentRentalApply_FromOPP2.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/EquipmentRentalApply_FromQIS2.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/EquipmentRentalApply_FromRepair2.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/EquipmentRentalApply_FromSA.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/EquipmentRentalPDF.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/EquipmentRentalPicturePDF.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/EquipmentSetRental_Order.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/EquipmentSetRental_Order2.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/Loaner_arranged_e_mail.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/Lost.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/NewTransferApply.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/Rental_Apply_FaultReport.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/all_received_fse.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/returnDeliverySlip.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/submit_approval_process.webLink-meta.xml
force-app/main/default/objects/Rental_Apply__c/webLinks/topInQueue.webLink-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/RepairAgainAn_M_BC__c.object-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/Hospital__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/M_BC__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/OCM_Repair_Mail1__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/OCM_Repair_Mail__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/OCM_period__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/OCSM_Manager_Mail__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/OCSM_Member_Mail__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/OwnerAlias__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/Received_feiqi_date__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/RepairAgainAn_M_BC__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/RepairAgainAn_M_BC_answer_day__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/RepairAgainAn_M_BC_answer_detail__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/RepairAgainAn_M_BC_management_code__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/RepairAgainAn_product_name__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/RepairAgainAn_request_name__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/RepairAgainAn_submit_date_for_MBC__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/accsessary_detail__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn_M_BC__c/fields/accsessary_ship__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/RepairAgainAn__c.object-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/ActionOCM__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/ActionOSH2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/AnalysisOCM__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/AnalysisOSH2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/AnalysisReasonOSH2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Complaint_confirm2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Complaint_confirm__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Complaint_otherFault2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Complaint_otherFault__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Countermeasures2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Countermeasures__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Customer_Describe__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Dectect_Picture3_URL__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Dectect_Picture3__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Dectect_Picture4_URL__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Dectect_Picture4__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Delivered_Product__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Incharge_Staff__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/InspectionComment__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/InspectionFailureCause_Last__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/JudgementOSH2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/LastDateCnt__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OCM_Confirmation_Date__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OCM_Confirmer__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OCSM_Approve_Status__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Accept_Day__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Auditor2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Auditor__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Confirmation_Date2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Confirmer2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Dectect_Picture4__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Dectect_Picture5_URL__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Dectect_Picture5__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Dectect_Picture6_URL__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Dectect_Picture6__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Dectect_Picture7_URL__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Dectect_Picture7__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Dectect_Picture8_URL__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Dectect_Picture8__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OSH_Detector2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/RC_Confirmer__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/RC_Describe__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/RepairAgainAn_Approve_Confirm2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/RepairAgainAn_Approve_Confirm__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/RepairAgainAn_Approve_applyDate2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/RepairAgainAn_Approve_applyDate__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/RepairAgainAn_Approve_status2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/RepairAgainAn_Approve_status__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/RepairAgain_Status__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/ResponseNew__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Response_RF_User1__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Response_RF_User2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Response_RF_User3__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Response_RF_User4__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Response_RF_User5__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Response__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/SORC__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/SerialNumber1__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Start_RepairAgainAn_Day__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/Warranty_Category__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/is_RC_confirm__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/issue_QIS_M_BC2__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/issue_QIS_M_BC__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/repairLast__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/recordTypes/RecordType.recordType-meta.xml
force-app/main/default/objects/RepairAgainAn__c/recordTypes/RepairAgainRecordType1.recordType-meta.xml
force-app/main/default/objects/RepairAgainAn__c/recordTypes/RepairAgainRecordType2.recordType-meta.xml
force-app/main/default/objects/RepairAgainAn__c/recordTypes/RepairAgainRecordType3.recordType-meta.xml
force-app/main/default/objects/RepairAgainAn__c/recordTypes/RepairAgainRecordType4.recordType-meta.xml
force-app/main/default/objects/RepairAgainAn__c/webLinks/FSE_Submit.webLink-meta.xml
force-app/main/default/objects/RepairAgainAn__c/webLinks/OCSMFollowEnd.webLink-meta.xml
force-app/main/default/objects/RepairAgainAn__c/webLinks/OSHAccept.webLink-meta.xml
force-app/main/default/objects/RepairAgainAn__c/webLinks/OSHFollowEnd.webLink-meta.xml
force-app/main/default/objects/RepairAgainAn__c/webLinks/PDF_RepairAgain_OCSM.webLink-meta.xml
force-app/main/default/objects/RepairAgainAn__c/webLinks/PDF_RepairAgain_OSH.webLink-meta.xml
force-app/main/default/objects/RepairAgainAn__c/webLinks/PDF_RepairAgain_RC.webLink-meta.xml
force-app/main/default/objects/RepairAgainAn__c/webLinks/RC_confirm.webLink-meta.xml
force-app/main/default/objects/RepairAgainAn__c/webLinks/new_M_BC.webLink-meta.xml
force-app/main/default/objects/RepairSubOrder__c/RepairSubOrder__c.object-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ActualVisitDateSecon__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ActualVisitDateThird__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ActualVisitTimeFirst__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ActualVisitTimeSecond__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ActualVisitTimeThird__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/AfterFailureInformation__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ApplicanterPhone__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/Applicanter__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/AssetModel__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/BreakORFallOff__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/CancelleRepairTime__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/DateReceiptQuestions__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/Delay15Min__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/DelayReportReason__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/Department__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/FailureQInHospital__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/FailureReason__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/Fault_Date__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/IfDeadHurt__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/InformationFrom__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/IsOts__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/IsProductFaultRelated__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/Item0010__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/Item0020__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/Item0030__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/Item0040__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/Item0050__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/LogisticsSendDate__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/OperationOrExaminationName__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/OrderNumber__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/PlannedVisitDate__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ProblemDescription__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ProblemOccurredSelect__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ProblemOccurred__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ProcessResult__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ReceiverDate__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ReceiverTime__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/Receiver__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/RecepientAddress__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/RecepientCompany__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/RecepientMobilePhone__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/RecepientName__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/RepairApplicantName_Encrypted__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/RepairApplicantName__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/RepairApplicantTel_Encrypted__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/RepairApplicantTel__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/RepairCancelReason__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/RepairFinishDate__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/RepairTime__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ReportAdverseEvents__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ResponseResultDesc__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ResponseResultType__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/ReturnWayType__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/SFDCRepairApplyDate__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/SenderAddress__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/SenderCompany__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/SenderMobilePhone__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/SenderName__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/SenderOrgCode__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/StartTimeSecond__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/StartTimeThird__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/State__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/Status__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/SupportingProducts__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/UseFailProductFinish__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/fields/WhatProject__c.field-meta.xml
force-app/main/default/objects/RepairSubOrder__c/listViews/RepairSubList_Completed.listView-meta.xml
force-app/main/default/objects/RepairSubOrder__c/listViews/RepairSubList_Pending.listView-meta.xml
force-app/main/default/objects/RepairSubOrder__c/listViews/View_sheng.listView-meta.xml
force-app/main/default/objects/RepairSubOrder__c/webLinks/ApplyForQIS.webLink-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Asset_day__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/CreatedByLocation_sys__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/CreatedByProfileName_sys__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Discount_ratio_denominator__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Discount_reason__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Discount_reason_list_comma_c__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Equipment_Type__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/FSE_Main_TongKuoZongJian__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Failure_Source__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Fixture_Model_No_F__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Internal_Asset_number_key__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Internal_asset_location__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Loaner_Discount_Price__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Loaner_repair_sys__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/RentalApplyDiscountApplyPersonEmail_sys__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/RentalApplyDiscountApplyPerson__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Rental_Apply_AcceptWindow_Date__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Rental_Apply_Director_Date__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Rental_Apply_Discount_Reason__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Rental_Apply_Discount_Request_Date__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Rental_Apply_Discount_Status__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Rental_Apply_SeniorDirector_Date__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Repair_count__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Request_discount_amount__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Request_discount_price__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Request_discount_ratio__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/Spares_Background_Description__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/fields/callback_corresponding__c.field-meta.xml
force-app/main/default/objects/Repair_Quotation__c/validationRules/Edit_Disabled_When_Repair_Finished.validationRule-meta.xml
force-app/main/default/objects/Repair_Quotation__c/validationRules/need_discount_reason.validationRule-meta.xml
force-app/main/default/objects/Repair_Quotation__c/webLinks/Discount_Request.webLink-meta.xml
force-app/main/default/objects/Repair_Quotation__c/webLinks/RentalApplyDiscountApproval.webLink-meta.xml
force-app/main/default/objects/Repair_Quotation__c/webLinks/ServiceCutPriceApply.webLink-meta.xml
force-app/main/default/objects/Repair__c/Repair__c.object-meta.xml
force-app/main/default/objects/Repair__c/fields/AD_Status__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Address_AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Address_Contacts_Encrypt__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Address_Contacts_Name_Encrypt__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Address_Telephone_Encrypt__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Address_Type_Index__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Address_ZipCode_Encrypt__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Address_type__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Advance_Payment_Flag__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Assistant_Mail_Address__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Average_Maintenance_Cost__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Average_Usage_Time__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/AwaitToSendAWS__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/AwareDateShow__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/AwareDate__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/AwareDatecopy__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Aware_date2__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Barcode__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/CompanyCodeOfEquipment__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/CompanyOfEquipment_owner__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Contact_AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Contain_UseRSA__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Cumulative_Times__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Cumulative_Uses__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/CurrentPeriodPaymentAmountGather__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/CurrentPeriodPaymentAmount__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Cycle_between_failure__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/DOJ_Status__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/DW_Sign__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/DateReceiptQuestions__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Day_later_30__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Day_later_366__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Delay_Day__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Dept_is_active__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Detailed_Address_Encrypt__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Detailed_Address__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Dummy_Maintenance_Contract_No_F__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Effective_RentalApply_No__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Encrypt_Update_Flag__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/FSE_Main_WorkLocation__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/FSE_State__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/FailureYear__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Field3__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/IF_ContractUser__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Incharge_Staff_Email__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Invalid_check__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Invoice_Date__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Is_Box__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Limit_Price__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/ListPrice__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/MAFINAL__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/MAINITIAL__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/MBC_AwareDate__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/NFM105__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/NewProductGuarante_Formula__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/OCM_quolity_owner_SN__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/OCM_quolity_owner__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/OCSM_Manager_Mail_F__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/OSH_Affirmant__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/OSH_ConfirmationDate__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/OSH_DOJ_Mail__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/OSH_quolity_owner__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Offer_Rental__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/PAE_email_F__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/PartsreadyDate__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/PaymentAmountFlag__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/ProblemOccurredSelect__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/ProblemOccurred__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/ProductValidateTo_New__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/ProductValidateTo__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/ProvinceCodeOfEquipment__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/RC_Mail_Address1__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/RC_Mail_Address__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Recall_Correspondence__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/ReceiverTime__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Remaining_Amount__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/RepairAgainAn_Status__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/RepairReasonTrigger__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/RepairSource_Txt__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Repair_Applicant_Encrypt__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Repair_Date__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Repair_Determine__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Repair_Start_Date__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/ReturnOrderReceive__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/ReturnOrderSendDate__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Returns_Product_way__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/SalesOfficeCode_selection__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Status1Text__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/TAT_Agrees_to_Quote_Days__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/URFLimitSerial__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Usage_Ratio_Price_Contract__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Usage_Ratio_Price_Guarantee__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Usage_Ratio_Price_Service__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/Usage_Ratio_Price__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/UseFailProductFinish__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/ZFLAG_CGSX__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/ZFLAG_SX__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/address_Telephone__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/do_not_repair_return_application__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/is_CNBuy__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/is_aohui_product__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/part_arrangement_complete__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/subtract_Ordered_Occurrence__c.field-meta.xml
force-app/main/default/objects/Repair__c/fields/work_location_select__c.field-meta.xml
force-app/main/default/objects/Repair__c/listViews/All.listView-meta.xml
force-app/main/default/objects/Repair__c/listViews/All2.listView-meta.xml
force-app/main/default/objects/Repair__c/listViews/All2111.listView-meta.xml
force-app/main/default/objects/Repair__c/listViews/Finished_repair_not_return.listView-meta.xml
force-app/main/default/objects/Repair__c/listViews/Recentry_Updated.listView-meta.xml
force-app/main/default/objects/Repair__c/listViews/testzyh.listView-meta.xml
force-app/main/default/objects/Repair__c/recordTypes/RecordType.recordType-meta.xml
force-app/main/default/objects/Repair__c/recordTypes/Repair.recordType-meta.xml
force-app/main/default/objects/Repair__c/validationRules/Aohui_Product_Select_Seivice.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_AfterFailureInformation.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_BreakORFallOff.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_DateReceiptQuestions.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_Delay15Min.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_DelayReportReason.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_FailureQInHospital.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_InformationFrom.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_OperationOrExaminationName.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_ProblemOccurred.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_ProblemOccurredOther.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_ProductFailureRelated.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_ReportAdverseEvents.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_SubOrderCompleteDate_Same.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_SupportingProducts.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_UseFailProductFinish.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_WhatProject.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/ApplyMust_ifDeadHurt.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/Aset_AMM_Repair_chk.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/Aset_SORC_Repair_chk.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/DateReceiptQuestionsAndFailureDate.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/Edit_Disabled_When_Finished.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/Incharge_Staff_Changed.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/Incharge_Staff_invalid.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/MaintenancePredictionVerification.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/Must_Be_Dept_Check.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/No_ChangeIF_After_Draf.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/Repair_Product_Direct_SORC.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/Repair_Product_Input_Day.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/Request_input_collect_money_date.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/Send_NFM103_Chk1.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/When_NFM103_Required.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/When_NFM103_With_Repairing.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/cannot_send_yanshoudan_before_return_ass.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/isCelon.validationRule-meta.xml
force-app/main/default/objects/Repair__c/validationRules/work_location_select_self_or_4RC.validationRule-meta.xml
force-app/main/default/objects/Repair__c/webLinks/ASRC_Editor.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/AS_AC_Editor.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/Address.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/Copy_Repair.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/Create_Repair_From_Asset.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/Create_Repair_From_Department.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/Create_Repair_From_OnCall.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/Create_Repair_From_QIS.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/CustomDelete.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/LabelPrint.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/OCSMNoToReport.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/OCSMToReport.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/Ready_NFM103.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/Repair_Return_Analysis.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/SendRepairsToEtQ.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/Send_NFM103.webLink-meta.xml
force-app/main/default/objects/Repair__c/webLinks/Yanshoudan_request.webLink-meta.xml
force-app/main/default/objects/Repair_reason__c/fields/Insert_Check__c.field-meta.xml
force-app/main/default/objects/ReportMemo__c/ReportMemo__c.object-meta.xml
force-app/main/default/objects/ReportMemo__c/fields/Account_Delay_Apply__c.field-meta.xml
force-app/main/default/objects/ReportMemo__c/fields/Inquiry_form__c.field-meta.xml
force-app/main/default/objects/ReportMemo__c/fields/Opportunity__c.field-meta.xml
force-app/main/default/objects/ReportMemo__c/fields/Report__c.field-meta.xml
force-app/main/default/objects/Report__c/Report__c.object-meta.xml
force-app/main/default/objects/Report__c/fields/AD_Status__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/AE_DetermineResult__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Asset_return_day2__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/AwareDate__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Caller_phone_c_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/ComplaintStatus__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Complaint_remarks__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Daily_Report__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Damage_For_Doc_Or_Pat__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/HospitalDepartment_RecordTypeName_Txt__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/HospitalDepartment_RecordTypeName__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Hospital_Department__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Informed_Date__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Key_product1__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Key_product1_wave__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Key_product2__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Key_product2_wave__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Key_product3_wave__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Key_product4_wave__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Key_product5_wave__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Key_product_wave__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Medical_History_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Model_No__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/OCSM_Manager_Mail_F__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/OCSM_Manager_Mail__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Occur_Date__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/PAE_email_F__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/PAE_email__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Person_In_Charge_Text_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Practitioner1_Part_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Practitioner1__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Practitioner2_Part_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Practitioner2__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Practitioner3_Part_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Practitioner3__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Practitioner4_Part_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Practitioner4__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Practitioner5_Part_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Practitioner5__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Product_Serial_No__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Professor_sigh_text_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Relevant_information__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Responsible_Person_HP_c_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Salesdepartment_Text__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/Staff_Info_Manual_c_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/VOC_Informer_Contact_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/VOC_Informer_Name_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/age_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/fields/sex_Encrypted__c.field-meta.xml
force-app/main/default/objects/Report__c/recordTypes/Competitor.recordType-meta.xml
force-app/main/default/objects/Report__c/recordTypes/Complaint.recordType-meta.xml
force-app/main/default/objects/Report__c/recordTypes/Improvement.recordType-meta.xml
force-app/main/default/objects/Report__c/recordTypes/MarketCondition.recordType-meta.xml
force-app/main/default/objects/Report__c/recordTypes/NTC.recordType-meta.xml
force-app/main/default/objects/Report__c/recordTypes/OPD.recordType-meta.xml
force-app/main/default/objects/Report__c/recordTypes/On_Call.recordType-meta.xml
force-app/main/default/objects/Report__c/recordTypes/Product_Explanation.recordType-meta.xml
force-app/main/default/objects/Report__c/recordTypes/SIS.recordType-meta.xml
force-app/main/default/objects/Report__c/recordTypes/SIS_ENG.recordType-meta.xml
force-app/main/default/objects/Report__c/recordTypes/SIS_ET.recordType-meta.xml
force-app/main/default/objects/Report__c/recordTypes/Visit_With.recordType-meta.xml
force-app/main/default/objects/Report__c/validationRules/ApplyMust_VOCcrectedCheck.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/Approved_cannot_change.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/CHECK_customer_evaluation_sheet.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/Input_comment_before_share_with_MKE.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/Input_result_before_VOC_answer.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/JF_Scope_Need_to_Select_from_Asset.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/Only_OPDtoSIS.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/Product2CanNotEqualProduct1.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/Required_Patient_Status.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/Required_Use_Materials.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/VOC_answer_chk1.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/VOC_answer_chk2.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/VOC_delivery_chk.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/VOC_finish_chk.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/VOC_follow_chk1.validationRule-meta.xml
force-app/main/default/objects/Report__c/validationRules/VOC_follow_chk2.validationRule-meta.xml
force-app/main/default/objects/Report__c/webLinks/Cancel.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/Cancel_submit.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/Complete.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/Copy2.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/OCSMNoToReport.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/OCSMToReport.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/OPD_Report.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/OPD_Report_Consum.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/OPD_to_SIS.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/SIS_to_OPD.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/Submit.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/Submit_competitor_report.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/VOCAnswer.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/VOCCheck.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/VOCConfirm.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/VOCFinish.webLink-meta.xml
force-app/main/default/objects/Report__c/webLinks/VOCSubmit.webLink-meta.xml
force-app/main/default/objects/Request_tedner_doc__c/webLinks/Cancel_submit.webLink-meta.xml
force-app/main/default/objects/Request_tedner_doc__c/webLinks/Submit.webLink-meta.xml
force-app/main/default/objects/Result_for_Conference_Adjudication__c/Result_for_Conference_Adjudication__c.object-meta.xml
force-app/main/default/objects/SI_Attachment__c/webLinks/SI_Submint_BTN.webLink-meta.xml
force-app/main/default/objects/SMARM__c/webLinks/SubmitAndProcess.webLink-meta.xml
force-app/main/default/objects/SS_OPDPlan__c/fields/SSIsSaveOrSubmit_Specify__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/BO_Forecast_ThousandY__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/BeforeSSoppUp__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/BidWinningNumber__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Closing_Bid_Date_Bid__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Equipment_Order_Flg__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Forecast_target_ship_lastmonth__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Forecast_target_ship_prospect__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/If_Account_Change__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/ImportDemonstration_Approval_date__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/ImportDemonstration_Filing_date__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/ImportDemonstration_Rejection_date__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/ImportDemonstration_state__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Important_contract__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/NumberOfBids__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/OCSM_RMB_Without_Tax_1000TR__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/OCSM_RMB_Without_Tax_1000__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/OP_ThousandY_Copy__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/OP_ThousandY__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Opp_Actual_ThousandY__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Opp_Delay_Mark__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Opp_Forecast_ThousandY__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Opp_New_Mark__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Opportunity_ThousandY_Copy__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Opportunity_ThousandY__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Purchase_Type_Formula__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Purchase_Type__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/TenderBeginDate__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Tender_Number__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Trade__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Update_situation__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/Wholesale_Price_F_RMB__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_5days_list__c/fields/if_NeedImportDemonstration__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/Closing_Bid_Date_Bid__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/DeliveryForecastMonth__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/ENG_New__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/GuranteePriceSum__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/GuranteeType__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/If_Account_Change__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/Important_contract__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/OCSM_RMB_Without_Tax_1000TR__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/OCSM_RMB_Without_Tax_1000__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/Opp_Delay_Mark__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/Opp_New_Mark__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/TenderBeginDate__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/Trade__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/Wholesale_Price_F_RMB__c.field-meta.xml
force-app/main/default/objects/SS_Prospect_detail_product__c/fields/Wholesale_Price_F__c.field-meta.xml
force-app/main/default/objects/SS_backorder_list__c/fields/ContractAmountNoGurantee_F__c.field-meta.xml
force-app/main/default/objects/SS_backorder_list__c/fields/NetWorthNoProviston_DN_F__c.field-meta.xml
force-app/main/default/objects/SS_backorder_list__c/fields/Opp_Delay_Mark__c.field-meta.xml
force-app/main/default/objects/SS_backorder_list__c/fields/Opp_New_Mark__c.field-meta.xml
force-app/main/default/objects/SS_backorder_list__c/fields/Trade__c.field-meta.xml
force-app/main/default/objects/Sample_order_list__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Sample_order_list__c/fields/city__c.field-meta.xml
force-app/main/default/objects/Sample_order_list__c/fields/province__c.field-meta.xml
force-app/main/default/objects/Service_Category7__c/Service_Category7__c.object-meta.xml
force-app/main/default/objects/SolutionProjectRequirements__c/fields/GirWindowDirectorApproved__c.field-meta.xml
force-app/main/default/objects/SolutionProjectRequirements__c/webLinks/Closing_Case.webLink-meta.xml
force-app/main/default/objects/SolutionProjectRequirements__c/webLinks/NewSolutonPro.webLink-meta.xml
force-app/main/default/objects/SolutionProjectRequirements__c/webLinks/Submit_For_Approval.webLink-meta.xml
force-app/main/default/objects/Solution_Programme__c/webLinks/NewSolutionProgramma.webLink-meta.xml
force-app/main/default/objects/Solution_Programme__c/webLinks/SolutionCopy.webLink-meta.xml
force-app/main/default/objects/Solution_Programme__c/webLinks/Submit_For_Approval.webLink-meta.xml
force-app/main/default/objects/Solution_Programme__c/webLinks/newEdit.webLink-meta.xml
force-app/main/default/objects/Statu_Achievements_DN__c/fields/Is_Corrosion__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements_DN__c/fields/aXiReport__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements_DN__c/webLinks/insertFrameNumManag.webLink-meta.xml
force-app/main/default/objects/Statu_Achievements_DN_details__c/fields/SerialNoorLotNo_Raw__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements_DN_details__c/fields/TracingCode_Raw__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements_DN_details__c/fields/aXiReport__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements_Journal__c/fields/ShippedAmount_without_tax_F__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/BackstageForecastDeliveryDateReport_PBI__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/ForecastAccuracyObject__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/Owner_Category__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/Owner__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/ShippedAmount152P_DN__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/ShippedAmount153P_DN_A__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/ShippedAmount_152P_Sum__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/ShippedAmount_ZM_153P__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/ShippedAmount_ZM_WithoutTax_152P__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/ShippedAmount_without_tax_DN__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/Trade__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/UnshippedAmount_without_tax_A__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/UnshippedAmount_without_tax_Thousand_DN__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/X152PNetWorthNoProviston__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/X152PshipmentAmount__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/X153PNetWorthNoProviston_A__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/fields/aXiReport__c.field-meta.xml
force-app/main/default/objects/Statu_Achievements__c/listViews/All_Shipwithoutanzhuangbaogao_wai.listView-meta.xml
force-app/main/default/objects/SubAuthorized__c/webLinks/cancelSubAuthorizedButton.webLink-meta.xml
force-app/main/default/objects/Tender_Opportunity_Link__c/Tender_Opportunity_Link__c.object-meta.xml
force-app/main/default/objects/Tender_Opportunity_Link__c/fields/IsLeakage__c.field-meta.xml
force-app/main/default/objects/Tender_Opportunity_Link__c/fields/Opportunity__c.field-meta.xml
force-app/main/default/objects/Tender_Opportunity_Link__c/fields/OwnerIsChange__c.field-meta.xml
force-app/main/default/objects/Tender_Opportunity_Link__c/fields/Tender_Opportunity_Uniq__c.field-meta.xml
force-app/main/default/objects/Tender_Opportunity_Link__c/fields/Tender_information__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/Tender_information__c.object-meta.xml
force-app/main/default/objects/Tender_information__c/fields/AWS_Data_Id__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/AgentRelationName_Encrypted__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/AgentRelationWay_Encrypted__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/AreaCity__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/AreaCountry__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/AreaProvince__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/BidWinningNumber__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/BiddingOCSMAdministration__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/BiddingType__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/BudgetAmountNumber__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/BudgetAmount__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/CentralizedProject__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/ConfirmationAssistant__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/ConfirmationofAward__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/Domestic_Or_Import__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/Hospital1__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/Hospital2__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/Hospital3__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/Hospital4__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/Hospital__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/If_Tender_Intime__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/InfoId__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/InfoQianlimaUrl__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/InfoType__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/InvolveBudgetAmount__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/IsBid__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/IsRelateProject__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/Keywords__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/Logical_delete__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/NumberOfBids__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/OBSAP_PR__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/OBSAP_WinnerAmount__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/OCSMProvince__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/OlyNumberHosts__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/OpenBidingTime__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/OpportunityNum__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/OpportunityStatus__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/OwnerIsActive__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/OwnerOcsm__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/RelateOppDate__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/RivalHostsNumber__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/SalesDepartmentOwner__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/Salesdepartment_SAP__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/TAT_Opportunity_Num__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/TAT_Relative_Num__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/TenderBeginTime__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/TenderEndTime__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/TenderManageCode__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/TenderNum__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/Tender_Number__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/Tender_Olympus__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/Tender_Order__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/TotalNumberHosts__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/ViewBidConfirm__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/ViewRelatedOpp__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/ViewWaitConfirm__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/WinnerAmount1__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/WinnerAmountNumber__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/WinnerAmount__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/XmNumber__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/ZhaoRelationName_Encrypted__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/ZhaoRelationName__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/ZhaoRelationWay_Encrypted__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/ZhaoRelationWay__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/ZhongBiaoUnit1__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/ZhongRelationName_Encrypted__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/ZhongRelationWay_Encrypted__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/atypism__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/department__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/department_category__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/irrelevantReasonOther__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/irrelevantReasons__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/irresponsibleReasonOther__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/irresponsibleReason__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/noticeDate__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/proInvolvedManual__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/proInvolved__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/publicDate__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/relativeDate__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/relativeTime_F__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/relativeTime__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/remarks1__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/remarks2__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/status__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/subDepartment1__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/subDepartment2__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/subDepartment3__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/subDepartment4__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/fields/subInfoType__c.field-meta.xml
force-app/main/default/objects/Tender_information__c/listViews/All.listView-meta.xml
force-app/main/default/objects/Tender_information__c/listViews/All_01.listView-meta.xml
force-app/main/default/objects/Tender_information__c/listViews/All_03.listView-meta.xml
force-app/main/default/objects/Tender_information__c/listViews/All_0301.listView-meta.xml
force-app/main/default/objects/Tender_information__c/listViews/All_04.listView-meta.xml
force-app/main/default/objects/Tender_information__c/listViews/All_0401.listView-meta.xml
force-app/main/default/objects/Tender_information__c/listViews/All_05.listView-meta.xml
force-app/main/default/objects/Tender_information__c/listViews/All_0501.listView-meta.xml
force-app/main/default/objects/Tender_information__c/listViews/All_uncomfirmdate.listView-meta.xml
force-app/main/default/objects/Tender_information__c/listViews/View25.listView-meta.xml
force-app/main/default/objects/Tender_information__c/listViews/bidding20220701.listView-meta.xml
force-app/main/default/objects/Tender_information__c/listViews/serviceproject20220118.listView-meta.xml
force-app/main/default/objects/Tender_information__c/recordTypes/Mannual.recordType-meta.xml
force-app/main/default/objects/Tender_information__c/recordTypes/QLM.recordType-meta.xml
force-app/main/default/objects/Tender_information__c/validationRules/InfoType_select_resultdate_check.validationRule-meta.xml
force-app/main/default/objects/Tender_information__c/validationRules/Manually_enter_stage_supplementary_rules.validationRule-meta.xml
force-app/main/default/objects/Tender_information__c/webLinks/Contrary_Logical_del.webLink-meta.xml
force-app/main/default/objects/Tender_information__c/webLinks/CopyPI.webLink-meta.xml
force-app/main/default/objects/Tender_information__c/webLinks/IfResponse.webLink-meta.xml
force-app/main/default/objects/Tender_information__c/webLinks/NewHospital.webLink-meta.xml
force-app/main/default/objects/Tender_information__c/webLinks/NewIntention.webLink-meta.xml
force-app/main/default/objects/Tender_information__c/webLinks/NewOpp.webLink-meta.xml
force-app/main/default/objects/Tender_information__c/webLinks/Quotation_request.webLink-meta.xml
force-app/main/default/objects/Tender_information__c/webLinks/ReactionOpportunityStatus.webLink-meta.xml
force-app/main/default/objects/Tender_information__c/webLinks/RelateOpp.webLink-meta.xml
force-app/main/default/objects/Tender_information__c/webLinks/RelationCheck.webLink-meta.xml
force-app/main/default/objects/Tender_information__c/webLinks/Tender_Lost.webLink-meta.xml
force-app/main/default/objects/Tender_information__c/webLinks/selectAttachment.webLink-meta.xml
force-app/main/default/objects/Tender_information__c/webLinks/selectAttachmentPIPL.webLink-meta.xml
force-app/main/default/objects/Tender_information_details__c/Tender_information_details__c.object-meta.xml
force-app/main/default/objects/Tender_information_details__c/fields/Is_Final__c.field-meta.xml
force-app/main/default/objects/Tender_information_details__c/fields/Price_N__c.field-meta.xml
force-app/main/default/objects/Tender_information_details__c/fields/TotalPrice_N__c.field-meta.xml
force-app/main/default/objects/Transaction_Log__c/Transaction_Log__c.object-meta.xml
force-app/main/default/objects/Transaction_Log__c/fields/Interface_URL__c.field-meta.xml
force-app/main/default/objects/Transaction_Log__c/fields/Module__c.field-meta.xml
force-app/main/default/objects/Transaction_Log__c/fields/Request__c.field-meta.xml
force-app/main/default/objects/Transaction_Log__c/fields/Response__c.field-meta.xml
force-app/main/default/objects/Transaction_Log__c/fields/SFRecordId__c.field-meta.xml
force-app/main/default/objects/TransferApplyDetail__c/fields/AfterAssetId_del__c.field-meta.xml
force-app/main/default/objects/TransferApplyDetail__c/fields/IsPunishObj__c.field-meta.xml
force-app/main/default/objects/TransferApplyDetail__c/fields/MainId__c.field-meta.xml
force-app/main/default/objects/TransferApplyDetail__c/fields/Pre_NG_abord_reason__c.field-meta.xml
force-app/main/default/objects/TransferApplyDetail__c/fields/SalesProvince__c.field-meta.xml
force-app/main/default/objects/TransferApplyDetail__c/fields/Salesdepartment_After__c.field-meta.xml
force-app/main/default/objects/TransferApplyDetail__c/fields/Salesdepartment__c.field-meta.xml
force-app/main/default/objects/TransferApplyDetail__c/fields/Transfer_Apply_Request_approval_time__c.field-meta.xml
force-app/main/default/objects/TransferApplyDetail__c/validationRules/CanNotSetRDeliverySlipWhenConfirmLost.validationRule-meta.xml
force-app/main/default/objects/TransferApplyDetail__c/validationRules/Cannot_Update_When_Finish.validationRule-meta.xml
force-app/main/default/objects/TransferApplyDetail__c/validationRules/Inspection_After_NG_Aborted.validationRule-meta.xml
force-app/main/default/objects/TransferApplyDetail__c/validationRules/Inspection_After_NG_Aborted_Comment.validationRule-meta.xml
force-app/main/default/objects/TransferApplyDetail__c/validationRules/IsBodyOrIsAccessory.validationRule-meta.xml
force-app/main/default/objects/TransferApplyDetail__c/validationRules/Receive_After_NG_Aborted.validationRule-meta.xml
force-app/main/default/objects/TransferApplySummary__c/webLinks/TransferApplySelectDetail.webLink-meta.xml
force-app/main/default/objects/TransferApply__c/fields/AfterCheckEmail_F__c.field-meta.xml
force-app/main/default/objects/TransferApply__c/fields/AfterOCMAssetEmail_F__c.field-meta.xml
force-app/main/default/objects/TransferApply__c/fields/BeforeCheckEmail_F__c.field-meta.xml
force-app/main/default/objects/TransferApply__c/fields/BeforeOCMAssetEmail_F__c.field-meta.xml
force-app/main/default/objects/TransferApply__c/fields/Loaner_centre_accept_Email__c.field-meta.xml
force-app/main/default/objects/TransferApply__c/fields/OBA3_Email_Group__c.field-meta.xml
force-app/main/default/objects/TransferApply__c/fields/ZongJian__c.field-meta.xml
force-app/main/default/objects/TransferApply__c/listViews/All_TransferApply.listView-meta.xml
force-app/main/default/objects/TransferApply__c/listViews/IN.listView-meta.xml
force-app/main/default/objects/TransferApply__c/listViews/View2.listView-meta.xml
force-app/main/default/objects/TransferApply__c/listViews/View4.listView-meta.xml
force-app/main/default/objects/TransferApply__c/webLinks/TransferApplyPDF.webLink-meta.xml
force-app/main/default/objects/TransferApply__c/webLinks/cancelApply.webLink-meta.xml
force-app/main/default/objects/TransferApply__c/webLinks/submit_approval_process.webLink-meta.xml
force-app/main/default/objects/Visit_Report__c/webLinks/Cancel.webLink-meta.xml
force-app/main/default/objects/asset_Power_BI__c/fields/DesperateRetrieveDate__c.field-meta.xml
force-app/main/default/objects/bidInfoFile__c/bidInfoFile__c.object-meta.xml
force-app/main/default/objects/bidInfoFile__c/fields/Tender_information__c.field-meta.xml
force-app/main/default/objects/eSignForm__c/eSignForm__c.object-meta.xml
force-app/main/default/objects/eSignForm__c/fields/agencyAccOrSAPConfirmDate__c.field-meta.xml
force-app/main/default/objects/eSignForm__c/fields/hpAccOrSAPConfirmDate__c.field-meta.xml
force-app/main/default/objects/eSignForm__c/fields/oldSAPReportDate__c.field-meta.xml
force-app/main/default/objects/eSignForm__c/listViews/All1.listView-meta.xml
force-app/main/default/objects/eSignForm__c/listViews/AlleSignFormAgencyOBSAP.listView-meta.xml
force-app/main/default/objects/eSignForm__c/listViews/AlleSignFormHPOBSAP.listView-meta.xml
force-app/main/default/objects/eSignForm__c/listViews/View_Agency_machi.listView-meta.xml
force-app/main/default/objects/eSignForm__c/webLinks/HPConfirmation.webLink-meta.xml
force-app/main/default/objects/eSignForm__c/webLinks/agencyConfirmation.webLink-meta.xml
force-app/main/default/objects/eSignForm__c/webLinks/insertFrameNumManag.webLink-meta.xml
force-app/main/default/objects/eSignForm__c/webLinks/selectAttachment.webLink-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/fields/IF_Approved_Old__c.field-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/fields/IF_Approved__c.field-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/fields/MeetingApproved_Old__c.field-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/fields/MeetingApproved__c.field-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/fields/Meeting_Cooperate1_Old__c.field-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/fields/Meeting_Cooperate1__c.field-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/fields/Meeting_Cooperate2_Old__c.field-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/fields/Meeting_Cooperate2__c.field-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/fields/Meeting_Cooperate3_Old__c.field-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/fields/Meeting_Cooperate3__c.field-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/fields/Meeting_Cooperate4_Old__c.field-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/fields/Meeting_Cooperate4__c.field-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/fields/Meeting_Type_Old__c.field-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/fields/Meeting_Type__c.field-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/webLinks/CommitNeedApproval_MeetingDelay.webLink-meta.xml
force-app/main/default/objects/meeting_delay_apply__c/webLinks/MeetingDelayApply.webLink-meta.xml
force-app/main/default/objects/solutionClosingAttachment__c/webLinks/NewSolutionClosingAttachment.webLink-meta.xml
force-app/main/default/objects/task__c/fields/Assignment__c.field-meta.xml
force-app/main/default/objects/task__c/fields/Cancel__c.field-meta.xml
force-app/main/default/objects/task__c/fields/Daily_Report__c.field-meta.xml
force-app/main/default/objects/task__c/fields/Delay_c__c.field-meta.xml
force-app/main/default/objects/task__c/fields/FpzISActive__c.field-meta.xml
force-app/main/default/objects/task__c/fields/IsConfirm__c.field-meta.xml
force-app/main/default/objects/task__c/fields/IsTimelyReport__c.field-meta.xml
force-app/main/default/objects/task__c/fields/LatestFinishDate__c.field-meta.xml
force-app/main/default/objects/task__c/fields/Opp_Tender__c.field-meta.xml
force-app/main/default/objects/task__c/fields/PlanProdDetail__c.field-meta.xml
force-app/main/default/objects/task__c/fields/RelatedInformation_ID__c.field-meta.xml
force-app/main/default/objects/task__c/fields/RelatedInformation_Text__c.field-meta.xml
force-app/main/default/objects/task__c/fields/TaskTyeNotEQ__c.field-meta.xml
force-app/main/default/objects/task__c/fields/Task_After_3_WorkDay__c.field-meta.xml
force-app/main/default/objects/task__c/fields/Tender_information_Task__c.field-meta.xml
force-app/main/default/objects/task__c/fields/cancelReasonSelect__c.field-meta.xml
force-app/main/default/objects/task__c/fields/cancelReason__c.field-meta.xml
force-app/main/default/objects/task__c/fields/delayReasonSelect__c.field-meta.xml
force-app/main/default/objects/task__c/fields/delayReason__c.field-meta.xml
force-app/main/default/objects/task__c/fields/taskStatus__c.field-meta.xml
force-app/main/default/objects/task__c/listViews/All.listView-meta.xml
force-app/main/default/objects/task__c/listViews/AllConfirmationofAwardTask_Tender.listView-meta.xml
force-app/main/default/objects/task__c/listViews/AllLostTask_Tender.listView-meta.xml
force-app/main/default/objects/task__c/listViews/CheckWindow_SH_task.listView-meta.xml
force-app/main/default/objects/task__c/listViews/IsAssignmenter11112.listView-meta.xml
force-app/main/default/objects/task__c/listViews/MyConfirmationofAwardTask_Tender.listView-meta.xml
force-app/main/default/objects/task__c/listViews/MyLostTask_Tender.listView-meta.xml
force-app/main/default/objects/task__c/listViews/OPDpassiveTask_01.listView-meta.xml
force-app/main/default/objects/task__c/listViews/OPDpassiveTask_1.listView-meta.xml
force-app/main/default/objects/task__c/listViews/OPDpassiveTask_boss.listView-meta.xml
force-app/main/default/objects/task__c/listViews/OpppassiveTask_1_noaccepet.listView-meta.xml
force-app/main/default/objects/task__c/listViews/ddepassiveTask_1.listView-meta.xml
force-app/main/default/objects/task__c/listViews/myTask.listView-meta.xml
force-app/main/default/objects/task__c/listViews/passiveTask_1.listView-meta.xml
force-app/main/default/objects/task__c/listViews/passiveTask_2.listView-meta.xml
force-app/main/default/objects/task__c/recordTypes/AgencyVisit.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/DailyVisit.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/HAccountVisit.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/InspectUp_Task.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/LoseListTask.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/MaintenanceTask.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/NewMaintenanceTask.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/OPD.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/SLAReport_Task.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/ServiceQuarterlyReport.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/TargetAccountVisit.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/VM_Contract_Task.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/campaignFollow.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/priceApplyTask.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/winBiddingTask.recordType-meta.xml
force-app/main/default/objects/task__c/validationRules/HopeDateAndWorkDesDontEdit.validationRule-meta.xml
force-app/main/default/objects/task__c/validationRules/NotAdminCannotCreateTask.validationRule-meta.xml
force-app/main/default/objects/task__c/validationRules/YouCanNotEditTaskDifferent.validationRule-meta.xml
force-app/main/default/objects/task__c/validationRules/winBiddingLoseCancelListTask.validationRule-meta.xml
force-app/main/default/objects/task__c/webLinks/LoseBid.webLink-meta.xml
force-app/main/default/objects/task__c/webLinks/OLYwinBid.webLink-meta.xml
force-app/main/default/objects/task__c/webLinks/OppLose.webLink-meta.xml
force-app/main/default/pages/AL_MobileApp_Land.page
force-app/main/default/pages/AL_MobileApp_Menus.page
force-app/main/default/pages/AL_MobileApp_Photos.page
force-app/main/default/pages/AL_MobileApp_Send.page
force-app/main/default/pages/AccChangeApprovalResponse.page
force-app/main/default/pages/AccChangeApprovalResponse.page-meta.xml
force-app/main/default/pages/AccChangeApprovalResponsePopUp.page
force-app/main/default/pages/AccChangeApprovalResponsePopUp.page-meta.xml
force-app/main/default/pages/AccessoryAdd.page
force-app/main/default/pages/AccessorySelect.page
force-app/main/default/pages/AccountCaseHospital.page
force-app/main/default/pages/AccountCaseTab.page
force-app/main/default/pages/AccountPCL.page
force-app/main/default/pages/AccountTargetHospital.page
force-app/main/default/pages/AccountTargetTab.page
force-app/main/default/pages/AddAccIpadActivity.page
force-app/main/default/pages/AddCtIpadActivity.page
force-app/main/default/pages/AddMcIpadActivity.page
force-app/main/default/pages/AddOppIpadActivity.page
force-app/main/default/pages/AdvanceOpportunity.page
force-app/main/default/pages/AdvanceOpportunity.page-meta.xml
force-app/main/default/pages/AgencyConfirmPage.page
force-app/main/default/pages/AgencyHospitalLink.page
force-app/main/default/pages/AssessmentReport.page
force-app/main/default/pages/AssetGuaranteePeriodAlteration.page
force-app/main/default/pages/AssetMaintain.page
force-app/main/default/pages/AssetMaintainAbandonSummary.page
force-app/main/default/pages/AssetMaintainDetail.page
force-app/main/default/pages/AssetModifyBelongs.page
force-app/main/default/pages/AssetQR.page
force-app/main/default/pages/AssetTable.page
force-app/main/default/pages/AttachmentPageDisplayPage.page
force-app/main/default/pages/AttachmentPageDisplayPage.page-meta.xml
force-app/main/default/pages/AttachmentPreview.page
force-app/main/default/pages/BMEWorkPage.page
force-app/main/default/pages/B_Test.page
force-app/main/default/pages/BandwidthExceeded.page
force-app/main/default/pages/BatchFileUpload.page
force-app/main/default/pages/BatchFileUpload.page-meta.xml
force-app/main/default/pages/BatchSelectRepairPage.page
force-app/main/default/pages/BeforeOPDPDF.page
force-app/main/default/pages/BidAnnounceIframe.page
force-app/main/default/pages/Bidding.page
force-app/main/default/pages/CICReport.page
force-app/main/default/pages/CM_SearchContact.page
force-app/main/default/pages/CM_SearchContactService.page
force-app/main/default/pages/CM_SearchDepartment.page
force-app/main/default/pages/CM_SearchDepartmentService.page
force-app/main/default/pages/CampaignBTPDF.page
force-app/main/default/pages/CampaignCreate.page
force-app/main/default/pages/CampaignCreate.page-meta.xml
force-app/main/default/pages/CampaignMeetingcost.page
force-app/main/default/pages/CampaignMember.page
force-app/main/default/pages/CampaignMember.page-meta.xml
force-app/main/default/pages/CampaignMemberBMEEditAndDelete.page
force-app/main/default/pages/CampaignMemberEditAndDelete.page
force-app/main/default/pages/CampaignMemberService.page
force-app/main/default/pages/CampaignMemberUploadFile.page
force-app/main/default/pages/CampaignMemberUploadFile.page-meta.xml
force-app/main/default/pages/CampaignPlanProd.page
force-app/main/default/pages/CancelRemoveBox.page
force-app/main/default/pages/ChangeDealerApproval.page
force-app/main/default/pages/CheckAllOlympusAsset.page
force-app/main/default/pages/CheckPlanDeleteButton.page
force-app/main/default/pages/ChoiceAsset.page
force-app/main/default/pages/CommunitiesSelfReg.page
force-app/main/default/pages/CommunitiesSelfRegConfirm.page
force-app/main/default/pages/CommunitiesTemplate.page
force-app/main/default/pages/ConSearchAgencyPlace.page
force-app/main/default/pages/ConsumApplyBR.page
force-app/main/default/pages/ConsumApplyCancel.page
force-app/main/default/pages/ConsumApplyEquipmentSetSRList.page
force-app/main/default/pages/ConsumApplyQR.page
force-app/main/default/pages/ConsumApplySplit.page
force-app/main/default/pages/ConsumAssignCancel.page
force-app/main/default/pages/ConsumDefaultSelect.page
force-app/main/default/pages/ConsumEquipmentRentalResponse.page
force-app/main/default/pages/ConsumEquipmentRentalResponsePopUp.page
force-app/main/default/pages/ConsumEquipmentSetReceived.page
force-app/main/default/pages/ConsumEquipmentSetReturn.page
force-app/main/default/pages/ConsumEquipmentSetShipment.page
force-app/main/default/pages/ConsumFixtureSetSelect.page
force-app/main/default/pages/ConsumInventoryReportDetail.page
force-app/main/default/pages/ConsumReassign.page
force-app/main/default/pages/ConsumSelect.page
force-app/main/default/pages/ConsumTrial.page
force-app/main/default/pages/ConsumTrialConfirm.page
force-app/main/default/pages/ConsumTrialDis.page
force-app/main/default/pages/ConsumTrialDis.page-meta.xml
force-app/main/default/pages/ConsumTrialPDF.page
force-app/main/default/pages/ConsumTrialUpdate.page
force-app/main/default/pages/ConsumUploadPicture.page
force-app/main/default/pages/ConsumableArrDet.page
force-app/main/default/pages/ConsumableNotArrDet.page
force-app/main/default/pages/ContentPreview.page
force-app/main/default/pages/ContractDetailPDF.page
force-app/main/default/pages/Create_Opportunity_by_Agency_Opportunity.page
force-app/main/default/pages/CustomAccountTest.page
force-app/main/default/pages/CustomAccountTest.page-meta.xml
force-app/main/default/pages/CustomDeleteVF.page
force-app/main/default/pages/DateModify.page
force-app/main/default/pages/Dealer_enquiry.page
force-app/main/default/pages/DeleteEventEntry.page
force-app/main/default/pages/DigCasesNumber.page
force-app/main/default/pages/DirectAssign.page
force-app/main/default/pages/DiscountProductApplication.page
force-app/main/default/pages/Enquiry.page
force-app/main/default/pages/EnquiryDetails.page
force-app/main/default/pages/EquipmentManage.page
force-app/main/default/pages/EquipmentRentalExtend.page
force-app/main/default/pages/EquipmentSetSRList2.page
force-app/main/default/pages/EquipmentSetShippmentReceived1.page
force-app/main/default/pages/EquipmentSetShippmentReceived2.page
force-app/main/default/pages/EquipmentSetShippmentReceived3.page
force-app/main/default/pages/EquipmentSetShippmentReceived4.page
force-app/main/default/pages/EquipmentSetShippmentReceived5.page
force-app/main/default/pages/EquipmentSetShippmentReceived6.page
force-app/main/default/pages/EventComment.page
force-app/main/default/pages/Exception.page
force-app/main/default/pages/ExportAllOlympusAsset.page
force-app/main/default/pages/FileBatchDelete.page
force-app/main/default/pages/FileBatchDelete.page-meta.xml
force-app/main/default/pages/FileNotFound.page
force-app/main/default/pages/FilePreviewDownVF.page
force-app/main/default/pages/FilePreviewDownVF.page-meta.xml
force-app/main/default/pages/FixtureRemind.page
force-app/main/default/pages/FixtureRemindForAgencyRequest.page
force-app/main/default/pages/FixtureRentalPDF.page
force-app/main/default/pages/FixtureSetManage.page
force-app/main/default/pages/FollowPage.page
force-app/main/default/pages/ForgotPassword.page
force-app/main/default/pages/ForgotPasswordConfirm.page
force-app/main/default/pages/FrameNum.page
force-app/main/default/pages/FrameNum.page-meta.xml
force-app/main/default/pages/FrameNumUpload.page
force-app/main/default/pages/FrameNumUpload.page-meta.xml
force-app/main/default/pages/FrameNumUploadErrcsv.page
force-app/main/default/pages/FrameNumUploadErrcsv.page-meta.xml
force-app/main/default/pages/GSurveys.page
force-app/main/default/pages/Getting_Started_With_Survey_Force.page
force-app/main/default/pages/HPConfirmPage.page
force-app/main/default/pages/HomeBulletinBoard.page
force-app/main/default/pages/HospitalApprovalResponse.page
force-app/main/default/pages/HospitalApprovalResponsePopUp.page
force-app/main/default/pages/HospitalRFApprovalResponsePopUp.page
force-app/main/default/pages/HospitalRFApprovalResponsePopUp.page-meta.xml
force-app/main/default/pages/ISO_DemandOAD_PDF.page
force-app/main/default/pages/ISO_DemandOperAndDemons.page
force-app/main/default/pages/ISO_DemandOperAndDemonsNew.page
force-app/main/default/pages/ISO_NewDemandOAD_PDF.page
force-app/main/default/pages/IdeasHome.page
force-app/main/default/pages/ImportDocT.page
force-app/main/default/pages/ImportDocT.page-meta.xml
force-app/main/default/pages/ImprovedForecastTime.page
force-app/main/default/pages/ImprovedForecastTime.page-meta.xml
force-app/main/default/pages/ImprovedForecastTimeAno.page
force-app/main/default/pages/ImprovedForecastTimeAno.page-meta.xml
force-app/main/default/pages/InMaintenance.page
force-app/main/default/pages/InitCreateSolutionPage.page
force-app/main/default/pages/InsReportPDF.page
force-app/main/default/pages/InsReportPDFOuter.page
force-app/main/default/pages/InstructReport.page
force-app/main/default/pages/InventoryList.page
force-app/main/default/pages/InventoryLostReport.page
force-app/main/default/pages/InventoryReport.page
force-app/main/default/pages/InventoryReportDetail.page
force-app/main/default/pages/InventoryResultRecord.page
force-app/main/default/pages/InventoryResultRecordCopy.page
force-app/main/default/pages/LabelPrint.page
force-app/main/default/pages/LabelPrint.page-meta.xml
force-app/main/default/pages/LastbuyProductNew.page
force-app/main/default/pages/LastbuyProductNew.page-meta.xml
force-app/main/default/pages/LeadIntention.page
force-app/main/default/pages/ListAssetForHospital.page
force-app/main/default/pages/ListShip.page
force-app/main/default/pages/LookupPage.page
force-app/main/default/pages/LostByCompany.page
force-app/main/default/pages/LostByCompany.page-meta.xml
force-app/main/default/pages/LostCreatePage1.page
force-app/main/default/pages/LostEditPage1.page
force-app/main/default/pages/LostReportEdit.page
force-app/main/default/pages/LostReportEditAsset.page
force-app/main/default/pages/LostViewPage1.page
force-app/main/default/pages/Lost_Return_DeliverySlip.page
force-app/main/default/pages/MCAgentPDF.page
force-app/main/default/pages/MCHPDF.page
force-app/main/default/pages/MCLastMContract.page
force-app/main/default/pages/Maintenance.page
force-app/main/default/pages/MaintenanceCommissionPDF.page
force-app/main/default/pages/MaintenanceContractEstimatePDF.page
force-app/main/default/pages/MaintenanceContractEstimateVMPDF.page
force-app/main/default/pages/MaintenanceContractPCL.page
force-app/main/default/pages/MaintenanceDailyReport.page
force-app/main/default/pages/MaintenanceProductData.page
force-app/main/default/pages/MaintenanceProductDataManage.page
force-app/main/default/pages/MaintenanceTaskCSVExport.page
force-app/main/default/pages/MaxManagmentCode.page
force-app/main/default/pages/MaxManagmentCodeTransfer.page
force-app/main/default/pages/MceConfigPDF.page
force-app/main/default/pages/MceContractAgentPDF.page
force-app/main/default/pages/MceContractHpPDF.page
force-app/main/default/pages/MergeAgencyActivity.page
force-app/main/default/pages/MicrobatchSelfReg.page
force-app/main/default/pages/MoreMaintenanceContract.page
force-app/main/default/pages/MoreMaintenanceContractPop.page
force-app/main/default/pages/Morethan7days.page
force-app/main/default/pages/MyProfilePage.page
force-app/main/default/pages/NewAccount.page
force-app/main/default/pages/NewAccount.page-meta.xml
force-app/main/default/pages/NewAccountExamine.page
force-app/main/default/pages/NewAccountExamine.page-meta.xml
force-app/main/default/pages/NewAndEditASEActivity.page
force-app/main/default/pages/NewAndEditAddress.page
force-app/main/default/pages/NewAndEditAgencyContact.page
force-app/main/default/pages/NewAndEditCampaignMember.page
force-app/main/default/pages/NewAndEditCase.page
force-app/main/default/pages/NewAndEditContact.page
force-app/main/default/pages/NewAndEditContact.page-meta.xml
force-app/main/default/pages/NewAndEditInquiryForm.page
force-app/main/default/pages/NewAndEditInspectionReport.page
force-app/main/default/pages/NewAndEditLead.page
force-app/main/default/pages/NewAndEditQIS.page
force-app/main/default/pages/NewAndEditQIS.page-meta.xml
force-app/main/default/pages/NewAndEditRepairSubOrder.page
force-app/main/default/pages/NewAndEditReport.page
force-app/main/default/pages/NewAndEditTenderinformation.page
force-app/main/default/pages/NewConsumApply.page
force-app/main/default/pages/NewConsumApplyEquipmentSetDetail.page
force-app/main/default/pages/NewMCAgentPDF.page
force-app/main/default/pages/NewMCAgentPDFLimit.page
force-app/main/default/pages/NewMCAgentPDFLimit.page-meta.xml
force-app/main/default/pages/NewMCAgentPDFUpperLimit.page
force-app/main/default/pages/NewMCAgentPDFUpperLimit.page-meta.xml
force-app/main/default/pages/NewMCHPDF.page
force-app/main/default/pages/NewMCHPDFLimit.page
force-app/main/default/pages/NewMCHPDFUpperLimit.page
force-app/main/default/pages/NewMCHPDFUpperLimit.page-meta.xml
force-app/main/default/pages/NewOnCall.page
force-app/main/default/pages/NewPaymentPlanLoad.page
force-app/main/default/pages/NewQuoteEntry.page
force-app/main/default/pages/NewQuoteIrai.page
force-app/main/default/pages/NewRentalApply.page
force-app/main/default/pages/NewRepair.page
force-app/main/default/pages/NotReceivingNoteListFirst.page
force-app/main/default/pages/NotReceivingNoteWaitingReceipt.page
force-app/main/default/pages/OFSBulletinBoard.page
force-app/main/default/pages/OFSCalendar.page
force-app/main/default/pages/OFSCommentPopup.page
force-app/main/default/pages/OFSDailyReport.page
force-app/main/default/pages/OFSHospitalLayout.page
force-app/main/default/pages/OFSHoverView.page
force-app/main/default/pages/OFSInsReportLayout.page
force-app/main/default/pages/OFSInsReportLayoutForVm.page
force-app/main/default/pages/OFSRepairConsignPDF.page
force-app/main/default/pages/OFSRepairConsignPDFOuter.page
force-app/main/default/pages/OFSWindowClose.page
force-app/main/default/pages/OPDNoReportApplication.page
force-app/main/default/pages/OPDPlanProd.page
force-app/main/default/pages/OPDSortManage.page
force-app/main/default/pages/Opportunity12Rating.page
force-app/main/default/pages/OpportunityPCLNew.page
force-app/main/default/pages/Ordergoods.page
force-app/main/default/pages/PAEDecisionRecord.page
force-app/main/default/pages/PAEDecisionRecordjump.page
force-app/main/default/pages/PAEListjump.page
force-app/main/default/pages/PBIAuthorization.page
force-app/main/default/pages/PCLLostReportPage.page
force-app/main/default/pages/PaymentPlanLoad.page
force-app/main/default/pages/PersonalCalendar.page
force-app/main/default/pages/PersonalEvaluation.page
force-app/main/default/pages/PersonalEvaluation2.page
force-app/main/default/pages/PersonalEvaluationClipEdit.page
force-app/main/default/pages/PersonalEvaluationCommentImg.page
force-app/main/default/pages/PersonalEvaluationCommentList.page
force-app/main/default/pages/PersonalEvaluationInTabBF.page
force-app/main/default/pages/PersonalEvaluationInTabBasic.page
force-app/main/default/pages/PersonalEvaluationInTabENT.page
force-app/main/default/pages/PersonalEvaluationInTabGI.page
force-app/main/default/pages/PersonalEvaluationInTabGS.page
force-app/main/default/pages/PersonalEvaluationInTabGYN.page
force-app/main/default/pages/PersonalEvaluationInTabHP.page
force-app/main/default/pages/PersonalEvaluationInTabHP_FSE.page
force-app/main/default/pages/PersonalEvaluationInTabNameJ.page
force-app/main/default/pages/PersonalEvaluationInTabURO.page
force-app/main/default/pages/PrintInspectupReport.page
force-app/main/default/pages/PrintInspectupReportPDF.page
force-app/main/default/pages/ProcessInstance.page
force-app/main/default/pages/ProductRepairQuote.page
force-app/main/default/pages/ProductSetRollup.page
force-app/main/default/pages/Product_Documentation_E_Learning.page
force-app/main/default/pages/ProvinceEvaluation.page
force-app/main/default/pages/ProvinceEvaluationInProvinceBasic.page
force-app/main/default/pages/ProvinceEvaluationInProvinceHP.page
force-app/main/default/pages/ProvinceEvaluationInProvinceNameJ.page
force-app/main/default/pages/QISPDF.page
force-app/main/default/pages/QLMAttachmentPreview.page
force-app/main/default/pages/QLMAttachmentPreview1.page
force-app/main/default/pages/QuestionnaireAllowance.page
force-app/main/default/pages/QueuePageByAssetId.page
force-app/main/default/pages/QuoteExcelImport.page
force-app/main/default/pages/QuotePDF.page
force-app/main/default/pages/QuoteTrial.page
force-app/main/default/pages/ReFixApprovalResponse.page
force-app/main/default/pages/ReFixApprovalResponse.page-meta.xml
force-app/main/default/pages/ReantalApplySeriesNo.page
force-app/main/default/pages/ReceivingNoteAcceptance.page
force-app/main/default/pages/ReceivingNoteDetailSelect.page
force-app/main/default/pages/ReceivingNoteExamination.page
force-app/main/default/pages/ReceivingNoteList.page
force-app/main/default/pages/ReceivingNoteListFirst.page
force-app/main/default/pages/ReceivingNotePDF.page
force-app/main/default/pages/ReceivingNoteQR.page
force-app/main/default/pages/ReceivingNoteQRScan.page
force-app/main/default/pages/ReceivingNoteStockIn.page
force-app/main/default/pages/ReceivingNoteStockInRequest.page
force-app/main/default/pages/ReceivingNoteSummarySelect.page
force-app/main/default/pages/ReceivingNoteWaitingReceipt.page
force-app/main/default/pages/RefixApprovalResponsePopUp.page
force-app/main/default/pages/RefixApprovalResponsePopUp.page-meta.xml
force-app/main/default/pages/Relevance.page
force-app/main/default/pages/RentalAgencyReceived.page
force-app/main/default/pages/RentalApplyBR.page
force-app/main/default/pages/RentalApplyCancel.page
force-app/main/default/pages/RentalApplyExtensions.page
force-app/main/default/pages/RentalApplyJump.page
force-app/main/default/pages/RentalApplyMultiPostpone.page
force-app/main/default/pages/RentalApplyQR.page
force-app/main/default/pages/RentalApplySequence.page
force-app/main/default/pages/RentalFixtureSetAssign.page
force-app/main/default/pages/RentalFixtureSetDetilSelect.page
force-app/main/default/pages/RentalReportExport.page
force-app/main/default/pages/RentalReportExport.page-meta.xml
force-app/main/default/pages/RentalSequenceWatch.page
force-app/main/default/pages/Rental_Apply_FaultReport.page
force-app/main/default/pages/Rental_Apply_FaultReport.page-meta.xml
force-app/main/default/pages/RepPAEDecisionRecord.page
force-app/main/default/pages/RepairAgainAnPDF.page
force-app/main/default/pages/RepairAndQISToPDF.page
force-app/main/default/pages/RepairPCL.page
force-app/main/default/pages/Repair_Redirect.page
force-app/main/default/pages/ReportCAlertPage.page
force-app/main/default/pages/ReportExport.page
force-app/main/default/pages/ReportExport.page-meta.xml
force-app/main/default/pages/RetrospectiveWeeklyReportPage.page
force-app/main/default/pages/SISearchSetProduct.page
force-app/main/default/pages/SI_CsvModel.page
force-app/main/default/pages/SI_NewQuoteEntry.page
force-app/main/default/pages/SI_Opportunity_Response.page
force-app/main/default/pages/SLAReportDetails.page
force-app/main/default/pages/SampleInventory.page
force-app/main/default/pages/SampleInventorySection.page
force-app/main/default/pages/SaveAssetByCopy.page
force-app/main/default/pages/SaveAssetFromReport.page
force-app/main/default/pages/SaveLeadFromReport.page
force-app/main/default/pages/SaveMContractFromReport.page
force-app/main/default/pages/SaveMaintenanceByCopy.page
force-app/main/default/pages/SaveSolutionFromReport.page
force-app/main/default/pages/SearchAWSContactByNamePage.page
force-app/main/default/pages/SearchAgencyContactPage.page
force-app/main/default/pages/SearchAgencyContactPage.page-meta.xml
force-app/main/default/pages/SearchContactPage.page
force-app/main/default/pages/SearchContract.page
force-app/main/default/pages/SearchLeadPage.page
force-app/main/default/pages/SearchProduct.page
force-app/main/default/pages/SearchProductCS.page
force-app/main/default/pages/SearchProductIrai.page
force-app/main/default/pages/SearchSetProduct.page
force-app/main/default/pages/SearchVisitor.page
force-app/main/default/pages/SelectAssetEstimate.page
force-app/main/default/pages/SelectAssetEstimateJumpPage.page
force-app/main/default/pages/SelectAssetEstimateJumpPage2.page
force-app/main/default/pages/SelectAssetEstimateURF.page
force-app/main/default/pages/SelectAssetEstimateURFgzw.page
force-app/main/default/pages/SelectAssetEstimateURFgzw.page-meta.xml
force-app/main/default/pages/SelectAssetEstimateVM.page
force-app/main/default/pages/SelectAssetEstimateVMgzw.page
force-app/main/default/pages/SelectAssetEstimateVMgzw.page-meta.xml
force-app/main/default/pages/SelectProduct2CIC.page
force-app/main/default/pages/ServiceFollowPage.page
force-app/main/default/pages/ServiceFollowPage.page-meta.xml
force-app/main/default/pages/ServiceMaintenanceAlert.page
force-app/main/default/pages/ServiceMaintenanceTaskPage.page
force-app/main/default/pages/SetPersonalProductTarget.page
force-app/main/default/pages/SetPersonalProductTargetcvs.page
force-app/main/default/pages/SetPersonalTarget.page
force-app/main/default/pages/SetPersonalTargetEng.page
force-app/main/default/pages/SetPersonalTargetcsv.page
force-app/main/default/pages/SetProductTarget.page
force-app/main/default/pages/SetProvinceTarget.page
force-app/main/default/pages/SetProvinceTargetEng.page
force-app/main/default/pages/SetupCheck.page
force-app/main/default/pages/SimpleEventRegister.page
force-app/main/default/pages/SiteLogin.page
force-app/main/default/pages/SiteRegister.page
force-app/main/default/pages/SiteRegisterConfirm.page
force-app/main/default/pages/SiteTemplate.page
force-app/main/default/pages/SolApproval.page
force-app/main/default/pages/Solution_ProgrammeDelete.page
force-app/main/default/pages/SpecialDiscount.page
force-app/main/default/pages/SpecialPrice.page
force-app/main/default/pages/StandardFieldDefaults.page
force-app/main/default/pages/StandardFieldDefaults.page-meta.xml
force-app/main/default/pages/StartTrading.page
force-app/main/default/pages/StatuAchievementsPCL.page
force-app/main/default/pages/StatusPage.page
force-app/main/default/pages/StraightBackAddress.page
force-app/main/default/pages/StraightBackAddress.page-meta.xml
force-app/main/default/pages/SubAuthorizedCreate.page
force-app/main/default/pages/SubmitForApprovalPage.page
force-app/main/default/pages/SurveyManagerPage.page
force-app/main/default/pages/SurveyPage.page
force-app/main/default/pages/TakeSurvey.page
force-app/main/default/pages/TenderAttachment.page
force-app/main/default/pages/TenderDeletePage.page
force-app/main/default/pages/TenderInformationUploadPdf.page
force-app/main/default/pages/TenderLostPage.page
force-app/main/default/pages/TenderLostPage.page-meta.xml
force-app/main/default/pages/TransferAgencyReceived.page
force-app/main/default/pages/TransferAgencyShipment.page
force-app/main/default/pages/TransferApplyNew.page
force-app/main/default/pages/TransferApplyPDF.page
force-app/main/default/pages/TransferApplyQR.page
force-app/main/default/pages/TransferApplyResponse.page
force-app/main/default/pages/TransferApplyResponsePopUp.page
force-app/main/default/pages/TransferApplySelectDetail.page
force-app/main/default/pages/TransferApplySelectDetailSub.page
force-app/main/default/pages/TransferEquipmentSetSRList.page
force-app/main/default/pages/TransferShippmentReceived1.page
force-app/main/default/pages/TransferShippmentReceived2.page
force-app/main/default/pages/TransferShippmentReceived3.page
force-app/main/default/pages/TransferShippmentReceived4.page
force-app/main/default/pages/TransferShippmentReceived5.page
force-app/main/default/pages/TransferShippmentReceived6.page
force-app/main/default/pages/Unauthorized.page
force-app/main/default/pages/UnderConstruct.page
force-app/main/default/pages/UnderConstruction.page
force-app/main/default/pages/UpdAccount.page
force-app/main/default/pages/UpdAccount.page-meta.xml
force-app/main/default/pages/UpdAccountExamine.page
force-app/main/default/pages/UpdAccountExamine.page-meta.xml
force-app/main/default/pages/UploadOBPM.page
force-app/main/default/pages/User.page
force-app/main/default/pages/UserInProcess.page
force-app/main/default/pages/VFClosePage.page
force-app/main/default/pages/ViewASEActivityDecryptInfo.page
force-app/main/default/pages/ViewAddressDecryptInfo.page
force-app/main/default/pages/ViewAgencyContactDecryptInfo.page
force-app/main/default/pages/ViewAgencyOpportunityDecryptInfo.page
force-app/main/default/pages/ViewAgencyOpportunityDecryptInfo.page-meta.xml
force-app/main/default/pages/ViewCaseDecryptInfo.page
force-app/main/default/pages/ViewConsumApplyEquipmentSetDetailDecrypt.page
force-app/main/default/pages/ViewContactDecryptInfo.page
force-app/main/default/pages/ViewInquiryFormDecryptInfo.page
force-app/main/default/pages/ViewInspectionReportDecryptInfo.page
force-app/main/default/pages/ViewLeadDecryptInfo.page
force-app/main/default/pages/ViewOnCallDecrypt.page
force-app/main/default/pages/ViewParticipantsDecryptInfo.page
force-app/main/default/pages/ViewQISReportDecryptInfo.page
force-app/main/default/pages/ViewRepairEncrypt.page
force-app/main/default/pages/ViewRepairSubOrderDecryptInfo.page
force-app/main/default/pages/ViewReportDecryptInfo.page
force-app/main/default/pages/ViewTenderinformationDecryptInfo.page
force-app/main/default/pages/VisitReportAlertPage.page
force-app/main/default/pages/WaveLabsApp.page
force-app/main/default/pages/WebToEquipmentSetShippmentReceived.page
force-app/main/default/pages/WorkflowEditor.page
force-app/main/default/pages/XMDEditor.page
force-app/main/default/pages/XinDailyReport.page
force-app/main/default/pages/Xin_SearchMaintenanceContract.page
force-app/main/default/pages/Xin_SearchVisitorPlace.page
force-app/main/default/pages/Xin_SearchVisitorPlace_Campaign.page
force-app/main/default/pages/Xin_SearchVisitorPlace_Sales.page
force-app/main/default/pages/Xin_SearchVisitorPlace_Training.page
force-app/main/default/pages/contact_phone.page
force-app/main/default/pages/eSignFormAttachment.page
force-app/main/default/pages/eSignFormEntryUploadPdf.page
force-app/main/default/pages/eSignFormEntryUploadPdf.page-meta.xml
force-app/main/default/pages/eSignFormQR.page
force-app/main/default/pages/eSignFormUploadPdf.page
force-app/main/default/pages/eSignFormUploadPdf.page-meta.xml
force-app/main/default/pages/genjinbaobiao.page
force-app/main/default/pages/labs_survey_css.page
force-app/main/default/pages/maintenanceContractNotOpen.page
force-app/main/default/pages/maintenanceContractPage.page
force-app/main/default/pages/productsh.page
force-app/main/default/pages/searchAimsAccount.page
force-app/main/default/pages/searchHospital.page
force-app/main/default/pages/taskAlert.page
force-app/main/default/staticresources/AWSService/AWSService.js
force-app/main/default/staticresources/AWSService/AWSServiceV2.js
force-app/main/default/staticresources/AWSService/__MACOSX/._AWSService.js
force-app/main/default/staticresources/ConsumEquipmentSetReturnCss.css
force-app/main/default/staticresources/ConsumEquipmentSetReturnCss.resource-meta.xml
force-app/main/default/staticresources/FileUploadCSS.css
force-app/main/default/staticresources/FileUploadCSS.resource-meta.xml
force-app/main/default/staticresources/FileUploadJS.js
force-app/main/default/staticresources/FileUploadJS.resource-meta.xml
force-app/main/default/staticresources/FixtureSetManagecssTwo1.css
force-app/main/default/staticresources/FixtureSetManagecssTwo1.resource-meta.xml
force-app/main/default/staticresources/NewQuoteEntryCss.css
force-app/main/default/staticresources/NewQuoteEntryCss.resource-meta.xml
force-app/main/default/staticresources/NewQuoteEntryJS.js
force-app/main/default/staticresources/NewQuoteEntryJS.resource-meta.xml
force-app/main/default/staticresources/NewQuoteIraiJS.js
force-app/main/default/staticresources/OpportunityPCLJs.js
force-app/main/default/staticresources/PCLLostReportPagecss.css
force-app/main/default/staticresources/PCLLostReportPagecss.resource-meta.xml
force-app/main/default/staticresources/PersonalCalendarCssTwo.css
force-app/main/default/staticresources/PersonalCalendarCssTwo.resource-meta.xml
force-app/main/default/staticresources/RepairAgainAnPDF_Header.png
force-app/main/default/staticresources/RepairAgainAnPDF_Header.resource-meta.xml
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0.resource-meta.xml
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/css/fonts-and-custom.css
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/fonts/webfonts/SalesforceSans-Bold.woff2
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/fonts/webfonts/SalesforceSans-Light.woff2
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/fonts/webfonts/SalesforceSans-Regular.woff2
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/einstein-headers/einstein-figure.svg
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/einstein-headers/einstein-header-background.svg
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/group_avatar_160.png
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/group_avatar_200.png
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/group_avatar_96.png
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/logo-noname.svg
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/popovers/popover-action.png
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/popovers/popover-header.png
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/profile_avatar_160.png
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/profile_avatar_200.png
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/profile_avatar_96.png
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/serviceNotAvailable/serviceNotAvailable.svg
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/themes/oneSalesforce/banner-brand-default.png
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/themes/oneSalesforce/banner-group-public-default.png
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/themes/oneSalesforce/banner-user-default.png
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/tooManyRequests/tooManyRequests.svg
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/images/welcome-mat/bg-info@2x.png
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/styles/dxp-site-spacing-styling-hooks.min.css
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/styles/dxp-slds-extensions.min.css
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/styles/dxp-styling-hooks.min.css
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/styles/overrides.css
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/styles/salesforce-lightning-design-system.min.css
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/assets/styles/styles.css
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/maintenance.html
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/toomanyrequests.html
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/56fa8367c4/prod/lwr_bootstrap_locker
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/6f7dba744b/prod/lwr_mobile
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/742e91b1f6/prod/events-out
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/829b054cbd/prod/lwr_bootstrap
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/98698c76aa/prod/browsercheck
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/a3d07889bb/prod/oasis
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/af5a5d856d/prod/lwr_lwc
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/c87ab0b57c/prod/localeredirect
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/ca8427cbe0/prod/lwr_app
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/f83291ee11/prod/lwr_loader
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/template_html/166206b3ed/prod/index
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/view/1caf97ec72/prod/zh_CN/serviceNotAvailable
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/view/6502bbcfd6/prod/zh_CN/too_Many_Requests
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/view/a5d54450f7/prod/zh_CN/service_Not_Available
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF.resource-meta.xml
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/css/fonts-and-custom.css
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/fonts/webfonts/SalesforceSans-Bold.woff2
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/fonts/webfonts/SalesforceSans-Light.woff2
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/fonts/webfonts/SalesforceSans-Regular.woff2
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/einstein-headers/einstein-figure.svg
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/einstein-headers/einstein-header-background.svg
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/group_avatar_160.png
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/group_avatar_200.png
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/group_avatar_96.png
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/logo-noname.svg
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/popovers/popover-action.png
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/popovers/popover-header.png
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/profile_avatar_160.png
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/profile_avatar_200.png
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/profile_avatar_96.png
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/serviceNotAvailable/serviceNotAvailable.svg
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/themes/oneSalesforce/banner-brand-default.png
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/themes/oneSalesforce/banner-group-public-default.png
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/themes/oneSalesforce/banner-user-default.png
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/tooManyRequests/tooManyRequests.svg
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/images/welcome-mat/bg-info@2x.png
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/styles/dxp-site-spacing-styling-hooks.min.css
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/styles/dxp-slds-extensions.min.css
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/styles/dxp-styling-hooks.min.css
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/styles/overrides.css
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/styles/salesforce-lightning-design-system.min.css
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/assets/styles/styles.css
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/maintenance.html
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/toomanyrequests.html
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/532850477a/prod/lwr_app
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/742e91b1f6/prod/events-out
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/85f62efb4b/prod/lwr_mobile
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/98698c76aa/prod/browsercheck
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/a214744eba/prod/lwr_bootstrap
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/a3d07889bb/prod/oasis
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/af5a5d856d/prod/lwr_lwc
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/c87ab0b57c/prod/localeredirect
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/ef39c17289/prod/lwr_bootstrap_locker
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/f83291ee11/prod/lwr_loader
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/template_html/166206b3ed/prod/index
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/view/1caf97ec72/prod/en_US/serviceNotAvailable
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/view/5fa7dfdc15/prod/en_US/too_Many_Requests
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/view/e027a3a2e0/prod/en_US/service_Not_Available
force-app/main/default/staticresources/XinDailyReportTuning2Js.js
force-app/main/default/staticresources/curleft.resource-meta.xml
force-app/main/default/staticresources/curright.resource-meta.xml
force-app/main/default/staticresources/html2canvas.js
force-app/main/default/staticresources/html2canvas.resource-meta.xml
force-app/main/default/staticresources/instascan.js
force-app/main/default/staticresources/jspdf.js
force-app/main/default/staticresources/jspdf.resource-meta.xml
force-app/main/default/staticresources/xlsxCoreMinJs.js
force-app/main/default/staticresources/xlsxCoreMinJs.resource-meta.xml
force-app/main/default/triggers/AccountDelayApplyTrigger.trigger
force-app/main/default/triggers/AccountDelayApplyTrigger.trigger-meta.xml
force-app/main/default/triggers/AccountTrigger.trigger
force-app/main/default/triggers/AfterUpdateReport.trigger
force-app/main/default/triggers/AgencyContactTrigger.trigger
force-app/main/default/triggers/AgencyHospitalTrigger.trigger
force-app/main/default/triggers/AgencyOppUpd.trigger
force-app/main/default/triggers/AssetTrigger.trigger
force-app/main/default/triggers/AttachmentTrigger.trigger
force-app/main/default/triggers/BringQuantityTrigger.trigger
force-app/main/default/triggers/BringQuantityTrigger.trigger-meta.xml
force-app/main/default/triggers/CalculationFMTrigger.trigger
force-app/main/default/triggers/CalculationFMTrigger.trigger-meta.xml
force-app/main/default/triggers/CampaignMemberTrigger.trigger
force-app/main/default/triggers/CaseHpDeptUpd.trigger
force-app/main/default/triggers/ChangedDepartmentOwner.trigger
force-app/main/default/triggers/CheckInspectionSubmitUser.trigger
force-app/main/default/triggers/ConLostReportTrigger.trigger
force-app/main/default/triggers/ConLostReportTrigger.trigger-meta.xml
force-app/main/default/triggers/ConsumApplyEquipmentSetDetailTrigger.trigger
force-app/main/default/triggers/ConsumApplyTrigger.trigger
force-app/main/default/triggers/ConsumableOrderDetail1Trigger.trigger
force-app/main/default/triggers/ConsumableOrderDetail2Trigger.trigger
force-app/main/default/triggers/ConsumableOrderTrigger.trigger
force-app/main/default/triggers/ConsumableOrdertosap.trigger
force-app/main/default/triggers/ContactHpDeptUpd.trigger
force-app/main/default/triggers/ContactToUser.trigger
force-app/main/default/triggers/ContactTrigger.trigger
force-app/main/default/triggers/EventOpportunityPileUp.trigger
force-app/main/default/triggers/FileAddressTrigger.trigger
force-app/main/default/triggers/FollowTrigger.trigger
force-app/main/default/triggers/FrameNumManageTrigger.trigger
force-app/main/default/triggers/FrameNumManageTrigger.trigger-meta.xml
force-app/main/default/triggers/InquiryForm.trigger
force-app/main/default/triggers/InquiryPredictsDateChangeTriggers.trigger
force-app/main/default/triggers/InquiryPredictsDateChangeTriggers.trigger-meta.xml
force-app/main/default/triggers/InspectionReportTrigger.trigger
force-app/main/default/triggers/LastbuyProductTrigger.trigger
force-app/main/default/triggers/LeadTrigger.trigger
force-app/main/default/triggers/LostCancelReportTrigger.trigger
force-app/main/default/triggers/MCAETrigger.trigger
force-app/main/default/triggers/MCESTrigger.trigger
force-app/main/default/triggers/MCESTrigger.trigger-meta.xml
force-app/main/default/triggers/MaintenanceContractAfterUpdate.trigger
force-app/main/default/triggers/MaintenanceContractAssetTrigger.trigger
force-app/main/default/triggers/MaintenanceContractAssetTrigger.trigger-meta.xml
force-app/main/default/triggers/MaintenanceContractHpDeptUpd.trigger
force-app/main/default/triggers/MaintenanceContractTrigger.trigger
force-app/main/default/triggers/MakeAssetHistory.trigger
force-app/main/default/triggers/NFM007.trigger
force-app/main/default/triggers/NFM010UpsertStatuAchievements.trigger
force-app/main/default/triggers/NFM202Opp.trigger
force-app/main/default/triggers/NFM207.trigger
force-app/main/default/triggers/OdsTrigger.trigger
force-app/main/default/triggers/OnCallTrigger.trigger
force-app/main/default/triggers/Opponent_Bid_InformationTrigger.trigger
force-app/main/default/triggers/OpportunityBefUpd.trigger
force-app/main/default/triggers/OpportunityHpDeptUpd.trigger
force-app/main/default/triggers/OpportunityTrigger.trigger
force-app/main/default/triggers/QuoteIraiTrigger.trigger
force-app/main/default/triggers/QuoteIraiTrigger.trigger-meta.xml
force-app/main/default/triggers/RentalApplyBeforeUpdate.trigger
force-app/main/default/triggers/RentalApplyFaultTrigger.trigger
force-app/main/default/triggers/RentalApplyFaultTrigger.trigger-meta.xml
force-app/main/default/triggers/RentalApplyOtherTrigger.trigger
force-app/main/default/triggers/RentalApplyShare.trigger
force-app/main/default/triggers/RentalApplyTrigger.trigger
force-app/main/default/triggers/RentalHpDeptUpd.trigger
force-app/main/default/triggers/Repair.trigger
force-app/main/default/triggers/RepairAgainAnMBCTrigger.trigger
force-app/main/default/triggers/RepairAgainAnMBCTrigger.trigger-meta.xml
force-app/main/default/triggers/RepairAgainAnTrigger.trigger
force-app/main/default/triggers/RepairAgainAnTrigger.trigger-meta.xml
force-app/main/default/triggers/RepairHpDeptUpd.trigger
force-app/main/default/triggers/RepairOrder.trigger
force-app/main/default/triggers/RepairOrder.trigger-meta.xml
force-app/main/default/triggers/RepairQuoteTrigger.trigger
force-app/main/default/triggers/ReportCPileUp.trigger
force-app/main/default/triggers/ReportHpDeptUpd.trigger
force-app/main/default/triggers/ReportTrigger.trigger
force-app/main/default/triggers/Report_BeforeFieldCopy.trigger
force-app/main/default/triggers/SolutionProjectRequirementsTrigger.trigger
force-app/main/default/triggers/StatuAchievementsDNdetailsTrigger.trigger
force-app/main/default/triggers/StatuAchievementsDNdetailsTrigger.trigger-meta.xml
force-app/main/default/triggers/SummaryAccruedAmountTrigger.trigger
force-app/main/default/triggers/SummaryAccruedAmountTrigger.trigger-meta.xml
force-app/main/default/triggers/SyncMBOpportunity.trigger
force-app/main/default/triggers/SyncOpportunity.trigger
force-app/main/default/triggers/SyncProduct2.trigger
force-app/main/default/triggers/SyncRepairFromMCAETrigger.trigger
force-app/main/default/triggers/TenderInformationTrigger.trigger
force-app/main/default/triggers/TenderOpportunityLinkTrigger.trigger
force-app/main/default/triggers/UserRoleChangeToLeaveStaff.trigger-meta.xml
force-app/main/default/triggers/UserToContact.trigger
force-app/main/default/triggers/XinEventC2Event.trigger
force-app/main/default/triggers/taskObjectTrigger.trigger |