| New file |
| | |
| | | { |
| | | "target-org": "stagefull" |
| | | } |
| | |
| | | |
| | | <div class="slds-truncate"> |
| | | <a href="{!'/partner/s/agency-contact/' + item.Id}" style="position: relative;"> |
| | | {!item.Name} |
| | | <span class="encrypt">{!item.Name}</span> |
| | | <span class="decrypt">{!item.awsdata.name}</span> |
| | | </a> |
| | | </div> |
| | | </th> |
| New file |
| | |
| | | <aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId,lightning:isUrlAddressable" > |
| | | <aura:attribute name = "recordId" type = "Id" default = ""/> |
| | | <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> |
| | | <c:NewAgencyContact> |
| | | <aura:set attribute="isClone" value="true"/> |
| | | <aura:set attribute="recordId" value="{!v.recordId}"/> |
| | | </c:NewAgencyContact> |
| | | </aura:component> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>50.0</apiVersion> |
| | | <description>A Lightning Component Bundle</description> |
| | | </AuraDefinitionBundle> |
| New file |
| | |
| | | ({ |
| | | doInit : function(component, event, helper) { |
| | | |
| | | |
| | | } |
| | | }) |
| New file |
| | |
| | | ({ |
| | | helperMethod : function() { |
| | | |
| | | } |
| | | }) |
| | |
| | | <!-- |
| | | * @Author: Thhto 997058689@qq.com |
| | | * @Date: 2022-07-08 10:47:25 |
| | | * @LastEditors: Thhto 997058689@qq.com |
| | | * @LastEditTime: 2022-08-15 10:26:13 |
| | | * @FilePath: \ceshihuanj\force-app\main\default\aura\DealerPersonnelInformationImport\DealerPersonnelInformationImport.cmp |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | | <aura:component controller="DealerPersonnelController" |
| | | implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes" |
| | | access="global"> |
| | |
| | | </aura:renderIf> |
| | | <!-- 批量添加周报 start--> |
| | | <div class="slds-modal slds-fade-in-open slds-hide" aura:id="errorDiv" style="z-index: 10001"> |
| | | <ui:inputText aura:id="articleURL" /> |
| | | <!-- <ui:inputText aura:id="articleURL" /> --> |
| | | <div class="demo-only" style="height: 8rem;"> |
| | | <div class="slds-notify_container slds-is-relative"> |
| | | <div class="slds-notify slds-notify_toast slds-theme_error" role="status"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv01"> |
| | | <ui:inputText aura:id="articleURL" /> |
| | | <!-- <ui:inputText aura:id="articleURL" /> --> |
| | | <div class="demo-only" style="height: 8rem;"> |
| | | <div class="slds-notify_container slds-is-relative"> |
| | | <div class="slds-notify slds-notify_toast slds-theme_success" role="alert"> |
| | |
| | | if (state === "SUCCESS") { |
| | | var res = response.getReturnValue(); |
| | | var res1 = ''; |
| | | debugger; |
| | | if (res != 'success') { |
| | | var ress = res.split('='); |
| | | console.log(ress); |
| New file |
| | |
| | | <aura:application access="public" extends="ltng:outApp"> |
| | | <aura:dependency resource="c:ImprovedForecastTimeApp"/> |
| | | </aura:application> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <description>A Lightning Application Bundle</description> |
| | | </AuraDefinitionBundle> |
| New file |
| | |
| | | <aura:documentation> |
| | | <aura:description>Documentation</aura:description> |
| | | <aura:example name="ExampleName" ref="exampleComponentName" label="Label"> |
| | | Example Description |
| | | </aura:example> |
| | | </aura:documentation> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| | | <svg width="120px" height="120px" viewBox="0 0 120 120" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| | | <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> |
| | | <path d="M120,108 C120,114.6 114.6,120 108,120 L12,120 C5.4,120 0,114.6 0,108 L0,12 C0,5.4 5.4,0 12,0 L108,0 C114.6,0 120,5.4 120,12 L120,108 L120,108 Z" id="Shape" fill="#2A739E"/> |
| | | <path d="M77.7383308,20 L61.1640113,20 L44.7300055,63.2000173 L56.0543288,63.2000173 L40,99.623291 L72.7458388,54.5871812 L60.907727,54.5871812 L77.7383308,20 Z" id="Path-1" fill="#FFFFFF"/> |
| | | </g> |
| | | </svg> |
| New file |
| | |
| | | ({ |
| | | myAction : function(component, event, helper) { |
| | | |
| | | } |
| | | }) |
| New file |
| | |
| | | ({ |
| | | helperMethod : function() { |
| | | |
| | | } |
| | | }) |
| New file |
| | |
| | | ({ |
| | | |
| | | // Your renderer method overrides go here |
| | | |
| | | }) |
| | |
| | | <!-- |
| | | @description : |
| | | @author : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | @group : |
| | | @last modified on : 07-08-2022 |
| | | @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | --> |
| | | <aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId,lightning:actionOverride,lightning:isUrlAddressable" access="global" |
| | | controller="NewAgencyContactController"> |
| | | |
| | |
| | | <aura:attribute name="isClone" type="Boolean" default = "False"/> |
| | | <ltng:require scripts="{! $Resource.AWSService+'/AWSService.js' }" /> |
| | | <ltng:require scripts="{! $Resource.jquery183minjs }" /> |
| | | <aura:registerEvent name="NewAgencyContactEvent" type="c:NewAgencyContactEvent"/> |
| | | |
| | | <div class="{! v.container_class}"> |
| | | <!-- header --> |
| | |
| | | }, |
| | | cancelClick : function(component, event, helper){ |
| | | $A.get("e.force:closeQuickAction").fire(); |
| | | //document.getElementById('NewAgencyContact').remove(); |
| | | //component.set('v.showNewAgencyContact', false); |
| | | }, |
| | | |
| | | scriptsLoaded : function(component, event, helper){} |
| New file |
| | |
| | | <aura:documentation> |
| | | <aura:description>Documentation</aura:description> |
| | | <aura:example name="ExampleName" ref="exampleComponentName" label="Label"> |
| | | Example Description |
| | | </aura:example> |
| | | </aura:documentation> |
| New file |
| | |
| | | <!-- |
| | | @description : |
| | | @author : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | @group : |
| | | @last modified on : 07-08-2022 |
| | | @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | --> |
| | | <aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId,lightning:actionOverride,lightning:isUrlAddressable" access="global" |
| | | controller="NewAgencyContactController"> |
| | | |
| | | <aura:attribute name = "recordId" type = "Id" default = ""/> |
| | | <aura:attribute name="title" type="string"/> |
| | | <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> |
| | | <aura:attribute name="layout" type="LayoutDescriberHelper.LayoutWrapper"/> |
| | | <aura:attribute name="record_data" type="Map"/> |
| | | <aura:attribute name="section_names" type="List"/> |
| | | <aura:attribute name="showSpinner" type="Boolean" default = "False"/> |
| | | <aura:attribute name="staticResource" type="Map"/> |
| | | <aura:attribute name="pi_fields_map" type="Map"/> |
| | | <aura:attribute name="isClone" type="Boolean" default = "False"/> |
| | | <ltng:require scripts="{! $Resource.AWSService+'/AWSService.js' }" /> |
| | | <ltng:require scripts="{! $Resource.jquery183minjs }" /> |
| | | <aura:registerEvent name="NewAgencyContactEvent" type="c:NewAgencyContactEvent"/> |
| | | |
| | | <div class="{! v.container_class}"> |
| | | <!-- header --> |
| | | <header class="slds-modal__header"> |
| | | <h2 id="modal-heading-01" class="slds-modal__title slds-hyphenate"> |
| | | {!v.title} |
| | | </h2> |
| | | </header> |
| | | |
| | | <div class="slds-modal__content slds-p-around_medium"> |
| | | <aura:if isTrue="{!v.showSpinner}"> |
| | | <lightning:spinner alternativeText="Loading" size="medium" /> |
| | | </aura:if> |
| | | |
| | | |
| | | <lightning:recordEditForm objectApiName="Agency_Contact__c"> |
| | | |
| | | <lightning:accordion activeSectionName="{! v.section_names }" allowMultipleSectionsOpen="true" class="greyyyy" > |
| | | <aura:iteration items="{!v.layout}" var="section"> |
| | | <aura:if isTrue="{! section.editHeading }"> |
| | | <lightning:accordionSection name="{! section.label }" label="{! section.label }"> |
| | | |
| | | <aura:iteration items="{! section.layoutColumns}" var="col"> |
| | | <aura:iteration items="{! col.layoutItems}" var="field"> |
| | | <aura:if isTrue="{! field.behavior != 'Readonly' }"> |
| | | <lightning:inputField required="{! field.behavior == 'Required' }" aura:id="field" fieldName="{! field.field}" value="{! field.value}" /> |
| | | |
| | | </aura:if> |
| | | </aura:iteration> |
| | | |
| | | </aura:iteration> |
| | | |
| | | |
| | | </lightning:accordionSection> |
| | | </aura:if> |
| | | </aura:iteration> |
| | | </lightning:accordion> |
| | | </lightning:recordEditForm> |
| | | |
| | | <div style="text-align:center;margin: 5px;"> |
| | | <lightning:button class="slds-button slds-button_neutral" label="取消" onclick="{! c.cancelClick }" /> |
| | | <lightning:button class="slds-button slds-button_brand" variant="brand" label="保存" onclick="{! c.saveClick }" /> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </aura:component> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <description>A Lightning Component Bundle</description> |
| | | </AuraDefinitionBundle> |
| New file |
| | |
| | | .THIS { |
| | | } |
| | | |
| | | .THIS .greyyyy .slds-button_reset{ |
| | | display: flex; |
| | | align-items: center; |
| | | background: var(--lwc-colorBackground,rgb(243, 242, 242)); |
| | | cursor: pointer; |
| | | width: 100%; |
| | | height: 2rem; |
| | | text-align: left; |
| | | color: currentColor; |
| | | font-size: inherit; |
| | | padding: 0 var(--lwc-spacingXSmall,0.5rem); |
| | | } |
| New file |
| | |
| | | <design:component > |
| | | |
| | | </design:component> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" standalone="no" ?> |
| | | <svg width="120px" height="120px" viewBox="0 0 120 120" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| | | <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> |
| | | <path d="M120,108 C120,114.6 114.6,120 108,120 L12,120 C5.4,120 0,114.6 0,108 L0,12 C0,5.4 5.4,0 12,0 L108,0 C114.6,0 120,5.4 120,12 L120,108 L120,108 Z" id="Shape" fill="#2A739E" /> |
| | | <path d="M77.7383308,20 L61.1640113,20 L44.7300055,63.2000173 L56.0543288,63.2000173 L40,99.623291 L72.7458388,54.5871812 L60.907727,54.5871812 L77.7383308,20 Z" id="Path-1" fill="#FFFFFF" /> |
| | | </g> |
| | | </svg> |
| New file |
| | |
| | | ({ |
| | | doInit : function(component, event, helper) { |
| | | let rid = component.get('v.recordId'); |
| | | let pid = null; |
| | | if(!rid){ |
| | | pid = window.location.href.replace("https://","").split("/")[4]; |
| | | } |
| | | let isClone = component.get('v.isClone'); |
| | | if(!rid || isClone){ |
| | | component.set('v.title',$A.get("$Label.c.New")+'.客户人员'); |
| | | }else{ |
| | | component.set('v.title',$A.get("$Label.c.Edit")+'.客户人员'); |
| | | } |
| | | |
| | | let record_type_id = null; |
| | | let pageref = component.get("v.pageReference") |
| | | if(!record_type_id && pageref){ |
| | | record_type_id = pageref.state.recordTypeId |
| | | } |
| | | component.set("v.showSpinner", true); |
| | | helper.CallBackAction(component,'Init',{ |
| | | rid : rid, |
| | | pid : null, |
| | | //rid : component.get('v.recordId'), |
| | | record_type_id : record_type_id, |
| | | },function(data){ |
| | | component.set("v.showSpinner", false); |
| | | |
| | | |
| | | if(data.getState() == "SUCCESS"){ |
| | | var rv = data.getReturnValue(); |
| | | console.log(rv); |
| | | if(rv.IsSuccess){ |
| | | let layout = JSON.parse(rv.Data.layout); |
| | | let fields = rv.Data.fields; |
| | | let staticResource = JSON.parse(rv.Data.staticResource) |
| | | let section_names = []; |
| | | section_names = layout.map(s=>s.label); |
| | | component.set('v.section_names',section_names); |
| | | |
| | | let m = {}; |
| | | for(let f of staticResource.PIDetails){ |
| | | m[f.SF_Field_API_Name__c] = f; |
| | | } |
| | | component.set('v.pi_fields_map',m); |
| | | |
| | | |
| | | |
| | | if(rv.Data && rv.Data.data && rv.Data.data.AWS_Data_Id__c){ |
| | | helper.AwsGet(staticResource.queryUrl, { |
| | | dataId : rv.Data.data.AWS_Data_Id__c |
| | | }, function(data){ |
| | | console.log('data = ' + data); |
| | | |
| | | for(let f of staticResource.PIDetails){ |
| | | |
| | | if(data.object && data.object.hasOwnProperty(f.AWS_Field_API__c)){ |
| | | rv.Data.data[f.SF_Field_API_Name__c] = data.object[f.AWS_Field_API__c]; |
| | | if(data.object.hasOwnProperty(f.AWS_Encrypted_Field_API__c) && data.object[f.AWS_Encrypted_Field_API__c]){ |
| | | rv.Data.data[f.SF_Field_Encrypted_API__c] = data.object[f.AWS_Encrypted_Field_API__c]; |
| | | } |
| | | } |
| | | } |
| | | |
| | | for(let s of layout){ |
| | | for(let c of s.layoutColumns){ |
| | | for(let item of c.layoutItems){ |
| | | if(rv.Data.data.hasOwnProperty(item.field)){ |
| | | item.value = rv.Data.data[item.field]; |
| | | } |
| | | |
| | | if(fields.hasOwnProperty(item.field)){ |
| | | item.fi = fields[item.field]; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | component.set('v.record_data',rv.Data.data); |
| | | component.set('v.layout',layout); |
| | | }, staticResource.token); |
| | | }else{ |
| | | |
| | | for(let s of layout){ |
| | | for(let c of s.layoutColumns){ |
| | | for(let item of c.layoutItems){ |
| | | if(rv.Data && fields.hasOwnProperty(item.field) && fields[item.field].References && fields[item.field].References.map(m=>m.value).indexOf(rv.Data.pidType) > -1){ |
| | | item.value = pid; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | component.set('v.layout',layout); |
| | | } |
| | | |
| | | |
| | | component.set('v.fields',fields); |
| | | component.set('v.staticResource',staticResource); |
| | | }else{ |
| | | helper.ShowToast({ |
| | | "message" : rv.Message, |
| | | "type" : "error" |
| | | }); |
| | | } |
| | | |
| | | }else{ |
| | | |
| | | helper.ShowToast({ |
| | | "message" : "Init error", |
| | | "type" : "error" |
| | | }); |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | saveClick : function(component, event, helper){ |
| | | |
| | | let staticResource = component.get('v.staticResource'); |
| | | let record_id = component.get('v.recordId'); |
| | | let record_type_id = component.get('v.recordTypeId'); |
| | | |
| | | let isClone = component.get('v.isClone'); |
| | | let url = staticResource.newUrl; |
| | | let payloadPi = {}; |
| | | if (record_id && !isClone) { |
| | | url = staticResource.updateUrl |
| | | payloadPi['dataId'] = component.get('v.record_data').AWS_Data_Id__c; |
| | | } |
| | | let layout = component.get('v.layout'); |
| | | |
| | | let pi_fields_map = component.get('v.pi_fields_map'); |
| | | |
| | | for(let s of layout){ |
| | | for(let c of s.layoutColumns){ |
| | | for(let item of c.layoutItems){ |
| | | if(pi_fields_map.hasOwnProperty(item.field)){ |
| | | |
| | | payloadPi[pi_fields_map[item.field].AWS_Field_API__c] = item.value; |
| | | } |
| | | |
| | | if (item.behavior == "Required" && !item.value ) { |
| | | let fs = component.find("field"); |
| | | for(let fi in fs){ |
| | | let f = fs[fi]; |
| | | if(!f.get('v.value')){ |
| | | f.reset(); |
| | | } |
| | | } |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | component.set("v.showSpinner", true); |
| | | helper.AwsPost(url, [payloadPi], function(result){ |
| | | |
| | | let obj = result.object[0]; |
| | | let data = {}; |
| | | if(record_id && !isClone){ |
| | | data.Id = record_id; |
| | | }else{ |
| | | data.AWS_Data_Id__c = obj.dataId; |
| | | } |
| | | for(let s of layout){ |
| | | for(let c of s.layoutColumns){ |
| | | for(let item of c.layoutItems){ |
| | | if(item.field && item.behavior != "Readonly"){ |
| | | if(pi_fields_map.hasOwnProperty(item.field)){ |
| | | data[item.field] = obj[pi_fields_map[item.field].AWS_Field_API__c]; |
| | | data[pi_fields_map[item.field].SF_Field_Encrypted_API__c] = obj[pi_fields_map[item.field].AWS_Encrypted_Field_API__c]; |
| | | }else{ |
| | | data[item.field] = item.value; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | $A.getCallback(function(){ |
| | | helper.CallBackAction(component,'Save',{ |
| | | data : data, |
| | | transId : result.txId |
| | | },function(data){ |
| | | component.set("v.showSpinner", false); |
| | | if(data.getState() == "SUCCESS"){ |
| | | var rv = data.getReturnValue(); |
| | | console.log(rv); |
| | | var sfId = null; |
| | | if(rv.IsSuccess){ |
| | | sfId = rv.Data.recordId; |
| | | } |
| | | |
| | | helper.AwsPost(staticResource.transactionUrl,{ |
| | | txId: result.txId, |
| | | sfRecordId:sfId, |
| | | isSuccess: rv.IsSuccess ? 1 : 0 |
| | | },function(data){ |
| | | if(rv.IsSuccess){ |
| | | helper.ShowToast({ |
| | | "message" : "成功", |
| | | "type" : "success" |
| | | }); |
| | | helper.closeAgencyContact(component); |
| | | |
| | | // if (record_id && !isClone){ |
| | | |
| | | // helper.closeAgencyContact(component); |
| | | // //$A.get('e.force:refreshView').fire(); |
| | | // }else{ |
| | | // var sObjectEvent = $A.get("e.force:navigateToSObject"); |
| | | // sObjectEvent.setParams({ |
| | | // "recordId": sfId |
| | | // }) |
| | | // sObjectEvent.fire(); |
| | | // } |
| | | }else{ |
| | | helper.ShowToast({ |
| | | "message" : rv.Message, |
| | | "type" : "error" |
| | | }); |
| | | } |
| | | },staticResource.token); |
| | | |
| | | |
| | | }else{ |
| | | |
| | | helper.ShowToast({ |
| | | "message" : "Init error", |
| | | "type" : "error" |
| | | }); |
| | | |
| | | } |
| | | }); |
| | | })(); |
| | | |
| | | }, staticResource.token); |
| | | }, |
| | | cancelClick : function(component, event, helper){ |
| | | helper.closeAgencyContact(component); |
| | | }, |
| | | |
| | | scriptsLoaded : function(component, event, helper){} |
| | | }) |
| New file |
| | |
| | | ({ |
| | | CallBackAction : function(component,action_name,para,callback) { |
| | | var action = component.get("c." + action_name.trimStart().replace("c.","")); |
| | | if(para){ |
| | | action.setParams(para); |
| | | } |
| | | if(callback){ |
| | | action.setCallback(this,function(data){ |
| | | callback(data); |
| | | }); |
| | | } |
| | | |
| | | $A.enqueueAction(action); |
| | | }, |
| | | ShowToast : function(paras){ |
| | | var toastEvent = $A.get("e.force:showToast"); |
| | | toastEvent.setParams(paras); |
| | | toastEvent.fire(); |
| | | }, |
| | | AwsPost : function(postURL, data ,callback,token){ |
| | | let payloadForNewPI = ''; |
| | | if(typeof(data) == 'string'){ |
| | | payloadForNewPI = data; |
| | | }else{ |
| | | payloadForNewPI = JSON.stringify(data); |
| | | } |
| | | |
| | | AWSService.post(postURL,payloadForNewPI,function(result) { |
| | | //this.insertCalloutLog(this.insertModule,postURL,JSON.stringify(payloadForNewPI),JSON.stringify(result),this.successStatus); |
| | | if(callback) callback(result); |
| | | },token); |
| | | }, |
| | | AwsGet : function(url, data ,callback,token){ |
| | | |
| | | if(typeof(data) == 'string'){ |
| | | url += data; |
| | | }else{ |
| | | let i = 0; |
| | | for(let p in data){ |
| | | url += (i++) ? '&' : '?'; |
| | | url += p + '=' + data[p]; |
| | | } |
| | | } |
| | | |
| | | AWSService.get(url,function(result){ |
| | | //this.insertCalloutLog(this.insertModule,postURL,JSON.stringify(payloadForNewPI),JSON.stringify(result),this.successStatus); |
| | | if(callback) callback(result); |
| | | },token); |
| | | }, |
| | | closeAgencyContact : function(component){ |
| | | var cmpEvent = component.getEvent("NewAgencyContactEvent"); |
| | | cmpEvent.setParams({ |
| | | "showNewAgencyContact":false}); |
| | | cmpEvent.fire(); |
| | | } |
| | | }) |
| New file |
| | |
| | | ({ |
| | | |
| | | // Your renderer method overrides go here |
| | | |
| | | }) |
| New file |
| | |
| | | <aura:event type="APPLICATION" description="Event template"> |
| | | <aura:attribute name="showNewAgencyContact" type="Boolean" default="false"/> |
| | | </aura:event> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <description>A Lightning Event Bundle</description> |
| | | </AuraDefinitionBundle> |
| New file |
| | |
| | | <aura:documentation> |
| | | <aura:description>Documentation</aura:description> |
| | | <aura:example name="ExampleName" ref="exampleComponentName" label="Label"> |
| | | Example Description |
| | | </aura:example> |
| | | </aura:documentation> |
| New file |
| | |
| | | <!-- |
| | | @description : |
| | | @author : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | @group : |
| | | @last modified on : 07-08-2022 |
| | | @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | --> |
| | | <aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId,lightning:actionOverride,lightning:isUrlAddressable" access="global" |
| | | controller="NewAgencyOpportunityController"> |
| | | |
| | | <aura:attribute name = "recordId" type = "Id" default = ""/> |
| | | <aura:attribute name = "recordTypeId" type = "Id" default = ""/> |
| | | <aura:attribute name="ac_name" type="string"/> |
| | | <aura:attribute name="title" type="string"/> |
| | | <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> |
| | | <aura:attribute name="layout" type="LayoutDescriberHelper.LayoutWrapper"/> |
| | | <aura:attribute name="record_data" type="Map"/> |
| | | <aura:attribute name="section_names" type="List"/> |
| | | <aura:attribute name="showSpinner" type="Boolean" default = "False"/> |
| | | <aura:attribute name="showSpinner2" type="Boolean" default = "False"/> |
| | | <aura:attribute name="staticResource" type="Map"/> |
| | | <aura:attribute name="pi_fields_map" type="Map"/> |
| | | <aura:attribute name="isClone" type="Boolean" default = "False"/> |
| | | <ltng:require scripts="{! $Resource.AWSService+'/AWSService.js' }" /> |
| | | <ltng:require scripts="{! $Resource.jquery183minjs }" /> |
| | | <aura:attribute name="isModalOpen" type="boolean" default="false"/> |
| | | <aura:attribute name="searchKeyWord" type="string" default=""/> |
| | | <aura:attribute name="contactAWSIds" type="List"/> |
| | | <aura:attribute name="login" type="Boolean" default="false"/> |
| | | <aura:attribute name="show" type="Boolean" default="false"/> |
| | | <aura:attribute name="showNewAgencyContact" type="Boolean" default="false"/> |
| | | <aura:handler name="NewAgencyContactEvent" event="c:NewAgencyContactEvent" action="{!c.closeAgencyContact}"/> |
| | | |
| | | |
| | | |
| | | <div class="{! v.container_class}"> |
| | | <!-- header --> |
| | | <header class="slds-modal__header"> |
| | | <h2 id="modal-heading-01" class="slds-modal__title slds-hyphenate"> |
| | | {!v.title} |
| | | </h2> |
| | | </header> |
| | | |
| | | <div class="slds-modal__content slds-p-around_medium"> |
| | | <aura:if isTrue="{!v.showSpinner}"> |
| | | <lightning:spinner alternativeText="Loading" size="medium" /> |
| | | </aura:if> |
| | | |
| | | |
| | | <lightning:recordEditForm objectApiName="Agency_Opportunity__c"> |
| | | |
| | | <lightning:accordion activeSectionName="{! v.section_names }" allowMultipleSectionsOpen="true" class="greyyyy" > |
| | | <aura:iteration items="{!v.layout}" var="section"> |
| | | <aura:if isTrue="{! section.editHeading }"> |
| | | <lightning:accordionSection name="{! section.label }" label="经销商询价信息"> |
| | | |
| | | <aura:iteration items="{! section.layoutColumns}" var="col"> |
| | | <aura:iteration items="{! col.layoutItems}" var="field"> |
| | | <aura:if isTrue="{! and(field.behavior != 'Readonly', field.field != 'Agency_Contact__c')}"> |
| | | <lightning:inputField required="{! field.behavior == 'Required' }" aura:id="field" fieldName="{! field.field}" value="{! field.value}" /> |
| | | |
| | | </aura:if> |
| | | <aura:if isTrue="{! field.field == 'Agency_Contact__c' }"> |
| | | <lightning:layout> |
| | | <lightning:layoutItem size="12"> |
| | | <lightning:input required="{! field.behavior == 'Required' }" label="客户人员" value = "{! field.value}" variant = "label-inline" style="margin-left: 0cm; display: none;" onclick="{! c.openModel }"/> |
| | | <lightning:input required="{! field.behavior == 'Required' }" label="客户人员" value = "{! v.ac_name}" variant = "label-inline" style="margin-left: 0cm; " onclick="{! c.openModel }"/> |
| | | </lightning:layoutItem> |
| | | <!-- <lightning:layoutItem size="1"> |
| | | <lightning:buttonIcon iconName="utility:settings" variant="container" alternativeText="Settings" title="Settings" class = "name" /> |
| | | </lightning:layoutItem> --> |
| | | </lightning:layout> |
| | | </aura:if> |
| | | </aura:iteration> |
| | | |
| | | </aura:iteration> |
| | | |
| | | </lightning:accordionSection> |
| | | </aura:if> |
| | | </aura:iteration> |
| | | </lightning:accordion> |
| | | </lightning:recordEditForm> |
| | | |
| | | <div style="text-align:center;margin: 5px;"> |
| | | <lightning:button class="slds-button slds-button_neutral" label="取消" onclick="{! c.cancelClick }" /> |
| | | <lightning:button class="slds-button slds-button_brand" variant="brand" label="保存" onclick="{! c.saveClick }" /> |
| | | </div> |
| | | </div> |
| | | <aura:if isTrue="{!v.isModalOpen}"> |
| | | |
| | | <!-- Modal/Popup Box starts here--> |
| | | <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" |
| | | aria-modal="true" aria-describedby="modal-content-id-1" |
| | | class="slds-modal slds-fade-in-open" > |
| | | |
| | | |
| | | |
| | | <aura:renderIf isTrue="{!v.login}"> |
| | | <div class="slds-spinner_container height100vh"> |
| | | <div class="slds-spinner--brand slds-spinner slds-spinner--medium" role="alert"> |
| | | <span id="aa" class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </aura:renderIf> |
| | | |
| | | |
| | | |
| | | <div class="slds-modal__container"> |
| | | <!-- Modal/Popup Box Header Starts here--> |
| | | <header class="slds-modal__header"> |
| | | <lightning:buttonIcon iconName="utility:close" |
| | | onclick="{! c.closeModel }" |
| | | alternativeText="close" |
| | | variant="bare-inverse" |
| | | class="slds-modal__close"/> |
| | | <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate"> |
| | | 搜索客户人员 |
| | | </h2> |
| | | </header> |
| | | |
| | | <!--Modal Body Start here--> |
| | | <div class="slds-modal__content slds-p-around_medium modal-body" id="modal-content-id-1"> |
| | | <lightning:layout> |
| | | <lightning:layoutItem size="7"> |
| | | <ui:inputText label="请输入客户姓名" class="field" value="{!v.searchKeyWord}"/> |
| | | </lightning:layoutItem> |
| | | <lightning:layoutItem size="1" class = "searchButton"> |
| | | <ui:button aura:id="button" buttonTitle="Click to see agency contact" class="button" label="搜索" press="{!c.searchAgencyContact}" disabled="false"/> |
| | | </lightning:layoutItem> |
| | | <lightning:layoutItem size="4" class = "searchButton"> |
| | | <ui:button aura:id="newAgencyContact" buttonTitle="Click to see agency contact" class="newAgencyContact" label="新建.客户人员" disabled="false" press="{!c.showNewAgency}"/> |
| | | </lightning:layoutItem> |
| | | </lightning:layout> |
| | | <div id="QueryResult" style = "margin-top:20px;"> |
| | | </div> |
| | | </div> |
| | | |
| | | <aura:if isTrue="{!v.showNewAgencyContact}"> |
| | | <section role="dialog" tabindex="-1" aria-modal="true" aria-labelledby="modal-heading-01" class="slds-modal slds-fade-in-open" aura:id="NewAgencyContact" id="NewAgencyContact"> |
| | | <c:NewAgencyContact2 /> |
| | | </section> |
| | | </aura:if> |
| | | |
| | | </div> |
| | | |
| | | </section> |
| | | <div class="slds-backdrop slds-backdrop_open"></div> |
| | | |
| | | |
| | | </aura:if> |
| | | |
| | | </div> |
| | | </aura:component> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <description>A Lightning Component Bundle</description> |
| | | </AuraDefinitionBundle> |
| New file |
| | |
| | | .THIS { |
| | | } |
| | | |
| | | .THIS .name{ |
| | | margin-right:0.5cm; |
| | | } |
| | | |
| | | .THIS .wh{ |
| | | width: 670px; |
| | | height: 500px; |
| | | } |
| | | |
| | | .THIS .slds-modal__container{ |
| | | max-width:70rem !important; |
| | | width:90% !important; |
| | | } |
| | | |
| | | .THIS .modal-body{ |
| | | height : 500px !important; |
| | | max-height: 500px !important; |
| | | } |
| | | |
| | | .THIS table{ |
| | | border-collapse: collapse; |
| | | border-spacing: 0; |
| | | width: 98%; |
| | | margin-left: 5px; |
| | | border: 1px solid #000000; |
| | | text-align: center; |
| | | } |
| | | .THIS tr{ |
| | | border: 1px solid #000000; |
| | | text-align: center; |
| | | } |
| | | .THIS td{ |
| | | border: 1px solid #000000; |
| | | text-align: center; |
| | | } |
| | | |
| | | .THIS th{ |
| | | border: 1px solid #000000; |
| | | text-align: center; |
| | | } |
| | | |
| | | .THIS.backgroundInverse { |
| | | position: relative; |
| | | background-color: #16325c; |
| | | height: 80px; |
| | | } |
| | | |
| | | .THIS.exampleHolder{ |
| | | position: relative; |
| | | display: inline-block; |
| | | margin-left: 15px; |
| | | width: 55px; |
| | | vertical-align: middle; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .THIS .searchButton{ |
| | | margin-top:20px; |
| | | margin-left:20px; |
| | | } |
| New file |
| | |
| | | ({ |
| | | |
| | | doInit : function(component, event, helper) { |
| | | let rid = component.get('v.recordId'); |
| | | let isClone = component.get('v.isClone'); |
| | | if(!rid || isClone){ |
| | | component.set('v.title',$A.get("$Label.c.New")+'经销商询价'); |
| | | }else{ |
| | | component.set('v.title',$A.get("$Label.c.Edit")+'经销商询价'); |
| | | } |
| | | |
| | | let record_type_id = ''; |
| | | let pageref = component.get("v.pageReference") |
| | | if(!record_type_id && pageref){ |
| | | record_type_id = pageref.state.recordTypeId ? pageref.state.recordTypeId : ''; |
| | | } |
| | | console.log('rid: ' + rid); |
| | | // console.log('pid: ' + pid); |
| | | console.log('record_type_id: ' + record_type_id); |
| | | component.set("v.recordTypeId", record_type_id); |
| | | component.set("v.showSpinner", true); |
| | | helper.CallBackAction(component,'Init',{ |
| | | rid : rid, |
| | | // pid : pid, |
| | | //rid : component.get('v.recordId'), |
| | | record_type_id : record_type_id |
| | | },function(data){ |
| | | |
| | | |
| | | console.log('data: ' + data); |
| | | if(data.getState() == "SUCCESS"){ |
| | | var rv = data.getReturnValue(); |
| | | console.log(rv); |
| | | if(rv.IsSuccess){ |
| | | debugger |
| | | let layout = JSON.parse(rv.Data.layout); |
| | | let fields = rv.Data.fields; |
| | | let staticResource = JSON.parse(rv.Data.staticResource) |
| | | let section_names = []; |
| | | // let awsData = rv.Data.awsDataIds; |
| | | section_names = layout.map(s=>s.label); |
| | | component.set('v.section_names',section_names); |
| | | |
| | | let m = {}; |
| | | for(let f of staticResource.PIDetails){ |
| | | m[f.SF_Field_API_Name__c] = f; |
| | | } |
| | | component.set('v.pi_fields_map',m); |
| | | |
| | | |
| | | |
| | | if(rv.Data && rv.Data.data ){ |
| | | console.log('rv.Data.data = ' + rv.Data.data); |
| | | for(let s of layout){ |
| | | for(let c of s.layoutColumns){ |
| | | for(let item of c.layoutItems){ |
| | | if(rv.Data.data.hasOwnProperty(item.field)){ |
| | | item.value = rv.Data.data[item.field]; |
| | | } |
| | | |
| | | if(fields.hasOwnProperty(item.field)){ |
| | | item.fi = fields[item.field]; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | component.set('v.layout',layout); |
| | | component.set('v.record_data',rv.Data.data); |
| | | |
| | | if(rv.Data.data.Agency_Contact__r){ |
| | | if (rv.Data.data.Agency_Contact__r.AWS_Data_Id__c) { |
| | | helper.AwsGet(staticResource.queryUrl, { |
| | | dataId : rv.Data.data.Agency_Contact__r.AWS_Data_Id__c |
| | | }, function(data){ |
| | | console.log('data = ' + data); |
| | | if (data.object) { |
| | | component.set('v.ac_name',data.object.name); |
| | | } |
| | | }, staticResource.token); |
| | | } |
| | | } |
| | | |
| | | |
| | | // }, staticResource.token); |
| | | }else{ |
| | | |
| | | for(let s of layout){ |
| | | for(let c of s.layoutColumns){ |
| | | for(let item of c.layoutItems){ |
| | | if(rv.Data && fields.hasOwnProperty(item.field) && fields[item.field].References && fields[item.field].References.map(m=>m.value).indexOf(rv.Data.pidType) > -1){ |
| | | item.value = pid; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | component.set('v.layout',layout); |
| | | } |
| | | |
| | | |
| | | component.set('v.fields',fields); |
| | | component.set('v.staticResource',staticResource); |
| | | component.set("v.showSpinner", false); |
| | | }else{ |
| | | component.set("v.showSpinner", false); |
| | | helper.ShowToast({ |
| | | "message" : rv.Message, |
| | | "type" : "error" |
| | | }); |
| | | } |
| | | |
| | | }else{ |
| | | component.set("v.showSpinner", false); |
| | | helper.ShowToast({ |
| | | "message" : "Init error", |
| | | "type" : "error" |
| | | }); |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | saveClick : function(component, event, helper){ |
| | | |
| | | let staticResource = component.get('v.staticResource'); |
| | | let record_id = component.get('v.recordId'); |
| | | let record_type_id = component.get('v.recordTypeId'); |
| | | |
| | | let isClone = component.get('v.isClone'); |
| | | let url = staticResource.newUrl; |
| | | let payloadPi = {}; |
| | | if (record_id && !isClone) { |
| | | url = staticResource.updateUrl |
| | | payloadPi['dataId'] = component.get('v.record_data').AWS_Data_Id__c; |
| | | } |
| | | let layout = component.get('v.layout'); |
| | | |
| | | let pi_fields_map = component.get('v.pi_fields_map'); |
| | | |
| | | for(let s of layout){ |
| | | for(let c of s.layoutColumns){ |
| | | for(let item of c.layoutItems){ |
| | | if(pi_fields_map.hasOwnProperty(item.field)){ |
| | | |
| | | payloadPi[pi_fields_map[item.field].AWS_Field_API__c] = item.value; |
| | | } |
| | | |
| | | if (item.behavior == "Required" && !item.value ) { |
| | | let fs = component.find("field"); |
| | | for(let fi in fs){ |
| | | let f = fs[fi]; |
| | | if(!f.get('v.value')){ |
| | | f.reset(); |
| | | } |
| | | } |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | component.set("v.showSpinner", true); |
| | | debugger |
| | | let data = {}; |
| | | if(record_id && !isClone){ |
| | | data.Id = record_id; |
| | | } |
| | | for(let s of layout){ |
| | | for(let c of s.layoutColumns){ |
| | | for(let item of c.layoutItems){ |
| | | if(item.field && item.behavior != "Readonly"){ |
| | | data[item.field] = item.value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | let x = 1; |
| | | helper.CallBackAction(component,'Save',{ |
| | | data : data, |
| | | transId :'1', |
| | | recordTypeId:record_type_id |
| | | },function(data){ |
| | | component.set("v.showSpinner", false); |
| | | if(data.getState() == "SUCCESS"){ |
| | | var rv = data.getReturnValue(); |
| | | console.log(rv); |
| | | var sfId = null; |
| | | if(rv.IsSuccess){ |
| | | sfId = rv.Data.recordId; |
| | | helper.ShowToast({ |
| | | "message" : "成功", |
| | | "type" : "success" |
| | | }); |
| | | if (record_id){ |
| | | $A.get("e.force:closeQuickAction").fire(); |
| | | $A.get('e.force:refreshView').fire(); |
| | | }else{ |
| | | var sObjectEvent = $A.get("e.force:navigateToSObject"); |
| | | sObjectEvent.setParams({ |
| | | "recordId": sfId |
| | | }) |
| | | sObjectEvent.fire(); |
| | | } |
| | | }else{ |
| | | helper.ShowToast({ |
| | | "message" : rv.Message, |
| | | "type" : "error" |
| | | }); |
| | | } |
| | | }else{ |
| | | helper.ShowToast({ |
| | | "message" : "Init error", |
| | | "type" : "error" |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | cancelClick : function(component, event, helper){ |
| | | $A.get("e.force:closeQuickAction").fire(); |
| | | //component.set("v.showNewAgencyContact", false); |
| | | }, |
| | | searchAgencyContact : function(component, event, helper){ |
| | | component.find('button').set('v.disabled', true); |
| | | helper.resetTable(); |
| | | helper.preparePayloadForSearchAgencyContact(component, event, helper); |
| | | }, |
| | | initContactTable : function(component, event, helper){ |
| | | let cols = ['Name','AgencyHospital', 'DepartmentClass', 'DoctorDivision1','Type']; |
| | | let contactInfoList = []; |
| | | let awsDataIds = []; |
| | | let data = component.get('v.result'); |
| | | if(data.object){ |
| | | for(var i=0;i<data.object.length;i++){ |
| | | if(data.object[i].dataId){ |
| | | let contactInfo = new Object(); |
| | | //需要修改 |
| | | contactInfo.Name = data.object[i].name; |
| | | contactInfo.DoctorDivision1 = data.object[i].doctorDivision1; |
| | | contactInfo.AWSDataId = data.object[i].dataId; |
| | | contactInfo.Type = data.object[i].type; |
| | | contactInfo.pi = true; |
| | | awsDataIds.push(contactInfo.AWSDataId); |
| | | contactInfo.sfRecordId = ''; |
| | | contactInfoList.push(contactInfo); |
| | | } |
| | | } |
| | | } |
| | | let AWSIdToSFIdMapValue = {}; |
| | | }, |
| | | openModel: function(component, event, helper) { |
| | | let layout = component.get('v.layout'); |
| | | for(let s of layout){ |
| | | for(let c of s.layoutColumns){ |
| | | for(let item of c.layoutItems){ |
| | | if(item.field == 'Agency_Hospital__c' && !item.value){ |
| | | console.log('item.value = ' + item.value) |
| | | helper.ShowToast({ |
| | | "message" : "请先选择经销商医院", |
| | | "type" : "warning" |
| | | }); |
| | | return |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // Set isModalOpen true |
| | | component.set("v.isModalOpen", true); |
| | | component.find('button').set('v.disabled', true); |
| | | helper.preparePayloadForSearchAgencyContact(component, event, helper); |
| | | }, |
| | | |
| | | closeModel: function(component, event, helper) { |
| | | // Set isModalOpen false |
| | | component.set("v.isModalOpen", false); |
| | | }, |
| | | |
| | | saveDetails: function(component, event, helper) { |
| | | //do something |
| | | component.set("v.isModalOpen", false); |
| | | }, |
| | | |
| | | showNewAgency: function(component, event, helper) { |
| | | //do something |
| | | component.set("v.showNewAgencyContact", true); |
| | | }, |
| | | closeAgencyContact: function(component, event, helper) { |
| | | var message = event.getParam("showNewAgencyContact"); |
| | | component.set("v.showNewAgencyContact", message); |
| | | component.find('button').set('v.disabled', true); |
| | | helper.resetTable(); |
| | | helper.preparePayloadForSearchAgencyContact(component, event, helper); |
| | | }, |
| | | }) |
| New file |
| | |
| | | ({ |
| | | CallBackAction : function(component,action_name,para,callback) { |
| | | var action = component.get("c." + action_name.trimStart().replace("c.","")); |
| | | if(para){ |
| | | action.setParams(para); |
| | | } |
| | | if(callback){ |
| | | action.setCallback(this,function(data){ |
| | | callback(data); |
| | | }); |
| | | } |
| | | |
| | | $A.enqueueAction(action); |
| | | }, |
| | | ShowToast : function(paras){ |
| | | var toastEvent = $A.get("e.force:showToast"); |
| | | toastEvent.setParams(paras); |
| | | toastEvent.fire(); |
| | | }, |
| | | AwsPost : function(postURL, data ,callback,token){ |
| | | let payloadForNewPI = ''; |
| | | if(typeof(data) == 'string'){ |
| | | payloadForNewPI = data; |
| | | }else{ |
| | | payloadForNewPI = JSON.stringify(data); |
| | | } |
| | | |
| | | AWSService.post(postURL,payloadForNewPI,function(result) { |
| | | //this.insertCalloutLog(this.insertModule,postURL,JSON.stringify(payloadForNewPI),JSON.stringify(result),this.successStatus); |
| | | if(callback) callback(result); |
| | | },token); |
| | | }, |
| | | AwsGet : function(url, data ,callback,token){ |
| | | |
| | | if(typeof(data) == 'string'){ |
| | | url += data; |
| | | }else{ |
| | | let i = 0; |
| | | for(let p in data){ |
| | | url += (i++) ? '&' : '?'; |
| | | url += p + '=' + data[p]; |
| | | } |
| | | } |
| | | |
| | | AWSService.get(url,function(result){ |
| | | //this.insertCalloutLog(this.insertModule,postURL,JSON.stringify(payloadForNewPI),JSON.stringify(result),this.successStatus); |
| | | if(callback) callback(result); |
| | | },token); |
| | | }, |
| | | refreshTable : function(component, event, helper,cols,contactInfoList,contactsInfo){ |
| | | let that = this; |
| | | let myTableDiv = document.getElementById("QueryResult"); |
| | | let table = document.createElement('TABLE'); |
| | | table.border = '1'; |
| | | table.id = 'table' |
| | | let tableBody = document.createElement('TBODY'); |
| | | table.appendChild(tableBody); |
| | | let headerTR = document.createElement('TR'); |
| | | let colsHeader = ['姓名','经销商医院', '医生区分(职务)','分类']; |
| | | tableBody.appendChild(headerTR); |
| | | for (let i = 0; i < colsHeader.length; i++) { |
| | | let td = document.createElement('TH'); |
| | | td.width = '75'; |
| | | td.appendChild(document.createTextNode(colsHeader[i])); |
| | | headerTR.appendChild(td); |
| | | } |
| | | //3. Init the AWS data |
| | | for (let i = 0; i < contactInfoList.length; i++) { |
| | | let tr = document.createElement('TR'); |
| | | tableBody.appendChild(tr); |
| | | let contactInfoTemp = contactInfoList[i] |
| | | for (let j = 0; j < cols.length; j++) { |
| | | let td = document.createElement('TD'); |
| | | td.width = '75'; |
| | | if(contactInfoTemp.pi){ |
| | | if (!contactsInfo.hasOwnProperty(contactInfoTemp.AWSDataId)) { |
| | | continue; |
| | | } |
| | | if(j == 0 && contactsInfo[contactInfoTemp.AWSDataId] ){ |
| | | td.id = contactsInfo[contactInfoTemp.AWSDataId].Id; |
| | | } |
| | | }else{ |
| | | td.id = contactInfoTemp.sfRecordId; |
| | | } |
| | | td.appendChild(document.createTextNode(contactInfoTemp[cols[j]]!=null?contactInfoTemp[cols[j]]:'')); |
| | | if (cols[j] == 'Name') { |
| | | td.addEventListener("click", function (obj) { |
| | | that.redirectToParentPage(component, event, helper,obj); |
| | | }); |
| | | } |
| | | tr.appendChild(td); |
| | | } |
| | | } |
| | | myTableDiv.appendChild(table); |
| | | component.find('button').set('v.disabled', false); |
| | | }, |
| | | redirectToParentPage : function(component, event, helper,obj){ |
| | | let agencyContactName = obj.currentTarget.innerText; |
| | | let id = obj.currentTarget.id; |
| | | component.set('v.ac_name',agencyContactName); |
| | | let layout = component.get('v.layout'); |
| | | for(let s of layout){ |
| | | for(let c of s.layoutColumns){ |
| | | for(let item of c.layoutItems){ |
| | | if(item.field == 'Agency_Contact__c'){ |
| | | item.value = id; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | component.set("v.isModalOpen", false); |
| | | }, |
| | | resetTable : function(){ |
| | | let queryResult = document.getElementById('QueryResult'); |
| | | let table = document.getElementsByTagName('table'); |
| | | if(table.length > 1){ |
| | | for(var i=1;i<table.length;i++){ |
| | | queryResult.removeChild(table[i]) |
| | | } |
| | | } |
| | | }, |
| | | preparePayloadForSearchAgencyContact : function(component, event, helper){ |
| | | let that = this; |
| | | let agencyHospitalId = ''; |
| | | let layout = component.get('v.layout'); |
| | | for(let s of layout){ |
| | | for(let c of s.layoutColumns){ |
| | | for(let item of c.layoutItems){ |
| | | if(item.field == 'Agency_Hospital__c'){ |
| | | agencyHospitalId = item.value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | var action = component.get('c.getAWSDataIds'); |
| | | action.setParams({ |
| | | "agencyHospitalId" : agencyHospitalId, |
| | | }); |
| | | action.setCallback(this,function(response){ |
| | | var state = response.getState(); |
| | | if(state == 'SUCCESS'){ |
| | | var rv = response.getReturnValue(); |
| | | if(rv.Data.length == 0){ |
| | | component.find('button').set('v.disabled', false); |
| | | helper.ShowToast({ |
| | | "message" : "该经销商医院下面没有客户人员", |
| | | "type" : "warning" |
| | | }); |
| | | return |
| | | } |
| | | let searchPayload = new Object(); |
| | | let searchAgencyContactName = component.get('v.searchKeyWord'); |
| | | searchPayload.dataIds = rv.Data; |
| | | searchPayload.name = searchAgencyContactName; |
| | | component.set('v.contactAWSIds',rv.Data); |
| | | let staticResource = component.get('v.staticResource'); |
| | | let url = staticResource.searchUrl; |
| | | let token = staticResource.token; |
| | | this.AwsPost(url,searchPayload,function(data){ |
| | | if(data.success){ |
| | | let cols = ['Name','AgencyHospital', 'DoctorDivision1','Type']; |
| | | let contactInfoList = []; |
| | | let awsDataIds = []; |
| | | if(data.object.length == 0){ |
| | | component.find('button').set('v.disabled', false); |
| | | that.ShowToast({ |
| | | "message" : '没有查询到该客户人员', |
| | | "type" : "warning" |
| | | }); |
| | | return |
| | | } |
| | | for(var i=0;i<data.object.length;i++){ |
| | | if(data.object[i].dataId){ |
| | | let contactInfo = new Object(); |
| | | //需要修改 |
| | | contactInfo.Name = data.object[i].name; |
| | | contactInfo.DoctorDivision1 = data.object[i].doctorDivision1; |
| | | contactInfo.AWSDataId = data.object[i].dataId; |
| | | contactInfo.Type = data.object[i].type; |
| | | contactInfo.pi = true; |
| | | awsDataIds.push(contactInfo.AWSDataId); |
| | | contactInfo.sfRecordId = ''; |
| | | contactInfoList.push(contactInfo); |
| | | } |
| | | } |
| | | //let AWSIdToSFIdMapValue = {}; |
| | | var searchAgencyContacts = component.get('c.searchAgencyContacts'); |
| | | searchAgencyContacts.setParams({ |
| | | "awsAgencyContactIds" : JSON.stringify(awsDataIds), |
| | | "accountId" : agencyHospitalId |
| | | }); |
| | | searchAgencyContacts.setCallback(this,function(response){ |
| | | var state = response.getState(); |
| | | if(state == 'SUCCESS'){ |
| | | var rv = response.getReturnValue(); |
| | | if(rv.IsSuccess){ |
| | | let contactsInfo = ''; |
| | | if(rv.Data){ |
| | | contactsInfo = JSON.parse(rv.Data.replace(/("\;)/g,"\"")); |
| | | if(Object.keys(contactsInfo).length>0){ |
| | | for(let i=0;i<contactInfoList.length;i++){ |
| | | let contactFromSF = contactsInfo[contactInfoList[i]['AWSDataId']]; |
| | | if(contactFromSF){ |
| | | contactInfoList[i].sfRecordId = contactFromSF['Id']; |
| | | contactInfoList[i].AgencyHospital = contactFromSF['Agency_Hospital__r']['Name']; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | that.refreshTable(component, event, helper,cols,contactInfoList,contactsInfo); |
| | | } |
| | | } |
| | | }); |
| | | $A.enqueueAction(searchAgencyContacts); |
| | | } |
| | | },token); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | } |
| | | }) |
| New file |
| | |
| | | ({ |
| | | |
| | | // Your renderer method overrides go here |
| | | |
| | | }) |
| | |
| | | <aura:attribute name="StageName__c_o" type="String" /> |
| | | <aura:attribute name="fieldsmap" type="Map" /> |
| | | <aura:attribute name="AgencyReportMap" type="Boolean" default="false" /> |
| | | <!-- 周报分类 --> |
| | | <!-- 日报分类 --> |
| | | |
| | | <aura:attribute name="alldata" type="List" /> |
| | | <aura:attribute name="setdoctorlisthos" type="Boolean" default="false" /> |
| | | <aura:attribute name="allselectlist" type="Map" /> |
| | | <aura:attribute name="doclist" type="List" /> |
| | | <aura:attribute name="docmap" type="Map" /> |
| | |
| | | <!-- //医院 点选需要 --> |
| | | <aura:attribute name="hospital" type="string" default="" /> |
| | | <aura:attribute name="hospitalId" type="string" default="" /> |
| | | <aura:attribute name="hospitals" type="string" default="" /> |
| | | <aura:attribute name="hospitalLinkId" type="string" default="" /> |
| | | <aura:handler name="change" value="{!v.hospital}" action="{!c.hosChange}" /> |
| | | <aura:attribute name="hospitalList" type="Map" /> |
| | | <!-- 使用产品1(产品型号) --> |
| | | <aura:attribute name="UseProduct1" type="string" default="" /> |
| | | <aura:attribute name="UseProduct1s" type="string" default="" /> |
| | | <aura:handler name="change" value="{!v.UseProduct1}" action="{!c.UseProduct1Change}" /> |
| | | <aura:attribute name="UseProduct1List" type="Map" /> |
| | | <aura:attribute name="UseProduct1Id" type="string" default="" /> |
| | | <!-- 使用产品2 --> |
| | | <aura:attribute name="UseProduct2" type="string" default="" /> |
| | | <aura:attribute name="UseProduct2s" type="string" default="" /> |
| | | <aura:handler name="change" value="{!v.UseProduct2}" action="{!c.UseProduct2Change}" /> |
| | | <aura:attribute name="UseProduct2List" type="Map" /> |
| | | <aura:attribute name="UseProduct2Id" type="string" default="" /> |
| | | <!-- 使用产品3 --> |
| | | <aura:attribute name="UseProduct3" type="string" default="" /> |
| | | <aura:attribute name="UseProduct3s" type="string" default="" /> |
| | | <aura:handler name="change" value="{!v.UseProduct3}" action="{!c.UseProduct3Change}" /> |
| | | <aura:attribute name="UseProduct3List" type="Map" /> |
| | | <aura:attribute name="UseProduct3Id" type="string" default="" /> |
| | | |
| | | <!--SWAG-CF58C3 fy start --> |
| | | <aura:attribute name="AWStoken" type="String"/> |
| | | <aura:attribute name="AWSsearch" type="String"/> |
| | | <aura:attribute name="AWSinsert" type="String"/> |
| | | <aura:attribute name="AWStransactionURL" type="String"/> |
| | | <aura:attribute name="AWSDoctor2Map" type="String"/> |
| | | <aura:attribute name="awsurl" type="Map"/> |
| | | <aura:attribute name="contactawsurl" type="Map"/> |
| | | <aura:attribute name="allselectlistAgencyPerson" type="Map"/> |
| | | <!--SWAG-CF58C3 fy end --> |
| | | |
| | | |
| | | <aura:attribute name="doctor_list" type="Map" /> |
| | |
| | | <aura:attribute name="select_report_data" type="Map" /> |
| | | <aura:attribute name="select_report_data_radio" type="Map" /> |
| | | <aura:attribute name="default_select_doctor_id" type="String" /> |
| | | <aura:attribute name="default_select_doctor_id2" type="String" /> |
| | | <aura:attribute name="default_select_opportunity_id" type="String" /> |
| | | <aura:attribute name="report_count" type="Integer" /> |
| | | <aura:attribute name="dialog_type" type="String" /> |
| | |
| | | <aura:attribute name="confirm_status" type="Integer" default="0" /> |
| | | <aura:attribute name="modal_confirm_title" type="String" /> |
| | | <aura:attribute name="modal_confirm_text" type="String" /> |
| | | <!-- <aura:attribute name="new_falg" type="String" /> --> |
| | | <!-- fy --> |
| | | <aura:attribute name="UserProType" type="String" /> |
| | | <!-- 科室 --> |
| | | <aura:attribute name="opportunity_cfilter" type="String" /> |
| | | <aura:attribute name="update_select_report_data_id" type="String" default="" /> |
| | | <!-- 批量添加周报 start--> |
| | | <!-- 批量添加日报 start--> |
| | | <aura:attribute name="reports_date" type="List" /> |
| | | <aura:attribute name="TableContent" type="String" description=" Show the Result class" /> |
| | | <aura:attribute name="TableContent2" type="String" description=" Show the Result class" /> |
| | |
| | | <ltng:require scripts="{! $Resource.AWSService+'/AWSService.js' }" /> |
| | | <ltng:require scripts="{! $Resource.jquery183minjs }" /> |
| | | |
| | | <!-- 批量添加周报 end--> |
| | | <!-- 批量添加日报 end--> |
| | | <!--ロード中...--> |
| | | <aura:renderIf isTrue="{!v.login}"> |
| | | <div class="slds-spinner_container height100vh"> |
| | |
| | | </aura:renderIf> |
| | | <div aura:id="report" id="report" class="contents_wrapper"> |
| | | <div class="slds-grid slds-wrap slds-grid--pull-padded"> |
| | | <div style="width: 230px;"></div> |
| | | <div style="width: 200px;"></div> |
| | | <div |
| | | class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12"> |
| | | 周 |
| | |
| | | <ui:inputSelect aura:id="select_agency_person" class="slds-select agency_person_select" |
| | | change="{!c.select_agency_change}" /> |
| | | </div> |
| | | <div style="width: 200px;"> |
| | | <div style="width: 100px;"> |
| | | </div> |
| | | <div class="tr slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12" |
| | | style="display: contents;"> |
| | | <ui:button aura:id="new_button" label="新建" press="{!c.new_report}" /> |
| | | </div> |
| | | <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"> |
| | | <div style="width: 350px;" class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"> |
| | | <ui:button aura:id="copy_button" label="复制" press="{!c.copy_button}" disabled="true" /> |
| | | <ui:button aura:id="delete_button" label="删除" press="{!c.delete_button}" disabled="true"/> |
| | | <ui:button aura:id="import" label="导入" press="{!c.import}" /> |
| | | <ui:button aura:id="export" label="导出" press="{!c.export_condition}" /> |
| | | <ui:button aura:id="returnbutton" label="返回" press="{!c.return_main_page}" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <!-- {!v.fieldsmap.Department_Cateogy__c} 科室--> |
| | | </th> |
| | | <th class="table_header slds-text-title--caps"> |
| | | <span class="slds-truncate" title="Name">医院人员</span> |
| | | <!-- {!v.fieldsmap.doctor2__c} 医院人员 --> |
| | | <span class="slds-truncate" title="Name">拜访人</span> |
| | | <!-- {!v.fieldsmap.doctor2__c} 拜访人 --> |
| | | </th> |
| | | <th class="table_header slds-text-title--caps"> |
| | | <span class="slds-truncate" title="Name">{!v.fieldsmap.DealerPersonnel__c}</span> |
| | | <!-- {!v.fieldsmap.visitor_title__c} 职位--> |
| | | </th> |
| | | <th class="table_header slds-text-title--caps"> |
| | | <span class="slds-truncate" title="Name">{!v.fieldsmap.WorkMark__c}</span> |
| | | <!-- {!v.fieldsmap.visitor_title__c} 职位--> |
| | | </th> |
| | | </tr> |
| | |
| | | <td role="gridcell" class="slds-cell-edit"> |
| | | <span class="slds-grid slds-grid--align-spread"> |
| | | <span class="slds-truncate" |
| | | title="{!item.Department_Cateogy__c}">{!item.Department_Cateogy__c}</span> |
| | | title="{!item.Department_Cateogy_text__c}">{!item.Department_Cateogy_text__c}</span> |
| | | </span> |
| | | </td> |
| | | <td role="gridcell" class="slds-cell-edit"> |
| | |
| | | title="{!item.DealerPersonnel__r.Name}">{!item.DealerPersonnel__r.Name}</span> |
| | | </span> |
| | | </td> |
| | | <td role="gridcell" class="slds-cell-edit" > |
| | | <span class="slds-grid slds-grid--align-spread" > |
| | | <span class="slds-truncate" |
| | | title="{!item.WorkMark__c}" > |
| | | <lightning:input type="checkbox" checked="{!item.WorkMark__c}" disabled="true"/> |
| | | </span> |
| | | </span> |
| | | </td> |
| | | </tr> |
| | | </aura:iteration> |
| | | </tbody> |
| | |
| | | </aura:set> |
| | | </aura:renderIf> |
| | | </div> |
| | | <!-- 批量添加周报 start--> |
| | | <!-- 批量添加日报 start--> |
| | | <div aura:id="modal_import" role="dialog" tabindex="-1" |
| | | class="disp_none slds-modal slds-fade-in-open slds-modal--large" aria-labelledby="headerTarget"> |
| | | <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv01"> |
| | | <ui:inputText aura:id="articleURL" /> |
| | | <!-- <ui:inputText aura:id="articleURL" /> --> |
| | | <div class="demo-only" style="height: 8rem;"> |
| | | <div class="slds-notify_container slds-is-relative"> |
| | | <div class="slds-notify slds-notify_toast slds-theme_success" role="alert"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="slds-modal slds-fade-in-open slds-hide" aura:id="errorDiv01" style="z-index: 10001"> |
| | | <!-- <ui:inputText aura:id="articleURL" /> --> |
| | | <div class="demo-only" style="height: 8rem;"> |
| | | <div class="slds-notify_container slds-is-relative"> |
| | | <div class="slds-notify slds-notify_toast slds-theme_error" role="status"> |
| | | <div class=" slds-m-left_xx-large"> |
| | | <div |
| | | class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"> |
| | | <lightning:icon alternativeText="error" iconName="utility:error" size="small" |
| | | class="buttonColor slds-m-right_small" /> |
| | | <h2 class="slds-text-heading_small " >{!v.errorMessage}</h2> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="slds-modal__container "> |
| | | <div class="slds-modal__header "> |
| | | <h4 id="headerTarget" class="slds-float--left"></h4> |
| | | <h2 id="headerTarget" class="slds-text-heading--medium">周报批量导入</h2> |
| | | <h2 id="headerTarget" class="slds-text-heading--medium">日报批量导入</h2> |
| | | <ui:button aura:id="close_button" label="关闭" |
| | | class="close_button slds-button slds-button--neutral slds-order--1" press="{!c.close_import}" /> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div aura:id="modal_importbg" class="disp_none slds-backdrop slds-backdrop--open"></div> |
| | | <!-- 批量添加周报 end--> |
| | | <!-- 批量添加日报 end--> |
| | | |
| | | <!-- 批量导出周报 start--> |
| | | <!-- 批量导出日报 start--> |
| | | <div aura:id="modal_export" role="dialog" tabindex="-1" |
| | | class="disp_none slds-modal slds-fade-in-open slds-modal--large"> |
| | | <div class="slds-modal__container"> |
| | | <div class="slds-modal__header"> |
| | | <h4 id="headerTarget" class="slds-float--left"></h4> |
| | | <h2 id="headerTarget" class="slds-text-heading--medium">周报批量导出</h2> |
| | | <h2 id="headerTarget" class="slds-text-heading--medium">日报批量导出</h2> |
| | | <ui:button aura:id="close_button" label="关闭" |
| | | class="close_button slds-button slds-button--neutral slds-order--1" press="{!c.close_export}" /> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div aura:id="modal_exportbg" class="disp_none slds-backdrop slds-backdrop--open"></div> |
| | | <!-- 批量导出周报 end--> |
| | | <!-- 批量导出日报 end--> |
| | | <div aura:id="modal_window" role="dialog" tabindex="-1" |
| | | class="disp_none slds-modal slds-fade-in-open slds-modal--large" aria-labelledby="headerTarget"> |
| | | <div class="slds-modal__container"> |
| | | <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv"> |
| | | <ui:inputText aura:id="articleURL" /> |
| | | <!-- <ui:inputText aura:id="articleURL" /> --> |
| | | <div class="demo-only" style="height: 8rem;"> |
| | | <div class="slds-notify_container slds-is-relative"> |
| | | <div class="slds-notify slds-notify_toast slds-theme_success" role="alert"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="slds-modal slds-fade-in-open slds-hide" aura:id="errorDiv" style="z-index: 10001"> |
| | | <ui:inputText aura:id="articleURL" /> |
| | | <!-- <ui:inputText aura:id="articleURL" /> --> |
| | | <div class="demo-only" style="height: 8rem;"> |
| | | <div class="slds-notify_container slds-is-relative"> |
| | | <div class="slds-notify slds-notify_toast slds-theme_error" role="status"> |
| | |
| | | <div class="slds-modal__header"> |
| | | <h4 id="headerTarget" class="slds-float--left">{!v.dialog_type}</h4> |
| | | <h2 id="headerTarget" class="slds-text-heading--medium"> |
| | | 周报({!v.selected_date} {!v.selected_agency_person})</h2> |
| | | 日报({!v.selected_date} {!v.selected_agency_person})</h2> |
| | | <ui:button aura:id="close_button" label="关闭" |
| | | class="close_button slds-button slds-button--neutral slds-order--1" press="{!c.toggle_report}" /> |
| | | </div> |
| | |
| | | <div aura:id="hospital_list" |
| | | class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | data-select="single"> |
| | | <lightning:input aura:id="hospital_input_text" label="医院" class="field" |
| | | <!-- label="医院" --> |
| | | 医院 |
| | | <lightning:input aura:id="hospital_input_text" class="field" |
| | | value="{!v.hospital}" updateOn="keyup" /> |
| | | <div class="slds-lookup__menu" id="lookup-66"> |
| | | <ul class="slds-lookup__list" role="listbox"> |
| | |
| | | </div> |
| | | <!-- 经销商人员 change="{!c.select_DealerPersonnel}" --> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"> |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" style="width: 145px;"> |
| | | {!v.fieldsmap.DealerPersonnel__c} |
| | | <ui:inputSelect aura:id="select_DealerPersonnel" class="slds-select" /> |
| | | </div> |
| | | <p hidden="hidden"> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-12"> |
| | | <br /> |
| | | <ui:button label="新建" class="slds-button" press="{!c.createCon}" disabled="true" |
| | | aura:id="new_con" /> |
| | | </div> |
| | | </p> |
| | | <!-- 工作记录 --> |
| | | <!-- 活动区分 --> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"> |
| | | {!v.fieldsmap.WorkRecord__c} |
| | | <ui:inputSelect aura:id="select_purpose_type" class="slds-select" |
| | | change="{!c.select_purpose_type}" /> |
| | | </div> |
| | | <!-- 医院人员 {!v.fieldsmap.doctor2__c}--> |
| | | <!-- 拜访人 {!v.fieldsmap.doctor2__c}--> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"> |
| | | 医院人员 |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" style="width: 145px;"> |
| | | 拜访人 |
| | | <ui:inputSelect aura:id="select_doctor" class="slds-select" change="{!c.doctor_change}" /> |
| | | </div> |
| | | <!-- <p hidden="hidden"> --> |
| | | |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-12"> |
| | | <br /> |
| | | <ui:button label="新建" class="slds-button" press="{!c.createCon}" disabled="true" |
| | | aura:id="new_con" /> |
| | | </div> |
| | | |
| | | <!-- </p> --> |
| | | <hr /> |
| | | <!-- 产品分类(第三分类) change="{!c.select_ProductClassification}" --> |
| | | <div |
| | |
| | | <div aura:id="UseProduct1_List" |
| | | class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | data-select="single"> |
| | | <lightning:input aura:id="UseProduct1_TEXT" label="使用产品1(产品型号)" class="field" |
| | | <!-- label="使用产品1(产品型号)" --> |
| | | 使用产品1(产品型号) |
| | | <lightning:input aura:id="UseProduct1_TEXT" class="field" |
| | | value="{!v.UseProduct1}" updateOn="keyup" /> |
| | | <div class="slds-lookup__menu" id="lookup-11"> |
| | | <ul class="slds-lookup__list" role="listbox"> |
| | | <ul class="slds-lookup__list" role="listbox" style="max-height:230px;"> |
| | | <aura:iteration var="UseProduct1" items="{!v.UseProduct1List}"> |
| | | <li role="presentation" onclick="{!c.seletUseProduct1Change}" |
| | | data-accid="{!UseProduct1.Id}" data-accName="{!UseProduct1.Name}"> |
| | | data-accid="{!UseProduct1.Id}" data-accName="{!UseProduct1.Asset_Model_No__c}"> |
| | | <span class="slds-lookup__item-action slds-media" id="lookup-option-498" |
| | | role="option"> |
| | | <div class="slds-media__body"> |
| | | <div class="slds-lookup__result-text">{!UseProduct1.Name}</div> |
| | | <div class="slds-lookup__result-text">{!UseProduct1.Asset_Model_No__c}</div> |
| | | </div> |
| | | </span> |
| | | </li> |
| | |
| | | <div aura:id="UseProduct2_List" |
| | | class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | data-select="single"> |
| | | <lightning:input aura:id="UseProduct2_TEXT" label="使用产品2" class="field" |
| | | <!-- label="使用产品2" --> |
| | | 使用产品2 |
| | | <lightning:input aura:id="UseProduct2_TEXT" class="field" |
| | | value="{!v.UseProduct2}" updateOn="keyup" /> |
| | | <div class="slds-lookup__menu" id="lookup-22"> |
| | | <ul class="slds-lookup__list" role="listbox"> |
| | | <ul class="slds-lookup__list" role="listbox" style="max-height:230px;"> |
| | | <aura:iteration var="UseProduct2" items="{!v.UseProduct2List}"> |
| | | <li role="presentation" onclick="{!c.seletUseProduct2Change}" |
| | | data-accid="{!UseProduct2.Id}" data-accName="{!UseProduct2.Name}"> |
| | | data-accid="{!UseProduct2.Id}" data-accName="{!UseProduct2.Asset_Model_No__c}"> |
| | | <span class="slds-lookup__item-action slds-media" id="lookup-option-498" |
| | | role="option"> |
| | | <div class="slds-media__body"> |
| | | <div class="slds-lookup__result-text">{!UseProduct2.Name}</div> |
| | | <div class="slds-lookup__result-text">{!UseProduct2.Asset_Model_No__c}</div> |
| | | </div> |
| | | </span> |
| | | </li> |
| | |
| | | <div aura:id="UseProduct3_List" |
| | | class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | data-select="single"> |
| | | <lightning:input aura:id="UseProduct3_TEXT" label="使用产品3" class="field" |
| | | <!-- label="使用产品3" --> |
| | | 使用产品3 |
| | | <lightning:input aura:id="UseProduct3_TEXT" class="field" |
| | | value="{!v.UseProduct3}" updateOn="keyup" /> |
| | | <div class="slds-lookup__menu" id="lookup-33"> |
| | | <ul class="slds-lookup__list" role="listbox"> |
| | | <ul class="slds-lookup__list" role="listbox" style="max-height:230px;"> |
| | | <aura:iteration var="UseProduct3" items="{!v.UseProduct3List}"> |
| | | <li role="presentation" onclick="{!c.seletUseProduct3Change}" |
| | | data-accid="{!UseProduct3.Id}" data-accName="{!UseProduct3.Name}"> |
| | | data-accid="{!UseProduct3.Id}" data-accName="{!UseProduct3.Asset_Model_No__c}"> |
| | | <span class="slds-lookup__item-action slds-media" id="lookup-option-498" |
| | | role="option"> |
| | | <div class="slds-media__body"> |
| | | <div class="slds-lookup__result-text">{!UseProduct3.Name}</div> |
| | | <div class="slds-lookup__result-text">{!UseProduct3.Asset_Model_No__c}</div> |
| | | </div> |
| | | </span> |
| | | </li> |
| | |
| | | <ui:inputSelect aura:id="select_EffectProgress" class="slds-select" /> |
| | | </div> |
| | | <hr /> |
| | | <!-- 科室同类耗材月使用量 ConsumptionOfConsumables__c--> |
| | | <!-- 产品1同类耗材科室月使用量 ConsumptionOfConsumables__c--> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"> |
| | | {!v.fieldsmap.ConsumptionOfConsumables__c} |
| | |
| | | <ui:inputText aura:id="select_warlocksNumber" class="slds-select" |
| | | change="{!c.select_warlocksNumber}" /> |
| | | </div> |
| | | <!-- 工作标记 WorkMark__c--> |
| | | <!-- 支援需求 WorkMark__c--> |
| | | <div style="padding-left: 20px;"> |
| | | {!v.fieldsmap.WorkMark__c} |
| | | <lightning:input type="checkbox" aura:id="select_WorkMark" /> |
| | |
| | | <td role="gridcell" class="slds-cell-edit"> |
| | | <span class="slds-grid slds-grid--align-spread"> |
| | | <span class="slds-truncate" |
| | | title="{!item.Department_Cateogy__c}">{!item.Name}</span> |
| | | title="{!item.Department_Cateogy_text__c}">{!item.Name}</span> |
| | | </span> |
| | | </td> |
| | | <td role="gridcell" class="slds-cell-edit"> |
| | |
| | | <td role="gridcell" class="slds-cell-edit"> |
| | | <span class="slds-grid slds-grid--align-spread"> |
| | | <span class="slds-truncate" |
| | | title="{!item.Department_Cateogy__c}">{!item.Department_Cateogy__c}</span> |
| | | title="{!item.Department_Cateogy_text__c}">{!item.Department_Cateogy_text__c}</span> |
| | | </span> |
| | | </td> |
| | | <td role="gridcell" class="slds-cell-edit"> |
| | |
| | | class="disp_none slds-modal slds-fade-in-open"> |
| | | <div class="slds-modal__container"> |
| | | <div class="slds-modal__header"> |
| | | <h2 id="headertest" class="slds-text-heading--medium">新建.客户人员</h2> |
| | | <h2 id="headertest" class="slds-text-heading--medium">新建.拜访人</h2> |
| | | </div> |
| | | <div class="slds-modal__content slds-p-around--medium"> |
| | | <lightning:recordEditForm aura:id="recordEditForm" objectApiName="Agency_Contact__c" |
| | |
| | | component.find('save_button').set('v.label', '保存并新建'); |
| | | helper.copy_button(component, event, helper); |
| | | }, |
| | | |
| | | delete_button : function(component, event, helper) { |
| | | helper.delete_button(component, event, helper); |
| | | }, |
| | | change_report_radio : function(component, event, helper) { |
| | | helper.change_report_radio(component, event, helper); |
| | | }, |
| | |
| | | var showValidationError = false; |
| | | var fields = component.find("newOpportunityField"); |
| | | var vaildationFailReason = ''; |
| | | let agencyReport = Object.create(null); |
| | | fields.forEach(function (field) { |
| | | if(field.get("v.fieldName") === 'Type__c' && $A.util.isEmpty(field.get("v.value"))){ |
| | | showValidationError = true; |
| | |
| | | } |
| | | |
| | | } |
| | | //SWAG-CF58C3 fy start |
| | | if(field.get("v.fieldName") === 'Name'){ |
| | | agencyReport['name'] = field.get("v.value"); |
| | | }else if(field.get("v.fieldName") === 'Type__c'){ |
| | | agencyReport['type'] = field.get("v.value"); |
| | | }else if(field.get("v.fieldName") === 'Doctor_Division1__c'){ |
| | | agencyReport['doctorDivision1'] = field.get("v.value"); |
| | | } |
| | | //SWAG-CF58C3 fy end |
| | | }); |
| | | if (!showValidationError) { |
| | | helper.newlyBuild(component, event, helper); |
| | | //SWAG-CF58C3 fy start |
| | | var agencyHospitalid = component.get('v.hospitalLinkId'); |
| | | var arr = new Array(); |
| | | arr.push(agencyReport); |
| | | var data = JSON.stringify(arr); |
| | | var token = component.get('v.AWStoken'); |
| | | var newUrl = component.get('v.AWSinsert'); |
| | | component.set('v.login',true); |
| | | helper.insert_agencycontact(component,token,newUrl,data,agencyHospitalid,helper); |
| | | //SWAG-CF58C3 fy end |
| | | // helper.newlyBuild(component, event, helper); |
| | | }else{ |
| | | component.find('OppMessage').setError(vaildationFailReason); |
| | | } |
| | |
| | | }, |
| | | |
| | | select_agency_change : function(component, event, helper) { |
| | | debugger |
| | | helper.select_agency_change(component, event, helper); |
| | | }, |
| | | |
| | | hosChange : function(component, event, helper) { |
| | | var hospital_name = event.getParam("value"); |
| | | var hospital_nameld = component.get("v.UseProduct1s"); |
| | | if (hospital_name.match(/(\S+\s)+/)) { |
| | | helper.searchHos(component, event, helper); |
| | | if(hospital_nameld!=hospital_name){ |
| | | helper.searchHos(component, event, helper); |
| | | } |
| | | } else { |
| | | helper.hideSearch(component, event, helper); |
| | | if(hospital_name==''){ |
| | | helper.hideSearchs(component, event, helper); |
| | | }else{ |
| | | helper.hideSearch(component, event, helper); |
| | | } |
| | | } |
| | | }, |
| | | selectHos : function(component, event, helper) { |
| | |
| | | //使用产品1 |
| | | UseProduct1Change : function(component, event, helper) { |
| | | var UseProduct1Name = event.getParam("value"); |
| | | var UseProduct1Nameold = component.get("v.UseProduct1s"); |
| | | debugger |
| | | if (UseProduct1Name.match(/(\S+\s)+/)) { |
| | | helper.searchUseProduct1(component, event, helper); |
| | | if(UseProduct1Name!=UseProduct1Nameold){ |
| | | helper.searchUseProduct1(component, event, helper); |
| | | } |
| | | } else { |
| | | helper.hideSearchUseProduct1(component, event, helper); |
| | | if(UseProduct1Name==''){ |
| | | helper.hideSearchUseProduct1s(component, event, helper); |
| | | }else{ |
| | | helper.hideSearchUseProduct1(component, event, helper); |
| | | } |
| | | } |
| | | }, |
| | | seletUseProduct1Change : function(component, event, helper) { |
| | |
| | | //使用产品2 |
| | | UseProduct2Change : function(component, event, helper) { |
| | | var UseProduct2Name = event.getParam("value"); |
| | | var UseProduct2Nameold = component.get("v.UseProduct2s"); |
| | | if (UseProduct2Name.match(/(\S+\s)+/)) { |
| | | helper.searchUseProduct2(component, event, helper); |
| | | if(UseProduct2Name!=UseProduct2Nameold){ |
| | | helper.searchUseProduct2(component, event, helper); |
| | | } |
| | | } else { |
| | | helper.hideSearchUseProduct2(component, event, helper); |
| | | if(UseProduct2Name==''){ |
| | | helper.hideSearchUseProduct2s(component, event, helper); |
| | | }else{ |
| | | helper.hideSearchUseProduct2(component, event, helper); |
| | | } |
| | | } |
| | | }, |
| | | seletUseProduct2Change : function(component, event, helper) { |
| | |
| | | //使用产品3 |
| | | UseProduct3Change : function(component, event, helper) { |
| | | var UseProduct3Name = event.getParam("value"); |
| | | var UseProduct3Nameold = component.get("v.UseProduct3s"); |
| | | if (UseProduct3Name.match(/(\S+\s)+/)) { |
| | | helper.searchUseProduct3(component, event, helper); |
| | | if(UseProduct3Name!=UseProduct3Nameold){ |
| | | helper.searchUseProduct3(component, event, helper); |
| | | } |
| | | } else { |
| | | helper.hideSearchUseProduct3(component, event, helper); |
| | | if(UseProduct3Name==''){ |
| | | helper.hideSearchUseProduct3s(component, event, helper); |
| | | }else{ |
| | | helper.hideSearchUseProduct3(component, event, helper); |
| | | } |
| | | } |
| | | }, |
| | | seletUseProduct3Change : function(component, event, helper) { |
| | |
| | | }, |
| | | selectpurposetype : function(component,event,helper){ |
| | | helper.selectpurposetype(component,event,helper); |
| | | }, |
| | | return_main_page: function(component,event,helper){ |
| | | window.open('/customer/','_self'); |
| | | } |
| | | }) |
| | |
| | | if (!date_str) { |
| | | return false; |
| | | } |
| | | |
| | | if(person_str){ |
| | | var person_str2= person_str.split(';'); |
| | | if(person_str2.length>1){ |
| | | person_str=person_str2[0]; |
| | | } |
| | | } |
| | | date_str = this.get_date_string(date_str); |
| | | var action = component.get('c.getReports'); |
| | | action.setParams({ |
| | |
| | | }); |
| | | component.set('v.login', true); |
| | | action.setCallback(this, function (response) { |
| | | debugger |
| | | var state = response.getState(); |
| | | if (state == 'SUCCESS') { |
| | | var res = response.getReturnValue(); |
| | |
| | | } |
| | | if (res.reports.length > 0) { |
| | | component.set('v.list_message', ''); |
| | | |
| | | // PI 改造 By Bright 20220328 |
| | | if(true){ |
| | | let doctor_awsids = res.reports.map(function(d){return d.doctor2__r.AWS_Data_Id__c;}); |
| | | let PIConfig = component.get('v.PIConfig'); |
| | | let staticResourceAgencyContact = JSON.parse(PIConfig.staticResourceAgencyContact); |
| | | if(doctor_awsids.length > 0){ |
| | | AWSService.search(staticResourceAgencyContact.searchUrl,{ |
| | | dataIds:doctor_awsids |
| | | }, function(data){ |
| | | if(data && data.object && data.object.length){ |
| | | let m = {}; |
| | | for(let di in data.object){ |
| | | if(data.object[di] && data.object[di].dataId){ |
| | | m[data.object[di].dataId] = data.object[di]; |
| | | } |
| | | } |
| | | |
| | | for(let ri in res.reports){ |
| | | if(res.reports[ri] && res.reports[ri].doctor2__r && res.reports[ri].doctor2__r.AWS_Data_Id__c && m.hasOwnProperty(res.reports[ri].doctor2__r.AWS_Data_Id__c)){ |
| | | res.reports[ri].doctor2__r.awsdata = m[res.reports[ri].doctor2__r.AWS_Data_Id__c]; |
| | | } |
| | | } |
| | | component.set('v.reports', res.reports); |
| | | component.set('v.report_count', res.reports.length); |
| | | } |
| | | |
| | | component.set('v.login', false); |
| | | }, staticResourceAgencyContact.token); |
| | | var flag2=res.reports.length; |
| | | //fy 20220414 start |
| | | var report1 =[]; |
| | | var report2 =[]; |
| | | res.reports.forEach(item => { |
| | | if((item.WorkRecord__c == '科室会'&&item.doctor3__c != undefined)|| |
| | | ((item.doctor3__c == undefined||item.doctor3__c == ''||item.doctor3__c=="") |
| | | && (item.doctor2__r== undefined||item.doctor2__r==''||item.doctor2__r==""))){ |
| | | report1.push(item); |
| | | }else{ |
| | | component.set('v.login', false); |
| | | report2.push(item); |
| | | } |
| | | |
| | | } |
| | | |
| | | }); |
| | | res.reports=report2; |
| | | //fy 20220414 end |
| | | // PI 改造 By Bright 20220328 |
| | | if(true){ |
| | | let doctor_awsids = res.reports.map(function(d){return d.doctor2__r.AWS_Data_Id__c;}); |
| | | let PIConfig = component.get('v.PIConfig'); |
| | | let staticResourceAgencyContact = JSON.parse(PIConfig.staticResourceAgencyContact); |
| | | if(doctor_awsids.length > 0){ |
| | | AWSService.search(staticResourceAgencyContact.searchUrl,{ |
| | | dataIds:doctor_awsids |
| | | }, function(data){ |
| | | if(data && data.object && data.object.length){ |
| | | let m = {}; |
| | | for(let di in data.object){ |
| | | if(data.object[di] && data.object[di].dataId){ |
| | | m[data.object[di].dataId] = data.object[di]; |
| | | } |
| | | } |
| | | debugger |
| | | for(let ri in res.reports){ |
| | | if(res.reports[ri] && res.reports[ri].doctor2__r && res.reports[ri].doctor2__r.AWS_Data_Id__c && m.hasOwnProperty(res.reports[ri].doctor2__r.AWS_Data_Id__c)){ |
| | | res.reports[ri].doctor2__r.awsdata = m[res.reports[ri].doctor2__r.AWS_Data_Id__c]; |
| | | } |
| | | } |
| | | component.set('v.reports', res.reports); |
| | | component.set('v.report_count', res.reports.length); |
| | | } |
| | | //fy 20220414 start |
| | | var reports3=component.get('v.reports'); |
| | | if(reports3.length<flag2){ |
| | | res.reports = [...report1, ...reports3]; |
| | | component.set('v.reports', res.reports); |
| | | component.set('v.report_count', res.reports.length); |
| | | } |
| | | //fy 20220414 end |
| | | component.set('v.login', false); |
| | | }, staticResourceAgencyContact.token); |
| | | }else{ |
| | | component.set('v.login', false); |
| | | } |
| | | } |
| | | } else { |
| | | component.set('v.list_message', 'no_data'); |
| | | component.set('v.login', false); |
| | |
| | | this.get_reports(component, event, helper, component.find('select_date').get('v.value'), component.find('select_agency_person').get('v.value')); |
| | | component.set('v.select_report_data_radio', ''); |
| | | component.find('copy_button').set('v.disabled', true); |
| | | component.find('delete_button').set('v.disabled', true); |
| | | }, |
| | | |
| | | select_agency_change: function (component, event, helper) { |
| | |
| | | this.get_reports(component, event, helper, component.find('select_date').get('v.value'), select_value); |
| | | component.set('v.select_report_data_radio', ''); |
| | | component.find('copy_button').set('v.disabled', true); |
| | | component.find('delete_button').set('v.disabled', true); |
| | | }, |
| | | |
| | | get_agency_person_name: function (component, agency_person_value) { |
| | |
| | | }, |
| | | //复制和编辑回显的位置 |
| | | toggle_report: function (component) { |
| | | debugger |
| | | var modal_window = component.find('modal_window'); |
| | | var modal_bg = component.find('modal_bg'); |
| | | if ($A.util.hasClass(modal_window, 'disp_none')) { |
| | |
| | | //使用产品1(产品型号) |
| | | var UseProduct1Text = ''; |
| | | var UseProduct1Id = ''; |
| | | if (select_data['UseProduct1__c'] != '' || select_data['UseProduct1__c'] != 'undefined') { |
| | | if (select_data['UseProduct1__c'] != '' && select_data['UseProduct1__c'] != undefined) { |
| | | for (var i = 0; i < reports.length; i++) { |
| | | if (reports[i]['UseProduct1__c'] == select_data['UseProduct1__c']) { |
| | | UseProduct1Text = reports[i]['UseProduct1__r']['Name']; |
| | | UseProduct1Text = reports[i]['UseProduct1__r']['Asset_Model_No__c']; |
| | | UseProduct1Id = reports[i]['UseProduct1__c']; |
| | | } |
| | | } |
| | |
| | | if (select_data['UseProduct2__c'] != ''&&select_data['UseProduct2__c'] != undefined) { |
| | | for (var i = 0; i < reports.length; i++) { |
| | | if (reports[i]['UseProduct2__c'] == select_data['UseProduct2__c']) { |
| | | UseProduct2Text = reports[i]['UseProduct2__r']['Name']; |
| | | UseProduct2Text = reports[i]['UseProduct2__r']['Asset_Model_No__c']; |
| | | UseProduct2Id = reports[i]['UseProduct2__c']; |
| | | } |
| | | } |
| | |
| | | if (select_data['UseProduct3__c'] != ''&&select_data['UseProduct3__c'] != undefined) { |
| | | for (var i = 0; i < reports.length; i++) { |
| | | if (reports[i]['UseProduct3__c'] == select_data['UseProduct3__c']) { |
| | | UseProduct3Text = reports[i]['UseProduct3__r']['Name']; |
| | | UseProduct3Text = reports[i]['UseProduct3__r']['Asset_Model_No__c']; |
| | | UseProduct3Id = reports[i]['UseProduct3__c']; |
| | | } |
| | | } |
| | |
| | | component.set('v.data.Report_Date__c', reportDate); |
| | | } |
| | | // 科室 |
| | | if (select_data['Department_Cateogy__c'] != '') { |
| | | component.find('select_department').set('v.value',select_data['Department_Cateogy__c']); |
| | | // if (select_data['Department_Cateogy__c'] != '') { |
| | | // component.find('select_department').set('v.value',select_data['Department_Cateogy__c']); |
| | | // } |
| | | //fy Department_Cateogy_text__c |
| | | if (select_data['Department_Cateogy_text__c'] != '') { |
| | | component.find('select_department').set('v.value',select_data['Department_Cateogy_text__c']); |
| | | } |
| | | //经销商人员 |
| | | if (select_data['DealerPersonnel__c'] != '') { |
| | | this.set_selected(component, 'select_DealerPersonnel', select_data['DealerPersonnel__c']); |
| | | } |
| | | // 医院人员 |
| | | component.set('v.default_select_doctor_id', select_data['doctor2__c']); |
| | | this.set_doctor_list(component); |
| | | |
| | | // 工作记录 |
| | | // 活动区分 |
| | | if (select_data['WorkRecord__c'] != '') { |
| | | this.set_selected(component, 'select_purpose_type', select_data['WorkRecord__c']); |
| | | this.selectPurposeType(component); |
| | | } |
| | | // 拜访人 |
| | | if(select_data['WorkRecord__c'] == '科室会'){ |
| | | component.set('v.default_select_doctor_id2', select_data['doctor3__c']); |
| | | var a =component.get('v.default_select_doctor_id2'); |
| | | this.set_doctor_list(component); |
| | | }else{ |
| | | component.set('v.default_select_doctor_id', select_data['doctor2__c']); |
| | | this.set_doctor_list(component); |
| | | } |
| | | //产品分类(第三分类) |
| | | if (select_data['ProductClassification__c'] != null) { |
| | | this.set_selected(component, 'select_ProductClassification', select_data['ProductClassification__c']); |
| | | this.selectProductClassification(component); |
| | | } |
| | | // 科室同类耗材月使用量 |
| | | // 产品1同类耗材科室月使用量 |
| | | if (select_data['ConsumptionOfConsumables__c'] != '') { |
| | | component.find('select_ConsumptionOfConsumables').set('v.value',select_data['ConsumptionOfConsumables__c']); |
| | | } |
| | |
| | | if (select_data['warlocksNumber__c'] != '') { |
| | | component.find('select_warlocksNumber').set('v.value',select_data['warlocksNumber__c']); |
| | | } |
| | | // 工作标记 |
| | | // 支援需求 |
| | | if (select_data['WorkMark__c'] != false) { |
| | | component.find('select_WorkMark').set('v.checked',select_data['WorkMark__c']); |
| | | } |
| | |
| | | var WorkMark__c = component.find('select_WorkMark').get('v.checked'); |
| | | if (component.get('v.mode') == 'new') { |
| | | var confirm_title = '警告!' |
| | | var confirm_text = '放弃新建周报?'; |
| | | var confirm_text = '放弃新建日报?'; |
| | | if (!Report_Date__c && |
| | | !Agency_Hospital__c && |
| | | !UseProduct1__c && |
| | |
| | | this.allclear(component); |
| | | $A.util.addClass(modal_window, 'disp_none'); |
| | | $A.util.addClass(modal_bg, 'disp_none'); |
| | | this.close_confirm(component, confirm_title, confirm_text); |
| | | } else { |
| | | this.close_confirm(component, confirm_title, confirm_text); |
| | | } |
| | | } else if (component.get('v.mode') == 'copy') { |
| | | var confirm_title = '警告!' |
| | | var confirm_text = '放弃新建周报?'; |
| | | var confirm_text = '放弃新建日报?'; |
| | | if (select_report_data['Report_Date__c'] == Report_Date__c && |
| | | select_report_data['Agency_Hospital__c'] == Agency_Hospital__c && |
| | | select_report_data['UseProduct1__c'] == UseProduct1__c && |
| | |
| | | } |
| | | } else if (component.get('v.mode') == 'edit') { |
| | | var confirm_title = '警告!' |
| | | var confirm_text = '放弃编辑周报?'; |
| | | var confirm_text = '放弃编辑日报?'; |
| | | if (select_report_data['Report_Date__c'] == Report_Date__c && |
| | | select_report_data['Agency_Hospital__c'] == Agency_Hospital__c && |
| | | select_report_data['UseProduct1__c'] == UseProduct1__c && |
| | |
| | | } |
| | | } |
| | | }, |
| | | //关闭页面是 小的提示框是否放弃新建周报 |
| | | //关闭页面是 小的提示框是否放弃新建日报 |
| | | close_confirm: function (component, title, text) { |
| | | var confirm_status = component.get('v.confirm_status'); |
| | | component.set('v.modal_confirm_title', title); |
| | |
| | | var modal_bg = component.find('modal_bg'); |
| | | var modal_confirm = component.find('modal_confirm'); |
| | | var modal_confirm_bg = component.find('modal_confirm_bg'); |
| | | debugger |
| | | if (confirm_status == 0) { |
| | | $A.util.addClass(modal_window, 'disp_none'); |
| | | $A.util.addClass(modal_bg, 'disp_none'); |
| | |
| | | }, |
| | | //新建按钮 |
| | | new_report: function (component, event, helper) { |
| | | |
| | | component.set('v.mode', 'new'); |
| | | component.set('v.dialog_type', '新建'); |
| | | // 周 |
| | |
| | | // 担当 |
| | | var name = component.get('v.selected_agency_person'); |
| | | var ret = this.create_report_header(component, event, helper, name, select_agency, select_date); |
| | | component.set('v.default_select_doctor_id2', ''); |
| | | |
| | | // SWAG-CF58C3 fy start |
| | | this.set_aws_url(component,'Agency_Contact__c') |
| | | // SWAG-CF58C3 fy end |
| | | }, |
| | | // 复制按钮 |
| | | copy_button: function (component, event, helper) { |
| | | debugger |
| | | this.allclear(component); |
| | | component.set('v.mode', 'copy'); |
| | | component.set('v.dialog_type', '新建'); |
| | |
| | | var name = component.get('v.selected_agency_person'); |
| | | component.set('v.edit_copy_select_report_id', select_report_data['Id']); |
| | | component.set('v.select_report_data', select_report_data); |
| | | |
| | | var ret = this.create_report_header(component, event, helper, name, select_agency, select_date); |
| | | // SWAG-CF58C3 fy start |
| | | this.set_aws_url(component,'Agency_Contact__c') |
| | | // SWAG-CF58C3 fy end |
| | | |
| | | }, |
| | | //删除按钮 |
| | | delete_button: function (component, event, helper) { |
| | | debugger |
| | | var select_report_data = component.get('v.select_report_data_radio'); |
| | | if(confirm('是否删除该数据?')){ |
| | | debugger |
| | | component.set('v.login', true); |
| | | var action = component.get('c.deleteAgencyReport'); |
| | | action.setParams({ |
| | | "agencyReport_id": select_report_data.Id, |
| | | }); |
| | | action.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state == 'SUCCESS') { |
| | | var result = response.getReturnValue(); |
| | | if(result=='success'){ |
| | | this.select_agency_change(component, event, helper); |
| | | } |
| | | component.set('v.login', false); |
| | | }else { |
| | | component.set('v.login', false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | } |
| | | }, |
| | | //复制按钮可用 |
| | | change_report_radio: function (component, event, helper) { |
| | | debugger |
| | | var reports = component.get('v.reports'); |
| | | for (var i = 0; i < reports.length; i++) { |
| | | if (reports[i].Name == event.getSource().get('v.label')) { |
| | | component.set('v.select_report_data_radio', reports[i]); |
| | | component.find('copy_button').set('v.disabled', false); |
| | | component.find('delete_button').set('v.disabled', false); |
| | | break; |
| | | } |
| | | } |
| | |
| | | component.set('v.selected_agency_person', new_label); |
| | | component.set('v.edit_copy_select_report_id', component.get('v.reports')[index].Id); |
| | | var ret = this.create_report_header(component, event, helper, name, select_agency, select_date); |
| | | // SWAG-CF58C3 fy start |
| | | this.set_aws_url(component,'Agency_Contact__c') |
| | | // SWAG-CF58C3 fy end |
| | | }, |
| | | //保存 |
| | | save_report: function (component, event, helper) { |
| | | var UserProType = component.get('v.UserProType'); |
| | | component.find('save_button').set('v.disabled', true); |
| | | var etEng = component.get('v.etEng'); |
| | | var Report_Date__c = component.get('v.data.Report_Date__c'); |
| | |
| | | var Department_Cateogy__c = component.find('select_department').get('v.value'); |
| | | // 经销商人员 DealerPersonnel__c |
| | | var DealerPersonnel__c = component.find('select_DealerPersonnel').get('v.value'); |
| | | // 医院人员 doctor2__c |
| | | // 拜访人 doctor2__c |
| | | var doctor2__c = component.find('select_doctor').get('v.value'); |
| | | // 工作记录会 WorkRecord__c |
| | | // 活动区分会 WorkRecord__c |
| | | var WorkRecord__c = component.find('select_purpose_type').get('v.value'); |
| | | // 效果/进度 EffectProgress__c |
| | | var EffectProgress__c = component.find('select_EffectProgress').get('v.value'); |
| | |
| | | var productCategories__c = component.find('select_productCategories').get('v.value'); |
| | | // 产品用量 warlocksNumber__c |
| | | var warlocksNumber__c = component.find('select_warlocksNumber').get('v.value'); |
| | | // 工作标记 WorkMark__c |
| | | // 支援需求 WorkMark__c |
| | | var WorkMark__c = component.find('select_WorkMark').get('v.checked'); |
| | | var StageName__c = component.find('select_stageName').get('v.value'); |
| | | var Amount__c = component.get('v.oppdata.Amount__c') != null ? component.get('v.oppdata.Amount__c').toString() : ''; |
| | |
| | | } |
| | | // バリデーション |
| | | var error = []; |
| | | if (!Report_Date__c) { error.push("活动日 不存在"); } |
| | | if (!Submit_date__c) { error.push("周 不存在"); } |
| | | //fy start |
| | | // if(WorkRecord__c != 'SIS'&&WorkRecord__c != '科室会'){ |
| | | if(WorkRecord__c == '临床信息(使用量)收集'){ |
| | | if (warlocksNumber__c==''||warlocksNumber__c==""||warlocksNumber__c==undefined) { error.push("产品用量 不能为空"); } |
| | | } |
| | | //fy end |
| | | if(WorkRecord__c == '临床信息(使用量)收集'&&UserProType=='ENG'){ |
| | | if (productCategories__c==''||productCategories__c==""||productCategories__c==undefined) { error.push("其他品牌产品类别 不存在"); } |
| | | } |
| | | if(WorkRecord__c == '临床信息(使用量)收集'){ |
| | | if (ProductCcategory__c==''||ProductCcategory__c==""||ProductCcategory__c==undefined) { error.push("已采用其他品牌 不存在"); } |
| | | } |
| | | if(WorkRecord__c == '临床信息(使用量)收集'){ |
| | | if (WarlockClassification__c==''||WarlockClassification__c==""||WarlockClassification__c==undefined) { error.push("产品1对应术式分类 不存在"); } |
| | | } |
| | | if(WorkRecord__c == '临床信息(使用量)收集'){ |
| | | if (ConsumptionOfConsumables__c==''||ConsumptionOfConsumables__c==""||ConsumptionOfConsumables__c==undefined) { error.push("产品1同类耗材科室月使用量 不能为空"); } |
| | | } |
| | | if(WorkRecord__c != '临床信息(使用量)收集'&&WorkRecord__c != '市场推广类活动'){ |
| | | if (EffectProgress__c==''||EffectProgress__c==""||EffectProgress__c==undefined) { error.push("效果/进度 不存在"); } |
| | | } |
| | | // if(WorkRecord__c != '临床信息(使用量)收集'&&WorkRecord__c != 'QIS处理'){ |
| | | if(WorkRecord__c != '临床信息(使用量)收集'){ |
| | | if (UseProduct1__c==''||UseProduct1__c==""||UseProduct1__c==undefined) { error.push("使用产品1(产品型号) 不存在"); } |
| | | } |
| | | if (ProductClassification__c==''||ProductClassification__c==""||ProductClassification__c==undefined) { error.push("产品分类(第三分类) 不存在"); } |
| | | if(WorkRecord__c == 'SIS'||WorkRecord__c == '科室会'||WorkRecord__c == '院内入院申请'||WorkRecord__c == '收费项目申请'){ |
| | | if (doctor2__c==''||doctor2__c==""||doctor2__c==undefined) { error.push("拜访人 不存在"); } |
| | | } |
| | | if (WorkRecord__c==''||WorkRecord__c==""||WorkRecord__c==undefined) { error.push("活动区分 不存在"); } |
| | | if (DealerPersonnel__c==''||DealerPersonnel__c==""||DealerPersonnel__c==undefined) { error.push("经销商人员 不存在"); } |
| | | if (Department_Cateogy__c==''||Department_Cateogy__c==""||Department_Cateogy__c==undefined) { error.push("科室 不存在"); } |
| | | if (Agency_Hospital__c==''||Agency_Hospital__c==""||Agency_Hospital__c==undefined) { error.push("医院 不存在"); } |
| | | |
| | | |
| | | |
| | | |
| | | if (Report_Date__c==''||Report_Date__c==""||Report_Date__c==undefined) { error.push("活动日 不存在"); } |
| | | if (Submit_date__c==''||Submit_date__c==""||Submit_date__c==undefined) { error.push("周 不存在"); } |
| | | var rDate = new Date(Report_Date__c); |
| | | var sDate = new Date(Submit_date__c); |
| | | sDate.setDate(sDate.getDate() - 1); |
| | | if (rDate < sDate) { error.push('活动日必须是本周!'); } |
| | | sDate.setDate(sDate.getDate() + 7); |
| | | if (rDate >= sDate) { error.push('活动日必须是本周!'); } |
| | | if (!Person_In_Charge2__c) { error.push("担当 不存在"); } |
| | | if (!Agency_Report_Header__c) { this.error("Report Header Id 不存在"); } |
| | | if (!Agency_Hospital__c) { error.push("医院 不存在"); } |
| | | if (!UseProduct1__c) { error.push("使用产品1(产品型号) 不存在"); } |
| | | if (Person_In_Charge2__c==''||Person_In_Charge2__c==""||Person_In_Charge2__c==undefined) { error.push("担当 不存在"); } |
| | | if (Agency_Report_Header__c==''||Agency_Report_Header__c==""||Agency_Report_Header__c==undefined) { this.error("Report Header Id 不存在"); } |
| | | |
| | | |
| | | // if (!UseProduct2__c) { error.push("使用产品2 不存在"); } |
| | | // if (!UseProduct3__c) { error.push("使用产品3 不存在"); } |
| | | if (!Department_Cateogy__c) { error.push("科室 不存在"); } |
| | | if (!DealerPersonnel__c) { error.push("经销商人员 不存在"); } |
| | | if (!doctor2__c) { error.push("医院人员 不存在"); } |
| | | if (!WorkRecord__c) { error.push("工作记录 不存在"); } |
| | | if (!EffectProgress__c) { error.push("效果/进度 不存在"); } |
| | | // if (!OtherBrandConsumables__c) { error.push("术士分类 不存在"); } |
| | | if (ProductCcategory__c==''||ProductCcategory__c==""||ProductCcategory__c==undefined) { error.push("已采用其他品牌 不存在"); } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // if (!productCategories__c) { error.push("其他品牌产品类别 不存在"); } |
| | | if (!ConsumptionOfConsumables__c) { error.push("科室同类耗材月使用量 不能为空"); } |
| | | //fy start |
| | | if(WorkRecord__c != 'SIS'){ |
| | | if (!warlocksNumber__c) { error.push("产品用量 不能为空"); } |
| | | } |
| | | //fy end |
| | | |
| | | for (var i = 0; i < error.length; i++) { |
| | | component.set('v.errorMessage', error[i]); |
| | | this.showErrorToast(component); |
| | |
| | | var hospital_list = component.find('hospital_list'); |
| | | $A.util.removeClass(hospital_list, 'slds-is-open'); |
| | | }, |
| | | hideSearchs: function (component, event, helper) { |
| | | var hospital_list = component.find('hospital_list'); |
| | | $A.util.removeClass(hospital_list, 'slds-is-open'); |
| | | component.set("v.hospital", ''); |
| | | component.set("v.hospitals", ''); |
| | | component.set('v.hospitalLinkId', ''); |
| | | component.set('v.data.Agency_Hospital__c', ''); |
| | | component.set("v.hospitalId", ''); |
| | | }, |
| | | selectHos: function (component, event, helper) { |
| | | debugger |
| | | var hospital_list = component.find('hospital_list'); |
| | | $A.util.removeClass(hospital_list, 'slds-is-open'); |
| | | var accname = event.currentTarget.dataset.accname; |
| | | var accid = event.currentTarget.dataset.accid; |
| | | var hospital_data = component.get('v.hospitalList'); |
| | | var select_purpose_type = component.find('select_purpose_type').get('v.value'); |
| | | for (var i = 0; i < hospital_data.length; i++) { |
| | | if (hospital_data[i].Hospital__c == accid) { |
| | | component.set('v.hospitalLinkId', hospital_data[i].Id); |
| | | component.set('v.data.Agency_Hospital__c', hospital_data[i].Id); |
| | | component.find('new_con').set('v.disabled', false); |
| | | if(select_purpose_type!='科室会'&&hospital_data[i].Hospital__c){ |
| | | component.find('new_con').set('v.disabled', false); |
| | | }else{ |
| | | component.find('new_con').set('v.disabled', true); |
| | | } |
| | | } |
| | | } |
| | | component.set("v.hospitals", accname); |
| | | component.set("v.hospital", accname); |
| | | component.set("v.hospitalId", accid); |
| | | debugger |
| | | component.set('v.setdoctorlisthos', true); |
| | | this.set_doctor_list(component, event, helper); |
| | | }, |
| | | |
| | |
| | | var UseProduct1_List = component.find('UseProduct1_List'); |
| | | $A.util.removeClass(UseProduct1_List, 'slds-is-open'); |
| | | }, |
| | | hideSearchUseProduct1s: function (component, event, helper) { |
| | | var UseProduct1_List = component.find('UseProduct1_List'); |
| | | $A.util.removeClass(UseProduct1_List, 'slds-is-open'); |
| | | component.set("v.UseProduct1", ''); |
| | | component.set("v.UseProduct1s", ''); |
| | | component.set('v.UseProduct1Id', ''); |
| | | component.set('v.data.UseProduct1__c', ''); |
| | | }, |
| | | seletUseProduct1Change: function (component, event, helper) { |
| | | debugger |
| | | var UseProduct1_List = component.find('UseProduct1_List'); |
| | | $A.util.removeClass(UseProduct1_List, 'slds-is-open'); |
| | | var accname = event.currentTarget.dataset.accname; |
| | |
| | | component.set('v.data.UseProduct1__c', UseProduct1ListDate[i].Id); |
| | | } |
| | | } |
| | | var UseProduct2_TEXT = component.find('UseProduct1_TEXT').get('v.value'); |
| | | var UseProduct2_TEXT = component.find('UseProduct2_TEXT').get('v.value'); |
| | | var UseProduct3_TEXT = component.find('UseProduct3_TEXT').get('v.value'); |
| | | if(UseProduct2_TEXT != accname && UseProduct3_TEXT != accname){ |
| | | component.set("v.UseProduct1s", accname); |
| | | component.set("v.UseProduct1", accname); |
| | | }else{ |
| | | component.set('v.errorMessage', '不能选择同样的产品'); |
| | |
| | | var UseProduct2_List = component.find('UseProduct2_List'); |
| | | $A.util.removeClass(UseProduct2_List, 'slds-is-open'); |
| | | }, |
| | | hideSearchUseProduct2s: function (component, event, helper) { |
| | | var UseProduct2_List = component.find('UseProduct2_List'); |
| | | $A.util.removeClass(UseProduct2_List, 'slds-is-open'); |
| | | component.set("v.UseProduct2", ''); |
| | | component.set("v.UseProduct2s", ''); |
| | | component.set('v.UseProduct2Id', ''); |
| | | component.set('v.data.UseProduct2__c', ''); |
| | | }, |
| | | seletUseProduct2Change: function (component, event, helper) { |
| | | var UseProduct2_List = component.find('UseProduct2_List'); |
| | | $A.util.removeClass(UseProduct2_List, 'slds-is-open'); |
| | |
| | | var UseProduct1_TEXT = component.find('UseProduct1_TEXT').get('v.value'); |
| | | var UseProduct3_TEXT = component.find('UseProduct3_TEXT').get('v.value'); |
| | | if(UseProduct1_TEXT != accname && UseProduct3_TEXT != accname){ |
| | | component.set("v.UseProduct2s", accname); |
| | | component.set("v.UseProduct2", accname); |
| | | }else{ |
| | | component.set('v.errorMessage', '不能选择同样的产品'); |
| | |
| | | var UseProduct3_List = component.find('UseProduct3_List'); |
| | | $A.util.removeClass(UseProduct3_List, 'slds-is-open'); |
| | | }, |
| | | hideSearchUseProduct3s: function (component, event, helper) { |
| | | var UseProduct3_List = component.find('UseProduct3_List'); |
| | | $A.util.removeClass(UseProduct3_List, 'slds-is-open'); |
| | | component.set("v.UseProduct3", ''); |
| | | component.set("v.UseProduct3s", ''); |
| | | component.set('v.UseProduct3Id', ''); |
| | | component.set('v.data.UseProduct3__c', ''); |
| | | }, |
| | | seletUseProduct3Change: function (component, event, helper) { |
| | | var UseProduct3_List = component.find('UseProduct3_List'); |
| | | $A.util.removeClass(UseProduct3_List, 'slds-is-open'); |
| | |
| | | var UseProduct1_TEXT = component.find('UseProduct1_TEXT').get('v.value'); |
| | | var UseProduct2_TEXT = component.find('UseProduct2_TEXT').get('v.value'); |
| | | if(UseProduct1_TEXT != accname && UseProduct2_TEXT != accname ){ |
| | | component.set("v.UseProduct3s", accname); |
| | | component.set("v.UseProduct3", accname); |
| | | }else{ |
| | | component.set('v.errorMessage', '不能选择同样的产品'); |
| | |
| | | } |
| | | |
| | | }, |
| | | //hospitalLinkId 经销商医院的ID 医院人员复制的地方 |
| | | //hospitalLinkId 经销商医院的ID 拜访人复制的地方 |
| | | doctor_change: function (component, event, helper) { |
| | | debugger |
| | | var doctorurpose = component.find('select_purpose_type').get('v.value'); |
| | | var doctor_value = component.find('select_doctor').get('v.value'); |
| | | var doctor_list = component.get('v.doctor_list'); |
| | | var flg = false; |
| | | for (var i = 0; i < doctor_list.length; i++) { |
| | | if (doctor_list[i].value == doctor_value) { |
| | | component.set('v.doctor_title', doctor_list[i].Doctor_Division1__c); |
| | | flg = true; |
| | | break; |
| | | if(doctor_list){ |
| | | for (var i = 0; i < doctor_list.length; i++) { |
| | | if (doctor_list[i].value == doctor_value) { |
| | | if(doctorurpose == '科室会'){ |
| | | // component.set('v.doctor_title', doctor_list[i].Doctor_Division1__c); |
| | | }else{ |
| | | component.set('v.doctor_title', doctor_list[i].Doctor_Division1__c); |
| | | } |
| | | flg = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if (flg == false) { |
| | | component.set('v.doctor_title', ''); |
| | | } |
| | | }, |
| | | //SWAG-CF58C3 fy start 调用pi |
| | | set_aws_url : function(component,sobject) { |
| | | var action = component.get('c.getAwsurl'); |
| | | action.setParams({ |
| | | "sobj" : sobject, |
| | | }); |
| | | action.setCallback(this,function(response){ |
| | | var state = response.getState(); |
| | | if(state == 'SUCCESS'){ |
| | | var awsmap = this.conv_selected(response.getReturnValue()); |
| | | component.set('v.AWStoken',awsmap.token); |
| | | component.set('v.AWSinsert',awsmap.newUrl); |
| | | component.set('v.AWSsearch',awsmap.searchUrl); |
| | | component.set('v.AWStransactionURL',awsmap.transactionURL); |
| | | } |
| | | else{ |
| | | component.set('v.errorMessage', 'AWS url/token error.'); |
| | | this.showErrorToast(component); |
| | | component.set('v.login',false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | }, |
| | | |
| | | insert_agencycontact : function(component,token,newUrl,payload,agencyHospitalid,helper) { |
| | | fetch(newUrl, { |
| | | method: 'POST', |
| | | body: payload, |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | 'pi-token': token |
| | | } |
| | | }).then((data) => { |
| | | return data.json(); |
| | | }).then((result) => { |
| | | if(result.status == '0'){ |
| | | $A.getCallback(function(){ |
| | | helper.to_agencycontact(component,result,agencyHospitalid); |
| | | })(); |
| | | }else{ |
| | | console.log('AWS status error:' + result) |
| | | component.set('v.login',false); |
| | | component.find('OppMessage').setError('AWS insert error.'); |
| | | } |
| | | }).catch(error => { |
| | | console.log('AWS insert error:' + error) |
| | | component.set('v.login',false); |
| | | component.find('OppMessage').setError('AWS insert error.'); |
| | | }); |
| | | |
| | | }, |
| | | |
| | | to_agencycontact : function(component,result,agencyHospitalid) { |
| | | var action = component.get('c.saveAgencyContact'); |
| | | action.setParams({ |
| | | "name" : result.object[0].name, |
| | | "nameEncrypt" : result.object[0].nameEncrypt, |
| | | "type" : result.object[0].type, |
| | | "typeEncrypt" : result.object[0].typeEncrypt, |
| | | "doctorDivision1" : result.object[0].doctorDivision1, |
| | | "doctorDivision1Encrypt" : result.object[0].doctorDivision1Encrypt, |
| | | "agencyHospitalid" : agencyHospitalid, |
| | | "awsid" : result.object[0].dataId, |
| | | }); |
| | | action.setCallback(this,function(response){ |
| | | var state = response.getState(); |
| | | if(state == 'SUCCESS'){ |
| | | var acMap = this.conv_selected(response.getReturnValue()); |
| | | console.log(acMap); |
| | | if(acMap.AgencyContactId != ''){ |
| | | //确认事务 |
| | | var token = component.get('v.AWStoken'); |
| | | var confirmUrl = component.get('v.AWStransactionURL'); |
| | | |
| | | let data = Object.create(null); |
| | | data['isSuccess'] = 1; |
| | | data['sfRecordId'] = ''; |
| | | data['txId'] = result.txId; |
| | | |
| | | this.to_confirm(component,token,confirmUrl,JSON.stringify(data)); |
| | | }else if(acMap.errormsg != ''){ |
| | | component.set('v.errorMessage', acMap.errormsg); |
| | | this.showErrorToast(component); |
| | | component.set('v.login',false); |
| | | }else { |
| | | component.set('v.errorMessage', 'agency contact insert id error.'); |
| | | this.showErrorToast(component); |
| | | component.set('v.login',false); |
| | | } |
| | | } |
| | | else{ |
| | | component.set('v.errorMessage', 'agency contact insert error.'); |
| | | this.showErrorToast(component); |
| | | component.set('v.login',false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | }, |
| | | |
| | | to_confirm : function(component,token,confirmUrl,payload,event) { |
| | | fetch(confirmUrl, { |
| | | method: 'POST', |
| | | body: payload, |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | 'pi-token': token |
| | | } |
| | | }).then((data) => { |
| | | return data.json(); |
| | | }).then((result) => { |
| | | if(result.status == '0' && result.hasOwnProperty('success') && result.success){ |
| | | // component.set('v.truthy', false); |
| | | // var modal_newAC = component.find('modal_newAC') |
| | | // $A.util.addClass(modal_newAC, 'disp_none'); |
| | | // this.success('.客户人员已创建。'); |
| | | // this.set_doctor_list(component); |
| | | |
| | | component.set('v.truthy', false); |
| | | var modal_newAC = component.find('modal_newAC') |
| | | $A.util.addClass(modal_newAC, 'disp_none'); |
| | | component.set('v.successMessage', '.拜访人已创建。'); |
| | | this.showSuccessToast(component); |
| | | this.set_doctor_list(component); |
| | | }else { |
| | | component.set('v.errorMessage', 'AWS confirm error.'); |
| | | this.showErrorToast(component); |
| | | component.set('v.login',false); |
| | | } |
| | | }).catch(error => { |
| | | component.set('v.errorMessage', 'AWS confirm error.'); |
| | | this.showErrorToast(component); |
| | | component.set('v.login',false); |
| | | }); |
| | | }, |
| | | //SWAG-CF58C3 fy end 调用pi |
| | | |
| | | set_doctor_list: function (component) { |
| | | var doctor_value = component.find('select_purpose_type').get('v.value'); |
| | | var hospital_id = component.get('v.hospitalLinkId'); |
| | | if (hospital_id) { |
| | | component.set('v.login', true); |
| | | var action = component.get('c.getDoctorList'); |
| | | action.setParams({ |
| | | "hospital_id": hospital_id, |
| | | }); |
| | | action.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state == 'SUCCESS') { |
| | | var res = this.conv_selected(response.getReturnValue()); |
| | | var default_doctor = component.get('v.default_select_doctor_id'); |
| | | if (default_doctor != '' && res.length > 0) { |
| | | var doctor_title = ''; |
| | | let awsids = []; |
| | | for (var i = 0; i < res.length; i++) { |
| | | if (res[i].value == default_doctor) { |
| | | res[i].selected = true; |
| | | doctor_title = res[i].Doctor_Division1__c; |
| | | } else { |
| | | res[i].selected = false; |
| | | } |
| | | if(res[i].AWS_Data_Id__c){ |
| | | awsids.push(res[i].AWS_Data_Id__c); |
| | | } |
| | | if(doctor_value == '科室会'){ |
| | | component.set('v.login', true); |
| | | this.set_doctor_list2(component); |
| | | }else{ |
| | | component.set('v.login', true); |
| | | var action = component.get('c.getDoctorList'); |
| | | action.setParams({ |
| | | "hospital_id": hospital_id, |
| | | }); |
| | | action.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state == 'SUCCESS') { |
| | | debugger; |
| | | var res = this.conv_selected(response.getReturnValue()); |
| | | //fy |
| | | var setdoctorlisthos = component.get('v.setdoctorlisthos'); |
| | | if(setdoctorlisthos){ |
| | | component.set('v.default_select_doctor_id', ''); |
| | | component.set('v.setdoctorlisthos', false); |
| | | } |
| | | component.find('select_doctor').set('v.options', res); |
| | | component.set('v.doctor_title', doctor_title); |
| | | |
| | | if(awsids.length > 0){ |
| | | let PIConfig = component.get('v.PIConfig'); |
| | | let staticResourceAgencyContact = JSON.parse(PIConfig.staticResourceAgencyContact); |
| | | AWSService.search(staticResourceAgencyContact.searchUrl,{ |
| | | dataIds:awsids |
| | | }, function(data){ |
| | | if(data && data.object && data.object.length){ |
| | | let m = {}; |
| | | for(let di in data.object){ |
| | | if(data.object[di] && data.object[di].dataId){ |
| | | m[data.object[di].dataId] = data.object[di]; |
| | | //fy |
| | | var default_doctor = component.get('v.default_select_doctor_id'); |
| | | if (default_doctor != '' && res.length > 0) { |
| | | var doctor_title = ''; |
| | | let awsids = []; |
| | | for (var i = 0; i < res.length; i++) { |
| | | if (res[i].value == default_doctor) { |
| | | res[i].selected = true; |
| | | doctor_title = res[i].Doctor_Division1__c; |
| | | } else { |
| | | res[i].selected = false; |
| | | } |
| | | if(res[i].AWS_Data_Id__c){ |
| | | awsids.push(res[i].AWS_Data_Id__c); |
| | | } |
| | | } |
| | | component.find('select_doctor').set('v.options', res); |
| | | component.set('v.doctor_title', doctor_title); |
| | | |
| | | if(awsids.length > 0){ |
| | | let PIConfig = component.get('v.PIConfig'); |
| | | let staticResourceAgencyContact = JSON.parse(PIConfig.staticResourceAgencyContact); |
| | | AWSService.search(staticResourceAgencyContact.searchUrl,{ |
| | | dataIds:awsids |
| | | }, function(data){ |
| | | if(data && data.object && data.object.length){ |
| | | let m = {}; |
| | | for(let di in data.object){ |
| | | if(data.object[di] && data.object[di].dataId){ |
| | | m[data.object[di].dataId] = data.object[di]; |
| | | } |
| | | } |
| | | |
| | | for(let ri in res){ |
| | | if(res[ri] && res[ri].AWS_Data_Id__c && m.hasOwnProperty(res[ri].AWS_Data_Id__c)){ |
| | | res[ri].label = m[res[ri].AWS_Data_Id__c].name; |
| | | } |
| | | } |
| | | component.find('select_doctor').set('v.options', res); |
| | | } |
| | | |
| | | for(let ri in res){ |
| | | if(res[ri] && res[ri].AWS_Data_Id__c && m.hasOwnProperty(res[ri].AWS_Data_Id__c)){ |
| | | res[ri].label = m[res[ri].AWS_Data_Id__c].name; |
| | | } |
| | | } |
| | | component.find('select_doctor').set('v.options', res); |
| | | component.set('v.login', false); |
| | | }, staticResourceAgencyContact.token); |
| | | } |
| | | } else { |
| | | let awsids = []; |
| | | for (var i = 0; i < res.length; i++) { |
| | | if(res[i].AWS_Data_Id__c){ |
| | | awsids.push(res[i].AWS_Data_Id__c); |
| | | } |
| | | |
| | | component.set('v.login', false); |
| | | }, staticResourceAgencyContact.token); |
| | | } |
| | | component.find('select_doctor').set('v.options', res); |
| | | if(awsids.length > 0){ |
| | | let PIConfig = component.get('v.PIConfig'); |
| | | let staticResourceAgencyContact = JSON.parse(PIConfig.staticResourceAgencyContact); |
| | | AWSService.search(staticResourceAgencyContact.searchUrl,{ |
| | | dataIds:awsids |
| | | }, function(data){ |
| | | if(data && data.object && data.object.length){ |
| | | let m = {}; |
| | | for(let di in data.object){ |
| | | if(data.object[di] && data.object[di].dataId){ |
| | | m[data.object[di].dataId] = data.object[di]; |
| | | } |
| | | } |
| | | |
| | | for(let ri in res){ |
| | | if(res[ri] && res[ri].AWS_Data_Id__c && m.hasOwnProperty(res[ri].AWS_Data_Id__c)){ |
| | | res[ri].label = m[res[ri].AWS_Data_Id__c].name; |
| | | } |
| | | } |
| | | component.find('select_doctor').set('v.options', res); |
| | | } |
| | | |
| | | component.set('v.login', false); |
| | | }, staticResourceAgencyContact.token); |
| | | } |
| | | // component.find('select_doctor').set('v.options', res); |
| | | if (res.length > 0) { |
| | | component.set('v.doctor_title', res[0].Doctor_Division1__c); |
| | | } |
| | | } |
| | | } else { |
| | | component.find('select_doctor').set('v.options', res); |
| | | if (res.length > 0) { |
| | | component.set('v.doctor_title', res[0].Doctor_Division1__c); |
| | | // component.set('v.default_select_doctor_id', ''); |
| | | debugger |
| | | component.set('v.doctor_list', res); |
| | | component.set('v.login', false); |
| | | } |
| | | else { |
| | | component.set('v.errorMessage', 'set_doctor_list failed.'); |
| | | this.showErrorToast(component); |
| | | component.set('v.login', false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | } |
| | | |
| | | }else{ |
| | | if(doctor_value == '科室会'){ |
| | | this.set_doctor_list2(component); |
| | | }else{ |
| | | component.find('select_doctor').set('v.options', ''); |
| | | } |
| | | } |
| | | },//fy 20220414 |
| | | set_doctor_list2:function (component) { |
| | | var action1 = component.get('c.selectdoctor3c'); |
| | | action1.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state == 'SUCCESS') { |
| | | var res = response.getReturnValue(); |
| | | debugger |
| | | for (var i = 0; i < res.length; i++) { |
| | | if (res[i].selected == 'true') { |
| | | res[i].selected = true; |
| | | } else { |
| | | res[i].selected = false; |
| | | } |
| | | } |
| | | component.set('v.default_select_doctor_id', ''); |
| | | component.set('v.doctor_list', res); |
| | | component.set('v.login', false); |
| | | } |
| | | else { |
| | | component.set('v.errorMessage', 'set_doctor_list failed.'); |
| | | this.showErrorToast(component); |
| | | debugger |
| | | component.find('select_doctor').set('v.options', res); |
| | | var doctor3value = component.get('v.default_select_doctor_id2'); |
| | | this.set_selected(component, 'select_doctor', doctor3value); |
| | | component.set('v.login', false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | } |
| | | $A.enqueueAction(action1); |
| | | }, |
| | | productcategoryChange1: function (component, event, helper) { |
| | | var product_category_id = component.find('select_Product1').get('v.value'); |
| | |
| | | return obj; |
| | | }, |
| | | set_selected: function (component, aura_id_name, value) { |
| | | debugger; |
| | | var select_tmp = component.find(aura_id_name).get('v.options'); |
| | | if (select_tmp) { |
| | | for (var i = 0; i < select_tmp.length; i++) { |
| | |
| | | 3000 |
| | | ); |
| | | }, |
| | | //弹出 错误提示 |
| | | showErrorToast01: function (component) { |
| | | debugger |
| | | $A.util.removeClass(component.find('errorDiv01'), 'slds-hide'); |
| | | window.setTimeout($A.getCallback(function () { |
| | | $A.util.addClass(component.find('errorDiv01'), 'slds-hide'); |
| | | }), |
| | | 6000 |
| | | ); |
| | | }, |
| | | error: function (message) { |
| | | var toastEvent = $A.get("e.force:showToast"); |
| | | toastEvent.setParams({ |
| | |
| | | component.set('v.truthy', false); |
| | | var modal_newAC = component.find('modal_newAC') |
| | | $A.util.addClass(modal_newAC, 'disp_none'); |
| | | component.set('v.successMessage', '.医院人员已创建。'); |
| | | component.set('v.successMessage', '.拜访人已创建。'); |
| | | this.showSuccessToast(component); |
| | | this.set_doctor_list(component, event, helper); |
| | | }, |
| | |
| | | component.set('v.truthy', false); |
| | | var modal_newAC = component.find('modal_newAC') |
| | | $A.util.addClass(modal_newAC, 'disp_none'); |
| | | component.find('OppMessage').setError(''); |
| | | }, |
| | | //科室赋值 |
| | | setOpportunity_cfilter: function (component) { |
| | |
| | | if (opportunity_cfilter != '' && opportunity_cfilter != null) { |
| | | opportunity_cfilter += ' AND '; |
| | | } |
| | | // fy Department_Cateogy_text__c |
| | | opportunity_cfilter += 'Department_Cateogy__c=' + '\'' + Department_Cateogy__c + '\''; |
| | | // opportunity_cfilter += 'Department_Cateogy_text__c=' + '\'' + Department_Cateogy__c + '\''; |
| | | } |
| | | component.set('v.opportunity_cfilter', opportunity_cfilter); |
| | | }, |
| | |
| | | }; |
| | | reader.readAsDataURL(file); |
| | | }, |
| | | |
| | | // fy 调用pi改造的 获取url 和 token的方法 |
| | | search_contact_url : function(component, sobject, callback) { |
| | | var action = component.get("c.getAwsurl"); |
| | | action.setParams({ |
| | | sobj : sobject |
| | | }); |
| | | action.setCallback(this,function(response){ |
| | | var state = response.getState(); |
| | | if(state == 'SUCCESS'){ |
| | | var result = response.getReturnValue(); |
| | | if(callback)callback(result); |
| | | } |
| | | else{ |
| | | component.set('v.errorMessage', 'AWS url/token error.'); |
| | | this.showErrorToast01(component); |
| | | component.set('v.login',false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | }, |
| | | // fy 调用pi改造的 获取.客户人员的方法 |
| | | search_core : function(token,searchUrl,payload,callback,component) { |
| | | fetch(searchUrl, { |
| | | method: 'POST', |
| | | body: payload, |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | 'pi-token': token |
| | | } |
| | | }).then((data) => { |
| | | return data.json(); |
| | | }).then((result) => { |
| | | component.set('v.login',false); |
| | | if(callback)callback(result); |
| | | }).catch(error => { |
| | | component.set('v.errorMessage', 'AWS search error.'); |
| | | this.showErrorToast01(component); |
| | | component.set('v.login',false); |
| | | }); |
| | | }, |
| | | saveRecords: function (component, event, helper) { |
| | | component.set('v.login', true); |
| | | //fy 导入 202200506 start |
| | | var action1 = component.get("c.processDataAWSId"); |
| | | action1.setParams({ |
| | | fileData : component.get("v.fileContentData"), |
| | | }); |
| | | action1.setCallback(this, function(response) { |
| | | var state = response.getState(); |
| | | if (state === "SUCCESS") { |
| | | debugger |
| | | var ress = response.getReturnValue(); |
| | | if(ress){ |
| | | var valur =ress.split('error1'); |
| | | if(valur.length<=1){ |
| | | var res = JSON.parse(response.getReturnValue()); |
| | | debugger |
| | | var dataArr = new Array(); |
| | | var dataMap = new Map(); |
| | | res.forEach(item => { |
| | | if(item.AWS_Data_Id__c){ |
| | | dataArr.push(item.AWS_Data_Id__c); |
| | | dataMap.set(item.AWS_Data_Id__c,item.Name_Encrypted__c); |
| | | } |
| | | }); |
| | | debugger |
| | | let obj= Object.create(null); |
| | | obj['dataIds'] = dataArr; |
| | | var payload = JSON.stringify(obj); |
| | | this.search_contact_url(component, 'Agency_Contact__c', (result)=>{ |
| | | var token = result.token; |
| | | var searchUrl = result.searchUrl; |
| | | this.search_core(token,searchUrl,payload,(result)=>{ |
| | | if(result.status == '0'){ |
| | | if(result.object != null&&result.object.length != 0){ |
| | | component.set('v.login',true); |
| | | this.saveRecordsEditFile(component,dataMap,result.object,helper); |
| | | }else{ |
| | | component.set('v.errorMessage', 'AWS search status '); |
| | | this.showErrorToast01(component); |
| | | component.set('v.login',false); |
| | | } |
| | | }else{ |
| | | component.set('v.errorMessage', 'AWS search status : ' + result.status); |
| | | this.showErrorToast01(component); |
| | | component.set('v.login',false); |
| | | } |
| | | },component); |
| | | }); |
| | | }else{ |
| | | component.set('v.errorMessage', valur[1]+'\n'+"请修改后重新上传"); |
| | | this.showErrorToast01(component); |
| | | component.set('v.login',false); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | $A.enqueueAction(action1); |
| | | // var action = component.get("c.processData"); |
| | | // var fieldsList = ['Name', 'Phone', 'AccountNumber']; //Please write your code dynamic fields |
| | | // var filedata =component.get("v.fileContentData"); |
| | | // action.setParams({ |
| | | // fileData: filedata, |
| | | // sobjectName: 'Account', //Any object |
| | | // fields: fieldsList |
| | | // }); |
| | | // action.setCallback(this, function (response) { |
| | | // var state = response.getState(); |
| | | // if (state === "SUCCESS") { |
| | | // var res = response.getReturnValue(); |
| | | // var res1 = ''; |
| | | // if (res != 'success') { |
| | | // var ress = res.split('='); |
| | | // console.log(ress); |
| | | // for (var i = 0; i < ress.length; i++) { |
| | | // res1 += ress[i].substr(7) + '\n'; |
| | | // } |
| | | // console.log("==" + res1); |
| | | // component.set('v.errorMessage', res1 + "请修改后重新上传"); |
| | | // this.showErrorToast01(component); |
| | | // component.set('v.login', false); |
| | | // } else { |
| | | // component.set('v.successMessage', '导入成功'); |
| | | // this.showSuccessToast01(component); |
| | | // component.set("v.showMain", true); |
| | | // component.set('v.login', false); |
| | | // this.doinit(component, event, helper); |
| | | // } |
| | | // } |
| | | // else if (state === "INCOMPLETE") { |
| | | // component.set('v.login', false); |
| | | // } |
| | | // else if (state === "ERROR") { |
| | | // var errors = response.getError(); |
| | | // if (errors) { |
| | | // if (errors[0] && errors[0].message) { |
| | | // console.log("Error message: " + |
| | | // errors[0].message); |
| | | // component.set('v.login', false); |
| | | // } |
| | | // } else { |
| | | // console.log("Unknown error"); |
| | | // component.set('v.login', false); |
| | | // } |
| | | // } |
| | | // }); |
| | | // $A.enqueueAction(action); |
| | | |
| | | }, |
| | | saveRecordsEditFile : function(component,dataMap,searchData,helper){ |
| | | var searchDataMap = new Map(); |
| | | for (var i = 0; i < searchData.length; i++) { |
| | | var sd = searchData[i]; |
| | | searchDataMap.set(sd.name.replace(' ',''),sd.dataId); |
| | | } |
| | | console.log('searchDataMap='+searchDataMap); |
| | | var error = ''; |
| | | var fileData = component.get("v.fileContentData"); |
| | | fileData=this.ToCDB(fileData);//全角转半角 |
| | | var files = fileData.split('\n'); |
| | | |
| | | var fileStr = files[0]; |
| | | fileStr += '\n'; |
| | | |
| | | for (var i = 1; i < files.length-1; i++) { |
| | | if(files[i]){ |
| | | var filelist = files[i].split(','); |
| | | var fileName = filelist[5]; |
| | | var WorkRecord = filelist[4]; |
| | | if(WorkRecord == 'SIS'||WorkRecord == '院内入院申请'||WorkRecord == '收费项目申请'||WorkRecord == '科室会'){ |
| | | if(fileName){ |
| | | if(WorkRecord != '科室会'){ |
| | | if (searchDataMap.get(fileName.replace(' ',''))) { |
| | | var nameDataId = searchDataMap.get(fileName.replace(' ','')); |
| | | if (dataMap.get(nameDataId)) { |
| | | filelist[5] = dataMap.get(nameDataId); |
| | | }else { |
| | | error += 'error1 第'+i+'行数据拜访人SF不存在'; |
| | | } |
| | | }else { |
| | | error += 'error1 第'+i+'行数据拜访人AWS不存在'; |
| | | } |
| | | }else{ |
| | | if(filelist[5]!='医生'&&filelist[5]!='医生+护士'){//&&filelist[5]!='医生+护士' |
| | | error += 'error1 第'+i+'行数据拜访人不存在'; |
| | | } |
| | | } |
| | | }else{ |
| | | error += 'error1 第'+i+'行数据拜访人不能为空'; |
| | | } |
| | | }else{ |
| | | if(fileName){ |
| | | if(WorkRecord != '科室会'){ |
| | | if (searchDataMap.get(fileName.replace(' ',''))) { |
| | | var nameDataId = searchDataMap.get(fileName.replace(' ','')); |
| | | if (dataMap.get(nameDataId)) { |
| | | filelist[5] = dataMap.get(nameDataId); |
| | | }else { |
| | | error += 'error1 第'+i+'行数据拜访人SF不存在'; |
| | | } |
| | | }else { |
| | | error += 'error1 第'+i+'行数据拜访人AWS不存在'; |
| | | } |
| | | }else{ |
| | | if(filelist[5]!='医生'&&filelist[5]!='医生+护士'){//&&filelist[5]!='医生+护士' |
| | | error += 'error1 第'+i+'行数据拜访人不存在'; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | fileStr += filelist.toString(); |
| | | fileStr += '\n'; |
| | | } |
| | | } |
| | | |
| | | if (error != '') { |
| | | component.set('v.errorMessage', error); |
| | | this.showErrorToast01(component); |
| | | console.log('error='+error); |
| | | component.set('v.login',false); |
| | | return; |
| | | } |
| | | |
| | | console.log('fileStr='+fileStr); |
| | | $A.getCallback(function(){ |
| | | debugger |
| | | helper.ImportMethod(component,fileStr,helper); |
| | | })(); |
| | | |
| | | },ImportMethod : function(component,fileStr,helper){ |
| | | var action = component.get("c.processData"); |
| | | var fieldsList = ['Name', 'Phone', 'AccountNumber']; //Please write your code dynamic fields |
| | | // var filedata =component.get("v.fileContentData"); |
| | | action.setParams({ |
| | | fileData: component.get("v.fileContentData"), |
| | | fileData: fileStr, |
| | | sobjectName: 'Account', //Any object |
| | | fields: fieldsList |
| | | }); |
| | |
| | | } |
| | | console.log("==" + res1); |
| | | component.set('v.errorMessage', res1 + "请修改后重新上传"); |
| | | this.showErrorToast(component); |
| | | this.showErrorToast01(component); |
| | | component.set('v.login', false); |
| | | } else { |
| | | component.set('v.successMessage', '导入成功'); |
| | |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | |
| | | },//全角转半角 |
| | | ToCDB: function (str) { |
| | | var tmp = ""; |
| | | for (var i = 0; i < str.length; i++) { |
| | | if (str.charCodeAt(i) > 65248 && str.charCodeAt(i) < 65375) { |
| | | tmp += String.fromCharCode(str.charCodeAt(i) - 65248); |
| | | } |
| | | else { |
| | | tmp += String.fromCharCode(str.charCodeAt(i)); |
| | | } |
| | | } |
| | | return tmp |
| | | }, |
| | | //导出的CSV文件 |
| | | convertArrayOfObjectsToCSV: function (component, objectRecords) { |
| | |
| | | } |
| | | columnDivider = ','; |
| | | lineDivider = '\n'; |
| | | keys = ['Submit_date__c', 'Person_In_Charge2__c', 'Report_Date__c', 'Agency_Hospital__c','Department_Cateogy__c','DealerPersonnel__c','WorkRecord__c','doctor2__c','ProductClassification__c','UseProduct1__c', 'UseProduct2__c','UseProduct3__c', 'EffectProgress__c','ConsumptionOfConsumables__c', 'WarlockClassification__c', 'ProductCcategory__c', 'productCategories__c','warlocksNumber__c','WorkMark__c']; |
| | | thkeys = ['周', '担当', '活动日', '医院', '科室', '经销商人员', '工作记录', '医院人员','产品分类(第三分类)', '使用产品1(产品型号)', '使用产品2','使用产品3','效果/进度','科室同类耗材月使用量','术士分类','已采用其他品牌','其他品牌产品类别','产品用量','工作标记'] |
| | | keys = [ 'Report_Date__c', 'Agency_Hospital__c','Department_Cateogy_text__c','DealerPersonnel__c','WorkRecord__c','doctor2__c','ProductClassification__c','UseProduct1__c', 'UseProduct2__c','UseProduct3__c', 'EffectProgress__c','ConsumptionOfConsumables__c', 'WarlockClassification__c', 'ProductCcategory__c', 'productCategories__c','warlocksNumber__c','WorkMark__c']; |
| | | thkeys = ['活动日', '医院', '科室', '经销商人员', '活动区分', '拜访人','产品分类(第三分类)', '使用产品1(产品型号)', '使用产品2','使用产品3','效果/进度','产品1同类耗材科室月使用量','产品1对应术式分类','已采用其他品牌','其他品牌产品类别','产品用量','支援需求'] |
| | | csvStringResult = ''; |
| | | csvStringResult += thkeys.join(columnDivider); |
| | | csvStringResult += lineDivider; |
| | |
| | | } else if (skey == 'doctor2__c') { |
| | | csvStringResult += objectRecords[i].doctor2__r.Name; |
| | | } else if (skey == 'UseProduct1__c') { |
| | | csvStringResult += objectRecords[i].UseProduct1__r.Name; |
| | | csvStringResult += objectRecords[i].UseProduct1__r.Asset_Model_No__c; |
| | | } else if (skey == 'UseProduct2__c') { |
| | | csvStringResult += objectRecords[i].UseProduct2__r.Name; |
| | | csvStringResult += objectRecords[i].UseProduct2__r.Asset_Model_No__c; |
| | | } else if (skey == 'UseProduct3__c') { |
| | | csvStringResult += objectRecords[i].UseProduct3__r.Name; |
| | | csvStringResult += objectRecords[i].UseProduct3__r.Asset_Model_No__c; |
| | | }else{ |
| | | csvStringResult += objectRecords[i][skey] ; |
| | | } |
| | |
| | | // 导出页面显示的模板 |
| | | showExportDate: function (component, objectRecords) { |
| | | console.log('进入showexceportdate' + objectRecords); |
| | | var keys = ['Submit_date__c', 'Person_In_Charge2__c', 'Report_Date__c', 'Agency_Hospital__c','Department_Cateogy__c','DealerPersonnel__c','WorkRecord__c','doctor2__c','ProductClassification__c','UseProduct1__c', 'UseProduct2__c','UseProduct3__c', 'EffectProgress__c','ConsumptionOfConsumables__c', 'WarlockClassification__c', 'ProductCcategory__c','productCategories__c', 'warlocksNumber__c','WorkMark__c']; |
| | | var headers = ['周', '担当', '活动日', '医院', '科室', '经销商人员', '工作记录', '医院人员','产品分类(第三分类)', '使用产品1(产品型号)', '使用产品2','使用产品3','效果/进度','科室同类耗材月使用量','术士分类','已采用其他品牌','其他品牌产品类别','产品用量','工作标记'] |
| | | var keys = ['Report_Date__c', 'Agency_Hospital__c','Department_Cateogy_text__c','DealerPersonnel__c','WorkRecord__c','doctor2__c','ProductClassification__c','UseProduct1__c', 'UseProduct2__c','UseProduct3__c', 'EffectProgress__c','ConsumptionOfConsumables__c', 'WarlockClassification__c', 'ProductCcategory__c','productCategories__c', 'warlocksNumber__c','WorkMark__c']; |
| | | var headers = ['活动日', '医院', '科室', '经销商人员', '活动区分', '拜访人','产品分类(第三分类)', '使用产品1(产品型号)', '使用产品2','使用产品3','效果/进度','产品1同类耗材科室月使用量','产品1对应术式分类','已采用其他品牌','其他品牌产品类别','产品用量','支援需求'] |
| | | var content = "<table class=\"table slds-table slds-table--bordered slds-table--cell-buffer\">"; |
| | | content += "<thead><tr class=\"slds-text-title--caps\">"; |
| | | for (i = 0; i < headers.length; i++) { |
| | |
| | | } else if (skey == 'doctor2__c') { |
| | | content += '<td>' + objectRecords[i].doctor2__r.Name + '</td>'; |
| | | } else if (skey == 'UseProduct1__c') { |
| | | content += '<td>' + objectRecords[i].UseProduct1__r.Name + '</td>'; |
| | | content += '<td>' + objectRecords[i].UseProduct1__r.Asset_Model_No__c + '</td>'; |
| | | } else if (skey == 'UseProduct2__c') { |
| | | content += '<td>' + objectRecords[i].UseProduct2__r.Name + '</td>'; |
| | | content += '<td>' + objectRecords[i].UseProduct2__r.Asset_Model_No__c + '</td>'; |
| | | } else if (skey == 'UseProduct3__c') { |
| | | content += '<td>' + objectRecords[i].UseProduct3__r.Name + '</td>'; |
| | | content += '<td>' + objectRecords[i].UseProduct3__r.Asset_Model_No__c + '</td>'; |
| | | }else{ |
| | | content += '<td>' + objectRecords[i][skey] + '</td>'; |
| | | } |
| | |
| | | if(sc.replace(/\D/gi,"")){ |
| | | component.set("v.select_ConsumptionOfConsumables",sc); |
| | | }else{ |
| | | component.set('v.errorMessage', '必须输入数字!'); |
| | | component.set('v.errorMessage', '产品1同类耗材科室月使用量必须输入数字!'); |
| | | this.showErrorToast(component); |
| | | } |
| | | }else{ |
| | | component.set('v.errorMessage', '最多输入14为数字!'); |
| | | component.set('v.errorMessage', '产品1同类耗材科室月使用量最多输入14位数字!'); |
| | | this.showErrorToast(component); |
| | | } |
| | | } |
| | |
| | | if(sc.replace(/\D/gi,"")){ |
| | | component.set("v.select_warlocksNumber",sc); |
| | | }else{ |
| | | component.set('v.errorMessage', '必须输入数字!'); |
| | | component.set('v.errorMessage', '产品用量必须输入数字!'); |
| | | this.showErrorToast(component); |
| | | } |
| | | }else{ |
| | | component.set('v.errorMessage', '最多输入14为数字!'); |
| | | component.set('v.errorMessage', '产品用量最多输入14位数字!'); |
| | | this.showErrorToast(component); |
| | | } |
| | | } |
| | | }, |
| | | //工作会记录 |
| | | selectPurposeType: function (component,event,helper) { |
| | | debugger |
| | | var doctor_value = component.find('select_purpose_type').get('v.value'); |
| | | // alert(doctor_value); |
| | | if(doctor_value!='科室会'){ |
| | | component.find('new_con').set('v.disabled', false); |
| | | }else{ |
| | | component.find('new_con').set('v.disabled', true); |
| | | } |
| | | if(doctor_value != ''){ |
| | | var action = component.get('c.selectPurposeTypes'); |
| | | action.setParams({ |
| | | 'doctor_value': doctor_value |
| | | }); |
| | | action.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state == 'SUCCESS') { |
| | | var res = response.getReturnValue(); |
| | | component.find('select_EffectProgress').set("v.options", JSON.parse(JSON.stringify(res))); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | }else{ |
| | | component.find('select_EffectProgress').set('v.options', []); |
| | | } |
| | | this.set_doctor_list(component); |
| | | var action = component.get('c.selectPurposeTypes'); |
| | | action.setParams({ |
| | | 'doctor_value': doctor_value |
| | | }); |
| | | action.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state == 'SUCCESS') { |
| | | var res = response.getReturnValue(); |
| | | component.find('select_EffectProgress').set("v.options", JSON.parse(JSON.stringify(res))); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | }else{ |
| | | component.find('select_EffectProgress').set('v.options', []); |
| | | } |
| | | }, |
| | | |
| | | selectProductClassification: function (component,event,helper) { |
| | | debugger |
| | | var select_ProductClassification = component.find('select_ProductClassification').get('v.value'); |
| | | if(select_ProductClassification != ''){ |
| | | var action = component.get('c.selectProductClassificationc'); |
| | |
| | | }, |
| | | select_ProductCcategory: function (component,event,helper) { |
| | | var select_ProductCcategory = component.find('select_ProductCcategory').get('v.value'); |
| | | debugger |
| | | if(select_ProductCcategory != ''){ |
| | | var result = component.find('result'); |
| | | var UserProType = component.get('v.UserProType'); |
| | |
| | | |
| | | |
| | | </th> |
| | | <!-- 第七列 附件名 fy--> |
| | | <th class="slds-is-resizable" tabindex="-1" data-label="附件名1" scope="row" style="width: 110px;height: 35px;"> |
| | | |
| | | <span class="slds-grid slds-grid_align-spread" style="text-align: center;display:block;"> |
| | | <div class="slds-truncate"> |
| | | <span title="附件名1" class="slds-truncate" style="padding-bottom: 3px;">附件名1</span> |
| | | |
| | | |
| | | </div> |
| | | </span> |
| | | |
| | | |
| | | |
| | | </th> |
| | | <!-- 第七列 二维码 --> |
| | | <th class="slds-is-resizable" tabindex="-1" data-label="医院签收二维码" scope="row" style="width: 140px;height: 35px;text-align: center;"> |
| | | |
| | |
| | | |
| | | |
| | | </th> |
| | | <!-- 行项目 第四列 附件名 fy--> |
| | | <th class="slds-is-resizable" tabindex="-1" data-label="附件名1" scope="row"> |
| | | |
| | | <span class="slds-grid slds-grid_align-spread" style="text-align: center;display:block;"> |
| | | <div class="slds-truncate"> |
| | | <!-- <lightning:formattedText value="{!curr.AttachmentName}" /> --> |
| | | <a href="https://sfpi-mebg-test.olympuschina.com:8081/stg/api/file/preview?key=20220419/8cf583ab71c94eee96da7bbfcc1b376b.html">附件名1</a> |
| | | <!-- <a href="https://ocsm stagefull.sandbox.file.force.com/servlet/servlet.FileDownload?file=00P1000001QkhvQ">{!curr.AttachmentName}</a> --> |
| | | |
| | | </div> |
| | | </span> |
| | | |
| | | |
| | | |
| | | </th> |
| | | <!-- 行项目 第七列 医院签收二维码--> |
| | | <th class="slds-is-resizable" tabindex="-1" data-label="" scope="row" style="text-align: center;"> |
| | | |
| | | <button id="{!curr.skip_Hospital_Sign__c}" tabindex="-1" class="slds-button ReturnButton" name="{!curr.DNNameNo0__c}" style="width: 40px;" value="{!curr.agencySignUpDate__c}" onclick="{!c.showESignQR}">查看</button> |
| | | <button id="{!curr.skip_Hospital_Sign__c}" tabindex="-1" class="slds-button ReturnButton" name="{!curr.DNNameNo0__c}" style="width: 40px;" value="{!IF(curr.skip_Distribution_Sign__c, 'true', curr.agencySignUpDate__c)}" onclick="{!c.showESignQR}">查看</button> |
| | | |
| | | |
| | | </th> |
| | |
| | | //如果签收单录入表有数据,先取录入表的否则就检索签收单信息 |
| | | var result; |
| | | //存放录入表list |
| | | var eSignFormEntryList; |
| | | var eSignFormEntryList=[]; |
| | | //存放签收单list |
| | | var eSignFormList; |
| | | var eSignFormList=[]; |
| | | //fy 20220727 start |
| | | //存放附件名 |
| | | var AttachmentMap = new Map(); |
| | | //fy 20220727 end |
| | | if (res) { |
| | | if (res.eSignFormEntryList != null) { |
| | | if (res.eSignFormEntryList != undefined) { |
| | | eSignFormEntryList = res.eSignFormEntryList; |
| | | } |
| | | if (res.eSignFormList != null) { |
| | | if (res.eSignFormList != undefined) { |
| | | eSignFormList = res.eSignFormList; |
| | | } |
| | | //fy 20220727 start |
| | | if (res.AttachmentStringList!=undefined) { |
| | | for(var i = 0; i < res.AttachmentStringList.length; i++){ |
| | | var liststr=[]; |
| | | liststr=res.AttachmentStringList[i].split('_'); |
| | | if(liststr.length>0){ |
| | | AttachmentMap.set(liststr[0],liststr[1]); |
| | | } |
| | | } |
| | | } |
| | | //fy 20220727 end |
| | | var today = this.getNowFormatDate(); |
| | | if (eSignFormEntryList) { |
| | | for (var i = 0; i < eSignFormList.length; i++) { |
| | |
| | | } |
| | | |
| | | var pageSize = cmp.get('v.pageSize'); |
| | | //fy 20220727 start |
| | | debugger |
| | | if(res){ |
| | | if(AttachmentMap.size>0){ |
| | | for(var i = 0; i < result.length; i++){ |
| | | if(AttachmentMap.has(result[i].Id)){ |
| | | result[i].AttachmentName=AttachmentMap.get(result[i].Id); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //fy 20220727 end |
| | | cmp.set("v.data", result); |
| | | var data = result; |
| | | cmp.set("v.lineItemSize", data.length); |
| 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> |
| | |
| | | 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, |
| | |
| | | |
| | | 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; |
| | | |
| | | // 保有设备 |
| | |
| | | //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); |
| | | // 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 |
| | | } |
| | | } |
| | | } |
| | |
| | | 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 |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | //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); |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | if (updAgencyOpportunityMap.size() > 0) { |
| | | update updAgencyOpportunityMap.values(); |
| | | } |
| | | |
| | | updateTask(); // 2022-6-27 yjk 询价任务 |
| | | } |
| | | |
| | | |
| | | //2022-6-27 yjk 询价任务 start |
| | | private void updateTask() { |
| | | List<Id> oppIds = new List<Id>(); |
| | | 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); |
| | | } |
| | | if(opp.Assistant_Applied_Date__c == null && oldMap.get(opp.id).Assistant_Applied_Date__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); |
| | | } |
| | | |
| | | } |
| | | if(null!=opList && opList.size()>0){ |
| | | update opList; |
| | | } |
| | | List<task__c> taskList = [select id,taskStatus__c from task__c where RecordType.Name in ('中标结果确认') and taskStatus__c = '02 接受' and OpportunityId__c in :oppIds]; |
| | | for(task__c tsk : taskList){ |
| | | tsk.taskStatus__c = '03 完成'; |
| | | } |
| | | |
| | | 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; |
| | |
| | | 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'; |
| | |
| | | Opportunity opptest = [SELECT Id, Name FROM Opportunity WHERE Id =:opp.Id]; |
| | | System.assertEquals('::test询价', opptest.Name); |
| | | } |
| | | } |
| | | |
| | | //Opportunity Owner変更 OCSM_Owner__cも変更 |
| | | static testMethod void set_AgencyOpportunity_OCSMOwnerTest() { |
| | |
| | | |
| | | //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; |
| | |
| | | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | |
| | | List<Account> acclist=[select RecordTypeId,Name |
| | | from Account |
| | | ]; |
| | | |
| | | //System.assertEquals('test1医院',acclist[0].Name); |
| | | //System.assertEquals(9,acclist.size()); |
| | | |
| | | |
| | | account2.Name = 'test1经销商'; |
| | |
| | | } |
| | | Map<String, Campaign> wait_upd_campaigns = new Map<String, Campaign>(); |
| | | if (app_ids.size() > 0) { |
| | | List<Campaign> campaigns = [select Id, Num__c, MeetingApprovedNo__c, Meeting_Approved_No__c from Campaign where Meeting_Approved_No__c in :app_ids and Meeting_Type__c != '赞助会']; |
| | | List<Campaign> campaigns = [select Id, Num__c, MeetingApprovedNo__c, Meeting_Approved_No__c, WorkshopPlace__c, State_Master__c, City_Master__c from Campaign where Meeting_Approved_No__c in :app_ids and Meeting_Type__c != '赞助会']; |
| | | if (campaigns.size() > 0) { |
| | | for (Campaign cam : campaigns) { |
| | | Application_for_Conference_Adjudication__c app = this.newMap.get(cam.Meeting_Approved_No__c); |
| | |
| | | } |
| | | } |
| | | if (app_nos.size() > 0) { |
| | | List<Campaign> campaigns = [select Id, Num__c, MeetingApprovedNo__c, Meeting_Approved_No__c from Campaign where MeetingApprovedNo__c in :app_nos.keySet()]; |
| | | List<Campaign> campaigns = [select Id, Num__c, MeetingApprovedNo__c, Meeting_Approved_No__c, WorkshopPlace__c, State_Master__c, City_Master__c from Campaign where MeetingApprovedNo__c in :app_nos.keySet()]; |
| | | if (campaigns.size() > 0) { |
| | | for (Campaign cam : campaigns) { |
| | | Application_for_Conference_Adjudication__c app = app_nos.get(cam.MeetingApprovedNo__c); |
| | |
| | | private Campaign update_info_from_app(Campaign cam, Application_for_Conference_Adjudication__c app) { |
| | | cam.StartDate = app.StartDate__c; |
| | | cam.EndDate = app.EndDate__c; |
| | | cam.Implementation_Purpose__c = app.BudgetType__c; |
| | | cam.Implementation_Purpose__c = app.Implementation_Purpose1__c; |
| | | cam.OfficeCategory__c = app.OfficeCategory__c; |
| | | cam.Meeting_Type__c = app.MeetingType__c; |
| | | |
| | | cam.WorkshopPlace__c = app.WorkshopPlace__c; |
| | | cam.WorkshopPlace__c = String.isNotBlank(app.WorkshopPlace__c) ? app.WorkshopPlace__c : cam.WorkshopPlace__c; |
| | | cam.HostName__c = app.HostName__c; |
| | | cam.cooperatorCompany__c = app.CooperatorCompany__c; |
| | | cam.Convening_Participants_Num__c = app.ConveningParticipantsNum__c; |
| | |
| | | // cam.Activity_Type_Name__c = app.ActivityTypeName__c; |
| | | cam.Activity_Type_Name__c = app.Type_of_adjudication_meeting__c; |
| | | // 这里需要额外加操作 |
| | | cam.State_Master__c = StateCityUtil.get_state(app.StateMaster__c); |
| | | cam.City_Master__c = StateCityUtil.get_city(app.CityMaster__c); |
| | | cam.State_Master__c = String.isNotBlank(app.StateMaster__c) ? StateCityUtil.get_state(app.StateMaster__c) : cam.State_Master__c; |
| | | cam.City_Master__c = String.isNotBlank(app.CityMaster__c) ? StateCityUtil.get_city(app.CityMaster__c) : cam.City_Master__c; |
| | | |
| | | return cam; |
| | | } |
| | |
| | | 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>>(); |
| | |
| | | * 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); |
| | | } |
| | | } |
| | |
| | | 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; |
| | | // 更新现有合同的维修合同保有设备 |
| | |
| | | ' previousTotalContractAmount__c , currentTotalContractAmountVM__c , currentTotalGuaranteePrice__c '+ |
| | | ' , RecordType_DeveloperName__c ' + |
| | | ' from Maintenance_Contract__c ' |
| | | + ' where Status__c in (\'契約\',\'契約満了\') '; |
| | | + ' where Status__c in (\'契約\',\'契約満了\') ' |
| | | //URF限次合同2期 LY 20220811 start |
| | | + 'and URF_Contract__c = false'; |
| | | //URF限次合同2期 LY 20220811 end |
| | | 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 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; |
| | | } |
| | | |
| New file |
| | |
| | | global class AssetWhereabouts implements Database.Batchable<sObject>,Database.Stateful { |
| | | public String query; |
| | | public BatchIF_Log__c iflog ; |
| | | public Date toDay = Date.today().addYears(-1); |
| | | global AssetWhereabouts() { |
| | | this.query = query; |
| | | } |
| | | |
| | | 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__c,Maintenance_Contract__c,Asset__r.CurrentContract__r.RecordType_Name__c,Asset__r.CurrentContract__r.Status__c' |
| | | +' from Maintenance_Contract_Asset__c where Asset__r.AssetWhereabouts__c = null '; |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Maintenance_Contract_Asset__c> mcaList) { |
| | | List<Asset> Asslist = new List<Asset>(); |
| | | List<String> mcList = new List<String>(); |
| | | List<Repair__c> reList = [select id,Maintenance_Contract__c,Status1__c,DateReceiptQuestions__c |
| | | from Repair__c |
| | | where DateReceiptQuestions__c >= :toDay and Status1__c != '0.取消' and Status1__c != '0.删除' and Maintenance_Contract__c != null]; |
| | | System.debug('reList=='+reList); |
| | | for (Repair__c re: reList) { |
| | | mcList.add(re.Maintenance_Contract__c); |
| | | } |
| | | System.debug('mcaList=='+mcaList ); |
| | | for (Maintenance_Contract_Asset__c mca: mcaList) { |
| | | Asset ass = new Asset(); |
| | | // System.debug('mca.Maintenance_Contract__r.RecordType_Name__c=='+mca.Maintenance_Contract__r.RecordType_Name__c); |
| | | // System.debug('mca.Maintenance_Contract__r.Status__c=='+mca.Maintenance_Contract__r.Status__c); |
| | | if (mca.Asset__r.CurrentContract__r.RecordType_Name__c == '服务合同' && mca.Asset__r.CurrentContract__r.Status__c == '契約') { |
| | | ass.id = mca.Asset__c; |
| | | ass.AssetWhereabouts__c = '服务合同'; |
| | | if (!Asslist.contains(ass)) { |
| | | Asslist.add(ass); |
| | | } |
| | | } |
| | | else if(mca.Asset__r.CurrentContract__r.Status__c != '契約' && mcList.contains(mca.Maintenance_Contract__c)){ |
| | | ass.id = mca.Asset__c; |
| | | ass.AssetWhereabouts__c = '一般维修'; |
| | | if (!Asslist.contains(ass)) { |
| | | Asslist.add(ass); |
| | | } |
| | | } else{ |
| | | ass.id = mca.Asset__c; |
| | | ass.AssetWhereabouts__c = '其他'; |
| | | if (!Asslist.contains(ass)) { |
| | | Asslist.add(ass); |
| | | } |
| | | } |
| | | } |
| | | if (Asslist!=null && Asslist.size()!= 0) { |
| | | update Asslist; |
| | | } |
| | | } |
| | | |
| | | 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++; |
| | | 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.Not_Upper_limit_reason__c = 'tect contract1'; |
| | | contract1.RecordtypeId = Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByDeveloperName().get('NewMaintenance_Contract').getRecordTypeId(); |
| | | contract1.Hospital__c = hospital.Id; |
| | | contract1.Switch_TimeBase_WF__c = true; |
| | | contract1.Department_Class__c = strategicDep[0].Id; |
| | | contract1.Department__c = dep.Id; |
| | | contract1.Service_Contract_Staff__c = UserInfo.getUserId(); |
| | | contract1.Maintenance_Contract_No__c = 'tect contract1'; |
| | | contract1.Status__c = '契約'; |
| | | contract1.Contract_Start_Date__c = Date.today().addMonths(-14); |
| | | contract1.Contract_End_Date__c = Date.today().addMonths(-2); |
| | | insert contract1; |
| | | // 第二期合同 |
| | | // Maintenance_Contract__c contract2 = new Maintenance_Contract__c(); |
| | | // contract2.Name = 'tect contract2'; |
| | | // contract2.Not_Upper_limit_reason__c = 'tect contract2'; |
| | | // contract2.RecordtypeId = Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByDeveloperName().get('NewMaintenance_Contract').getRecordTypeId(); |
| | | // contract2.Hospital__c = hospital.Id; |
| | | // contract1.Switch_TimeBase_WF__c = true; |
| | | // contract2.Department_Class__c = strategicDep[0].Id; |
| | | // contract2.Department__c = dep.Id; |
| | | // contract2.Service_Contract_Staff__c = UserInfo.getUserId(); |
| | | // contract2.Maintenance_Contract_No__c = 'tect contract2'; |
| | | // contract2.Status__c = '契約満了'; |
| | | // contract2.Contract_Start_Date__c = Date.today().addMonths(-13); |
| | | // contract2.Contract_End_Date__c = Date.today().addMonths(-1); |
| | | // insert contract2; |
| | | // 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('contract2.Status__c =='+ contract2.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; |
| | | //System.Test.startTest(); |
| | | insert new Asset[] {asset}; |
| | | //System.Test.stopTest(); |
| | | |
| | | Maintenance_Contract_Asset__c contractasset1 = new Maintenance_Contract_Asset__c(); |
| | | contractasset1.Asset__c = asset.Id; |
| | | contractasset1.Maintenance_Contract__c = contract1.Id; |
| | | contractasset1.Estimate_List_Price_All_Manual__c = 1000; |
| | | insert contractasset1; |
| | | // contractasset.Maintenance_Contract_Asset_Estimate__c = mcae1.id; |
| | | Maintenance_Contract_Asset__c contractasset2 = new Maintenance_Contract_Asset__c(); |
| | | contractasset2.Asset__c = asset.Id; |
| | | contractasset2.Maintenance_Contract__c = contract1.Id; |
| | | insert contractasset2; |
| | | // insert new list<Maintenance_Contract_Asset__c> {contractasset1,contractasset2 }; |
| | | |
| | | |
| | | // 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 |
| | | 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> |
| 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> |
| | |
| | | // 学会会议的出借备品信息-->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> |
| | |
| | | ProcessState__c, |
| | | StartDate__c, |
| | | EndDate__c, |
| | | BudgetType__c, |
| | | Implementation_Purpose1__c, |
| | | OfficeCategory__c, |
| | | MeetingType__c, |
| | | ActivityTypeName__c, |
| | |
| | | if (app.MeetingType__c != '赞助会') { |
| | | cam.StartDate = app.StartDate__c; |
| | | cam.EndDate = app.EndDate__c; |
| | | cam.Implementation_Purpose__c = app.BudgetType__c; |
| | | cam.Implementation_Purpose__c = app.Implementation_Purpose1__c; |
| | | cam.OfficeCategory__c = app.OfficeCategory__c; |
| | | cam.Meeting_Type__c = app.MeetingType__c; |
| | | |
| | | cam.WorkshopPlace__c = app.WorkshopPlace__c; |
| | | cam.WorkshopPlace__c = String.isNotBlank(app.WorkshopPlace__c) ? app.WorkshopPlace__c : cam.WorkshopPlace__c; |
| | | cam.HostName__c = app.HostName__c; |
| | | cam.cooperatorCompany__c = app.CooperatorCompany__c; |
| | | cam.Convening_Participants_Num__c = app.ConveningParticipantsNum__c; |
| | |
| | | // cam.Activity_Type_Name__c = app.ActivityTypeName__c; |
| | | cam.Activity_Type_Name__c = app.Type_of_adjudication_meeting__c; |
| | | // 这里需要额外加操作 |
| | | cam.State_Master__c = StateCityUtil.get_state(app.StateMaster__c); |
| | | cam.City_Master__c = StateCityUtil.get_city(app.CityMaster__c); |
| | | cam.State_Master__c = String.isNotBlank(app.StateMaster__c) ? StateCityUtil.get_state(app.StateMaster__c) : cam.State_Master__c; |
| | | cam.City_Master__c = String.isNotBlank(app.CityMaster__c) ? StateCityUtil.get_city(app.CityMaster__c) : cam.City_Master__c; |
| | | |
| | | if (cam.Num__c != app.Num__c) { |
| | | app.Num__c = cam.Num__c; |
| | |
| | | // } 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; |
| | |
| | | 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]; |
| | |
| | | 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 = '戦略科室分類 消化科']; |
| | |
| | | String ActualVisitDateThird_Id= '';//三次上门日 |
| | | String SubOrderCompleteDate_Id= '';//报修单处理完成日 |
| | | String SubOrderCreatedDate_Id= '';//报修单申请修理日 |
| | | //LLIU-CGX5E9 LY 20220812 start |
| | | String DateReceiptQuestions_Id = '';//问题联络收到日 |
| | | //LLIU-CGX5E9 LY 20220812 end |
| | | String engineerSendDate_Id= '';//工程师修理品寄送日 |
| | | if (NFMUtil.isSandbox()) { //测试环境 |
| | | RepairApplicant_Id = '00N1m0000054ufW'; //报修人 |
| | | // RepairApplicantPosition_Id = '00N1m0000054ufV'; //报修人岗位 |
| | | RepairApplicantHospital_Id = '00N1m0000054ufU'; //报修人医院 |
| | | RepairApplicantDepartment_Id = '00N1m0000054ufT'; //报修人科室 |
| | | baoxiuzidan = '00N1m0000054ufZ'; //报修子单 |
| | | faqiri = '00N1m0000054ufa'; //报修发起日 |
| | | shouliri = '00N1m0000054ufS'; //工程师受理日 |
| | | // if (NFMUtil.isSandbox()) { //测试环境 |
| | | // RepairApplicant_Id = '00N1m0000054ufW'; //报修人 |
| | | // // RepairApplicantPosition_Id = '00N1m0000054ufV'; //报修人岗位 |
| | | // RepairApplicantHospital_Id = '00N1m0000054ufU'; //报修人医院 |
| | | // RepairApplicantDepartment_Id = '00N1m0000054ufT'; //报修人科室 |
| | | // //baoxiuzidan = '00N1m0000054ufZ'; //报修子单 |
| | | // baoxiuzidan = '00N10000009H1rR'; //报修子单 |
| | | // faqiri = '00N1m0000054ufa'; //报修发起日 |
| | | // shouliri = '00N1m0000054ufS'; //工程师受理日 |
| | | |
| | | PlannedVisitDay_Id= '00N1m000005SRiF';//计划上门日 |
| | | ActualVisitDateFirst_Id= '00N1m000005SRiK';//一次上门日 |
| | | ActualVisitDateSecond_Id= '00N1m000005SRiP';//二次上门日 |
| | | ActualVisitDateThird_Id= '00N1m000005SRiU';//三次上门日 |
| | | SubOrderCompleteDate_Id= '00N1m000005SRmg';//报修单处理完成日 |
| | | SubOrderCreatedDate_Id= '00N1m000005SRmW';//报修单申请修理日 |
| | | } else { //正式环境 |
| | | // PlannedVisitDay_Id= '00N1m000005SRiF';//计划上门日 |
| | | // ActualVisitDateFirst_Id= '00N1m000005SRiK';//一次上门日 |
| | | // ActualVisitDateSecond_Id= '00N1m000005SRiP';//二次上门日 |
| | | // ActualVisitDateThird_Id= '00N1m000005SRiU';//三次上门日 |
| | | // SubOrderCompleteDate_Id= '00N1m000005SRmg';//报修单处理完成日 |
| | | // SubOrderCreatedDate_Id= '00N1m000005SRmW';//报修单申请修理日 |
| | | // } else { //正式环境 |
| | | RepairApplicant_Id = '00N10000009H1rQ'; //报修人 |
| | | // RepairApplicantPosition_Id = ''; //报修人岗位 |
| | | RepairApplicantHospital_Id = '00N10000009H1rP'; //报修人医院 |
| | |
| | | ActualVisitDateThird_Id= '00N10000009H1r8';//三次上门日 |
| | | SubOrderCompleteDate_Id= '00N10000009H1ri';//报修单处理完成日 |
| | | SubOrderCreatedDate_Id= '00N10000009H1rj';//报修单申请修理日 |
| | | } |
| | | //LLIU-CGX5E9 LY 20220812 start |
| | | DateReceiptQuestions_Id= '00N10000008rsVQ';//问题联络收到日 |
| | | //LLIU-CGX5E9 LY 20220812 end |
| | | //} |
| | | |
| | | url += 'a0J/e?retURL=%2F'; |
| | | url += joint_3 + Delivered_Product_Id + joint_1 + ast.Name; |
| | |
| | | url += joint_4 + ActualVisitDateSecond_Id+ joint_1 + NFMUtil.formatDateTime2StrSprit(repairSubOrder.ActualVisitDateSecon__c);//二次上门日 |
| | | url += joint_4 + ActualVisitDateThird_Id+ joint_1 + NFMUtil.formatDateTime2StrSprit(repairSubOrder.ActualVisitDateThird__c);//三次上门日 |
| | | url += joint_4 + SubOrderCompleteDate_Id+ joint_1 + NFMUtil.formatDateTime2StrSprit(repairSubOrder.ApplicationTime__c);//报修单处理完成日 |
| | | //LLIU-CGX5E9 LY 20220812 start |
| | | url += joint_4 + DateReceiptQuestions_Id+ joint_1 + NFMUtil.formatDateTime2StrSprit(repairSubOrder.ApplicationTime__c);//问题联络收到日 |
| | | //LLIU-CGX5E9 LY 20220812 end |
| | | url += joint_4 + SubOrderCreatedDate_Id+ joint_1 + NFMUtil.formatDateTime2StrSprit(Date.today());//报修单申请修理日 |
| | | |
| | | url += joint_4 + shouliri + joint_1 + NFMUtil.formatDateTime2StrSprit(repairSubOrder.ReceiverTime__c); |
| | |
| | | //add wangweipeng 2022/01/26 end |
| | | //add zhangyuheng 2022/04/07 start |
| | | if (String.isNotBlank(ast.Account.RecordTypeId)) { |
| | | if (ast.Account.RecordTypeId == '01210000000QemQAAS') { //战略科室 |
| | | if (ast.Account.RecordTypeId == '01210000000QemQAAS' || //战略科室 ET |
| | | ast.Account.RecordTypeId == '01210000000QemL' || //战略科室 消化科 |
| | | ast.Account.RecordTypeId == '01210000000Qezy' || //战略科室 其他 |
| | | ast.Account.RecordTypeId == '01210000000Qf03' || //战略科室 不明 |
| | | ast.Account.RecordTypeId == '01210000000QezZ' || //战略科室 呼吸科 |
| | | ast.Account.RecordTypeId == '01210000000Qezo' || //战略科室 妇科 |
| | | ast.Account.RecordTypeId == '01210000000Qeze' || //战略科室 普外科 |
| | | ast.Account.RecordTypeId == '01210000000Qezj' || //战略科室 泌尿科 |
| | | ast.Account.RecordTypeId == '01210000000Qezt' //战略科室 耳鼻喉科 |
| | | ) { //战略科室 |
| | | if (String.isNotBlank(ast.Account.Parent.FSE_SP_Main_Leader__r.Work_Location__c)) { |
| | | url += joint_4 + SalesOfficeCode_selection_Id+ joint_1 + ast.Account.Parent.FSE_SP_Main_Leader__r.Work_Location__c;//修理品返送地 |
| | | }else { |
| | | // continue; |
| | | } |
| | | } |
| | | if (ast.Account.RecordTypeId == '01210000000QfmRAAS') { //科室 |
| | | if (ast.Account.RecordTypeId == '01210000000QfmRAAS' || //科室 呼吸科 |
| | | ast.Account.RecordTypeId == '01210000000QfmH' || //科室 普外科 |
| | | ast.Account.RecordTypeId == '01210000000Qfmb' || //科室 其他 |
| | | ast.Account.RecordTypeId == '01210000000QfmM' || //科室 妇科 |
| | | ast.Account.RecordTypeId == '01210000000QfmC' || //科室 泌尿科 |
| | | ast.Account.RecordTypeId == '01210000000Qfm7' || //科室 消化科 |
| | | ast.Account.RecordTypeId == '01210000000Qfm2' //科室 耳鼻喉科 |
| | | ) { //科室 |
| | | if (String.isNotBlank(ast.Account.Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c)) { |
| | | url += joint_4 + SalesOfficeCode_selection_Id+ joint_1 + ast.Account.Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c;//修理品返送地 |
| | | }else { |
| | |
| | | String Generation_Source_Id = '00N10000002FHF6';//QIS来源 |
| | | String Name_Id = 'Name';//QIS管理号码 |
| | | |
| | | if (NFMUtil.isSandbox()) { |
| | | baoxiuzidan = '00N1m000005STFv'; //报修子单 |
| | | } else { |
| | | // if (NFMUtil.isSandbox()) { |
| | | // baoxiuzidan = '00N1m000005STFv'; //报修子单 |
| | | // } else { |
| | | baoxiuzidan = '00N10000009H22X'; //报修子单 |
| | | } |
| | | // } |
| | | url += 'a0f/e?retURL=%2Fa0f%2Fo&RecordType=01210000000RLWc&ent=01I10000000T5b1'; |
| | | |
| | | url += joint_3 + Delivered_Product_Id + joint_1 + ast.Name; |
| | |
| | | String soql = 'select Id,name,SerialNumber,InstallDate,Information_From__c,Asset_situation__c,Order_No__c,Account.Name,Status,Department_Class__c, '; |
| | | |
| | | soql += 'Hospital__r.Owner.Name,Hospital__r.Owner.Phone,Installation_Site__c,CurrentContract__c,Product2.Asset_Model_No__c,Hospital__r.Name,Department_Class__r.Name ,Department_Class__r.Id,'; |
| | | soql += 'Ji_Zhong_Guan_Li_Ku_Cun__c,Account.Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c'; |
| | | soql += 'Ji_Zhong_Guan_Li_Ku_Cun__c,Account.Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c,Account.RecordTypeId'; |
| | | soql += ' from Asset where Id != null AND Repairing_Count__c = 0 '; |
| | | if (String.isNotBlank(FuselageNumber) || String.isNotBlank(AssetModel) || String.isNotBlank(HospitalName)) { |
| | | soql += ' AND ('; |
| | |
| | | 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; |
| | | } |
| | | |
| | | decryptInsertFuture(JSON.serialize(fendanList)); |
| | | } |
| | | } |
| | | |
| | | @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() { |
| | |
| | | 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を実行、耗材备品申請を検索 |
| | | */ |
| | |
| | | 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(); |
| | |
| | | //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; |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | @isTest |
| | | public class ConsumTrialUpdateController1Test { |
| | | |
| | | @testSetup static void setupTestData(){ |
| | | TestDataUtility.CreatePIPolicyConfiguration('Consum_Apply_Equipment_Set_Detail__c'); |
| | | } |
| | | |
| | | @isTest |
| | | static void Test1(){ |
| | | ConsumTrialUpdateController c = new ConsumTrialUpdateController(); |
| | | Consum_Apply__c ca = new Consum_Apply__c(); |
| | | ca.Name = 'testra'; |
| | | ca.ApplyPerson_Phone__c = '18888888888'; |
| | | ca.Person_In_Charge__c = UserInfo.getUserId(); |
| | | ca.applyUser__c = UserInfo.getUserId(); |
| | | ca.demo_purpose2__c = '动物实验'; |
| | | ca.Product_category__c = 'ET'; |
| | | ca.Demo_purpose_text__c = '测试'; |
| | | ca.Request_shipping_day__c = System.Today(); |
| | | //ca.RA_Status__c = null; |
| | | insert ca; |
| | | c.parId = ca.Id; |
| | | c.init(); |
| | | c.pageB = new ConsumTrialUpdateController.PageBean(ca,new string[]{'id'},new string[]{'name'},false); |
| | | c.changeFixModel(); |
| | | } |
| | | |
| | | @isTest |
| | | static void Test2(){ |
| | | ConsumTrialUpdateController c = new ConsumTrialUpdateController(); |
| | | Consum_Apply__c ca = new Consum_Apply__c(); |
| | | ca.Name = 'testra'; |
| | | ca.ApplyPerson_Phone__c = '18888888888'; |
| | | ca.Person_In_Charge__c = UserInfo.getUserId(); |
| | | ca.applyUser__c = UserInfo.getUserId(); |
| | | ca.demo_purpose2__c = '动物实验'; |
| | | ca.Product_category__c = 'ET'; |
| | | ca.Demo_purpose_text__c = '测试'; |
| | | ca.Request_shipping_day__c = System.Today(); |
| | | //ca.RA_Status__c = null; |
| | | insert ca; |
| | | c.parId = ca.Id; |
| | | Consum_Apply_Equipment_Set__c caset = new Consum_Apply_Equipment_Set__c(); |
| | | caset.Consum_Apply__c = ca.Id; |
| | | caset.Consum_Start_Date__c = date.today(); |
| | | insert caset; |
| | | // 診療科を作る |
| | | Account dep = new Account(); |
| | | dep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].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 = 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 pro1; |
| | | Asset asset1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | 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); |
| | | insert asset1; |
| | | Consum_Apply_Equipment_Set_Detail__c dt = new Consum_Apply_Equipment_Set_Detail__c(); |
| | | dt.Consum_Apply_Equipment_Set__c = caset.Id; |
| | | dt.Asset__c = asset1.Id; |
| | | dt.UniqueKey__c = datetime.now().gettime()+''; |
| | | dt.IndexFromUniqueKey__c = 123; |
| | | dt.Consum_Apply__c = ca.Id; |
| | | |
| | | insert dt; |
| | | List<string> receivingNoteFieldApiSet = new List<string>(); |
| | | receivingNoteFieldApiSet.add('Fixture_Model_No_F__c'); |
| | | receivingNoteFieldApiSet.add('Consum_Apply__r.AnimalExerimentFlag__c'); |
| | | receivingNoteFieldApiSet.add('Has_Picture__c'); |
| | | receivingNoteFieldApiSet.add('Asset_Center_Confirm__c'); |
| | | receivingNoteFieldApiSet.add('Consum_Apply__r.HP_received_sign_rich__c'); |
| | | receivingNoteFieldApiSet.add('StockDown__c'); |
| | | receivingNoteFieldApiSet.add('Picture1__c'); |
| | | receivingNoteFieldApiSet.add('Picture2__c'); |
| | | c.pageB = new ConsumTrialUpdateController.PageBean(ca,receivingNoteFieldApiSet,new string[]{'id','name','asset__c','RAESD_Status__c'},false); |
| | | for (ConsumTrialUpdateController.RowBean rowB : c.pageB.rowBList){ |
| | | rowB.checked = true; |
| | | rowB.rnd.Received_Confirm__c = 'NG'; |
| | | } |
| | | c.saveRecord(); |
| | | } |
| | | |
| | | } |
| 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> |
| | |
| | | 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; |
| | |
| | | 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() { |
| | |
| | | || 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 |
| | | |
| | | } |
| | |
| | | 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=='华北东北服务部-综合行政'){ |
| | | zz = '支援'; |
| | | }else if(bbz1=='华北东北服务部-FSE'){ |
| | | zz = '销售服务'; |
| | | }else if(odsc.Category5__c=='西部战略推进部'){ |
| | | 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)){ |
| | | //本部等于空,看部 |
| | | if(odsc.Category5__c=='华北东北运营管理部' || odsc.Category5__c=='西北西南运营管理部' || odsc.Category5__c=='西北西南运营支援部' || bbz1=='华北东北服务部-综合行政'){ |
| | | zz = '支援'; |
| | | }else if(bbz1=='华北东北服务部-FSE'){ |
| | | zz = '销售服务'; |
| | | }else if(odsc.Category5__c=='西部战略推进部'){ |
| | | 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 |
| | | |
| | | } |
| | |
| | | // 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> |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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 增加判断条件 询价等级 |
| | |
| | | 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 |
| | |
| | | public with sharing class CustomapprovalController { |
| | | public CustomapprovalController() { |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>52.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 = ''; |
| | | Savepoint sp = Database.setSavepoint(); |
| | | try { |
| | | if(fileData != null){ |
| | | String[] fileLines = new String[]{}; |
| | |
| | | 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){ |
| | | 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: 你的邮箱不太正确,请检查您的邮箱格式!'; |
| | | 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 += '='; |
| | | } |
| | | //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[4]===============>'+ 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 |
| | | //查询客户人员是否有数据 |
| | | List<Contact> contactList = [select id, CManageCode__c,AccountId from Contact where AccountId in: AccountIdList and CManageCode__c in:CManageCodeList ]; |
| | | for(Contact cc : contactList){ |
| | | String contactKey=ManagementCodeMap.get(cc.AccountId)+'_'+cc.CManageCode__c; |
| | | contactIdMap.put(contactKey,cc); |
| | | } |
| | | 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){ |
| | | 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 += 'error: 第'+ lineNumber +'行数据,姓氏'+lineList[0]+'不存在'; |
| | | errorMage += '='; |
| | | } |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,手机'+lineList[1]+'不存在'; |
| | | errorMage += '='; |
| | | } |
| | | } |
| | | 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]; |
| | |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,电子邮件'+lineList[2]+'不正确!'; |
| | | errorMage += '='; |
| | | } |
| | | }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 += 'error: 第'+ lineNumber +'行数据,经销商编码'+lineList[3]+'或者客户名不存在'; |
| | | errorMage += '='; |
| | | } |
| | | //暂定创建直接为 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{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,经销商用户'+lineList[0]+'不存在'; |
| | | errorMage += '='; |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | //经销商专员类型 |
| | | if(VerificationOLYAssistantType(lineList[7])){ |
| | | con.OLY_Assistant_Type__c = lineList[7]; |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,经销商专员类型'+lineList[7]+'不正确!'; |
| | | errorMage += '='; |
| | | } |
| | | //入职年份 |
| | | if(VerificationDateType(lineList[8])){ |
| | | con.InductionYear__c = ConversionDateType(lineList[8]); |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,入职年份'+lineList[8]+'格式不正确!'; |
| | | errorMage += '='; |
| | | } |
| | | //GIR认证级别 |
| | | if(VerifyCertificationLevel(lineList[9])){ |
| | | con.GIR_CertificationLevel__c = lineList[9]; |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,GIR认证级别'+lineList[9]+'不正确!'; |
| | | errorMage += '='; |
| | | } |
| | | //GIR认证时间 |
| | | if(VerificationDateType(lineList[10])){ |
| | | con.GIR_CertificationTime__c = ConversionDateType(lineList[10]); |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,GIR认证时间'+lineList[10]+'格式不正确!'; |
| | | errorMage += '='; |
| | | } |
| | | //SP认证级别 |
| | | if(VerifyCertificationLevel(lineList[11])){ |
| | | con.SP_CertificationLevel__c = lineList[11]; |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,SP认证级别'+lineList[11]+'不正确!'; |
| | | errorMage += '='; |
| | | } |
| | | //SP认证时间 |
| | | if(VerificationDateType(lineList[12])){ |
| | | con.SP_CertificationTime__c = ConversionDateType(lineList[12]); |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,SP认证时间'+lineList[12]+'格式不正确!'; |
| | | errorMage += '='; |
| | | } |
| | | //ET认证级别 |
| | | if(VerifyCertificationLevel(lineList[13])){ |
| | | con.ET_CertificationLevel__c = lineList[13]; |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,ET认证级别'+lineList[13]+'不正确!'; |
| | | errorMage += '='; |
| | | } |
| | | //ET认证时间 |
| | | if(VerificationDateType(lineList[14])){ |
| | | con.ET_CertificationTime__c = ConversionDateType(lineList[14]); |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,ET认证时间'+lineList[14]+'格式不正确!'; |
| | | errorMage += '='; |
| | | } |
| | | //ENG认证级别 |
| | | if(VerifyCertificationLevel(lineList[15])){ |
| | | con.ENG_CertificationLevel__c = lineList[15]; |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,ENG认证级别'+lineList[15]+'不正确!'; |
| | | errorMage += '='; |
| | | } |
| | | //ENG认证时间 |
| | | if(VerificationDateType(lineList[16])){ |
| | | con.ENG_CertificationTime__c = ConversionDateType(lineList[16]); |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,ENG认证时间'+lineList[16]+'格式不正确!'; |
| | | errorMage += '='; |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | lineNumber++; |
| | | cnList.add(con); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | System.debug('001+'+lineList[3]+'_'+lineList[6]); |
| | | System.debug('002+'+contactIdMap.get(lineList[3]+'_'+lineList[6])); |
| | | if(contactIdMap.containsKey(lineList[3]+'_'+lineList[6])){ |
| | | con.Id=contactIdMap.get(lineList[3]+'_'+lineList[6]).Id; |
| | | cnupdateList.add(con); |
| | | }else { |
| | | cnList.add(con); |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | // cnList.add(con); |
| | | } |
| | | if(errorMage != ''){ |
| | | system.debug('errorMage==========>'+errorMage); |
| | | return errorMage; |
| | | } |
| | | |
| | | |
| | | // 新增周报明细 |
| | | if(cnList.size() > 0 ){ |
| | | System.debug('003+'+cnList); |
| | | insertContact(cnList); |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // 更新周报明细 |
| | | if(cnupdateList.size() > 0 ){ |
| | | System.debug('004+'+cnupdateList); |
| | | updateContact(cnupdateList); |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | } |
| | | return 'success'; |
| | | } catch (Exception e) { |
| | | System.debug('exception'+e); |
| | | return '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; |
| | | } |
| | | } |
| | | // 电子邮件的验证 |
| | | 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) { |
| | | if(data=='A'||data=='B'||data==''){ |
| | | 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 DeleteDataTestBatch implements Database.Batchable<sObject> { |
| | | public String query; |
| | | |
| | | global DeleteDataTestBatch() { |
| | | this.query = query; |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | String query = 'select id ,name,IF_Coverage_Target_Asset__c from asset where IF_Coverage_Target_Asset__c = \'1\' and hospital__c = \'0011000000V9Q8U\''; |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<asset> assetList) { |
| | | List<Asset> asslist = new List<Asset>(); |
| | | for(Asset ass1:assetList){ |
| | | ass1.IF_Coverage_Target_Asset__c = '0'; |
| | | asslist.add(ass1); |
| | | } |
| | | 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> |
| | |
| | | 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, |
| | |
| | | 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); |
| | | |
| | | } |
| | | |
| | |
| | | // query += ' and LastModifiedDate >= :systemDate '; |
| | | // } |
| | | query += ' and Category3__c <> \'\' ' + |
| | | ' and Category5__c !=\'竞争对手\''+ |
| | | ' and SFDA_Status__c in :s'; |
| | | return Database.getQueryLocator(query); |
| | | } |
| | |
| | | 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 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 '; |
| | | // } |
| | |
| | | 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); |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |
| 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; |
| | | } |
| | | |
| | |
| | | OCSM_Period_half = '2H'; |
| | | } |
| | | // 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.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>(); |
| | | for(Asset ass1:assList){ |
| | | 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); |
| | | } |
| | | |
| | | Set<String> OlympusList = new Set<String>(); |
| | | for(asset assOlympus:[select id,name,OwnershipMachine_No__c,SerialNumber |
| | | from asset |
| | | where Hospital__r.name like '%Olympus社内%']){ |
| | | // 把医院名为Olympus社内的型号和机身编码放入set后续做存在判断 |
| | | OlympusList.add(assOlympus.OwnershipMachine_No__c+assOlympus.SerialNumber); |
| | | } |
| | | // 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 ++; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | 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 List<Id> conIds = new List<Id>(); |
| | | public List<Id> hospIds = new List<Id>(); |
| | | public Date toDayTime = Date.today(); |
| | | |
| | | // public String type ; |
| | | private BatchIF_Log__c iflog; |
| | | global EquipmentRealCoverageBatch() { |
| | |
| | | // type = '分子'; |
| | | // } |
| | | // if (i == 2) { |
| | | this.query = 'select Id,(select id,IF_Coverage_Target_Asset__c,IF_Coverage_Real_Asset__c,CurrentContract__r.Contract_End_Date__c,Product2.Category4__c,Product2.ServiceCategory__c,Product2.Category3__c from Asset_Hospital__r where Status != \'廃棄\' and Status != \'待报废\'' |
| | | +' and SerMarGuranteeType__c != \'服务多年保修\' and SerMarGuranteeType__c != \'市场多年保修\'' |
| | | this.query = 'select Id,(select id,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 Status != \'廃棄\' and Status != \'待报废\'' |
| | | +' and IF_Parts_production__c != \'1\' AND IF_Coverage_Target_Asset__c =\'1\'' |
| | | +' and ((SerMarGuranteeType__c != \'服务多年保修\' and SerMarGuranteeType__c != \'市场多年保修\') or Extend_Gurantee_DateTo__c >= :egdTime)' |
| | | +' and Product2.ServiceCategory__c != null) from Account where id in :hospIds'; |
| | | // type = '分母'; |
| | | // } |
| | |
| | | // } |
| | | // if (type == '分母') { |
| | | // 5条以上软性镜医院&&医院有效 |
| | | system.debug('执行start'); |
| | | Date egdTime = Date.newInstance(toDayTime.year()+1,3,1); |
| | | List<AggregateResult> Asset1 = [select count(Id),Hospital__c from asset where Product2.ServiceCategory__c ='软性镜' Group by Hospital__c having count(Id)>=5]; |
| | | if(Asset1!=null){ |
| | | for (AggregateResult a1 : Asset1) { |
| | |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Account> accList) { |
| | | |
| | | system.debug('执行execute'); |
| | | List<Account_Service_Of_Target__c> asotList = new List<Account_Service_Of_Target__c>(); |
| | | // if (type == '分子') { |
| | | // for (Account a : accList) { |
| | |
| | | for (Asset ass1 : acc1.Asset_Hospital__r) { |
| | | |
| | | // 标记是否覆盖率目标设备 |
| | | ass1.IF_Coverage_Target_Asset__c = '1'; |
| | | AssetsTarget.add(ass1); |
| | | // ass1.IF_Coverage_Target_Asset__c = '1'; |
| | | // AssetsTarget.add(ass1); |
| | | // 标记是否覆盖率实际设备 |
| | | if (ass1.CurrentContract__r.Contract_End_Date__c >= start_dateH1 && ass1.CurrentContract__r.Contract_End_Date__c <= end_dateH1) { |
| | | if (ass1.CurrentContract__r.Contract_End_Date__c >= start_dateH1 && ass1.CurrentContract__r.Contract_Conclusion_Date__c <= end_dateH1) { |
| | | ass1.IF_Coverage_Real_Asset__c = '1'; |
| | | AssetsReal.add(ass1); |
| | | } |
| | |
| | | } |
| | | asotList.add(asot); |
| | | } |
| | | if (asotList!=null) { |
| | | try { |
| | | insert asotList; |
| | | if (asotList!=null) { |
| | | try { |
| | | insert asotList; |
| | | } |
| | | catch (Exception e) { |
| | | iflog.ErrorLog__c += 'ERROR'+'['+'insert asotList:'+']'+e.getMessage()+'\n'; |
| | | } |
| | | } |
| | | catch (Exception e) { |
| | | iflog.ErrorLog__c += 'ERROR'+'['+'insert asotList:'+']'+e.getMessage()+'\n'; |
| | | } |
| | | } |
| | | } |
| | | global void finish(Database.BatchableContext BC) { |
| | | iflog.Log__c += '\nEquipmentRealCoverageBatch end'; |
| | |
| | | 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 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) { |
| | |
| | | } |
| | | 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> |
| | |
| | | this.end_date2 = Date.newInstance(toDayTime.year(),12,31); |
| | | this.deadlineTime = Date.newInstance(toDayTime.year(),9,30); |
| | | } |
| | | query+='select Id,(select Id,CurrentContract__c,CurrentContract__r.Contract_End_Date__c,CurrentContract__r.Contract_Start_Date__c,CurrentContract__r.New_Contract_TypeF_Text__c,Product2.ServiceCategory__c,CurrentContract__r.Status__c' |
| | | + ' from Asset_Hospital__r where CurrentContract__r.Contract_End_Date__c >= :start_date1 and CurrentContract__r.Contract_End_Date__c <= :end_date2)' |
| | | // 保有设备不为零件停产 |
| | | query+='select Id,(select Id,CurrentContract_F__r.IF_Target_Renew__c,CurrentContract__c,CurrentContract__r.Contract_End_Date__c,CurrentContract__r.Contract_Conclusion_Date__c,CurrentContract__r.Contract_Start_Date__c,CurrentContract__r.New_Contract_TypeF_Text__c,Product2.ServiceCategory__c,CurrentContract__r.Status__c,Product2.Category3__c,Product2.Category4__c' |
| | | + ' from Asset_Hospital__r where IF_Parts_production__c != \'1\' and (CurrentContract__r.Contract_End_Date__c >= :start_date1 and CurrentContract__r.Contract_End_Date__c <= :end_date2))' |
| | | + ' from Account'; |
| | | |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | global void execute(Database.BatchableContext BC, list<Account> Accounts) { |
| | | List<Account_Service_Of_Target__c> asotList = new List<Account_Service_Of_Target__c>(); |
| | | |
| | | 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 (Account acc1 : Accounts) { |
| | | accIds.add(acc1.id); |
| | | } |
| | | List<Account_Service_Of_Target__c> asotList = [select Id,Account_HP__c,OCSM_Period_half__c from Account_Service_Of_Target__c where Account_HP__c in :accIds]; |
| | | 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.OCSM_Period_half__c,asot); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | for (Account acc : Accounts) { |
| | | Account_Service_Of_Target__c asot = new Account_Service_Of_Target__c(); |
| | | List<Asset> AssetsTarget = new List<Asset>(); |
| | | List<Asset> AssetsReal = new List<Asset>(); |
| | | // 实际续签数:设备数 |
| | | Integer mirror_1 = 0; |
| | | // 续签目标:设备数 |
| | | Integer mirror_2 = 0; |
| | | // 续签目标(硬):泌尿科用硬性镜 |
| | | Integer mirror_1 = 0; |
| | | // 续签目标(软):鼻咽喉镜 |
| | | Integer mirror_2 = 0; |
| | | //续签目标(周边):光源 |
| | | Integer mirror_3 = 0; |
| | | // 实际续签数(硬):泌尿科用硬性镜 |
| | | Integer mirror_4 = 0; |
| | | // 实际续签数(硬):妇科用硬性镜 |
| | | Integer mirror_5 = 0; |
| | | // 实际续签数(周边):光源 |
| | | Integer mirror_6 = 0; |
| | | // 实际续签数(软):电子镜 |
| | | Integer mirror_7 = 0; |
| | | |
| | | for (Asset ass : acc.Asset_Hospital__r) { |
| | | // 分子 |
| | | //1. 设备关联的合同类型是“续签合同” 2. 在2023年3月31日前系统生效完毕 |
| | | if (ass.CurrentContract__r.Contract_End_Date__c <= Date.newInstance(toDayTime.year()+1,3,31) && ass.CurrentContract__r.New_Contract_TypeF_Text__c == '续签合同') { |
| | | // 标记为是否续签实际设备 |
| | | // 1. 设备关联的合同类型是“续签合同”,且上期合同属于续签目标清单内--回复内容:上期合同续签目标的清单由客户提供 |
| | | if (ass.CurrentContract_F__r.IF_Target_Renew__c == '1' && ass.CurrentContract__r.New_Contract_TypeF_Text__c == '续签合同') { |
| | | // 2. 在2023年3月31日前系统生效完毕:2023年3月31日是2H,1H是指2022年9月30日, |
| | | if (toDayTime.month() >= 4 && toDayTime.month() <= 9) { |
| | | if (ass.CurrentContract__r.Contract_Conclusion_Date__c <= Date.newInstance(toDayTime.year(),9,30)) { |
| | | // 标记为是否续签实际设备 |
| | | ass.IF_Renewalrate_Real_Asset__c = '1'; |
| | | AssetsReal.add(ass); |
| | | mirror_1++; |
| | | } |
| | | }else{ |
| | | if (ass.CurrentContract__r.Contract_Conclusion_Date__c <= Date.newInstance(toDayTime.year()+1,3,31)) { |
| | | ass.IF_Renewalrate_Real_Asset__c = '1'; |
| | | AssetsReal.add(ass); |
| | | } |
| | | } |
| | | } |
| | | // 分母 |
| | | /*1H考核对象: 1)、2021.4.1-2021.12.31合同结束且截止2022.3.31未续签的设备; |
| | | 2)、2022.1.1-2022.6.30合同结束,不论该设备是否续签 |
| | |
| | | ass.IF_Renewalrate_Target_Asset__c = '1'; |
| | | AssetsTarget.add(ass); |
| | | result = false; |
| | | mirror_2++; |
| | | } |
| | | if (result) { |
| | | if (ass.CurrentContract__r.Contract_Start_Date__c <= deadlineTime) { |
| | | ass.IF_Renewalrate_Target_Asset__c = '1'; |
| | | AssetsTarget.add(ass); |
| | | mirror_2++; |
| | | } |
| | | } |
| | | } |
| | | if (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); |
| | | mirror_2++; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (AssetsReal!=null) { |
| | | try { |
| | | update AssetsReal; |
| | |
| | | iflog.ErrorLog__c += 'ERROR'+'['+'update AssetsReal:'+']'+e.getMessage()+'\n'; |
| | | } |
| | | } |
| | | if (AssetsTarget!=null) { |
| | | if (AssetsTarget!=null) { |
| | | try { |
| | | update AssetsTarget; |
| | | } |
| | |
| | | iflog.ErrorLog__c += 'ERROR'+'['+'update AssetsTarget:'+']'+e.getMessage()+'\n'; |
| | | } |
| | | } |
| | | for (Asset AtoHp: AssetsReal) { |
| | | if (AtoHp.Product2.Category4__c == '泌尿科用硬性镜') { |
| | | mirror_4++; |
| | | } |
| | | if (AtoHp.Product2.Category4__c == '妇科用硬性镜') { |
| | | mirror_5++; |
| | | } |
| | | if (AtoHp.Product2.Category3__c == '光源') { |
| | | mirror_6++; |
| | | } |
| | | if (AtoHp.Product2.ServiceCategory__c =='软性镜') { |
| | | mirror_7++; |
| | | } |
| | | } |
| | | asot.Account_HP__c = acc.id; |
| | | // asot.Finish_Asset__c = mirror_1; |
| | | // asot.AssetContinueTaget__c = mirror_2; |
| | | // asotList.add(asot); |
| | | for (Asset ata : AssetsTarget) { |
| | | if (ata.Product2.Category4__c == '泌尿科用硬性镜') { |
| | | mirror_1++; |
| | | } |
| | | if(ata.Product2.ServiceCategory__c =='软性镜'){ |
| | | mirror_2++; |
| | | } |
| | | if (ata.Product2.Category3__c == '光源') { |
| | | mirror_3++; |
| | | } |
| | | } |
| | | if (asotMap != null) { |
| | | Account_Service_Of_Target__c asotOne = new Account_Service_Of_Target__c(); |
| | | if (toDayTime.month() >= 4 && toDayTime.month() <= 9) { |
| | | asotOne = asotMap.get(acc.id+'1H'); |
| | | }else{ |
| | | asotOne = asotMap.get(acc.id+'2H'); |
| | | } |
| | | if (asotOne != null) { |
| | | 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; |
| | | asotOne.Renew_Finish_Rigid_Mirror_2__c = mirror_4; |
| | | 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; |
| | | asots.add(asotOne); |
| | | } |
| | | } |
| | | if (asotList.isEmpty()) { |
| | | Account_Service_Of_Target__c asot1 = new Account_Service_Of_Target__c(); |
| | | asot1.Account_HP__c = acc.id; |
| | | 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.Renew_Finish_Rigid_Mirror_2__c = mirror_4; |
| | | 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; |
| | | if (toDayTime.year()<=2029 && toDayTime.year()>=2023) { |
| | | asot1.OCSM_Period__c = 'FY'+toDayTime.year(); |
| | | if (toDayTime.month() >= 4 && toDayTime.month() <= 9) { |
| | | asot1.OCSM_Period_half__c = '1H'; |
| | | }else{ |
| | | asot1.OCSM_Period_half__c = '2H'; |
| | | } |
| | | } |
| | | asots.add(asot1); |
| | | } |
| | | } |
| | | // if (asotList!=null) { |
| | | // try { |
| | | // insert asotList; |
| | | // } |
| | | // catch (Exception e) { |
| | | // iflog.ErrorLog__c += 'ERROR'+'['+'insert asotList:'+']'+e.getMessage()+'\n'; |
| | | // } |
| | | // } |
| | | if (asots!=null) { |
| | | try { |
| | | UpSert asots; |
| | | } |
| | | catch (Exception e) { |
| | | iflog.ErrorLog__c += 'ERROR'+'['+'UpSert asots:'+']'+e.getMessage()+'\n'; |
| | | } |
| | | } |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | |
| | | @isTest(SeeAllData=false) |
| | | private class EquipmentRenewBatchTest { |
| | | |
| | | |
| | | @testSetup |
| | | private static void initData(){ |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | |
| | | prd1.Name = 'Prd1'; |
| | | prd1.Manual_Entry__c = false; |
| | | // prd1.Category2__c = '本体'; |
| | | // prd1.Category3__c = '纤维镜'; |
| | | prd1.Category4__c = 'SD EndoEYE'; |
| | | prd1.Category3__c = '纤维镜'; |
| | | prd1.Category4__c = '妇科用硬性镜'; |
| | | // prd1.Category5__c = '260SL系列'; |
| | | prd1.Asset_Model_No__c = '1001'; |
| | | prd1.Important_product__c = true; |
| | |
| | | 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'; |
| | |
| | | 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; |
| | | |
| | |
| | | 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; |
| | | |
| | |
| | | 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.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; |
| | | } |
| | | |
| | | |
| | | static testMethod void testMethod1() { |
| | | /* |
| | | Date toDayTime = Date.today(); |
| | | Date start_date1 ; |
| | | Date end_date1 ; |
| | |
| | | end_date2 = Date.newInstance(toDayTime.year(),12,31); |
| | | deadlineTime = Date.newInstance(toDayTime.year(),9,30); |
| | | } |
| | | */ |
| | | |
| | | system.Test.startTest(); |
| | | initData(); |
| | | //initData(); |
| | | |
| | | |
| | | /* |
| | | String query='select Id,(select Id,CurrentContract__c,CurrentContract__r.Contract_End_Date__c,CurrentContract__r.Contract_Start_Date__c,CurrentContract__r.New_Contract_TypeF_Text__c,Product2.ServiceCategory__c,CurrentContract__r.Status__c' |
| | | + ' from Asset_Hospital__r where CurrentContract__r.Contract_End_Date__c >= :start_date1 and CurrentContract__r.Contract_End_Date__c <= :end_date2)' |
| | | + ' from Account'; |
| | |
| | | } |
| | | } |
| | | |
| | | system.assertEquals(true,accs == null); |
| | | // system.assertEquals(true,accs == null); |
| | | */ |
| | | database.executeBatch(new EquipmentRenewBatch(),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 EquipmentRenewBatch(),200); |
| | | system.Test.stopTest(); |
| | | |
| | | } |
| | | } |
| | |
| | | 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() { |
| | | 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> |
| 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(); |
| | | public String OCSM_Period_half; |
| | | public String OCSM_Period; |
| | | public Date sTime; |
| | | public Date eTime; |
| | | |
| | | 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() >= 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'; |
| | | // query +='and Is_Has_Contract_History__c = null'; |
| | | |
| | | if (accountIdList != null && accountIdList.size() > 0) { |
| | | query += ' AND Hospital__c IN :accountIdList '; |
| | | } |
| | | System.debug(LoggingLevel.INFO, '*** query: ' + query); |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, list<Asset> resultList) { |
| | | system.debug('*** 执行execute'); |
| | | System.debug(LoggingLevel.INFO, '*** 查询IF_Coverage_Target_Asset_F__c=1的保有设备Id JSON resultList: ' + JSON.Serialize(resultList)); |
| | | |
| | | //查询是否有维修合同 类型 分别统计维修金额 |
| | | //保有设备 1.有无维修合同(字段)2. |
| | | |
| | | List<Id> mids = new List<Id>(); |
| | | List<Id> assetHos = new List<Id>(); |
| | | for (Asset ass: resultList) { |
| | | mids.add(ass.Id); |
| | | assetHos.add(ass.Hospital__c); |
| | | } |
| | | |
| | | //保有设备、维修合同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>(); |
| | | //amaplist |
| | | |
| | | |
| | | //修改时间为过去三个完成财年 |
| | | |
| | | // Date LastThirdYearDate = td.addYears(-3); |
| | | // System.debug(LoggingLevel.INFO, '*** LastThirdYearDate: ' + LastThirdYearDate); |
| | | List<AggregateResult> ThreeyearList = [ |
| | | select |
| | | sum(Discount_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 |
| | | group by Delivered_Product__c |
| | | ]; |
| | | Map<Id, Decimal> ThreeYearPriceSumMap = new Map<id, Decimal>(); |
| | | Map<Id, Decimal> ThiYearMonthMap = new Map<id, Decimal>(); |
| | | |
| | | 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) { |
| | | //更新字段:执行中的合同 |
| | | // 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); |
| | | 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 resultList; |
| | | System.debug(LoggingLevel.INFO, '*** updated resultList: ' + resultList); |
| | | 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) ) { |
| | | sumThreePrice += asset.Three_Years_Repair_Cost_Text__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; |
| | | softE += asset.Three_Years_Repair_Cost_Text__c; |
| | | softCount++; |
| | | } |
| | | |
| | | }else if(asset.Product2.ServiceCategory__c == '硬性镜'){ |
| | | if(asset.Is_Has_Contract_History__c == '0'){ |
| | | hardTotalP += asset.Product2.Maintenance_Price_Year__c; |
| | | hardE += asset.Three_Years_Repair_Cost_Text__c; |
| | | hardCount++; |
| | | } |
| | | |
| | | }else if(asset.Product2.ServiceCategory__c == '周边'){ |
| | | if(asset.Is_Has_Contract_History__c == '0'){ |
| | | periTotalP += asset.Product2.Maintenance_Price_Year__c; |
| | | periE += asset.Three_Years_Repair_Cost_Text__c; |
| | | periCount++; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | 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); |
| | | |
| | | } |
| | | update resultList; |
| | | upsert 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.RecordType.Name = '服务合同'; |
| | | 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.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.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.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'; |
| | | |
| | | // 保有设备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'; |
| | | |
| | | // 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'; |
| | | |
| | | // 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.today().addDays(-1); |
| | | |
| | | // 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.today().addDays(-1); |
| | | |
| | | 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); |
| | | |
| | | 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}); |
| | | } |
| | | |
| | | } |
| | | |
| | | //// 出库 |
| | |
| | | |
| | | //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备品决裁状态相关修改 |
| 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> |
| | |
| | | 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 |
| | |
| | | } |
| | | 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 |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | 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 |
| | |
| | | public without sharing class FixtureRentalPDFCopyController { |
| | | |
| | | private static Integer MAXLINEHRIGHT = 25; |
| | | private static Integer MAXPAGECOUNT = 22; //32 |
| | | |
| | | private String rentalApplyIdIMG; |
| | | // private String rentalApplyId;//20201120 ljh |
| | | |
| | | private List<String> rentalApplyId; |
| | | // private List<String> raesidList; 確認 |
| | | |
| | | public List<PDFInfo> records { get; set; } |
| | | public Integer pageCnt { get; set; } |
| | | public Integer pageNum { get; set; } |
| | | public integer AllSum {get;set;} |
| | | public String RentalApplyName { get; set; } |
| | | public String BorrowTimeString { get; set; } |
| | | public Rental_Apply__c ApplyHeadShow { get; set; } |
| | | public List<lineInfo> DetailsAllList { get; set;} |
| | | public Map<String,String> AssetModelNoMap {get;set;} |
| | | public List<PDFInfoIMG> recordsIMG { get; set; } |
| | | public List<PDFInfoIMG> recordsIMGfist { get; set; } |
| | | public Integer pageCntIMG { get; set; } |
| | | public String headerLength {get;set;} |
| | | public List<List<String>> PageCutList { get; set; } |
| | | public String HospitalName { get; set;}//医疗机构 |
| | | public String Shippmentadress { get; set;}//发货地址 |
| | | public Integer mainCnt { get; private set;}//主体件数 |
| | | public Integer accessoryCnt { get; private set;}//附属品件数 |
| | | public String centreAddress { get; set; } |
| | | public Boolean IsShowLU { get; set; } //是否显示签收单左上角文字 true显示 20201119 LJH OCSM_BP5-61 add |
| | | public Boolean IsMain { get; set; }//是否是现地分配的主单 20201120 LJH OCSM_BP5-61 add |
| | | public String AgencyAddressName { get; private set; } |
| | | public Boolean isAgencyOrCenter { get; private set; } |
| | | public String AgencyOrCenterAddress { get; private set; } |
| | | public FixtureRentalPDFCopyController() { |
| | | pageNum = Integer.valueOf(ApexPages.currentPage().getParameters().get('page')); |
| | | rentalApplyIdIMG = ApexPages.currentPage().getParameters().get('raid'); |
| | | //Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=8'); |
| | | // rentalApplyId = ApexPages.currentPage().getParameters().get('raid');//20201120 ljh |
| | | String tempStr = ApexPages.currentPage().getParameters().get('raid'); |
| | | rentalApplyId = new List<String>(); |
| | | if(tempStr != null){ |
| | | rentalApplyId.add(tempStr); |
| | | } |
| | | |
| | | ApplyHeadShow = new Rental_Apply__c(); |
| | | IsShowLU = true;//20201119 LJH OCSM_BP5-61 add |
| | | IsMain = false;//20201123 LJH OCSM_BP5-61 add |
| | | } |
| | | |
| | | // 画面初始化 |
| | | public void init() { |
| | | // 新规奥林巴斯备品签收单PDF画面初始化 |
| | | PageCutList = new List<List<String>>(); |
| | | List<Rental_Apply__c> ApplyList = new List<Rental_Apply__c>(); |
| | | Map<String,String> AgencyAddressIdMap = new Map<String,String>(); //20201124 LJH OCSM_BP5-61 add 出借Id,地址Id |
| | | if(rentalApplyId!=null){ |
| | | ApplyList = [select id, |
| | | name, |
| | | Name_No__c, // 20211209 ljh SFDC-C923SR add |
| | | Shippment_loaner_time__c, |
| | | WorkPlace__c, |
| | | Salesdept__c, |
| | | Demo_purpose1__c, |
| | | Demo_purpose2__c, |
| | | Bollow_Date__c, |
| | | Campaign__r.EndDate, |
| | | Follow_UP_Opp__c, |
| | | Repair__r.Repair_Shipped_Date__c, |
| | | Return_dadeline_final__c, |
| | | Shipment_address__r.Post_Code__c, |
| | | Person_In_Charge__r.Name,Post_Code__c, |
| | | Shippment_adress_detail__c, |
| | | Person_In_Charge__r.Phone, |
| | | Phone_number__c, |
| | | Hospital__r.Name,Account__r.Department_name__c, |
| | | Account__r.Name, |
| | | Direct_shippment_address__c, |
| | | Dealer__r.Postal_Code__c, |
| | | ApplyUser__r.Name, |
| | | applyUser__r.Phone, |
| | | Loaner_medical_Staff__r.Name, |
| | | Loaner_medical_Staff__r.Phone, |
| | | Loaner_received_staff__c, |
| | | Loaner_received_staff_phone__c, |
| | | Asset_loaner_start_date__c, |
| | | Asset_loaner_start_day__c, |
| | | ApplyPerson_Phone__c, |
| | | Loaner_centre_mail_address__c, |
| | | // Main_Cnt__c, |
| | | // Accessory_Cnt__c, |
| | | Old_Rental_Apply__c,//20201120 LJH OCSM_BP5-61 add |
| | | Split_Apply_Reason__c,//20201120 LJH OCSM_BP5-61 add |
| | | RecordType.DeveloperName,//20201120 LJH OCSM_BP5-61 add |
| | | Request_shipping_day__c,//20201120 LJH OCSM_BP5-61 add |
| | | ToAgency__c,//20201123 LJH OCSM_BP5-61 add |
| | | Agency_Address_Id__c,//20201124 LJH OCSM_BP5-61 add |
| | | Root_Rental_Apply__c,//20210617 ljh 1732 add |
| | | BRId__c, // 20211209 ljh SFDC-C923SR add |
| | | QRImg__c, |
| | | QRId__c |
| | | from Rental_Apply__c |
| | | where id = :rentalApplyId]; |
| | | } |
| | | |
| | | if(ApplyList.size()>0){ |
| | | ApplyHeadShow = ApplyList[0]; |
| | | } |
| | | //增加借出备品SET一览List,为了获取借出备品SET一览明细 |
| | | List<String> RAESSearchList = New List<String>(); |
| | | //20201201 ljh OCSM_BP5-76 add start |
| | | String centerAddressInfo; |
| | | bp3_Setting__c conf = bp3_Setting__c.getOrgDefaults(); |
| | | //20201201 ljh OCSM_BP5-76 add end |
| | | //根据备品中心邮箱判断备品中心 |
| | | if(ApplyHeadShow.Loaner_centre_mail_address__c=='OCM_Asset@olympus.com.cn.full'){ |
| | | centreAddress = '请将备品回寄至北京备品中心'; |
| | | centerAddressInfo = 'BeiJingCenter'; |
| | | }else if(ApplyHeadShow.Loaner_centre_mail_address__c=='OCM_AssetSH@olympus.com.cn.full'){ |
| | | centreAddress = '请将备品回寄至上海备品中心'; |
| | | centerAddressInfo = 'ShangHaiCenter'; |
| | | }else if(ApplyHeadShow.Loaner_centre_mail_address__c=='OCM_AssetGZ@olympus.com.cn.full'){ |
| | | centreAddress = '请将备品回寄至广州备品中心'; |
| | | centerAddressInfo = 'GuangZhouCenter'; |
| | | } |
| | | //20201120 LJH OCSM_BP5-61 add start |
| | | //现地管理分单 主单&从单 |
| | | //20210617 ljh 1732 update start |
| | | if(ApplyHeadShow.RecordType.DeveloperName == 'AgencyRequest'){ |
| | | //记录类型办事处 |
| | | IsShowLU = false; |
| | | String tempStr = ApplyHeadShow.Agency_Address_Id__c; |
| | | if(String.isNotBlank(tempStr)){ |
| | | AgencyAddressIdMap.put(ApplyHeadShow.Id,tempStr.substring(0,15)); |
| | | } |
| | | if(String.isBlank(ApplyHeadShow.Old_Rental_Apply__c)){ |
| | | List<Rental_Apply__c> ApplyCopyList = [select Id, Name from Rental_Apply__c where Root_Rental_Apply__c = :ApplyHeadShow.id and Split_Apply_Reason__c = '现地管理分单']; //20210611 ljh 1732 update Root_Rental_Apply__c |
| | | if(ApplyCopyList.size()>0){ |
| | | for(Rental_Apply__c ac:ApplyCopyList){ |
| | | String tempId = ac.Id; |
| | | rentalApplyId.add(tempId); |
| | | } |
| | | } |
| | | |
| | | }else{ |
| | | List<Rental_Apply__c> ApplyCopyList = [select Id, Name from Rental_Apply__c where ((Root_Rental_Apply__c = :ApplyHeadShow.Root_Rental_Apply__c and id != :ApplyHeadShow.id and Split_Apply_Reason__c = '现地管理分单') OR id = :ApplyHeadShow.Root_Rental_Apply__c) ]; //20210611 ljh 1732 update Root_Rental_Apply__c |
| | | if(ApplyCopyList.size()>0){ |
| | | for(Rental_Apply__c ac:ApplyCopyList){ |
| | | String tempId = ac.Id; |
| | | rentalApplyId.add(tempId); |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | if(String.isBlank(ApplyHeadShow.Old_Rental_Apply__c)){ |
| | | //是否 现地管理分单 主单 |
| | | List<Rental_Apply__c> ApplyCopyList = [select Id, Name from Rental_Apply__c where Root_Rental_Apply__c = :ApplyList[0].id and Split_Apply_Reason__c = '现地管理分单']; //20210611 ljh 1732 update Root_Rental_Apply__c |
| | | if(ApplyCopyList.size()>0){ |
| | | IsShowLU = false; |
| | | IsMain = true; |
| | | for(Rental_Apply__c ac:ApplyCopyList){ |
| | | String tempId = ac.Id; |
| | | rentalApplyId.add(tempId); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | List<Shipment_address__c> ShipmentAddressList = [select Id,Name,Address__c from Shipment_address__c where Id in :AgencyAddressIdMap.values()]; |
| | | Map<String,String> ShipmentAddressMap = new Map<String,String>(); |
| | | for(Shipment_address__c sa : ShipmentAddressList){ |
| | | String tempStr = sa.Id; |
| | | ShipmentAddressMap.put(tempStr.substring(0,15),sa.Address__c); |
| | | } |
| | | Set<String> keySet = AgencyAddressIdMap.keySet(); |
| | | for(String ks:keySet){ |
| | | AgencyAddressIdMap.put(ks,ShipmentAddressMap.get(AgencyAddressIdMap.get(ks))); |
| | | } |
| | | //20201120 LJH OCSM_BP5-61 add end |
| | | //医疗机构名分行显示 |
| | | if(ApplyHeadShow.Hospital__r.Name != null){ |
| | | String HospOrgan = ApplyHeadShow.Hospital__r.Name; |
| | | Integer HospSize = HospOrgan == null ? 0 : HospOrgan.length(); |
| | | if(HospSize <=19){ |
| | | HospitalName = HospOrgan; |
| | | }else{ |
| | | HospitalName = HospOrgan.substring(0,19)+'\n'+HospOrgan.substring(19,HospSize); |
| | | } |
| | | } |
| | | |
| | | //发货地址分行显示 |
| | | String ShippMentAdr = null; |
| | | if (ApplyHeadShow.Shippment_adress_detail__c != null) { |
| | | ShippMentAdr = ApplyHeadShow.Shippment_adress_detail__c; |
| | | } else { |
| | | ShippMentAdr = ApplyHeadShow.Direct_shippment_address__c; |
| | | } |
| | | |
| | | Integer ShipAdrSize = ShippMentAdr == null ? 0 : ShippMentAdr.length(); |
| | | if (ShipAdrSize <= 26) { |
| | | Shippmentadress = ShippMentAdr; |
| | | } else if (ShipAdrSize > 26 && ShipAdrSize <= 52) { |
| | | Shippmentadress = ShippMentAdr.substring(0,26)+ '\n' +ShippMentAdr.substring(26,ShipAdrSize); |
| | | } else { |
| | | Shippmentadress = ShippMentAdr.substring(0,26)+'\n'+ShippMentAdr.substring(26,52) + '\n'+ShippMentAdr.substring(52,ShipAdrSize); |
| | | } |
| | | |
| | | // 增加医院借用期限,输出字段格式化 |
| | | if (ApplyHeadShow.Asset_loaner_start_date__c != null) { |
| | | if (ApplyHeadShow.Demo_purpose2__c == '产品试用' |
| | | || ApplyHeadShow.Demo_purpose2__c == '新产品评价' |
| | | || ApplyHeadShow.Demo_purpose2__c == FixtureUtil.raDemo_purpose2MAP.get('shiyongwuxunjia') |
| | | || ApplyHeadShow.Demo_purpose2__c == FixtureUtil.raDemo_purpose2MAP.get('shiyongyouxunjia') |
| | | || ApplyHeadShow.Demo_purpose2__c == '其他' |
| | | || ApplyHeadShow.Demo_purpose2__c == '协议借用') { |
| | | BorrowTimeString = String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c) + ' ~ ' |
| | | + String.valueOf(ApplyHeadShow.Return_dadeline_final__c) |
| | | + '前到达奥林巴斯备品中心'; |
| | | } else if (ApplyHeadShow.Demo_purpose2__c == '学会展会') { |
| | | if (ApplyHeadShow.Campaign__r.EndDate != null){ |
| | | BorrowTimeString = String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c) + ' ~ ' |
| | | + String.valueOf(ApplyHeadShow.Campaign__r.EndDate.addDays(5)) |
| | | + '前到达奥林巴斯备品中心'; |
| | | // 2018年7月31日 SWAG-B36CY6 by 张玉山 start |
| | | } else if (ApplyHeadShow.Campaign__r.EndDate == null) { |
| | | // 2018年7月31日 SWAG-B36CY6 by 张玉山 end |
| | | BorrowTimeString = '学会结束日为空,无法确定医院借用期限'; |
| | | }else{ |
| | | BorrowTimeString = 'ApexClass104:无法获取数据,请联系开发组'; |
| | | } |
| | | |
| | | } else if (ApplyHeadShow.Demo_purpose2__c == '已购待货') { |
| | | BorrowTimeString = String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c) + ' ~ ' |
| | | + '新品发货日起14天内' |
| | | + '到达奥林巴斯备品中心'; |
| | | } else if (ApplyHeadShow.Demo_purpose2__c == '故障排查') { |
| | | BorrowTimeString = '判定有故障时,' + String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c) |
| | | + '~修理品返送日起14天内到达奥林巴斯备品中心\n' |
| | | + '判定无故障时,' + String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c) |
| | | + '~出库日起10个工作日内到达奥林巴斯备品中心'; |
| | | } else if (ApplyHeadShow.Demo_purpose1__c == '维修代用') { |
| | | BorrowTimeString = String.valueOf(ApplyHeadShow.Asset_loaner_start_date__c) + ' ~ ' |
| | | + '修理品返送日起14天内' |
| | | + '到达奥林巴斯备品中心'; |
| | | } else { |
| | | BorrowTimeString = '未设定归还期限'; |
| | | } |
| | | |
| | | } else { |
| | | BorrowTimeString = '备品预计出货日为空,无法确定医院借用期限'; |
| | | } |
| | | |
| | | system.debug(' ApplyHeadShow.Demo_purpose1__c'+ ApplyHeadShow.Demo_purpose1__c); |
| | | |
| | | // 增加医院借用期限,输出字段格式化 |
| | | // system.debug('测试位置1+raesidList'+raesidList); |
| | | records = new List<PDFInfo>(); |
| | | List<Rental_Apply_Equipment_Set__c> raesList = new List<Rental_Apply_Equipment_Set__c>(); |
| | | // List<String> esidList = new List<String>(); |
| | | //ToDo Where 確認 |
| | | String soql = 'select Id, Name, Rental_Apply__c, Fixture_Set__r.Name' |
| | | + ', Rental_Apply__r.Name, Request_owner__c, Rental_Apply__r.Salesdept__c' |
| | | + ', Rental_Apply__r.WorkPlace__c, Account__c, Rental_Apply__r.Campaign__r.Name' |
| | | + ', Rental_Apply__r.Request_shipping_day__c, Rental_Apply__r.Loaner_received_staff__c' |
| | | + ', Rental_Apply__r.Loaner_received_staff_phone__c, Rental_Apply__r.Shippment_adress_detail__c' |
| | | + ', Rental_End_Date__c, Rental_Apply__r.direct_shippment_address__c' |
| | | + ' from Rental_Apply_Equipment_Set__c' |
| | | + ' where Rental_Apply__c = :rentalApplyId' |
| | | + ' AND Cancel_Select__c = false' |
| | | + ' AND Yi_Shipment_request__c > 0'; |
| | | |
| | | //ToDo条件確認 |
| | | //soql += 'and RAES_Status__c != \'引当済\' and RAES_Status__c != \'取消分配\''; |
| | | |
| | | //今回個別の表示はしないのでコメントアウトします |
| | | // if (raesidListIMG.size() > 0) { |
| | | // soql += ' AND Id in : raesidListIMG '; |
| | | // } |
| | | |
| | | // if(ApplyHeadShow.Shippment_loaner_time__c != null) { |
| | | // soql += ' AND Shippment_loaner_time__c != null'; |
| | | // } |
| | | |
| | | soql += ' order by Name'; |
| | | raesList = Database.query(soql); |
| | | //20201120 LJH OCSM_BP5-61 add start |
| | | //申请单-申请一览List |
| | | Map<Id,List<Rental_Apply_Equipment_Set__c>> raRaesMap = new Map<Id,List<Rental_Apply_Equipment_Set__c>>(); |
| | | //20201120 LJH OCSM_BP5-61 add end |
| | | if (raesList.size() > 0) { |
| | | for (Rental_Apply_Equipment_Set__c raes : raesList) { |
| | | //ToDo RentalApplyName取り方が変 |
| | | //RentalApplyName = raes.Rental_Apply__r.Name; |
| | | //循环获得RAES_id |
| | | RAESSearchList.add(raes.id); |
| | | //20201120 LJH OCSM_BP5-61 add start |
| | | if(!raRaesMap.containsKey(raes.Rental_Apply__c)){ |
| | | raRaesMap.put(raes.Rental_Apply__c,new Rental_Apply_Equipment_Set__c[]{raes}); |
| | | }else{ |
| | | raRaesMap.get(raes.Rental_Apply__c).add(raes); |
| | | } |
| | | //20201120 LJH OCSM_BP5-61 add end |
| | | } |
| | | RentalApplyName = raesList[0].Rental_Apply__r.Name; |
| | | } |
| | | |
| | | Map<String, List<Rental_Apply_Equipment_Set_Detail__c>> raesdMap = new Map<String, List<Rental_Apply_Equipment_Set_Detail__c>>(); |
| | | |
| | | String NextName = ''; |
| | | if(RAESSearchList.size()>0){ |
| | | List<Rental_Apply_Equipment_Set_Detail__c> RAESDLine = New List<Rental_Apply_Equipment_Set_Detail__c>(); |
| | | RAESDLine = [ |
| | | select id, Equipment_SetD_Borrowed__c, |
| | | EquipmentSet_Managment_Code_formula__c, |
| | | Rental_Apply_Equipment_Set__c, |
| | | Rental_Apply_Equipment_Set__r.Name, |
| | | Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name, |
| | | Rental_Apply_Equipment_Set__r.Loaner_code__c, |
| | | FSD_Name_CHN__c, |
| | | Fixture_Name_text__c, |
| | | Fixture_Model_No_F__c, |
| | | Fixture_Model_No_text__c, |
| | | Loaner_asset_no__c, |
| | | Internal_Asset_number_c__c, |
| | | ProductName__c, |
| | | Asset__r.Product2.Image_DocumentID__c, |
| | | Asset__r.OwnershipMachine_No__c, |
| | | Asset__r.Name, |
| | | Asset__r.Loaner_accsessary__c, |
| | | Asset__r.WH_location__c, |
| | | SerialNumber__c, |
| | | SerialNumber_text__c, |
| | | Is_Body__c, |
| | | // Rental_Apply_Equipment_Set__r.SerialNumber_text__c, |
| | | Rental_Apply_Equipment_Set__r.Loaner_code_text__c |
| | | from Rental_Apply_Equipment_Set_Detail__c |
| | | where Rental_Apply_Equipment_Set__r.Id in :RAESSearchList |
| | | and Cancel_Select__c = False |
| | | AND asset__c != null |
| | | AND Cancel_Select__c = false |
| | | AND Shipment_request_time2__c != null |
| | | order by Rental_Apply_Equipment_Set__c, Name, ProductName__c asc nulls last, Asset__r.Loaner_accsessary__c]; |
| | | mainCnt = 0; |
| | | accessoryCnt = 0; |
| | | for (Rental_Apply_Equipment_Set_Detail__c ra : RAESDLine) { |
| | | if (ra.Is_Body__c) { |
| | | mainCnt += 1; |
| | | } else { |
| | | accessoryCnt += 1; |
| | | } |
| | | if (raesdMap.containsKey(ra.Rental_Apply_Equipment_Set__c)) { |
| | | raesdMap.get(ra.Rental_Apply_Equipment_Set__c).add(ra); |
| | | } else { |
| | | List<Rental_Apply_Equipment_Set_Detail__c> rsd = new List<Rental_Apply_Equipment_Set_Detail__c>(); |
| | | rsd.add(ra); |
| | | raesdMap.put(ra.Rental_Apply_Equipment_Set__c,rsd); |
| | | } |
| | | } |
| | | //20201125 LJH OCSM_BP5-61 add start |
| | | raesList = null; |
| | | raesList = raRaesMap.get(rentalApplyId[0]); |
| | | //20201125 LJH OCSM_BP5-61 add end |
| | | } |
| | | DetailsAllList = new List<lineInfo>(); |
| | | recordsIMG = new List<PDFInfoIMG>(); |
| | | //计算行高总数,用于分页 |
| | | integer LineNum = 0; |
| | | |
| | | System.debug('raesListsize is' + raesList.size()); |
| | | |
| | | for (Integer i = 0; i < raesList.size(); i++) { |
| | | Rental_Apply_Equipment_Set__c raes = raesList[i]; |
| | | Map<String,integer> DLSM = new Map<String,integer>(); |
| | | Map<String,String> LoanerCodeSM = new Map<String,String>(); |
| | | Map<String,String> DetailsLineMap = new Map<String,String>(); |
| | | Set<String> AllSet = new Set<String>(); |
| | | String DetailsLine = ''; |
| | | List<Rental_Apply_Equipment_Set_Detail__c> LineOrderList = raesdMap.get(raes.Id); |
| | | // system.debug('LineOrderList测试'+LineOrderList.size()); |
| | | |
| | | if (LineOrderList!=null) { |
| | | boolean LotFlag = true; |
| | | for (Rental_Apply_Equipment_Set_Detail__c Ec : LineOrderList) { |
| | | // LoanerCodeSM.put(Ec.Equipment_Set__r.Loaner_code__c, Ec.Equipment_Set__r.Loaner_code__c); |
| | | system.debug('LoanerCodeSM显示'+LoanerCodeSM); |
| | | //先数出来有多少重复的 |
| | | //DetailsLine = DetailsLine + Ec.Asset__r.OwnershipMachine_No__c+' ; '; |
| | | if (DLSM.containsKey(Ec.Asset__r.OwnershipMachine_No__c)) { |
| | | //OCM内部产品型号 OwnershipMachine_No__c |
| | | integer j = DLSM.get(Ec.Asset__r.OwnershipMachine_No__c)+1; |
| | | DLSM.put(Ec.Asset__r.OwnershipMachine_No__c, j); |
| | | } else { |
| | | DLSM.put(Ec.Asset__r.OwnershipMachine_No__c, 1); |
| | | } |
| | | |
| | | if (Ec.Asset__r.Loaner_accsessary__c == false) { |
| | | //有主机 |
| | | LotFlag = false; |
| | | } |
| | | |
| | | //去掉重复的 ToDo条件确认 |
| | | // if (Ec.Asset__r.Loaner_accsessary__c == true) { |
| | | //if(Ec.SerialNumber__c == ''||Ec.SerialNumber__c==null){ |
| | | AllSet.add(Ec.Asset__r.OwnershipMachine_No__c); |
| | | // } |
| | | } |
| | | |
| | | system.debug('DLSM:::::'+DLSM); |
| | | system.debug('AllSet:::::'+AllSet); |
| | | for (String Ecc : AllSet) { |
| | | //然后做成字符串 |
| | | if (LotFlag) { |
| | | //都为附属品 |
| | | if(DLSM.get(Ecc)==1) { |
| | | DetailsLine = DetailsLine + Ecc + ' ; '; |
| | | } else { |
| | | DetailsLine = DetailsLine + Ecc + '*' + DLSM.get(Ecc) + ' ; '; |
| | | } |
| | | } else { |
| | | if (DLSM.get(Ecc)==1&&!LoanerCodeSM.containsKey(Ecc)) { |
| | | DetailsLine = DetailsLine + Ecc+' ; '; |
| | | } else if (DLSM.get(Ecc)!=1) { |
| | | DetailsLine = DetailsLine + Ecc+'*'+DLSM.get(Ecc)+' ; '; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (DetailsLine.length()>0) { |
| | | DetailsLine = DetailsLine.substring(0, DetailsLine.length()-2); |
| | | } |
| | | |
| | | // List<Rental_Apply_Equipment_Set_Detail__c> LinJar = raesdMap.get(raes.Equipment_Set__c); |
| | | // Rental_Apply_Equipment_Set_Detail__c LineOrder = new Rental_Apply_Equipment_Set_Detail__c(); |
| | | // if (LinJar.size()>0) { |
| | | Integer k = i; |
| | | for (Rental_Apply_Equipment_Set_Detail__c LineOrder : LineOrderList) { |
| | | // LineOrder = raesdMap.get(raes.Equipment_Set__c)[0]; |
| | | // system.debug('LineOrder::::::'+LineOrder); |
| | | lineInfo Li = new lineInfo(LineOrder, LotFlag, k); |
| | | Li.AssetModelNo = DetailsLine; |
| | | //载入行高 每行44 |
| | | if (DetailsLine.length() != 0) { |
| | | Li.LineHeight = (DetailsLine.length()/44) + (Math.mod(DetailsLine.length(), 44) > 0 ? 1 : 0); |
| | | } else { |
| | | Li.LineHeight = 1; |
| | | } |
| | | |
| | | Li.height = Li.LineHeight * MAXLINEHRIGHT; |
| | | |
| | | LineNum = LineNum + Li.LineHeight; |
| | | DetailsAllList.add(Li); |
| | | k = null; |
| | | } |
| | | |
| | | // } |
| | | // for (Rental_Apply_Equipment_Set_Detail__c raesd : LineOrderList) { |
| | | PDFInfoIMG infoIMG = new PDFInfoIMG(raes, LineOrderList); |
| | | recordsIMG.add(infoIMG); |
| | | // } |
| | | } |
| | | } |
| | | |
| | | // //分页 15行一页,实际显示14行,判断第14行是否为双倍高度 |
| | | // //明细总页数 |
| | | integer PageAllNum = integer.valueOf(Math.ceil( LineNum / (MAXPAGECOUNT+1))+1+''); |
| | | |
| | | pageCnt = integer.valueOf(Math.ceil( DetailsAllList.size() / 17 ) +1+''); |
| | | //for(Integer j = 0 ; j< PageAllNum ;j++){ |
| | | //新建一页 |
| | | |
| | | PDFInfo info = new PDFInfo(new Rental_Apply__c(),New List<Rental_Apply_Equipment_Set_Detail__c>()); |
| | | //20201120 LJH OCSM_BP5-61 update start |
| | | // if(!IsShowLU){ |
| | | // if(!IsMain){ |
| | | // info.isAgencyOrCenter = true;//办事处 |
| | | // info.AgencyAddressName = '请将备品回寄至'; |
| | | // info.AgencyAddressName += ApplyHeadShow.ToAgency__c == null ? '' : ApplyHeadShow.ToAgency__c; |
| | | // info.AgencyAddressName += '办事处'; |
| | | // info.AgencyOrCenterAddress = AgencyAddressIdMap.get(ApplyHeadShow.Id); |
| | | // }else{ |
| | | // info.isAgencyOrCenter = false;//备品中心 |
| | | // info.AgencyOrCenterAddress = centerAddressInfo; |
| | | // } |
| | | // }else{ |
| | | // info.isAgencyOrCenter = false;//备品中心 |
| | | // info.AgencyOrCenterAddress = centerAddressInfo; |
| | | // } |
| | | if(!IsShowLU){ |
| | | if(!IsMain){ |
| | | isAgencyOrCenter = true;//办事处 |
| | | AgencyAddressName = '请将备品回寄至'; |
| | | AgencyAddressName += ApplyHeadShow.ToAgency__c == null ? '' : ApplyHeadShow.ToAgency__c; |
| | | AgencyAddressName += '办事处'; |
| | | AgencyOrCenterAddress = AgencyAddressIdMap.get(ApplyHeadShow.Id); |
| | | }else{ |
| | | isAgencyOrCenter = false;//备品中心 |
| | | AgencyOrCenterAddress = centerAddressInfo; |
| | | } |
| | | }else{ |
| | | isAgencyOrCenter = false;//备品中心 |
| | | AgencyOrCenterAddress = centerAddressInfo; |
| | | } |
| | | //20201120 LJH OCSM_BP5-61 update end |
| | | integer PageCut = 0; |
| | | if (PageAllNum>=7) { |
| | | PageAllNum=7; |
| | | } |
| | | |
| | | Integer count = DetailsAllList.size() / MAXPAGECOUNT; |
| | | if (Math.mod(DetailsAllList.size(), MAXPAGECOUNT) > 0) { |
| | | count += 1; |
| | | } |
| | | |
| | | |
| | | for (Integer K = 0; K < count*MAXPAGECOUNT ; K++) { |
| | | if (DetailsAllList.size()>k) { |
| | | info.lineList.add(DetailsAllList[K]); |
| | | PageCut = PageCut +DetailsAllList[K].LineHeight-1; |
| | | |
| | | } else { |
| | | info.lineList.add(new lineInfo(new Rental_Apply_Equipment_Set_Detail__c(), false, null)); |
| | | } |
| | | System.debug('info.lineList is' + info.lineList); |
| | | if (records.size() < PageAllNum) { |
| | | PageCut = PageCut+1; |
| | | } |
| | | system.debug('PageCut[K]' + PageCut); |
| | | |
| | | if (info.lineList.size() >= MAXPAGECOUNT) { |
| | | records.add(info); |
| | | system.debug('records内容::::::::'+records); |
| | | info = new PDFInfo(new Rental_Apply__c(),New List<Rental_Apply_Equipment_Set_Detail__c>()); |
| | | List<String> G = new List<String>(); |
| | | G.add('ANY element'); |
| | | PageCutList.add(G); |
| | | PageCut=0; |
| | | } |
| | | } |
| | | |
| | | // for (Integer K = 0; K < PageAllNum*MAXPAGECOUNT ; K++) { |
| | | // if (DetailsAllList.size()>k) { |
| | | // info.lineList.add(DetailsAllList[K]); |
| | | // PageCut = PageCut +DetailsAllList[K].LineHeight-1; |
| | | |
| | | // } else { |
| | | // info.lineList.add(new lineInfo(new Rental_Apply_Equipment_Set_Detail__c(), false, null)); |
| | | // } |
| | | // System.debug('info.lineList is' + info.lineList); |
| | | // if (records.size() < PageAllNum) { |
| | | // PageCut = PageCut+1; |
| | | // } |
| | | // system.debug('PageCut[K]' + PageCut); |
| | | |
| | | // if (PageCut >= MAXPAGECOUNT) { |
| | | // records.add(info); |
| | | // system.debug('records内容::::::::'+records); |
| | | // info = new PDFInfo(new Rental_Apply__c(),New List<Rental_Apply_Equipment_Set_Detail__c>()); |
| | | // List<String> G = new List<String>(); |
| | | // G.add('ANY element'); |
| | | // PageCutList.add(G); |
| | | // PageCut=0; |
| | | // } |
| | | // } |
| | | |
| | | // system.debug('records内容'+records); |
| | | pageCnt = records.size(); |
| | | AllSum = DetailsAllList.size(); |
| | | |
| | | // //pageNum |
| | | recordsIMGfist = new List<PDFInfoIMG>(); |
| | | |
| | | for (integer J = pageNum * 10; J<pageNum * 10 +10; J++) { |
| | | if (J < recordsIMG.size()) { |
| | | recordsIMGfist.add(recordsIMG.get(J)); |
| | | } |
| | | } |
| | | |
| | | pageCntIMG = recordsIMGfist.size(); |
| | | } |
| | | // Data Bean |
| | | class PDFInfo { |
| | | public String eSetName { get; private set; } //备品中心管理单号 |
| | | // public String AgencyAddressName { get; private set; } //回寄地址 20201123 LJH OCSM_BP5-61 add |
| | | // public Boolean isAgencyOrCenter { get; private set; } //备品中心?办事处 20201123 LJH OCSM_BP5-61 add |
| | | // public String AgencyOrCenterAddress { get; private set; }//20201124 LJH OCSM_BP5-61 add |
| | | public String requestOwner { get; private set; } //申请人 |
| | | public String salesDept { get; private set; } //所属本部 |
| | | public String workPlace { get; private set; } //所属办事处 |
| | | public String acc { get; private set; } //借用单位 |
| | | public String shippingDay { get; private set; } //希望到货日 |
| | | public String receivedStaff { get; private set; } //收件人 |
| | | public String receivedStaffPhone { get; private set; } //收件人电话 |
| | | public String shippmentAdress { get; private set; } //发送地址 |
| | | public String HospitalEndDate { get; private set; } //在医院使用期限 |
| | | public String LoanerCode {get;private set;} //備品型番 |
| | | public List<lineInfo> lineList { get; private set; } |
| | | public String AssetModelNo {get;private set;} //OCM内部产品型号(略称) |
| | | public PDFInfo(Rental_Apply__c raes, List<Rental_Apply_Equipment_Set_Detail__c> raesdList) { |
| | | eSetName = raes.Name; |
| | | requestOwner = raes.Person_In_Charge__c; |
| | | salesDept = raes.Salesdept__c; |
| | | workPlace = raes.WorkPlace__c; |
| | | acc = raes.Account__c == null && raes.Campaign__c != null ? raes.Campaign__c : raes.Account__c; |
| | | shippingDay = raes.Request_shipping_day__c == null ? '' : raes.Request_shipping_day__c.format(); |
| | | receivedStaff = raes.Loaner_received_staff__c; |
| | | receivedStaffPhone = raes.Loaner_received_staff_phone__c; |
| | | shippmentAdress = raes.Shippment_adress_detail__c == null ? raes.direct_shippment_address__c : raes.Shippment_adress_detail__c; |
| | | if (raesdList == null) { |
| | | raesdList = new List<Rental_Apply_Equipment_Set_Detail__c>(); |
| | | } |
| | | lineList = new List<lineInfo>(); |
| | | } |
| | | } |
| | | |
| | | class lineInfo { |
| | | //bp2 |
| | | public String index { get; private set; } // 序号 |
| | | public String setName { get; private set; } // 备品set型号 |
| | | public String dModelNo { get; private set; } // 备品配套明细型号 |
| | | public String dChinaName { get; private set; } // 中文名称 |
| | | public String dSerialNumber { get; private set; } // 机身号 |
| | | public String dLoaner_asset_no { get; private set; } // 固定资产号码 |
| | | public String dManagementnumber { get; private set; } // 管理号码 |
| | | public String dQRCode { get; private set; } // 二维码 |
| | | private Integer maxLineContact; |
| | | public String wh_location { get; private set; } // 货位号 |
| | | |
| | | |
| | | public String name1 { get; private set; } |
| | | public String productName1 { get; private set; } |
| | | public String serialNumber1 { get; private set; } |
| | | public String name2 { get; private set; } |
| | | public String productName2 { get; private set; } |
| | | public String serialNumber2 { get; private set; } |
| | | public String LoanerCode {get;private set;} //備品型番 |
| | | public String AssetModelNo {get;private set;} //OCM内部产品型号(略称) |
| | | public List<String> AssetModelNoList {get;private set;}//OCM内部产品型号(略称) 集合 |
| | | public integer LineHeight {get;private set;} //记录行高 |
| | | public integer height {get;private set;} |
| | | // public lineInfo(Equipment_Set_Detail__c esd1, Equipment_Set_Detail__c esd2) { |
| | | // AssetModelNoList = new List<String>(); |
| | | // name1 = esd1.Equipment_Set__r.Name == null ? ' ' : esd1.Equipment_Set__r.Name; |
| | | // productName1 = esd1.Asset__r.Name; |
| | | // serialNumber1 = esd1.SerialNumber__c; |
| | | // name2 = esd2.Name == null ? ' ' : esd2.Name; |
| | | // productName2 = esd2.Asset__r.Name; |
| | | // serialNumber2 = esd2.SerialNumber__c; |
| | | // height = height ==null ? 25: height; |
| | | // LoanerCode = esd1.Equipment_Set__r.Loaner_code__c; |
| | | // } |
| | | // MAXINDEXCOUNT = 26; |
| | | // MAXDCHINNAMECOUNT = 2 |
| | | // MAXDMODELNOCOUNT = 26 |
| | | // MAXDSERIALNUMBERCOUNT |
| | | // MAXDLANCOUNT = 26; |
| | | // MAXDMMCOUNT = 26; |
| | | public lineInfo(Rental_Apply_Equipment_Set_Detail__c raesd, boolean LotFlag, Integer inde) { |
| | | AssetModelNoList = new List<String>(); |
| | | //bp2 |
| | | maxLineContact = 0; |
| | | index = inde == null ? '' : String.valueOf(inde + 1); |
| | | dChinaName = raesd.Fixture_Name_text__c; |
| | | // dChinaName = '457100: 孔口探头,COTTLE型,带工业金刚石,20.5 cm(工业金刚石研磨表面取代了传统的钢纹,这使得操作省力,更简易,同时获得了更高的精确度。它能以极高的精准度切割或研磨较大骨组织)。'; |
| | | // dChinaName = '孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口探头孔口'; |
| | | dModelNo = raesd.Fixture_Model_No_text__c; |
| | | dSerialNumber = raesd.SerialNumber_text__c; |
| | | // dLoaner_asset_no = raesd.Loaner_asset_no__c; |
| | | // OLY_OCM-321 发货确认单:固定资产号字段修改显示为固定资产编号(Key) _c__c? |
| | | dLoaner_asset_no = raesd.Internal_Asset_number_c__c; |
| | | dManagementnumber = raesd.EquipmentSet_Managment_Code_formula__c == null ? ' ' : raesd.EquipmentSet_Managment_Code_formula__c; |
| | | |
| | | |
| | | |
| | | |
| | | name1 = raesd.Equipment_SetD_Borrowed__c == null ? ' ' : raesd.Equipment_SetD_Borrowed__c; |
| | | productName1 = raesd.Asset__r.Name; |
| | | setName = raesd.Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name; |
| | | if(LotFlag){ |
| | | serialNumber1 = ' '; |
| | | LoanerCode = ' '; |
| | | }else{ |
| | | // serialNumber1 = raesd.Rental_Apply_Equipment_Set__r.SerialNumber_text__c; |
| | | LoanerCode = raesd.Rental_Apply_Equipment_Set__r.Loaner_code_text__c; |
| | | } |
| | | //name2 = esd2.Name == null ? ' ' : esd2.Name; |
| | | //productName2 = esd2.Asset__r.Name; |
| | | //serialNumber2 = esd2.SerialNumber__c; |
| | | height = height ==null ? MAXLINEHRIGHT: height; |
| | | wh_location = raesd.Asset__r.WH_location__c; |
| | | } |
| | | } |
| | | // Data Bean |
| | | class PDFInfoIMG { |
| | | public String eSetName { get; private set; } |
| | | // public Equipment_Set__c es { get; private set; } |
| | | public Fixture_Set__c es { get; private set; } |
| | | |
| | | public Rental_Apply_Equipment_Set__c raesc { get; private set; } |
| | | public List<lineInfoIMG> lineList { get; private set; } |
| | | public List<lineInfoIMGrase> lineListIMG { get; private set; } |
| | | |
| | | //public PDFInfoIMG(Rental_Apply_Equipment_Set__c raes, List<Equipment_Set_Detail__c> esdl) { |
| | | // eSetName = raes.Equipment_Set__r.Name; |
| | | // es = raes.Equipment_Set__r; |
| | | // raesc = raes; |
| | | // if (esdl == null) { |
| | | // esdl = new List<Equipment_Set_Detail__c>(); |
| | | // } |
| | | // lineList = new List<lineInfoIMG>(); |
| | | // if (esdl.Size() >= 20) { |
| | | // for (Integer i = 0; i < 5; i++) { |
| | | // lineList.add(new lineInfoIMG(esdl[i*4],esdl[i*4+1],esdl[i*4+2],esdl[i*4+3])); |
| | | // } |
| | | // } else { |
| | | // Integer size = esdl.Size(); |
| | | // for (Integer i = 0; i < 20 - size; i++) { |
| | | // esdl.add(new Equipment_Set_Detail__c(Name=' ')); |
| | | // } |
| | | // for (Integer i = 0; i < 5; i++) { |
| | | // lineList.add(new lineInfoIMG(esdl[i*4],esdl[i*4+1],esdl[i*4+2],esdl[i*4+3])); |
| | | // } |
| | | // } |
| | | // } |
| | | public PDFInfoIMG(Rental_Apply_Equipment_Set__c raes, List<Rental_Apply_Equipment_Set_Detail__c> raesdcl) { |
| | | eSetName = raes.Fixture_Set__r.Name; |
| | | es = raes.Fixture_Set__r; |
| | | if (raesdcl == null) { |
| | | raesdcl = new List<Rental_Apply_Equipment_Set_Detail__c>(); |
| | | } |
| | | lineListIMG = new List<lineInfoIMGrase>(); |
| | | if (raesdcl.Size() >= 20) { |
| | | for (Integer i = 0; i < 5; i++) { |
| | | lineListIMG.add(new lineInfoIMGrase(raesdcl[i*4],raesdcl[i*4+1],raesdcl[i*4+2],raesdcl[i*4+3])); |
| | | } |
| | | } else { |
| | | Integer size = raesdcl.Size(); |
| | | for (Integer i = 0; i < 20 - size; i++) { |
| | | raesdcl.add(new Rental_Apply_Equipment_Set_Detail__c()); |
| | | } |
| | | for (Integer i = 0; i < 5; i++) { |
| | | lineListIMG.add(new lineInfoIMGrase(raesdcl[i*4],raesdcl[i*4+1],raesdcl[i*4+2],raesdcl[i*4+3])); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | class lineInfoIMG { |
| | | //public List<esdInfo> esdl { get; private set; } |
| | | |
| | | //public lineInfoIMG(Equipment_Set_Detail__c e1, Equipment_Set_Detail__c e2, Equipment_Set_Detail__c e3, Equipment_Set_Detail__c e4) { |
| | | // esdl = new List<esdInfo>(); |
| | | // esdl.add(new esdInfo(e1)); |
| | | // esdl.add(new esdInfo(e2)); |
| | | // esdl.add(new esdInfo(e3)); |
| | | // esdl.add(new esdInfo(e4)); |
| | | // //esdl.add(e5); |
| | | //} |
| | | } |
| | | class lineInfoIMGrase { |
| | | public List<esdInfo> esdl { get; private set; } |
| | | |
| | | public lineInfoIMGrase(Rental_Apply_Equipment_Set_Detail__c e1, Rental_Apply_Equipment_Set_Detail__c e2, Rental_Apply_Equipment_Set_Detail__c e3, Rental_Apply_Equipment_Set_Detail__c e4) { |
| | | esdl = new List<esdInfo>(); |
| | | esdl.add(new esdInfo(e1)); |
| | | esdl.add(new esdInfo(e2)); |
| | | esdl.add(new esdInfo(e3)); |
| | | esdl.add(new esdInfo(e4)); |
| | | //esdl.add(e5); |
| | | } |
| | | } |
| | | |
| | | class esdInfo { |
| | | // public Rental_Apply_Equipment_Set_Detail__c esd { get; private set; } |
| | | public Rental_Apply_Equipment_Set_Detail__c raesl { get; private set; } |
| | | public Integer nameLength { get; private set; } |
| | | public String ProductName { get; private set; } |
| | | |
| | | |
| | | public esdInfo(Rental_Apply_Equipment_Set_Detail__c e) { |
| | | raesl = e; |
| | | String name = e.ProductName__c; |
| | | nameLength = name == null ? 0 : name.length(); |
| | | |
| | | if(nameLength <= 21){ |
| | | //一行 |
| | | ProductName = name; |
| | | }else if(nameLength > 21 && nameLength <= 74){ |
| | | //两行 |
| | | if(nameLength <= 42){ |
| | | //7px |
| | | //for(Integer i = 0; i < 2 ; i++){ |
| | | ProductName = name.substring(0,21)+'<br/>'+name.substring(21,nameLength); |
| | | //} |
| | | }else{ |
| | | //4px |
| | | //for(Integer i = 0; i < 2 ; i++){ |
| | | ProductName = name.substring(0,37)+'<br/>'+name.substring(37,nameLength); |
| | | //} |
| | | } |
| | | |
| | | }else{ |
| | | //三行 |
| | | //for(Integer i = 0; i < 3 ; i++){ |
| | | ProductName = name.substring(0,37)+'<br/>' + name.substring(37,74)+'<br/>'+name.substring(74,nameLength); |
| | | //} |
| | | } |
| | | } |
| | | } |
| | | } |
| 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> |
| | |
| | | |
| | | protected override void beforeInsert() { |
| | | beforeSetValue(); |
| | | //add by rentx 20210730 新品收货_集中备品_建立数据逻辑限制 start |
| | | // setSpareuseaccessories(); |
| | | //add by rentx 20210730 新品收货_集中备品_建立数据逻辑限制 end |
| | | } |
| | | protected override void beforeUpdate() { |
| | | beforeSetValue(); |
| | | //add by rentx 20210730 新品收货_集中备品_建立数据逻辑限制 start |
| | | // setSpareuseaccessories(); |
| | | //add by rentx 20210730 新品收货_集中备品_建立数据逻辑限制 end |
| | | } |
| | | |
| | | private void beforeSetValue() { |
| | |
| | | nObj.Loaner_code__c = nObj.Name; |
| | | } |
| | | } |
| | | |
| | | //add by rentx 20210730 新品收货_集中备品_建立数据逻辑限制 start |
| | | /*private void setSpareuseaccessories(){ |
| | | // List<Fixture_Set_Detail__c> detailList = new List<Fixture_Set_Detail__c>(); |
| | | List<Fixture_Set_Detail__c> detailList = [select id,Is_Body__c,Fixture_Set__c,Fixture_Model_No_F__c from Fixture_Set_Detail__c where Fixture_Set__c in :newMap.keySet()]; |
| | | if (detailList != null && detailList.size() > 0) { |
| | | Map<Id,Map<String,Boolean>> spareMap = new Map<Id,Map<String,Boolean>>(); |
| | | for (Fixture_Set_Detail__c detail : detailList) { |
| | | if (!spareMap.containsKey(detail.Fixture_Set__c)) { |
| | | Map<String,Boolean> tempMap = new Map<String,Boolean>(); |
| | | spareMap.put(detail.Fixture_Set__c, tempMap); |
| | | } |
| | | Map<String,Boolean> tempMap = spareMap.get(detail.Fixture_Set__c); |
| | | tempMap.put(detail.Fixture_Model_No_F__c, detail.Is_Body__c); |
| | | spareMap.put(detail.Fixture_Set__c, tempMap); |
| | | } |
| | | for (Fixture_Set__c nObj : newList) { |
| | | // if (nObj.Spareuseaccessories__c == null) { |
| | | Map<String,Boolean> tempMap = spareMap.get(nObj.Id); |
| | | // if (tempMap != null && tempMap.get(nObj.Name) != null) { |
| | | nObj.Spareuseaccessories__c = tempMap.get(nObj.Name); |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | |
| | | }*/ |
| | | //add by rentx 20210730 新品收货_集中备品_建立数据逻辑限制 end |
| | | |
| | | } |
| | |
| | | new SelectOption('10.服务本部', '10.服务本部'), |
| | | new SelectOption('11.医疗产品培训本部', '11.医疗产品培训本部'), |
| | | // new SelectOption('12.能量事业本部', '12.能量事业本部'),// 20220107 ljh update |
| | | new SelectOption('16.消化·呼吸领域解决方案本部', '16.消化·呼吸领域解决方案本部') |
| | | new SelectOption('16.消化·呼吸领域解决方案本部', '16.Solution本部') |
| | | // new SelectOption('17.市场企划本部', '17.市场企划本部') |
| | | }; |
| | | |
| | |
| | | new SelectOption('10.服务本部', '10.服务本部'), |
| | | new SelectOption('11.医疗产品培训本部', '11.医疗产品培训本部'), |
| | | // new SelectOption('12.能量事业本部', '12.能量事业本部'),20220107 ljh update |
| | | new SelectOption('16.消化·呼吸领域解决方案本部', '16.消化·呼吸领域解决方案本部') |
| | | new SelectOption('16.消化·呼吸领域解决方案本部', '16.Solution本部') |
| | | // new SelectOption('17.市场企划本部', '17.市场企划本部') |
| | | }; |
| | | |
| | |
| | | protected override void afterUpdate() { |
| | | followUpdate(); |
| | | } |
| | | protected override void afterInsert() { |
| | | followUpdate(); |
| | | } |
| | | public void followUpdate(){ |
| | | Map<SObject,List<String>> data = new Map<SObject,List<String>>(); |
| | | List<ReportMemo__c> rmList = new List<ReportMemo__c>(); |
| New file |
| | |
| | | public with sharing class ImprovedForecastTimeController { |
| | | @AuraEnabled |
| | | public static String GetOppinformationcData(String ParamIdStr) { |
| | | //获取数据 |
| | | List<InquiryPredictsDateChange__c> ipdList = Database.query('Select Id,Name,Opportunity__c,Date_InAdvance_Delay__c,CloseDate__c, CloseDate_Old__c, Close_Forecasted_Date__c,Predicted_date_ChangeReason__c,Predicted_Date_Status__c,Close_Forecasted_Date_Old__c, Manager_name__c,Sales_assistant_name__c From InquiryPredictsDateChange__c Where Opportunity__c = : ParamIdStr order by CreatedDate desc'); |
| | | if(ipdList.size() > 0){ |
| | | OppInfo opp = new OppInfo(ipdList[0]); |
| | | return JSON.serialize(opp); |
| | | }else{ |
| | | Opportunity arrays = Database.query('Select Id,Name,Opportunity_No__c,CloseDate, Close_Forecasted_Date__c,Manager_name_text__c,Sales_assistant_name_text__c From Opportunity Where id = : ParamIdStr'); |
| | | System.debug('lt123arrays'+arrays); |
| | | OppInfo opp = new OppInfo(arrays); |
| | | return JSON.serialize(opp); |
| | | } |
| | | } |
| | | |
| | | public class OppInfo { |
| | | // 询价Id |
| | | public String Opportunity { get; set; } |
| | | // 询价编码 |
| | | public String Opportunity_No { get; set; } |
| | | // 询价预测表Id |
| | | public String datechangeId { get; set; } |
| | | // 预测KPI当前值 |
| | | public Date Close_Forecasted_Date_Old { get; set; } |
| | | // 预测KPI目标值 |
| | | public Date Close_Forecasted_Date { get; set; } |
| | | |
| | | // 20220830 “担当”字段弃用 只用“kpi”字段判断 |
| | | // // 预测担当当前值 |
| | | // public Date Close_Forecasted_Assume_Date_Old { get; set; } |
| | | // // 预测担当目标值 |
| | | // public Date Close_Forecasted_Assume_Date { get; set; } |
| | | |
| | | // 预测发货当前值 |
| | | public Date CloseDate_Old { get; set; } |
| | | // 预测发货目标值 |
| | | public Date CloseDate { get; set; } |
| | | // 提前/延后 |
| | | public String Date_InAdvance_Delay { get; set; } |
| | | // 原因 |
| | | public String Predicted_date_ChangeReason { get; set; } |
| | | // cl6经理 |
| | | public String Manager_name { get; set; } |
| | | // 助理 |
| | | public String Sales_assistant_name { get; set; } |
| | | // 状态 |
| | | public String Predicted_Date_Status { get; set; } |
| | | |
| | | // 增加一个字段 用来做判断用的 |
| | | public Date Close_Forecasted_Check { get; set; } |
| | | |
| | | // 从询价上获得数据 |
| | | public OppInfo(Opportunity opp) { |
| | | Opportunity = opp.Id; |
| | | Opportunity_No = opp.Opportunity_No__c; |
| | | Close_Forecasted_Date_Old = opp.Close_Forecasted_Date__c; |
| | | // Close_Forecasted_Assume_Date_Old = opp.Close_Forecasted_Assume_Date__c; |
| | | CloseDate_Old = opp.CloseDate; |
| | | Manager_name = opp.Manager_name_text__c; |
| | | Sales_assistant_name = opp.Sales_assistant_name_text__c; |
| | | |
| | | //20220830 “担当”字段弃用 只用“kpi”字段判断 |
| | | //Close_Forecasted_Check = opp.Close_Forecasted_Assume_Date__c != null ? opp.Close_Forecasted_Assume_Date__c : opp.Close_Forecasted_Date__c; |
| | | Close_Forecasted_Check = opp.Close_Forecasted_Date__c; |
| | | } |
| | | // 从询价预测上获得数据 |
| | | public OppInfo(InquiryPredictsDateChange__c datechange) { |
| | | // 把当前已有的值都设置上 |
| | | Opportunity = datechange.Opportunity__c; |
| | | Opportunity_No = datechange.Name; |
| | | datechangeId = datechange.Id; |
| | | |
| | | Close_Forecasted_Date_Old = datechange.Predicted_Date_Status__c == '已批准' ? datechange.Close_Forecasted_Date__c : datechange.Close_Forecasted_Date_Old__c; |
| | | // Close_Forecasted_Assume_Date_Old = datechange.Predicted_Date_Status__c == '已批准' ? datechange.Close_Forecasted_Assume_Date__c : datechange.Close_Forecasted_Assume_Date_Old__c; |
| | | Close_Forecasted_Date = datechange.Close_Forecasted_Date__c; |
| | | // Close_Forecasted_Assume_Date = datechange.Close_Forecasted_Assume_Date__c; |
| | | CloseDate_Old = datechange.Predicted_Date_Status__c == '已批准' ? datechange.CloseDate__c : datechange.CloseDate_Old__c; |
| | | CloseDate = datechange.CloseDate__c; |
| | | |
| | | if(datechange.Predicted_Date_Status__c != '已批准'){ |
| | | // Close_Forecasted_Check = datechange.Close_Forecasted_Assume_Date_Old__c != null ? datechange.Close_Forecasted_Assume_Date_Old__c : datechange.Close_Forecasted_Date_Old__c; |
| | | Close_Forecasted_Check = datechange.Close_Forecasted_Date_Old__c; |
| | | }else { |
| | | // Close_Forecasted_Check = datechange.Close_Forecasted_Assume_Date__c != null ? datechange.Close_Forecasted_Assume_Date__c : datechange.Close_Forecasted_Date__c; |
| | | Close_Forecasted_Check = datechange.Close_Forecasted_Date__c; |
| | | } |
| | | |
| | | Manager_name = datechange.Manager_name__c; |
| | | Sales_assistant_name = datechange.Sales_assistant_name__c; |
| | | |
| | | Date_InAdvance_Delay = datechange.Date_InAdvance_Delay__c; |
| | | Predicted_date_ChangeReason = datechange.Predicted_date_ChangeReason__c; |
| | | Predicted_Date_Status = datechange.Predicted_Date_Status__c; |
| | | } |
| | | } |
| | | |
| | | // 把页面上的数据赋值到询价预测的对象上 |
| | | private static InquiryPredictsDateChange__c mergeInfo(Map<String, Object> oppMap) { |
| | | InquiryPredictsDateChange__c datechange = new InquiryPredictsDateChange__c(); |
| | | |
| | | if (String.isBlank(String.valueOf(oppMap.get('Predicted_Date_Status'))) || !'已批准'.equals(String.valueOf(oppMap.get('Predicted_Date_Status')))) { |
| | | datechange.Id = String.valueOf(oppMap.get('datechangeId')); |
| | | } |
| | | if (String.isBlank(datechange.Id)){ |
| | | datechange.Opportunity__c = String.valueOf(oppMap.get('Opportunity')); |
| | | datechange.Name = String.valueOf(oppMap.get('Opportunity_No')); |
| | | } |
| | | // 当前的日期都从对象上获取 |
| | | if(oppMap.get('Close_Forecasted_Date_Old') != null){ |
| | | datechange.Close_Forecasted_Date_Old__c = Date.valueOf(String.valueOf(oppMap.get('Close_Forecasted_Date_Old'))); |
| | | } |
| | | // if(oppMap.get('Close_Forecasted_Assume_Date_Old') != null){ |
| | | // datechange.Close_Forecasted_Assume_Date_Old__c = Date.valueOf(String.valueOf(oppMap.get('Close_Forecasted_Assume_Date_Old'))); |
| | | // } |
| | | if(oppMap.get('CloseDate_Old') != null){ |
| | | datechange.CloseDate_Old__c = Date.valueOf(String.valueOf(oppMap.get('CloseDate_Old'))); |
| | | } |
| | | // 新的日期全跟预测担当有关 |
| | | datechange.Close_Forecasted_Date__c = Date.valueOf(String.valueOf(oppMap.get('Close_Forecasted_Date'))); |
| | | // datechange.Close_Forecasted_Assume_Date__c = Date.valueOf(String.valueOf(oppMap.get('Close_Forecasted_Assume_Date'))); |
| | | datechange.CloseDate__c = Date.valueOf(String.valueOf(oppMap.get('CloseDate'))); |
| | | |
| | | datechange.Manager_name__c = String.valueOf(oppMap.get('Manager_name')); |
| | | datechange.Sales_assistant_name__c = String.valueOf(oppMap.get('Sales_assistant_name')); |
| | | |
| | | datechange.Date_InAdvance_Delay__c = String.valueOf(oppMap.get('Date_InAdvance_Delay')); |
| | | datechange.Predicted_date_ChangeReason__c = String.valueOf(oppMap.get('Predicted_date_ChangeReason')); |
| | | |
| | | // 状态设置为已提交 |
| | | datechange.Predicted_Date_Status__c = '已提交'; |
| | | |
| | | return datechange; |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static String getReason(){ |
| | | return System.Label.DateChangeReason; |
| | | } |
| | | |
| | | //保存数据 JSONData 是 json格式的值 |
| | | @AuraEnabled |
| | | public static string SaveData(String JsonData){ |
| | | try{ |
| | | // InquiryPredictsDateChange__c ipd = (InquiryPredictsDateChange__c)JSON.deserialize(JsonData,InquiryPredictsDateChange__c.class); |
| | | // OppInfo opp = (OppInfo)JSON.deserializeUntyped(JsonData); |
| | | Map<String, Object> oppMap = (Map<String, Object>)JSON.deserializeUntyped(JsonData); |
| | | System.debug('lt123JsonData'+JsonData); |
| | | InquiryPredictsDateChange__c ipd = mergeInfo(oppMap); |
| | | // ipd.Predicted_Date_Status__c = '已提交'; |
| | | upsert ipd; |
| | | }catch(Exception ex) |
| | | { |
| | | return ex.getLineNumber()+' 行错误 : '+ex.getMessage(); |
| | | } |
| | | return '成功'; |
| | | } |
| | | } |
| 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 ImprovedForecastTimeControllerTest { |
| | | |
| | | @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; |
| | | |
| | | String str = JSON.serialize(ipd); |
| | | |
| | | ImprovedForecastTimeController.OppInfo controller = new ImprovedForecastTimeController.OppInfo(ipd); |
| | | ImprovedForecastTimeController.OppInfo controller1 = new ImprovedForecastTimeController.OppInfo(opp); |
| | | ImprovedForecastTimeController.GetOppinformationcData(String.valueOf(opp.Id)); |
| | | ImprovedForecastTimeController.getReason(); |
| | | ImprovedForecastTimeController.SaveData(str); |
| | | |
| | | } |
| | | |
| | | @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; |
| | | |
| | | ImprovedForecastTimeController.OppInfo controller = new ImprovedForecastTimeController.OppInfo(opp); |
| | | ImprovedForecastTimeController.GetOppinformationcData(String.valueOf(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> |
| | |
| | | public without sharing class InquiryFormHandler extends Oly_TriggerHandler { |
| | | private Map<Id, Inquiry_form__c> newMap; |
| | | private Map<Id, Inquiry_form__c> oldMap; |
| | | private List<Inquiry_form__c> newList; |
| | | private List<Inquiry_form__c> oldList; |
| | | private Map<Id, Inquiry_form__c> newMap; |
| | | private Map<Id, Inquiry_form__c> oldMap; |
| | | private List<Inquiry_form__c> newList; |
| | | private List<Inquiry_form__c> oldList; |
| | | |
| | | public InquiryFormHandler(){ |
| | | |
| | | this.newMap = (Map<Id, Inquiry_form__c>) Trigger.newMap; |
| | | this.newMap = (Map<Id, Inquiry_form__c>) Trigger.newMap; |
| | | this.oldMap = (Map<Id, Inquiry_form__c>) Trigger.oldMap; |
| | | this.newList = (List<Inquiry_form__c>) Trigger.new; |
| | | this.oldList = (List<Inquiry_form__c>) Trigger.old; |
| | |
| | | Inquiry_form__c oObj = null; |
| | | List<String> depIDList = new List<String>(); |
| | | List<Account> accList = new List<Account>(); |
| | | //20220511 you SWAG-CBUB2W start |
| | | Map<String, OCM_Management_Province__c> mpMap = new Map<String, OCM_Management_Province__c>(); |
| | | Set<String> accOCSMset = new Set<String>(); |
| | | //20220511 you SWAG-CBUB2W end |
| | | |
| | | for(Inquiry_form__c nnObj : newList) { |
| | | if (oldMap != null && oldMap.containsKey(nnObj.Id)) { |
| | | oObj = oldMap.get(nnObj.Id); |
| | | } |
| | | if (String.isNotBlank(nnObj.Hospital_Name__c) && (Trigger.isInsert || oObj.Hospital_Name__c != nnObj.Hospital_Name__c || System.Label.Inquiry_form_flag == 'True')) { |
| | | if (String.isNotBlank(nnObj.Hospital_Name__c) && (Trigger.isInsert || oObj.Hospital_Name__c != nnObj.Hospital_Name__c)) {// || System.Label.Inquiry_form_flag == 'True') |
| | | depIDList.add(nnObj.Hospital_Name__c); |
| | | } |
| | | if (Trigger.isUpdate && String.isBlank(nnObj.Hospital_Name__c)){ |
| | |
| | | nnObj.Department_Class__c = null; //战略科室 |
| | | nnObj.HospitalName__c = null; //医院名 |
| | | nnObj.Hospital__c = null; //医院 |
| | | nnObj.CreateDate__c = null; //创建日 |
| | | } |
| | | //20220419 you SWAG-CBUB2W start |
| | | //公式考文本 给FSE担当赋值 |
| | | System.debug(nnObj.FSE_Owner_id__c+'==123=='+nnObj.FSE_Owner__c); |
| | | if(nnObj.FSE_Owner_id__c != nnObj.FSE_Owner__c){ |
| | | nnObj.FSE_Owner__c = nnObj.FSE_Owner_id__c; |
| | | //20220507 SWAG-CBUB2W you start |
| | | if(Trigger.isInsert || oObj.Request1__c != nnObj.Request1__c){ |
| | | if(String.isNotBlank(nnObj.Request1__c) && '服务对应' == nnObj.Request1__c && String.isBlank(nnObj.Follow_Content__c)){ |
| | | nnObj.Status__c =''; |
| | | }else if( String.isBlank(nnObj.Status__c) && (nnObj.Request1__c.indexOf('需要报价')!=-1 || nnObj.Request1__c.indexOf('OPD')!=-1 || nnObj.Request1__c.indexOf('产品说明')!=-1 || nnObj.Request1__c.indexOf('寄送产品资料')!=-1)){ |
| | | nnObj.Status__c ='01.未跟进'; |
| | | } |
| | | |
| | | } |
| | | if(Trigger.isInsert && (nnObj.Request1__c.indexOf('服务对应') !=-1 || nnObj.ServiceCorrespond__c ==true)){ |
| | | nnObj.Service_Status__c ='01.未跟进'; |
| | | } |
| | | //20220419 you SWAG-CBUB2W end |
| | | //20220507 SWAG-CBUB2W you end |
| | | //20220511 you SWAG-CBUB2W start |
| | | if(Trigger.isUpdate){ |
| | | /** 挪到营业跟进页面 |
| | | if(false != nnObj.Redistribution__c && String.isBlank(nnObj.GotoDepartment__c)){ |
| | | nnObj.GotoDepartment__c.addError('勾选时必须填写转至科室'); |
| | | } |
| | | if(false == nnObj.Redistribution__c && String.isNotBlank(nnObj.GotoDepartment__c)){ |
| | | nnObj.GotoDepartment__c.addError('未勾选时不能填写转至科室'); |
| | | } |
| | | **/ |
| | | if(String.isNotBlank(nnObj.GotoDepartment__c) && nnObj.GotoDepartment__c != oObj.GotoDepartment__c){ |
| | | nnObj.RedistributionDate__c = System.now(); |
| | | accOCSMset.add(nnObj.OCM_man_province_cus__c); |
| | | } |
| | | if(String.isNotBlank(nnObj.Hospital_Name__c) && String.isNotBlank(oObj.Hospital_Name__c) && nnObj.Hospital_Name__c != oObj.Hospital_Name__c ){ |
| | | nnObj.AssistantRedistributionDate__c = System.now(); |
| | | } |
| | | } |
| | | //20220511 you SWAG-CBUB2W end |
| | | } |
| | | |
| | | if (depIDList.size()>0) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | //20220511 you SWAG-CBUB2W start |
| | | if(null !=accOCSMset){ |
| | | List<OCM_Management_Province__c> mpList = |
| | | [select id, Name, GI_assistant__c,SP_assistant__c from OCM_Management_Province__c where Name =: accOCSMset]; |
| | | |
| | | // 取得OCSM管理省的GI,SP 助理 |
| | | for (OCM_Management_Province__c mp : mpList) { |
| | | mpMap.put(mp.Name, mp); |
| | | } |
| | | } |
| | | //20220511 you SWAG-CBUB2W end |
| | | |
| | | for(Inquiry_form__c nObj : newList) { |
| | | if (accMap.containsKey(nObj.Hospital_Name__c)){ |
| | | nObj.Depart_Owner__c = accMap.get(nObj.Hospital_Name__c).OwnerId; //战略科室所有人 |
| | |
| | | nObj.HospitalName__c = accMap.get(nObj.Hospital_Name__c).Hospital__r.Name; //医院名 |
| | | nObj.Hospital__c = accMap.get(nObj.Hospital_Name__c).Hospital__c; //医院 |
| | | } |
| | | |
| | | |
| | | |
| | | //产品信息的拼接 |
| | | //产品信息的拼接 |
| | | if (String.isNotBlank(nObj.Product1__c) && String.isNotBlank(nObj.Product1_Manual__c)){ |
| | | nObj.Product1__c = nObj.Product1__c +';'+nObj.Product1_Manual__c; |
| | | }else if (String.isBlank(nObj.Product1__c) && String.isNotBlank(nObj.Product1_Manual__c)){ |
| | |
| | | } |
| | | |
| | | nObj.Product1_Manual__c = ''; |
| | | //20220419 you SWAG-CBUB2W start |
| | | //公式考文本 给FSE担当赋值 这段必须放在这,因为新创建的数据,存在科室为空的情况, |
| | | System.debug(nObj.FSE_Owner_id__c+'==123=='+nObj.FSE_Owner__c); |
| | | if(nObj.FSE_Owner_id__c != nObj.FSE_Owner__c){ |
| | | nObj.FSE_Owner__c = nObj.FSE_Owner_id__c; |
| | | } |
| | | if(Trigger.isInsert){ |
| | | if( nObj.Request1__c.indexOf('服务对应') !=-1 || nObj.ServiceCorrespond__c ==true){ |
| | | nObj.Service_Status__c ='01.未跟进'; |
| | | } |
| | | if(String.isBlank(nObj.Hospital_Name__c)){ |
| | | nObj.CreateDate__c = null; //创建日 |
| | | }else{ |
| | | nObj.CreateDate__c = Date.today(); |
| | | } |
| | | } |
| | | if(Trigger.isUpdate){ |
| | | |
| | | if((nObj.Request1__c != oldMap.get(nObj.Id).Request1__c && nObj.Request1__c.indexOf('服务对应') !=-1) || (nObj.ServiceCorrespond__c != oldMap.get(nObj.Id).ServiceCorrespond__c && nObj.ServiceCorrespond__c ==true)){ |
| | | if(String.isBlank(nObj.Service_Status__c)){ |
| | | nObj.Service_Status__c ='01.未跟进'; |
| | | }else{ |
| | | |
| | | } |
| | | }else if( nObj.Request1__c.indexOf('服务对应') ==-1 && nObj.ServiceCorrespond__c ==false){ |
| | | nObj.Service_Status__c =''; |
| | | } |
| | | if(nObj.Hospital_Name__c != oldMap.get(nObj.Id).Hospital_Name__c && String.isBlank(oldMap.get(nObj.Id).Hospital_Name__c)){ |
| | | nObj.CreateDate__c = Date.today(); |
| | | } |
| | | //20220419 you SWAG-CBUB2W end |
| | | //20220511 you SWAG-CBUB2W start |
| | | if(null!=mpMap && mpMap.containsKey(nObj.OCM_man_province_cus__c)){ |
| | | OCM_Management_Province__c omp = mpMap.get(nObj.OCM_man_province_cus__c); |
| | | if (omp != null) { |
| | | nObj.GI_assistant__c = omp.GI_assistant__c; |
| | | nObj.SP_assistant__c = omp.SP_assistant__c; |
| | | //nObj.OCSM_ID__c = omp.id; |
| | | } |
| | | } |
| | | //20220511 you SWAG-CBUB2W end |
| | | //不需要日期,跟进日期,服务跟进日期,创建意向日期,比较最早日期 |
| | | String date1; |
| | | String date2; |
| | | String date3; |
| | | String date4; |
| | | if(null != nObj.No_Need_Date__c){ |
| | | date1=String.valueOf(nObj.No_Need_Date__c); |
| | | } |
| | | if(null != nObj.Follow_Date__c){ |
| | | date2=String.valueOf(nObj.Follow_Date__c); |
| | | } |
| | | if(null != nObj.Confirmation_Date__c){ |
| | | date3=String.valueOf(nObj.Confirmation_Date__c); |
| | | } |
| | | if(null != nObj.Service_Follow_Date__c){ |
| | | date4=String.valueOf(nObj.Service_Follow_Date__c); |
| | | } |
| | | |
| | | //方法调用 |
| | | Date date_MD; |
| | | if((String.isNotBlank(date1) && nObj.No_Need_Date__c !=oldMap.get(nObj.Id).No_Need_Date__c) || (String.isNotBlank(date2) && nObj.Follow_Date__c !=oldMap.get(nObj.Id).Follow_Date__c) || (String.isNotBlank(date3) && nObj.Confirmation_Date__c !=oldMap.get(nObj.Id).Confirmation_Date__c) || (String.isNotBlank(date4) && nObj.Service_Follow_Date__c !=oldMap.get(nObj.Id).Service_Follow_Date__c)){ |
| | | date_MD =getBigTime(date1,date2,date3,date4); |
| | | nObj.MinimumDate__c = date_MD;//最小日期 |
| | | String date5 = nObj.CreateDate__c==null?'':String.valueOf(nObj.CreateDate__c); |
| | | if(null != nObj.CreateDate__c){ |
| | | String confdate=calendarUtil.getWorkDayNum(date5,String.valueOf(date_MD)); |
| | | //nObj.addError(s+'=='+date5+'==='+String.valueOf(date_MD)+'=='+e+'=='+confdate); |
| | | nObj.Confirmation_days__c =Integer.valueOf(confdate); |
| | | system.debug('跑这了3'); |
| | | }else{ |
| | | nObj.Confirmation_days__c = null; |
| | | system.debug('跑这了1'); |
| | | } |
| | | |
| | | } |
| | | //处理老数据 |
| | | if( System.Label.Inquiry_form_flag == 'True' && null != nObj.CreateDate__c){ |
| | | if(String.isNotBlank(date1) || String.isNotBlank(date2) || String.isNotBlank(date3) || String.isNotBlank(date4)){ |
| | | date_MD =getBigTime(date1,date2,date3,date4); |
| | | nObj.MinimumDate__c = date_MD;//最小日期 |
| | | String date5 = nObj.CreateDate__c==null?'':String.valueOf(nObj.CreateDate__c); |
| | | String confdate=calendarUtil.getWorkDayNum(date5,String.valueOf(date_MD)); |
| | | system.debug('跑这了2'+date5+'==='+String.valueOf(date_MD)+'=='+confdate); |
| | | nObj.Confirmation_days__c =Integer.valueOf(confdate); |
| | | } |
| | | } |
| | | system.debug('==='+date_MD); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | //20220419 you SWAG-CBUB2W start |
| | | private void shareToFSEMain() { |
| | | //存放用于新增的共享数据 |
| | | List<Inquiry_form__Share> insertList = new List<Inquiry_form__Share>(); |
| | | //存放(产品咨询单id,共享对象) |
| | | Map<Id,Inquiry_form__Share> insertMap = new Map<Id,Inquiry_form__Share>(); |
| | | //存放最后需要新增的共享数据 |
| | | List<Inquiry_form__Share> lastInsertList = new List<Inquiry_form__Share>(); |
| | | //存放已有的相同的共享原因的数据 |
| | | List<Id> deleteTargetAOIdList = new List<Id>(); |
| | | List<Id> deleteTargetAOIdList = new List<Id>(); |
| | | //存放(产品咨询单id,共享对象) |
| | | Map<Id,Inquiry_form__Share> insertMap1 = new Map<Id,Inquiry_form__Share>(); |
| | | Map<Id,Inquiry_form__Share> insertMap2 = new Map<Id,Inquiry_form__Share>(); |
| | | Map<Id,Inquiry_form__Share> insertMap3 = new Map<Id,Inquiry_form__Share>(); |
| | | //存放用于的id |
| | | List<Id> userIdList = new List<Id>(); |
| | | // String rowCause = 'Manual'; |
| | | //存放用于的id 用来删除 |
| | | List<Id> userIdListold = new List<Id>(); |
| | | //新增一个共享原因 |
| | | String rowCause = Schema.Inquiry_form__Share.RowCause.FSE_Owner_c_User__c; |
| | | System.debug('rowCause:'+rowCause); |
| | | String ownerCause = 'Owner'; |
| | | //Apex共有の理由名OCSM_Owner_c_User |
| | | for(Inquiry_form__c nObj : newList) { |
| | | Inquiry_form__c oObj = null; |
| | | System.debug('FSE主担当:'+nObj.FSE_Owner__c); |
| | | Inquiry_form__c oObj = null; |
| | | if (oldMap != null && oldMap.containsKey(nObj.Id)) { |
| | | oObj = oldMap.get(nObj.Id); |
| | | oObj = oldMap.get(nObj.Id); |
| | | } |
| | | |
| | | |
| | | if ( nObj.FSE_Owner__c != null && (oObj == null || oObj.FSE_Owner__c != nObj.FSE_Owner__c)) { |
| | | Inquiry_form__Share aos = new Inquiry_form__Share( |
| | | RowCause = rowCause, |
| | | ParentId = nObj.Id, |
| | | UserOrGroupId = nObj.FSE_Owner__c, |
| | | AccessLevel = 'Edit'); |
| | | //存放要新增的共享数据 |
| | | insertList.add(aos); |
| | | System.debug('key:'+nObj.Id); |
| | | RowCause = rowCause, |
| | | ParentId = nObj.Id, |
| | | UserOrGroupId = nObj.FSE_Owner__c, |
| | | AccessLevel = 'Edit'); |
| | | //存放(产品咨询单id,共享对象); |
| | | insertMap.put(nObj.Id,aos); |
| | | insertMap1.put(nObj.Id,aos); |
| | | //存放用户id 用作检索条件 |
| | | userIdList.add(nObj.FSE_Owner__c); |
| | | if(oObj != null && oObj.FSE_Owner__c != nObj.FSE_Owner__c){ |
| | | userIdListold.add(oObj.FSE_Owner__c); |
| | | deleteTargetAOIdList.add(nObj.Id); |
| | | } |
| | | System.debug('insertMap1:'+insertMap1); |
| | | System.debug('IDlIST:'+deleteTargetAOIdList); |
| | | //shareToFSEMainPublicMethod(insertMap,userIdList,deleteTargetAOIdList,rowCause,userIdListold); |
| | | } |
| | | if(oObj != null && oObj.FSE_Owner__c != nObj.FSE_Owner__c){ |
| | | deleteTargetAOIdList.add(nObj.Id); |
| | | if( nObj.GI_assistant__c != null && oObj.GI_assistant__c != nObj.GI_assistant__c){ |
| | | Inquiry_form__Share aos = new Inquiry_form__Share( |
| | | RowCause = rowCause, |
| | | ParentId = nObj.Id, |
| | | UserOrGroupId = nObj.GI_assistant__c, |
| | | AccessLevel = 'Edit'); |
| | | //存放(产品咨询单id,共享对象); |
| | | insertMap2.put(nObj.Id,aos); |
| | | //存放用户id 用作检索条件 |
| | | userIdList.add(nObj.GI_assistant__c); |
| | | if(oObj != null && oObj.GI_assistant__c != nObj.GI_assistant__c){ |
| | | userIdListold.add(oObj.GI_assistant__c); |
| | | deleteTargetAOIdList.add(nObj.Id); |
| | | } |
| | | System.debug('insertMap2:'+insertMap2); |
| | | System.debug('IDlIST:'+deleteTargetAOIdList); |
| | | //shareToFSEMainPublicMethod(insertMap,userIdList,deleteTargetAOIdList,rowCause,userIdListold); |
| | | } |
| | | } |
| | | System.debug('insertList:'+insertList); |
| | | System.debug('insertMap1:'+insertMap); |
| | | System.debug('IDlIST:'+deleteTargetAOIdList); |
| | | if( nObj.SP_assistant__c != null && oObj.SP_assistant__c != nObj.SP_assistant__c){ |
| | | Inquiry_form__Share aos = new Inquiry_form__Share( |
| | | RowCause = rowCause, |
| | | ParentId = nObj.Id, |
| | | UserOrGroupId = nObj.SP_assistant__c, |
| | | AccessLevel = 'Edit'); |
| | | //存放(产品咨询单id,共享对象); |
| | | insertMap3.put(nObj.Id,aos); |
| | | //存放用户id 用作检索条件 |
| | | userIdList.add(nObj.SP_assistant__c); |
| | | if(oObj != null && oObj.SP_assistant__c != nObj.SP_assistant__c){ |
| | | userIdListold.add(oObj.SP_assistant__c); |
| | | deleteTargetAOIdList.add(nObj.Id); |
| | | } |
| | | System.debug('insertMap3:'+insertMap3); |
| | | System.debug('IDlIST:'+deleteTargetAOIdList); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | if(null!= insertMap1){ |
| | | shareToFSEMainPublicMethod(insertMap1,userIdList,deleteTargetAOIdList,rowCause,userIdListold); |
| | | } |
| | | if(null!= insertMap2){ |
| | | shareToFSEMainPublicMethod(insertMap2,userIdList,deleteTargetAOIdList,rowCause,userIdListold); |
| | | } |
| | | if(null!= insertMap3){ |
| | | shareToFSEMainPublicMethod(insertMap3,userIdList,deleteTargetAOIdList,rowCause,userIdListold); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | public void shareToFSEMainPublicMethod(Map<Id,Inquiry_form__Share> insertMap,List<Id> userIdList,List<Id> deleteTargetAOIdList,String rowCause, List<Id> userIdListold) { |
| | | |
| | | //存放最后需要新增的共享数据 |
| | | List<Inquiry_form__Share> lastInsertList = new List<Inquiry_form__Share>(); |
| | | //存放已有的相同的共享原因的数据 |
| | | // String rowCause = 'Manual'; |
| | | System.debug('rowCause:'+rowCause); |
| | | String ownerCause = 'Owner'; |
| | | |
| | | // 先 Delete 后 Insert |
| | | if (deleteTargetAOIdList.size() > 0) { |
| | | List<Inquiry_form__Share> deleteList = [SELECT Id |
| | | FROM Inquiry_form__Share |
| | | WHERE RowCause = :rowCause |
| | | AND UserOrGroupId in : userIdListold |
| | | AND ParentId IN :deleteTargetAOIdList |
| | | ]; |
| | | delete deleteList; |
| | |
| | | |
| | | } |
| | | //20220419 you SWAG-CBUB2W end |
| | | //多个日期比较最小日期 |
| | | public static Date getBigTime(String date1, String date2, String date3, String date4) { |
| | | system.debug(date1+'======'+date2+'====='+date3); |
| | | long millis1 =0; |
| | | Long millis2 =0; |
| | | Long millis3 =0; |
| | | Long millis4 =0; |
| | | List<Long> list_dateDecimal = new List<Long>(); |
| | | if(String.isNotBlank(date1)){ |
| | | millis1 = Datetime.valueOf(date1+' 08:00:05').getTime(); |
| | | list_dateDecimal.add(millis1); |
| | | } |
| | | if(String.isNotBlank(date2)){ |
| | | millis2 = Datetime.valueOf(date2+' 08:00:05').getTime(); |
| | | list_dateDecimal.add(millis2); |
| | | } |
| | | if(String.isNotBlank(date3)){ |
| | | millis3 = Datetime.valueOf(date3+' 08:00:05').getTime(); |
| | | list_dateDecimal.add(millis3); |
| | | } |
| | | if(String.isNotBlank(date4)){ |
| | | millis4 = Datetime.valueOf(date4+' 08:00:05').getTime(); |
| | | list_dateDecimal.add(millis4); |
| | | } |
| | | |
| | | list_dateDecimal.sort(); |
| | | Date date_Mid; |
| | | if(null !=list_dateDecimal && list_dateDecimal.size()>0){ |
| | | Long aaa=list_dateDecimal[0]; |
| | | DateTime dt =DateTime.newInstance(aaa); |
| | | date_Mid = dt.dateGmt(); |
| | | // DateTime.newInstance |
| | | system.debug('最小的==='+date_Mid+list_dateDecimal); |
| | | } |
| | | |
| | | return date_Mid; |
| | | |
| | | } |
| | | //俩个日期之间的工作日 |
| | | public integer diff(Datetime sdate, Datetime edate){ |
| | | integer count=0; |
| | | Date d1 = Date.valueOf(sdate); |
| | | Date d2 = Date.valueOf(edate); |
| | | integer wDay = d1.daysBetween(d2) ; |
| | | |
| | | do{ |
| | | if(sdate.format('EEEE') == 'Saturday') { |
| | | count++; |
| | | } |
| | | if(sdate.format('EEEE') == 'Sunday') { |
| | | count++; |
| | | } |
| | | sdate= sdate.adddays(1); |
| | | }while(sdate<=edate); |
| | | |
| | | wDay = wDay-count+1; |
| | | system.debug('*************'+wDay); |
| | | return wDay; |
| | | } |
| | | //客户人员录入后,【电话】【邮箱】自动录入 thh 20220321 start |
| | | // private void getContactInformation(){ |
| | | // List<String> ContactIdList = new List<String>(); |
| | |
| | | // } |
| | | |
| | | // } |
| | | |
| | | |
| | | @TestVisible private static 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++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | //可以多写点 |
| | | } |
| | | } |
| | |
| | | @isTest |
| | | private class InquiryFormHandlerTest { |
| | | @TestSetup |
| | | |
| | | static testMethod void updaue() { |
| | | InquiryFormHandler.test();//先调用这个,然后继续补充测试类 |
| | | } |
| | | @TestSetup |
| | | static void setup(){ |
| | | TestDataUtility.CreatePIPolicyConfiguration('Agency_Contact__c'); |
| | | TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Agency_Contact__c','Contact'}); |
| | | } |
| | | |
| | | @isTest |
| | |
| | | |
| | | List<Agency_Contact__c> lra = new List<Agency_Contact__c>(); |
| | | lra.add(new Agency_Contact__c( |
| | | Id = 'a2R1m0000007BPD' |
| | | )); |
| | | 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 Test2(){ |
| | | // Test.setMock(HttpCalloutMock.class, new HttpMock()); |
| | | |
| | | // List<Agency_Contact__c> lra = new List<Agency_Contact__c>(); |
| | | // lra.add(new Agency_Contact__c( |
| | | // Id = 'a2R1m0000007BPD', |
| | | // Aws_Data_Id__c = '123456' |
| | | // )); |
| | | // Test.startTest(); |
| | | // //system.debug(PIHelper.getPIIntegrationInfo('Agency_Contact__c').newEncryptUrl); |
| | | // AWSServiceTool2.EncryptPushCore(Json.serialize(lra),'Agency_Contact__c'); |
| | | // Test.stopTest(); |
| | | // } |
| | | |
| | | class HttpMock implements HttpCalloutMock{ |
| | | |
| | |
| | | // } |
| | | } |
| | | } |
| | | |
| | | @isTest static void test_method_one() { |
| | | 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', Work_Location__c = '北京', 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; |
| | | |
| | | Inquiry_form__c inquiryform = new Inquiry_form__c(); |
| | | inquiryform.Name = '2019102101'; |
| | | inquiryform.Request1__c = '需要报价'; |
| | | inquiryform.Product1__c = '超声'; |
| | | inquiryform.FSE_Owner__c = hpOwner.id; |
| | | insert inquiryform; |
| | | //User hpOwner = new User(Test_staff__c = true, LastName = 'hp', FirstName = 'owner', Alias = 'hp', Work_Location__c = '北京', 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; |
| | | User thisUser = [select Id from User where Id = :UserInfo.getUserId() ]; |
| | | System.runAs ( thisUser ){ |
| | | Inquiry_form__c inquiryform = new Inquiry_form__c(); |
| | | inquiryform.Name = '2019102101'; |
| | | inquiryform.Request1__c = '需要报价'; |
| | | inquiryform.Product1__c = '超声'; |
| | | inquiryform.FSE_Owner__c = thisUser.id; |
| | | insert inquiryform; |
| | | } |
| | | |
| | | } |
| | | // @isTest static void test_method_two() { |
| | |
| | | |
| | | 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', Work_Location__c = '北京', 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; |
| | | User hpOwner2 = new User(Test_staff__c = true, LastName = 'hp2', FirstName = 'owner', Alias = 'hp2', Work_Location__c = '重庆', CommunityNickname = 'hpOwner2', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner2@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id); |
| | | insert hpOwner2; |
| | | //User hpOwner = new User(Test_staff__c = true, LastName = 'hp', FirstName = 'owner', Alias = 'hp', Work_Location__c = '北京', 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; |
| | | //User hpOwner2 = new User(Test_staff__c = true, LastName = 'hp2', FirstName = 'owner', Alias = 'hp2', Work_Location__c = '重庆', CommunityNickname = 'hpOwner2', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner2@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id); |
| | | //insert hpOwner2; |
| | | |
| | | |
| | | |
| | | Account hp = new Account(RecordTypeId = rectHp[0].Id, Name = 'hp', OwnerId = hpOwner.Id); |
| | | hp.FSE_GI_Main_Leader__c = hpOwner.Id; |
| | | hp.FSE_SP_Main_Leader__c = hpOwner2.Id; |
| | | User thisUser = [select Id from User where Id = :UserInfo.getUserId() ]; |
| | | System.runAs ( thisUser ){ |
| | | Account hp = new Account(RecordTypeId = rectHp[0].Id, Name = 'hp', OwnerId = thisUser.Id); |
| | | hp.FSE_GI_Main_Leader__c = thisUser.Id; |
| | | hp.FSE_SP_Main_Leader__c = thisUser.Id; |
| | | insert hp; |
| | | |
| | | //战略科室 |
| | |
| | | inquiryform.Phone__c = '13844756322'; |
| | | inquiryform.Product1__c = '超声'; |
| | | inquiryform.Request1__c = '需要报价'; |
| | | inquiryform.FSE_Owner__c = hpOwner.id; |
| | | inquiryform.FSE_Owner__c = thisUser.id; |
| | | insert inquiryform; |
| | | |
| | | Test.setMock(HttpCalloutMock.class, new HttpMock()); |
| | |
| | | //System.runAs (inquiryform){ |
| | | update inquiryform0; |
| | | //} |
| | | |
| | | } |
| | | } |
| | | // static testMethod void testBeforeUpdate() { |
| | | // //医院 |
| New file |
| | |
| | | public with sharing class InquiryPredictsDateChangeHandler extends Oly_TriggerHandler{ |
| | | |
| | | private List<InquiryPredictsDateChange__c> oldList; |
| | | private List<InquiryPredictsDateChange__c> newList; |
| | | private Map<Id,InquiryPredictsDateChange__c> oldMap; |
| | | private Map<Id,InquiryPredictsDateChange__c> newMap; |
| | | |
| | | public InquiryPredictsDateChangeHandler() { |
| | | this.oldList = (List<InquiryPredictsDateChange__c>) Trigger.old; |
| | | this.newList = (List<InquiryPredictsDateChange__c>) Trigger.new; |
| | | this.oldMap = (Map<Id,InquiryPredictsDateChange__c>) Trigger.oldMap; |
| | | this.newMap = (Map<Id,InquiryPredictsDateChange__c>) Trigger.newMap; |
| | | } |
| | | |
| | | protected override void afterUpdate() { |
| | | addColumn(); |
| | | } |
| | | |
| | | //当审批流程走完时 更新 询价相关字段 |
| | | private void addColumn(){ |
| | | List<Opportunity> oppList = new List<Opportunity>(); |
| | | Map<Id,Opportunity> oppMap = new Map<Id,Opportunity>(); |
| | | List<Id> oppIdList = new List<Id>(); |
| | | |
| | | for (InquiryPredictsDateChange__c ipd :newList ) { |
| | | //判断更新前后的状态是否不同 若不同,则判断更新后的状态是否为'已批准' |
| | | if ((ipd.Predicted_Date_Status__c != oldMap.get(ipd.Id).Predicted_Date_Status__c) && ipd.Predicted_Date_Status__c == '已批准' ) { |
| | | String oppId = ipd.Opportunity__c ; |
| | | Opportunity opp = new Opportunity(); |
| | | |
| | | opp.Id = oppId; |
| | | // opp.Close_Forecasted_Assume_Date__c = ipd.Close_Forecasted_Assume_Date__c; //担当日 |
| | | opp.Close_Forecasted_Date__c = ipd.Close_Forecasted_Date__c; //KPI日 |
| | | opp.CloseDate = ipd.CloseDate__c; //结束日期/预测发货日 |
| | | opp.Date_InAdvance_Delay__c = ipd.Date_InAdvance_Delay__c; //日期提前/延后 |
| | | opp.Predicted_date_ChangeReason__c = ipd.Predicted_date_ChangeReason__c; //改变预测日期原因 |
| | | // opp.Opp_New_Mark__c = ipd.Opp_New_Mark__c; //询价新建标记 |
| | | opp.Opp_Delay_Mark__c = ipd.Opp_Delay_Mark__c; //询价延后标价 |
| | | |
| | | oppList.add(opp); |
| | | |
| | | } |
| | | } |
| | | |
| | | if (oppList.size() > 0) { |
| | | update oppList; |
| | | } |
| | | } |
| | | |
| | | } |
| 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 InquiryPredictsDateChangeHandlerTest { |
| | | @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; |
| | | |
| | | ipd.Predicted_Date_Status__c = '已批准'; |
| | | update ipd; |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| 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> |
| | |
| | | query = 'select id,quoteSavedDate__c,Opportunity.Id,Opportunity.Department_Class__c from quote where Quote_No_last2__c = \'01\' and CreatedDate = today'; |
| | | } |
| | | |
| | | System.debug(LoggingLevel.INFO, '*** query: ' + query); |
| | | |
| | | return Database.getQueryLocator(query); |
| | | } |
| | | |
| | |
| | | for ( QuoteLineItem qlt1:qlt ) { |
| | | ca4.add(qlt1.Product2.Category4__c); |
| | | } |
| | | if (!mapc4.containskey(qlt[0].QuoteId)) { |
| | | if (qlt.size() > 0 && !mapc4.containskey(qlt[0].QuoteId)) { |
| | | mapc4.put(qlt[0].QuoteId,ca4); |
| | | } |
| | | } |
| | |
| | | Date createdDateYear = createdDateStr.addYears(-1); |
| | | |
| | | for (Rental_Apply_Equipment_Set_Detail__c raesd : raesdList) { |
| | | if (raesd.Rental_Apply__r.Strategic_dept__c == quo.Opportunity.Department_Class__c && mapc4.containskey(quo.id) && mapc4.get(quo.id).contains(raesd.Category4__c) && raesd.Bollow_Date__c >= createdDateYear) { |
| | | if (raesd.Rental_Apply__r.Strategic_dept__c == quo.Opportunity.Department_Class__c && mapc4.containskey(quo.Id) && mapc4.get(quo.id).contains(raesd.Category4__c) && raesd.Bollow_Date__c >= createdDateYear) { |
| | | o.WhetherTrySpareParts_3m__c = false; |
| | | o.WhetherTrySpareParts_6m__c = false; |
| | | o.WhetherTrySpareParts_1y__c = false; |
| | |
| | | @isTest(SeeAllData=false) |
| | | @isTest() |
| | | private class InquiryVerifyBatchTest { |
| | | |
| | | private static String quoteNo = 'textQutote01'; |
| | |
| | | private static Date createdDateStr = Date.today(); |
| | | |
| | | static testMethod void testMethod1() { |
| | | System.Test.StartTest(); |
| | | // System.Test.StartTest(); |
| | | InitData(); |
| | | |
| | | ID exid = Database.executeBatch(new InquiryVerifyBatch(),1); |
| | | InquiryVerifyBatch bct1 = new InquiryVerifyBatch(null,null); |
| | | ID exid = Database.executeBatch(new InquiryVerifyBatch(),200); |
| | | // System.Test.StopTest(); |
| | | } |
| | | static testMethod void testMethod2(){ |
| | | System.Test.StartTest(); |
| | | InquiryVerifyBatch bct1 = new InquiryVerifyBatch(2022,4); |
| | | System.schedule('Scheduled Job 5', '0 45 * * * ?', bct1); |
| | | |
| | | System.Test.StopTest(); |
| | | } |
| | | |
| | | private static void InitData() { |
| | | User user = new User(Test_staff__c = true); |
| | | // Oly_TriggerHandler.bypass('AWSServiceTool2'); |
| | | Oly_TriggerHandler.bypass('ContactTriggerHandler'); |
| | | // Oly_TriggerHandler.bypass('PIHelper'); |
| | | User user = new User(); |
| | | user.LastName = '_サンブリッジ'; |
| | | user.FirstName = 'う'; |
| | | user.Alias = 'う'; |
| | |
| | | user.Username = 'olympusTest03@sunbridge.com'; |
| | | user.CommunityNickname = 'う'; |
| | | user.IsActive = true; |
| | | user.Employee_No__c = 'om009238'; |
| | | user.EmailEncodingKey = 'ISO-2022-JP'; |
| | | user.TimeZoneSidKey = 'Asia/Tokyo'; |
| | | user.LocaleSidKey = 'ja_JP'; |
| | |
| | | StaticParameter.EscapeOpportunityHpDeptUpdTrigger = true; |
| | | StaticParameter.EscapeSyncOpportunityTrigger = true; |
| | | |
| | | System.runAs(new User(Id = Userinfo.getUserId())) { |
| | | Oly_TriggerHandler.bypass('UserToContact'); |
| | | insert user; |
| | | // テストデータ |
| | | System.runAs(user){ |
| | | Account company = new Account(); |
| | | company.RecordTypeId = rectCo[0].Id; |
| | | company.Name = 'NFM007TestCompany'; |
| | |
| | | depart.ParentId = section.Id; |
| | | depart.Department_Class__c = section.Id; |
| | | depart.Hospital__c = company.Id; |
| | | section.AgentCode_Ext__c = '9999900'; |
| | | depart.AgentCode_Ext__c = '99999001'; |
| | | insert depart; |
| | | |
| | | Opportunity opp = new Opportunity(); |
| | |
| | | |
| | | QuoteLineItem target = new QuoteLineItem(); |
| | | target.Name__c = 'テスト商品'; |
| | | target.QuoteId = quote.Id; |
| | | target.QuoteId = quote.id; |
| | | target.Quantity = 1; |
| | | target.Cost_Subtotal__c = 0; |
| | | target.Cost__c = 200; |
| | |
| | | String flag='NG2'; |
| | | String d1='产品试用'; |
| | | String dept='医疗华北营业本部'; |
| | | // User user = new User(Test_staff__c = true); |
| | | // user.LastName = '_サンブリッジ'; |
| | | // user.FirstName = 'う'; |
| | | // user.Alias = 'う'; |
| | | // user.Email = 'olympusTest03@sunbridge.com'; |
| | | // user.Username = 'olympusTest03@sunbridge.com'; |
| | | // user.CommunityNickname = 'う'; |
| | | // 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.Province__c = '北京'; |
| | | // user.Dept__c = dept; |
| | | // user.Use_Start_Date__c = Date.today().addMonths(-6); |
| | | // insert user; |
| | | |
| | | |
| | | FixtureDeliverySlip__c fdsObj = new FixtureDeliverySlip__c(); |
| | | fdsObj.Name = '00001'; |
| | |
| | | return JSON.serialize(arrays); |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static Boolean cannotModifyIsRelateProject(String Id){ |
| | | Boolean cannotModify = false; |
| | | String profileIds = System.Label.Tender_IsnotRelated_ModifyDisable; |
| | | // 判断当前用户简档 |
| | | if (profileIds.contains(UserInfo.getProfileId())) { |
| | | // 获取招标项目 判断相关性 |
| | | Tender_information__c tender = [select Id, IsRelateProject__c from Tender_information__c where Id = :Id]; |
| | | if (tender != null && '是'.equals(tender.IsRelateProject__c)) { |
| | | cannotModify = true; |
| | | } |
| | | } |
| | | return cannotModify; |
| | | } |
| | | |
| | | |
| | | //招投标项目列表字段 irrelevantReasons__c 所有的值 |
| | | @AuraEnabled |
| | |
| | | //保存数据 JSONData 是 招投标项目 对象的 json格式的值 |
| | | @AuraEnabled |
| | | public static string SaveData(String JsonData,String Id,String checkboxValue){ |
| | | System.debug('1234567890123'); |
| | | try{ |
| | | Tender_information__c temp = (Tender_information__c)JSON.deserialize(JsonData,Tender_information__c.class); |
| | | // System.debug('temp=='+temp); |
| | | // System.debug('----1----'+temp.InfoOwner__c+'=====2===='+temp.SP_assistant__c); |
| | | // List<String> Apilist = new List<String>{'01210000000QezeAAC','01210000000QezjAAC','01210000000QezoAAC','01210000000QeztAAC'}; |
| | | // System.debug('=====1-----'+temp.department_selection__c); |
| | | // List<String> tenDepartList = temp.department_selection__c.split(';'); |
| | | // if(tenDepartList.contains('01210000000QezeAAC') |
| | | // || tenDepartList.contains('01210000000QezjAAC') |
| | | // || tenDepartList.contains('01210000000QezoAAC') |
| | | // || tenDepartList.contains('01210000000QeztAAC')){ |
| | | // System.debug('=====-----'+temp.department_selection__c); |
| | | // temp.InfoOwner__c = temp.SP_assistant__c; |
| | | // } |
| | | System.debug('temp=='+temp); |
| | | StaticParameter.EscapeOtherUpdateTenOwner = false; |
| | | update temp; |
| | | StaticParameter.EscapeOtherUpdateTenOwner = true; |
| | |
| | | //if (temp.IsBid__c == '否') { |
| | | temp.NotBidApprovalStatus__c = '草案中'; |
| | | temp.ownerid = UserInfo.getUserId(); |
| | | |
| | | //}else{ |
| | | // temp.NotBidApprovalStatus__c = null; |
| | | // temp.irresponsibleReasonOther__c = null; |
| | |
| | | ids.Add(hospital.Id); |
| | | //根据ID查询 招投标项目 |
| | | InspectCheckController.GetInspectById(Ten.Id); |
| | | InspectCheckController.cannotModifyIsRelateProject(Ten.Id); |
| | | //招投标项目列表字段 irrelevantReasons__c 所有的值 |
| | | InspectCheckController.GetIrrelevantReasons(); |
| | | //招投标项目列表字段 irresponsibleReason__c 所有的值 |
| | |
| | | InspectCheckController.CheckOwner(Ten.Id); |
| | | |
| | | InspectCheckController.SearchUserByIds(ids); |
| | | // InspectCheckController.AssignValuesToOwner(Ten.Id); |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | for (String iPId : IPIdSet) { |
| | | // add 如果 超出点检区间=true 则个点检计划数据不计算 fxk 2021/10/20 Star |
| | | System.debug('超出'+overstepMap.get(iPId+'overstep')); |
| | | if(!overstepMap.containskey(iPId)){ |
| | | // gzw 点检历史数据也要更新执行开始日和完成日 start |
| | | // if(!overstepMap.containskey(iPId)){ |
| | | // gzw 点检历史数据也要更新执行开始日和完成日 end |
| | | // add 如果 超出点检区间=true 则个点检计划数据不计算 fxk 2021/10/20 End |
| | | Inspectup_Plan__c IPlanInfo = new Inspectup_Plan__c(); |
| | | IPlanInfo.Id = iPId; |
| | |
| | | // if (SumNumMap.size() > 0) { |
| | | if (SumNumMap != null && SumNumMap.size() > 0 ) { |
| | | // 20210911 gzw bug fix end |
| | | // gzw 点检历史数据也要更新执行开始日和完成日 start |
| | | // 实际执行数 |
| | | Integer actualQ = 0; |
| | | if(!overstepMap.containskey(iPId)){ |
| | | if (PlanToAssetMap.containsKey(iPId + sumNumsList[0])) { |
| | | IPlanInfo.Actual_Execution_Quantity__c = PlanToAssetMap.get(iPId + sumNumsList[0]).size();//实际点检设备数 去重 |
| | | } |
| | |
| | | if (PlanToAssetMap.containsKey(iPId + sumNumsList[3])) { |
| | | IPlanInfo.Abandonment_Number__c = PlanToAssetMap.get(iPId + sumNumsList[3]).size();//点检计划 放弃设备数 |
| | | } |
| | | System.debug('-------131------' + IPlanInfo.Planned_check_equipment_Num__c); |
| | | System.debug('-------121------' + SumNumMap.get(iPId + sumNumsList[5])); |
| | | if (IPlanInfo.Actual_Execution_Quantity__c == SumNumMap.get(iPId + sumNumsList[5])) { |
| | | System.debug('-------13------' + IPlanInfo.Actual_Execution_Quantity__c); |
| | | System.debug('-------12------' + SumNumMap.get(iPId + sumNumsList[5])); |
| | | }else { |
| | | if (PlanToAssetMap.containsKey(iPId + sumNumsList[0])) { |
| | | actualQ = PlanToAssetMap.get(iPId + sumNumsList[0]).size();//实际点检设备数 去重 |
| | | } |
| | | } |
| | | // gzw 点检历史数据也要更新执行开始日和完成日 start |
| | | if (IPlanInfo.Actual_Execution_Quantity__c == SumNumMap.get(iPId + sumNumsList[5]) |
| | | || actualQ == SumNumMap.get(iPId + sumNumsList[5])) { |
| | | IPlanInfo.Ben_Actual_Times__c = 1;//本次点检次数(审批过后的点检报告书) |
| | | if (IDateMap.get(iPId + 'End') == null) { |
| | | IPlanInfo.Execution_End_Date__c = IDateMap.get(iPId);//点检计划 完成日 |
| | | } |
| | | } |
| | | if (IDateMap.get(iPId + 'Start') == null) { |
| | | System.debug('--------123------' + IDateMap.get(iPId + 'Start')); |
| | | IPlanInfo.Execution_Start_Date__c = IDateMap.get(iPId);//执行开始日--检测日期 |
| | | } |
| | | IPlanInfo.Actual_Execute_Num__c = SumNumMap.get(iPId + sumNumsList[7]); |
| | | } |
| | | System.debug('=====1===='+IPlanInfo.overstep_check_interval__c); |
| | | updateIPInfoList.add(IPlanInfo); |
| | | System.debug('-------1------' + updateIPInfoList); |
| | | } |
| | | // gzw 点检历史数据也要更新执行开始日和完成日 start |
| | | // } |
| | | // gzw 点检历史数据也要更新执行开始日和完成日 end |
| | | } |
| | | } |
| | | if (updateIPInfoList.size() > 0) { |
| New file |
| | |
| | | @isTest |
| | | private class InventoryHeaderCopyHandlerTest { |
| | | // 创建Asset数据 |
| | | static void setupTestData() { |
| | | //add by rentx 2021-05-19 start 1635 |
| | | SS_Batch_Column_Mapping__c InventoryHeaderName = new SS_Batch_Column_Mapping__c(Name = 'Inventory_Header_Name', SS_TableName__c='Inventory_Header_Name'); |
| | | InventoryHeaderName.From_Column_001__c = '北京 备品中心'; |
| | | InventoryHeaderName.SS_Column_001__c = 'BJ'; |
| | | InventoryHeaderName.From_Column_002__c = '上海 备品中心'; |
| | | InventoryHeaderName.SS_Column_002__c = 'SH'; |
| | | InventoryHeaderName.From_Column_003__c = '广州 备品中心'; |
| | | InventoryHeaderName.SS_Column_003__c = 'GZ'; |
| | | insert new SS_Batch_Column_Mapping__c[] {InventoryHeaderName}; |
| | | //add by rentx 2021-05-19 end 1635 |
| | | // 病院を作る |
| | | 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 = '9999998'; |
| | | dep.ParentId = strategicDep[0].Id; |
| | | dep.Department_Class__c = strategicDep[0].Id; |
| | | dep.Hospital__c = hospital.Id; |
| | | insert dep; |
| | | |
| | | Contact contact2 = new Contact(); |
| | | contact2.AccountId = dep.Id; |
| | | contact2.FirstName = '責任者'; |
| | | contact2.LastName = 'test1经销商'; |
| | | insert contact2; |
| | | |
| | | // 产品 |
| | | 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); |
| | | 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); |
| | | 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); |
| | | insert new Product2[] {pro1, pro2, pro3}; |
| | | |
| | | //---------------------------主体 两个附属品(个体管理 数量管理) |
| | | // 保有设备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 = '0.备品中心'; |
| | | assetA1.Internal_asset_location__c = '上海 备品中心'; |
| | | assetA1.Product_category__c = 'GI'; |
| | | assetA1.Equipment_Type__c = '产品试用'; |
| | | assetA1.SalesProvince__c = '上海'; |
| | | assetA1.WH_location__c = '货架号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.Freeze_sign__c = false; |
| | | assetA2.Out_of_wh__c = 3; |
| | | assetA2.Frozen_Quantity__c = 2; |
| | | assetA2.Salesdepartment__c = '0.备品中心'; |
| | | assetA2.Internal_asset_location__c = '上海 备品中心'; |
| | | assetA2.Product_category__c = 'GI'; |
| | | assetA2.Equipment_Type__c = '产品试用'; |
| | | assetA2.SalesProvince__c = '上海'; |
| | | assetA2.WH_location__c = '货架号2'; |
| | | 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 = '0.备品中心'; |
| | | 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.AssetManageConfirm__c = true; |
| | | |
| | | // 耗材 |
| | | Asset assetC1 = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assetC1.RecordTypeId = System.Label.Asset_RecordType; |
| | | assetC1.SerialNumber = 'ass04'; |
| | | assetC1.Name = 'ass04'; |
| | | assetC1.AccountId = dep.Id; |
| | | assetC1.Department_Class__c = strategicDep[0].Id; |
| | | assetC1.Hospital__c = hospital.Id; |
| | | assetC1.Product2Id = pro3.Id; |
| | | assetC1.Quantity = 10; |
| | | assetC1.Status = '有库存'; |
| | | assetC1.Manage_type__c = '数量管理'; |
| | | assetC1.Loaner_accsessary__c = true; |
| | | assetC1.Product_category__c = 'GI'; |
| | | assetC1.Delete_Flag__c = false; |
| | | assetC1.Freeze_sign__c = false; |
| | | assetC1.Out_of_wh__c = 3; |
| | | assetC1.Salesdepartment__c = '0.备品中心'; |
| | | assetC1.Internal_asset_location__c = '上海 备品中心'; |
| | | assetC1.Product_category__c = 'GI'; |
| | | assetC1.Equipment_Type__c = '产品试用'; |
| | | assetC1.SalesProvince__c = '上海'; |
| | | assetC1.WH_location__c = '货架号4'; |
| | | assetC1.Abandoned_Inventory__c = 1; |
| | | assetC1.AssetManageConfirm__c = true; |
| | | assetC1.AssetMark__c = '耗材'; |
| | | assetC1.Asset_loaner_category__c = '耗材'; |
| | | insert new Asset[] {assetA1, assetA2, assetA3, assetC1}; |
| | | |
| | | Repair__c repair = new Repair__c(); |
| | | repair.Service_Repair_No__c = 'repair'; |
| | | repair.Status__c = '草案中'; |
| | | repair.Hospital__c = hospital.Id; |
| | | repair.Account__c = dep.Id; |
| | | repair.Department_Class__c = strategicDep[0].id; |
| | | repair.Delivered_Product__c = assetA2.Id; |
| | | insert repair; |
| | | |
| | | String cunFangDi = '上海 备品中心'; |
| | | Inventory_Header_Copy__c header = new Inventory_Header_Copy__c(); |
| | | header.Inventory_Start_Date__c = Date.toDay(); |
| | | header.UniqueKey__c = 'IH-0000'; |
| | | header.Inventory_Status__c = '盘点中'; |
| | | header.Internal_asset_location__c = cunFangDi; |
| | | insert header; |
| | | |
| | | Inventory_Header_Copy__c header2 = new Inventory_Header_Copy__c(); |
| | | header2.Inventory_Start_Date__c = Date.toDay(); |
| | | header2.UniqueKey__c = 'IH-0001'; |
| | | header2.Inventory_Status__c = '盘点中'; |
| | | header2.Internal_asset_location__c = cunFangDi; |
| | | header2.Fixture_Header__c = header.Id; |
| | | insert header2; |
| | | |
| | | Inventory_Detail_Copy__c id1 = new Inventory_Detail_Copy__c(); |
| | | id1.Asset__c = assetA1.Id; |
| | | id1.Amount__c = assetA1.Quantity; |
| | | id1.WH_Location__c = assetA1.WH_location__c; |
| | | id1.OneToOne_Body__c = false; |
| | | id1.OneToOne_Accsessary__c = false; |
| | | id1.Asset_Status__c = '在库'; |
| | | id1.Sync_Asset_Record_Flag__c = true; |
| | | id1.UniqueKey__c = header.Id+':'+pro1.Fixture_Model_No__c+':在库:'+null+':'+assetA1.Id; |
| | | id1.Fixture_Model_No__c = pro1.Fixture_Model_No__c; |
| | | id1.Internal_asset_location__c = cunFangDi; |
| | | id1.Inventory_Time__c = Date.toDay(); |
| | | id1.Inventory_Header_Copy__c = header.Id; |
| | | |
| | | Inventory_Detail_Copy__c id2 = new Inventory_Detail_Copy__c(); |
| | | id2.Asset__c = assetA2.Id; |
| | | id2.Amount__c = 1; |
| | | id2.WH_Location__c = assetA2.WH_location__c; |
| | | id2.OneToOne_Body__c = false; |
| | | id2.OneToOne_Accsessary__c = false; |
| | | id2.Asset_Status__c = '维修中'; |
| | | id2.Sync_Asset_Record_Flag__c = false; |
| | | id2.UniqueKey__c = header.Id+':'+pro2.Fixture_Model_No__c+':维修中:'+null+':'+assetA2.Id+':'+repair.Id; |
| | | id2.Fixture_Model_No__c = pro2.Fixture_Model_No__c; |
| | | id2.Internal_asset_location__c = cunFangDi; |
| | | id2.Inventory_Time__c = Date.toDay(); |
| | | id2.Inventory_Header_Copy__c = header.Id; |
| | | |
| | | Inventory_Detail_Copy__c id3 = new Inventory_Detail_Copy__c(); |
| | | id3.Asset__c = assetA3.Id; |
| | | id3.Amount__c = 9; |
| | | id3.WH_Location__c = assetA3.WH_location__c; |
| | | id3.OneToOne_Body__c = false; |
| | | id3.OneToOne_Accsessary__c = false; |
| | | id3.Asset_Status__c = '在库'; |
| | | id3.Sync_Asset_Record_Flag__c = true; |
| | | id3.UniqueKey__c = header.Id+':'+pro3.Fixture_Model_No__c+':在库:'+null+':'+assetA3.Id; |
| | | id3.Fixture_Model_No__c = pro3.Fixture_Model_No__c; |
| | | id3.Internal_asset_location__c = cunFangDi; |
| | | id3.Inventory_Time__c = Date.toDay(); |
| | | id3.Inventory_Header_Copy__c = header.Id; |
| | | |
| | | Inventory_Detail_Copy__c id4 = new Inventory_Detail_Copy__c(); |
| | | id4.Asset__c = assetA3.Id; |
| | | id4.Amount__c = 1; |
| | | id4.WH_Location__c = assetA3.WH_location__c; |
| | | id4.OneToOne_Body__c = false; |
| | | id4.OneToOne_Accsessary__c = false; |
| | | id4.Asset_Status__c = '出借中'; |
| | | id4.Sync_Asset_Record_Flag__c = false; |
| | | id4.UniqueKey__c = header.Id+':'+pro3.Fixture_Model_No__c+':出借中:'+null+':'+assetA3.Id; |
| | | id4.Fixture_Model_No__c = pro3.Fixture_Model_No__c; |
| | | id4.Internal_asset_location__c = cunFangDi; |
| | | id4.Inventory_Time__c = Date.toDay(); |
| | | id4.Inventory_Header_Copy__c = header.Id; |
| | | |
| | | Inventory_Detail_Copy__c id5 = new Inventory_Detail_Copy__c(); |
| | | id5.Asset__c = assetA2.Id; |
| | | id5.Amount__c = 7; |
| | | id5.WH_Location__c = assetA2.WH_location__c; |
| | | id5.OneToOne_Body__c = false; |
| | | id5.OneToOne_Accsessary__c = false; |
| | | id5.Asset_Status__c = '在库'; |
| | | id5.Sync_Asset_Record_Flag__c = true; |
| | | id5.UniqueKey__c = header.Id+':'+pro2.Fixture_Model_No__c+':在库:'+null+':'+assetA2.Id; |
| | | id5.Fixture_Model_No__c = pro2.Fixture_Model_No__c; |
| | | id5.Internal_asset_location__c = cunFangDi; |
| | | id5.Inventory_Time__c = Date.toDay(); |
| | | id5.Inventory_Header_Copy__c = header.Id; |
| | | |
| | | Inventory_Detail_Copy__c id6 = new Inventory_Detail_Copy__c(); |
| | | id6.Asset__c = assetA2.Id; |
| | | id6.Amount__c = 2; |
| | | id6.WH_Location__c = assetA2.WH_location__c; |
| | | id6.OneToOne_Body__c = false; |
| | | id6.OneToOne_Accsessary__c = false; |
| | | id6.Asset_Status__c = '冻结'; |
| | | id6.Sync_Asset_Record_Flag__c = false; |
| | | id6.UniqueKey__c = header.Id+':'+pro2.Fixture_Model_No__c+':冻结:'+null+':'+assetA2.Id; |
| | | id6.Fixture_Model_No__c = pro2.Fixture_Model_No__c; |
| | | id6.Internal_asset_location__c = cunFangDi; |
| | | id6.Inventory_Time__c = Date.toDay(); |
| | | id6.Inventory_Header_Copy__c = header.Id; |
| | | |
| | | insert new sObject[] {id1, id2, id3, id4, id5, id6}; |
| | | } |
| | | |
| | | static testMethod void testMethod1() { |
| | | bp3_Setting__c conf = bp3_Setting__c.getOrgDefaults(); |
| | | conf.SH_Start_Inventory_User__c = UserInfo.getUserId(); |
| | | conf.InventoryDetailArchiveFolder__c = UserInfo.getUserId(); |
| | | insert conf; |
| | | |
| | | setupTestData(); |
| | | |
| | | //盘点表头 |
| | | List<Inventory_Header_Copy__c> headerList = [select UniqueKey__c,Inventory_Start_Date__c,Internal_asset_location__c,Id |
| | | from Inventory_Header_Copy__c |
| | | WHERE Fixture_Header__c = null]; |
| | | System.assertEquals(1, headerList.size()); |
| | | headerList[0].Inventory_Status__c = '已批准'; |
| | | update headerList; |
| | | |
| | | List<Inventory_Detail_Copy__c> retList = [SELECT Id |
| | | , Inventory_Count__c |
| | | FROM Inventory_Detail_Copy__c]; |
| | | System.assertEquals(6, retList.size()); |
| | | } |
| | | } |
| 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> |
| | |
| | | checkedApprovalIDSet.add(nObj.Id); |
| | | checkedApprovalIHIdSet.add(nObj.Id); |
| | | // TODO Header 1件ずつ呼び出すしかないですか? |
| | | if(String.isBlank(nObj.Fixture_Header__c)){ |
| | | if(String.isBlank(nObj.Fixture_Header__c)){ |
| | | InventoryReportDetailArchiveBatch mBatch = new InventoryReportDetailArchiveBatch(nObj); |
| | | Database.executeBatch(mBatch); |
| | | // 借出明细 |
| | |
| | | |
| | | InventoryResultRecordCopyController con = new InventoryResultRecordCopyController(); |
| | | con.init(); |
| | | con.searchBtn(); |
| | | // con.searchBtn(); |
| | | } |
| | | |
| | | static testMethod void testMethod3() { |
| | |
| | | |
| | | InventoryResultRecordCopyController con = new InventoryResultRecordCopyController(); |
| | | con.init(); |
| | | con.searchBtn(); |
| | | // con.searchBtn(); |
| | | |
| | | System.assertEquals(3, con.assetStatusOptionList.size()); |
| | | con.getbieCunFangDiOps(); |
| | |
| | | |
| | | InventoryResultRecordCopyController con = new InventoryResultRecordCopyController(); |
| | | con.init(); |
| | | con.searchBtn(); |
| | | // con.searchBtn(); |
| | | System.assertEquals(19, con.salesdepartmentOpts.size()); |
| | | System.assertEquals(57, con.salesProvinceOpts.size()); |
| | | |
| | |
| | | raesdObj1.DeliverySlip__c = ds.Id; |
| | | raesdObj1.Check_lost_Item__c ='OK'; |
| | | raesdObj1.Inspection_result_after__c = 'NG'; |
| | | raesdObj1.Inspection_NG_abord_reason__c = '其他'; |
| | | // raesdObj1.Inspection_NG_abord_reason__c = '其他'; |
| | | raesdObj1.Inspection_Comment__c = 'test'; |
| | | raesdObj1.Inspection_result_after_ng__c = '废弃'; |
| | | |
| | |
| | | global class KPIPreviewScheduel implements Schedulable { |
| | | global void execute(SchedulableContext SC) { |
| | | EquipmentRealCoverageBatch batch1 = new EquipmentRealCoverageBatch(); |
| | | Database.executeBatch(batch1); |
| | | |
| | | ASOTDeleteRealBatch batch3 = new ASOTDeleteRealBatch(); |
| | | Database.executeBatch(batch3); |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | @isTest |
| | | private class KPIPreviewScheduelTest { |
| | | static testMethod void testMethod1() { |
| | | String CRON_EXP = '0 0 0 3 9 ? 2022'; |
| | | |
| | | System.Test.startTest(); |
| | | String jobId = system.schedule('KPIPreviewScheduelTest', CRON_EXP, new KPIPreviewScheduel()); |
| | | 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 |
| | |
| | | public class LabelPrintController { |
| | | |
| | | public void init(){ |
| | | |
| | | } |
| | | } |
| 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> |
| | |
| | | ret.LastName = inputName; |
| | | ret.Email = inputEmail; |
| | | ret.Firstname='ZZ2'; |
| | | insert ret; |
| | | ret = [SELECT Id, FirstName, LastName, Email FROM Contact WHERE Id = :ret.Id]; |
| | | // insert ret; |
| | | // ret = [SELECT Id, FirstName, LastName, Email FROM Contact WHERE Id = :ret.Id]; |
| | | return ret; |
| | | } |
| | | |
| | |
| | | // リード3件が、コンタクト3件と一対一で対応することを確認 |
| | | |
| | | // コンタクト3件作成 |
| | | Contact con01 = createContact( 'con01', 'con01_20140519@test.com'); |
| | | Contact con02 = createContact( 'con02', 'con02_20140519@test.com'); |
| | | Contact con03 = createContact( 'con03', 'con03_20140519@test.com'); |
| | | |
| | | // Contact con01 = createContact( 'con01', 'con01_20140519@test.com'); |
| | | // Contact con02 = createContact( 'con02', 'con02_20140519@test.com'); |
| | | // Contact con03 = createContact( 'con03', 'con03_20140519@test.com'); |
| | | Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | User local = new User(Test_staff__c = true,Employee_No__c ='ocm99999', 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); |
| | | local.Job_Category__c = '销售推广'; |
| | | local.Province__c = '北京市'; |
| | | insert local; |
| | | |
| | | Lead lead01 = createLead( 'con01', 'con01_20140519@test.com'); |
| | | lead01.SI_PromoteInquiry__c = true; |
| | | lead01.OwnerId = local.Id; |
| | | update lead01; |
| | | Lead lead02 = createLead( 'con02', 'con02_20140519@test.com'); |
| | | Lead lead03 = createLead( 'con03', 'con03_20140519@test.com'); |
| | | |
| | |
| | | // リード1件が、コンタクト1件と対応していることを確認する |
| | | |
| | | // コンタクト3件作成 |
| | | Contact con01 = createContact( 'con01', 'con01_20140519@test.com'); |
| | | Contact con02 = createContact( 'con02', 'con02_20140519@test.com'); |
| | | Contact con03 = createContact( 'con03', 'con03_20140519@test.com'); |
| | | // Contact con01 = createContact( 'con01', 'con01_20140519@test.com'); |
| | | // Contact con02 = createContact( 'con02', 'con02_20140519@test.com'); |
| | | // Contact con03 = createContact( 'con03', 'con03_20140519@test.com'); |
| | | Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | User local2 = new User(Test_staff__c = true,Employee_No__c ='ocm99998', LastName = 'hp2', FirstName = 'owner', Alias = 'hp2', CommunityNickname = 'hpOwner2', Email = 'olympus_hpowner2@sunbridge.com', Username = 'olympus_hpowner2@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id); |
| | | local2.Job_Category__c = '销售推广'; |
| | | local2.Province__c = '辽宁省'; |
| | | insert local2; |
| | | |
| | | Lead lead01 = createLead( 'con01', 'con01_20140519@test.com'); |
| | | lead01.SI_PromoteInquiry__c = true; |
| | | lead01.OwnerId = local2.Id; |
| | | update lead01; |
| | | |
| | | //System.assertEquals( con01.Id, lead01.Contact__c); |
| | | } |
| | |
| | | // リード3件が、コンタクト3件と一対一で対応することを確認 |
| | | |
| | | // コンタクト3件作成 |
| | | Contact con01 = createContact( 'con01', 'con01_20140519@test.com'); |
| | | Contact con02 = createContact( 'con02', 'con01_20140519@test.com'); |
| | | Contact con03 = createContact( 'con03', 'con01_20140519@test.com'); |
| | | |
| | | // Contact con01 = createContact( 'con01', 'con01_20140519@test.com'); |
| | | // Contact con02 = createContact( 'con02', 'con01_20140519@test.com'); |
| | | // Contact con03 = createContact( 'con03', 'con01_20140519@test.com'); |
| | | Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | User local3 = new User(Test_staff__c = true,Employee_No__c ='ocm99997', LastName = 'hp3', FirstName = 'owner', Alias = 'hp3', CommunityNickname = 'hpOwner3', Email = 'olympus_hpowner3@sunbridge.com', Username = 'olympus_hpowner3@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id); |
| | | local3.Job_Category__c = '销售推广'; |
| | | local3.Province__c = '湖北省'; |
| | | insert local3; |
| | | |
| | | Lead lead01 = createLead( 'con01', 'con01_20140519@test.com'); |
| | | lead01.SI_PromoteInquiry__c = true; |
| | | lead01.OwnerId = local3.Id; |
| | | update lead01; |
| | | |
| | | //System.assertEquals( con03.Id, lead01.Contact__c); |
| | | } |
| | |
| | | // リード3件が、コンタクト3件と一対一で対応しないことを確認する |
| | | |
| | | // コンタクト3件作成 |
| | | Contact con01 = createContact( 'con01', 'con01_20140519@test.com'); |
| | | Contact con02 = createContact( 'con02', 'con02_20140519@test.com'); |
| | | Contact con03 = createContact( 'con03', 'con03_20140519@test.com'); |
| | | // Contact con01 = createContact( 'con01', 'con01_20140519@test.com'); |
| | | // Contact con02 = createContact( 'con02', 'con02_20140519@test.com'); |
| | | // Contact con03 = createContact( 'con03', 'con03_20140519@test.com'); |
| | | Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | User local = new User(Test_staff__c = true,Employee_No__c ='ocm99999', 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); |
| | | local.Job_Category__c = '销售推广'; |
| | | local.Province__c = '四川省'; |
| | | insert local; |
| | | |
| | | User local2 = new User(Test_staff__c = true,Employee_No__c ='ocm99998', LastName = 'hp2', FirstName = 'owner', Alias = 'hp2', CommunityNickname = 'hpOwner2', Email = 'olympus_hpowner2@sunbridge.com', Username = 'olympus_hpowner2@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id); |
| | | local2.Job_Category__c = '销售推广'; |
| | | local2.Province__c = '浙江省'; |
| | | insert local2; |
| | | |
| | | Lead lead01 = createLead( 'con01', 'con11_20140519@test1.com'); |
| | | lead01.SI_PromoteInquiry__c = true; |
| | | lead01.OwnerId = local.Id; |
| | | update lead01; |
| | | Lead lead02 = createLead( 'con02', 'con12_20140519@test1.com'); |
| | | lead02.SI_PromoteInquiry__c = true; |
| | | lead02.OwnerId = local2.Id; |
| | | update lead02; |
| | | Lead lead03 = createLead( 'con03', 'con13_20140519@test1.com'); |
| | | |
| | | //System.assertEquals( null, lead01.Contact__c); |
| | |
| | | // リード3件が、コンタクト3件と一対一で対応することを確認 |
| | | |
| | | // コンタクト3件作成 |
| | | Contact con01 = createContact( 'con01', 'con01_20140519@test.com'); |
| | | Contact con02 = createContact( 'con02', 'con02_20140519@test.com'); |
| | | Contact con03 = createContact( 'con03', 'con03_20140519@test.com'); |
| | | // Contact con01 = createContact( 'con01', 'con01_20140519@test.com'); |
| | | // Contact con02 = createContact( 'con02', 'con02_20140519@test.com'); |
| | | // Contact con03 = createContact( 'con03', 'con03_20140519@test.com'); |
| | | |
| | | Lead lead01 = createLeadData( 'con01', 'con01_20140519@test.com'); |
| | | Lead lead02 = createLeadData( 'con02', 'con02_20140519@test.com'); |
| | |
| | | // スルーされることを確認 |
| | | |
| | | // コンタクト3件作成 |
| | | Contact con01 = createContact( 'con01', 'con01_20140519@test.com'); |
| | | Contact con02 = createContact( 'con02', 'con02_20140519@test.com'); |
| | | Contact con03 = createContact( 'con03', 'con03_20140519@test.com'); |
| | | // Contact con01 = createContact( 'con01', 'con01_20140519@test.com'); |
| | | // Contact con02 = createContact( 'con02', 'con02_20140519@test.com'); |
| | | // Contact con03 = createContact( 'con03', 'con03_20140519@test.com'); |
| | | |
| | | Lead lead01 = createLeadData( 'con01', 'con01_20140519@test.com'); |
| | | Lead lead02 = createLeadData( 'con02', 'con02_20140519@test.com'); |
| | |
| | | Person_In_Charge2__c,DealerPersonnel__r.Name, Person_In_Charge2__r.Name, doctor2__c,doctor3__c, doctor2__r.Name, Submit_date__c, |
| | | Product_Category__c, Product_Category__r.Name, Result__c, visitor_title__c, Opportunity__c, Opportunity__r.Name,EffectProgress__c, |
| | | doctor2__r.AWS_Data_Id__c,// 20220222 PI改造 by Bright |
| | | UseProduct1__c,UseProduct2__c,UseProduct3__c,UseProduct1__r.Name,UseProduct2__r.Name,UseProduct3__r.Name |
| | | UseProduct1__c,UseProduct2__c,UseProduct3__c,UseProduct1__r.Name,UseProduct2__r.Name,UseProduct3__r.Name, |
| | | UseProduct1__r.Asset_Model_No__c,UseProduct2__r.Asset_Model_No__c,UseProduct3__r.Asset_Model_No__c |
| | | From Agency_Report__c |
| | | where Submit_date__c=:week and Person_In_Charge2__c in :person_list and WeeklyReportClassification__c != '' order by LastModifiedDate desc]; |
| | | } else {//fy Department_Cateogy_text__c doctor3__c |
| | |
| | | Person_In_Charge2__c,DealerPersonnel__r.Name, Person_In_Charge2__r.Name, doctor2__c,doctor3__c, doctor2__r.Name, Submit_date__c, |
| | | doctor2__r.AWS_Data_Id__c,// 20220222 PI改造 by Bright |
| | | Product_Category__c, Product_Category__r.Name, Result__c, visitor_title__c, Opportunity__c, Opportunity__r.Name,EffectProgress__c, |
| | | UseProduct1__c,UseProduct2__c,UseProduct3__c,UseProduct1__r.Name,UseProduct2__r.Name,UseProduct3__r.Name |
| | | UseProduct1__c,UseProduct2__c,UseProduct3__c,UseProduct1__r.Name,UseProduct2__r.Name,UseProduct3__r.Name, |
| | | UseProduct1__r.Asset_Model_No__c,UseProduct2__r.Asset_Model_No__c,UseProduct3__r.Asset_Model_No__c |
| | | From Agency_Report__c |
| | | where Submit_date__c=:week and Person_In_Charge2__c=:person_str and WeeklyReportClassification__c != '' order by LastModifiedDate desc]; |
| | | } |
| | |
| | | Person_In_Charge2__c,DealerPersonnel__r.Name,Person_In_Charge2__r.Name, doctor2__c,doctor3__c, doctor2__r.Name, Submit_date__c, |
| | | doctor2__r.AWS_Data_Id__c,// 20220222 PI改造 by Bright |
| | | Product_Category__c, Product_Category__r.Name, Result__c, visitor_title__c, Opportunity__c, Opportunity__r.Name,EffectProgress__c, |
| | | UseProduct1__c,UseProduct2__c,UseProduct3__c,UseProduct1__r.Name,UseProduct2__r.Name,UseProduct3__r.Name |
| | | UseProduct1__c,UseProduct2__c,UseProduct3__c,UseProduct1__r.Name,UseProduct2__r.Name,UseProduct3__r.Name, |
| | | UseProduct1__r.Asset_Model_No__c,UseProduct2__r.Asset_Model_No__c,UseProduct3__r.Asset_Model_No__c |
| | | From Agency_Report__c |
| | | where Person_In_Charge2__c in :conMList and Report_Date__c >= :date1 and Report_Date__c <= :date2 and WeeklyReportClassification__c != '' ]; |
| | | return reportlist; |
| | |
| | | String Product_Category = ''; |
| | | String Result = ''; |
| | | String Opportunity = ''; |
| | | //fy 20220505 |
| | | String SupportNeedsc =''; |
| | | |
| | | Department_Cateogy = 'GI'; |
| | | Purpose_Type = '询价挖掘-会议对应'; |
| | | Agency_Report_Header = report_header_id; |
| | |
| | | Product_Category = product_types.Id; |
| | | Result = 'result_test'; |
| | | Opportunity = agency_opportunity.Id; |
| | | //fy 20220505 |
| | | SupportNeedsc ='维修备品'; |
| | | Test.startTest(); |
| | | // 週報編集 |
| | | Department_Cateogy = 'BF'; |
| | | report_id = WeeklyReportCmp.editAgencyReport(report_id, Department_Cateogy, Purpose_Type, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | report_id = WeeklyReportCmp.editAgencyReport(report_id, Department_Cateogy, Purpose_Type,SupportNeedsc, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | Agency_Report__c data = [select Id, Department_Cateogy__c, Purpose_Type__c, Agency_Report_Header__c, Agency_Hospital__c, |
| | | Person_In_Charge2__c, doctor2__c, Submit_date__c, Product_Category__c, Result__c, Opportunity__c from Agency_Report__c where Id = : report_id |
| | | ]; |
| | | System.assertEquals(Department_Cateogy, data.Department_Cateogy__c); |
| | | Department_Cateogy = 'GYN'; |
| | | report_id = WeeklyReportCmp.editAgencyReport(report_id, Department_Cateogy, Purpose_Type, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | report_id = WeeklyReportCmp.editAgencyReport(report_id, Department_Cateogy, Purpose_Type,SupportNeedsc, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | data = [select Id, Department_Cateogy__c, Purpose_Type__c, Agency_Report_Header__c, Agency_Hospital__c, |
| | | Person_In_Charge2__c, doctor2__c, Submit_date__c, Product_Category__c, Result__c, Opportunity__c from Agency_Report__c where Id = : report_id |
| | | ]; |
| | | System.assertEquals(Department_Cateogy, data.Department_Cateogy__c); |
| | | Department_Cateogy = 'GS'; |
| | | report_id = WeeklyReportCmp.editAgencyReport(report_id, Department_Cateogy, Purpose_Type, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | report_id = WeeklyReportCmp.editAgencyReport(report_id, Department_Cateogy, Purpose_Type,SupportNeedsc, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | data = [select Id, Department_Cateogy__c, Purpose_Type__c, Agency_Report_Header__c, Agency_Hospital__c, |
| | | Person_In_Charge2__c, doctor2__c, Submit_date__c, Product_Category__c, Result__c, Opportunity__c from Agency_Report__c where Id = : report_id |
| | | ]; |
| | | System.assertEquals(Department_Cateogy, data.Department_Cateogy__c); |
| | | Department_Cateogy = 'URO'; |
| | | report_id = WeeklyReportCmp.editAgencyReport(report_id, Department_Cateogy, Purpose_Type, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | report_id = WeeklyReportCmp.editAgencyReport(report_id, Department_Cateogy, Purpose_Type,SupportNeedsc, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | data = [select Id, Department_Cateogy__c, Purpose_Type__c, Agency_Report_Header__c, Agency_Hospital__c, |
| | | Person_In_Charge2__c, doctor2__c, Submit_date__c, Product_Category__c, Result__c, Opportunity__c from Agency_Report__c where Id = : report_id |
| | | ]; |
| | | System.assertEquals(Department_Cateogy, data.Department_Cateogy__c); |
| | | Department_Cateogy = 'ENT'; |
| | | report_id = WeeklyReportCmp.editAgencyReport(report_id, Department_Cateogy, Purpose_Type, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | report_id = WeeklyReportCmp.editAgencyReport(report_id, Department_Cateogy, Purpose_Type,SupportNeedsc, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | data = [select Id, Department_Cateogy__c, Purpose_Type__c, Agency_Report_Header__c, Agency_Hospital__c, |
| | | Person_In_Charge2__c, doctor2__c, Submit_date__c, Product_Category__c, Result__c, Opportunity__c from Agency_Report__c where Id = : report_id |
| | | ]; |
| | | System.assertEquals(Department_Cateogy, data.Department_Cateogy__c); |
| | | Department_Cateogy = 'ET'; |
| | | report_id = WeeklyReportCmp.editAgencyReport(report_id, Department_Cateogy, Purpose_Type, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | report_id = WeeklyReportCmp.editAgencyReport(report_id, Department_Cateogy, Purpose_Type,SupportNeedsc, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | data = [select Id, Department_Cateogy__c, Purpose_Type__c, Agency_Report_Header__c, Agency_Hospital__c, |
| | | Person_In_Charge2__c, doctor2__c, Submit_date__c, Product_Category__c, Result__c, Opportunity__c from Agency_Report__c where Id = : report_id |
| | | ]; |
| | | System.assertEquals(Department_Cateogy, data.Department_Cateogy__c); |
| | | Department_Cateogy = 'OTH'; |
| | | report_id = WeeklyReportCmp.editAgencyReport(report_id, Department_Cateogy, Purpose_Type, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | report_id = WeeklyReportCmp.editAgencyReport(report_id, Department_Cateogy, Purpose_Type,SupportNeedsc, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | data = [select Id, Department_Cateogy__c, Purpose_Type__c, Agency_Report_Header__c, Agency_Hospital__c, |
| | | Person_In_Charge2__c, doctor2__c, Submit_date__c, Product_Category__c, Result__c, Opportunity__c from Agency_Report__c where Id = : report_id |
| | | ]; |
| | |
| | | String Product_Category = ''; |
| | | String Result = ''; |
| | | String Opportunity = ''; |
| | | String SupportNeedsc = ''; |
| | | |
| | | Department_Cateogy = 'GI'; |
| | | Purpose_Type = '询价挖掘-会议对应'; |
| | | Agency_Report_Header = report_header_id; |
| | |
| | | Product_Category = product_types.Id; |
| | | Result = '一般'; |
| | | Opportunity = agency_opportunity.Id; |
| | | report_id = WeeklyReportCmp.saveAgencyReport(Department_Cateogy, Purpose_Type, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | //fy 20220505 |
| | | SupportNeedsc = '维修备品'; |
| | | report_id = WeeklyReportCmp.saveAgencyReport(Department_Cateogy, Purpose_Type,SupportNeedsc, Agency_Report_Header, Agency_Hospital, Person_In_Charge2, doctor, Submit_date, Product_Category, '', '', Result, Opportunity, '', '', '', '', Submit_date); |
| | | Agency_Report__c data = [select Id, Department_Cateogy__c, Purpose_Type__c, Agency_Report_Header__c, Agency_Hospital__c, |
| | | Person_In_Charge2__c, doctor2__c, Submit_date__c, Product_Category__c, Result__c, Opportunity__c from Agency_Report__c where Id = : report_id |
| | | ]; |
| | |
| | | private String messageGroupNumber; |
| | | private Datetime times; |
| | | private Boolean isForecast;// 20220318 ljh SWAG-CC54R2 add |
| | | private String loginId; |
| | | /** |
| | | * コンスタント |
| | | */ |
| | | global LogAutoSendBatch() { |
| | | } |
| | | global LogAutoSendBatch(String loginId) { |
| | | this.loginId = loginId; |
| | | } |
| | | // 20220318 ljh SWAG-CC54R2 add start |
| | | global LogAutoSendBatch(String type,Boolean isForecast) { |
| | |
| | | AND (retry_cnt__c = null OR (retry_cnt__c != null AND retry_cnt__c > 0 AND retry_cnt__c < : max_cnt)) |
| | | AND Type__c = : typeNFM ] |
| | | ); |
| | | } else if (String.isNotBlank(typeNFM) && String.isNotBlank(messageGroupNumber) && times != null) { |
| | | } |
| | | // gzw 603 重发判断 暂时用 |
| | | else if (String.isNotBlank(loginId)) { |
| | | return Database.getQueryLocator( |
| | | [SELECT Id, Name, Log__c, ErrorLog__c, Log2__c, Log3__c, Log4__c, Log5__c, Log6__c, |
| | | Log7__c, Log8__c, Log9__c, Log10__c, Log11__c, Log12__c, MessageGroupNumber__c, Type__c, |
| | | retry_cnt__c, NFM501Future_Count__c, NFM501_Web_Annex_Count__c |
| | | FROM BatchIF_Log__c |
| | | WHERE RowDataFlg__c = true |
| | | AND id = : loginId ] |
| | | ); |
| | | } |
| | | // gzw 603 重发判断 暂时用 |
| | | |
| | | else if (String.isNotBlank(typeNFM) && String.isNotBlank(messageGroupNumber) && times != null) { |
| | | // 20220318 ljh SWAG-CC54R2 add end |
| | | //20191224 HWAG-BK65E8 add start |
| | | // if (String.isNotBlank(typeNFM) && String.isNotBlank(messageGroupNumber) && times != null) { |
| | |
| | | OR(NFM501_Web_Annex_Count__c != null |
| | | AND NFM501_Web_Annex_Count__c > 0 AND NFM501_Web_Annex_Count__c < : max_cnt))] |
| | | ); |
| | | } else { |
| | | }else { |
| | | return Database.getQueryLocator( |
| | | [SELECT Id, Name, Log__c, ErrorLog__c, Log2__c, Log3__c, Log4__c, Log5__c, Log6__c, |
| | | Log7__c, Log8__c, Log9__c, Log10__c, Log11__c, Log12__c, MessageGroupNumber__c, Type__c, |
| | |
| | | NFM116Controller.execute(rowData,null); |
| | | } |
| | | // // 电子签收单发送SAP接口 thh 20220427 end |
| | | // XLIU-CEW9PD 零件预计齐备日期 -SFDC增加 LY 20220610 start |
| | | if (strType_c == 'NFM117') { |
| | | NFM117Rest.main(rowData.Id); |
| | | } |
| | | // XLIU-CEW9PD 零件预计齐备日期 -SFDC增加 LY 20220610 end |
| | | // 三方接口 |
| | | if (strType_c == 'NFM201') { |
| | | NFM201Controller.execute(rowData, null); |
| | |
| | | if (strType_c == 'NFM701') { |
| | | NFM701Controller.execute(rowData, null); |
| | | } |
| | | // if (strType_c == 'NFM702') { |
| | | // NFM702Controller.execute(rowData, null); |
| | | // } |
| | | if (strType_c == 'NFM702') { |
| | | NFM702Controller.execute(rowData, null); |
| | | } |
| | | if (strType_c == 'NFM703') { |
| | | NFM703Controller.execute(rowData, null); |
| | | } |
| | | if (strType_c == 'NFM704') { |
| | | NFM704Rest.executefuture(rowData.Id); |
| | | NFM704Rest.main(rowData.Id); |
| | | } |
| | | if (strType_c == 'NFM705') { |
| | | NFM705Rest.main(rowData.Id); |
| | |
| | | global class LogAutoSendSchedule implements Schedulable { |
| | | |
| | | public static String logId; |
| | | global void execute(SchedulableContext SC) { |
| | | Id execBTId = Database.executeBatch(new LogAutoSendBatch(), 1); |
| | | if(String.isNotEmpty(logId)){ |
| | | Id execBTId = Database.executeBatch(new LogAutoSendBatch(logId), 1); |
| | | }else{ |
| | | |
| | | Id execBTId = Database.executeBatch(new LogAutoSendBatch(), 1); |
| | | } |
| | | } |
| | | |
| | | |
| | | public static void assignOneMinute() { |
| | | // delete 実行済み |
| | | Datetime addOneM = System.now().addMinutes(2); |
| | |
| | | // /** |
| | | // * This class contains unit tests for validating the behavior of Apex classes |
| | | // * and triggers. |
| | | // * |
| | | // * Unit tests are class methods that verify whether a particular piece |
| | | // * of code is working properly. Unit test methods take no arguments, |
| | | // * commit no data to the database, and are flagged with the testMethod |
| | | // * keyword in the method definition. |
| | | // * |
| | | // * All test methods in an organization are executed whenever Apex code is deployed |
| | | // * to a production organization to confirm correctness, ensure code |
| | | // * coverage, and prevent regressions. All Apex classes are |
| | | // * required to have at least 75% code coverage in order to be deployed |
| | | // * to a production organization. In addition, all triggers must have some code coverage. |
| | | // * |
| | | // * The @isTest class annotation indicates this class only contains test |
| | | // * methods. Classes defined with the @isTest annotation do not count against |
| | | // * the organization size limit for all Apex scripts. |
| | | // * |
| | | // * See the Apex Language Reference for more information about Testing and Code Coverage. |
| | | // */ |
| | | @isTest |
| | | private class LostCancelReport2AssetTriggerTest { |
| | | // /** |
| | | // * 新規して、update、競合1 |
| | | // * update、競合2 |
| | | // */ |
| | | // static testMethod void testLostCancelReport1() { |
| | | // // recode type を取得 |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | // if (rectCo.size() == 0) { |
| | | // throw new ControllerUtil.myException('not found 病院 recodetype'); |
| | | // } |
| | | // List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | // if (rectSct.size() == 0) { |
| | | // throw new ControllerUtil.myException('not found 戦略科室分類 recodetype'); |
| | | // } |
| | | // 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) { |
| | | // throw new ControllerUtil.myException('not found 診療科 recodetype'); |
| | | // } |
| | | // List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc]; |
| | | // if (rectLost.size() == 0) { |
| | | // throw new ControllerUtil.myException('not found Lost_cancel_report recodetype'); |
| | | // } |
| | | /** |
| | | * This class contains unit tests for validating the behavior of Apex classes |
| | | * and triggers. |
| | | * |
| | | * Unit tests are class methods that verify whether a particular piece |
| | | * of code is working properly. Unit test methods take no arguments, |
| | | * commit no data to the database, and are flagged with the testMethod |
| | | * keyword in the method definition. |
| | | * |
| | | * All test methods in an organization are executed whenever Apex code is deployed |
| | | * to a production organization to confirm correctness, ensure code |
| | | * coverage, and prevent regressions. All Apex classes are |
| | | * required to have at least 75% code coverage in order to be deployed |
| | | * to a production organization. In addition, all triggers must have some code coverage. |
| | | * |
| | | * The @isTest class annotation indicates this class only contains test |
| | | * methods. Classes defined with the @isTest annotation do not count against |
| | | * the organization size limit for all Apex scripts. |
| | | * |
| | | * See the Apex Language Reference for more information about Testing and Code Coverage. |
| | | */ |
| | | @isTest |
| | | private class LostCancelReport2AssetTriggerTest { |
| | | /** |
| | | * 新規して、update、競合1 |
| | | * update、競合2 |
| | | */ |
| | | static testMethod void testLostCancelReport1() { |
| | | // recode type を取得 |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 病院 recodetype'); |
| | | } |
| | | List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | if (rectSct.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 戦略科室分類 recodetype'); |
| | | } |
| | | 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) { |
| | | throw new ControllerUtil.myException('not found 診療科 recodetype'); |
| | | } |
| | | List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc]; |
| | | if (rectLost.size() == 0) { |
| | | throw new ControllerUtil.myException('not found Lost_cancel_report recodetype'); |
| | | } |
| | | |
| | | // // insert |
| | | // Account company1 = new Account(); |
| | | // Account company2 = new Account(); |
| | | // company1.RecordTypeId = rectCo[0].Id; |
| | | // company1.Name = '病院テスト1'; |
| | | // company2.RecordTypeId = rectCo[0].Id; |
| | | // company2.Name = '病院テスト2'; |
| | | // insert new Account[] {company1, company2}; |
| | | // insert |
| | | Account company1 = new Account(); |
| | | Account company2 = new Account(); |
| | | company1.RecordTypeId = rectCo[0].Id; |
| | | company1.Name = '病院テスト1'; |
| | | company2.RecordTypeId = rectCo[0].Id; |
| | | company2.Name = '病院テスト2'; |
| | | insert new Account[] {company1, company2}; |
| | | |
| | | // 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]; |
| | | // List<Account> dc2s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = :company2.Id order by Department_Class_Label__c]; |
| | | 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]; |
| | | List<Account> dc2s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = :company2.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; |
| | | 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; |
| | | |
| | | // Account depart2 = new Account(); |
| | | // depart2.RecordTypeId = rectDpt[1].Id; |
| | | // depart2.Name = '*'; |
| | | // depart2.Department_Name__c = '診療科2'; |
| | | // depart2.ParentId = dc2s[1].Id; |
| | | // depart2.Department_Class__c = dc2s[1].Id; |
| | | // depart2.Hospital__c = company2.Id; |
| | | Account depart2 = new Account(); |
| | | depart2.RecordTypeId = rectDpt[1].Id; |
| | | depart2.Name = '*'; |
| | | depart2.Department_Name__c = '診療科2'; |
| | | depart2.ParentId = dc2s[1].Id; |
| | | depart2.Department_Class__c = dc2s[1].Id; |
| | | depart2.Hospital__c = company2.Id; |
| | | |
| | | // insert new Account[] {depart1, depart2}; |
| | | insert new Account[] {depart1, depart2}; |
| | | |
| | | // // まずひとつ追加 |
| | | // 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 = true; |
| | | // Product2 prd2 = new Product2(); |
| | | // prd2.ProductCode_Ext__c = 'HistoryPrd2'; |
| | | // prd2.ProductCode = 'HistoryPrd2'; |
| | | // prd2.Repair_Product_Code__c = 'HistoryPrd2_RP'; |
| | | // prd2.Name = 'HistoryPrd2'; |
| | | // prd2.Manual_Entry__c = true; |
| | | // insert new Product2[] {prd1, prd2}; |
| | | // まずひとつ追加 |
| | | 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 = true; |
| | | Product2 prd2 = new Product2(); |
| | | prd2.ProductCode_Ext__c = 'HistoryPrd2'; |
| | | prd2.ProductCode = 'HistoryPrd2'; |
| | | prd2.Repair_Product_Code__c = 'HistoryPrd2_RP'; |
| | | prd2.Name = 'HistoryPrd2'; |
| | | prd2.Manual_Entry__c = true; |
| | | insert new Product2[] {prd1, prd2}; |
| | | |
| | | // // 商談 |
| | | // Opportunity opp1 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | // Hospital__c = company1.Id, |
| | | // Department_Class__c = dc1s[0].Id, |
| | | // AccountId = depart1.Id |
| | | // ); |
| | | // Opportunity opp2 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | // Hospital__c = company2.Id, |
| | | // Department_Class__c = dc2s[0].Id, |
| | | // AccountId = depart2.Id |
| | | // ); |
| | | // insert new Opportunity[] {opp1, opp2}; |
| | | // 商談 |
| | | Opportunity opp1 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | Hospital__c = company1.Id, |
| | | Department_Class__c = dc1s[0].Id, |
| | | AccountId = depart1.Id |
| | | ); |
| | | Opportunity opp2 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | Hospital__c = company2.Id, |
| | | Department_Class__c = dc2s[0].Id, |
| | | AccountId = depart2.Id |
| | | ); |
| | | insert new Opportunity[] {opp1, opp2}; |
| | | |
| | | // // 失单 |
| | | // Lost_cancel_report__c lcr1 = new Lost_cancel_report__c( |
| | | // Opportunity__c = opp1.Id, |
| | | // CompetitorProduct1__c = prd1.Id, |
| | | // RecordTypeId = rectLost[0].Id |
| | | // ); |
| | | // // 取消 |
| | | // Lost_cancel_report__c lcr2 = new Lost_cancel_report__c( |
| | | // Opportunity__c = opp2.Id, |
| | | // CompetitorProduct1__c = prd2.Id, |
| | | // RecordTypeId = rectLost[1].Id |
| | | // ); |
| | | // insert new Lost_cancel_report__c[] {lcr1, lcr2}; |
| | | // 失单 |
| | | Lost_cancel_report__c lcr1 = new Lost_cancel_report__c( |
| | | Opportunity__c = opp1.Id, |
| | | CompetitorProduct1__c = prd1.Id, |
| | | RecordTypeId = rectLost[0].Id |
| | | ); |
| | | // 取消 |
| | | Lost_cancel_report__c lcr2 = new Lost_cancel_report__c( |
| | | Opportunity__c = opp2.Id, |
| | | CompetitorProduct1__c = prd2.Id, |
| | | RecordTypeId = rectLost[1].Id |
| | | ); |
| | | insert new Lost_cancel_report__c[] {lcr1, lcr2}; |
| | | |
| | | // // Assert |
| | | // lcr1 = [Select Id, CompetitorAsset1__c, CompetitorAsset1__r.Product2Id from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | // lcr2 = [Select Id, CompetitorAsset1__c from Lost_cancel_report__c where Id = :lcr2.Id]; |
| | | // List<Asset> asts = [Select Id, Opportunity__c from Asset where Id = :lcr1.CompetitorAsset1__c]; |
| | | // System.assertEquals(False, lcr2.CompetitorAsset1__c <> null); |
| | | // System.assertEquals(1, asts.size()); |
| | | // System.assertEquals(opp1.Id, asts[0].Opportunity__c); |
| | | // System.assertEquals(True, lcr1.CompetitorAsset1__c <> null); |
| | | // System.assertEquals(prd1.Id, lcr1.CompetitorAsset1__r.Product2Id); |
| | | // Assert |
| | | lcr1 = [Select Id, CompetitorAsset1__c, CompetitorAsset1__r.Product2Id from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | lcr2 = [Select Id, CompetitorAsset1__c from Lost_cancel_report__c where Id = :lcr2.Id]; |
| | | List<Asset> asts = [Select Id, Opportunity__c from Asset where Id = :lcr1.CompetitorAsset1__c]; |
| | | System.assertEquals(False, lcr2.CompetitorAsset1__c <> null); |
| | | System.assertEquals(1, asts.size()); |
| | | System.assertEquals(opp1.Id, asts[0].Opportunity__c); |
| | | System.assertEquals(True, lcr1.CompetitorAsset1__c <> null); |
| | | System.assertEquals(prd1.Id, lcr1.CompetitorAsset1__r.Product2Id); |
| | | |
| | | // // update1 |
| | | // lcr1.CompetitorProduct1__c = prd2.Id; |
| | | // update lcr1; |
| | | // lcr1 = [Select Id, CompetitorAsset1__c, CompetitorAsset1__r.Product2Id from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | // System.assertEquals(True, lcr1.CompetitorAsset1__c <> null); |
| | | // System.assertEquals(prd2.Id, lcr1.CompetitorAsset1__r.Product2Id); |
| | | // update1 |
| | | lcr1.CompetitorProduct1__c = prd2.Id; |
| | | update lcr1; |
| | | lcr1 = [Select Id, CompetitorAsset1__c, CompetitorAsset1__r.Product2Id from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | System.assertEquals(True, lcr1.CompetitorAsset1__c <> null); |
| | | System.assertEquals(prd2.Id, lcr1.CompetitorAsset1__r.Product2Id); |
| | | |
| | | // // update2 |
| | | // lcr1.CompetitorProduct2__c = prd1.Id; |
| | | // update lcr1; |
| | | // lcr1 = [Select Id, CompetitorAsset1__c, CompetitorAsset1__r.Product2Id, |
| | | // CompetitorAsset2__c, CompetitorAsset2__r.Product2Id |
| | | // from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | // System.assertEquals(True, lcr1.CompetitorAsset1__c <> null); |
| | | // System.assertEquals(prd2.Id, lcr1.CompetitorAsset1__r.Product2Id); |
| | | // System.assertEquals(True, lcr1.CompetitorAsset2__c <> null); |
| | | // System.assertEquals(prd1.Id, lcr1.CompetitorAsset2__r.Product2Id); |
| | | // update2 |
| | | lcr1.CompetitorProduct2__c = prd1.Id; |
| | | update lcr1; |
| | | lcr1 = [Select Id, CompetitorAsset1__c, CompetitorAsset1__r.Product2Id, |
| | | CompetitorAsset2__c, CompetitorAsset2__r.Product2Id |
| | | from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | System.assertEquals(True, lcr1.CompetitorAsset1__c <> null); |
| | | System.assertEquals(prd2.Id, lcr1.CompetitorAsset1__r.Product2Id); |
| | | System.assertEquals(True, lcr1.CompetitorAsset2__c <> null); |
| | | System.assertEquals(prd1.Id, lcr1.CompetitorAsset2__r.Product2Id); |
| | | |
| | | // // delete |
| | | // delete lcr1; |
| | | // asts = [Select Id from Asset where (Id = :lcr1.CompetitorAsset1__c or Id = :lcr1.CompetitorAsset2__c)]; |
| | | // System.assertEquals(0, asts.size()); |
| | | // } |
| | | // delete |
| | | delete lcr1; |
| | | asts = [Select Id from Asset where (Id = :lcr1.CompetitorAsset1__c or Id = :lcr1.CompetitorAsset2__c)]; |
| | | System.assertEquals(0, asts.size()); |
| | | } |
| | | |
| | | // /** |
| | | // * 新規して1,2、update、競合1,2 |
| | | // */ |
| | | // static testMethod void testLostCancelReport2() { |
| | | // // recode type を取得 |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | // if (rectCo.size() == 0) { |
| | | // throw new ControllerUtil.myException('not found 病院 recodetype'); |
| | | // } |
| | | // List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | // if (rectSct.size() == 0) { |
| | | // throw new ControllerUtil.myException('not found 戦略科室分類 recodetype'); |
| | | // } |
| | | // 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) { |
| | | // throw new ControllerUtil.myException('not found 診療科 recodetype'); |
| | | // } |
| | | // List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc]; |
| | | // if (rectLost.size() == 0) { |
| | | // throw new ControllerUtil.myException('not found Lost_cancel_report recodetype'); |
| | | // } |
| | | /** |
| | | * 新規して1,2、update、競合1,2 |
| | | */ |
| | | static testMethod void testLostCancelReport2() { |
| | | // recode type を取得 |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 病院 recodetype'); |
| | | } |
| | | List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | if (rectSct.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 戦略科室分類 recodetype'); |
| | | } |
| | | 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) { |
| | | throw new ControllerUtil.myException('not found 診療科 recodetype'); |
| | | } |
| | | List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc]; |
| | | if (rectLost.size() == 0) { |
| | | throw new ControllerUtil.myException('not found Lost_cancel_report recodetype'); |
| | | } |
| | | |
| | | // // insert |
| | | // Account company1 = new Account(); |
| | | // Account company2 = new Account(); |
| | | // company1.RecordTypeId = rectCo[0].Id; |
| | | // company1.Name = '病院テスト1'; |
| | | // company2.RecordTypeId = rectCo[0].Id; |
| | | // company2.Name = '病院テスト2'; |
| | | // insert new Account[] {company1, company2}; |
| | | // insert |
| | | Account company1 = new Account(); |
| | | Account company2 = new Account(); |
| | | company1.RecordTypeId = rectCo[0].Id; |
| | | company1.Name = '病院テスト1'; |
| | | company2.RecordTypeId = rectCo[0].Id; |
| | | company2.Name = '病院テスト2'; |
| | | insert new Account[] {company1, company2}; |
| | | |
| | | // 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]; |
| | | // List<Account> dc2s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = :company2.Id order by Department_Class_Label__c]; |
| | | 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]; |
| | | List<Account> dc2s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = :company2.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; |
| | | 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; |
| | | |
| | | // Account depart2 = new Account(); |
| | | // depart2.RecordTypeId = rectDpt[1].Id; |
| | | // depart2.Name = '*'; |
| | | // depart2.Department_Name__c = '診療科2'; |
| | | // depart2.ParentId = dc2s[1].Id; |
| | | // depart2.Department_Class__c = dc2s[1].Id; |
| | | // depart2.Hospital__c = company2.Id; |
| | | Account depart2 = new Account(); |
| | | depart2.RecordTypeId = rectDpt[1].Id; |
| | | depart2.Name = '*'; |
| | | depart2.Department_Name__c = '診療科2'; |
| | | depart2.ParentId = dc2s[1].Id; |
| | | depart2.Department_Class__c = dc2s[1].Id; |
| | | depart2.Hospital__c = company2.Id; |
| | | |
| | | // insert new Account[] {depart1, depart2}; |
| | | insert new Account[] {depart1, depart2}; |
| | | |
| | | // // まずひとつ追加 |
| | | // 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 = true; |
| | | // Product2 prd2 = new Product2(); |
| | | // prd2.ProductCode_Ext__c = 'HistoryPrd2'; |
| | | // prd2.ProductCode = 'HistoryPrd2'; |
| | | // prd2.Repair_Product_Code__c = 'HistoryPrd2_RP'; |
| | | // prd2.Name = 'HistoryPrd2'; |
| | | // prd2.Manual_Entry__c = true; |
| | | // insert new Product2[] {prd1, prd2}; |
| | | // まずひとつ追加 |
| | | 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 = true; |
| | | Product2 prd2 = new Product2(); |
| | | prd2.ProductCode_Ext__c = 'HistoryPrd2'; |
| | | prd2.ProductCode = 'HistoryPrd2'; |
| | | prd2.Repair_Product_Code__c = 'HistoryPrd2_RP'; |
| | | prd2.Name = 'HistoryPrd2'; |
| | | prd2.Manual_Entry__c = true; |
| | | insert new Product2[] {prd1, prd2}; |
| | | |
| | | // // 商談 |
| | | // Opportunity opp1 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | // Hospital__c = company1.Id, |
| | | // Department_Class__c = dc1s[0].Id, |
| | | // AccountId = depart1.Id |
| | | // ); |
| | | // Opportunity opp2 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | // Hospital__c = company2.Id, |
| | | // Department_Class__c = dc2s[0].Id, |
| | | // AccountId = depart2.Id |
| | | // ); |
| | | // insert new Opportunity[] {opp1, opp2}; |
| | | // 商談 |
| | | Opportunity opp1 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | Hospital__c = company1.Id, |
| | | Department_Class__c = dc1s[0].Id, |
| | | AccountId = depart1.Id |
| | | ); |
| | | Opportunity opp2 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | Hospital__c = company2.Id, |
| | | Department_Class__c = dc2s[0].Id, |
| | | AccountId = depart2.Id |
| | | ); |
| | | insert new Opportunity[] {opp1, opp2}; |
| | | |
| | | // // 失单 |
| | | // Lost_cancel_report__c lcr1 = new Lost_cancel_report__c( |
| | | // Opportunity__c = opp1.Id, |
| | | // CompetitorProduct1__c = prd1.Id, |
| | | // CompetitorProduct2__c = prd2.Id, |
| | | // RecordTypeId = rectLost[0].Id |
| | | // ); |
| | | // // 取消 |
| | | // Lost_cancel_report__c lcr2 = new Lost_cancel_report__c( |
| | | // Opportunity__c = opp2.Id, |
| | | // RecordTypeId = rectLost[1].Id |
| | | // ); |
| | | // insert new Lost_cancel_report__c[] {lcr1, lcr2}; |
| | | // 失单 |
| | | Lost_cancel_report__c lcr1 = new Lost_cancel_report__c( |
| | | Opportunity__c = opp1.Id, |
| | | CompetitorProduct1__c = prd1.Id, |
| | | CompetitorProduct2__c = prd2.Id, |
| | | RecordTypeId = rectLost[0].Id |
| | | ); |
| | | // 取消 |
| | | Lost_cancel_report__c lcr2 = new Lost_cancel_report__c( |
| | | Opportunity__c = opp2.Id, |
| | | RecordTypeId = rectLost[1].Id |
| | | ); |
| | | insert new Lost_cancel_report__c[] {lcr1, lcr2}; |
| | | |
| | | // // Assert |
| | | // lcr1 = [Select Id, CompetitorAsset1__c, CompetitorAsset1__r.Product2Id, |
| | | // CompetitorAsset2__c, CompetitorAsset2__r.Product2Id |
| | | // from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | // lcr2 = [Select Id, CompetitorAsset2__c from Lost_cancel_report__c where Id = :lcr2.Id]; |
| | | // List<Asset> asts = [Select Id, Opportunity__c from Asset where Id = :lcr1.CompetitorAsset2__c]; |
| | | // System.assertEquals(False, lcr2.CompetitorAsset2__c <> null); |
| | | // System.assertEquals(1, asts.size()); |
| | | // System.assertEquals(opp1.Id, asts[0].Opportunity__c); |
| | | // System.assertEquals(True, lcr1.CompetitorAsset1__c <> null); |
| | | // System.assertEquals(prd1.Id, lcr1.CompetitorAsset1__r.Product2Id); |
| | | // System.assertEquals(True, lcr1.CompetitorAsset2__c <> null); |
| | | // System.assertEquals(prd2.Id, lcr1.CompetitorAsset2__r.Product2Id); |
| | | // Assert |
| | | lcr1 = [Select Id, CompetitorAsset1__c, CompetitorAsset1__r.Product2Id, |
| | | CompetitorAsset2__c, CompetitorAsset2__r.Product2Id |
| | | from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | lcr2 = [Select Id, CompetitorAsset2__c from Lost_cancel_report__c where Id = :lcr2.Id]; |
| | | List<Asset> asts = [Select Id, Opportunity__c from Asset where Id = :lcr1.CompetitorAsset2__c]; |
| | | System.assertEquals(False, lcr2.CompetitorAsset2__c <> null); |
| | | System.assertEquals(1, asts.size()); |
| | | System.assertEquals(opp1.Id, asts[0].Opportunity__c); |
| | | System.assertEquals(True, lcr1.CompetitorAsset1__c <> null); |
| | | System.assertEquals(prd1.Id, lcr1.CompetitorAsset1__r.Product2Id); |
| | | System.assertEquals(True, lcr1.CompetitorAsset2__c <> null); |
| | | System.assertEquals(prd2.Id, lcr1.CompetitorAsset2__r.Product2Id); |
| | | |
| | | // // update |
| | | // lcr1.CompetitorProduct1__c = prd2.Id; |
| | | // lcr1.CompetitorProduct2__c = prd1.Id; |
| | | // update lcr1; |
| | | // lcr1 = [Select Id, CompetitorAsset1__c, CompetitorAsset1__r.Product2Id, |
| | | // CompetitorAsset2__c, CompetitorAsset2__r.Product2Id |
| | | // from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | // System.assertEquals(True, lcr1.CompetitorAsset2__c <> null); |
| | | // System.assertEquals(prd1.Id, lcr1.CompetitorAsset2__r.Product2Id); |
| | | // System.assertEquals(True, lcr1.CompetitorAsset1__c <> null); |
| | | // System.assertEquals(prd2.Id, lcr1.CompetitorAsset1__r.Product2Id); |
| | | // update |
| | | lcr1.CompetitorProduct1__c = prd2.Id; |
| | | lcr1.CompetitorProduct2__c = prd1.Id; |
| | | update lcr1; |
| | | lcr1 = [Select Id, CompetitorAsset1__c, CompetitorAsset1__r.Product2Id, |
| | | CompetitorAsset2__c, CompetitorAsset2__r.Product2Id |
| | | from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | System.assertEquals(True, lcr1.CompetitorAsset2__c <> null); |
| | | System.assertEquals(prd1.Id, lcr1.CompetitorAsset2__r.Product2Id); |
| | | System.assertEquals(True, lcr1.CompetitorAsset1__c <> null); |
| | | System.assertEquals(prd2.Id, lcr1.CompetitorAsset1__r.Product2Id); |
| | | |
| | | // // delete |
| | | // delete lcr1; |
| | | // asts = [Select Id from Asset where (Id = :lcr1.CompetitorAsset1__c or Id = :lcr1.CompetitorAsset2__c)]; |
| | | // System.assertEquals(0, asts.size()); |
| | | // } |
| | | // delete |
| | | delete lcr1; |
| | | asts = [Select Id from Asset where (Id = :lcr1.CompetitorAsset1__c or Id = :lcr1.CompetitorAsset2__c)]; |
| | | System.assertEquals(0, asts.size()); |
| | | } |
| | | |
| | | // /** |
| | | // * 新規して、update、競合3 |
| | | // * update、競合4 |
| | | // */ |
| | | // static testMethod void testLostCancelReport3() { |
| | | // // recode type を取得 |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | // if (rectCo.size() == 0) { |
| | | // throw new ControllerUtil.myException('not found 病院 recodetype'); |
| | | // } |
| | | // List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | // if (rectSct.size() == 0) { |
| | | // throw new ControllerUtil.myException('not found 戦略科室分類 recodetype'); |
| | | // } |
| | | // 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) { |
| | | // throw new ControllerUtil.myException('not found 診療科 recodetype'); |
| | | // } |
| | | // List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc]; |
| | | // if (rectLost.size() == 0) { |
| | | // throw new ControllerUtil.myException('not found Lost_cancel_report recodetype'); |
| | | // } |
| | | /** |
| | | * 新規して、update、競合3 |
| | | * update、競合4 |
| | | */ |
| | | static testMethod void testLostCancelReport3() { |
| | | // recode type を取得 |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 病院 recodetype'); |
| | | } |
| | | List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | if (rectSct.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 戦略科室分類 recodetype'); |
| | | } |
| | | 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) { |
| | | throw new ControllerUtil.myException('not found 診療科 recodetype'); |
| | | } |
| | | List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc]; |
| | | if (rectLost.size() == 0) { |
| | | throw new ControllerUtil.myException('not found Lost_cancel_report recodetype'); |
| | | } |
| | | |
| | | // // insert |
| | | // Account company1 = new Account(); |
| | | // Account company2 = new Account(); |
| | | // company1.RecordTypeId = rectCo[0].Id; |
| | | // company1.Name = '病院テスト1'; |
| | | // company2.RecordTypeId = rectCo[0].Id; |
| | | // company2.Name = '病院テスト2'; |
| | | // insert new Account[] {company1, company2}; |
| | | // insert |
| | | Account company1 = new Account(); |
| | | Account company2 = new Account(); |
| | | company1.RecordTypeId = rectCo[0].Id; |
| | | company1.Name = '病院テスト1'; |
| | | company2.RecordTypeId = rectCo[0].Id; |
| | | company2.Name = '病院テスト2'; |
| | | insert new Account[] {company1, company2}; |
| | | |
| | | // 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]; |
| | | // List<Account> dc2s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = :company2.Id order by Department_Class_Label__c]; |
| | | 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]; |
| | | List<Account> dc2s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = :company2.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; |
| | | 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; |
| | | |
| | | // Account depart2 = new Account(); |
| | | // depart2.RecordTypeId = rectDpt[1].Id; |
| | | // depart2.Name = '*'; |
| | | // depart2.Department_Name__c = '診療科2'; |
| | | // depart2.ParentId = dc2s[1].Id; |
| | | // depart2.Department_Class__c = dc2s[1].Id; |
| | | // depart2.Hospital__c = company2.Id; |
| | | Account depart2 = new Account(); |
| | | depart2.RecordTypeId = rectDpt[1].Id; |
| | | depart2.Name = '*'; |
| | | depart2.Department_Name__c = '診療科2'; |
| | | depart2.ParentId = dc2s[1].Id; |
| | | depart2.Department_Class__c = dc2s[1].Id; |
| | | depart2.Hospital__c = company2.Id; |
| | | |
| | | // insert new Account[] {depart1, depart2}; |
| | | insert new Account[] {depart1, depart2}; |
| | | |
| | | // // まずひとつ追加 |
| | | // 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 = true; |
| | | // Product2 prd2 = new Product2(); |
| | | // prd2.ProductCode_Ext__c = 'HistoryPrd2'; |
| | | // prd2.ProductCode = 'HistoryPrd2'; |
| | | // prd2.Repair_Product_Code__c = 'HistoryPrd2_RP'; |
| | | // prd2.Name = 'HistoryPrd2'; |
| | | // prd2.Manual_Entry__c = true; |
| | | // insert new Product2[] {prd1, prd2}; |
| | | // まずひとつ追加 |
| | | 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 = true; |
| | | Product2 prd2 = new Product2(); |
| | | prd2.ProductCode_Ext__c = 'HistoryPrd2'; |
| | | prd2.ProductCode = 'HistoryPrd2'; |
| | | prd2.Repair_Product_Code__c = 'HistoryPrd2_RP'; |
| | | prd2.Name = 'HistoryPrd2'; |
| | | prd2.Manual_Entry__c = true; |
| | | insert new Product2[] {prd1, prd2}; |
| | | |
| | | // // 商談 |
| | | // Opportunity opp1 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | // Hospital__c = company1.Id, |
| | | // Department_Class__c = dc1s[0].Id, |
| | | // AccountId = depart1.Id |
| | | // ); |
| | | // Opportunity opp2 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | // Hospital__c = company2.Id, |
| | | // Department_Class__c = dc2s[0].Id, |
| | | // AccountId = depart2.Id |
| | | // ); |
| | | // insert new Opportunity[] {opp1, opp2}; |
| | | // 商談 |
| | | Opportunity opp1 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | Hospital__c = company1.Id, |
| | | Department_Class__c = dc1s[0].Id, |
| | | AccountId = depart1.Id |
| | | ); |
| | | Opportunity opp2 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | Hospital__c = company2.Id, |
| | | Department_Class__c = dc2s[0].Id, |
| | | AccountId = depart2.Id |
| | | ); |
| | | insert new Opportunity[] {opp1, opp2}; |
| | | |
| | | // // 失单 |
| | | // Lost_cancel_report__c lcr1 = new Lost_cancel_report__c( |
| | | // Opportunity__c = opp1.Id, |
| | | // CompetitorProduct3__c = prd1.Id, |
| | | // RecordTypeId = rectLost[0].Id |
| | | // ); |
| | | // // 取消 |
| | | // Lost_cancel_report__c lcr2 = new Lost_cancel_report__c( |
| | | // Opportunity__c = opp2.Id, |
| | | // CompetitorProduct3__c = prd2.Id, |
| | | // RecordTypeId = rectLost[1].Id |
| | | // ); |
| | | // insert new Lost_cancel_report__c[] {lcr1, lcr2}; |
| | | // 失单 |
| | | Lost_cancel_report__c lcr1 = new Lost_cancel_report__c( |
| | | Opportunity__c = opp1.Id, |
| | | CompetitorProduct3__c = prd1.Id, |
| | | RecordTypeId = rectLost[0].Id |
| | | ); |
| | | // 取消 |
| | | Lost_cancel_report__c lcr2 = new Lost_cancel_report__c( |
| | | Opportunity__c = opp2.Id, |
| | | CompetitorProduct3__c = prd2.Id, |
| | | RecordTypeId = rectLost[1].Id |
| | | ); |
| | | insert new Lost_cancel_report__c[] {lcr1, lcr2}; |
| | | |
| | | // // Assert |
| | | // lcr1 = [Select Id, CompetitorAsset3__c, CompetitorAsset3__r.Product2Id from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | // lcr2 = [Select Id, CompetitorAsset3__c from Lost_cancel_report__c where Id = :lcr2.Id]; |
| | | // List<Asset> asts = [Select Id, Opportunity__c from Asset where Id = :lcr1.CompetitorAsset3__c]; |
| | | // System.assertEquals(False, lcr2.CompetitorAsset3__c <> null); |
| | | // System.assertEquals(1, asts.size()); |
| | | // System.assertEquals(opp1.Id, asts[0].Opportunity__c); |
| | | // System.assertEquals(True, lcr1.CompetitorAsset3__c <> null); |
| | | // System.assertEquals(prd1.Id, lcr1.CompetitorAsset3__r.Product2Id); |
| | | // Assert |
| | | lcr1 = [Select Id, CompetitorAsset3__c, CompetitorAsset3__r.Product2Id from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | lcr2 = [Select Id, CompetitorAsset3__c from Lost_cancel_report__c where Id = :lcr2.Id]; |
| | | List<Asset> asts = [Select Id, Opportunity__c from Asset where Id = :lcr1.CompetitorAsset3__c]; |
| | | System.assertEquals(False, lcr2.CompetitorAsset3__c <> null); |
| | | System.assertEquals(1, asts.size()); |
| | | System.assertEquals(opp1.Id, asts[0].Opportunity__c); |
| | | System.assertEquals(True, lcr1.CompetitorAsset3__c <> null); |
| | | System.assertEquals(prd1.Id, lcr1.CompetitorAsset3__r.Product2Id); |
| | | |
| | | // // update3 |
| | | // lcr1.CompetitorProduct3__c = prd2.Id; |
| | | // update lcr1; |
| | | // lcr1 = [Select Id, CompetitorAsset3__c, CompetitorAsset3__r.Product2Id from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | // System.assertEquals(True, lcr1.CompetitorAsset3__c <> null); |
| | | // System.assertEquals(prd2.Id, lcr1.CompetitorAsset3__r.Product2Id); |
| | | // update3 |
| | | lcr1.CompetitorProduct3__c = prd2.Id; |
| | | update lcr1; |
| | | lcr1 = [Select Id, CompetitorAsset3__c, CompetitorAsset3__r.Product2Id from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | System.assertEquals(True, lcr1.CompetitorAsset3__c <> null); |
| | | System.assertEquals(prd2.Id, lcr1.CompetitorAsset3__r.Product2Id); |
| | | |
| | | // // update4 |
| | | // lcr1.CompetitorProduct4__c = prd1.Id; |
| | | // update lcr1; |
| | | // lcr1 = [Select Id, |
| | | // CompetitorAsset3__c, CompetitorAsset3__r.Product2Id, |
| | | // CompetitorAsset4__c, CompetitorAsset4__r.Product2Id |
| | | // from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | // System.assertEquals(True, lcr1.CompetitorAsset3__c <> null); |
| | | // System.assertEquals(prd2.Id, lcr1.CompetitorAsset3__r.Product2Id); |
| | | // System.assertEquals(True, lcr1.CompetitorAsset4__c <> null); |
| | | // System.assertEquals(prd1.Id, lcr1.CompetitorAsset4__r.Product2Id); |
| | | // update4 |
| | | lcr1.CompetitorProduct4__c = prd1.Id; |
| | | update lcr1; |
| | | lcr1 = [Select Id, |
| | | CompetitorAsset3__c, CompetitorAsset3__r.Product2Id, |
| | | CompetitorAsset4__c, CompetitorAsset4__r.Product2Id |
| | | from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | System.assertEquals(True, lcr1.CompetitorAsset3__c <> null); |
| | | System.assertEquals(prd2.Id, lcr1.CompetitorAsset3__r.Product2Id); |
| | | System.assertEquals(True, lcr1.CompetitorAsset4__c <> null); |
| | | System.assertEquals(prd1.Id, lcr1.CompetitorAsset4__r.Product2Id); |
| | | |
| | | // // delete |
| | | // delete lcr1; |
| | | // asts = [Select Id from Asset where (Id = :lcr1.CompetitorAsset3__c or Id = :lcr1.CompetitorAsset4__c)]; |
| | | // System.assertEquals(0, asts.size()); |
| | | // } |
| | | // delete |
| | | delete lcr1; |
| | | asts = [Select Id from Asset where (Id = :lcr1.CompetitorAsset3__c or Id = :lcr1.CompetitorAsset4__c)]; |
| | | System.assertEquals(0, asts.size()); |
| | | } |
| | | |
| | | // /** |
| | | // * 新規して3,4、update、競合3,4 |
| | | // */ |
| | | // static testMethod void testLostCancelReport4() { |
| | | // // recode type を取得 |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | // if (rectCo.size() == 0) { |
| | | // throw new ControllerUtil.myException('not found 病院 recodetype'); |
| | | // } |
| | | // List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | // if (rectSct.size() == 0) { |
| | | // throw new ControllerUtil.myException('not found 戦略科室分類 recodetype'); |
| | | // } |
| | | // 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) { |
| | | // throw new ControllerUtil.myException('not found 診療科 recodetype'); |
| | | // } |
| | | // List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc]; |
| | | // if (rectLost.size() == 0) { |
| | | // throw new ControllerUtil.myException('not found Lost_cancel_report recodetype'); |
| | | // } |
| | | /** |
| | | * 新規して3,4、update、競合3,4 |
| | | */ |
| | | static testMethod void testLostCancelReport4() { |
| | | // recode type を取得 |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 病院 recodetype'); |
| | | } |
| | | List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | if (rectSct.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 戦略科室分類 recodetype'); |
| | | } |
| | | 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) { |
| | | throw new ControllerUtil.myException('not found 診療科 recodetype'); |
| | | } |
| | | List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc]; |
| | | if (rectLost.size() == 0) { |
| | | throw new ControllerUtil.myException('not found Lost_cancel_report recodetype'); |
| | | } |
| | | |
| | | // // insert |
| | | // Account company1 = new Account(); |
| | | // Account company2 = new Account(); |
| | | // company1.RecordTypeId = rectCo[0].Id; |
| | | // company1.Name = '病院テスト1'; |
| | | // company2.RecordTypeId = rectCo[0].Id; |
| | | // company2.Name = '病院テスト2'; |
| | | // insert new Account[] {company1, company2}; |
| | | // insert |
| | | Account company1 = new Account(); |
| | | Account company2 = new Account(); |
| | | company1.RecordTypeId = rectCo[0].Id; |
| | | company1.Name = '病院テスト1'; |
| | | company2.RecordTypeId = rectCo[0].Id; |
| | | company2.Name = '病院テスト2'; |
| | | insert new Account[] {company1, company2}; |
| | | |
| | | // 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]; |
| | | // List<Account> dc2s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = :company2.Id order by Department_Class_Label__c]; |
| | | 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]; |
| | | List<Account> dc2s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = :company2.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; |
| | | 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; |
| | | |
| | | // Account depart2 = new Account(); |
| | | // depart2.RecordTypeId = rectDpt[1].Id; |
| | | // depart2.Name = '*'; |
| | | // depart2.Department_Name__c = '診療科2'; |
| | | // depart2.ParentId = dc2s[1].Id; |
| | | // depart2.Department_Class__c = dc2s[1].Id; |
| | | // depart2.Hospital__c = company2.Id; |
| | | Account depart2 = new Account(); |
| | | depart2.RecordTypeId = rectDpt[1].Id; |
| | | depart2.Name = '*'; |
| | | depart2.Department_Name__c = '診療科2'; |
| | | depart2.ParentId = dc2s[1].Id; |
| | | depart2.Department_Class__c = dc2s[1].Id; |
| | | depart2.Hospital__c = company2.Id; |
| | | |
| | | // insert new Account[] {depart1, depart2}; |
| | | insert new Account[] {depart1, depart2}; |
| | | |
| | | // // まずひとつ追加 |
| | | // 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 = true; |
| | | // Product2 prd2 = new Product2(); |
| | | // prd2.ProductCode_Ext__c = 'HistoryPrd2'; |
| | | // prd2.ProductCode = 'HistoryPrd2'; |
| | | // prd2.Repair_Product_Code__c = 'HistoryPrd2_RP'; |
| | | // prd2.Name = 'HistoryPrd2'; |
| | | // prd2.Manual_Entry__c = true; |
| | | // insert new Product2[] {prd1, prd2}; |
| | | // まずひとつ追加 |
| | | 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 = true; |
| | | Product2 prd2 = new Product2(); |
| | | prd2.ProductCode_Ext__c = 'HistoryPrd2'; |
| | | prd2.ProductCode = 'HistoryPrd2'; |
| | | prd2.Repair_Product_Code__c = 'HistoryPrd2_RP'; |
| | | prd2.Name = 'HistoryPrd2'; |
| | | prd2.Manual_Entry__c = true; |
| | | insert new Product2[] {prd1, prd2}; |
| | | |
| | | // // 商談 |
| | | // Opportunity opp1 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | // Hospital__c = company1.Id, |
| | | // Department_Class__c = dc1s[0].Id, |
| | | // AccountId = depart1.Id |
| | | // ); |
| | | // Opportunity opp2 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | // Hospital__c = company2.Id, |
| | | // Department_Class__c = dc2s[0].Id, |
| | | // AccountId = depart2.Id |
| | | // ); |
| | | // insert new Opportunity[] {opp1, opp2}; |
| | | // 商談 |
| | | Opportunity opp1 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | Hospital__c = company1.Id, |
| | | Department_Class__c = dc1s[0].Id, |
| | | AccountId = depart1.Id |
| | | ); |
| | | Opportunity opp2 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | Hospital__c = company2.Id, |
| | | Department_Class__c = dc2s[0].Id, |
| | | AccountId = depart2.Id |
| | | ); |
| | | insert new Opportunity[] {opp1, opp2}; |
| | | |
| | | // // 失单 |
| | | // Lost_cancel_report__c lcr1 = new Lost_cancel_report__c( |
| | | // Opportunity__c = opp1.Id, |
| | | // CompetitorProduct3__c = prd1.Id, |
| | | // CompetitorProduct4__c = prd2.Id, |
| | | // RecordTypeId = rectLost[0].Id |
| | | // ); |
| | | // // 取消 |
| | | // Lost_cancel_report__c lcr2 = new Lost_cancel_report__c( |
| | | // Opportunity__c = opp2.Id, |
| | | // RecordTypeId = rectLost[1].Id |
| | | // ); |
| | | // insert new Lost_cancel_report__c[] {lcr1, lcr2}; |
| | | // 失单 |
| | | Lost_cancel_report__c lcr1 = new Lost_cancel_report__c( |
| | | Opportunity__c = opp1.Id, |
| | | CompetitorProduct3__c = prd1.Id, |
| | | CompetitorProduct4__c = prd2.Id, |
| | | RecordTypeId = rectLost[0].Id |
| | | ); |
| | | // 取消 |
| | | Lost_cancel_report__c lcr2 = new Lost_cancel_report__c( |
| | | Opportunity__c = opp2.Id, |
| | | RecordTypeId = rectLost[1].Id |
| | | ); |
| | | insert new Lost_cancel_report__c[] {lcr1, lcr2}; |
| | | |
| | | // // Assert |
| | | // lcr1 = [Select Id, CompetitorAsset3__c, CompetitorAsset3__r.Product2Id, |
| | | // CompetitorAsset4__c, CompetitorAsset4__r.Product2Id |
| | | // from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | // lcr2 = [Select Id, CompetitorAsset4__c from Lost_cancel_report__c where Id = :lcr2.Id]; |
| | | // List<Asset> asts = [Select Id, Opportunity__c from Asset where Id = :lcr1.CompetitorAsset4__c]; |
| | | // System.assertEquals(False, lcr2.CompetitorAsset4__c <> null); |
| | | // System.assertEquals(1, asts.size()); |
| | | // System.assertEquals(opp1.Id, asts[0].Opportunity__c); |
| | | // System.assertEquals(True, lcr1.CompetitorAsset3__c <> null); |
| | | // System.assertEquals(prd1.Id, lcr1.CompetitorAsset3__r.Product2Id); |
| | | // System.assertEquals(True, lcr1.CompetitorAsset4__c <> null); |
| | | // System.assertEquals(prd2.Id, lcr1.CompetitorAsset4__r.Product2Id); |
| | | // Assert |
| | | lcr1 = [Select Id, CompetitorAsset3__c, CompetitorAsset3__r.Product2Id, |
| | | CompetitorAsset4__c, CompetitorAsset4__r.Product2Id |
| | | from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | lcr2 = [Select Id, CompetitorAsset4__c from Lost_cancel_report__c where Id = :lcr2.Id]; |
| | | List<Asset> asts = [Select Id, Opportunity__c from Asset where Id = :lcr1.CompetitorAsset4__c]; |
| | | System.assertEquals(False, lcr2.CompetitorAsset4__c <> null); |
| | | System.assertEquals(1, asts.size()); |
| | | System.assertEquals(opp1.Id, asts[0].Opportunity__c); |
| | | System.assertEquals(True, lcr1.CompetitorAsset3__c <> null); |
| | | System.assertEquals(prd1.Id, lcr1.CompetitorAsset3__r.Product2Id); |
| | | System.assertEquals(True, lcr1.CompetitorAsset4__c <> null); |
| | | System.assertEquals(prd2.Id, lcr1.CompetitorAsset4__r.Product2Id); |
| | | |
| | | // // update |
| | | // lcr1.CompetitorProduct3__c = prd2.Id; |
| | | // lcr1.CompetitorProduct4__c = prd1.Id; |
| | | // update lcr1; |
| | | // lcr1 = [Select Id, CompetitorAsset3__c, CompetitorAsset3__r.Product2Id, |
| | | // CompetitorAsset4__c, CompetitorAsset4__r.Product2Id |
| | | // from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | // System.assertEquals(True, lcr1.CompetitorAsset4__c <> null); |
| | | // System.assertEquals(prd1.Id, lcr1.CompetitorAsset4__r.Product2Id); |
| | | // System.assertEquals(True, lcr1.CompetitorAsset3__c <> null); |
| | | // System.assertEquals(prd2.Id, lcr1.CompetitorAsset3__r.Product2Id); |
| | | // update |
| | | lcr1.CompetitorProduct3__c = prd2.Id; |
| | | lcr1.CompetitorProduct4__c = prd1.Id; |
| | | update lcr1; |
| | | lcr1 = [Select Id, CompetitorAsset3__c, CompetitorAsset3__r.Product2Id, |
| | | CompetitorAsset4__c, CompetitorAsset4__r.Product2Id |
| | | from Lost_cancel_report__c where Id = :lcr1.Id]; |
| | | System.assertEquals(True, lcr1.CompetitorAsset4__c <> null); |
| | | System.assertEquals(prd1.Id, lcr1.CompetitorAsset4__r.Product2Id); |
| | | System.assertEquals(True, lcr1.CompetitorAsset3__c <> null); |
| | | System.assertEquals(prd2.Id, lcr1.CompetitorAsset3__r.Product2Id); |
| | | |
| | | // // delete |
| | | // delete lcr1; |
| | | // asts = [Select Id from Asset where (Id = :lcr1.CompetitorAsset3__c or Id = :lcr1.CompetitorAsset4__c)]; |
| | | // System.assertEquals(0, asts.size()); |
| | | // } |
| | | } |
| | | // delete |
| | | delete lcr1; |
| | | asts = [Select Id from Asset where (Id = :lcr1.CompetitorAsset3__c or Id = :lcr1.CompetitorAsset4__c)]; |
| | | System.assertEquals(0, asts.size()); |
| | | } |
| | | } |
| | |
| | | public without sharing class LostCancelReportHandler extends Oly_TriggerHandler { |
| | | private Map<Id, Lost_cancel_report__c> newMap; |
| | | private Map<Id, Lost_cancel_report__c> oldMap; |
| | | private List<Lost_cancel_report__c> newList; |
| | | private List<Lost_cancel_report__c> oldList; |
| | | private Map<Id, Lost_cancel_report__c> newMap; |
| | | private Map<Id, Lost_cancel_report__c> oldMap; |
| | | private List<Lost_cancel_report__c> newList; |
| | | private List<Lost_cancel_report__c> oldList; |
| | | |
| | | public LostCancelReportHandler() { |
| | | this.newMap = (Map<Id, Lost_cancel_report__c>) Trigger.newMap; |
| | | this.oldMap = (Map<Id, Lost_cancel_report__c>) Trigger.oldMap; |
| | | this.newList = (List<Lost_cancel_report__c>) Trigger.new; |
| | | this.oldList = (List<Lost_cancel_report__c>) Trigger.old; |
| | | } |
| | | public LostCancelReportHandler() { |
| | | this.newMap = (Map<Id, Lost_cancel_report__c>) Trigger.newMap; |
| | | this.oldMap = (Map<Id, Lost_cancel_report__c>) Trigger.oldMap; |
| | | this.newList = (List<Lost_cancel_report__c>) Trigger.new; |
| | | this.oldList = (List<Lost_cancel_report__c>) Trigger.old; |
| | | } |
| | | |
| | | // 更新经理(销售) 20200302 Start |
| | | protected override void beforeUpdate() { |
| | | // 更新经理(销售)信息 |
| | | updateManager(); |
| | | } |
| | | // 更新审批人 20200302 End |
| | | // 更新经理(销售) 20200302 Start |
| | | protected override void beforeUpdate() { |
| | | // 更新经理(销售)信息 |
| | | updateManager(); |
| | | //【FY23询价改善】-P:中标结果确认任务开发 20220706 更新失单任务确认时间 |
| | | updateLostTaskTime(); |
| | | |
| | | protected override void afterUpdate() { |
| | | } |
| | | // 更新审批人 20200302 End |
| | | |
| | | // 更新询价的失单信息 |
| | | //updateLostInfo(); |
| | | updateopp(); // by tcm |
| | | } |
| | | /* |
| | | private void updateLostInfo() { |
| | | List<Opportunity> oppList = new List<Opportunity>(); |
| | | //2018年7月16日 CHAN-B2HCB7 start 获取字段 |
| | | List<Lost_cancel_report__c> temLCRList = |
| | | [select id,Opportunity__c,Report_Status__c, |
| | | Lost_By_Company__c,Lost_reason_main__c , of_lost_system_processor__c, |
| | | Lost_Reason_Sub__c, Lost_By_Product__c, |
| | | CompetitorProduct1__r.id, CompetitorProduct1__r.Name, |
| | | CompetitorProduct2__r.id, CompetitorProduct2__r.Name, |
| | | CompetitorProduct3__r.id, CompetitorProduct3__r.Name, |
| | | CompetitorProduct4__r.id, CompetitorProduct4__r.Name |
| | | from Lost_cancel_report__c |
| | | where id in: newList]; |
| | | // 2018年7月16日 CHAN-B2HCB7 end 获取字段 |
| | | for (Lost_cancel_report__c n : temLCRList) { |
| | | //Lost_cancel_report__c o = oldMap.get(n.id); && o.Report_Status__c != '批准' |
| | | if (n.Report_Status__c == '批准' ) { |
| | | Opportunity opp = new Opportunity(); |
| | | opp.id = n.Opportunity__c; |
| | | opp.Lost_Cancel_Report__c = n.id; |
| | | //2018年7月16日 CHAN-B2HCB7 start 为业务机会对象的竞争对手产品2、竞争对手产品3和竞争对手产品4赋值 |
| | | if (n.CompetitorProduct2__r.id == '01t10000000Tqam') { |
| | | opp.CompetitorProduct2__c = n.Lost_By_Product__c; |
| | | } else { |
| | | opp.CompetitorProduct2__c = n.CompetitorProduct2__r.Name; |
| | | } |
| | | if (n.CompetitorProduct3__r.id == '01t10000000Tqam') { |
| | | opp.CompetitorProduct3__c = n.Lost_By_Product__c; |
| | | } else { |
| | | opp.CompetitorProduct3__c = n.CompetitorProduct3__r.Name; |
| | | } |
| | | if (n.CompetitorProduct4__r.id == '01t10000000Tqam') { |
| | | opp.CompetitorProduct4__c = n.Lost_By_Product__c; |
| | | } else { |
| | | opp.CompetitorProduct4__c = n.CompetitorProduct4__r.Name; |
| | | } |
| | | //2018年7月16日 CHAN-B2HCB7 end 为业务机会对象的竞争对手产品2、竞争对手产品3和竞争对手产品4赋值 |
| | | //2018年7月16日 CHAN-B2X9SW start 为业务机会对象的询价重复赋值 |
| | | /*if (n.Cancel_Reason__c == '询价重复') { |
| | | //opp.Opportunity_repeated_text__c = n.Opportunity_repeated__c; |
| | | } |
| | | //2018年7月16日 CHAN-B2X9SW end 为业务机会对象的询价重复赋值 by张玉山 |
| | | oppList.add(opp); |
| | | protected override void afterUpdate() { |
| | | |
| | | // 更新询价的失单信息 |
| | | //updateLostInfo(); |
| | | updateopp(); // by tcm |
| | | } |
| | | |
| | | //2022-6-22 yjk 询价跟进任务 start |
| | | protected override void afterInsert() { |
| | | updateTask(); |
| | | } |
| | | |
| | | // 2022-7-29 ssm XLIU-CGSC8R 【委托】[改善】询价里删除批准的失单报告状态1自动变 |
| | | protected override void afterDelete() { |
| | | // 删除已批准的报告后,把询价状态改回成询价 |
| | | updateOppStage(); |
| | | } |
| | | |
| | | private void updateTask(){ |
| | | List<Id> oppIdList = new List<Id>(); |
| | | List<Id> updateOppId = new List<Id>(); |
| | | List<Opportunity> updateOpp = new List<Opportunity>(); |
| | | |
| | | for(Lost_cancel_report__c lcr : newList){ |
| | | oppIdList.add(lcr.Opportunity__c); |
| | | |
| | | } |
| | | |
| | | List<task__c> taskList = [select id,taskStatus__c,OpportunityId__c from task__c where RecordType.Name ='中标结果确认' and taskStatus__c = '02 接受' and OpportunityId__c in :oppIdList]; |
| | | for(task__c tsk : taskList){ |
| | | tsk.taskStatus__c = '03 完成'; |
| | | //updateOppId.add(tsk.OpportunityId__c); //20220823 you 没有任务时, |
| | | } |
| | | |
| | | for(Id oppId : oppIdList){//20220823 you |
| | | Opportunity opptemp = new Opportunity(); |
| | | opptemp.Id = oppId ; |
| | | opptemp.ConfirmationofAward__c = '竞争对手中标'; |
| | | updateOpp.add(opptemp); |
| | | } |
| | | |
| | | |
| | | update updateOpp; |
| | | update taskList; |
| | | } |
| | | //2022-6-22 yjk 询价跟进任务 end |
| | | |
| | | /* |
| | | private void updateLostInfo() { |
| | | List<Opportunity> oppList = new List<Opportunity>(); |
| | | //2018年7月16日 CHAN-B2HCB7 start 获取字段 |
| | | List<Lost_cancel_report__c> temLCRList = |
| | | [select id,Opportunity__c,Report_Status__c, |
| | | Lost_By_Company__c,Lost_reason_main__c , of_lost_system_processor__c, |
| | | Lost_Reason_Sub__c, Lost_By_Product__c, |
| | | CompetitorProduct1__r.id, CompetitorProduct1__r.Name, |
| | | CompetitorProduct2__r.id, CompetitorProduct2__r.Name, |
| | | CompetitorProduct3__r.id, CompetitorProduct3__r.Name, |
| | | CompetitorProduct4__r.id, CompetitorProduct4__r.Name |
| | | from Lost_cancel_report__c |
| | | where id in: newList]; |
| | | // 2018年7月16日 CHAN-B2HCB7 end 获取字段 |
| | | for (Lost_cancel_report__c n : temLCRList) { |
| | | //Lost_cancel_report__c o = oldMap.get(n.id); && o.Report_Status__c != '批准' |
| | | if (n.Report_Status__c == '批准' ) { |
| | | Opportunity opp = new Opportunity(); |
| | | opp.id = n.Opportunity__c; |
| | | opp.Lost_Cancel_Report__c = n.id; |
| | | //2018年7月16日 CHAN-B2HCB7 start 为业务机会对象的竞争对手产品2、竞争对手产品3和竞争对手产品4赋值 |
| | | if (n.CompetitorProduct2__r.id == '01t10000000Tqam') { |
| | | opp.CompetitorProduct2__c = n.Lost_By_Product__c; |
| | | } else { |
| | | opp.CompetitorProduct2__c = n.CompetitorProduct2__r.Name; |
| | | } |
| | | if (n.CompetitorProduct3__r.id == '01t10000000Tqam') { |
| | | opp.CompetitorProduct3__c = n.Lost_By_Product__c; |
| | | } else { |
| | | opp.CompetitorProduct3__c = n.CompetitorProduct3__r.Name; |
| | | } |
| | | if (n.CompetitorProduct4__r.id == '01t10000000Tqam') { |
| | | opp.CompetitorProduct4__c = n.Lost_By_Product__c; |
| | | } else { |
| | | opp.CompetitorProduct4__c = n.CompetitorProduct4__r.Name; |
| | | } |
| | | //2018年7月16日 CHAN-B2HCB7 end 为业务机会对象的竞争对手产品2、竞争对手产品3和竞争对手产品4赋值 |
| | | //2018年7月16日 CHAN-B2X9SW start 为业务机会对象的询价重复赋值 |
| | | /*if (n.Cancel_Reason__c == '询价重复') { |
| | | //opp.Opportunity_repeated_text__c = n.Opportunity_repeated__c; |
| | | } |
| | | //2018年7月16日 CHAN-B2X9SW end 为业务机会对象的询价重复赋值 by张玉山 |
| | | oppList.add(opp); |
| | | } |
| | | } |
| | | if (oppList.size() > 0) update oppList; |
| | | } |
| | | */ |
| | | // 更新经理(销售) 20200302 Start |
| | | private void updateManager() { |
| | | List<String> userIdList = new List<String>(); |
| | | for (Lost_cancel_report__c n: newList) { |
| | | if (Trigger.isUpdate && (n.Report_Status__c != oldMap.get(n.Id).Report_Status__c) && (n.Report_Status__c == '申请中')) { |
| | | userIdList.add(n.OwnerId__c); |
| | | } |
| | | } |
| | | |
| | | Map<String, User> userMap = new Map<String, User>(); |
| | | List<User> userList = [select Id, SalesManager__c from user where id =: userIdList]; |
| | | |
| | | for (User u : userList) { |
| | | String sid = u.Id; |
| | | userMap.put(sid.substring(0,15), u); |
| | | } |
| | | |
| | | for (Lost_cancel_report__c n : newList) { |
| | | if (Trigger.isUpdate && (n.Report_Status__c != oldMap.get(n.Id).Report_Status__c) && (n.Report_Status__c == '申请中')) { |
| | | if (userMap.get(n.OwnerId__c) != null) { |
| | | n.Manager_sales__c = userMap.get(n.OwnerId__c).SalesManager__c; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 更新审批人 20200302 End |
| | | |
| | | // tcm 20211126 更新询价信息 start |
| | | private void updateopp() { |
| | | // 清除不需要更新的 |
| | | Map<Id,Lost_cancel_report__c> arrMap=new Map<Id,Lost_cancel_report__c>(); |
| | | for (String newlcro : newMap.keyset()) { |
| | | if (newMap.get(newlcro).Report_Status__c=='批准'&&oldMap.get(newlcro).Report_Status__c!='批准') { |
| | | arrMap.put(newlcro,newMap.get(newlcro)); |
| | | } |
| | | } |
| | | |
| | | //20220708 询价任务开发,结束失单任务状态,筛选需要的修改的失单任务 start |
| | | Set<String> oppIdSet = new Set<String>(); |
| | | for (Lost_cancel_report__c n: newList) { |
| | | if ((n.Report_Status__c != oldMap.get(n.Id).Report_Status__c) && n.Report_Status__c == '申请中') { |
| | | oppIdSet.add(n.Opportunity__c); |
| | | } |
| | | } |
| | | // 20220720 ljh add 记录取消/失单报告提交时点的战略产品判断 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 add 记录取消/失单报告提交时点的战略产品判断 end |
| | | List<task__c> taskList = [select id,taskStatus__c from task__c where RecordType.Name ='失单报告任务' and taskStatus__c = '02 接受' and OpportunityId__c in :oppIdSet]; |
| | | for(task__c tsk : taskList){ |
| | | tsk.taskStatus__c = '03 完成'; |
| | | } |
| | | } |
| | | if (oppList.size() > 0) update oppList; |
| | | } |
| | | */ |
| | | // 更新经理(销售) 20200302 Start |
| | | private void updateManager() { |
| | | List<String> userIdList = new List<String>(); |
| | | for (Lost_cancel_report__c n: newList) { |
| | | if (Trigger.isUpdate && (n.Report_Status__c != oldMap.get(n.Id).Report_Status__c) && (n.Report_Status__c == '申请中')) { |
| | | userIdList.add(n.OwnerId__c); |
| | | } |
| | | } |
| | | update taskList; |
| | | }// 20220720 ljh update |
| | | //20220708 询价任务开发,结束失单任务状态,筛选需要的修改的失单任务 end |
| | | |
| | | Map<String, User> userMap = new Map<String, User>(); |
| | | List<User> userList = [select Id, SalesManager__c from user where id =: userIdList]; |
| | | List<PCLLostProduct__c> lcrList=[select id,PCLLostBrand__r.Lost_cancel_report__r.of_lost_system_processor__c,PCLLostBrand__r.Lost_Reason_Sub__c,PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c,PCLLostBrand__r.Lost_cancel_report__r.LostType__c,PCLLostBrand__r.Lost_By_Company__c,PCLLostBrand__r.Lost_By_Company_Mannual__c,PCLLostBrand__r.LostPrice__c,LostProduct__r.Name, PCLLostBrand__r.Lost_reason_main__c,PCLLostBrand__r.Agency__r.Name,PCLLostBrand__r.AgencyMannual__c,PCLLostBrand__r.Lost_cancel_report__r.Opportunity__r.Name,Opportunity__c, LostProductMannual__c from PCLLostProduct__c where PCLLostBrand__r.Lost_cancel_report__c in : arrMap.keyset()]; |
| | | List<Opportunity> oppList=new List<Opportunity>(); |
| | | for (String lcro : arrMap.keyset()) { |
| | | // 给产品赋值 |
| | | Integer i=0; |
| | | //赋值询价去重 |
| | | List<String> jxsList=new List<String>(); //经销商 |
| | | List<String> ppList=new List<String>(); //失单品牌 |
| | | // List<String> yyList=new List<String>(); //失单原因 |
| | | //初始化 |
| | | Opportunity opp=new Opportunity(); |
| | | opp.Id=arrMap.get(lcro).Opportunity__c; opp.PCLLostBrands__c=''; opp.Agencies__c=''; //Id ,品牌,经销商 |
| | | // for产品 |
| | | for (PCLLostProduct__c lcr : lcrList) { |
| | | if (opp.Id==lcr.Opportunity__c) { |
| | | i++; |
| | | //给询价不同字段赋值 失单 |
| | | if (lcr.PCLLostBrand__r.Lost_cancel_report__r.LostType__c=='失单') { |
| | | if (i==1) { |
| | | opp.CompetitorProduct1__c=lcr.LostProduct__r.Name != null ? lcr.LostProduct__r.Name : lcr.LostProductMannual__c; |
| | | }else if (i==2) { |
| | | opp.CompetitorProduct2__c=lcr.LostProduct__r.Name != null ? lcr.LostProduct__r.Name : lcr.LostProductMannual__c; |
| | | }else if (i==3) { |
| | | opp.CompetitorProduct3__c=lcr.LostProduct__r.Name != null ? lcr.LostProduct__r.Name : lcr.LostProductMannual__c; |
| | | } |
| | | } |
| | | // 失单理由 |
| | | if (i==1) { |
| | | opp.Lost_reason_main__c=lcr.PCLLostBrand__r.Lost_reason_main__c; |
| | | opp.Lost_Reason_Sub__c=lcr.PCLLostBrand__r.Lost_Reason_Sub__c; |
| | | |
| | | for (User u : userList) { |
| | | String sid = u.Id; |
| | | userMap.put(sid.substring(0,15), u); |
| | | } |
| | | |
| | | for (Lost_cancel_report__c n : newList) { |
| | | if (Trigger.isUpdate && (n.Report_Status__c != oldMap.get(n.Id).Report_Status__c) && (n.Report_Status__c == '申请中')) { |
| | | if (userMap.get(n.OwnerId__c) != null) { |
| | | n.Manager_sales__c = userMap.get(n.OwnerId__c).SalesManager__c; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 更新审批人 20200302 End |
| | | |
| | | // tcm 20211126 更新询价信息 start |
| | | private void updateopp() { |
| | | // 清除不需要更新的 |
| | | Map<Id,Lost_cancel_report__c> arrMap=new Map<Id,Lost_cancel_report__c>(); |
| | | for (String newlcro : newMap.keyset()) { |
| | | if (newMap.get(newlcro).Report_Status__c=='批准'&&oldMap.get(newlcro).Report_Status__c!='批准') { |
| | | arrMap.put(newlcro,newMap.get(newlcro)); |
| | | } |
| | | } |
| | | List<PCLLostProduct__c> lcrList=[select id,PCLLostBrand__r.Lost_cancel_report__r.of_lost_system_processor__c,PCLLostBrand__r.Lost_Reason_Sub__c,PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c,PCLLostBrand__r.Lost_cancel_report__r.LostType__c,PCLLostBrand__r.Lost_By_Company__c,PCLLostBrand__r.Lost_By_Company_Mannual__c,PCLLostBrand__r.LostPrice__c,LostProduct__r.Name, PCLLostBrand__r.Lost_reason_main__c,PCLLostBrand__r.Agency__r.Name,PCLLostBrand__r.AgencyMannual__c,PCLLostBrand__r.Lost_cancel_report__r.Opportunity__r.Name,Opportunity__c, LostProductMannual__c from PCLLostProduct__c where PCLLostBrand__r.Lost_cancel_report__c in : arrMap.keyset()]; |
| | | List<Opportunity> oppList=new List<Opportunity>(); |
| | | for (String lcro : arrMap.keyset()) { |
| | | // 给产品赋值 |
| | | Integer i=0; |
| | | //赋值询价去重 |
| | | List<String> jxsList=new List<String>(); //经销商 |
| | | List<String> ppList=new List<String>(); //失单品牌 |
| | | // List<String> yyList=new List<String>(); //失单原因 |
| | | //初始化 |
| | | Opportunity opp=new Opportunity(); |
| | | opp.Id=arrMap.get(lcro).Opportunity__c; opp.PCLLostBrands__c=''; opp.Agencies__c=''; //Id ,品牌,经销商 |
| | | // for产品 |
| | | for (PCLLostProduct__c lcr : lcrList) { |
| | | if (opp.Id==lcr.Opportunity__c) { |
| | | i++; |
| | | //给询价不同字段赋值 失单 |
| | | if (lcr.PCLLostBrand__r.Lost_cancel_report__r.LostType__c=='失单') { |
| | | if (i==1) { |
| | | opp.CompetitorProduct1__c=lcr.LostProduct__r.Name != null ? lcr.LostProduct__r.Name : lcr.LostProductMannual__c; |
| | | }else if (i==2) { |
| | | opp.CompetitorProduct2__c=lcr.LostProduct__r.Name != null ? lcr.LostProduct__r.Name : lcr.LostProductMannual__c; |
| | | }else if (i==3) { |
| | | opp.CompetitorProduct3__c=lcr.LostProduct__r.Name != null ? lcr.LostProduct__r.Name : lcr.LostProductMannual__c; |
| | | } |
| | | } |
| | | // 失单理由 |
| | | if (i==1) { |
| | | opp.Lost_reason_main__c=lcr.PCLLostBrand__r.Lost_reason_main__c; |
| | | opp.Lost_Reason_Sub__c=lcr.PCLLostBrand__r.Lost_Reason_Sub__c; |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | //经销商 |
| | | if (!jxsList.contains(lcr.PCLLostBrand__r.Agency__r.Name)) { |
| | | jxsList.add(lcr.PCLLostBrand__r.Agency__r.Name); |
| | | if (jxsList.size()==1) { |
| | | if (lcr.PCLLostBrand__r.AgencyMannual__c==null) { |
| | | opp.Agencies__c+=lcr.PCLLostBrand__r.Agency__r.Name; |
| | | }else { |
| | | opp.Agencies__c+=lcr.PCLLostBrand__r.AgencyMannual__c; |
| | | } |
| | | }else { |
| | | if (lcr.PCLLostBrand__r.AgencyMannual__c==null) { |
| | | opp.Agencies__c+=','+lcr.PCLLostBrand__r.Agency__r.Name; |
| | | }else { |
| | | opp.Agencies__c+=','+lcr.PCLLostBrand__r.AgencyMannual__c; |
| | | } |
| | | } |
| | | } |
| | | //失单品牌 |
| | | if (!ppList.contains(lcr.PCLLostBrand__r.Lost_By_Company__c)) { |
| | | ppList.add(lcr.PCLLostBrand__r.Lost_By_Company__c); |
| | | if (ppList.size()==1) { |
| | | if (lcr.PCLLostBrand__r.Lost_By_Company__c=='其他') { |
| | | opp.PCLLostBrands__c+=lcr.PCLLostBrand__r.Lost_By_Company_Mannual__c; |
| | | }else { |
| | | opp.PCLLostBrands__c+=lcr.PCLLostBrand__r.Lost_By_Company__c; |
| | | } |
| | | }else { |
| | | if (lcr.PCLLostBrand__r.Lost_By_Company__c=='其他') { |
| | | opp.PCLLostBrands__c+=','+lcr.PCLLostBrand__r.Lost_By_Company_Mannual__c; |
| | | }else { |
| | | opp.PCLLostBrands__c+=','+lcr.PCLLostBrand__r.Lost_By_Company__c; |
| | | } |
| | | } |
| | | } |
| | | // //失单原因 |
| | | // if (!yyList.contains(lcr.PCLLostBrand__r.Lost_reason_main__c)) { |
| | | // yyList.add(lcr.PCLLostBrand__r.Lost_reason_main__c); |
| | | // if (yyList.size()==1) { |
| | | // opp.Lost_reason_mains__c+=lcr.PCLLostBrand__r.Lost_reason_main__c+','; |
| | | // }else { |
| | | // opp.Lost_reason_mains__c+=','+lcr.PCLLostBrand__r.Lost_reason_main__c; |
| | | // } |
| | | // } |
| | | //失单总金额 |
| | | opp.LostPrices__c=lcr.PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c; |
| | | opp.of_lost_system_processor__c=lcr.PCLLostBrand__r.Lost_cancel_report__r.of_lost_system_processor__c; |
| | | } |
| | | } |
| | | oppList.add(opp); |
| | | } |
| | | update oppList; |
| | | } |
| | | // tcm 20211126 更新询价信息 end |
| | | //经销商 |
| | | if (!jxsList.contains(lcr.PCLLostBrand__r.Agency__r.Name)) { |
| | | jxsList.add(lcr.PCLLostBrand__r.Agency__r.Name); |
| | | // SWAG-CCC6F6 2022-04-22 ssm start |
| | | // 询价上都只显示选项列表的值,不需要手动的值 |
| | | if (jxsList.size()==1) { |
| | | // if (lcr.PCLLostBrand__r.AgencyMannual__c==null) { |
| | | // opp.Agencies__c+=lcr.PCLLostBrand__r.Agency__r.Name; |
| | | // }else { |
| | | // opp.Agencies__c+=lcr.PCLLostBrand__r.AgencyMannual__c; |
| | | // } |
| | | opp.Agencies__c+=lcr.PCLLostBrand__r.Agency__r.Name; |
| | | }else { |
| | | // if (lcr.PCLLostBrand__r.AgencyMannual__c==null) { |
| | | // opp.Agencies__c+=','+lcr.PCLLostBrand__r.Agency__r.Name; |
| | | // }else { |
| | | // opp.Agencies__c+=','+lcr.PCLLostBrand__r.AgencyMannual__c; |
| | | // } |
| | | opp.Agencies__c+=','+lcr.PCLLostBrand__r.Agency__r.Name; |
| | | } |
| | | // SWAG-CCC6F6 2022-04-22 ssm end |
| | | } |
| | | //失单品牌 |
| | | if (!ppList.contains(lcr.PCLLostBrand__r.Lost_By_Company__c)) { |
| | | ppList.add(lcr.PCLLostBrand__r.Lost_By_Company__c); |
| | | // SWAG-CCC6F6 2022-04-22 ssm start |
| | | // 询价上都只显示选项列表的值,不需要手动的值 |
| | | if (ppList.size()==1) { |
| | | // if (lcr.PCLLostBrand__r.Lost_By_Company__c=='其他') { |
| | | // opp.PCLLostBrands__c+=lcr.PCLLostBrand__r.Lost_By_Company_Mannual__c; |
| | | // }else { |
| | | // opp.PCLLostBrands__c+=lcr.PCLLostBrand__r.Lost_By_Company__c; |
| | | // } |
| | | opp.PCLLostBrands__c+=lcr.PCLLostBrand__r.Lost_By_Company__c; |
| | | }else { |
| | | // if (lcr.PCLLostBrand__r.Lost_By_Company__c=='其他') { |
| | | // opp.PCLLostBrands__c+=','+lcr.PCLLostBrand__r.Lost_By_Company_Mannual__c; |
| | | // }else { |
| | | // opp.PCLLostBrands__c+=','+lcr.PCLLostBrand__r.Lost_By_Company__c; |
| | | // } |
| | | opp.PCLLostBrands__c+=','+lcr.PCLLostBrand__r.Lost_By_Company__c; |
| | | } |
| | | // SWAG-CCC6F6 2022-04-22 ssm end |
| | | } |
| | | // //失单原因 |
| | | // if (!yyList.contains(lcr.PCLLostBrand__r.Lost_reason_main__c)) { |
| | | // yyList.add(lcr.PCLLostBrand__r.Lost_reason_main__c); |
| | | // if (yyList.size()==1) { |
| | | // opp.Lost_reason_mains__c+=lcr.PCLLostBrand__r.Lost_reason_main__c+','; |
| | | // }else { |
| | | // opp.Lost_reason_mains__c+=','+lcr.PCLLostBrand__r.Lost_reason_main__c; |
| | | // } |
| | | // } |
| | | //失单总金额 |
| | | opp.LostPrices__c=lcr.PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c; |
| | | opp.of_lost_system_processor__c=lcr.PCLLostBrand__r.Lost_cancel_report__r.of_lost_system_processor__c; |
| | | } |
| | | } |
| | | oppList.add(opp); |
| | | } |
| | | update oppList; |
| | | |
| | | } |
| | | // tcm 20211126 更新询价信息 end |
| | | |
| | | |
| | | //sx 20220706 【FY23询价改善】-P:中标结果确认任务开发 失单任务确认时间 start |
| | | private void updateLostTaskTime(){ |
| | | //过滤需要修改的数据 |
| | | Set<Id> lostIds = new Set<Id>(); |
| | | Set<Id> oppIds = new Set<Id>(); |
| | | for(Lost_cancel_report__c lcr : newList){ |
| | | //筛选出需要提交日有修改的订单 |
| | | Lost_cancel_report__c oldLrc = oldMap.get(lcr.Id); |
| | | if((lcr.Report_Status__c != oldMap.get(lcr.Id).Report_Status__c) && lcr.Report_Status__c == '申请中'){ //oldLrc.Submit_Day__c != lcr.Submit_Day__c |
| | | lostIds.add(lcr.Id); |
| | | oppIds.add(lcr.Opportunity__c); |
| | | } |
| | | } |
| | | |
| | | List<Opportunity> oppList = [select Id, Task_createTime__c,LostTask_createTime__c from Opportunity where Id in :oppIds]; |
| | | Map<Id, Opportunity> oppMap = new Map<Id, Opportunity>(); |
| | | for(Opportunity op : oppList){ |
| | | oppMap.put(op.Id,op); |
| | | } |
| | | |
| | | //待更新的询价List |
| | | List<Opportunity> updateoppList = new List<Opportunity>(); |
| | | if(!lostIds.isEmpty()){ |
| | | |
| | | for(String lostId : lostIds){ |
| | | Lost_cancel_report__c tempLost = newMap.get(lostId); |
| | | //修改失单对应询价的失单任务时间 |
| | | Opportunity opp = new Opportunity(); |
| | | opp.Id = tempLost.Opportunity__c; |
| | | if(oppMap.get(tempLost.Opportunity__c).Task_createTime__c!= null || oppMap.get(tempLost.Opportunity__c).LostTask_createTime__c!= null){ |
| | | opp.LostTask_comfirmTime__c = Date.today(); |
| | | } |
| | | updateoppList.add(opp); |
| | | } |
| | | |
| | | if(!updateoppList.isEmpty()){ |
| | | update updateoppList; |
| | | } |
| | | } |
| | | } |
| | | //sx 20220706 【FY23询价改善】-P:中标结果确认任务开发 失单任务确认时间 end |
| | | |
| | | // 2022-7-29 ssm XLIU-CGSC8R 【委托】[改善】询价里删除批准的失单报告状态1自动变 start |
| | | // 删除已批准的报告后,把询价状态改回成询价 |
| | | private void updateOppStage() { |
| | | List<String> oppIds = new List<String>(); |
| | | for (Lost_cancel_report__c report : this.oldList) { |
| | | if (report.Report_Status__c == '批准') { |
| | | oppIds.add(report.Opportunity__c); |
| | | } |
| | | } |
| | | System.debug('oppIds: ' + oppIds); |
| | | if (oppIds.size() > 0) { |
| | | List<Opportunity> opps = [select Id, StageName, Final_Contract_Proceeded_Date__c, Lost_Opportunity_Date__c from Opportunity where Id in :oppIds and StageName in ('敗戦', '削除')]; |
| | | System.debug('opps: ' + opps); |
| | | if (opps.size() > 0) { |
| | | for (Opportunity opp : opps) { |
| | | opp.StageName = '引合'; |
| | | opp.Final_Contract_Proceeded_Date__c = null; |
| | | opp.Lost_Opportunity_Date__c = null; |
| | | } |
| | | update opps; |
| | | } |
| | | } |
| | | } |
| | | // 2022-7-29 ssm XLIU-CGSC8R 【委托】[改善】询价里删除批准的失单报告状态1自动变 end |
| | | |
| | | } |
| | |
| | | private class LostCancelReportHandlerTest { |
| | | |
| | | |
| | | @isTest static void test_method_one() { |
| | | // recode type を取得 |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 病院 recodetype'); |
| | | } |
| | | List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | if (rectSct.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 戦略科室分類 recodetype'); |
| | | } |
| | | 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) { |
| | | throw new ControllerUtil.myException('not found 診療科 recodetype'); |
| | | } |
| | | List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc]; |
| | | if (rectLost.size() == 0) { |
| | | throw new ControllerUtil.myException('not found Lost_cancel_report recodetype'); |
| | | } |
| | | @isTest static void test_method_one() { |
| | | // recode type を取得 |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 病院 recodetype'); |
| | | } |
| | | List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | if (rectSct.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 戦略科室分類 recodetype'); |
| | | } |
| | | 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) { |
| | | throw new ControllerUtil.myException('not found 診療科 recodetype'); |
| | | } |
| | | List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc]; |
| | | if (rectLost.size() == 0) { |
| | | throw new ControllerUtil.myException('not found Lost_cancel_report recodetype'); |
| | | } |
| | | |
| | | // insert |
| | | Account company1 = new Account(); |
| | | company1.RecordTypeId = rectCo[0].Id; |
| | | company1.Name = '病院テスト1'; |
| | | insert company1; |
| | | // insert |
| | | Account company1 = new Account(); |
| | | company1.RecordTypeId = rectCo[0].Id; |
| | | company1.Name = '病院テスト1'; |
| | | insert company1; |
| | | |
| | | 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]; |
| | | 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 depart1; |
| | | 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 depart1; |
| | | |
| | | // 商談 |
| | | Opportunity opp1 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | Hospital__c = company1.Id, |
| | | Department_Class__c = dc1s[0].Id, |
| | | AccountId = depart1.Id |
| | | ); |
| | | insert opp1; |
| | | // 商談 |
| | | Opportunity opp1 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(), |
| | | Hospital__c = company1.Id, |
| | | Department_Class__c = dc1s[0].Id, |
| | | AccountId = depart1.Id |
| | | ); |
| | | insert opp1; |
| | | |
| | | // 失单 |
| | | Lost_cancel_report__c lcr1 = new Lost_cancel_report__c( |
| | | Opportunity__c = opp1.Id, |
| | | RecordTypeId = rectLost[0].Id |
| | | ); |
| | | insert lcr1; |
| | | // 失单 |
| | | Lost_cancel_report__c lcr1 = new Lost_cancel_report__c( |
| | | Opportunity__c = opp1.Id, |
| | | RecordTypeId = rectLost[0].Id |
| | | ); |
| | | insert lcr1; |
| | | |
| | | //test |
| | | lcr1.Report_Status__c = '批准'; |
| | | update lcr1; |
| | | // 20220720 ljh add start |
| | | lcr1.Report_Status__c = '申请中'; |
| | | update lcr1; |
| | | // 20220720 ljh add edn |
| | | //test |
| | | lcr1.Report_Status__c = '批准'; |
| | | update lcr1; |
| | | |
| | | Opportunity opptest = [SELECT Id, Lost_Cancel_Report__c FROM Opportunity WHERE Id =: opp1.Id]; |
| | | Opportunity opptest = [SELECT Id, Lost_Cancel_Report__c FROM Opportunity WHERE Id =: opp1.Id]; |
| | | |
| | | // System.assertEquals(lcr1.Id, opptest.Lost_Cancel_Report__c); |
| | | } |
| | | // System.assertEquals(lcr1.Id, opptest.Lost_Cancel_Report__c); |
| | | } |
| | | |
| | | // add tcm 20211212 start |
| | | @isTest static void test_method_two() { |
| | | // recode type を取得 |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 病院 recodetype'); |
| | | } |
| | | List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | if (rectSct.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 戦略科室分類 recodetype'); |
| | | } |
| | | 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) { |
| | | throw new ControllerUtil.myException('not found 診療科 recodetype'); |
| | | } |
| | | List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc]; |
| | | if (rectLost.size() == 0) { |
| | | throw new ControllerUtil.myException('not found Lost_cancel_report recodetype'); |
| | | } |
| | | // add tcm 20211212 start |
| | | @isTest static void test_method_two() { |
| | | // recode type を取得 |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 病院 recodetype'); |
| | | } |
| | | List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | if (rectSct.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 戦略科室分類 recodetype'); |
| | | } |
| | | 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) { |
| | | throw new ControllerUtil.myException('not found 診療科 recodetype'); |
| | | } |
| | | List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc]; |
| | | if (rectLost.size() == 0) { |
| | | throw new ControllerUtil.myException('not found Lost_cancel_report recodetype'); |
| | | } |
| | | |
| | | // insert |
| | | Account company1 = new Account(); |
| | | company1.RecordTypeId = rectCo[0].Id; |
| | | company1.Name = '病院テスト1'; |
| | | insert company1; |
| | | // insert |
| | | Account company1 = new Account(); |
| | | company1.RecordTypeId = rectCo[0].Id; |
| | | company1.Name = '病院テスト1'; |
| | | insert company1; |
| | | |
| | | 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]; |
| | | 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 depart1; |
| | | 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 depart1; |
| | | |
| | | Account depart2 = new Account(); |
| | | depart2.RecordTypeId = rectDpt[0].Id; |
| | | depart2.Name = '*111'; |
| | | depart2.Department_Name__c = '診療科2'; |
| | | depart2.ParentId= dc1s[0].Id; |
| | | depart2.Department_Class__c = dc1s[0].Id; |
| | | depart2.Hospital__c= company1.Id; |
| | | insert depart2; |
| | | Account depart2 = new Account(); |
| | | depart2.RecordTypeId = rectDpt[0].Id; |
| | | depart2.Name = '*111'; |
| | | depart2.Department_Name__c = '診療科2'; |
| | | depart2.ParentId= dc1s[0].Id; |
| | | depart2.Department_Class__c = dc1s[0].Id; |
| | | depart2.Hospital__c= company1.Id; |
| | | insert depart2; |
| | | |
| | | // 询价 |
| | | Opportunity opp1 = new Opportunity(Name='opp1', StageName='oppName', CloseDate=Date.today(),Hospital__c = company1.Id,Department_Class__c = dc1s[0].Id,AccountId = depart1.Id); |
| | | insert opp1; |
| | | // 询价 |
| | | Opportunity opp1 = new Opportunity(Name='opp1', StageName='oppName', CloseDate=Date.today(),Hospital__c = company1.Id,Department_Class__c = dc1s[0].Id,AccountId = depart1.Id); |
| | | insert opp1; |
| | | |
| | | // 失单 |
| | | Lost_cancel_report__c lcr1 = new Lost_cancel_report__c(Opportunity__c = opp1.Id,RecordTypeId = rectLost[0].Id); |
| | | insert lcr1; |
| | | // 失单 |
| | | Lost_cancel_report__c lcr1 = new Lost_cancel_report__c(Opportunity__c = opp1.Id,RecordTypeId = rectLost[0].Id); |
| | | insert lcr1; |
| | | |
| | | |
| | | //失单品牌1 |
| | | PCLLostBrand__c pcllb1=new PCLLostBrand__c(); |
| | | pcllb1.LostPrice__c=1332; |
| | | pcllb1.Lost_Reason_Sub__c='价格'; //原因次 |
| | | pcllb1.Lost_reason_main__c='价格'; //原因主 |
| | | pcllb1.Lost_By_Company__c='蛇牌'; //品牌(主) |
| | | pcllb1.Agency__c=depart1.Id; //经销商 |
| | | pcllb1.Lost_cancel_report__c=lcr1.Id; |
| | | //失单品牌1 |
| | | PCLLostBrand__c pcllb1=new PCLLostBrand__c(); |
| | | pcllb1.LostPrice__c=1332; |
| | | pcllb1.Lost_Reason_Sub__c='价格'; //原因次 |
| | | pcllb1.Lost_reason_main__c='价格'; //原因主 |
| | | pcllb1.Lost_By_Company__c='蛇牌'; //品牌(主) |
| | | pcllb1.Agency__c=depart1.Id; //经销商 |
| | | pcllb1.Lost_cancel_report__c=lcr1.Id; |
| | | |
| | | //失单品牌2 |
| | | PCLLostBrand__c pcllb2=pcllb1.clone(); |
| | | pcllb2.Lost_By_Company__c='其他'; //品牌(主) |
| | | pcllb2.Lost_By_Company_Mannual__c='失单品牌'; //手动品牌 |
| | | //失单品牌2 |
| | | PCLLostBrand__c pcllb2=pcllb1.clone(); |
| | | pcllb2.Lost_By_Company__c='其他'; //品牌(主) |
| | | pcllb2.Lost_By_Company_Mannual__c='失单品牌'; //手动品牌 |
| | | pcllb2.Agency__c=depart2.Id; //经销商 |
| | | pcllb2.AgencyMannual__c='手动经销商'; |
| | | insert new List<PCLLostBrand__c> {pcllb1,pcllb2}; |
| | | pcllb2.AgencyMannual__c='手动经销商'; |
| | | insert new List<PCLLostBrand__c> {pcllb1,pcllb2}; |
| | | |
| | | |
| | | // 产品 |
| | | Product2 pro1 = new Product2(Name='name01', Brand_Name__c='蛇牌',Category5__c='竞争对手',IsActive=true,Family='SP',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); |
| | | Product2 pro2 = new Product2(Name='name02', Brand_Name__c='其他',Category5__c='竞争对手',IsActive=true,Family='SP2',Fixture_Model_No__c='n02',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n02',ProductCode_Ext__c='pc02',Manual_Entry__c=false); |
| | | // Product2 pro3 = new Product2(Name='name03',Lost_By_Company__c='其他',IsActive=true,Family='SP3',Fixture_Model_No__c='n03',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n03',ProductCode_Ext__c='pc03',Manual_Entry__c=false); |
| | | if(NFMUtil.isSandbox()){ |
| | | pro1.RecordTypeId = '0129D000001NacD'; |
| | | pro2.RecordTypeId = '0129D000001NacD'; |
| | | } else { |
| | | pro1.RecordTypeId = '01210000000aMAE'; |
| | | pro2.RecordTypeId = '01210000000aMAE'; |
| | | } |
| | | |
| | | // 产品 |
| | | Product2 pro1 = new Product2(Name='name01', Brand_Name__c='蛇牌',Category5__c='竞争对手',IsActive=true,Family='SP',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); |
| | | Product2 pro2 = new Product2(Name='name02', Brand_Name__c='其他',Category5__c='竞争对手',IsActive=true,Family='SP2',Fixture_Model_No__c='n02',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n02',ProductCode_Ext__c='pc02',Manual_Entry__c=false); |
| | | // Product2 pro3 = new Product2(Name='name03',Lost_By_Company__c='其他',IsActive=true,Family='SP3',Fixture_Model_No__c='n03',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n03',ProductCode_Ext__c='pc03',Manual_Entry__c=false); |
| | | insert new List<Product2> {pro1,pro2}; |
| | | insert new List<Product2> {pro1,pro2}; |
| | | |
| | | |
| | | |
| | | |
| | | //失单型号 |
| | | PCLLostProduct__c pcllp1=new PCLLostProduct__c(); |
| | | pcllp1.Quantity__c=2; |
| | | pcllp1.LostBrandName__c='蛇牌'; |
| | | pcllp1.ProductClass__c='主机'; |
| | | pcllp1.ProductCategory__c='4K'; |
| | | pcllp1.LostProduct__c=pro1.Id; //产品Id |
| | | pcllp1.LostProductMannual__c='失单对手型号(手动)'; //失单对手型号(手动) |
| | | pcllp1.PCLLostBrand__c=pcllb1.Id; //询价失单品牌 |
| | | //失单型号 |
| | | PCLLostProduct__c pcllp1=new PCLLostProduct__c(); |
| | | pcllp1.Quantity__c=2; |
| | | pcllp1.LostBrandName__c='蛇牌'; |
| | | pcllp1.ProductClass__c='主机'; |
| | | pcllp1.ProductCategory__c='4K'; |
| | | pcllp1.LostProduct__c=pro1.Id; //产品Id |
| | | pcllp1.LostProductMannual__c='失单对手型号(手动)'; //失单对手型号(手动) |
| | | pcllp1.PCLLostBrand__c=pcllb1.Id; //询价失单品牌 |
| | | |
| | | PCLLostProduct__c pcllp2=pcllp1.clone(); |
| | | pcllp2.LostBrandName__c='其他'; |
| | | pcllp2.ProductClass__c='主机'; |
| | | pcllp2.ProductCategory__c='4K'; |
| | | pcllp2.LostProduct__c=pro2.Id; //产品Id |
| | | pcllp2.PCLLostBrand__c=pcllb2.Id; //询价失单品牌 |
| | | PCLLostProduct__c pcllp2=pcllp1.clone(); |
| | | pcllp2.LostBrandName__c='其他'; |
| | | pcllp2.ProductClass__c='主机'; |
| | | pcllp2.ProductCategory__c='4K'; |
| | | pcllp2.LostProduct__c=pro2.Id; //产品Id |
| | | pcllp2.PCLLostBrand__c=pcllb2.Id; //询价失单品牌 |
| | | |
| | | // PCLLostProduct__c pcllp3=pcllp1.clone(); |
| | | // pcllp3.LostBrandName__c='其他'; |
| | | // pcllp3.LostProduct__c=pro3.Id; //产品Id |
| | | // pcllp3.PCLLostBrand__c=pcllb2.Id; //询价失单品牌 |
| | | // PCLLostProduct__c pcllp3=pcllp1.clone(); |
| | | // pcllp3.LostBrandName__c='其他'; |
| | | // pcllp3.LostProduct__c=pro3.Id; //产品Id |
| | | // pcllp3.PCLLostBrand__c=pcllb2.Id; //询价失单品牌 |
| | | |
| | | insert new List<PCLLostProduct__c> {pcllp1,pcllp2}; |
| | | insert new List<PCLLostProduct__c> {pcllp1,pcllp2}; |
| | | |
| | | |
| | | //test |
| | | lcr1.Report_Status__c = '批准'; |
| | | update lcr1; |
| | | //test |
| | | lcr1.Report_Status__c = '批准'; |
| | | update lcr1; |
| | | |
| | | } |
| | | // add tcm 20211212 end |
| | | } |
| | | // add tcm 20211212 end |
| | | |
| | | } |
| force-app/main/default/classes/LostCancelReportOppBatch.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/MCAgentPDFControllerTest.cls
force-app/main/default/classes/MCHPDFControllerTest.cls
force-app/main/default/classes/MCUpdateEstimateCostBatch.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/MetaDataUtility.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/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/NFM106Controller.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/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/NFM601Batch.cls
force-app/main/default/classes/NFM601BatchTest.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/NFM607RestTest.cls
force-app/main/default/classes/NFM608Rest.cls
force-app/main/default/classes/NFM609RestTest.cls
force-app/main/default/classes/NFM612Rest.cls
force-app/main/default/classes/NFM621Controller.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/NFM624RestAboutTest.cls
force-app/main/default/classes/NFM624RestTest.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/NFM705Rest.cls
force-app/main/default/classes/NFMUtil.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/NewAndEditAddressController.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/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/NewAndEditInquiryFormController.cls
force-app/main/default/classes/NewAndEditLeadController.cls
force-app/main/default/classes/NewAndEditReportController.cls
force-app/main/default/classes/NewConsumApplyController.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/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/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/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/OPDPlanHandler.cls
force-app/main/default/classes/OPDPlanHandlerTest.cls
force-app/main/default/classes/OPDPlanMarkBatchSchedule.cls
force-app/main/default/classes/OPDPlanSystemDelayBatch.cls
force-app/main/default/classes/OdsToUserHandler.cls
force-app/main/default/classes/OnCallController.cls
force-app/main/default/classes/OpdAmountBatch.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/OpportunityAndContactDailyUpdateBatch.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/OpportunityService.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/OrdergoodsController.cls
force-app/main/default/classes/OrdergoodsControllerTest.cls
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/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/Product2Handler.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/RentalApplyEquipmentSetDetailHandler.cls
force-app/main/default/classes/RentalApplyEquipmentSetDetailHandlerTest.cls
force-app/main/default/classes/RentalApplyEquipmentSetWebService.cls
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/RentalApplyTriggerHandlerTest.cls
force-app/main/default/classes/RentalApplyTriggerTest.cls
force-app/main/default/classes/RentalFixtureManage11Test.cls
force-app/main/default/classes/RentalFixtureManage1Test.cls
force-app/main/default/classes/RentalFixtureSetAssignAgencyControTest.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/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/RepairHandler.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/RepairTrigger.cls
force-app/main/default/classes/RepairTriggerTester.cls
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/RollupToMaintenanceContractSchedule.cls
force-app/main/default/classes/RollupToMaintenanceContractScheduleTest.cls
force-app/main/default/classes/RollupToOPDSchedule.cls
force-app/main/default/classes/SI_NewQuoteEntryController.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/SelectAssetEstimateController.cls
force-app/main/default/classes/SelectAssetEstimateURFController.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/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/SimpleEventRegisterController.cls
force-app/main/default/classes/SoapApi.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/StatuAchievementsPCLController.cls
force-app/main/default/classes/StatusPageController.cls
force-app/main/default/classes/StatusPageControllerTest.cls
force-app/main/default/classes/StraightBackAddressController.cls
force-app/main/default/classes/StraightBackAddressController2.cls
force-app/main/default/classes/StraightBackAddressController2.cls-meta.xml
force-app/main/default/classes/StraightBackAddressController2Test.cls
force-app/main/default/classes/StraightBackAddressController2Test.cls-meta.xml
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/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/TaskFeedbackController.cls
force-app/main/default/classes/TaskObjectTriggerHandle.cls
force-app/main/default/classes/TaskStatusUpdateBatch.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/TenderInformationHandlerTest.cls
force-app/main/default/classes/TenderManageController.cls
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
force-app/main/default/classes/TenderResultConfirmTaskBatchTest.cls-meta.xml
force-app/main/default/classes/TenderWebService.cls
force-app/main/default/classes/TestClass.cls
force-app/main/default/classes/TestClassTest.cls
force-app/main/default/classes/TestClassTest.cls-meta.xml
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/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/Triggers.cls
force-app/main/default/classes/Triggers.cls-meta.xml
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/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/UpdateActivatedDateContactBatchTestt.cls
force-app/main/default/classes/UpdateActivatedDateContactBatchTestt.cls-meta.xml
force-app/main/default/classes/UpdateAssetReturnTimeSchedule.cls
force-app/main/default/classes/UpdateContractAimAmountHandler.cls
force-app/main/default/classes/UpdateContractAimAmountHandlerTest.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/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/UpdateTenderInformationBatchTest.cls
force-app/main/default/classes/UpdateURFContactBatch.cls
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/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/eSignFormAttachmentController.cls
force-app/main/default/classes/eSignFormAttachmentControllerTest.cls
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/strike_lookupController.cls
force-app/main/default/classes/summonsCreatController.cls
force-app/main/default/classes/taskAlertController.cls
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/lwc/aaaIWCTest/aaaIWCTest.html
force-app/main/default/lwc/aaaIWCTest/aaaIWCTest.js
force-app/main/default/lwc/aaaIWCTest/aaaIWCTest.js-meta.xml
force-app/main/default/lwc/aaaIWCTest5/aaaIWCTest5.html
force-app/main/default/lwc/aaaIWCTest5/aaaIWCTest5.js
force-app/main/default/lwc/aaaIWCTest5/aaaIWCTest5.js-meta.xml
force-app/main/default/lwc/aaalWCTest2/aaalWCTest2.html
force-app/main/default/lwc/aaalWCTest2/aaalWCTest2.js
force-app/main/default/lwc/aaalWCTest2/aaalWCTest2.js-meta.xml
force-app/main/default/lwc/approvalHistory/approvalHistory.css
force-app/main/default/lwc/approvalHistory/approvalHistory.html
force-app/main/default/lwc/approvalHistory/approvalHistory.js
force-app/main/default/lwc/approvalHistory/approvalHistory.js-meta.xml
force-app/main/default/lwc/approvalHistory/approvalHistoryUtil.js
force-app/main/default/lwc/helloWorld/helloWorld.html
force-app/main/default/lwc/helloWorld/helloWorld.js
force-app/main/default/lwc/helloWorld/helloWorld.js-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/jsHistory/approvalHistoryUtil.js
force-app/main/default/lwc/jsHistory/jsHistory.css
force-app/main/default/lwc/jsHistory/jsHistory.html
force-app/main/default/lwc/jsHistory/jsHistory.js
force-app/main/default/lwc/jsHistory/jsHistory.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/jzDataTablePaging/jzDataTablePaging.css
force-app/main/default/lwc/jzDataTablePaging/jzDataTablePaging.html
force-app/main/default/lwc/jzDataTablePaging/jzDataTablePaging.js
force-app/main/default/lwc/jzDataTablePaging/jzDataTablePaging.js-meta.xml
force-app/main/default/lwc/jzPickList/jzPickList.html
force-app/main/default/lwc/jzPickList/jzPickList.js
force-app/main/default/lwc/jzPickList/jzPickList.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/jzSearchInput/jzSearchInput.css
force-app/main/default/lwc/jzSearchInput/jzSearchInput.html
force-app/main/default/lwc/jzSearchInput/jzSearchInput.js
force-app/main/default/lwc/jzSearchInput/jzSearchInput.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/lookup/lookup.css
force-app/main/default/lwc/lookup/lookup.html
force-app/main/default/lwc/lookup/lookup.js
force-app/main/default/lwc/lookup/lookup.js-meta.xml
force-app/main/default/lwc/lostSingle/lostSingle.html
force-app/main/default/lwc/lostSingle/lostSingle.js
force-app/main/default/lwc/lostSingle/lostSingle.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/modal/modal.css
force-app/main/default/lwc/modal/modal.html
force-app/main/default/lwc/modal/modal.js
force-app/main/default/lwc/modal/modal.js-meta.xml
force-app/main/default/lwc/pickTestPage/pickTestPage.html
force-app/main/default/lwc/pickTestPage/pickTestPage.js
force-app/main/default/lwc/pickTestPage/pickTestPage.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/shouhuoList/shouhuoList.html
force-app/main/default/lwc/shouhuoList/shouhuoList.js
force-app/main/default/lwc/shouhuoList/shouhuoList.js-meta.xml
force-app/main/default/lwc/spls/spls.html
force-app/main/default/lwc/spls/spls.js
force-app/main/default/lwc/spls/spls.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/test01/test01.html
force-app/main/default/lwc/test01/test01.js
force-app/main/default/lwc/test01/test01.js-meta.xml
force-app/main/default/lwc/test02/test02.css
force-app/main/default/lwc/test02/test02.html
force-app/main/default/lwc/test02/test02.js
force-app/main/default/lwc/test02/test02.js-meta.xml
force-app/main/default/lwc/test03/test03.html
force-app/main/default/lwc/test03/test03.js
force-app/main/default/lwc/test03/test03.js-meta.xml
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/lwc/testPage/testPage.html
force-app/main/default/lwc/testPage/testPage.js
force-app/main/default/lwc/testPage/testPage.js-meta.xml
force-app/main/default/lwc/yb/yb.html
force-app/main/default/lwc/yb/yb.js
force-app/main/default/lwc/yb/yb.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/All.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/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/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_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/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/Is_Target_Account__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_Correlation__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Coverage_SoftMirror__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_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_Correlation__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_RigidMirror__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/Finish_SoftMirror__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Finish_Soft_Mirror_1__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Finish_Soft_Mirror_2__c.field-meta.xml
force-app/main/default/objects/Account_Service_Of_Target__c/fields/Finish_Soft_Mirror_3__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__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_Coverage_Correlation__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_Correlation__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_RigidMirror__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_2__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_Finish_SoftMirror__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_RigidMirror__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_SoftMirror__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/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/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_hospital.listView-meta.xml
force-app/main/default/objects/Address__c/listViews/All_office.listView-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/All_Agency_Contactgzw.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/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_opp.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/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/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/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_20220620.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/NFM501_after_0507.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/NFM502_after_0407.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/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/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/NFM624RestAbout.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_NFM501TIDetailHistory.listView-meta.xml
force-app/main/default/objects/BatchIF_Log__c/listViews/view_log_NFM501TIDetailHistoryDataBatch.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/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/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_Detail__c/webLinks/CopyPI.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/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/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/validationRules/Order_status_check.validationRule-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/Reporter_Salesdepartment__c.field-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/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/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/All.listView-meta.xml
force-app/main/default/objects/FileAddress__c/webLinks/Download_File.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/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/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/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_ID__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/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/ceshi__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/MyInquiryOrg.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/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/listViews/View2.listView-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__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/Issue_Management__c/listViews/All.listView-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/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/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/Specific_Reasons__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/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/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/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/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__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/The_Date_Of_Compute_The_RPCost__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/URF_V_Times__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/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/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/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/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_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/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/The_current_price__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_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/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/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/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/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/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/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/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/Test520__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_P_MaxRepairCount_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_P_MaxRepairCount__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_V_MaxRepairCount_F__c.field-meta.xml
force-app/main/default/objects/Maintenance_Contract__c/fields/URF_V_MaxRepairCount__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/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/Opportunity_Stage_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/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/ImportantProduct2.fieldSet-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/fieldSets/ImportantProduct2_Old.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/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/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/ImportantProduct2.recordType-meta.xml
force-app/main/default/objects/Maintenance_Product_Data_Details__c/recordTypes/RepairInfo.recordType-meta.xml
force-app/main/default/objects/Maintenance_Product_Data__c/recordTypes/ImportantProduct2.recordType-meta.xml
force-app/main/default/objects/Maintenance_Task__c/webLinks/CreateReport.webLink-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/NFM601Tag__c/NFM601Tag__c.object-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/OBA3_assistant1__c.field-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/fields/OBA3_assistant2__c.field-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/fields/OBA3_assistant3__c.field-meta.xml
force-app/main/default/objects/OCM_Management_Province__c/fields/OBA3_assistant4__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/All.listView-meta.xml
force-app/main/default/objects/ODS__c/listViews/No001.listView-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/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/OPD_Customers_Target_Next__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/if_Next_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/WaitReport.listView-meta.xml
force-app/main/default/objects/OPDPlan__c/listViews/compaign_prosess.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/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/Responsible_PersonHP_Encrypt__c.field-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__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/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/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_X3__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_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/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/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/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/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/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/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/QuoteIrai__c/fields/Agency1_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/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/Opportunity2__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/listViews/All.listView-meta.xml
force-app/main/default/objects/RC_Windows__mdt/RC_Windows__mdt.object-meta.xml
force-app/main/default/objects/RC_Windows__mdt/fields/RC_Invoice_Window_ID__c.field-meta.xml
force-app/main/default/objects/RC_Windows__mdt/fields/RC_Invoice_Window_Name__c.field-meta.xml
force-app/main/default/objects/RC_Windows__mdt/fields/RC_Recognition_Window_ID__c.field-meta.xml
force-app/main/default/objects/RC_Windows__mdt/fields/RC_Recognition_Window_Name__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/Loaner_Giveup_Time__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/Final_reply_day_help__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/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/Old_Rental_Apply__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/Rental_Apply__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/Set_StockDown_time_New__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_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/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_Formula__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/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/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/OPDManagerText__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_Formula__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/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_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/Viewagency.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_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/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/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/InspectionComment__c.field-meta.xml
force-app/main/default/objects/RepairAgainAn__c/fields/OCSM_End_Day__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_End_Day__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/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/Start_RepairAgainAn_Day__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/recordTypes/RepairAgainRecordType5.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.webLink-meta.xml
force-app/main/default/objects/RepairAgainAn__c/webLinks/PDF_RepairAgain_FSE.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/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/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/CancelleRepairTime__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/Fault_Date__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/ProblemDescriptionEng__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/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/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/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/SFDCRepairApplyDate__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/listViews/All.listView-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/validationRules/Request_repair_status.validationRule-meta.xml
force-app/main/default/objects/RepairSubOrder__c/webLinks/ApplyForQIS.webLink-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/FSE_Main_TongKuoZongJian__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_CheckWindow_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_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/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/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/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/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/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/Day_later_30__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/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/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/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/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/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/Finished_repair_not_return.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_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/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/SendRepairsToEtQ_ljh.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/ReportMemo__c/ReportMemo__c.object-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/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/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/Practitioner2_Part_Encrypted__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/Practitioner4_Part_Encrypted__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/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/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/Only_OPDtoSIS.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__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__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_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/SalesRoot__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.listView-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/Is_Equals_Opp_Owner_F_T__c.field-meta.xml
force-app/main/default/objects/Tender_Opportunity_Link__c/fields/Opportunity_Owner_Text__c.field-meta.xml
force-app/main/default/objects/Tender_Opportunity_Link__c/fields/Opportunity_Owner__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/TenderOwnerId__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_Opportunity_Link__c/fields/Upd_Opportunity_Owner_Date__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/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/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/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/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/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/All1.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/MyHanlderBid1.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/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/TriggerManage__mdt/TriggerManage__mdt.object-meta.xml
force-app/main/default/objects/TriggerManage__mdt/fields/Active__c.field-meta.xml
force-app/main/default/objects/Visit_Report__c/webLinks/Cancel.webLink-meta.xml
force-app/main/default/objects/bidInfoFile__c/bidInfoFile__c.object-meta.xml
force-app/main/default/objects/bidInfoFile__c/fields/InfoId__c.field-meta.xml
force-app/main/default/objects/bidInfoFile__c/fields/InfoType__c.field-meta.xml
force-app/main/default/objects/bidInfoFile__c/fields/Tender_information__c.field-meta.xml
force-app/main/default/objects/bidInfoFile__c/fields/UpdateDate__c.field-meta.xml
force-app/main/default/objects/eSignForm__c/eSignForm__c.object-meta.xml
force-app/main/default/objects/eSignForm__c/fields/LastModifiedDate__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/AlleSignFormAgencyOBSAP.listView-meta.xml
force-app/main/default/objects/eSignForm__c/listViews/AlleSignFormHPOBSAP.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/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/RentalApply__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/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/RentalDeficit.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/RentalLose.recordType-meta.xml
force-app/main/default/objects/task__c/recordTypes/RentalRecycle.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/AccountApproval.page
force-app/main/default/pages/AccountApproval.page-meta.xml
force-app/main/default/pages/AccountTargetTab.page
force-app/main/default/pages/AdvanceOpportunity.page
force-app/main/default/pages/AdvanceOpportunity.page-meta.xml
force-app/main/default/pages/AssessmentReport.page
force-app/main/default/pages/AssetMaintain.page
force-app/main/default/pages/AssetQR.page
force-app/main/default/pages/AttachmentPreview.page
force-app/main/default/pages/BMEWorkPage.page
force-app/main/default/pages/BatchSelectRepairPage.page
force-app/main/default/pages/Bidding.page
force-app/main/default/pages/CampaignCreate.page
force-app/main/default/pages/CampaignCreate.page-meta.xml
force-app/main/default/pages/CampaignMemberUploadFile.page
force-app/main/default/pages/CampaignMemberUploadFile.page-meta.xml
force-app/main/default/pages/ChangeDealerApproval.page
force-app/main/default/pages/ChoiceAsset.page
force-app/main/default/pages/ConsumApplyBR.page
force-app/main/default/pages/ConsumApplyQR.page
force-app/main/default/pages/ConsumEquipmentSetReceived.page
force-app/main/default/pages/ConsumEquipmentSetReceivedTest.page
force-app/main/default/pages/ConsumEquipmentSetReceivedTest.page-meta.xml
force-app/main/default/pages/ConsumEquipmentSetShipment.page
force-app/main/default/pages/ConsumReassign.page
force-app/main/default/pages/ConsumTrial.page
force-app/main/default/pages/ConsumTrialPDF.page
force-app/main/default/pages/ConsumTrialUpdate.page
force-app/main/default/pages/ContractDetailPDF.page
force-app/main/default/pages/Create_Opportunity_by_Agency_Opportunity.page
force-app/main/default/pages/CustomDeleteVF.page
force-app/main/default/pages/Customapproval.page
force-app/main/default/pages/Customapproval.page-meta.xml
force-app/main/default/pages/Dealer_enquiry.page
force-app/main/default/pages/DeleteEventEntry.page
force-app/main/default/pages/DiscountProductApplication.page
force-app/main/default/pages/EnquiryDetails.page
force-app/main/default/pages/EquipmentSetShippmentReceived1.page
force-app/main/default/pages/EquipmentSetShippmentReceived6.page
force-app/main/default/pages/FixtureRemind.page
force-app/main/default/pages/FixtureRentalPDF.page
force-app/main/default/pages/FixtureRentalPDFCopy.page
force-app/main/default/pages/FixtureRentalPDFCopy.page-meta.xml
force-app/main/default/pages/FixtureSetManage.page
force-app/main/default/pages/FollowPage.page
force-app/main/default/pages/GSurveys.page
force-app/main/default/pages/HospitalRFApprovalResponsePopUp.page
force-app/main/default/pages/HospitalRFApprovalResponsePopUp.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/InsReportPDF.page
force-app/main/default/pages/InstructReport.page
force-app/main/default/pages/InventoryList.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/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/MaintenanceCommissionPDF.page
force-app/main/default/pages/MaintenanceContractEstimateVMPDF.page
force-app/main/default/pages/MaintenanceProductData.page
force-app/main/default/pages/MaxManagmentCode.page
force-app/main/default/pages/MaxManagmentCodeTransfer.page
force-app/main/default/pages/NewAndEditAddress.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/NewAndEditLead.page
force-app/main/default/pages/NewAndEditReport.page
force-app/main/default/pages/NewConsumApply.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/NewMCHPDF.page
force-app/main/default/pages/NewMCHPDFLimit.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/NewRepair.page
force-app/main/default/pages/NotReceivingNoteWaitingReceipt.page
force-app/main/default/pages/OPDSortManage.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/PCLLostReportPage.page
force-app/main/default/pages/PersonalEvaluation2.page
force-app/main/default/pages/ProductSetRollup.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/ReFixApprovalResponse.page
force-app/main/default/pages/ReFixApprovalResponse.page-meta.xml
force-app/main/default/pages/ReantalApplySeriesNo.page
force-app/main/default/pages/ReceivingNoteQR.page
force-app/main/default/pages/ReceivingNoteStockInRequest.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/RentalApplyBR.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/RentalReportExport.page
force-app/main/default/pages/RentalReportExport.page-meta.xml
force-app/main/default/pages/RentalSequenceWatch.page
force-app/main/default/pages/RepairAgainAnPDF.page
force-app/main/default/pages/ReportExport.page
force-app/main/default/pages/ReportExport.page-meta.xml
force-app/main/default/pages/SI_NewQuoteEntry.page
force-app/main/default/pages/SLAReportDetails.page
force-app/main/default/pages/SampleInventorySection.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/SearchVisitor.page
force-app/main/default/pages/SelectAssetEstimate.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/ServiceFollowPage.page
force-app/main/default/pages/ServiceFollowPage.page-meta.xml
force-app/main/default/pages/ServiceMaintenanceTaskPage.page
force-app/main/default/pages/SetPersonalTarget.page
force-app/main/default/pages/SetPersonalTargetcsv.page
force-app/main/default/pages/SetProvinceTarget.page
force-app/main/default/pages/SimpleEventRegister.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/StatusPage.page
force-app/main/default/pages/StraightBackAddress.page
force-app/main/default/pages/SubmitForApprovalPage.page
force-app/main/default/pages/SurveyPage.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/TransferApplyQR.page
force-app/main/default/pages/ViewAddressDecryptInfo.page
force-app/main/default/pages/ViewAgencyOpportunityDecryptInfo.page
force-app/main/default/pages/ViewAgencyOpportunityDecryptInfo.page-meta.xml
force-app/main/default/pages/ViewLeadDecryptInfo.page
force-app/main/default/pages/ViewParticipantsDecryptInfo.page
force-app/main/default/pages/ViewTenderinformationDecryptInfo.page
force-app/main/default/pages/WebToEquipmentSetShippmentReceived.page
force-app/main/default/pages/XinDailyReport.page
force-app/main/default/pages/eSignFormAttachment.page
force-app/main/default/pages/eSignFormQR.page
force-app/main/default/pages/gzwpage.page
force-app/main/default/pages/gzwpage.page-meta.xml
force-app/main/default/pages/searchAimsAccount.page
force-app/main/default/pages/taskAlert.page
force-app/main/default/staticresources/AWSService/AWSService.js
force-app/main/default/staticresources/AWSService/__MACOSX/._AWSService.js
force-app/main/default/staticresources/NewQuoteEntryJS.bin
force-app/main/default/staticresources/NewQuoteIraiJS.js
force-app/main/default/staticresources/OpportunityPCLJs.js
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/008bdb686d/prod/lwr_bootstrap_locker
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/03b5909940/prod/lwr_app
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/14049159b4/prod/lwr_loader
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/1f4de125a7/prod/lwr_lwc
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/37ed7667dc/prod/lwr_bootstrap
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/480f3423c4/prod/oasis
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/98698c76aa/prod/browsercheck
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/9f4968e8fa/prod/localeredirect
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/framework/ee8ccbae57/prod/lwr_mobile
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/template_html/fe74b79b86/prod/index
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/view/6036afc016/prod/zh_CN/service_Not_Available
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/view/654cc497d6/prod/zh_CN/serviceNotAvailable
force-app/main/default/staticresources/SNA_Partner_Sales1_sf_default_cdn_PY4Q0/webruntime/view/d5949149cb/prod/zh_CN/too_Many_Requests
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/008bdb686d/prod/lwr_bootstrap_locker
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/03b5909940/prod/lwr_app
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/14049159b4/prod/lwr_loader
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/1f4de125a7/prod/lwr_lwc
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/37ed7667dc/prod/lwr_bootstrap
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/480f3423c4/prod/oasis
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/98698c76aa/prod/browsercheck
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/9f4968e8fa/prod/localeredirect
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/framework/ee8ccbae57/prod/lwr_mobile
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/template_html/fe74b79b86/prod/index
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/view/654cc497d6/prod/en_US/serviceNotAvailable
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/view/657c760936/prod/en_US/service_Not_Available
force-app/main/default/staticresources/SNA_Site3_sf_default_cdn_uwZCF/webruntime/view/ef79331511/prod/en_US/too_Many_Requests
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/jquery_confirm/showMessageLWC.js
force-app/main/default/staticresources/jspdf.js
force-app/main/default/staticresources/jspdf.resource-meta.xml
force-app/main/default/staticresources/testthh.js
force-app/main/default/staticresources/testthh.resource-meta.xml
force-app/main/default/staticresources/xlsxCoreMinJs.js
force-app/main/default/staticresources/xlsxCoreMinJs.resource-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/AgencyOppUpd.trigger
force-app/main/default/triggers/AssetTrigger.trigger
force-app/main/default/triggers/BringQuantityTrigger.trigger
force-app/main/default/triggers/BringQuantityTrigger.trigger-meta.xml
force-app/main/default/triggers/CampaignMemberTrigger.trigger
force-app/main/default/triggers/CaseHpDeptUpd.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/ContactToUser.trigger
force-app/main/default/triggers/ContactTrigger.trigger
force-app/main/default/triggers/EventOpportunityPileUp.trigger
force-app/main/default/triggers/FollowTrigger.trigger
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/LeadTrigger.trigger
force-app/main/default/triggers/LeadintentionTrigger.trigger
force-app/main/default/triggers/LeadintentionTrigger.trigger-meta.xml
force-app/main/default/triggers/LostCancelReportTrigger.trigger
force-app/main/default/triggers/MCAETrigger.trigger
force-app/main/default/triggers/MCAETrigger.trigger-meta.xml
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/NFM001.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/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/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/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/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/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
force-app/main/default/triggers/testOppoTrigger.trigger
force-app/main/default/triggers/testOppoTrigger.trigger-meta.xml
manifest/package.xml
sfdx-project.json |