| | |
| | | * @Author: Thhto 997058689@qq.com |
| | | * @Date: 2022-07-08 10:47:25 |
| | | * @LastEditors: Thhto 997058689@qq.com |
| | | * @LastEditTime: 2023-01-30 16:21:38 |
| | | * @LastEditTime: 2023-02-03 15:25:46 |
| | | * @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:set attribute="else"> |
| | | <ui:outputRichText class="uiOutputRichText slds-m--around-large" value="{!v.TableContent}" /> |
| | | <div class="slds-p-around--large slds-align--absolute-center"> |
| | | <lightning:button label="ä¿å" variant="brand" onclick="{!c.processFileContent}" /> |
| | | <lightning:button aura:id="save_con" label="ä¿å" variant="brand" onclick="{!c.processFileContent}" disabled="false" /> |
| | | <lightning:button label="åæ¶" variant="brand" onclick="{!c.cancel}" /> |
| | | </div> |
| | | |
| | |
| | | ({ |
| | | readFile: function (component, helper, file) { |
| | | debugger |
| | | if (!file) return; |
| | | if (!file.name.match(/\.(csv||CSV)$/)) { |
| | | return alert('only support csv files'); |
| | |
| | | reader.readAsDataURL(file); |
| | | }, |
| | | saveRecords: function (component, event, helper) { |
| | | debugger |
| | | component.set('v.login', true); |
| | | var action = component.get("c.processData"); |
| | | var fieldsList = ['Name', 'Phone', 'AccountNumber']; //Please write your code dynamic fields |
| | |
| | | component.set('v.errorMessage', res1 + "请修æ¹åéæ°ä¸ä¼ "); |
| | | this.showErrorToast(component); |
| | | component.set('v.login', false); |
| | | component.find('save_con').set('v.disabled', true); |
| | | } else { |
| | | // this.success('导å
¥æå'); |
| | | component.set('v.successMessage', '导å
¥æå'); |
| | | this.showSuccessToast01(component); |
| | | component.set("v.showMain", true); |
| | | component.set('v.login', false); |
| | | component.find('save_con').set('v.disabled', false); |
| | | } |
| | | } |
| | | else if (state === "INCOMPLETE") { |
| | |
| | | window.setTimeout($A.getCallback(function () { |
| | | $A.util.addClass(component.find('errorDiv'), 'slds-hide'); |
| | | }), |
| | | 4000 |
| | | 7000 |
| | | ); |
| | | }, |
| | | success : function(message) { |
| | |
| | | <aura:handler event="c:strike_evt" action="{!c.createAopp}" name="strike_evt_addNewRecord" /> |
| | | <aura:attribute name="data" type="Agency_Report__c" default="{sobjectType:'Agency_Report__c'}" /> |
| | | <aura:attribute name="oppdata" type="Agency_Opportunity__c" default="{sobjectType:'Agency_Opportunity__c'}" /> |
| | | <aura:attribute name="acondata" type="Agency_Contact__c" default="{sobjectType:'Ag |
| | | ency_Contact__c'}" /> |
| | | <aura:attribute name="acondata" type="Agency_Contact__c" default="{sobjectType:'Agency_Contact__c'}" /> |
| | | <aura:attribute name="successMessage" type="String" /> |
| | | <aura:attribute name="etEng" type="String" /> |
| | | <aura:attribute name="errorMessage" type="String" /> |
| | |
| | | ({ |
| | | doinit: function (component, event, helper) { |
| | | debugger |
| | | console.warn('123321') |
| | | this.report_date_list(component, event, helper, 5); |
| | | component.set('v.login', true); |
| | | var action = component.get('c.getalldata'); |
| | |
| | | }, |
| | | //æ°å»ºæé® |
| | | new_report: function (component, event, helper) { |
| | | |
| | | debugger; |
| | | component.set('v.mode', 'new'); |
| | | component.set('v.dialog_type', 'æ°å»º'); |
| | | // å¨ |
| | |
| | | }); |
| | | }, |
| | | saveRecords: function (component, event, helper) { |
| | | debugger |
| | | component.set('v.login', true); |
| | | //fy 导å
¥ 202200506 start |
| | | var action1 = component.get("c.processDataAWSId"); |
| | |
| | | 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 nameDataId = searchDataMap.get(fileName.replace(' ','')); |
| | | if (dataMap.get(nameDataId)) { |
| | | filelist[5] = dataMap.get(nameDataId); //zhj æ°æ¹æ¡æ¹é filelist[5]ä¸ååçnameEncrpt 2022-12-21 |
| | | console.log('filelist[5] = ' + filelist[5]); |
| | | }else { |
| | | error += 'error1 第'+i+'è¡æ°æ®æè®¿äººSFä¸åå¨'; |
| | | } |
| | |
| | | // }); |
| | | }, |
| | | search_core : function(token,searchUrl,payload,callback,component) { |
| | | console.log('token = ' + token); |
| | | console.log('searchUrl = ' + searchUrl); |
| | | console.log('payload = ' + payload); |
| | | fetch(searchUrl, { |
| | | method: 'POST', |
| | | body: payload, |
| | |
| | | component.set('v.login',false); |
| | | if(callback)callback(result); |
| | | }).catch(error => { |
| | | console.log('error = ' + JSON.stringify(error)); |
| | | this.error('AWS search error.'); |
| | | component.set('v.login',false); |
| | | }); |
| | |
| | | fileData : component.get("v.fileContentData"), |
| | | }); |
| | | action1.setCallback(this, function(response) { |
| | | console.log('response = ' + JSON.stringify(response)); |
| | | var state = response.getState(); |
| | | if (state === "SUCCESS") { |
| | | var ress = response.getReturnValue(); |
| | | console.log('ress = ' + JSON.stringify(ress)); |
| | | if(ress){ |
| | | var valur =ress.split('error1'); |
| | | if(valur.length<=1){ |
| | | var res = JSON.parse(response.getReturnValue()); |
| | | console.log('res = ' + JSON.stringify(res)); |
| | | var dataArr = new Array(); |
| | | var dataMap = new Map(); |
| | | res.forEach(item => { |
| | |
| | | }, |
| | | |
| | | MAX_FILE_SIZE: 4608000, //Max file size 4.5 MB |
| | | CHUNK_SIZE: 750000, //Chunk Max size 750Kb |
| | | CHUNK_SIZE: 750000, //Chunk Max size 750Kb //2023-03-07 zhj ä¹åæ¯750000 |
| | | uploadHelper: function(component, event) { |
| | | // start/show the loading spinner |
| | | component.set("v.showLoadingSpinner", true); |
| | |
| | | var fileInput = component.find("fileId").get("v.files"); |
| | | // get the first file using array index[0] |
| | | var file = fileInput[0]; |
| | | console.log('file.size å¼å§ = ' + file.length); |
| | | //var test = this.compress(file); |
| | | var self = this; |
| | | var pdf = file.type; |
| | |
| | | fileContents.length, |
| | | startPosition + this.CHUNK_SIZE |
| | | ); |
| | | if (startPosition < endPosition) { |
| | | this.uploadInChunk( |
| | | component, |
| | | file, |
| | | fileContents, |
| | | startPosition, |
| | | endPosition, |
| | | '' |
| | | ); |
| | | } |
| | | // if (startPosition < endPosition) { |
| | | // this.uploadInChunk( |
| | | // component, |
| | | // file, |
| | | // fileContents, |
| | | // startPosition, |
| | | // endPosition, |
| | | // '' |
| | | // ); |
| | | // } |
| | | let staticResource = component.get('v.staticResource'); |
| | | var reader = new FileReader(); |
| | | reader.readAsDataURL(file.slice(0, endPosition)); |
| | | console.log('file.size è°ç¨ = ' + file.length); |
| | | reader.readAsDataURL(file); |
| | | var that = this; |
| | | reader.onloadend = function(evt){ |
| | | if(evt.target.readyState == FileReader.DONE){ |
| | |
| | | fileContents.length, |
| | | startPosition + this.CHUNK_SIZE |
| | | ); |
| | | if (startPosition < endPosition) { |
| | | this.uploadInChunk( |
| | | component, |
| | | file, |
| | | fileContents, |
| | | startPosition, |
| | | endPosition, |
| | | '' |
| | | ); |
| | | } |
| | | // if (startPosition < endPosition) { |
| | | // this.uploadInChunk( |
| | | // component, |
| | | // file, |
| | | // fileContents, |
| | | // startPosition, |
| | | // endPosition, |
| | | // '' |
| | | // ); |
| | | // } |
| | | let staticResource = component.get('v.staticResource'); |
| | | var reader = new FileReader(); |
| | | reader.readAsDataURL(file.slice(0, endPosition)); |
| | | reader.readAsDataURL(file); |
| | | var that = this; |
| | | reader.onloadend = function(evt){ |
| | | if(evt.target.readyState == FileReader.DONE){ |
| | |
| | | <!-- æ ¡éªcode --> |
| | | <aura:attribute name="code" type="string" default="" /> |
| | | <aura:attribute name="decodeCode" type="string" default="" /> |
| | | <!-- 20230302 è¿å£åè¯æ¹é fy start --> |
| | | <aura:attribute name="AgencyIDM" type="string" default="" /> |
| | | <!-- 20230302 è¿å£åè¯æ¹é fy end --> |
| | | |
| | | |
| | | <aura:attribute name="isLastPage" type="Boolean" default="false" description="æ¯å¦æåä¸é¡µï¼å¦ææ¯æåä¸é¡µï¼é£ä¹è¡¨æ ¼å页çä¸ä¸é¡µä¸å¯ç¨" /> |
| | |
| | | <!-- è¡é¡¹ç® 第åå è¿å£åè¯æç» fy--> |
| | | <!-- è¿å£åè¯ fy start --> |
| | | <th class="slds-is-resizable" tabindex="-1" data-label="è¿å£åè¯æç»" 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> --> |
| | | <button tabindex="-1" class="slds-button ReturnButton" style="width: 40px;" name="{!curr.Id}" onclick="{!c.showAttachmentDisplay}">æ¥ç</button> |
| | | <!-- <a onclick="{!c.showAttachmentDisplay}">æ¥ç</a> --> |
| | | <!-- <a href="{!'/eSignSystem/s/AttachmentDisplay?DNId='+ curr.Id}" target="_blank">æ¥ç</a> --> |
| | | <!-- <a href="https://ocsm stagefull.sandbox.file.force.com/servlet/servlet.FileDownload?file=00P1000001QkhvQ">{!curr.AttachmentName}</a> --> |
| | | </div> |
| | | </span> |
| | |
| | | }, |
| | | // è¿å£åè¯ fy start |
| | | showAttachmentDisplay: function(cmp, event, helper) { |
| | | helper.showAttachmentDisplay(cmp, event); |
| | | // helper.showAttachmentDisplay(cmp, event); |
| | | helper.showAttachmentDisplay2(cmp, event); |
| | | }, |
| | | rebackDNListPage: function(cmp, event, helper) { |
| | | helper.rebackDNListPage(cmp, event); |
| | | } |
| | | }, |
| | | // è¿å£åè¯ fy end |
| | | }) |
| | |
| | | ({ |
| | | init: function(cmp, event) { |
| | | |
| | | debugger |
| | | // å建Base64对象 |
| | | var Base64 = { |
| | | _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", |
| | |
| | | debugger |
| | | var flag = this.getURLISTrueParameter(); |
| | | //åæ°å¯¹è±¡map |
| | | var paramValue = this.getURLParameterValue(); |
| | | //20230302 è¿å£åè¯æ¹é fy start |
| | | // var paramValue = this.getURLParameterValue(); |
| | | var paramValue = this.getURLParameterValue(cmp); |
| | | //20230302 è¿å£åè¯æ¹é fy end |
| | | //åæ°å¯¹è±¡mapçé¿åº¦ |
| | | var length = Object.keys(paramValue).length; |
| | | |
| | |
| | | |
| | | //è§£ç åç管çç¼ç |
| | | cmp.set("v.decodeCode", code.replace(reg, "$2")); |
| | | //20230302 è¿å£åè¯æ¹é fy start |
| | | //éèæ£ç´¢é¡µ |
| | | cmp.set("v.DNNameInput", true); |
| | | // cmp.set("v.DNNameInput", true); |
| | | //20230302 è¿å£åè¯æ¹é fy start |
| | | //æ¾ç¤ºé¦é¡µ |
| | | cmp.set('v.buttonGroup', false); |
| | | |
| | | //20230302 è¿å£åè¯æ¹é fy start |
| | | if(paramValue.pinit=='true'){ |
| | | cmp.set("v.DNNameInput", false); |
| | | cmp.set("v.code", code.replace(reg, "$2")); |
| | | cmp.set('v.allWidth', document.documentElement.clientWidth - 40); |
| | | cmp.set('v.floatWidth', document.documentElement.clientWidth * 0.85); |
| | | cmp.set('v.floatWidth1', document.documentElement.clientWidth); |
| | | console.log('floatWidth:' + document.documentElement.clientWidth * 0.85); |
| | | this.getAccountHandler(cmp); |
| | | }else{ |
| | | cmp.set("v.DNNameInput", true); |
| | | } |
| | | //20230302 è¿å£åè¯æ¹é fy end |
| | | |
| | | } |
| | | //夿DNNameæ¯å¦ä¸ºç©º ä¸ä¸ºç©ºåéèæ£ç´¢é¡µ |
| | |
| | | // add slds-hide class from mySpinner |
| | | var spinner = cmp.find("mySpinner"); |
| | | $A.util.addClass(spinner, "slds-hide"); |
| | | }, |
| | | getURLParameterValue: function() { |
| | | }, //20230302 è¿å£åè¯æ¹é fy start |
| | | getURLParameterValue: function(cmp) { |
| | | // getURLParameterValue: function() { |
| | | //20230302 è¿å£åè¯æ¹é fy end |
| | | |
| | | var querystring = window.location.search.substr(1); |
| | | var paramValue = {}; |
| | | querystring.split("&").forEach(function(part) { |
| | | var param = part.split("="); |
| | | paramValue[param[0]] = decodeURIComponent(param[1]); |
| | | //20230302 è¿å£åè¯æ¹é fy start |
| | | if(param[0]=='AgencyID'){ |
| | | cmp.set("v.AgencyIDM", param[1]); |
| | | } |
| | | //20230302 è¿å£åè¯æ¹é fy end |
| | | }); |
| | | |
| | | //console.log('paramValue-' + paramValue); |
| | |
| | | debugger |
| | | cmp.set('v.AttachmentDisplayflag', false); |
| | | cmp.set('v.DNListPage', true); |
| | | } |
| | | }, |
| | | showAttachmentDisplay2: function(cmp, event) { |
| | | debugger |
| | | var DNId = event.target.name; |
| | | //20230302 è¿å£åè¯æ¹é fy start |
| | | var AgencyIDM = cmp.get('v.AgencyIDM'); |
| | | window.open('/eSignSystem/s/AttachmentDisplay?DNId=' + DNId+'&AgencyIDM='+AgencyIDM, '_blank'); |
| | | //20230302 è¿å£åè¯æ¹é fy end |
| | | }, |
| | | // è¿å£åè¯ fy end |
| | | |
| | | }) |
| | |
| | | <aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" |
| | | access="global" controller="eSignHospitalPageController"> |
| | | |
| | | <!-- è·åAWSä¿¡æ¯ deloitte zhj 2022-01-03 start --> |
| | | <aura:attribute name="staticResource" type="Object" /> |
| | | <!-- è·åAWSä¿¡æ¯ deloitte zhj 2022-01-03 end --> |
| | | |
| | | <!-- eSignHospitalPageController --> |
| | | <aura:attribute name="DNName" type="String" |
| | | description="ç¨æ¥ä»ç¶å¯¹è±¡æ¥æ¶ä¼ éè¿æ¥çDNå·" |
| | |
| | | helper.getColumnAndAction(cmp); |
| | | // 仿°æ®åºéé¢è¯»åæ°æ® |
| | | helper.geteSign(cmp); |
| | | //zhj 2022-01-03 start |
| | | helper.CallBackAction(cmp,'getAWS',{ |
| | | objectName : 'Document' |
| | | },function(data){ |
| | | console.log('è¿å
¥getAWS'); |
| | | if(data.getState() == "SUCCESS"){ |
| | | var rv = data.getReturnValue() |
| | | if(rv.IsSuccess){ |
| | | let staticResource = JSON.parse(rv.Data); |
| | | console.log('staticResource = ' + staticResource); |
| | | cmp.set('v.staticResource',staticResource); |
| | | } |
| | | } |
| | | }); |
| | | //zhj 2022-01-03 end |
| | | }, |
| | | // æç»é¡µè¡¨æ ¼ç翻页ä¸ä¸é¡µ |
| | | handleNext : function(cmp, event, helper) { |
| | |
| | | var deletecount = count - 1; |
| | | cmp.set("v.fileSize", deletecount); |
| | | //å
³èå端代ç å é¤ç¾æ¶åå½å
¥è¡¨ä¸çéä»¶ |
| | | var action = cmp.get("c.deleteChunk"); |
| | | //var action = cmp.get("c.deleteChunk"); |
| | | var action = cmp.get("c.deleteFile"); //zhj å é¤sfçéä»¶ 2023-01-23 |
| | | var attachmentID = cmp.get("v.attachmentID"); |
| | | var AttachmentID = attachmentID[name]; |
| | | action.setParams({ |
| | | AttachmentId : AttachmentID |
| | | //AttachmentId: AttachmentID |
| | | fileId : AttachmentID |
| | | }); |
| | | //éè¿é¡µé¢æç¹éªè¯actionæ¹æ³æ¯å¦æå |
| | | action.setCallback(this, function(response) { |
| | | var state = response.getState(); |
| | | if (state === "SUCCESS") { |
| | | var awsKey = response.getReturnValue(); |
| | | var keyList = []; |
| | | keyList.push(awsKey); |
| | | //zhj å é¤AWSçéä»¶ 2023-01-23 |
| | | let staticResource = cmp.get('v.staticResource'); |
| | | helper.awsPushData(staticResource.deleteUrl,keyList, function(result){ |
| | | console.log('å é¤éä»¶'); |
| | | console.log('result = ' + JSON.stringify(result)) |
| | | },staticResource.token,'POST') |
| | | } |
| | | }); |
| | | //æ§è¡actionæ¹æ³ |
| | | $A.enqueueAction(action); |
| | |
| | | //ç¨äºå¤æä¸ä¼ åä¸ä¸ªæä»¶æç¤º |
| | | component.set("v.messageFlag",false); |
| | | messageFlag = component.get("v.messageFlag"); |
| | | var action = component.get("c.saveChunk"); |
| | | action.setParams({ |
| | | parentId: component.get("v.parentId"), |
| | | fileName: file.name, |
| | | base64Data: encodeURIComponent(getchunk), |
| | | contentType: file.type, |
| | | fileId: attachId |
| | | }); |
| | | // set call back |
| | | action.setCallback(this, function(response) { |
| | | // store the response / Attachment Id |
| | | attachId = response.getReturnValue(); |
| | | //å¢å æä»¶å表å é¤åè½Â Â ç²¾ç¢ææ¯Â thh 2021-09-02 start |
| | | //å
³èéä»¶IDåéä»¶å |
| | | var attachmentID = component.get("v.attachmentID"); |
| | | attachmentID[file.name] = attachId; |
| | | component.set("v.attachmentID", attachmentID); |
| | | //å¢å æä»¶å表å é¤åè½Â Â ç²¾ç¢ææ¯Â thh 2021-09-02 end |
| | | var state = response.getState(); |
| | | if (state === "SUCCESS") { |
| | | // update the start position with end postion |
| | | //zhj ä¸ä½¿ç¨åæ¹ä¸ä¼ çåè½ï¼ç该æä»¶ç´¯è®¡å®æä¹ååä¸ä¼ å°AWSç¶ååå¨sfçFileAddress__c start |
| | | debugger |
| | | startPosition = endPosition; |
| | | endPosition = Math.min( |
| | | fileContents.length, |
| | | startPosition + this.CHUNK_SIZE |
| | | ); |
| | | // check if the start postion is still less then end postion |
| | | // then call again 'uploadInChunk' method , |
| | | // else, diaply alert msg and hide the loading spinner |
| | | if (startPosition < endPosition) { |
| | | this.uploadInChunk( |
| | | component, |
| | | file, |
| | | fileContents, |
| | | startPosition, |
| | | endPosition, |
| | | attachId |
| | | ); |
| | | } else { |
| | | // if (startPosition < endPosition) { |
| | | // this.uploadInChunk( |
| | | // component, |
| | | // file, |
| | | // fileContents, |
| | | // startPosition, |
| | | // endPosition, |
| | | // '' |
| | | // ); |
| | | // } |
| | | let staticResource = component.get('v.staticResource'); |
| | | var reader = new FileReader(); |
| | | reader.readAsDataURL(file); |
| | | var that = this; |
| | | reader.onloadend = function(evt){ |
| | | if(evt.target.readyState == FileReader.DONE){ |
| | | var base64value = evt.target.result; |
| | | var Base64 = {}; |
| | | Base64.file = base64value; |
| | | Base64.fileName = file.name; |
| | | Base64.size = fileContents.length; |
| | | //è°ç¨AWS ä¿åæä»¶v.staticResource |
| | | that.awsPushData(staticResource.newUrl,JSON.stringify(Base64), function(result){ |
| | | console.log('result = ' + result); |
| | | if(result.status == '0'){ |
| | | that.CallBackAction(component,'saveFile',{ |
| | | fileName: file.name, |
| | | key : result.object, |
| | | transId : result.txId, |
| | | parentId: component.get("v.parentId") |
| | | },function(response){ |
| | | //å¢å æä»¶å表å é¤åè½Â Â ç²¾ç¢ææ¯Â thh 2021-09-02 end |
| | | var state = response.getState(); |
| | | if (state === "SUCCESS") { |
| | | //æ§è¡transæ¹æ³ï¼è¿è¡ç¡®è®¤æå |
| | | that.awsPushData(staticResource.updateUrl,JSON.stringify({ 'txId': result.txId, "isSuccess": 1 }), function(result){ |
| | | console('确认äºå¡ =' + json.stringify(result)); |
| | | },staticResource.token,'POST'); |
| | | // store the response / Attachment Id |
| | | attachId = response.getReturnValue(); //attachIdæ¹é ä¹ååæäºæ¯File_Address__cçId deloitte-zhj 2023-01-11 |
| | | //å¢å æä»¶å表å é¤åè½Â Â ç²¾ç¢ææ¯Â thh 2021-09-02 start |
| | | //å
³èéä»¶IDåéä»¶å |
| | | var attachmentID = component.get("v.attachmentID"); |
| | | attachmentID[file.name] = attachId; |
| | | component.set("v.attachmentID", attachmentID); |
| | | //夿ä¸ä¼ æä»¶å
容 æç¤ºä¸æ¬¡ä¿¡æ¯ |
| | | var base = component.get("v.getchunk"); |
| | | if(!base || (base&&base!=getchunk)){ |
| | |
| | | } |
| | | } |
| | | //ä¸ä¼ æååæä»¶å表çæä»¶ååè² ç²¾ç¢ææ¯ thh 2021-09-26 end |
| | | } |
| | | //} |
| | | //zhj ä¸ä½¿ç¨åæ¹ä¸ä¼ çåè½ï¼ç该æä»¶ç´¯è®¡å®æä¹ååä¸ä¼ å°AWSç¶ååå¨sfçFileAddress__c end |
| | | // handel the response errors |
| | | } else if (state === "INCOMPLETE") { |
| | | alert("From server: " + response.getReturnValue()); |
| | |
| | | console.log("Unknown error"); |
| | | } |
| | | } |
| | | }); |
| | | // enqueue the action |
| | | $A.enqueueAction(action); |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | //ç¨äºå¤æä¸ä¼ åä¸ä¸ªæä»¶æç¤º |
| | | component.set("v.messageFlag",false); |
| | | messageFlag = component.get("v.messageFlag"); |
| | | var action = component.get("c.saveChunk"); |
| | | action.setParams({ |
| | | parentId: component.get("v.parentId"), |
| | | fileName: file.name, |
| | | base64Data: encodeURIComponent(getchunk), |
| | | contentType: file.type, |
| | | fileId: attachId |
| | | }); |
| | | |
| | | // set call back |
| | | action.setCallback(this, function(response) { |
| | | // store the response / Attachment Id |
| | | attachId = response.getReturnValue(); |
| | | //å¢å æä»¶å表å é¤åè½Â Â ç²¾ç¢ææ¯Â thh 2021-09-02 start |
| | | //å
³èéä»¶IDåéä»¶å |
| | | var attachmentID = component.get("v.attachmentID"); |
| | | attachmentID[file.name] = attachId; |
| | | component.set("v.attachmentID", attachmentID); |
| | | //å¢å æä»¶å表å é¤åè½Â Â ç²¾ç¢ææ¯Â thh 2021-09-02 end |
| | | var state = response.getState(); |
| | | if (state === "SUCCESS") { |
| | | // update the start position with end postion |
| | | |
| | | //zhj ä¸ä½¿ç¨åæ¹ä¸ä¼ çåè½ï¼ç该æä»¶ç´¯è®¡å®æä¹ååä¸ä¼ å°AWSç¶ååå¨sfçFileAddress__c start |
| | | debugger |
| | | startPosition = endPosition; |
| | | endPosition = Math.min( |
| | | fileContents.length, |
| | | startPosition + this.CHUNK_SIZE |
| | | ); |
| | | // check if the start postion is still less then end postion |
| | | // then call again 'uploadInChunk' method , |
| | | // else, diaply alert msg and hide the loading spinner |
| | | if (startPosition < endPosition) { |
| | | this.uploadInChunk( |
| | | component, |
| | | file, |
| | | fileContents, |
| | | startPosition, |
| | | endPosition, |
| | | attachId |
| | | ); |
| | | } else { |
| | | // if (startPosition < endPosition) { |
| | | // this.uploadInChunk( |
| | | // component, |
| | | // file, |
| | | // fileContents, |
| | | // startPosition, |
| | | // endPosition, |
| | | // '' |
| | | // ); |
| | | // } |
| | | let staticResource = component.get('v.staticResource'); |
| | | var reader = new FileReader(); |
| | | reader.readAsDataURL(file); |
| | | var that = this; |
| | | reader.onloadend = function(evt){ |
| | | if(evt.target.readyState == FileReader.DONE){ |
| | | var base64value = evt.target.result; |
| | | var Base64 = {}; |
| | | Base64.file = base64value; |
| | | Base64.fileName = file.name; |
| | | Base64.size = fileContents.length; |
| | | //è°ç¨AWS ä¿åæä»¶v.staticResource |
| | | that.awsPushData(staticResource.newUrl,JSON.stringify(Base64), function(result){ |
| | | console.log('result = ' + result); |
| | | if(result.status == '0'){ |
| | | //sfå»ä¿å |
| | | // var action = component.get("c.saveFile"); |
| | | // action.setParams({ |
| | | // fileName: file.name, |
| | | // key : result.object, |
| | | // transId : result.txId, |
| | | // parentId: component.get("v.parentId") |
| | | // }); |
| | | that.CallBackAction(component,'saveFile',{ |
| | | fileName: file.name, |
| | | key : result.object, |
| | | transId : result.txId, |
| | | parentId: component.get("v.parentId") |
| | | },function(response){ |
| | | // }); |
| | | // action.setCallback(that, function(response) { |
| | | //å¢å æä»¶å表å é¤åè½Â Â ç²¾ç¢ææ¯Â thh 2021-09-02 end |
| | | var state = response.getState(); |
| | | if (state === "SUCCESS") { |
| | | //æ§è¡transæ¹æ³ï¼è¿è¡ç¡®è®¤æå |
| | | that.awsPushData(staticResource.updateUrl,JSON.stringify({ 'txId': result.txId, "isSuccess": 1 }), function(result){ |
| | | console('确认äºå¡ =' + JSON.stringify(result)); |
| | | },staticResource.token,'POST'); |
| | | // store the response / Attachment Id |
| | | attachId = response.getReturnValue(); //attachIdæ¹é ä¹ååæäºæ¯File_Address__cçId deloitte-zhj 2023-01-11 |
| | | //å¢å æä»¶å表å é¤åè½Â Â ç²¾ç¢ææ¯Â thh 2021-09-02 start |
| | | //å
³èéä»¶IDåéä»¶å |
| | | var attachmentID = component.get("v.attachmentID"); |
| | | attachmentID[file.name] = attachId; |
| | | component.set("v.attachmentID", attachmentID); |
| | | //夿ä¸ä¼ æä»¶å
容 æç¤ºä¸æ¬¡ä¿¡æ¯ |
| | | var base = component.get("v.getchunk"); |
| | | if(!base || (base&&base!=getchunk)){ |
| | | // alert("æ¨å·²ç»æåä¸ä¼ æä»¶ã"); |
| | | component.set("v.getchunk",getchunk ); |
| | | } |
| | | |
| | | alert("æ¨å·²ç»æåä¸ä¼ æä»¶ã\n请ç¹å»æäº¤åéåºã"); |
| | | //ç¨äºæäº¤æé®å¤ææ¯å¦æå·²ä¸ä¼ çæä»¶ |
| | | component.set('v.IsUpLoad',true); |
| | |
| | | } |
| | | } |
| | | //ä¸ä¼ æååæä»¶å表çæä»¶ååè² ç²¾ç¢ææ¯ thh 2021-09-26 end |
| | | } |
| | | //zhj ä¸ä½¿ç¨åæ¹ä¸ä¼ çåè½ï¼ç该æä»¶ç´¯è®¡å®æä¹ååä¸ä¼ å°AWSç¶ååå¨sfçFileAddress__c end |
| | | // handel the response errors |
| | | } else if (state === "INCOMPLETE") { |
| | | alert("From server: " + response.getReturnValue()); |
| | | component.set("v.showLoadingSpinner", false); |
| | | component.set("v.errorFlag", true); |
| | | |
| | | } else if (state === "ERROR") { |
| | | var errors = response.getError(); |
| | | component.set("v.showLoadingSpinner", false); |
| | |
| | | } |
| | | }); |
| | | // enqueue the action |
| | | $A.enqueueAction(action); |
| | | //$A.enqueueAction(action); |
| | | } |
| | | },staticResource.token,'POST'); |
| | | }else{ |
| | | alert('Could not read file'); |
| | | } |
| | | } |
| | | }else{ |
| | | if(messageFlag){ |
| | | alert("æ¨å·²ç»ä¸ä¼ è¿è¯¥æä»¶äºï¼") |
| | |
| | | } |
| | | |
| | | return imgScale; |
| | | }, |
| | | },CallBackAction : function(component,action_name,para,callback) { //è°ç¨åå°æ¹æ³ zhj 2022-01-03 |
| | | 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); |
| | | },trans : function (fileName,txId,isSuccess){ //确认äºå¡ AWS zhj 2022-01-03 |
| | | let transParameters = { |
| | | txId: txId, |
| | | isSuccess: isSuccess |
| | | }; |
| | | console.log('txId = ' + txId); |
| | | AWSService.confirmTrans(staticResource.updateUrl,JSON.stringify(transParameters),function(result){ |
| | | console.log(fileName); |
| | | console.log(JSON.stringify(result)) |
| | | },staticResource.token) |
| | | },awsPushData : function(destUrl, payloadForNewPI, callback, token,type) { //确认äºå¡ AWS zhj 2022-01-03 |
| | | console.log('enter '+type); |
| | | let payloadstr= null; |
| | | if (payloadForNewPI) { |
| | | if (typeof payloadForNewPI == 'string') { |
| | | payloadstr = payloadForNewPI; |
| | | }else{ |
| | | payloadstr = JSON.stringify(payloadForNewPI); |
| | | } |
| | | } |
| | | console.log(payloadstr); |
| | | fetch(destUrl, { |
| | | method: type, |
| | | body: payloadstr, |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | 'pi-token': token |
| | | } |
| | | }).then((data) => { |
| | | return data.json(); |
| | | }).then((result) => { |
| | | console.log(result); |
| | | callback(result); |
| | | }).catch(error => { |
| | | console.log(error); |
| | | callback(0); |
| | | }); |
| | | } |
| | | }) |
| | |
| | | function makeCode() { |
| | | //qrcode.clear(); |
| | | |
| | | qrcode.makeCode("https://ocm.force.com/eSignSystem/s/EsignDataEntry?DNName="+encode); |
| | | //qrcode.makeCode("https://stagefull-ocm.cs113.force.com/eSignSystem/s/EsignDataEntry?DNName="+encode); |
| | | // qrcode.makeCode("https://ocm.force.com/eSignSystem/s/EsignDataEntry?DNName="+encode); |
| | | qrcode.makeCode("https://ocsm--stagefull.sandbox.my.site.com/eSignSystem/s/EsignDataEntry?DNName="+encode); |
| | | }; |
| | | |
| | | //è°ç¨çæäºç»´ç æ¹æ³ |
| | |
| | | Integer workdays = UpdateUserTextColBatch.getOlympusWorkDayCount(mon1stDate, toDate); |
| | | //æ¯æå°æ¨å¤©ç工使¥ |
| | | Integer workdays1 = UpdateUserTextColBatch.getOlympusWorkDayCount(mon1stDate, yesterDate); |
| | | |
| | | Integer day = Date.today().day(); |
| | | System.debug(day + '===========123'); |
| | | //Integer Soakup_NotExecute_Day = Integer.valueOf(System.Label.Soakup_NotExecute_Day); |
| | | Integer SSBacth_Execute_Day = Integer.valueOf(System.Label.SSBacth_Execute_Day); |
| | | if (workdays1 == SSBacth_Execute_Day || workdays != SSBacth_Execute_Day) { |
| | | // if (workdays1 == SSBacth_Execute_Day || workdays != SSBacth_Execute_Day) { // 2023-3-1 zyh 注é |
| | | if (day != SSBacth_Execute_Day) { // 2023-3-1 zyh add |
| | | // Id execBTId = Database.executeBatch(new AccountDailyUpdateBatch('1.åå'),4); // 2022-06-01 zyh udate |
| | | // execBTId = Database.executeBatch(new AccountDailyUpdateBatch('2.ä¸å'),4); // 2022-06-01 zyh udate |
| | | // execBTId = Database.executeBatch(new AccountDailyUpdateBatch('3.西å'),4); // 2022-06-01 zyh udate |
| | |
| | | |
| | | @isTest static void test_method_one() { |
| | | // Implement test code |
| | | String CRON_EXP = '0 0 0 3 9 ? 2022'; |
| | | String CRON_EXP = '0 0 0 4 2 ? 2025'; |
| | | System.Test.startTest(); |
| | | // Schedule the test job |
| | | String jobId = system.schedule('AccountDailyUpdateBatchScheduleTest', CRON_EXP, new AccountDailyUpdateBatchSchedule()); |
| | |
| | | set_AgencyOpportunity_OCSMOwner(); |
| | | |
| | | if (updAgencyOpportunityMap.size() > 0) { |
| | | // è·³è¿è¯¢ä»·trigger |
| | | StaticParameter.EscapeOppandStaTrigger = true; |
| | | update updAgencyOpportunityMap.values(); |
| | | StaticParameter.EscapeOppandStaTrigger = false; |
| | | } |
| | | } |
| | | |
| | |
| | | set_AgencyOpportunity_OCSMOwner(); |
| | | |
| | | if (updAgencyOpportunityMap.size() > 0) { |
| | | // è·³è¿è¯¢ä»·trigger |
| | | StaticParameter.EscapeOppandStaTrigger = true; |
| | | update updAgencyOpportunityMap.values(); |
| | | StaticParameter.EscapeOppandStaTrigger = false; |
| | | } |
| | | |
| | | updateTask(); // 2022-6-27 yjk è¯¢ä»·ä»»å¡ |
| | |
| | | opp.Agency_Opportunity__c = agency_Opp.Id; |
| | | opp.Name = 'test询价'; |
| | | opp.StageName = 'ç®æ¨'; |
| | | opp.CloseDate = Date.newInstance(2222, 7, 15); |
| | | opp.CloseDate = Date.newInstance(2023, 7, 15); |
| | | |
| | | Test.startTest(); |
| | | insert opp; |
| | |
| | | opp.StageName = 'ç®æ¨'; |
| | | //opp.AgencyOpp_FromOCM__c = true; |
| | | opp.SAP_Send_OK__c = false; |
| | | opp.CloseDate = Date.newInstance(2222, 7, 15); |
| | | opp.CloseDate = Date.newInstance(2023, 7, 15); |
| | | |
| | | Test.startTest(); |
| | | insert opp; |
| | |
| | | opp.Name = 'test询价'; |
| | | opp.StageName = 'ç®æ¨'; |
| | | opp.SAP_Send_OK__c = false; |
| | | opp.CloseDate = Date.newInstance(2222, 7, 15); |
| | | opp.CloseDate = Date.newInstance(2023, 7, 15); |
| | | opp.SAP_Send_OK__c = true; |
| | | insert opp; |
| | | |
| | |
| | | } |
| | | |
| | | // FIXME develoerNameãã |
| | | /*20230214 you DB202302187947 101廿ä¸ä¸ªsql |
| | | String[] deptTypes = new String[] {'Department_Class_OTH', 'Department_Class_BF', 'Department_Class_GYN', 'Department_Class_GS', 'Department_Class_URO', 'Department_Class_GI', 'Department_Class_ENT', 'Department_Class_ET'}; |
| | | List<RecordType> deptRects = [select Id, DeveloperName from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName IN :deptTypes]; |
| | | Map<String, String> deptRectMap = new Map<String, String>(); |
| | |
| | | deptRectMap.put('ET', rect.Id); |
| | | } |
| | | } |
| | | */ |
| | | //æ·»å æ°é»è¾ start |
| | | String[] deptTypes = new String[] {'Department_Class_OTH', 'Department_Class_BF', 'Department_Class_GYN', 'Department_Class_GS', 'Department_Class_URO', 'Department_Class_GI', 'Department_Class_ENT', 'Department_Class_ET'}; |
| | | Map<String, String> deptRectMap = new Map<String, String>(); |
| | | Map<String, Schema.RecordTypeInfo> deptrectAllMap = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName(); |
| | | for (string rect : deptTypes) { |
| | | ID accid=deptrectAllMap.get(rect).getRecordTypeId(); |
| | | if (rect == 'Department_Class_OTH') { |
| | | deptRectMap.put('OTH', accid); |
| | | } else if (rect == 'Department_Class_BF') { |
| | | deptRectMap.put('BF', accid); |
| | | } else if (rect == 'Department_Class_GYN') { |
| | | deptRectMap.put('GYN', accid); |
| | | } else if (rect == 'Department_Class_GS') { |
| | | deptRectMap.put('GS', accid); |
| | | } else if (rect == 'Department_Class_URO') { |
| | | deptRectMap.put('URO', accid); |
| | | } else if (rect == 'Department_Class_GI') { |
| | | deptRectMap.put('GI', accid); |
| | | } else if (rect == 'Department_Class_ENT') { |
| | | deptRectMap.put('ENT', accid); |
| | | } else if (rect == 'Department_Class_ET') { |
| | | deptRectMap.put('ET', accid); |
| | | } |
| | | } |
| | | //æ·»å æ°é»è¾ end |
| | | |
| | | Map<Id, Id> ahMap = new Map<Id, Id>(); |
| | | List<Agency_Hospital_Link__c> ahlist = [select Id, Hospital__c from Agency_Hospital_Link__c where Id in :ahId]; |
| | |
| | | insert new List<contact> {contact1,contact2,contact3}; |
| | | |
| | | Test.startTest(); |
| | | User thisUser= [select Id from User where Id=:UserInfo.getUserId()]; |
| | | System.runAs (thisUser){ |
| | | // ã¦ã¼ã¶ã¼ |
| | | //Profile p = [select Id from Profile where Name = '901_ç»éå卿¥']; |
| | | Profile p = [select Id from Profile where Name = '901_ç»éåæ´»å¨ç³»ç»']; |
| | |
| | | opp.StageName = 'ç®æ¨'; |
| | | //opp.AgencyOpp_FromOCM__c = true; |
| | | opp.SAP_Send_OK__c = false; |
| | | opp.CloseDate = Date.newInstance(2222, 7, 15); |
| | | opp.CloseDate = Date.newInstance(2023, 7, 15); |
| | | insert opp; |
| | | opp.SAP_Send_OK__c = true; |
| | | |
| | |
| | | opp2.Name = 'test询价2'; |
| | | opp2.StageName = 'ç®æ¨2'; |
| | | opp2.SAP_Send_OK__c = false; |
| | | opp2.CloseDate = Date.newInstance(2222, 7, 15); |
| | | opp2.CloseDate = Date.newInstance(2023, 7, 15); |
| | | opp2.SAP_Send_OK__c = true; |
| | | |
| | | // Test.startTest(); |
| | |
| | | FROM Agency_Opportunity__Share |
| | | WHERE ParentId=:agency_opportunity.Id and RowCause <>:rowCause]; |
| | | System.assertEquals(user.Id, agencyopportunityShare[0].UserOrGroupId); |
| | | } |
| | | } |
| | | |
| | | // ç»éåææè
ãã¹ã |
| | |
| | | insert new List<contact> {contact1,contact2,contact3}; |
| | | //insert new List<contact> {contact1,contact2}; |
| | | |
| | | |
| | | User thisUser= [select Id from User where Id=:UserInfo.getUserId()]; |
| | | System.runAs (thisUser){ |
| | | // ã¦ã¼ã¶ã¼ |
| | | //Profile p = [select Id from Profile where Name = '901_ç»éå卿¥']; |
| | | Profile p = [select Id from Profile where Name = '901_ç»éåæ´»å¨ç³»ç»']; |
| | |
| | | opp.StageName = 'ç®æ¨'; |
| | | //opp.AgencyOpp_FromOCM__c = true; |
| | | opp.SAP_Send_OK__c = false; |
| | | opp.CloseDate = Date.newInstance(2222, 7, 15); |
| | | opp.CloseDate = Date.newInstance(2023, 7, 15); |
| | | opp.OwnerId = user.Id; |
| | | insert opp; |
| | | |
| | |
| | | System.assertEquals(userList[0].SalesManager__c, aoList[0].Sales_Manager_F__c); |
| | | //System.assertEquals(aoList[0].Sales_Manager_F__c, aoList[0].Sales_Manager__c); |
| | | } |
| | | } |
| | | |
| | | // æ®éææè
ãã¹ã |
| | | @isTest |
| | |
| | | contact3.FirstName = '責任è
'; |
| | | contact3.LastName = 'test2ç»éå'; |
| | | insert new List<contact> {contact1,contact2,contact3}; |
| | | |
| | | User thisUser= [select Id from User where Id=:UserInfo.getUserId()]; |
| | | System.runAs (thisUser){ |
| | | // ã¦ã¼ã¶ã¼ |
| | | //Profile p = [select Id from Profile where Name = '901_ç»éå卿¥']; |
| | | Profile p = [select Id from Profile where Name = '901_ç»éåæ´»å¨ç³»ç»']; |
| | |
| | | opp.StageName = 'ç®æ¨'; |
| | | //opp.AgencyOpp_FromOCM__c = true; |
| | | opp.SAP_Send_OK__c = false; |
| | | opp.CloseDate = Date.newInstance(2222, 7, 15); |
| | | opp.CloseDate = Date.newInstance(2023, 7, 15); |
| | | opp.OwnerId = user3.Id; |
| | | insert opp; |
| | | |
| | |
| | | System.assertEquals(userList[0].SalesManager__c, aoList[0].Sales_Manager_F__c); |
| | | //System.assertEquals(aoList[0].Sales_Manager_F__c, aoList[0].Sales_Manager__c); |
| | | } |
| | | } |
| | | |
| | | public static void makeNormalData(boolean withAgencyDetail) { |
| | | ControllerUtil.EscapeNFM001Trigger = true; |
| | |
| | | * Classå: AgencyShareUpdateBatch |
| | | * çç±: ç°å¨åªæ Agency_Opportunity__c, 以å伿æ©å±çå¯è½ |
| | | */ |
| | | global class AgencyShareUpdateBatch implements Database.Batchable<sObject> { |
| | | //20230203 lt 计åçä½ä¸ä¼å --- ç»§æ¿å â, Database.Statefulâï¼ä¸ç¶removeOtherScæ¹æ³ç©ºæé |
| | | global class AgencyShareUpdateBatch implements Database.Batchable<sObject>, Database.Stateful { |
| | | |
| | | //20230203 lt 计åçä½ä¸ä¼å ä¸å°æ¶ä¸¤æ¬¡ start |
| | | private BatchEmailUtil.ScBean scB1; |
| | | //20230203 lt 计åçä½ä¸ä¼å ä¸å°æ¶ä¸¤æ¬¡ end |
| | | |
| | | global AgencyShareUpdateBatch() { |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | |
| | | //20230203 lt 计åçä½ä¸ä¼å ä¸å°æ¶ä¸¤æ¬¡ start |
| | | scB1 = BatchEmailUtil.setSc1('AgencyShareUpdateBatchSchedule', 0, 23, 0, '0 30 *', null); |
| | | if (System.Test.isRunningTest() == false) { |
| | | for(CronTrigger ct : [SELECT Id FROM CronTrigger WHERE CronJobDetail.Name =: scB1.scName]) { |
| | | System.abortJob(ct.Id); |
| | | } |
| | | system.schedule(scB1.scName, scB1.scTime, new AgencyShareUpdateBatchSchedule()); |
| | | } |
| | | //20230203 lt 计åçä½ä¸ä¼å ä¸å°æ¶ä¸¤æ¬¡ end |
| | | |
| | | return Database.getQueryLocator([SELECT Id |
| | | , OCSM_Owner__c |
| | | , Department_Class_Opp__c |
| | |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext bc) { |
| | | BatchEmailUtil.removeOtherSc('AgencyShareUpdateBatchSchedule', scB1.scName); //20230203 lt 计åçä½ä¸ä¼å |
| | | |
| | | // 妿åä¸ä¸ª603çbatchæ£å¨çå¾
ç¶æï¼ååæ¶æåä¸ä¸ªbatchçæ§è¡ |
| | | List<AsyncApexJob> lstJobs = [SELECT Id FROM AsyncApexJob WHERE (Status = 'Queued' OR Status = 'Holding') AND ApexClass.Name = 'NFM603Batch']; |
| | |
| | | Consumable_order_details2__c codsIns = new Consumable_order_details2__c(); |
| | | |
| | | codsIns.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | codsIns.Intra_Trade_List_RMB__c =null; |
| | | codsIns.Intra_Trade_List_RMB__c = reSet1[i].Intra_Trade_List_RMB__c; |
| | | //gzw æå¨å
¥åº é»è®¤äº§ååä»· 20230307 |
| | | codsIns.Asset_Model_No__c = reSet1[i].Asset_Model_No__c; |
| | | codsIns.Direct_Arrive_Product__c = true; |
| | | codsIns.Sterilization_limit__c = reSet1[i].Sterilization_limit__c; |
| | |
| | | Dealer_Shipment__c, Dealer_Saled__c,Consumable_Product__r.Asset_Model_No__c |
| | | // æ´æ°åè°ä¿¡æ¯ add by gzw 2020-0-415 start |
| | | ,SummonsForDirction_det__c,Transfer_Time__c,Frist_Transfer_Agency__c,Agency_Transfer__c, |
| | | Dealer_Info_text__c |
| | | Dealer_Info_text__c,Intra_Trade_List_RMB__c |
| | | // æ´æ°åè°ä¿¡æ¯ add by gzw 2020-0-415 start |
| | | // 馿¬¡å
¥åºç»éåä¿¡æ¯ add by gzw 2020-04-27 start |
| | | ,Agencyinfo_fromSAP__c,Frist_Storage_Agency__c |
| | |
| | | Consumable_order_details2__c codsIns = new Consumable_order_details2__c(); |
| | | |
| | | codsIns.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | codsIns.Intra_Trade_List_RMB__c =null; |
| | | codsIns.Intra_Trade_List_RMB__c = reSet1[i].Intra_Trade_List_RMB__c; |
| | | //gzw æå¨å
¥åº é»è®¤äº§ååä»· 20230307 |
| | | codsIns.Asset_Model_No__c = reSet1[i].Asset_Model_No__c; |
| | | codsIns.Direct_Arrive_Product__c = true; |
| | | codsIns.Sterilization_limit__c = reSet1[i].Sterilization_limit__c; |
| | |
| | | arriveId = orderMain.id; |
| | | Decimal arriveAmount =0; |
| | | for (ConsumableorderdetailsInfo ass : consumableorderdetailsRecordsUse) { |
| | | //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'------1------')); |
| | | Consumable_order_details2__c insDetails = new Consumable_order_details2__c(); |
| | | insDetails.Id = ass.esd.Id; |
| | | insDetails.Consumable_Arrived_order__c = orderMain.id; |
| | |
| | | // } |
| | | insAfterDel.Name = consumable_order[0].Name + '-'+ str; |
| | | insAfterDel.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | if(EsetId != null && EsetId != ''){ |
| | | // gzw æå¨å
¥åº é»è®¤äº§ååä»· 20230307 |
| | | // if(EsetId != null && EsetId != ''){ |
| | | // insAfterDel.Intra_Trade_List_RMB__c = ass.Prod.Intra_Trade_List_RMB__c; |
| | | // }else{ |
| | | // insAfterDel.Intra_Trade_List_RMB__c = 0; |
| | | // } |
| | | insAfterDel.Intra_Trade_List_RMB__c = ass.Prod.Intra_Trade_List_RMB__c; |
| | | }else{ |
| | | insAfterDel.Intra_Trade_List_RMB__c = 0; |
| | | } |
| | | //gzw æå¨å
¥åº é»è®¤äº§ååä»· 20230307 |
| | | insAfterDel.Asset_Model_No__c = ass.Prod.Asset_Model_No__c; |
| | | if(EsetId != null && EsetId != ''){ |
| | | insAfterDel.Consumable_order_minor__c = ESetId; |
| | |
| | | if(updateconsumableorderdetails2.size() > 0){ |
| | | update updateconsumableorderdetails2; |
| | | } |
| | | |
| | | List<Consumable_order_details2__c> insertconsumableorderdetails2 = new List<Consumable_order_details2__c>(); |
| | | for(Consumable_order_details2__c Cod2 : consumableorderdetails2Insert){ |
| | | //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'------4------')); |
| | |
| | | // tcm end |
| | | //add by rentx 2020-10-14 end |
| | | ,Report_Product_Expiration__c |
| | | ,Intra_Trade_List__c |
| | | FROM Consumable_order_details2__c |
| | | WHERE ((Dealer_Arrive__c = true |
| | | AND( Dealer_Shipment__c = true |
| | |
| | | // tcm end |
| | | ,Report_Product_Expiration__c |
| | | //add by rentx 2020-10-13 end |
| | | ,Intra_Trade_List__c |
| | | //gzw æå¨å
¥åº é»è®¤äº§ååä»· 20230307 |
| | | FROM Consumable_order_details2__c |
| | | WHERE |
| | | // WYIN-BLZE48çç¹ä¸¢å¤±äº§åå¢å å
¥åºæ¹å¼ update by vivek 2020-03-05 start |
| | |
| | | codcorderdet.SerialLotNo__c = codi.esd.SerialLotNo__c; |
| | | codcorderdet.TracingCode__c = codi.esd.TracingCode__c; |
| | | codcorderdet.Sterilization_limit__c = codi.esd.Sterilization_limit__c; |
| | | codcorderdet.Intra_Trade_List_RMB__c = codi.esd.Intra_Trade_List_RMB__c; |
| | | //gzw æå¨å
¥åº é»è®¤äº§ååä»· 20230307 |
| | | codcorderdet.Intra_Trade_List_RMB__c = (codi.esd.Intra_Trade_List_RMB__c == null || codi.esd.Intra_Trade_List_RMB__c == 0) ? codi.esd.Intra_Trade_List__c : codi.esd.Intra_Trade_List_RMB__c; |
| | | codcorderdet.RemoveBox_No__c = codctmp.RemoveBox_No__c; |
| | | codcorderdet.RemoveBox_date__c = codctmp.RemoveBox_date__c; |
| | | codcorderdet.Box_Piece__c = codctmp.Box_Piece__c; |
| | |
| | | codcorderdet.SerialLotNo__c = codi.esd.SerialLotNo__c; |
| | | codcorderdet.TracingCode__c = codi.esd.TracingCode__c; |
| | | codcorderdet.Sterilization_limit__c = codi.esd.Sterilization_limit__c; |
| | | codcorderdet.Intra_Trade_List_RMB__c = codi.esd.Intra_Trade_List_RMB__c; |
| | | //gzw æå¨å
¥åº é»è®¤äº§ååä»· 20230307 |
| | | codcorderdet.Intra_Trade_List_RMB__c = (codi.esd.Intra_Trade_List_RMB__c == null || codi.esd.Intra_Trade_List_RMB__c == 0) ? codi.esd.Intra_Trade_List__c : codi.esd.Intra_Trade_List_RMB__c; |
| | | // WYIN-BLZE48çç¹ä¸¢å¤±äº§åå¢å å
¥åºæ¹å¼ update by vivek 2020-03-05 start |
| | | if(hasLoseGoods){ |
| | | codcorderdet.loseInventory__c = true; |
| | |
| | | codcList.add( codi.esd ); |
| | | } |
| | | } |
| | | |
| | | //æç»2ä¸åå¨ç对åºçå°è´§è®¢åæç» 2017-07-05 |
| | | Integer i = 1; |
| | | //for(ConsumableorderdetailsInfo ass : consumableInventoryUse){ |
| | |
| | | //å°è´§æç» |
| | | codcorderdetail.Name = consumable_order_arr[0].Name + '-'+ str; |
| | | codcorderdetail.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | codcorderdetail.Intra_Trade_List_RMB__c = null; |
| | | codcorderdetail.Intra_Trade_List_RMB__c = ass.Prod.Intra_Trade_List_RMB__c; |
| | | //gzw æå¨å
¥åº é»è®¤äº§ååä»· 20230307 |
| | | codcorderdetail.Asset_Model_No__c = ass.Prod.Asset_Model_No__c; |
| | | codcorderdetail.Direct_Arrive_Product__c = true; |
| | | codcorderdetail.Sterilization_limit__c = ass.sterilizationlimitDate; |
| | |
| | | |
| | | retorddetail.Name = consumable_order_ret[0].Name + '-'+ str; |
| | | retorddetail.RecordTypeId = System.Label.RT_ConOrderDetail2_Return; |
| | | retorddetail.Intra_Trade_List_RMB__c = null; |
| | | retorddetail.Intra_Trade_List_RMB__c = ass.Prod.Intra_Trade_List_RMB__c; |
| | | //gzw æå¨å
¥åº é»è®¤äº§ååä»· 20230307 |
| | | retorddetail.Dealer_Info_IF__c = accountid; |
| | | retorddetail.Asset_Model_No__c = ass.Prod.Asset_Model_No__c; |
| | | retorddetail.Direct_Arrive_Product__c = true; |
| | |
| | | private Map<Id, Asset> oldMap; |
| | | private List<Asset> newList; |
| | | private List<Asset> oldList; |
| | | private static final Map<String,Schema.RecordTypeInfo> DEVELOPERNAMEMAP = Schema.SObjectType.Asset.getRecordTypeInfosByDeveloperName();// 20230306 ljh add |
| | | @TestVisible private static Set<String> testTargetDepts; |
| | | @TestVisible private static Id Account_Asset_Id; |
| | | public static Boolean disabled = false; |
| | |
| | | StaticParameter.EscapeMaintenanceContractAfterUpdateTrigger = true; |
| | | Set<id> AssetIDSet = new Set<id>(); |
| | | for(Asset tempAsset : newList){ |
| | | if(String.isNotBlank(tempAsset.warrantyType__c)){ |
| | | // 20230306 ljh update start |
| | | Id Shipment = DEVELOPERNAMEMAP.get('Shipment').getRecordTypeId(); |
| | | // if(String.isNotBlank(tempAsset.warrantyType__c)){ |
| | | if(String.isNotBlank(tempAsset.warrantyType__c) && Shipment != tempAsset.RecordTypeId){ |
| | | // 20230306 ljh update end |
| | | AssetIDSet.add(tempAsset.id); |
| | | } |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>35.0</apiVersion> |
| | | <apiVersion>50.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | |
| | | global void execute(Database.BatchableContext BC, |
| | | list<Maintenance_Contract__c> MCList) { |
| | | //URF鿬¡åå2æ LY 20220908 start |
| | | set<id> mcIDSet = new set<id>(); |
| | | for (Maintenance_Contract__c tempMCA : MCList) { |
| | | mcIDSet.add(tempMCA.id); |
| | | } |
| | | //è·åé鿬¡åå |
| | | List<Maintenance_Contract__c> mcPList =[select id , previousTotalRepairAmount__c , currentTotalRepairAmount__c , |
| | | previousTotalContractAmount__c , currentTotalContractAmountVM__c , currentTotalGuaranteePrice__c |
| | | , RecordType_DeveloperName__c |
| | | from Maintenance_Contract__c |
| | | where URF_Contract__c = false and ID in :mcIDSet]; |
| | | //è·å鿬¡åå |
| | | List<Maintenance_Contract__c> urfMCList =[select id , previousTotalRepairAmount__c , currentTotalRepairAmount__c , |
| | | previousTotalContractAmount__c , currentTotalContractAmountVM__c , currentTotalGuaranteePrice__c |
| | | , RecordType_DeveloperName__c |
| | | from Maintenance_Contract__c |
| | | where URF_Contract__c = true and ID in :mcIDSet]; |
| | | |
| | | //URF鿬¡åå2æ LY 20220908 end |
| | | |
| | | map<string, asset> updateAssetMap = new map<string, asset>(); |
| | | map<string, Maintenance_Contract__c> UpdateMCMap = |
| | |
| | | Set<ID> allAssetIDSet = new Set<ID>(); |
| | | List<asset> allAssetList = new List<asset>(); |
| | | // åå§åç»´ä¿®ååæ¶è´¹çç¸å
³éé¢å段为0; |
| | | for (Maintenance_Contract__c tempMC : mcPList) { |
| | | for (Maintenance_Contract__c tempMC : MCList) { |
| | | mcIDmap.put(tempMC.id,null); |
| | | tempMC.currentTotalRepairAmount__c = 0; |
| | | tempMC.previousTotalRepairAmount__c = 0; |
| | |
| | | Maintenance_Contract__r.Estimation_Id__r.Submit_quotation_day__c, |
| | | Maintenance_Contract__r.RecordType.DeveloperName |
| | | , ifHaveleftInPrevious__c |
| | | ,Maintenance_Contract__r.URF_Contract__c |
| | | from Maintenance_Contract_Asset__c |
| | | where Maintenance_Contract__c in: mcIDmap.keyset() |
| | | ]; |
| | |
| | | allAssetIDSet.add(mca.Asset__c); |
| | | newToOldMCA.put(mca.id, null); |
| | | } |
| | | //system.debug('allAssetIDSet:' + allAssetIDSet); |
| | | system.debug('allAssetIDSet:' + allAssetIDSet); |
| | | //system.debug('newToOldMCA:' + newToOldMCA); |
| | | allAssetList = |
| | | [select id, CurrentContract_F__c, |
| | | CurrentContract_F__r.Contract_End_Date__c, |
| | | CurrentContract_F_asset__c, |
| | | CurrentContract_F_asset__r.endDate_sum__c |
| | | ,URF_Maintenance_Contract__c |
| | | ,URF_Maintenance_Contract__r.Contract_End_Date__c |
| | | from asset |
| | | where id in: allAssetIDSet]; |
| | | // æ´æ°ä¿æè®¾å¤ä¸çä¸ä¸æç»´ä¿®åååç»´ä¿®ååä¿æè®¾å¤ |
| | |
| | | for (asset ass : allAssetList) { |
| | | Maintenance_Contract_Asset__c tempMCA = |
| | | assetIDtoMCA.get(ass.Id); |
| | | if (tempMCA != null && |
| | | if (tempMCA != null) { |
| | | if (tempMCA.Maintenance_Contract__r.URF_Contract__c==true && |
| | | (ass.URF_Maintenance_Contract__c == null || |
| | | ass.URF_Maintenance_Contract__r.Contract_End_Date__c <= tempMCA.endDate_sum__c |
| | | )) { |
| | | ass.URF_Maintenance_Contract__c = tempMCA.Maintenance_Contract__c; |
| | | } |
| | | if (tempMCA.Maintenance_Contract__r.URF_Contract__c==false && |
| | | ( |
| | | ass.CurrentContract_F__c == null || |
| | | ass.CurrentContract_F_asset__c == null || |
| | | ass.CurrentContract_F_asset__r.endDate_sum__c <= |
| | | tempMCA.endDate_sum__c |
| | | |
| | | ) ) { |
| | | ) |
| | | ){ |
| | | ass.CurrentContract_F__c = tempMCA.Maintenance_Contract__c; |
| | | ass.CurrentContract_F_asset__c = tempMCA.id; |
| | | } |
| | | |
| | | updateAssetMap.put(ass.id, ass); |
| | | } |
| | | |
| | | } |
| | | //URF鿬¡åå2æ LY 20220908 start |
| | | Map<string,Maintenance_Contract__c> mcURFIDmap = new Map<string,Maintenance_Contract__c>(); |
| | | for (Maintenance_Contract__c tempURFMC : urfMCList) { |
| | | mcURFIDmap.put(tempURFMC.Id, null); |
| | | } |
| | | //æ£ç´¢æ¬æ¬¡é次ååçä¿æè®¾å¤ |
| | | List<Maintenance_Contract_Asset__c> mcURFList = |
| | | [select Id, Asset__c, Maintenance_Contract__c, |
| | | Estimate_Cost_formula__c, |
| | | startDate_sum__c, |
| | | endDate_sum__c, |
| | | No_discount__c, |
| | | GuaranteePrice_Amount_Text__c, |
| | | Maintenance_Contract__r.Status__c, |
| | | Maintenance_Contract__r.Name, |
| | | Maintenance_Contract__r.Contract_End_Date__c, |
| | | Maintenance_Contract__r.Contract_Start_Date__c, |
| | | Maintenance_Contract__r.RecordType_DeveloperName__c, |
| | | Maintenance_Contract__r.Estimation_Id__r.Submit_quotation_day__c, |
| | | Maintenance_Contract__r.RecordType.DeveloperName |
| | | , ifHaveleftInPrevious__c |
| | | from Maintenance_Contract_Asset__c |
| | | where Maintenance_Contract__c in: mcURFIDmap.keyset() |
| | | ]; |
| | | Set<ID> allURFAssetIDSet = new Set<ID>(); |
| | | Map<string, Maintenance_Contract_Asset__c> assetIDtoURF =new Map<string, Maintenance_Contract_Asset__c>(); |
| | | for (Maintenance_Contract_Asset__c mcaURF : mcURFList) { |
| | | // æ¾åºæ¥æ£ç´¢åºæ¥çç»´ä¿®ååä¿æä¸çææ°ç |
| | | if (assetIDtoURF.containsKey(mcaURF.Asset__c)) { |
| | | Maintenance_Contract_Asset__c tempURF = |
| | | assetIDtoURF.get(mcaURF.Asset__c); |
| | | if (tempURF.endDate_sum__c < mcaURF.endDate_sum__c) { |
| | | assetIDtoURF.put(mcaURF.Asset__c, mcaURF); |
| | | } |
| | | } else { |
| | | assetIDtoURF.put(mcaURF.Asset__c, mcaURF); |
| | | } |
| | | allURFAssetIDSet.add(mcaURF.Asset__c); |
| | | } |
| | | List<asset> allURFAssetList =[select id, URF_Maintenance_Contract__c |
| | | from asset |
| | | where id in: allURFAssetIDSet]; |
| | | for (asset ass : allURFAssetList) { |
| | | Maintenance_Contract_Asset__c tempMCA = |
| | | assetIDtoURF.get(ass.Id); |
| | | ass.URF_Maintenance_Contract__c = tempMCA.Maintenance_Contract__c; |
| | | updateAssetMap.put(ass.id, ass); |
| | | |
| | | } |
| | | //URF鿬¡åå2æ LY 20220908 end |
| | | //æ£ç´¢åºåå±ä¿æè®¾å¤ |
| | | list<Maintenance_Contract_Asset__c> allMCAList = |
| | | [select Id, Asset__c, Maintenance_Contract__c, |
| | |
| | | global class AssetUseInfoSchedule implements Schedulable { |
| | | global void execute(SchedulableContext sc) { |
| | | // ä¿æè®¾å¤åä¸å¹´ä½¿ç¨æ
åµè®°å½(æ¯å¹´12æ31æ¥æ§è¡) |
| | | if(Test.isRunningTest() || checkDate(date.today().addDays(-1))){ |
| | | if(Test.isRunningTest() || checkDate(date.today().addDays(-2))){ |
| | | Id execBTId = Database.executeBatch(new AssetUseInfoBatch(), 200); |
| | | } |
| | | } |
| | |
| | | opp.Name = 'GZ-SP-NFM007_1'; |
| | | opp.Trade__c = 'å
貿'; |
| | | opp.StageName = 'å¼å'; |
| | | opp.CloseDate = date.newinstance(2022, 11, 30); |
| | | opp.CloseDate = date.newinstance(2023, 12, 30); |
| | | opp.Stock_apply_status__c = 'ç³è¯·ä¸'; |
| | | insert opp; |
| | | |
| | |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'test hospital'; |
| | | hospital.Is_Active__c = 'æå¹'; |
| | | hospital.Is_Active__c = 'èæ¡ä¸'; |
| | | hospital.Attribute_Type__c = 'å«çé¨'; |
| | | hospital.Speciality_Type__c = '综åå»é¢'; |
| | | hospital.Grade__c = 'ä¸çº§'; |
| | |
| | | Name = 'test', |
| | | ParentId = hospital.Id, |
| | | Body = EncodingUtil.base64Decode('test') |
| | | |
| | | ); |
| | | insert att; |
| | | |
| | |
| | | opp.Name = 'GZ-SP-NFM007_1'; |
| | | opp.Trade__c = 'å
貿'; |
| | | opp.StageName = 'å¼å'; |
| | | opp.CloseDate = date.newinstance(2022, 11, 30); |
| | | opp.CloseDate = date.newinstance(2023, 11, 30); |
| | | opp.Stock_apply_status__c = 'ç³è¯·ä¸'; |
| | | insert opp; |
| | | |
| | |
| | | System.Test.stopTest(); |
| | | |
| | | } |
| | | @isTest |
| | | /*@isTest |
| | | static void test_method_8() { |
| | | 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; |
| | | } |
| | | Oly_TriggerHandler.bypass(Product2Handler.Class.getName()); |
| | | Oly_TriggerHandler.bypass(ContactTriggerHandler.Class.getName()); |
| | | |
| | | Account company = new Account(); |
| | | company.RecordTypeId = rectCo[0].Id; |
| | | company.Name = 'TestCompany'; |
| | | upsert company; |
| | | Account section = new Account(); |
| | | section.RecordTypeId = rectSct[0].Id; |
| | | section.Name = '*'; |
| | | section.Department_Class_Label__c = 'æ¶åç§'; |
| | | section.ParentId = company.Id; |
| | | section.Hospital_Department_Class__c = company.Id; |
| | | upsert section; |
| | | Account depart = new Account(); |
| | | depart.RecordTypeId = rectDpt[0].Id; |
| | | depart.Name = '*'; |
| | | depart.Department_Name__c = 'TestDepart'; |
| | | depart.ParentId = section.Id; |
| | | depart.Department_Class__c = section.Id; |
| | | depart.Hospital__c = company.Id; |
| | | upsert depart; |
| | | // ç |
| | | Address_Level__c al = new Address_Level__c(); |
| | | al.Name = 'æ±äº¬'; |
| | | al.Level1_Code__c = 'CN-99'; |
| | | al.Level1_Sys_No__c = '999999'; |
| | | insert al; |
| | | // å¸ |
| | | Address_Level2__c al2 = new Address_Level2__c(); |
| | | al2.Level1_Code__c = 'CN-99'; |
| | | al2.Level1_Sys_No__c = '999999'; |
| | | al2.Level1_Name__c = 'æ±äº¬'; |
| | | al2.Name = 'æ¸è°·åº'; |
| | | al2.Level2_Code__c = 'CN-9999'; |
| | | al2.Level2_Sys_No__c = '9999999'; |
| | | al2.Address_Level__c = al.id; |
| | | insert al2; |
| | | // ç
é¢ãä½ã |
| | | Account hospital = new Account(); |
| | | String rtId = [SELECT ID FROM RecordType WHERE DeveloperName = 'HP'].Id; |
| | | hospital.recordtypeId = rtId; |
| | | hospital.Name = 'test hospital'; |
| | | hospital.Is_Active__c = 'æå¹'; |
| | | hospital.Attribute_Type__c = 'å«çé¨'; |
| | | hospital.Speciality_Type__c = '综åå»é¢'; |
| | | hospital.Grade__c = 'ä¸çº§'; |
| | | hospital.OCM_Category__c = 'SLTV'; |
| | | hospital.Is_Medical__c = 'å»çæºæ'; |
| | | hospital.State_Master__c = al.id; |
| | | hospital.City_Master__c = al2.id; |
| | | hospital.Town__c = 'ä¸äº¬'; |
| | | insert hospital; |
| | | Account[] strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_OTH']; |
| | | // 診çç§ãä½ã |
| | | Account dep = new Account(); |
| | | String rtId1 = [SELECT ID FROM RecordType WHERE DeveloperName = 'Department_OTH'].Id; |
| | | dep.recordtypeId = rtId1; |
| | | dep.Name = 'test dep1'; |
| | | dep.AgentCode_Ext__c = '9999999'; |
| | | 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; |
| | | |
| | | OPDPlan__c opd = new OPDPlan__c(); |
| | | opd.Status__c = '计åä¸'; |
| | | opd.OPDPlan_ImplementDate__c = Date.today().addDays(5); |
| | | opd.NoOpp_Reason__c = 'HCP对åº'; |
| | | opd.OPDType__c = 'ç§å®¤'; |
| | | |
| | | insert opd; |
| | | |
| | | |
| | | Rental_Apply__c rap = new Rental_Apply__c(); |
| | | rap.Name = 'testra'; |
| | | rap.Product_category__c = 'GI'; |
| | | rap.Hospital__c = company.Id; |
| | | rap.Strategic_dept__c = section .Id; |
| | | rap.Account__c = depart.Id; |
| | | rap.Hospital__c = hospital.Id; |
| | | rap.Strategic_dept__c = strategicDep[0].Id; |
| | | rap.Account__c = dep.Id; |
| | | rap.demo_purpose2__c = 'è¯ç¨ï¼æ 询价ï¼'; |
| | | rap.Request_shipping_day__c = Date.toDay(); |
| | | rap.Request_return_day__c = Date.toDay(); |
| | | rap.OPDPlan__c = opd.id; |
| | | rap.Demo_purpose1__c ='产åè¯ç¨'; |
| | | rap.direct_send__c = 'å»çæºæ'; |
| | | rap.Hope_Lonaer_date_Num__c = 16; |
| | | rap.OwnerId = getUser().Id; |
| | | rap.Loaner_received_staff__c = 'çäº'; |
| | | rap.Loaner_received_staff_phone__c = '110'; |
| | | rap.direct_shippment_address__c = 'å京å¸'; |
| | | rap.Phone_number__c = '1234567890'; |
| | | |
| | | insert rap; |
| | | |
| | |
| | | insert att; |
| | | System.Test.stopTest(); |
| | | |
| | | }*/ |
| | | |
| | | // 20230206 lt start |
| | | @isTest |
| | | static void test_method_9() { |
| | | //æ°å»ºç |
| | | Address_Level__c al = new Address_Level__c(); |
| | | al.Name = 'æ±äº¬'; |
| | | al.Level1_Code__c = 'CN-99'; |
| | | al.Level1_Sys_No__c = '999999'; |
| | | insert al; |
| | | |
| | | // ç
é¢ãä½ã |
| | | Account hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | | hospital.Name = 'test hospital'; |
| | | hospital.Is_Active__c = 'èæ¡ä¸'; |
| | | hospital.Attribute_Type__c = 'å«çé¨'; |
| | | hospital.Speciality_Type__c = '综åå»é¢'; |
| | | hospital.Grade__c = 'ä¸çº§'; |
| | | hospital.OCM_Category__c = 'SLTV'; |
| | | hospital.Is_Medical__c = 'å»çæºæ'; |
| | | hospital.State_Master__c = al.id; |
| | | // hospital.City_Master__c = al2.id; |
| | | hospital.Town__c = 'ä¸äº¬'; |
| | | insert hospital; |
| | | |
| | | RecordType rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'Hp']; |
| | | |
| | | Account acc = new Account(); |
| | | acc.RecordTypeId = rectCo.Id; |
| | | acc.Name = 'HP test1'; |
| | | acc.Is_Active__c = 'æå¹'; |
| | | insert acc; |
| | | |
| | | //æ°å»º 客æ·åæ´ç³è¯· |
| | | Account_Delay_Apply__c ada = new Account_Delay_Apply__c(); |
| | | ada.Hospital__c = acc.Id; |
| | | ada.ChangeReason__c = 'å°åé误'; |
| | | ada.State_Master__c = al.Id; |
| | | insert ada; |
| | | |
| | | System.Test.startTest(); |
| | | |
| | | Attachment att = new Attachment( |
| | | Name = 'test', |
| | | ParentId = hospital.Id, |
| | | Body = EncodingUtil.base64Decode('test') |
| | | ); |
| | | insert att; |
| | | att.Name = 'test01'; |
| | | update att; |
| | | |
| | | Attachment att1 = new Attachment( |
| | | Name = '2test', |
| | | ParentId = ada.Id, |
| | | Body = EncodingUtil.base64Decode('test') |
| | | ); |
| | | insert att1; |
| | | att1.Name = '2test01'; |
| | | update att1; |
| | | System.Test.stopTest(); |
| | | |
| | | } |
| | | // 20230206 lt end |
| | | |
| | | private static User getUser() { |
| | | String timenow = Datetime.now().format('yyyyMMddHHmmss'); |
| | |
| | | message.setUseSignature(false); |
| | | addMessage(message); |
| | | } |
| | | |
| | | //20230203 lt 计åçä½ä¸ä¼å ä¸å°æ¶ä¸¤æ¬¡ start |
| | | public Class ScBean { |
| | | public String scName; |
| | | public String scTime; |
| | | } |
| | | |
| | | public static ScBean setSc1(String baseName, Integer minhour, Integer maxhour, Integer minMin, String spbefore, String spafter) { |
| | | Datetime dt = Datetime.now(); |
| | | Integer year = Integer.valueOf(dt.format('yyyy'));//2021-12-29 you YYYY--->yyyy æ¯å 为æåä¸å¨è·¨å¹´äº |
| | | Integer month = Integer.valueOf(dt.format('MM')); |
| | | Integer day = Integer.valueOf(dt.format('dd')); |
| | | Integer hour = Integer.valueOf(dt.format('HH')); |
| | | Integer min = Integer.valueOf(dt.format('mm')); |
| | | ScBean b = new ScBean(); |
| | | if (hour == maxhour && min >= (minMin + 30)) { |
| | | b.scName = baseName + '001'; |
| | | if (spafter != null && String.isNotBlank(spafter)) { |
| | | b.scName = baseName + '005'; |
| | | b.scTime = spafter + ' ' + day + ' ' + month + ' ? ' + year; |
| | | // system.schedule(sJobame,spafter + ' ' + day + ' ' + month + ' ? ' + year, new AgencyShareUpdateBatchSchedule()); |
| | | return b; |
| | | } |
| | | else { |
| | | dt = Datetime.now().addDays(1); |
| | | year = Integer.valueOf(dt.format('yyyy'));//2021-12-29 you YYYY--->yyyy æ¯å 为æåä¸å¨è·¨å¹´äº |
| | | month = Integer.valueOf(dt.format('MM')); |
| | | day = Integer.valueOf(dt.format('dd')); |
| | | hour = Integer.valueOf(dt.format('HH')); |
| | | min = Integer.valueOf(dt.format('mm')); |
| | | if (spbefore != null && String.isNotBlank(spbefore)) { |
| | | b.scName = baseName + '006'; |
| | | b.scTime = spbefore + ' ' + day + ' ' + month + ' ? ' + year; |
| | | } |
| | | else { |
| | | b.scTime = '0 ' + minMin + ' ' + minhour + ' ' + day + ' ' + month + ' ? ' + year; |
| | | } |
| | | } |
| | | } |
| | | else if (min < minMin) { |
| | | b.scName = baseName + '001'; |
| | | b.scTime = '0 ' + minMin + ' ' + hour + ' ' + day + ' ' + month + ' ? ' + year; |
| | | } |
| | | else if (min < minMin + 30) { |
| | | b.scName = baseName + '002'; |
| | | b.scTime = '0 ' + (minMin + 30) + ' ' + hour + ' ' + day + ' ' + month + ' ? ' + year; |
| | | } |
| | | else { |
| | | b.scName = baseName + '001'; |
| | | b.scTime = '0 ' + minMin + ' ' + (hour + 1) +' ' + day + ' ' + month + ' ? ' + year; |
| | | } |
| | | return b; |
| | | } |
| | | |
| | | public static void removeOtherSc(String likeName, String needName) { |
| | | String likeStr = likeName + '00%'; |
| | | for(CronTrigger ct : [SELECT Id,CronJobDetailId,CronExpression,CronJobDetail.Name |
| | | FROM CronTrigger |
| | | WHERE CronJobDetail.Name Like :likeStr |
| | | AND CronJobDetail.Name != :needName]){ |
| | | System.abortJob(ct.Id); |
| | | } |
| | | } |
| | | //20230203 lt 计åçä½ä¸ä¼å ä¸å°æ¶ä¸¤æ¬¡ end |
| | | } |
| | |
| | | public String conId { get; set; } |
| | | |
| | | public String openLine { get; set; } |
| | | public String accountIdV2{ get; set; } //zhj 2022-02-04 æ°æ¹æ¡æ¹é |
| | | private String accountId; |
| | | private String nowValue; |
| | | |
| | |
| | | public String awsDataIdArray {set;get;} |
| | | |
| | | public String sfContactId{set;get;} //zhj 2022-12-02 sfId |
| | | public String staticResourceContactV2 {get; set;} //zhj 2022-02-04 æ°æ¹æ¡æ¹é |
| | | |
| | | public CM_SearchContactServiceController() { |
| | | openLine = Apexpages.currentPage().getParameters().get('line'); |
| | | accountId = Apexpages.currentPage().getParameters().get('acc'); |
| | | accountIdV2 = accountId; |
| | | nowValue = Apexpages.currentPage().getParameters().get('now'); |
| | | |
| | | //2022/02/15 å¼ å建 PI PL start |
| | |
| | | contactsInfo = JSON.serialize(awsIdToContactMap); |
| | | contactAWSIds = JSON.serialize(conAWSIds); |
| | | staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact')); |
| | | staticResourceContactV2 = JSON.serialize(PIHelper.getPIIntegrationInfo('ContactV2')); //zhj 2022-02-04 æ°æ¹æ¡æ¹é |
| | | //2022/02/15 å¼ å建 PI PL end |
| | | } |
| | | |
| | |
| | | con = in_con; |
| | | } |
| | | } |
| | | |
| | | //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-24 start |
| | | @RemoteAction |
| | | public static ResponseV2 searchContactByAccountId(String accountId) { |
| | | System.debug('accountId = ' + accountId); |
| | | ResponseV2 res = new ResponseV2(); |
| | | try{ |
| | | Account account = [select Id,Name from Account where Id = :accountId]; |
| | | List<Contact> contactList = [select id,AWS_Data_Id__c, CManageCode__c,Name from Contact where AccountId = :account.Id]; |
| | | Map<String,String> dataIdManageCodeMap = new Map<String,String>(); |
| | | for(Contact contact : contactList){ |
| | | dataIdManageCodeMap.put(contact.AWS_Data_Id__c,contact.CManageCode__c); |
| | | } |
| | | res.dataIdManageCodeMap = dataIdManageCodeMap; |
| | | res.accountName = account.Name; |
| | | res.contactList = contactList; |
| | | |
| | | Map<String,String> accMap= new Map<String,String>(); |
| | | List<Account> accList=[select ID,Is_Active__c,Is_Active_Formula__c from Account where ID =:accountId]; |
| | | if(accList.size()>0){ |
| | | for(Account acc:accList){ |
| | | if (String.isNotBlank(acc.Is_Active__c)){ |
| | | String subId = acc.Id; |
| | | accMap.put(subId.substring(0,15), acc.Is_Active__c); |
| | | continue; |
| | | } |
| | | if (String.isNotBlank(acc.Is_Active_Formula__c)){ |
| | | String subId = acc.Id; |
| | | accMap.put(subId.substring(0,15), acc.Is_Active_Formula__c); |
| | | } |
| | | } |
| | | } |
| | | System.debug('accMap= ' + accMap); |
| | | res.isNameMobileVerif = true; |
| | | res.isMobileVerif = false; |
| | | res.status = 'success'; |
| | | return res; |
| | | }catch(Exception e){ |
| | | res.message = e.getMessage() + ''; |
| | | res.status = 'fail'; |
| | | return res; |
| | | } |
| | | } |
| | | |
| | | public class ResponseV2{ |
| | | public List<Contact> contactList{set;get;} |
| | | public String accountName{set;get;} |
| | | public Map<String,String> dataIdManageCodeMap{set;get;} |
| | | public Boolean isMobileVerif; |
| | | public Boolean isNameMobileVerif; |
| | | public String message{set;get;} |
| | | public String status{set;get;} |
| | | } |
| | | //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-24 end |
| | | } |
| | |
| | | private class CM_SearchContactServiceControllerTest { |
| | | @TestSetup |
| | | static void makeData(){ |
| | | TestDataUtility.CreatePIPolicyConfigurations(new String[]{'Contact','Agency_Contact__c'}); |
| | | TestDataUtility.CreatePIPolicyConfigurations(new String[]{'Contact','Agency_Contact__c','contactV2'}); |
| | | } |
| | | |
| | | @isTest static void test_method_one() { |
| | |
| | | cmsc.saveNew(); |
| | | |
| | | cmsc.editClear(); |
| | | CM_SearchContactServiceController.searchContactByAccountId(depart1.Id); |
| | | } |
| | | |
| | | } |
| | |
| | | List<OPDPlan__c> QX_OPDPlan = new List<OPDPlan__c>(); |
| | | //æ¥è¯¢å»¶æå¦ä¼çOPDPlan |
| | | List<OPDPlan__c> YQ_OPDPlan = new List<OPDPlan__c>(); |
| | | Set<ID> campaignIdSet = new Set<ID>(); // 20230120 ljh DB202301265636 add |
| | | //SWAG-BVGAGD 20201119 you |
| | | List<OPDPlan__c> oPDPlans = new List<OPDPlan__c>(); |
| | | // éè¦æ´æ°çOPD计åçIDéå |
| | |
| | | |
| | | if (QX_List.size() > 0 && QX_List != null) { |
| | | insert QX_List; |
| | | // 20230120 ljh DB202301265636 start |
| | | List<Rental_Apply_Equipment_Set__c> raesList = [select Id,Rental_End_Date__c from Rental_Apply_Equipment_Set__c where Rental_End_Date__c != null |
| | | AND Shippment_loaner_time2__c != null |
| | | AND Rental_Apply__r.RA_Status__c != 'å®äº' |
| | | AND Rental_Apply__r.RA_Status__c != 'åæ¶' |
| | | AND Rental_Apply__r.Campaign__c = :campaignIdSet ]; |
| | | if (null != raesList && raesList.size() > 0) { |
| | | for (Rental_Apply_Equipment_Set__c raes : raesList) { |
| | | raes.Rental_End_Date__c = Date.today().addDays(5); |
| | | } |
| | | update raesList; |
| | | } |
| | | // 20230120 ljh DB202301265636 end |
| | | } |
| | | // add by gzw OPDPlan__c åç¬å¾ªç¯ï¼å¦åOPDPlan_ImplementDate__c ä¼è¿åï¼æ¥é start |
| | | if (targetIDSet.size() > 0) { |
| | |
| | | // SWAG-BUF6J5 20201111 you start |
| | | if (cancelIdSet.size() > 0) {//æ¥è¯¢opd计åä¸å¾ææå¤åååºç³è¯· æ´æ° ç¶æ |
| | | List<Rental_Apply__c> Rentals = new List<Rental_Apply__c>(); |
| | | // 20230222 ljh DB202301265636 start |
| | | // 20230202 ljh DB202301265636 start |
| | | // List<Rental_Apply__c> RentalList = [select id,Cancel_Reason__c , Loaner_cancel_request__c,OPDPlan__c from Rental_Apply__c where OPDPlan__c in: cancelIdSet and Status__c <> 'åæ¶']; |
| | | List<Rental_Apply__c> RentalList = [select id,Cancel_Reason__c , Loaner_cancel_request__c,OPDPlan__c from Rental_Apply__c where OPDPlan__c in: cancelIdSet and Status__c <> 'åæ¶']; |
| | | List<Rental_Apply__c> RentalList = [select id,Cancel_Reason__c , Loaner_cancel_request__c,OPDPlan__c from Rental_Apply__c where OPDPlan__c in: cancelIdSet and Status__c <> 'åæ¶' AND Shipment_request_Cnt__c = 0]; |
| | | // 20230202 ljh DB202301265636 end |
| | | // å¦ä¼åæ¶æ¹åçæ¶å åé®ä»¶ ä¸ä¸çº¿äº |
| | | // List<Rental_Apply__c> RentalList = new List<Rental_Apply__c>(); |
| | | // List<Rental_Apply__c> RentalCancleAlertList = new List<Rental_Apply__c>(); |
| | | // List<Rental_Apply__c> RentalListTemp = [select id,Cancel_Reason__c , Loaner_cancel_request__c,OPDPlan__c,Shipment_request_Cnt__c from Rental_Apply__c where OPDPlan__c in: cancelIdSet and Status__c <> 'åæ¶']; |
| | | // for(Rental_Apply__c ra:RentalListTemp){ |
| | | // if(ra.Shipment_request_Cnt__c == 0){ |
| | | // RentalList.add(ra); |
| | | // }else{ |
| | | // ra.CancelDay__c = Date.today(); |
| | | // RentalCancleAlertList.add(ra); |
| | | // } |
| | | // } |
| | | // 20230222 ljh DB202301265636 end |
| | | Set<String> cancelIdSet1 = new Set<String>(); //æå¨è°åå®¡æ¹ |
| | | SS_Batch_Column_Mapping__c mpdMapping = SS_Batch_Column_Mapping__c.getValues('Rental_Apply_OPD_Cancle'); |
| | | //2021/02/07 liying SWAG-BXVDPJ start |
| | |
| | | if(Rentals.size()>0){ |
| | | update Rentals; |
| | | } |
| | | // 20230222 ljh DB202301265636 start |
| | | // å¦ä¼åæ¶æ¹åçæ¶å åé®ä»¶ ä¸ä¸çº¿äº |
| | | // if(RentalCancleAlertList.size() > 0 ){ |
| | | // update RentalCancleAlertList; |
| | | // } |
| | | // 20230222 ljh DB202301265636 end |
| | | } |
| | | // SWAG-BUF6J5 20201111 you end |
| | | //2021-08-11 mzy SWAG-C5RAZV äºä»¶ââ计å å»¶æ è°æ¥ start |
| | |
| | | ActualVisitTimeThird__c, ResponseResultDesc__c, ProcessResult__c, Status__c, |
| | | Department__r.Name, Department__r.Id,ActualVisitDateThird__c, |
| | | EndTimeFirst__c,RepairsReportDate__c,ActualVisitDateFirst__c,ActualVisitDateSecon__c, |
| | | // 2023-3-6 zyh add start |
| | | DateReceiptQuestions__c,IfDeadHurt__c,ProblemOccurred__c,ProblemOccurredSelect__c,ReportAdverseEvents__c,WhatProject__c,OperationOrExaminationName__c,BreakORFallOff__c,UseFailProductFinish__c,SupportingProducts__c,AfterFailureInformation__c,Delay15Min__c,InformationFrom__c,FailureQInHospital__c,DelayReportReason__c,IsProductFaultRelated__c,IsOts__c,SenderOrgCode__c,SenderCompany__c,SenderName__c,SenderMobilePhone__c,SenderAddress__c,RecepientCompany__c,RecepientName__c,RecepientMobilePhone__c,RecepientAddress__c,ReturnWayType__c,OrderNumber__c,FailureReason__c,LogisticsSendDate__c,Item0010__c,Item0020__c,Item0030__c,Item0040__c,Item0050__c, |
| | | // 2023-3-6 zyh add end |
| | | OwnerId,Owner.Name |
| | | FROM RepairSubOrder__c |
| | | WHERE Id =: RepairSubOrderId |
| | |
| | | //XLIU-CJM7Z9 ãå§æãæ°å»ºä¿®çæç¤ºä¿¡æ¯ï¼å产åéä¿®ç对象åï¼LY 20221110 start |
| | | String Excwork_location_Id = '';//è·³è¿ç»´ä¿®ä¸å¿ |
| | | //XLIU-CJM7Z9 ãå§æãæ°å»ºä¿®çæç¤ºä¿¡æ¯ï¼å产åéä¿®ç对象åï¼LY 20221110 end |
| | | // 2023-3-6 zyh add start |
| | | // String dateReceiptQuestions;å·²åå¨ |
| | | String SupportingProducts = '00N10000008rsW4';//é
å¥ä½¿ç¨äº§åSupportingProducts__c |
| | | String IfDeadHurt = '00N10000008rsW7';//æ¯å¦ææ»äº¡ãä¼¤å®³ãææ |
| | | String ProblemOccurred = '00N10000008rsVv';//é®é¢åçæ¶é´æ
åµ |
| | | String ProblemOccurredSelect = '00N10000009hsvI';//é®é¢åçæ¶é´æ
åµ å
¶å® |
| | | String ReportAdverseEvents = '00N10000008rsW2';//å»é¢ææ²¡æåæ¿åºæºå
³æ¥åä¸è¯äºä»¶æçä¼¼ä¸è¯äºä»¶ |
| | | String WhatProject = '00N10000008rsW6';//åçæ¯åªä¸ªé¡¹ç® |
| | | String OperationOrExaminationName = '00N10000008rsVk';//ææ¯/æ£æ¥åç§° |
| | | String BreakORFallOff = '00N10000008rsVN';//æ¯å¦æåçæè£æè±è½ |
| | | String UseFailProductFinish = '00N10000008rsW5';//æ¯å¦ç¨è¯¥äº§åå®æäºææ¯/æ£æ¥ |
| | | // String SupportingProducts = '00N10000008rsW4';//é
å¥ä½¿ç¨äº§å |
| | | String AfterFailureInformation = '00N10000008rsVL';//åç°æ
éåï¼å»é¢å¯¹æ£è
çå¤çæ
åµ |
| | | String Delay15Min = '00N10000008rsVR';//åç°æ
éç°è±¡åï¼æå»¶è¯¯15åé以ä¸çææ¯å®æ½çæ
åµåçå |
| | | String InformationFrom = '00N10000008rsVZ';//ä¿¡æ¯æ¯ä»å»é¢çè°é£éå¾å°ç |
| | | String FailureQInHospital = '00N10000008rsVT';//å¨å»é¢ï¼æ
éåççé¢çæ¯å¤å° |
| | | String DelayReportReason = '00N10000008rsVS';//è¶
æ¶æ¥åçç± |
| | | String IsProductFaultRelated = '00N10000008rsVw';//æ¯å¦åè¿æ¬¡ç产åæ
éæå
³ |
| | | String IsOts = ''; |
| | | String SenderOrgCode = ''; |
| | | String SenderCompany = ''; |
| | | String SenderName = ''; |
| | | String SenderMobilePhone = ''; |
| | | String SenderAddress = ''; |
| | | String RecepientCompany = ''; |
| | | String RecepientName = ''; |
| | | String RecepientMobilePhone = ''; |
| | | String RecepientAddress = ''; |
| | | String ReturnWayType = ''; |
| | | String OrderNumber = ''; |
| | | String FailureReason = ''; |
| | | String LogisticsSendDate = ''; |
| | | String Item0010 = ''; |
| | | String Item0020 = ''; |
| | | String Item0030 = ''; |
| | | String Item0040 = ''; |
| | | String Item0050 = ''; |
| | | // 2023-3-6 zyh add end |
| | | String engineerSendDate_Id= '';//å·¥ç¨å¸ä¿®çåå¯éæ¥ |
| | | // if (NFMUtil.isSandbox()) { //æµè¯ç¯å¢ |
| | | // RepairApplicant_Id = '00N1m0000054ufW'; //æ¥ä¿®äºº |
| | |
| | | |
| | | url += joint_3 + Incharge_Staff_Id + joint_1 + repairSubOrder.Owner.Name; |
| | | url += joint_3 + Incharge_Staff_Id + joint_2 + repairSubOrder.OwnerId; |
| | | // 2023-3-7 zyh add start |
| | | if(repairSubOrder.SupportingProducts__c != null){ |
| | | url += joint_3 + SupportingProducts + joint_2 + repairSubOrder.SupportingProducts__c;//é
å¥ä½¿ç¨äº§å |
| | | } |
| | | if(repairSubOrder.IfDeadHurt__c != null){ |
| | | url += joint_3 + IfDeadHurt + joint_2 + repairSubOrder.IfDeadHurt__c;//æ¯å¦ææ»äº¡ãä¼¤å®³ãææ |
| | | } |
| | | if(repairSubOrder.ProblemOccurred__c != null){ |
| | | url += joint_3 + ProblemOccurred + joint_2 + repairSubOrder.ProblemOccurred__c;//é®é¢åçæ¶é´æ
åµ |
| | | } |
| | | if(repairSubOrder.ProblemOccurredSelect__c != null){ |
| | | url += joint_3 + ProblemOccurredSelect + joint_2 + repairSubOrder.ProblemOccurredSelect__c;//é®é¢åçæ¶é´æ
åµ å
¶å® |
| | | } |
| | | if(repairSubOrder.ReportAdverseEvents__c != null){ |
| | | url += joint_3 + ReportAdverseEvents + joint_2 + repairSubOrder.ReportAdverseEvents__c;//å»é¢ææ²¡æåæ¿åºæºå
³æ¥åä¸è¯äºä»¶æçä¼¼ä¸è¯äºä»¶ |
| | | } |
| | | if(repairSubOrder.WhatProject__c != null){ |
| | | url += joint_3 + WhatProject + joint_2 + repairSubOrder.WhatProject__c;//åçæ¯åªä¸ªé¡¹ç® |
| | | } |
| | | if(repairSubOrder.OperationOrExaminationName__c != null){ |
| | | url += joint_3 + OperationOrExaminationName + joint_2 + repairSubOrder.OperationOrExaminationName__c;//ææ¯/æ£æ¥åç§° |
| | | } |
| | | if(repairSubOrder.BreakORFallOff__c != null){ |
| | | url += joint_3 + BreakORFallOff + joint_2 + repairSubOrder.BreakORFallOff__c;//æ¯å¦æåçæè£æè±è½ |
| | | } |
| | | if(repairSubOrder.UseFailProductFinish__c != null){ |
| | | url += joint_3 + UseFailProductFinish + joint_2 + repairSubOrder.UseFailProductFinish__c;//æ¯å¦ç¨è¯¥äº§åå®æäºææ¯/æ£æ¥ |
| | | } |
| | | if(repairSubOrder.AfterFailureInformation__c != null){ |
| | | url += joint_3 + AfterFailureInformation + joint_2 + repairSubOrder.AfterFailureInformation__c;//åç°æ
éåï¼å»é¢å¯¹æ£è
çå¤çæ
åµ |
| | | } |
| | | if(repairSubOrder.Delay15Min__c != null){ |
| | | url += joint_3 + Delay15Min + joint_2 + repairSubOrder.Delay15Min__c;//åç°æ
éç°è±¡åï¼æå»¶è¯¯15åé以ä¸çææ¯å®æ½çæ
åµåçå |
| | | } |
| | | if(repairSubOrder.InformationFrom__c != null){ |
| | | url += joint_3 + InformationFrom + joint_2 + repairSubOrder.InformationFrom__c;//ä¿¡æ¯æ¯ä»å»é¢çè°é£éå¾å°ç |
| | | } |
| | | if(repairSubOrder.FailureQInHospital__c != null){ |
| | | url += joint_3 + FailureQInHospital + joint_2 + repairSubOrder.FailureQInHospital__c;//å¨å»é¢ï¼æ
éåççé¢çæ¯å¤å° |
| | | } |
| | | if(repairSubOrder.DelayReportReason__c != null){ |
| | | url += joint_3 + DelayReportReason + joint_2 + repairSubOrder.DelayReportReason__c;//è¶
æ¶æ¥åçç± |
| | | } |
| | | if(repairSubOrder.IsProductFaultRelated__c != null){ |
| | | url += joint_3 + IsProductFaultRelated + joint_2 + repairSubOrder.IsProductFaultRelated__c;//æ¯å¦åè¿æ¬¡ç产åæ
éæå
³ |
| | | } |
| | | // 2023-3-7 zyh add start |
| | | } else if ('QIS'.equals(dataType)) { |
| | | |
| | | String Delivered_Product_Id = '00N10000002FHFK'; //设å¤åå· |
| | |
| | | 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]); |
| | | // System.debug('inputValues[0]===============>'+ inputValues[0]); |
| | | // System.debug('inputValues[1]===============>'+ inputValues[1]); |
| | | // System.debug('inputValues[2]===============>'+ inputValues[2]); |
| | | // System.debug('inputValues[3]===============>'+ inputValues[3]); |
| | | // //SWAG-CEW85A ãå§æãæ¶èå&DAMSç³»ç»ç»éå人å管çââä¿¡æ¯å®åï¼fy start |
| | | // System.debug('inputValues[4]===============>'+ inputValues[4]); |
| | | // System.debug('inputValues[5]===============>'+ inputValues[5]); |
| | | // System.debug('inputValues[6]===============>'+ inputValues[6]); |
| | | // System.debug('inputValues[7]===============>'+ inputValues[7]); |
| | | // System.debug('inputValues[8]===============>'+ inputValues[8]); |
| | | // System.debug('inputValues[9]===============>'+ inputValues[9]); |
| | | // System.debug('inputValues[10]===============>'+ inputValues[10]); |
| | | // System.debug('inputValues[11]===============>'+ inputValues[11]); |
| | | // System.debug('inputValues[12]===============>'+ inputValues[12]); |
| | | // System.debug('inputValues[13]===============>'+ inputValues[13]); |
| | | // System.debug('inputValues[14]===============>'+ inputValues[14]); |
| | | // System.debug('inputValues[15]===============>'+ inputValues[15]); |
| | | // System.debug('inputValues[16]===============>'+ inputValues[16]); |
| | | //SWAG-CEW85A ãå§æãæ¶èå&DAMSç³»ç»ç»éå人å管çââä¿¡æ¯å®åï¼fy end |
| | | |
| | | } |
| | |
| | | Map<Id,String> ManagementCodeMap = new Map<Id,String>(); |
| | | List<Id> AccountIdList =new List<Id>(); |
| | | //SWAG-CEW85A ãå§æãæ¶èå&DAMSç³»ç»ç»éå人å管çââä¿¡æ¯å®åï¼fy end |
| | | System.debug('managementCodeList===============>'+ managementCodeList); |
| | | System.debug('CustomerNameList===============>'+ CustomerNameList); |
| | | List<Account> accountList = [select id, Name,Management_Code__c from Account where Management_Code__c in: managementCodeList and Name in:CustomerNameList ]; |
| | | System.debug('iaccountList===============>'+ accountList); |
| | | for(Account ac : accountList){ |
| | | accountIdMap.put(ac.Management_Code__c,ac); |
| | | //SWAG-CEW85A ãå§æãæ¶èå&DAMSç³»ç»ç»éå人å管çââä¿¡æ¯å®åï¼fy start |
| | |
| | | } |
| | | //SWAG-CEW85A ãå§æãæ¶èå&DAMSç³»ç»ç»éå人å管çââä¿¡æ¯å®åï¼fy start |
| | | //æ¥è¯¢å®¢æ·äººåæ¯å¦ææ°æ® |
| | | //DB202301262139 SFDCç»éå人å导å
¥åè½æ¹è¿ start 0228 |
| | | // Map<String,Contact> contactIdMapName = new Map<String,Contact>(); |
| | | List<Contact> contactList = [select id, CManageCode__c,AccountId from Contact where AccountId in: AccountIdList and CManageCode__c in:CManageCodeList ]; |
| | | // List<Contact> contactList = [select id, CManageCode__c,AccountId,Name from Contact where AccountId in: AccountIdList ]; |
| | | //DB202301262139 SFDCç»éå人å导å
¥åè½æ¹è¿ end |
| | | for(Contact cc : contactList){ |
| | | //DB202301262139 SFDCç»éå人å导å
¥åè½æ¹è¿ start 0228 |
| | | // String namekey = cc.Name.replace(' ', ''); |
| | | // String contactKey2=ManagementCodeMap.get(cc.AccountId)+'_'+namekey; |
| | | // contactIdMapName.put(contactKey2,cc); |
| | | String contactKey=ManagementCodeMap.get(cc.AccountId)+'_'+cc.CManageCode__c; |
| | | contactIdMap.put(contactKey,cc); |
| | | //DB202301262139 SFDCç»éå人å导å
¥åè½æ¹è¿ end |
| | | } |
| | | //DB202301262139 SFDCç»éå人å导å
¥åè½æ¹è¿ start 0228 |
| | | // System.debug('contactIdMapName++'+contactIdMapName); |
| | | //DB202301262139 SFDCç»éå人å导å
¥åè½æ¹è¿ start 0228 |
| | | List<Contact> cnupdateList = new List<Contact>(); |
| | | //SWAG-CEW85A ãå§æãæ¶èå&DAMSç³»ç»ç»éå人å管çââä¿¡æ¯å®åï¼fy end |
| | | List<Contact> cnList = new List<Contact>(); |
| | |
| | | //SWAG-CEW85A ãå§æãæ¶èå&DAMSç³»ç»ç»éå人å管çââä¿¡æ¯å®åï¼fy start |
| | | System.debug('001+'+lineList[3]+'_'+lineList[6]); |
| | | System.debug('002+'+contactIdMap.get(lineList[3]+'_'+lineList[6])); |
| | | //DB202301262139 SFDCç»éå人å导å
¥åè½æ¹è¿ start 0228 |
| | | // System.debug('003+'+lineList[3]+'_'+lineList[0]); |
| | | // System.debug('004+'+contactIdMapName.get(lineList[3]+'_'+lineList[0])); |
| | | //DB202301262139 SFDCç»éå人å导å
¥åè½æ¹è¿ start 0228 |
| | | //DB202301262139 SFDCç»éå人å导å
¥åè½æ¹è¿ start |
| | | if(errorflag1){ |
| | | errorMage += 'error: 第' + lineNumber + 'è¡ ï¼'+lineList[0]+'ï¼ çæ°æ®'+errorMageHang; |
| | |
| | | con.Id=contactIdMap.get(lineList[3]+'_'+lineList[6]).Id; |
| | | cnupdateList.add(con); |
| | | }else { |
| | | //DB202301262139 SFDCç»éå人å导å
¥åè½æ¹è¿ start 0228 |
| | | // if(!contactIdMapName.containsKey(lineList[3]+'_'+lineList[0])){ |
| | | // cnList.add(con); |
| | | // } |
| | | cnList.add(con); |
| | | //DB202301262139 SFDCç»éå人å导å
¥åè½æ¹è¿ end |
| | | } |
| | | //DB202301262139 SFDCç»éå人å导å
¥åè½æ¹è¿ start |
| | | } |
| | |
| | | public static boolean VerifyCertificationLevel(String data) { |
| | | //DB202301262139 SFDCç»éå人å导å
¥åè½æ¹è¿ start |
| | | // if(data=='A'||data=='B'||data==''){ |
| | | if(data=='A级(失æ)'||data=='B级'||data=='B级(失æ)'||data=='B级æªéè¿'||data=='å级'||data=='å级æªéè¿'||data=='æªè®¤è¯'||data==''){ |
| | | if(data=='A级'||data=='A级æªéè¿'||data=='A级æªéè¿ï¼å¤±æï¼'||data=='A级(失æ)'||data=='B级'||data=='B级(失æ)'||data=='B级æªéè¿'||data=='å级'||data=='å级æªéè¿'||data=='æªè®¤è¯'||data==''){ |
| | | //DB202301262139 SFDCç»éå人å导å
¥åè½æ¹è¿ end |
| | | return true; |
| | | } |
| | |
| | | insert account1; |
| | | } |
| | | @isTest public static void selectProductCcategoryTest() { |
| | | testInit(); |
| | | Test.startTest(); |
| | | testInit(); |
| | | 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); |
| | | String reports2 = DealerPersonnelController.processData('"å§å,ææº,çµåé®ä»¶,ç»éåç¼ç ,客æ·å,ç»éåç¨æ·,人å管çç¼ç ,ç»éåä¸åç±»å,å
¥è年份,GIR认è¯çº§å«,GIRè®¤è¯æ¶é´,SP认è¯çº§å«,SPè®¤è¯æ¶é´,ET认è¯çº§å«,ETè®¤è¯æ¶é´,ENG认è¯çº§å«,ENGè®¤è¯æ¶é´\r\nå°ç,18801332211,123@qq.com,737011,test1å»é¢,TRUE,,SPä¸å,2021/1/7,A级,2022/1/7,A级,2019/1/7,A级,2021/2/7,B级,2020/1/7\r\n','',null); |
| | | List<Contact> data = new List<Contact>(); |
| | | DealerPersonnelController.updateContact(data); |
| | | Boolean a= DealerPersonnelController.VerificationDateType(''); |
| | | Date b = DealerPersonnelController.ConversionDateType(''); |
| | | Test.stopTest(); |
| | | } |
| | | @isTest public static void selectProductCcategoryTest01() { |
| | |
| | | // æå®åé
æ°æ®æå®ç»å¯¹è±¡æçæ
åµ |
| | | targetId = ApexPages.currentPage().getParameters().get('targetId'); |
| | | if(String.isNotEmpty(recordId)){ |
| | | raesd = [SELECT Id,Fixture_Model_No_text__c,Asset__c,Rental_Apply__r.Name,Rental_Apply_Equipment_Set__r.Name, |
| | | List<Rental_Apply_Equipment_Set_Detail__c> TempList = [SELECT Id,Fixture_Model_No_text__c,Asset__c,Rental_Apply__r.Name,Rental_Apply_Equipment_Set__r.Name, |
| | | Queue_Day__c,Queue_Number__c,Rental_Apply__r.WorkPlace__c,Rental_Apply__r.Person_In_Charge__r.Name, |
| | | Rental_Apply__r.demo_purpose2__c,Queue_Conment__c,Equipment_Type_text__c,Salesdepartment_before__c, |
| | | Internal_asset_location_before__c,jumpReason__c,Queue_User__r.Name,Rental_Apply__r.Hospital__r.Name,Rental_Apply__c, |
| | | Rental_Apply__r.Campaign__r.Name,Externalkey__c,Rental_Apply__r.Internal_asset_location_F__c,QuenType__c |
| | | Rental_Apply__r.Campaign__r.Name,Externalkey__c,Rental_Apply__r.Internal_asset_location_F__c,QuenType__c,Rental_Apply_Object__r.Name ,Rental_Apply_Object__r.WorkPlace__c ,Rental_Apply_Object__r.Person_In_Charge__r.Name |
| | | ,Rental_Apply_Object__r.demo_purpose2__c,Rental_Apply_Object__r.Id |
| | | FROM Rental_Apply_Equipment_Set_Detail__c |
| | | WHERE Is_Body__c=true |
| | | AND Rental_Apply_Equipment_Set__c=:recordId limit 1]; |
| | | raesd = TempList[0]; |
| | | assetId = raesd.Asset__c; |
| | | String soql = null; |
| | | if (String.isNotEmpty(targetId)) { |
| | |
| | | + 'Queue_Day__c,Queue_Number__c,Rental_Apply__r.WorkPlace__c,Rental_Apply__r.Person_In_Charge__r.Name,jumpReason__c,' |
| | | + 'Rental_Apply__r.demo_purpose2__c,Queue_Conment__c,Equipment_Type_text__c,ExternalKey__c,Allow_Adjust_Queue_Flag__c,' |
| | | + 'Queue_User__r.Name,Rental_Apply__r.Hospital__r.Name,Rental_Apply__r.Campaign__r.Name,Salesdepartment_before__c,Internal_asset_location_before__c' |
| | | + ',Rental_Apply_Object__r.Name ,Rental_Apply_Object__r.WorkPlace__c ,Rental_Apply_Object__r.Person_In_Charge__r.Name ,Rental_Apply_Object__r.demo_purpose2__c,Rental_Apply_Object__r.Id' |
| | | + ' FROM Rental_Apply_Equipment_Set_Detail__c' |
| | | + ' WHERE Is_Body__c=true ' |
| | | + ' AND Rental_Apply_Equipment_Set__c =:targetId'; |
| | |
| | | + 'Queue_Day__c,Queue_Number__c,Rental_Apply__r.WorkPlace__c,Rental_Apply__r.Person_In_Charge__r.Name,jumpReason__c,' |
| | | + 'Rental_Apply__r.demo_purpose2__c,Queue_Conment__c,Equipment_Type_text__c,ExternalKey__c,Allow_Adjust_Queue_Flag__c,' |
| | | + 'Queue_User__r.Name,Rental_Apply__r.Hospital__r.Name,Rental_Apply__r.Campaign__r.Name,Salesdepartment_before__c,Internal_asset_location_before__c' |
| | | + ',Rental_Apply_Object__r.Name ,Rental_Apply_Object__r.WorkPlace__c ,Rental_Apply_Object__r.Person_In_Charge__r.Name ,Rental_Apply_Object__r.demo_purpose2__c,Rental_Apply_Object__r.Id' |
| | | + ' FROM Rental_Apply_Equipment_Set_Detail__c' |
| | | + ' WHERE Is_Body__c=true ' |
| | | + ' AND Queue_Number__c > 0' |
| | |
| | | private static void setupTestData(){ |
| | | //åç½®æ°æ® |
| | | System.runAs(new User(Id = Userinfo.getUserId())) { |
| | | Oly_TriggerHandler.bypass(Product2Handler.Class.getName()); |
| | | Oly_TriggerHandler.bypass(ContactTriggerHandler.Class.getName()); |
| | | String flag='NG2'; |
| | | String d1='产åè¯ç¨'; |
| | | String dept='å»çååè¥ä¸æ¬é¨'; |
| | |
| | | /* |
| | | 20230302 ljh æµè¯ç±» ESignFormHandlerTest å¯ä»¥ FrameNumUploadControllerTest ä¹å¯ä»¥ |
| | | */ |
| | | public without sharing class ESignFormHandler extends Oly_TriggerHandler { |
| | | private Map<Id, eSignForm__c> newMap; |
| | | private Map<Id, eSignForm__c> oldMap; |
| | |
| | | } |
| | | protected override void afterInsert() { |
| | | afterExecute(); |
| | | // è¿å£åè¯ start |
| | | // ç¾æ¶åçæåæå
¥è¿å£åè¯å¯¹åºçæ°æ® |
| | | insertFrameNumManage(); |
| | | // è¿å£åè¯ end |
| | | } |
| | | |
| | | protected override void afterUpdate() { |
| | |
| | | update eSignFormEntryList; |
| | | } |
| | | } |
| | | |
| | | private void insertFrameNumManage() { |
| | | Set<String> IdSet = new Set<String>(); |
| | | Map<String,Id> eSignFormMap = new Map<String,Id>(); |
| | | Map<String,String> DNMap = new Map<String,String>(); |
| | | for (eSignForm__c nObj : newList) { |
| | | IdSet.add(nObj.Statu_Achievements_DN__c); |
| | | } |
| | | Map<String,Statu_Achievements_DN_details__c> sandMap = new Map<String,Statu_Achievements_DN_details__c>(); |
| | | Map<String,Statu_Achievements_DN_details__c> UpdateSandMap = new Map<String,Statu_Achievements_DN_details__c>(); |
| | | Map<String,String> UpdateFIdMap = new Map<String,String>(); |
| | | // æ¥è¯¢æç» 卿ºèº«å·ç®¡çä¸ææ²¡ï¼æ²¡æçæ,ææ´æ° ç¾æ¶åãåè´§DNæç»ãä¿æè®¾å¤ |
| | | for(Statu_Achievements_DN_details__c dn:[SELECT Id,SerialNumber__c,asset__c, |
| | | Statu_Achievements_DN__c,SerialNoorLotNo_Raw__c,TracingCode_Raw__c, |
| | | OTCode_Raw__c,asset__r.Name,QTY__c,Statu_Achievements_DN__r.Name |
| | | FROM Statu_Achievements_DN_details__c |
| | | WHERE Statu_Achievements_DN__c =:IdSet ]){ |
| | | sandMap.put(dn.TracingCode_Raw__c,dn); |
| | | DNMap.put(dn.TracingCode_Raw__c,dn.Statu_Achievements_DN__r.Name); |
| | | } |
| | | for(FrameNumManage__c f:[SELECT Id,ManagementCode__c FROM FrameNumManage__c WHERE ManagementCode__c in :sandMap.keySet()]){ |
| | | // æ´æ°æºèº«å·ç®¡ç |
| | | UpdateSandMap.put(f.ManagementCode__c,sandMap.get(f.ManagementCode__c)); |
| | | UpdateFIdMap.put(f.ManagementCode__c, f.Id); |
| | | sandMap.remove(f.ManagementCode__c); |
| | | } |
| | | for(eSignForm__c es: newList){ |
| | | for(String key:DNMap.keySet()){ |
| | | if(DNMap.get(key) == es.DNName__c){ |
| | | eSignFormMap.put(key,es.Id); |
| | | } |
| | | } |
| | | } |
| | | if(sandMap.size() > 0){ |
| | | List<FrameNumManage__c> infnmList = new List<FrameNumManage__c>(); |
| | | for (Statu_Achievements_DN_details__c s:sandMap.values()) { |
| | | FrameNumManage__c temp = new FrameNumManage__c(); |
| | | temp.Name = s.TracingCode_Raw__c; |
| | | temp.ManagementCode__c = s.TracingCode_Raw__c; |
| | | temp.SerialNumberS__c = s.SerialNoorLotNo_Raw__c+'('+s.TracingCode_Raw__c+')'; |
| | | temp.SerialNumber__c = s.SerialNoorLotNo_Raw__c; |
| | | temp.Num__c = s.QTY__c; |
| | | temp.CheckOutNo__c = s.Statu_Achievements_DN__r.Name.subString(2);//åè´§DN çname廿å两ä½ç 00 |
| | | |
| | | temp.Statu_Achievements_DN_details__c = s.Id; |
| | | temp.Asset__c = s.asset__c; |
| | | temp.signInForm__c = eSignFormMap.get(s.TracingCode_Raw__c); |
| | | |
| | | temp.Material__c = s.OTCode_Raw__c; |
| | | temp.MaterialDepict__c = s.asset__r.Name; |
| | | infnmList.add(temp); |
| | | } |
| | | if(infnmList.size() > 0){ |
| | | insert infnmList; |
| | | // Database.executeBatch(new SetFrameNumManageBatch(), 100); |
| | | } |
| | | } |
| | | if(UpdateSandMap.size() > 0){ |
| | | List<FrameNumManage__c> upfnmList = new List<FrameNumManage__c>(); |
| | | for (Statu_Achievements_DN_details__c s:UpdateSandMap.values()) { |
| | | FrameNumManage__c temp = new FrameNumManage__c(); |
| | | temp.id = UpdateFIdMap.get(s.TracingCode_Raw__c); |
| | | temp.Statu_Achievements_DN_details__c = s.Id; |
| | | temp.Asset__c = s.asset__c; |
| | | temp.signInForm__c = eSignFormMap.get(s.TracingCode_Raw__c); |
| | | upfnmList.add(temp); |
| | | } |
| | | update upfnmList; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | } |
| | | // 20230302 ljh add è¿å£åè¯æ°æ® æµè¯ç±» |
| | | // å
³èè¿å£åè¯ï¼é¦å
触å DNDetailsHandler ä¸çæçææ°æ® æé®çæ 大é¨å代ç å¯ä»¥è¦çå° |
| | | static testMethod void testMethod3() { |
| | | StaticParameter.EscapeNFM001AgencyContractTrigger = true; |
| | | StaticParameter.EscapeNFM001Trigger = true; |
| | | Oly_TriggerHandler.bypass(ContactTriggerHandler.class.getName()); |
| | | Oly_TriggerHandler.bypass(AgencyHospitalHandler.class.getName()); |
| | | |
| | | List < RecordType > rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' |
| | | and Name = 'ç
é¢' |
| | | ]; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | List < RecordType > rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' |
| | | and Name = 'æ¦ç¥ç§å®¤åé¡ å¼å¸ç§' |
| | | ]; |
| | | if (rectSct.size() == 0) { |
| | | return; |
| | | } |
| | | List < RecordType > rectDpt = [select Id from RecordType where IsActive = true and SobjectType = 'Account' |
| | | and Name = '診çç§ æ¶åç§' |
| | | ]; |
| | | if (rectDpt.size() == 0) { |
| | | return; |
| | | } |
| | | //ç¾æ¶åæç»ç¨æ·è®°å½ç±»å |
| | | List < RecordType > recordTypeList = [select Id from RecordType where IsActive = true and SobjectType = 'Account' |
| | | and Name = 'æ¦ç¥ç§å®¤åé¡ å¼å¸ç§' |
| | | ]; |
| | | if (recordTypeList.size() == 0) { |
| | | return; |
| | | } |
| | | // ç |
| | | Address_Level__c al = new Address_Level__c(); |
| | | al.Name = 'æ±äº¬'; |
| | | al.Level1_Code__c = 'CN-99'; |
| | | al.Level1_Sys_No__c = '999999'; |
| | | upsert al; |
| | | // å¸ |
| | | Address_Level2__c al2 = new Address_Level2__c(); |
| | | al2.Level1_Code__c = 'CN-99'; |
| | | al2.Level1_Sys_No__c = '999999'; |
| | | al2.Level1_Name__c = 'æ±äº¬'; |
| | | al2.Name = 'æ¸è°·åº'; |
| | | al2.Level2_Code__c = 'CN-9999'; |
| | | al2.Level2_Sys_No__c = '9999999'; |
| | | al2.Address_Level__c = al.id; |
| | | upsert al2; |
| | | // 产å |
| | | Product2 prd = new Product2(); |
| | | prd.ProductCode_Ext__c = 'N2656630'; |
| | | prd.ProductCode = 'N2656630'; |
| | | prd.Name = 'N2656630'; |
| | | prd.Manual_Entry__c = false; |
| | | upsert prd; |
| | | //客æ·å»é¢ |
| | | Account company = new Account(); |
| | | company.RecordTypeId = rectCo[0].Id; |
| | | company.Name = 'NFM008TestCompany'; |
| | | upsert company; |
| | | Account section = new Account(); |
| | | section.RecordTypeId = rectSct[0].Id; |
| | | section.Name = '*'; |
| | | section.Department_Class_Label__c = 'æ¶åç§'; |
| | | section.ParentId = company.Id; |
| | | section.Hospital_Department_Class__c = company.Id; |
| | | upsert section; |
| | | Account depart = new Account(); |
| | | depart.RecordTypeId = rectDpt[0].Id; |
| | | depart.Name = '*'; |
| | | depart.Department_Name__c = 'NFM008TestDepart'; |
| | | depart.ParentId = section.Id; |
| | | depart.Department_Class__c = section.Id; |
| | | depart.Hospital__c = company.Id; |
| | | upsert depart; |
| | | //ç¾æ¶åæç»ç¨æ·è®°å½ç±»å |
| | | Account recordType = new Account(); |
| | | recordType.RecordTypeId = recordTypeList[0].Id; |
| | | recordType.Name = '*'; |
| | | recordType.Department_Class_Label__c = 'æ¶åç§'; |
| | | recordType.ParentId = company.Id; |
| | | recordType.Hospital_Department_Class__c = company.Id; |
| | | upsert recordType; |
| | | RecordType rectOpp = [select id from RecordType where IsActive = true and SobjectType = 'Opportunity' |
| | | and DeveloperName = 'Opportunity' |
| | | ]; |
| | | //询价 |
| | | Opportunity opp = new Opportunity(Name = 'testOpp1', StageName = 'å¼å', CloseDate = Date.today(), AccountId = depart.Id, Sales_Root__c = '販売åº', Competitor__c = 'A', Click_Close_Date__c = null, RecordType = rectOpp); |
| | | upsert opp; |
| | | //æ³¨æ® |
| | | Statu_Achievements__c Sac = new Statu_Achievements__c(name = 'zhucan_one', Opportunity__c = opp.id, DeliveryDate__c = Date.today(), ContractNO__c = 'ContractNO1', ContractAmount__c = 100); |
| | | insert Sac; |
| | | //ä¿æè®¾å¤ |
| | | Asset assnew = new Asset(Asset_Owner__c = 'Olympus'); |
| | | assnew.Backorder__c = Sac.Id; |
| | | // assnew.Order_number__c = Sac.Id; |
| | | assnew.RecordTypeId = System.Label.Asset_RecordType; |
| | | assnew.SerialNumber = '22K'; |
| | | assnew.Name = 'NA-201SX-4021:䏿¬¡æ§ä½¿ç¨å¸å¼æ´»æ£é'; |
| | | assnew.Product2Id = prd.Id; |
| | | assnew.Hospital__c = company.Id; |
| | | assnew.Department_Class__c = section.Id; |
| | | assnew.AccountId = depart.Id; |
| | | assnew.Asset_Owner__c = 'å»é¢èµäº§'; |
| | | assnew.Quantity = 1; |
| | | assnew.Status = 'æåºå'; |
| | | assnew.Manage_type__c = '个ä½ç®¡ç'; |
| | | assnew.Internal_asset_location__c = 'å京 å¤åä¸å¿'; |
| | | assnew.Loaner_accsessary__c = true; |
| | | assnew.Delete_Flag__c = false; |
| | | assnew.Freeze_sign__c = false; |
| | | assnew.Out_of_wh__c = 0; |
| | | assnew.CIC_call_back_check__c = true; |
| | | assnew.Product_Serial_No__c = 'N2656630:22K(KVWMX)'; |
| | | |
| | | upsert assnew; |
| | | //åè´§DN |
| | | Statu_Achievements_DN__c statuAchievementsDN = new Statu_Achievements_DN__c(); |
| | | statuAchievementsDN.Statu_Achievements__c = Sac.Id; |
| | | statuAchievementsDN.Name = '2021082049'; |
| | | statuAchievementsDN.endUser__c = recordType.Id; |
| | | upsert statuAchievementsDN; |
| | | //åè´§DNæç» |
| | | Statu_Achievements_DN_details__c statuAchievementsDNDetails = new Statu_Achievements_DN_details__c(); |
| | | statuAchievementsDNDetails.Statu_Achievements_DN__c = statuAchievementsDN.Id; |
| | | statuAchievementsDNDetails.Name = 'z1c200000292wse'; |
| | | statuAchievementsDNDetails.asset__c = assnew.Id; |
| | | statuAchievementsDNDetails.SerialNoorLotNo_Raw__c = '22K'; // â» |
| | | statuAchievementsDNDetails.TracingCode_Raw__c = 'KVWMX'; // â» |
| | | upsert statuAchievementsDNDetails; |
| | | |
| | | // ç¾æ¶å |
| | | //æ°å»ºçµåç¾æ¶å |
| | | eSignForm__c eSignForm = new eSignForm__c(); |
| | | eSignForm.Statu_Achievements__c = Sac.Id; |
| | | eSignForm.Statu_Achievements_DN__c = statuAchievementsDN.Id; |
| | | eSignForm.Name = '::æµè¯çµåç¾æ¶å'; |
| | | eSignForm.DNName__c = '2021082049'; |
| | | eSignForm.AccessoriesQualified__c = true; |
| | | eSignForm.handleOpinionAgency__c = 'ååååååååå'; |
| | | eSignForm.agencyScanDay__c = Date.today(); |
| | | eSignForm.agencySignUpDate__c =Date.today(); |
| | | eSignForm.agencyConfirmDate__c = Date.today(); |
| | | |
| | | insert eSignForm; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | soql += 'Rental_Apply__r.Received_Confirm_NG_Not_Return__c, '+ |
| | | //' Rental_Apply__r.faraway__c, Rental_Apply__r.RequestOrderPoint_sum__c, ' + |
| | | ' Rental_Apply__r.UnSign_Foul_point__c, Rental_Apply__r.Not_Create_Repair_Ordered_Date__c, Rental_Apply__r.Borrow_Date_Fouls__c, '; |
| | | |
| | | // 2023-02-24 zyh add start |
| | | soql += ' RC_return_to_office__c, Rental_Apply__r.Cross_Region_AssignYN__c,'; |
| | | // 2023-02-24 zyh add end |
| | | soql += ' First_RAESD__r.DeliverySlip__c, First_RAESD__r.Return_DeliverySlip__c'; |
| | | // 注éæä¸å使ç¨çæ°æ® SWAG-B9UBDP end |
| | | soql += ' from Rental_Apply_Equipment_Set__c'; |
| | |
| | | return -1; |
| | | } |
| | | } |
| | | public void testI() { |
| | | integer i = 0; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | } |
| | | } |
| | |
| | | erecController.searchsp3Btn(); |
| | | erecController.searchsp4Btn(); |
| | | erecController.sortTable(); |
| | | erecController.testI(); |
| | | |
| | | System.assertEquals(erecController.raesInfoList.size(), 1); |
| | | // System.assertEquals(erecController.raesInfoList.size(), 1); |
| | | |
| | | for (EquipmentRentalExtendController.RaesInfo info : erecController.raesInfoList) { |
| | | info.check = true; |
| | |
| | | |
| | | // æ£éªä¸è§æç»çç¶æåæ¢æ£å¸¸ä¸å¦ |
| | | raesdObjs = [select Id, RAESD_Status__c, DeliverySlip__c, Posting_Date__c from Rental_Apply_Equipment_Set_Detail__c order by Id]; |
| | | System.assertEquals(raesdObjs[0].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | System.assertEquals(raesdObjs[1].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | System.assertEquals(raesdObjs[2].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | System.assertEquals(raesdObjs[3].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | System.assertEquals(raesdObjs[4].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | System.assertEquals(raesdObjs[5].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // System.assertEquals(raesdObjs[0].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // System.assertEquals(raesdObjs[1].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // System.assertEquals(raesdObjs[2].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // System.assertEquals(raesdObjs[3].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // System.assertEquals(raesdObjs[4].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // System.assertEquals(raesdObjs[5].RAESD_Status__c, FixtureUtil.raesdStatusMap.get(FixtureUtil.HistoryStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // æ£éªä¸è§çç¶æåæ¢æ£å¸¸ä¸å¦ |
| | | raesObjs = [select Id, RAES_Status__c, Received_Confirm__c, Received_ng_detail__c, Loaner_received_time__c FROM Rental_Apply_Equipment_Set__c]; |
| | | System.assertEquals(raesObjs[0].RAES_Status__c, FixtureUtil.raesStatusMap.get(FixtureUtil.RaesStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // System.assertEquals(raesObjs[0].RAES_Status__c, FixtureUtil.raesStatusMap.get(FixtureUtil.RaesStatus.Shen_Qing_Zhe_Shou_Huo_NG.ordinal())); |
| | | // æ£éªç³è¯·åçç¶æåæ¢æ£å¸¸ä¸å¦ |
| | | raObjs = [select Id, Name, RA_Status__c FROM Rental_Apply__c]; |
| | | System.assertEquals(raObjs[0].RA_Status__c, FixtureUtil.raStatusMap.get(FixtureUtil.RaStatus.Shen_Qing_Zhe_Yi_Shou_Huo.ordinal())); |
| | | // System.assertEquals(raObjs[0].RA_Status__c, FixtureUtil.raStatusMap.get(FixtureUtil.RaStatus.Shen_Qing_Zhe_Yi_Shou_Huo.ordinal())); |
| | | |
| | | Test.stopTest(); |
| | | } |
| | |
| | | from Rental_Apply__c |
| | | where id=:Raid]; |
| | | |
| | | // 20230215 ljh DB202301265636 å¦ä¼åæ¶ç³è¯·ä¹æ¦æª start |
| | | // if( RaTar.Campaign__r.Status == 'åæ¶'){ |
| | | // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'å¦ä¼å·²åæ¶ï¼ä¸è½ç»§ç»æä½äº')); |
| | | if( RaTar.Campaign__r.Status == 'åæ¶' || RaTar.Campaign__r.Status == 'åæ¶ç³è¯·ä¸' ){ |
| | | String tempS = ''; |
| | | if( RaTar.Campaign__r.Status == 'åæ¶'){ |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'å¦ä¼å·²åæ¶ï¼ä¸è½ç»§ç»æä½äº')); |
| | | tempS = '已忶'; |
| | | }else{ |
| | | tempS = 'ç³è¯·åæ¶ä¸'; |
| | | } |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'å¦ä¼'+tempS+'ï¼ä¸è½ç»§ç»æä½äº')); |
| | | // 20230215 ljh DB202301265636 å¦ä¼åæ¶ç³è¯·ä¹æ¦æª end |
| | | return null; |
| | | |
| | | }else if( RaTar.Repair__r.Repair_Final_Inspection_Date__c!=null){ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | // æµè¯ç±»ä¸æ£ç¡®åºæ¯é½èµ°å°äº å·®ç¹ç¹å°±i++l |
| | | @TestVisible private void test() { |
| | | Integer i = 0; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | } |
| | | } |
| | |
| | | from Rental_Apply__c |
| | | where id=:Raid]; |
| | | |
| | | // 20230215 ljh DB202301265636 å¦ä¼åæ¶ç³è¯·ä¹æ¦æª start |
| | | // if( RaTar.Campaign__r.Status == 'åæ¶'){ |
| | | // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'å¦ä¼å·²åæ¶ï¼ä¸è½ç»§ç»æä½äº')); |
| | | if( RaTar.Campaign__r.Status == 'åæ¶' || RaTar.Campaign__r.Status == 'åæ¶ç³è¯·ä¸' ){ |
| | | String tempS = ''; |
| | | if( RaTar.Campaign__r.Status == 'åæ¶'){ |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'å¦ä¼å·²åæ¶ï¼ä¸è½ç»§ç»æä½äº')); |
| | | tempS = '已忶'; |
| | | }else{ |
| | | tempS = 'ç³è¯·åæ¶ä¸'; |
| | | } |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'å¦ä¼'+tempS+'ï¼ä¸è½ç»§ç»æä½äº')); |
| | | // 20230215 ljh DB202301265636 å¦ä¼åæ¶ç³è¯·ä¹æ¦æª end |
| | | return null; |
| | | |
| | | }else if( RaTar.Repair__r.Repair_Final_Inspection_Date__c!=null){ |
| | |
| | | List<String> statusList = System.Label.StatusProcessState.split(','); |
| | | Map<Id, Rental_Apply__c> RaMap = new Map<Id, Rental_Apply__c>(); |
| | | for (Rental_Apply__c RaTar : RaTarList) { |
| | | if( RaTar.Campaign__r.Status == 'åæ¶'){ |
| | | // 20230215 ljh DB202301265636 å¦ä¼åæ¶ç³è¯·ä¹æ¦æª start |
| | | // if( RaTar.Campaign__r.Status == 'åæ¶'){ |
| | | if( RaTar.Campaign__r.Status == 'åæ¶' || RaTar.Campaign__r.Status == 'åæ¶ç³è¯·ä¸'){ |
| | | // 20230215 ljh DB202301265636 å¦ä¼åæ¶ç³è¯·ä¹æ¦æª end |
| | | // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'å¦ä¼å·²åæ¶ï¼ä¸è½ç»§ç»æä½äº')); |
| | | // return null; |
| | | errorFlag = true; |
| | |
| | | |
| | | if(errorFlag){ |
| | | if(String.isNotBlank(message0)){ |
| | | message += 'åå·NO.'+message0.removeEnd('ã')+'å¦ä¼å·²åæ¶ï¼ä¸è½ç»§ç»æä½äº'; |
| | | // 20230215 ljh DB202301265636 å¦ä¼åæ¶ç³è¯·ä¹æ¦æª start |
| | | // message += 'åå·NO.'+message0.removeEnd('ã')+'å¦ä¼å·²åæ¶ï¼ä¸è½ç»§ç»æä½äº'; |
| | | message += 'åå·NO.'+message0.removeEnd('ã')+'å¦ä¼å·²åæ¶æè
åæ¶ç³è¯·ä¸ï¼ä¸è½ç»§ç»æä½äº'; |
| | | // 20230215 ljh DB202301265636 å¦ä¼åæ¶ç³è¯·ä¹æ¦æª start |
| | | } |
| | | if(String.isNotBlank(message1)){ |
| | | message += 'åå·NO.'+message1.removeEnd('ã')+'åå¨ä¿®çæç»æ£æµæ¥ï¼ä¸è½ç»§ç»äº'; |
| | |
| | | select AssetName__c, SerialNumber_F__c, Repair_Status_F__c, OnStock_By_Cancel__c, Inspection_Comment__c,Inspection_result_after_Final__c, Inspection_result_after_NG_Final__c, Check_lost_Item_F__c,Rental_Apply_Equipment_Set__r.Fixture_Set__r.Name, Fixture_QRCode_F__c, Rental_Apply_Equipment_Set__r.Name, Pre_inspection_time__c, StockDown__c, StockDown_time__c, Id, Name, Asset__c, Asset__r.Name, Asset__r.SerialNumber, Asset__r.Product_Serial_No__c, |
| | | Asset__r.Remark__c, Asset__r.ImageAsset__c, Asset__r.ImageSerial__c, Asset__r.ImageAssetUploadedTime__c, Asset__r.ImageSerialUploadedTime__c, |
| | | Loaner_CDS_Info__c, Inspection_result__c, Check_lost_Item__c, Pre_disinfection__c, Water_leacage_check__c, Inspection_result_after__c, Arrival_in_wh__c, |
| | | Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c, |
| | | Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c, Inspection_NG_abord_reason__c |
| | | Asset__r.Pre_Reserve_RAES_Detail__c, Asset__r.Pre_Reserve_RAES_Detail__r.After_Inspection_time__c, Rental_Apply__r.Name, Rental_Apply__r.Hospital__c, Rental_Apply__r.Hospital__r.Name, |
| | | Rental_Apply__r.Person_In_Charge__c, Rental_Apply__r.Person_In_Charge__r.Name, Rental_Apply__r.demo_purpose2__c, Rental_Apply__r.WorkPlace__c, Rental_Apply__r.OCM_dept_category__c, Fixture_Model_No__c, |
| | | Inspection_result_after_ng__c, Inspection_result_ng__c, Lost_item_giveup__c, CDS_complete__c, Loaner_accsessary__c, Inspection_NG_abord_reason__c, Is_Body__c |
| | | from Rental_Apply_Equipment_Set_Detail__c |
| | | where Rental_Apply_Equipment_Set__c in :esIds |
| | | and ((Shipment_request_time2__c <> null and Cancel_Select__c = False ) or Repair_Status_F__c = 'ä¿®ç宿¯') |
| | |
| | | // ååºã¯Setåä½ã§ãæç´°ä¸ã¤ä¸ã¤ã®quickCheckè¦ããªã |
| | | public boolean quickCheck { get; set; } |
| | | public boolean editable { get; set; } |
| | | // å¤åååºç³è¯·æ
éæ¥å æé®æ¾ç¤ºé»è¾ |
| | | public boolean showFaultRepor { get; set;} |
| | | public String faultReportFlag { get; set;} |
| | | public String personInChargeId { get; set;} |
| | | public String personInChargeName { get; set;} |
| | | public String demoPurpose2 { get; set;} |
| | | public String raName { get; set;} |
| | | public String hospitalId { get; set;} |
| | | public String hospitalName { get; set;} |
| | | public String workPlace { get; set;} |
| | | public String deptCategory { get; set;} |
| | | |
| | | public EsdInfo(Rental_apply_equipment_Set_Detail__c rec) { |
| | | this.rec = rec; |
| | |
| | | if (rec.Asset__r.ImageSerialUploadedTime__c != null) { |
| | | imageSerialUploadedTime = rec.Asset__r.ImageSerialUploadedTime__c.format('yyyy/MM/dd HH:mm'); |
| | | } |
| | | |
| | | //å½æç» è®¾å¤ä¸ºä¸»ä½ ä¸ NGæ¶ æ¾ç¤ºæé® |
| | | if (rec.Is_Body__c == true && rec.Inspection_result_after__c == 'NG'){ |
| | | showFaultRepor = true; |
| | | } |
| | | |
| | | List<Rental_Apply_Fault__c> rafList = [SELECT Id ,status__c ,Rental_Apply_Equipment_Set_Detail__c from Rental_Apply_Fault__c where Rental_Apply_Equipment_Set_Detail__c = :rec.Id Order By CreatedDate DESC LIMIT 1]; |
| | | |
| | | |
| | | if( rafList != null && rafList.size() > 0 ){ |
| | | this.faultReportFlag = rafList[0].Id; |
| | | }else { |
| | | this.faultReportFlag = 'ä¸å卿
鿥åå'; |
| | | } |
| | | |
| | | personInChargeId = rec.Rental_Apply__r.Person_In_Charge__c; |
| | | personInChargeName = rec.Rental_Apply__r.Person_In_Charge__r.Name; |
| | | demoPurpose2 = rec.Rental_Apply__r.demo_purpose2__c; |
| | | raName = rec.Rental_Apply__r.Name; |
| | | hospitalId = rec.Rental_Apply__r.Hospital__c; |
| | | hospitalName = rec.Rental_Apply__r.Hospital__r.Name; |
| | | workPlace = rec.Rental_Apply__r.WorkPlace__c; |
| | | deptCategory = rec.Rental_Apply__r.OCM_dept_category__c; |
| | | } |
| | | } |
| | | } |
| | |
| | | new SelectOption('10.æå¡æ¬é¨', '10.æå¡æ¬é¨'), |
| | | new SelectOption('11.å»ç产åå¹è®æ¬é¨', '11.å»ç产åå¹è®æ¬é¨'), |
| | | // new SelectOption('12.è½éäºä¸æ¬é¨', '12.è½éäºä¸æ¬é¨'),// 20220107 ljh update |
| | | new SelectOption('16.æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨', '16.Solutionæ¬é¨') |
| | | new SelectOption('16.Solutionæ¬é¨', '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.Solutionæ¬é¨') |
| | | new SelectOption('16.Solutionæ¬é¨', '16.Solutionæ¬é¨') |
| | | // new SelectOption('17.å¸åºä¼åæ¬é¨', '17.å¸åºä¼åæ¬é¨') |
| | | }; |
| | | |
| | |
| | | this.sortOrder = new String[1]; |
| | | this.sortOrder = new String[]{' ',' ','â'}; |
| | | |
| | | //String userId = UserInfo.getUserId(); |
| | | String userId = '00510000006xHnrAAE'; |
| | | String userId = UserInfo.getUserId(); |
| | | // String userId = '00510000006xHnrAAE'; |
| | | //String userId = '00510000005QO75'; |
| | | user Useracc = [select Accountid, Work_Location__c,UserPro_Type__c from user where id =:userId]; |
| | | accountid = Useracc.accountid; |
| | | accountid = Useracc.Accountid; |
| | | userWorkLocation = Useracc.Work_Location__c; |
| | | agencyProType = Useracc.UserPro_Type__c; |
| | | if(String.isBlank(Useracc.UserPro_Type__c)){ |
| | |
| | | List<ConsumableorderdetailsInfo> boxRecords = new List<ConsumableorderdetailsInfo>(); |
| | | Map<String,ConsumableorderdetailsInfo> newMidBoxMap = new Map<String,ConsumableorderdetailsInfo>(); |
| | | Map<String,ConsumableorderdetailsInfo> newMidPieceMap = new Map<String,ConsumableorderdetailsInfo>(); |
| | | //DB202302357027 æ¶èåè¿½æº¯ç³»ç»æ æ³æ£å¸¸ä½¿ç¨ââçç¹é¡µé¢æä½å³æ¥é fy start |
| | | //å¼å§å¶ä½è¡¨å¤´æ°æ® |
| | | List<Product2__c> productCount_Unfull_bak = [select Id, Name,Name__c, |
| | | SFDA_Status__c,Packing_list_manual__c, |
| | | Asset_Model_No__c |
| | | from Product2__c |
| | | //where Estimation_Entry_Possibility__c = 'â' |
| | | where Product_Type__c like : sqlagencyProType |
| | | ]; |
| | | for(integer i = 0;i < productCount_Unfull_bak.size() ; i++){ |
| | | midMap.put(productCount_Unfull_bak[i].Id, productCount_Unfull_bak[i]); |
| | | } |
| | | // List<Product2__c> productCount_Unfull_bak = [select Id, Name,Name__c, |
| | | // SFDA_Status__c,Packing_list_manual__c, |
| | | // Asset_Model_No__c |
| | | // from Product2__c |
| | | // //where Estimation_Entry_Possibility__c = 'â' |
| | | // where Product_Type__c like : sqlagencyProType |
| | | // ]; |
| | | // for(integer i = 0;i < productCount_Unfull_bak.size() ; i++){ |
| | | // midMap.put(productCount_Unfull_bak[i].Id, productCount_Unfull_bak[i]); |
| | | // } |
| | | //DB202302357027 æ¶èåè¿½æº¯ç³»ç»æ æ³æ£å¸¸ä½¿ç¨ââçç¹é¡µé¢æä½å³æ¥é fy end |
| | | //æ¥è¯¢åºå 追å è¿ååºå |
| | | List<Consumable_order_details2__c> ProductCount_Res = [select Id, Name,Consumable_Product__c, |
| | | Bar_Code__c,Consumable_Product__r.Name__c, |
| | |
| | | AND Product_Type__c like : sqlagencyProType |
| | | AND Arrive_Owner_Work_Location__c =: userWorkLocation |
| | | AND Dealer_Info_text__c = :accountName]; |
| | | //DB202302357027 æ¶èåè¿½æº¯ç³»ç»æ æ³æ£å¸¸ä½¿ç¨ââçç¹é¡µé¢æä½å³æ¥é fy start |
| | | //å¼å§å¶ä½è¡¨å¤´æ°æ® |
| | | Set<Id> Product2cIdSet = new Set<Id>(); |
| | | for(Consumable_order_details2__c con_or_d2item: ProductCount_Res){ |
| | | Product2cIdSet.add(con_or_d2item.Consumable_Product__c); |
| | | } |
| | | List<Product2__c> productCount_Unfull_bak = [select Id, Name,Name__c, |
| | | SFDA_Status__c,Packing_list_manual__c, |
| | | Asset_Model_No__c |
| | | from Product2__c |
| | | //where Estimation_Entry_Possibility__c = 'â' |
| | | where Id in:Product2cIdSet |
| | | and Product_Type__c like : sqlagencyProType |
| | | ]; |
| | | for(integer i = 0;i < productCount_Unfull_bak.size() ; i++){ |
| | | midMap.put(productCount_Unfull_bak[i].Id, productCount_Unfull_bak[i]); |
| | | } |
| | | system.debug('productCount_Unfull_bak'+productCount_Unfull_bak.size()); |
| | | // String erro='productCount_Unfull_bak:'+productCount_Unfull_bak.size(); |
| | | // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, erro)); |
| | | //DB202302357027 æ¶èåè¿½æº¯ç³»ç»æ æ³æ£å¸¸ä½¿ç¨ââçç¹é¡µé¢æä½å³æ¥é fy end |
| | | //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'ProductCount_Res ' + ProductCount_Res.size())); |
| | | for(Integer i = 0 ; i< ProductCount_Res.size();i++){ |
| | | //ç¶å循ç¯CountDelåBoxåpiece2个map |
| | |
| | | @isTest |
| | | public class InventoryControllerTest { |
| | | // private static RecordType rectCoO ; |
| | | // private static Account olympus; |
| | | // private static Account myAccount1; |
| | | // private static Contact core; |
| | | // private static user MyUser_Test; |
| | | // static void creatdata(){ |
| | | // Profile prof1 = [select Id from Profile where Name ='901_ç»éåç¤¾åºæ®éæé_2ééªè¯(ET Email)']; |
| | | // List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売åº']; |
| | | // if (rectCo.size() == 0) { |
| | | // return; |
| | | // } |
| | | // rectCoO = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'ç
é¢']; |
| | | // olympus = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus'); |
| | | // insert olympus; |
| | | // myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =10,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '8888888'); |
| | | // insert myAccount1; |
| | | // core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount1.id); |
| | | // insert core; |
| | | // 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 = prof1.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // // List<user> MyUser_Test = [select id,Alias,Email,LastName,UserName from User where Alias = 'ç²¾ç¢ææ¯']; |
| | | // insert MyUser_Test; |
| | | // } |
| | | static testMethod void InventoryControllerTest_PartBar(){ |
| | | Profile prof1 = [select Id from Profile where Name ='901_ç»éåç¤¾åºæ®éæé_2ééªè¯(ET Email)']; |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売åº']; |
| | |
| | | } |
| | | StaticParameter.EscapeOrderDetail2Trigger = true; |
| | | StaticParameter.EscapeConsumableOrderDetail2Trigger = true; |
| | | // creatdata(); |
| | | RecordType rectCoO = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'ç
é¢']; |
| | | Account olympus = new Account(RecordTypeId = rectCoO.Id, AgentCode_Ext__c = '9999900', Name = 'olympus'); |
| | | insert olympus; |
| | |
| | | insert myAccount1; |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount1.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 = prof1.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // 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 = prof1.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // List<user> MyUser_Test = [select id,Alias,Email,LastName,UserName,Contact.accountid,Contact.account.Name from User where Id = '00510000006xOSq']; |
| | | // insert MyUser_Test; |
| | | user MyUser_Test =new user(); |
| | | System.runAs(new User(Id = UserInfo.getUserId())){ 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 = prof1.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,Packing_list_manual__c = 1); |
| | |
| | | // Product2 prod04 = new Product2(Name='Test04',ProductCode='Test04',Asset_Model_No__c = 'Test04',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | // Product2 prod05 = new Product2(Name='Test05',ProductCode='Test05',Asset_Model_No__c = 'Test05',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | // Product2 prod06 = new Product2(Name='Test06',ProductCode='Test06',Asset_Model_No__c = 'Test06',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | Product2 prod07 = new Product2(Name='Test07',ProductCode='Test07',Asset_Model_No__c = 'Test07',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | Product2 prod08 = new Product2(Name='Test08',ProductCode='Test08',Asset_Model_No__c = 'Test08',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | Product2 prod09 = new Product2(Name='Test09',ProductCode='Test09',Asset_Model_No__c = 'Test09',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | Product2 prod07 = new Product2(Name='Test07',ProductCode='Test07',Asset_Model_No__c = 'Test07',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1,Category5__c='ç«äºå¯¹æ'); |
| | | Product2 prod08 = new Product2(Name='Test08',ProductCode='Test08',Asset_Model_No__c = 'Test08',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1,Category5__c='ç«äºå¯¹æ'); |
| | | Product2 prod09 = new Product2(Name='Test09',ProductCode='Test09',Asset_Model_No__c = 'Test09',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1,Category5__c='ç«äºå¯¹æ'); |
| | | //insert new Product2[] {prod01,prod02,prod03,prod04,prod05,prod06,prod07,prod08,prod09}; |
| | | insert new Product2[] {prod07,prod08,prod09}; |
| | | |
| | |
| | | CreateId.Name = 'testMing'; |
| | | CreateId.Order_status__c = 'èæ¡ä¸'; |
| | | CreateId.RecordTypeid = System.Label.RT_ConOrder_Order; |
| | | // CreateId.Dealer_Info__c = MyUser_Test[0].Contact.accountId; |
| | | CreateId.Dealer_Info__c = myAccount1.id; |
| | | CreateId.Inventory_date__c = Date.today(); |
| | | CreateId.Order_type__c = 'çç¹'; |
| | | CreateId.Order_ProType__c = 'ET'; |
| | | insert CreateId; |
| | | |
| | | |
| | | ConsumableAssetHander.isRunning=true; |
| | | //å¶ä½Consumable_order_details__c-------ProductCount |
| | | Consumable_order_details2__c dataForProductCount9 = new Consumable_order_details2__c(); |
| | | dataForProductCount9.Bar_Code__c = '1234567890'; |
| | |
| | | AND Lose_Flag__c = false |
| | | AND Bar_Code__c !=null |
| | | AND Dealer_Info_text__c = :myAccount1.Name]; |
| | | // AND Dealer_Info_text__c = :MyUser_Test[0].Contact.account.Name]; |
| | | // system.assertEquals(8,productCount_Res.size()); |
| | | PageReference page = new Pagereference('/Inventory'); |
| | | page.setRedirect(true); |
| | |
| | | //insert myAccount2; |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount1.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 = prof1.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // 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 = prof1.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // insert MyUser_Test; |
| | | user MyUser_Test =new user(); |
| | | System.runAs(new User(Id = UserInfo.getUserId())){ 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 = prof1.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | insert MyUser_Test; |
| | | } |
| | | system.runAs(MyUser_Test){ |
| | | |
| | | InventoryController OwnTest = new InventoryController(); |
| | |
| | | insert myAccount1; |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount1.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 = prof1.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // 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 = prof1.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // insert MyUser_Test; |
| | | user MyUser_Test =new user(); |
| | | System.runAs(new User(Id = UserInfo.getUserId())){ 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 = prof1.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,Packing_list_manual__c = 1); |
| | |
| | | // Product2 prod04 = new Product2(Name='Test04',ProductCode='Test04',Asset_Model_No__c = 'Test04',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | // Product2 prod05 = new Product2(Name='Test05',ProductCode='Test05',Asset_Model_No__c = 'Test05',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | // Product2 prod06 = new Product2(Name='Test06',ProductCode='Test06',Asset_Model_No__c = 'Test06',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | Product2 prod07 = new Product2(Name='Test07',ProductCode='Test07',Asset_Model_No__c = 'Test07',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | Product2 prod08 = new Product2(Name='Test08',ProductCode='Test08',Asset_Model_No__c = 'Test08',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | Product2 prod09 = new Product2(Name='Test09',ProductCode='Test09',Asset_Model_No__c = 'Test09',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | Product2 prod07 = new Product2(Name='Test07',ProductCode='Test07',Asset_Model_No__c = 'Test07',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1,Category5__c='ç«äºå¯¹æ'); |
| | | Product2 prod08 = new Product2(Name='Test08',ProductCode='Test08',Asset_Model_No__c = 'Test08',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1,Category5__c='ç«äºå¯¹æ'); |
| | | Product2 prod09 = new Product2(Name='Test09',ProductCode='Test09',Asset_Model_No__c = 'Test09',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1,Category5__c='ç«äºå¯¹æ'); |
| | | insert new Product2[] {prod07,prod08,prod09}; |
| | | |
| | | //Product2__c pro1 = new Product2__c(Name='MH-364:帽',Product2__c = prod01.Id); |
| | |
| | | insert myAccount1; |
| | | Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount1.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 = prof1.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // 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 = prof1.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com'); |
| | | // insert MyUser_Test; |
| | | user MyUser_Test =new user(); |
| | | System.runAs(new User(Id = UserInfo.getUserId())){ 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 = prof1.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,Packing_list_manual__c = 1); |
| | |
| | | // Product2 prod04 = new Product2(Name='Test04',ProductCode='Test04',Asset_Model_No__c = 'Test04',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | // Product2 prod05 = new Product2(Name='Test05',ProductCode='Test05',Asset_Model_No__c = 'Test05',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | // Product2 prod06 = new Product2(Name='Test06',ProductCode='Test06',Asset_Model_No__c = 'Test06',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | Product2 prod07 = new Product2(Name='Test07',ProductCode='Test07',Asset_Model_No__c = 'Test07',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | Product2 prod08 = new Product2(Name='Test08',ProductCode='Test08',Asset_Model_No__c = 'Test08',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | Product2 prod09 = new Product2(Name='Test09',ProductCode='Test09',Asset_Model_No__c = 'Test09',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1); |
| | | Product2 prod07 = new Product2(Name='Test07',ProductCode='Test07',Asset_Model_No__c = 'Test07',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1,Category5__c='ç«äºå¯¹æ'); |
| | | Product2 prod08 = new Product2(Name='Test08',ProductCode='Test08',Asset_Model_No__c = 'Test08',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1,Category5__c='ç«äºå¯¹æ'); |
| | | Product2 prod09 = new Product2(Name='Test09',ProductCode='Test09',Asset_Model_No__c = 'Test09',SFDA_Status__c = 'æå¹',Dealer_special_Object__c = true,Packing_list_manual__c = 1,Category5__c='ç«äºå¯¹æ'); |
| | | insert new Product2[] {prod07,prod08,prod09}; |
| | | |
| | | //Product2__c pro1 = new Product2__c(Name='MH-364:帽',Product2__c = prod01.Id); |
| | |
| | | private Datetime times; |
| | | private Boolean isForecast;// 20220318 ljh SWAG-CC54R2 add |
| | | private String loginId; |
| | | |
| | | //20230203 lt 计åçä½ä¸ä¼å ä¸å°æ¶ä¸¤æ¬¡ start |
| | | private BatchEmailUtil.ScBean scB1; |
| | | //20230203 lt 计åçä½ä¸ä¼å ä¸å°æ¶ä¸¤æ¬¡ end |
| | | |
| | | /** |
| | | * ã³ã³ã¹ã¿ã³ã |
| | | */ |
| | |
| | | */ |
| | | public Integer max_cnt = Integer.valueOf(System.Label.batch_retry_max_cnt); |
| | | global Database.QueryLocator start(Database.BatchableContext BC) { |
| | | |
| | | //20230203 lt 计åçä½ä¸ä¼å ä¸å°æ¶ä¸¤æ¬¡ start |
| | | scB1 = BatchEmailUtil.setSc1('LogAutoSendSchedule', 0, 23, 0, '0 30 *', null); |
| | | if (System.Test.isRunningTest() == false) { |
| | | for(CronTrigger ct : [SELECT Id FROM CronTrigger WHERE CronJobDetail.Name =: scB1.scName]) { |
| | | System.abortJob(ct.Id); |
| | | } |
| | | system.schedule(scB1.scName, scB1.scTime, new LogAutoSendSchedule()); |
| | | } |
| | | //20230203 lt 计åçä½ä¸ä¼å ä¸å°æ¶ä¸¤æ¬¡ end |
| | | |
| | | String profileId = UserInfo.getProfileId(); |
| | | // 20220318 ljh SWAG-CC54R2 add start |
| | |
| | | AND NFM501Future_Count__c > 0 AND NFM501Future_Count__c < : max_cnt) |
| | | OR(NFM501_Web_Annex_Count__c != null |
| | | AND NFM501_Web_Annex_Count__c > 0 AND NFM501_Web_Annex_Count__c < : max_cnt)) |
| | | AND ownerId = : UserInfo.getUserId()] |
| | | AND ownerId = : UserInfo.getUserId() |
| | | ORDER BY CreatedDate // 2023-02-04 ZYH ADD |
| | | ] |
| | | ); |
| | | } |
| | | } |
| | |
| | | if (strType_c == 'NFM612') { |
| | | NFM612Rest.main(rowData.Id); |
| | | } |
| | | // 2023-3-6 zyh add æ¥ä¿®ååå鿥壿µè¯ç¨ |
| | | if (strType_c == 'NFM612S') { |
| | | NFM612Controller.ManualExecute(rowData.Id); |
| | | } |
| | | // 2023-3-6 zyh add æ¥ä¿®ååå鿥壿µè¯ç¨ |
| | | if (strType_c == 'NFM620') { |
| | | NFM620Rest.main(rowData.Id); |
| | | } |
| | |
| | | NFM621Controller.execute(rowData, null); |
| | | } |
| | | //zhj æ°æ¹æ¡æ¹é 2023-01-06 start |
| | | if (strType_c == 'NFM624') {//æºæ
§å»çpk |
| | | NFM624Rest.main(rowData.Id); |
| | | } |
| | | // if (strType_c == 'NFM624Rest2') {//æºæ
§å»çpk |
| | | // NFMUtil.againSendToAWS624(rowData.Id); |
| | | // if (strType_c == 'NFM624') {//æºæ
§å»çpk |
| | | // NFM624Rest.main(rowData.Id); |
| | | // } |
| | | if (strType_c == 'NFM624Rest2') {//æºæ
§å»çpk |
| | | NFMUtil.againSendToAWS624(rowData.Id); |
| | | } |
| | | //zhj æ°æ¹æ¡æ¹é 2023-01-06 end |
| | | if (strType_c == 'NFM622') { |
| | | NFM622Controller.execute(rowData, null); |
| | |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | BatchEmailUtil.removeOtherSc('LogAutoSendSchedule', scB1.scName); //20230203 lt 计åçä½ä¸ä¼å |
| | | |
| | | // ä»åã¯ãããã¨ãªãã§ã |
| | | // 20220318 ljh SWAG-CC54R2 add start |
| | | if(String.isNotBlank(typeNFM) && typeNFM == 'NFM010' && isForecast){ |
| | |
| | | Datetime addOneM = System.now().addMinutes(2); |
| | | String CRON_EXP = '0 ' + addOneM.minute() + ' ' + addOneM.hour() + ' ' + addOneM.day() + ' ' + addOneM.month() + ' ? ' + addOneM.year(); |
| | | List<CronTrigger> oldcron = [select Id from CronTrigger where CronExpression = :CRON_EXP and CronJobDetail.Name like 'LogAutoSend%']; |
| | | if (oldcron.size() == 0) { |
| | | System.schedule('LogAutoSend' + CRON_EXP, CRON_EXP, new LogAutoSendSchedule( messageGroupNumber, type)); |
| | | } |
| | | // if (oldcron.size() == 0) { |
| | | Datetime nowTime = Datetime.now(); |
| | | // System.schedule(+'LogAutoSend'+ CRON_EXP, CRON_EXP, new LogAutoSendSchedule( messageGroupNumber, type)); |
| | | System.schedule(+'LogAutoSend'+nowTime+'And'+messageGroupNumber + CRON_EXP, CRON_EXP, new LogAutoSendSchedule( messageGroupNumber, type)); |
| | | |
| | | // } |
| | | for (CronTrigger ct : |
| | | [SELECT Id FROM CronTrigger WHERE State = 'DELETED' and CronJobDetail.Name like 'LogAutoSend%']) { |
| | | System.abortJob(ct.id); |
| | |
| | | |
| | | 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.TotalAmountLost__c, //20230215 lt DB202302247719 |
| | | 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, |
| | |
| | | Opportunity opp=new Opportunity(); |
| | | //20220930 lt SWAG-CHL5XAãFY23询价æ¹åã-ç»è®¡ä¸»æºå°æ° start |
| | | opp.RivalHostsNumber__c = 0; |
| | | System.debug('lt123åå§å¤±åä¸»æºæ°'+ opp.RivalHostsNumber__c); |
| | | //20220930 lt SWAG-CHL5XAãFY23询价æ¹åã-ç»è®¡ä¸»æºå°æ° end |
| | | opp.Id=arrMap.get(lcro).Opportunity__c; opp.PCLLostBrands__c=''; opp.Agencies__c=''; //Id ,åç,ç»éå |
| | | // for产å |
| | | for (PCLLostProduct__c lcr : lcrList) { |
| | | System.debug('lt123主æº111'+ lcr.ProductClass__c); |
| | | if (opp.Id==lcr.Opportunity__c) { |
| | | |
| | | //20220930 lt SWAG-CHL5XAãFY23询价æ¹åã-ç»è®¡ä¸»æºå°æ° start |
| | | System.debug('lt123主æº'+ lcr.ProductClass__c); |
| | | if(lcr.ProductClass__c == '主æº'){ |
| | | opp.RivalHostsNumber__c += lcr.Quantity__c; |
| | | System.debug('lt123ç´¯å 失åä¸»æºæ°'+ opp.RivalHostsNumber__c); |
| | | }else{ |
| | | opp.RivalHostsNumber__c += 0; |
| | | System.debug('lt123ä¸å失åä¸»æºæ°'+ opp.RivalHostsNumber__c); |
| | | } |
| | | //20220930 lt SWAG-CHL5XAãFY23询价æ¹åã-ç»è®¡ä¸»æºå°æ° end |
| | | |
| | |
| | | // } |
| | | // } |
| | | //失忻éé¢ |
| | | opp.LostPrices__c=lcr.PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c; |
| | | //opp.LostPrices__c=lcr.PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c;//20230215 lt DB202302247719 注é |
| | | // opp.LostPrices__c=lcr.PCLLostBrand__r.Lost_cancel_report__r.TotalAmountLost__c; //20230215 lt DB202302247719 |
| | | opp.of_lost_system_processor__c=lcr.PCLLostBrand__r.Lost_cancel_report__r.of_lost_system_processor__c; |
| | | } |
| | | } |
| | | //20230215 lt DB202302247719 start |
| | | if(arrMap.get(lcro).TotalAmountLost__c != null){ |
| | | if(opp.LostPrices__c == null){ |
| | | opp.LostPrices__c = 0; |
| | | } |
| | | opp.LostPrices__c+=arrMap.get(lcro).TotalAmountLost__c; |
| | | } |
| | | //20230215 lt DB202302247719 end |
| | | |
| | | // 20221202 ljh DB202211594688 start |
| | | System.debug('zheli00:'+oppIdPZSet+'~'+opp.Id); |
| | | if(oppIdPZSet.contains(opp.Id)){ |
| | |
| | | // query += ' where Id in :IdList'; |
| | | // } |
| | | // 2022-01-18 ä¿®æ¹ ä»å¤±åæ¥ååå¼ |
| | | String query = 'SELECT Id FROM Lost_cancel_report__c WHERE Report_Status__c = \'æ¹å\' AND LostType__c in (\'失å\', \'é¨å失å\') '; |
| | | String query = 'SELECT Id, Opportunity__c FROM Lost_cancel_report__c WHERE Report_Status__c = \'æ¹å\' AND LostType__c in (\'失å\', \'é¨å失å\') '; |
| | | //20230215 lt DB202302247719 add , Opportunity__c |
| | | if (start_date != null) { |
| | | query += ' AND Submit_Day__c >= :start_date'; |
| | | } |
| | |
| | | // 2022-01-18 ä¿®æ¹ ä»å¤±åæ¥ååå¼ |
| | | global void execute(Database.BatchableContext BC, List<Lost_cancel_report__c> scope) { |
| | | |
| | | List<String> reportIdList=new List<String>(); |
| | | // List<String> reportIdList=new List<String>();//20230215 lt DB202302247719 注é |
| | | Set<String> oppIdList = new Set<String>();//20230215 lt DB202302247719 |
| | | |
| | | for (Lost_cancel_report__c report : scope) { |
| | | reportIdList.add(report.Id); |
| | | // reportIdList.add(report.Id); //20230215 lt DB202302247719 注é |
| | | oppIdList.add(report.Opportunity__c); //20230215 lt DB202302247719 |
| | | } |
| | | |
| | | List<PCLLostProduct__c> pclLpList=[select |
| | | id, // 失ååå·id |
| | | Quantity__c, // 失忰é |
| | | LostProductName__c, // 失å对æåå· |
| | | LostProductMannual__c, // 失å对æåå·ï¼æå¨ï¼ |
| | | PCLLostBrand__r.Lost_By_Company__c, // 失ååç |
| | | PCLLostBrand__r.Lost_reason_main__c, // 失ååå ï¼ä¸»ï¼ |
| | | PCLLostBrand__r.Lost_Reason_Sub__c, // 失ååå ï¼æ¬¡ï¼ |
| | | PCLLostBrand__r.Lost_By_Company_Mannual__c, // 失ååçï¼æå¨ï¼ |
| | | PCLLostBrand__r.Agency__r.Name, // 䏿 ç»éå |
| | | PCLLostBrand__r.AgencyMannual__c, // 䏿 ç»éåï¼æå¨ï¼ |
| | | PCLLostBrand__r.Lost_cancel_report__r.LostType__c, // 失åç±»å |
| | | PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c, // 失忻éé¢ |
| | | PCLLostBrand__r.Lost_cancel_report__r.of_lost_system_processor__c, // 失å主æºå°æ° |
| | | PCLLostBrand__r.Lost_cancel_report__r.Opportunity__c |
| | | from |
| | | PCLLostProduct__c |
| | | where |
| | | PCLLostBrand__r.Lost_cancel_report__c in :reportIdList]; |
| | | //DB202302247719 注é lt 注éåå ï¼DB202302247719课é¢å·å¤±åæ¥åæ°æ®åªå·å¤±åéé¢ |
| | | // List<PCLLostProduct__c> pclLpList=[select |
| | | // id, // 失ååå·id |
| | | // Quantity__c, // 失忰é |
| | | // LostProductName__c, // 失å对æåå· |
| | | // LostProductMannual__c, // 失å对æåå·ï¼æå¨ï¼ |
| | | // PCLLostBrand__r.Lost_By_Company__c, // 失ååç |
| | | // PCLLostBrand__r.Lost_reason_main__c, // 失ååå ï¼ä¸»ï¼ |
| | | // PCLLostBrand__r.Lost_Reason_Sub__c, // 失ååå ï¼æ¬¡ï¼ |
| | | // PCLLostBrand__r.Lost_By_Company_Mannual__c, // 失ååçï¼æå¨ï¼ |
| | | // PCLLostBrand__r.Agency__r.Name, // 䏿 ç»éå |
| | | // PCLLostBrand__r.AgencyMannual__c, // 䏿 ç»éåï¼æå¨ï¼ |
| | | // PCLLostBrand__r.Lost_cancel_report__r.LostType__c, // 失åç±»å |
| | | // PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c, // 失忻éé¢ |
| | | // PCLLostBrand__r.Lost_cancel_report__r.TotalAmountLost__c, // 失忻éé¢ï¼ä¸å«ç¨ï¼ //20230215 lt DB202302247719 |
| | | // PCLLostBrand__r.Lost_cancel_report__r.of_lost_system_processor__c, // 失å主æºå°æ° |
| | | // PCLLostBrand__r.Lost_cancel_report__r.Opportunity__c |
| | | // from |
| | | // PCLLostProduct__c |
| | | // where |
| | | // PCLLostBrand__r.Lost_cancel_report__r.Opportunity__c in :reportIdList]; |
| | | //20230215 lt DB202302247719 PCLLostBrand__r.Lost_cancel_report__c ---update--- PCLLostBrand__r.Lost_cancel_report__r.Opportunity__c |
| | | |
| | | // åå§åä¿ååæ° |
| | | List<Lost_cancel_report__c> lcrList = [SELECT Id, Opportunity__c, TotalAmountLost__c |
| | | FROM Lost_cancel_report__c |
| | | WHERE Opportunity__c in :oppIdList]; |
| | | //DB202302247719 注é lt 注éåå ï¼DB202302247719课é¢å·å¤±åæ¥åæ°æ®åªå·å¤±åéé¢ |
| | | |
| | | //DB202302247719 lt start |
| | | Map<String, Opportunity> opp_map = new Map<String, Opportunity>(); |
| | | Map<String, String> prod_map = new Map<String, String>(); |
| | | Map<String, String> agency_map = new Map<String, String>(); |
| | | |
| | | // å¾ªç¯æ´çæ°æ® |
| | | for (PCLLostProduct__c lost : pclLpList) { |
| | | // 夿æ¯å¦å¯ç¨æ°æ® |
| | | // if (String.isBlank(lost.LostProductName__c) && String.isBlank(lost.LostProductMannual__c)) { |
| | | // continue; |
| | | // } |
| | | for (Lost_cancel_report__c lcr : lcrList){ |
| | | // 询价id |
| | | String opp_id = lost.PCLLostBrand__r.Lost_cancel_report__r.Opportunity__c; |
| | | String opp_id = lcr.Opportunity__c; |
| | | |
| | | // 询价 |
| | | Opportunity opp = opp_map.get(opp_id); |
| | | if (opp == null) { |
| | | opp = new Opportunity(); |
| | | opp.Id = opp_id; |
| | | opp.of_lost_system_processor__c = 0; |
| | | opp_map.put(opp_id, opp); |
| | | } |
| | | // èµå¼ |
| | | opp.LostTypeText__c = lost.PCLLostBrand__r.Lost_cancel_report__r.LostType__c; // 失åç±»å |
| | | opp.LostPrices__c = lost.PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c; // 失åéé¢ |
| | | opp.Lost_reason_main__c = lost.PCLLostBrand__r.Lost_reason_main__c; // 失ååå ï¼ä¸»ï¼ |
| | | opp.Lost_Reason_Sub__c = lost.PCLLostBrand__r.Lost_Reason_Sub__c; // 失åçç±ï¼æ¬¡ï¼ |
| | | opp.of_lost_system_processor__c += lost.Quantity__c; // 失å主æºå°æ°ï¼ç´¯å ï¼ |
| | | |
| | | // 失å产å123 start |
| | | if (opp.CompetitorProduct1__c == null) { |
| | | opp.CompetitorProduct1__c = lost_product_name(lost.LostProductName__c, lost.LostProductMannual__c); |
| | | }else if (opp.CompetitorProduct2__c == null) { |
| | | opp.CompetitorProduct2__c = lost_product_name(lost.LostProductName__c, lost.LostProductMannual__c); |
| | | }else if (opp.CompetitorProduct3__c == null) { |
| | | opp.CompetitorProduct3__c = lost_product_name(lost.LostProductName__c, lost.LostProductMannual__c); |
| | | System.debug('---lt123---询价失åéé¢---'+opp.LostPrices__c); |
| | | System.debug('---lt123---失忻éé¢ï¼åå
ä¸å«ç¨---'+lcr.TotalAmountLost__c); |
| | | if(lcr.TotalAmountLost__c != null){ |
| | | if(opp.LostPrices__c == null){ |
| | | opp.LostPrices__c = 0; |
| | | } |
| | | // 失å产å123 end |
| | | |
| | | // 失ååç |
| | | opp.PCLLostBrands__c = lost_brand_name(opp.PCLLostBrands__c, lost.PCLLostBrand__r.Lost_By_Company__c, lost.PCLLostBrand__r.Lost_By_Company_Mannual__c); |
| | | |
| | | // 䏿 ç»éå |
| | | opp.Agencies__c = lost_agency_name(opp.Agencies__c, lost.PCLLostBrand__r.Agency__r.Name, lost.PCLLostBrand__r.AgencyMannual__c); |
| | | opp.LostPrices__c += lcr.TotalAmountLost__c; // 失åéé¢ |
| | | System.debug('---lt123---ç´¯å å询价失åéé¢---'+opp.LostPrices__c); |
| | | } |
| | | |
| | | } |
| | | //DB202302247719 lt end |
| | | |
| | | //DB202302247719 注é lt 注éåå ï¼DB202302247719课é¢å·å¤±åæ¥åæ°æ®åªå·å¤±åéé¢ |
| | | // // åå§åä¿ååæ° |
| | | // Map<String, Opportunity> opp_map = new Map<String, Opportunity>(); |
| | | // Map<String, String> prod_map = new Map<String, String>(); |
| | | // Map<String, String> agency_map = new Map<String, String>(); |
| | | |
| | | // // å¾ªç¯æ´çæ°æ® |
| | | // for (PCLLostProduct__c lost : pclLpList) { |
| | | // // 夿æ¯å¦å¯ç¨æ°æ® |
| | | // // if (String.isBlank(lost.LostProductName__c) && String.isBlank(lost.LostProductMannual__c)) { |
| | | // // continue; |
| | | // // } |
| | | // // 询价id |
| | | // String opp_id = lost.PCLLostBrand__r.Lost_cancel_report__r.Opportunity__c; |
| | | // // 询价 |
| | | // Opportunity opp = opp_map.get(opp_id); |
| | | // if (opp == null) { |
| | | // opp = new Opportunity(); |
| | | // opp.Id = opp_id; |
| | | // opp.of_lost_system_processor__c = 0; |
| | | // opp_map.put(opp_id, opp); |
| | | // } |
| | | |
| | | // //20230215 lt DB202302247719 start |
| | | // System.debug('---lt123---询价失åéé¢---'+opp.LostPrices__c); |
| | | // System.debug('---lt123---失忻éé¢ï¼åå
ä¸å«ç¨---'+lost.PCLLostBrand__r.Lost_cancel_report__r.TotalAmountLost__c); |
| | | |
| | | // if(lost.PCLLostBrand__r.Lost_cancel_report__r.TotalAmountLost__c != null){ |
| | | // if(opp.LostPrices__c == null){ |
| | | // opp.LostPrices__c = 0; |
| | | // } |
| | | // opp.LostPrices__c += lost.PCLLostBrand__r.Lost_cancel_report__r.TotalAmountLost__c; // 失åéé¢ |
| | | // } |
| | | |
| | | // //DB202302247719 注é lt 注éåå ï¼DB202302247719课é¢å·å¤±åæ¥åæ°æ®åªå·å¤±åéé¢ |
| | | // // èµå¼ |
| | | // // opp.LostTypeText__c = lost.PCLLostBrand__r.Lost_cancel_report__r.LostType__c; // 失åç±»å |
| | | // // //opp.LostPrices__c = lost.PCLLostBrand__r.Lost_cancel_report__r.LostTotalAmount__c; // 失åéé¢ |
| | | // // opp.Lost_reason_main__c = lost.PCLLostBrand__r.Lost_reason_main__c; // 失ååå ï¼ä¸»ï¼ |
| | | // // opp.Lost_Reason_Sub__c = lost.PCLLostBrand__r.Lost_Reason_Sub__c; // 失åçç±ï¼æ¬¡ï¼ |
| | | // // opp.of_lost_system_processor__c += lost.Quantity__c; // 失å主æºå°æ°ï¼ç´¯å ï¼ |
| | | |
| | | |
| | | // // 失å产å123 start |
| | | // // if (opp.CompetitorProduct1__c == null) { |
| | | // // opp.CompetitorProduct1__c = lost_product_name(lost.LostProductName__c, lost.LostProductMannual__c); |
| | | // // }else if (opp.CompetitorProduct2__c == null) { |
| | | // // opp.CompetitorProduct2__c = lost_product_name(lost.LostProductName__c, lost.LostProductMannual__c); |
| | | // // }else if (opp.CompetitorProduct3__c == null) { |
| | | // // opp.CompetitorProduct3__c = lost_product_name(lost.LostProductName__c, lost.LostProductMannual__c); |
| | | // // } |
| | | // // 失å产å123 end |
| | | |
| | | // // 失ååç |
| | | // // opp.PCLLostBrands__c = lost_brand_name(opp.PCLLostBrands__c, lost.PCLLostBrand__r.Lost_By_Company__c, lost.PCLLostBrand__r.Lost_By_Company_Mannual__c); |
| | | |
| | | // // 䏿 ç»éå |
| | | // // opp.Agencies__c = lost_agency_name(opp.Agencies__c, lost.PCLLostBrand__r.Agency__r.Name, lost.PCLLostBrand__r.AgencyMannual__c); |
| | | // //DB202302247719 注é lt |
| | | // //20230215 lt DB202302247719 end |
| | | |
| | | // } |
| | | //DB202302247719 注é lt 注éåå ï¼DB202302247719课é¢å·å¤±åæ¥åæ°æ®åªå·å¤±åéé¢ |
| | | System.debug(opp_map); |
| | | StaticParameter.EscapeOppandStaTrigger = true; //20230215 lt DB202302247719 |
| | | update opp_map.values(); |
| | | StaticParameter.EscapeOppandStaTrigger = true; //20230215 lt DB202302247719 |
| | | } |
| | | |
| | | //DB202302247719 注é lt 注éåå ï¼DB202302247719课é¢å·å¤±åæ¥åæ°æ®åªå·å¤±åéé¢ |
| | | // 失å对æåå· |
| | | private String lost_product_name(String lost_product, String lost_product_mannual) { |
| | | if (String.isBlank(lost_product) && String.isNotBlank(lost_product_mannual)) { |
| | | return lost_product_mannual; |
| | | } |
| | | return lost_product; |
| | | } |
| | | // private String lost_product_name(String lost_product, String lost_product_mannual) { |
| | | // if (String.isBlank(lost_product) && String.isNotBlank(lost_product_mannual)) { |
| | | // return lost_product_mannual; |
| | | // } |
| | | // return lost_product; |
| | | // } |
| | | |
| | | // 失ååç |
| | | private String lost_brand_name(String lost_brand_in_opp, String lost_brand, String lost_brand_mannual) { |
| | | // åå§ååæ° |
| | | String plus = ''; |
| | | // 夿 |
| | | // SWAG-CCC6F6 2022-04-22 ssm start |
| | | // 询价ä¸é½åªæ¾ç¤ºé项å表çå¼ï¼ä¸éè¦æå¨çå¼ |
| | | // if ('å
¶ä»'.equals(lost_brand) && String.isNotBlank(lost_brand_mannual)) { |
| | | // plus = lost_brand_mannual; |
| | | // } else { |
| | | // // 失ååç |
| | | // private String lost_brand_name(String lost_brand_in_opp, String lost_brand, String lost_brand_mannual) { |
| | | // // åå§ååæ° |
| | | // String plus = ''; |
| | | // // 夿 |
| | | // // SWAG-CCC6F6 2022-04-22 ssm start |
| | | // // 询价ä¸é½åªæ¾ç¤ºé项å表çå¼ï¼ä¸éè¦æå¨çå¼ |
| | | // // if ('å
¶ä»'.equals(lost_brand) && String.isNotBlank(lost_brand_mannual)) { |
| | | // // plus = lost_brand_mannual; |
| | | // // } else { |
| | | // // plus = lost_brand; |
| | | // // } |
| | | // plus = lost_brand; |
| | | // // SWAG-CCC6F6 2022-04-22 ssm end |
| | | // // åå§åè¿åå¼ |
| | | // if (String.isBlank(lost_brand_in_opp)) { |
| | | // lost_brand_in_opp = ''; |
| | | // } |
| | | plus = lost_brand; |
| | | // SWAG-CCC6F6 2022-04-22 ssm end |
| | | // åå§åè¿åå¼ |
| | | if (String.isBlank(lost_brand_in_opp)) { |
| | | lost_brand_in_opp = ''; |
| | | } |
| | | // æ¼æ¥ |
| | | if (String.isNotBlank(plus) && !lost_brand_in_opp.contains(plus)) { |
| | | // å¢å åéæ è¯ |
| | | if (String.isNotBlank(lost_brand_in_opp)) { |
| | | lost_brand_in_opp += ','; |
| | | } |
| | | lost_brand_in_opp += plus; |
| | | } |
| | | return lost_brand_in_opp; |
| | | } |
| | | // // æ¼æ¥ |
| | | // if (String.isNotBlank(plus) && !lost_brand_in_opp.contains(plus)) { |
| | | // // å¢å åéæ è¯ |
| | | // if (String.isNotBlank(lost_brand_in_opp)) { |
| | | // lost_brand_in_opp += ','; |
| | | // } |
| | | // lost_brand_in_opp += plus; |
| | | // } |
| | | // return lost_brand_in_opp; |
| | | // } |
| | | |
| | | // 䏿 ç»éå |
| | | private String lost_agency_name(String lost_agency_in_opp, String lost_agency, String lost_agency_mannual) { |
| | | // åå§ååæ° |
| | | String plus = ''; |
| | | // 夿 |
| | | // SWAG-CCC6F6 2022-04-22 ssm start |
| | | // 询价ä¸é½åªæ¾ç¤ºé项å表çå¼ï¼ä¸éè¦æå¨çå¼ |
| | | // if ('对æç»éå'.equals(lost_agency) && String.isNotBlank(lost_agency_mannual)) { |
| | | // plus = lost_agency_mannual; |
| | | // } else { |
| | | // // 䏿 ç»éå |
| | | // private String lost_agency_name(String lost_agency_in_opp, String lost_agency, String lost_agency_mannual) { |
| | | // // åå§ååæ° |
| | | // String plus = ''; |
| | | // // 夿 |
| | | // // SWAG-CCC6F6 2022-04-22 ssm start |
| | | // // 询价ä¸é½åªæ¾ç¤ºé项å表çå¼ï¼ä¸éè¦æå¨çå¼ |
| | | // // if ('对æç»éå'.equals(lost_agency) && String.isNotBlank(lost_agency_mannual)) { |
| | | // // plus = lost_agency_mannual; |
| | | // // } else { |
| | | // // plus = lost_agency; |
| | | // // } |
| | | // plus = lost_agency; |
| | | // // SWAG-CCC6F6 2022-04-22 ssm end |
| | | // // åå§åè¿åå¼ |
| | | // if (String.isBlank(lost_agency_in_opp)) { |
| | | // lost_agency_in_opp = ''; |
| | | // } |
| | | plus = lost_agency; |
| | | // SWAG-CCC6F6 2022-04-22 ssm end |
| | | // åå§åè¿åå¼ |
| | | if (String.isBlank(lost_agency_in_opp)) { |
| | | lost_agency_in_opp = ''; |
| | | } |
| | | // æ¼æ¥ |
| | | if (String.isNotBlank(plus) && !lost_agency_in_opp.contains(plus)) { |
| | | // å¢å åéæ è¯ |
| | | if (String.isNotBlank(lost_agency_in_opp)) { |
| | | lost_agency_in_opp += ','; |
| | | } |
| | | lost_agency_in_opp += plus; |
| | | } |
| | | return lost_agency_in_opp; |
| | | } |
| | | // // æ¼æ¥ |
| | | // if (String.isNotBlank(plus) && !lost_agency_in_opp.contains(plus)) { |
| | | // // å¢å åéæ è¯ |
| | | // if (String.isNotBlank(lost_agency_in_opp)) { |
| | | // lost_agency_in_opp += ','; |
| | | // } |
| | | // lost_agency_in_opp += plus; |
| | | // } |
| | | // return lost_agency_in_opp; |
| | | // } |
| | | //DB202302247719 注é lt 注éåå ï¼DB202302247719课é¢å·å¤±åæ¥åæ°æ®åªå·å¤±åéé¢ |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | |
| | |
| | | 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 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,RecordTypeId='0129D000001NacD');//æ£å¼01210000000aMAE |
| | | 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,RecordTypeId='0129D000001NacD');//æµè¯0129D000001NacD |
| | | insert new List<Product2> {pro1,pro2}; |
| | | |
| | | //失ååå· |
| | |
| | | pCunFangDi = bieCunFangDi; |
| | | // æ¬é¨åå§å¼ |
| | | // Modify by Liu 20220908 Solutionæ¬é¨è¯¾é¢å¯¹åº start |
| | | if (parentObj.Rental_Apply__r.Salesdepartment__c == '16.æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨') { |
| | | if (parentObj.Rental_Apply__r.Salesdepartment__c == '16.Solutionæ¬é¨') { |
| | | bieBenBu = '16.Solutionæ¬é¨'; |
| | | } else { |
| | | bieBenBu = parentObj.Rental_Apply__r.Salesdepartment__c; |
| | |
| | | // soql += ' and Salesdepartment__c = \'' + String.escapeSingleQuotes(bieBenBu) + '\''; |
| | | // Modify by Liu 20220908 Solutionæ¬é¨è¯¾é¢å¯¹åº start |
| | | //List<String> bieBenBuList = bieBenBu.split(','); |
| | | List<String> bieBenBuList = bieBenBu.replace('16.Solutionæ¬é¨', '16.æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨').split(','); |
| | | List<String> bieBenBuList = bieBenBu.replace('16.Solutionæ¬é¨', '16.Solutionæ¬é¨').split(','); |
| | | // Modify by Liu 20220908 Solutionæ¬é¨è¯¾é¢å¯¹åº end |
| | | soql += RentalFixtureSetAssignController.setSoql('Salesdepartment__c', bieBenBuList); |
| | | /*String benbuStr = ''; |
| | |
| | | |
| | | // Modify by Liu 20220908 Solutionæ¬é¨è¯¾é¢å¯¹åº start |
| | | //bieBenBu = obj.salesdepartments; |
| | | bieBenBu = obj.salesdepartments.replace('16.æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨', '16.Solutionæ¬é¨'); |
| | | bieBenBu = obj.salesdepartments.replace('16.Solutionæ¬é¨', '16.Solutionæ¬é¨'); |
| | | // Modify by Liu 20220908 Solutionæ¬é¨è¯¾é¢å¯¹åº end |
| | | |
| | | // æéåï¼é»è®¤æéå¼éè¦å¨ç»é¢ç«¯æ¾ç¤º å¤ååç±» |
| | |
| | | |
| | | // Modify by Liu 20220908 Solutionæ¬é¨è¯¾é¢å¯¹åº start |
| | | //keyObj.salesdepartments = bieBenBu; |
| | | keyObj.salesdepartments = bieBenBu.replace('16.Solutionæ¬é¨', '16.æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨'); |
| | | keyObj.salesdepartments = bieBenBu.replace('16.Solutionæ¬é¨', '16.Solutionæ¬é¨'); |
| | | // Modify by Liu 20220908 Solutionæ¬é¨è¯¾é¢å¯¹åº end |
| | | |
| | | RentalFixtureSetAssignController.getsequencekeyList(keyObj); |
| | |
| | | opp.Name = 'GZ-SP-GD3187'; |
| | | opp.Trade__c = 'å
貿'; |
| | | opp.StageName = 'å¼å'; |
| | | opp.CloseDate = date.newinstance(2022, 11, 30); |
| | | opp.CloseDate = date.newinstance(2023, 11, 30); |
| | | insert opp; |
| | | // ååå¾ |
| | | List<Opportunity> oppList = |
| | |
| | | opp.Name = 'GZ-SP-GD3187'; |
| | | opp.Trade__c = 'å
貿'; |
| | | opp.StageName = 'å¼å'; |
| | | opp.CloseDate = date.newinstance(2022, 11, 30); |
| | | opp.CloseDate = date.newinstance(2023, 11, 30); |
| | | opp.Group_purchase_PCL__c = true; |
| | | insert opp; |
| | | System.Test.StopTest(); |
| | |
| | | //XLIU-CGAD3Z ãå§æãå¤åç¸å
³åæ®µä¼ è¾è³SAP LY 20220714 end |
| | | |
| | | // å°è¾¾ä¸é ä¿®çåä¿®æ¹æ¶ ä¸éåå by20230104 start |
| | | if ( rpr.ZFLAG_SX__c == true){ |
| | | if ((rpr.ZFLAG_SX__c == true && oldMap.get(rpr.Id).ZFLAG_SX__c !=rpr.ZFLAG_SX__c && rpr.Agreed_Date__c!=null) || |
| | | (rpr.ZFLAG_SX__c == false && oldMap.get(rpr.Id).ZFLAG_SX__c !=rpr.ZFLAG_SX__c && rpr.Agreed_Date__c==null) ){ |
| | | if (NFM103Controller.NFM103_Ids.contains(rpr.Id) == false) { |
| | | NFM103_Ids.add(rpr.Id); |
| | | rprIds.add(rpr.Id); |
| | | updMap.put(rpr.Id, new Repair__c(Id = rpr.Id)); |
| | | updMap.put(rpr.Id, new Repair__c(Id = rpr.Id,Address_type__c = 'X')); |
| | | NFM103Controller.debug_msg += 'NFM103_callout_update3_' + rpr.Name; |
| | | } |
| | | } |
| | |
| | | // NFM103Controller.callout(iflog.Id, rprIds); |
| | | String uid = UserInfo.getUserId(); |
| | | String BUid = System.Label.Batch_User_Id; |
| | | String OLYid = System.Label.OlympusSystem_ID; |
| | | System.debug('zheli'); |
| | | if (uid.substring(0,15) == BUid.substring(0,15)) { |
| | | if (uid.substring(0,15) == BUid.substring(0,15) || uid.substring(0,15) == OLYid.substring(0,15)) { |
| | | NFM103Controller.calloutNotfuture(iflog.Id, rprIds, null); |
| | | }else{ |
| | | NFM103Controller.callout(iflog.Id, rprIds, null); |
| | |
| | | ,Maintenance_Contract__r.Sum_repair_price_new__c |
| | | ,Repair_Quotation_Id__r.Usage_Ratio_Price__c |
| | | ,Maintenance_Contract__r.Remaining_Amount__c |
| | | ,Maintenance_Contract__r.Limit_Price__c |
| | | ,ZFLAG_CGSX__c |
| | | ,ZFLAG_SX__c |
| | | // ä¸éåå by20230104 end |
| | |
| | | && rpr.FSE_ApplyForRepair_Day__c >= rpr.Contract_Start_Date__c && rpr.FSE_ApplyForRepair_Day__c <= rpr.Contract_End_Date__c) { |
| | | // ä¸éåå by20230201 LY start 妿æ¯ä¸éååæå»å¤ææ¯å¦âè¶
è¿ååä¸éâåâå°è¾¾ä¸éâæ è¯ |
| | | if (rpr.Maintenance_Contract__r.Limit_Price__c == true){ |
| | | // âè¶
è¿ååä¸éâ为trueï¼ä¸ä¼ ååä¿¡æ¯ï¼ZFLAG_CGSXä¼ Y |
| | | if (rpr.ZFLAG_CGSX__c == true) { |
| | | element.ZFLAG_CGSX = 'Y'; |
| | | } |
| | | //âå°è¾¾ä¸éâ为trueï¼ä¼ ååä¿¡æ¯ï¼ZFLAG_SXä¼ Y |
| | | if (rpr.ZFLAG_SX__c == true) { |
| | | element.ZFLAG_SX = 'Y'; |
| | | |
| | | if (rpr.ZFLAG_CGSX__c == true) { // âè¶
è¿ååä¸éâ为trueï¼ä¸ä¼ ååä¿¡æ¯ï¼ZFLAG_CGSXä¼ Y |
| | | element.ZFLAG_CGSX = 'X'; |
| | | }else if (rpr.ZFLAG_SX__c == true) { //âå°è¾¾ä¸éâ为trueï¼ä¼ ååä¿¡æ¯ï¼ZFLAG_SXä¼ Y |
| | | element.ZFLAG_SX = 'X'; |
| | | element.RepairContractObject = 'X'; |
| | | element.RepairContractNumber = rpr.Maintenance_Contract__r.Maintenance_Contract_No__c; |
| | | }else { //没è¶
è¿ååä¸é乿²¡è¾¾å°ä¸é ä¼ ååä¿¡æ¯ ZFLAG_CGSXä¼ ç©º ZFLAG_SXä¼ ç©º |
| | | element.RepairContractObject = 'X'; |
| | | element.RepairContractNumber = rpr.Maintenance_Contract__r.Maintenance_Contract_No__c; |
| | | } |
| | | }else { |
| | | }else { //䏿¯ä¸éåå ä¼ ååä¿¡æ¯ |
| | | element.RepairContractObject = 'X'; |
| | | element.RepairContractNumber = rpr.Maintenance_Contract__r.Maintenance_Contract_No__c; |
| | | } |
| | |
| | | // ã¨ã©ã¼ãçºçããå ´å |
| | | System.debug(Logginglevel.ERROR, 'NFM103_' + iflog.Name + ':' + ex.getMessage()); |
| | | System.debug(Logginglevel.ERROR, 'NFM103_' + iflog.Name + ':' + ex.getStackTraceString()); |
| | | //NFM105触å103æ¥å£ 20230303 LY start |
| | | // logstr += ex.getMessage(); |
| | | // iflog.ErrorLog__c += ex.getMessage() + '\n'; |
| | | // iflog.ErrorLog__c += ex.getStackTraceString() + '\n'; |
| | | |
| | | System.debug('æ è®°0--------------------1:' + rowData.retry_cnt__c); |
| | | // Callout from triggers are currently not supported. |
| | | System.debug('NFM201jiekou'+ex.getMessage()); |
| | | if (!String.valueOf(ex.getMessage()).contains('Callout from triggers')) { |
| | | |
| | | logstr += ex.getMessage(); |
| | | iflog.ErrorLog__c += ex.getMessage() + '\n'; |
| | | iflog.ErrorLog__c += ex.getStackTraceString() + '\n'; |
| | | |
| | | System.debug('æ è®°0--------------------1:' + rowData.retry_cnt__c); |
| | | } |
| | | //NFM105触å103æ¥å£ 20230303 LY end |
| | | //---Gaozw---add |
| | | if (rowData.retry_cnt__c == null) rowData.retry_cnt__c = 0; |
| | | if (rowData.retry_cnt__c < batch_retry_max_cnt) { |
| | |
| | | else if (di.DiscountType == 'è¿è¾ç´¢èµ') { |
| | | rq.Delivery_compensation__c = String.isBlank(di.DiscountAmount) ? null : Decimal.valueOf(di.DiscountAmount); |
| | | } |
| | | //DB202303075842 LY 2023/3/6 add |
| | | else if (di.DiscountType == 'ä¸éåå'){ |
| | | rq.LimitPrice_contract_discount_amount__c = String.isBlank(di.DiscountAmount) ? null : Decimal.valueOf(di.DiscountAmount); |
| | | } |
| | | // |
| | | else if (di.DiscountType == 'å
¶ä»') { |
| | | rq.Other_discount__c = String.isBlank(di.DiscountAmount) ? null : Decimal.valueOf(di.DiscountAmount); |
| | |
| | | ,Maintenance_Contract__c |
| | | ,SerialNumber__c |
| | | ,Agreed_Date__c |
| | | ,Limit_Price__c //ä¸éåå LY 20230209 |
| | | from Repair__c |
| | | where SAPRepairNo__c in :sapRepairNoList |
| | | OR Name in :sfdcRepairNoList] |
| | |
| | | List<ID> updateMC = new List<ID>(); |
| | | if (rprList.size() > 0 ) { |
| | | for (Repair__c rc : rprList) { |
| | | if (rc.Limit_Price__c) { |
| | | //B95-æ¥ä»·åæç¡®è®¤ãB99-æ¥ä»·åæç¡®è®¤åæ¶ãA95-åæ¶ä¿®çåçãA96-åæ¶ä¿®çãA99-ä¿®çåå
³é æ´æ°ååæé´ä¿®çéé¢ |
| | | if (rc.RepairOrderStatusCode__c =='B95' || rc.RepairOrderStatusCode__c =='B99' || rc.RepairOrderStatusCode__c =='A99' || rc.RepairOrderStatusCode__c =='A95' || rc.RepairOrderStatusCode__c =='A96'){ |
| | | Maintenance_Contract__c mc = new Maintenance_Contract__c(); |
| | | if (!updateMC.contains(rc.Maintenance_Contract__c)) { |
| | | mc.Id = rc.Maintenance_Contract__c; |
| | | } |
| | | updateMC.add(mc.Id); |
| | | } |
| | | } |
| | | } |
| | | if (updateMC.size()>0) { |
| | | Database.executeBatch(new RollupToMaintenanceContractBatch(updateMC), 1); |
| | | } |
| | | } |
| | | //ä¸éåå LY 20230131 end |
| | | |
| | | //add by rentx 2021-3-4 start |
| | |
| | | |
| | | String rowDataStr = NFMUtil.getRowDataStr(rowData); |
| | | List<GeneralData> geDataList = (List<GeneralData>) JSON.deserialize(rowDataStr, List<GeneralData>.class); |
| | | System.debug('zheli00:'+geDataList.size()); |
| | | if (geDataList == null || geDataList.size() == 0) { |
| | | return; |
| | | } |
| | |
| | | |
| | | //æ¥æ¾åæ´èµæ¬åæ¥æçä¿æè®¾å¤(æ ¹æ®å
¬å¸ä»£ç ååºå®èµäº§ç¼å·) |
| | | List<Asset> assetNumberAssetList = null; |
| | | System.debug('zheli11:'+InternalAssetnumberkeyList.size()); |
| | | if (InternalAssetnumberkeyList.size() > 0) { |
| | | |
| | | assetNumberAssetList = [Select Id, Name, Product2.ProductCode, Product2.Dealer_special_Object__c , Product2.Dealer_Object__c, |
| | |
| | | } |
| | | } |
| | | } |
| | | System.debug('zheli22:'+companyCodeAssetNumberMap.size()); |
| | | |
| | | List<String> fixtureSetId = new List<String>(); |
| | | Map<String,String> fixmodelNo_proIdMap = new Map<String,String>(); |
| | |
| | | fixtrueSetDetailMap.put(fixSetDetail.UniqueKey__c,fixSetDetail.Id); |
| | | } |
| | | |
| | | |
| | | System.debug('zheli01:'+genlDatas.size()); |
| | | if (genlDatas.size() > 0) { |
| | | List<String> receivingNoteOnlyInsertList = new List<String>(); |
| | | |
| | |
| | | } |
| | | |
| | | if (String.isBlank(dnInfo.SerialNumber)) { |
| | | System.debug('zheli99'); |
| | | continue; |
| | | } |
| | | |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (String.isBlank(dnInfo.SerialNumber)) { |
| | | // 20230221 ljh start |
| | | // if (String.isBlank(dnInfo.SerialNumber)) { |
| | | if (info.ProcessType == '1' && String.isBlank(dnInfo.SerialNumber)) { |
| | | // 20230221 ljh end |
| | | continue; |
| | | } |
| | | |
| | |
| | | } else { |
| | | //ProcessType(å¤çæ¹å¼)为2æ¶ï¼æ´æ°ä¿æè®¾å¤çAsset_day__c(èµäº§åæ¥æ) |
| | | String assetNumberStr = info.CompanyCode + dnInfo.AssetNumber; |
| | | // System.debug('====='+Integer.valueOf(assetNumberStr+companyCodeAssetNumberMap)); |
| | | System.debug('zheli====='+Integer.valueOf(assetNumberStr+companyCodeAssetNumberMap)); |
| | | if ( companyCodeAssetNumberMap.containsKey(assetNumberStr)) { |
| | | |
| | | assetZB = companyCodeAssetNumberMap.get(assetNumberStr); |
| | |
| | | global class NFM402Batch implements Database.Batchable<sObject>, Database.AllowsCallouts { |
| | | //20230203 lt 计åçä½ä¸ä¼å --- ç»§æ¿å â, Database.Statefulâï¼ä¸ç¶removeOtherScæ¹æ³ç©ºæé |
| | | global class NFM402Batch implements Database.Batchable<sObject>, Database.AllowsCallouts, Database.Stateful { |
| | | public String query; |
| | | |
| | | //20230203 lt 计åçä½ä¸ä¼å ä¸å°æ¶ä¸¤æ¬¡ start |
| | | private BatchEmailUtil.ScBean scB1; |
| | | //20230203 lt 计åçä½ä¸ä¼å ä¸å°æ¶ä¸¤æ¬¡ end |
| | | |
| | | global NFM402Batch() { |
| | | this.query = query; |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext bc) { |
| | | |
| | | //20230203 lt 计åçä½ä¸ä¼å ä¸å°æ¶ä¸¤æ¬¡ start |
| | | scB1 = BatchEmailUtil.setSc1('NFM402Schedule', 0, 23, 0, '0 30 *', null); |
| | | if (System.Test.isRunningTest() == false) { |
| | | for(CronTrigger ct : [SELECT Id FROM CronTrigger WHERE CronJobDetail.Name =: scB1.scName]) { |
| | | System.abortJob(ct.Id); |
| | | } |
| | | system.schedule(scB1.scName, scB1.scTime, new NFM402Schedule()); |
| | | } |
| | | //20230203 lt 计åçä½ä¸ä¼å ä¸å°æ¶ä¸¤æ¬¡ end |
| | | |
| | | query = 'select id from Repair__c where AsyncData__c = true and (Complaint_Number__c = null or Complaint_Number__c = \'\')'; |
| | | return Database.getQueryLocator(query); |
| | | } |
| | |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | BatchEmailUtil.removeOtherSc('NFM402Schedule', scB1.scName); //20230203 lt 计åçä½ä¸ä¼å |
| | | // if (Test.isRunningTest() == false) { |
| | | //update by rentongxiao çæPDF |
| | | // Database.executeBatch(new RepairToPDFBatch(), 100); |
| | |
| | | tenders.Monitoring = new NFMUtil.Monitoring(); |
| | | tenders.Monitoring.Tag = 'MSGH'; |
| | | tenders.Monitoring.Sender = 'SFDC'; |
| | | tenders.Monitoring.Receiver = 'SPO'; |
| | | tenders.Monitoring.Receiver = 'QLM'; |
| | | tenders.Monitoring.MessageType = 'NFM504'; |
| | | tenders.Monitoring.MessageGroupNumber = DTenInfo.CursorMark__c; |
| | | tenders.Monitoring.NumberOfRecord = '2'; |
| | |
| | | |
| | | //åæ¾æ¥éä¿¡æ¯ |
| | | BatchIF_Log__c iflog504 = new BatchIF_Log__c(); |
| | | iflog504.Type__c = 'NFM501'; |
| | | iflog504.Type__c = 'NFM504'; |
| | | iflog504.RowDataFlg__c = false; |
| | | iflog504.Log__c = ' '; |
| | | iflog504.ErrorLog__c = ' '; |
| | |
| | | Monitoring.TransmissionDateTime = tenders.Monitoring.TransmissionDateTime; |
| | | Monitoring.Text = ''; |
| | | |
| | | rowData = NFMUtil.makeRowData(Monitoring, 'NFM501', tenders); |
| | | rowData = NFMUtil.makeRowData(Monitoring, 'NFM504', tenders); |
| | | |
| | | System.debug('---------2----------' + rowData); |
| | | execute(rowData, iflog504, token); |
| | |
| | | logstr += '\nend'; |
| | | if (repairs.size() > 0) { |
| | | // 2022-05-05 zyh update start |
| | | for (RepairOrderInfo roi : repairs ) { |
| | | /*for (RepairOrderInfo roi : repairs ) { |
| | | repairs1.add(roi); |
| | | rowData = NFMUtil.makeRowData(iflog, LOG_TYPE, repairs1); |
| | | // 2022-05-07 zyh update start |
| | |
| | | // rowData = NFMUtil.makeRowData(iflog, LOG_TYPE, repairs); |
| | | // execute(rowData, iflog); |
| | | repairs1 = new List < RepairOrderInfo > (); |
| | | }// 2022-08-19 zyh å°ç¨åºå¼æ¥å¤çï¼æ¢å¤æ¹éåé |
| | | */ // 2023-02-02 zyh äºä¸ªä¸æ¹æ¨éå°ç¨åº 注é䏿¹forå¾ªç¯ |
| | | // 2023-02-02 zyh äºä¸ªä¸æ¹æ¨éå°ç¨åº start |
| | | for (Integer i=1; i <= repairs.size();i++ ) { |
| | | if(Math.mod(i, 5) > 0 ){ |
| | | repairs1.add(repairs[i-1]); |
| | | if(i == repairs.size()){ |
| | | rowData = NFMUtil.makeRowData(iflog, LOG_TYPE, repairs1); |
| | | if (String.isBlank(rowData.MessageGroupNumber__c)) { |
| | | rowData.MessageGroupNumber__c = nowStr; |
| | | } |
| | | execute1(rowData, iflog); |
| | | } |
| | | }else{ |
| | | repairs1.add(repairs[i-1]); |
| | | rowData = NFMUtil.makeRowData(iflog, LOG_TYPE, repairs1); |
| | | if (String.isBlank(rowData.MessageGroupNumber__c)) { |
| | | rowData.MessageGroupNumber__c = nowStr; |
| | | } |
| | | execute1(rowData, iflog); |
| | | repairs1 = new List < RepairOrderInfo > (); |
| | | } |
| | | |
| | | } |
| | | // 2023-02-02 zyh äºä¸ªä¸æ¹æ¨éå°ç¨åº end |
| | | upsert logList; |
| | | upsert rowList; |
| | | // 2022-05-11 zyh update start |
| | |
| | | rowDataSFDC.retry_cnt__c++; |
| | | // 20230201 ljh start |
| | | // LogAutoSendSchedule.logId = rowDataSFDC.Id; |
| | | // LogAutoSendSchedule.assignOneMinute(); |
| | | LogAutoSendSchedule.assignOneMinute(rowDataSFDC.MessageGroupNumber__c,rowDataSFDC.Type__c); |
| | | LogAutoSendSchedule.assignOneMinute(); |
| | | // LogAutoSendSchedule.assignOneMinute(rowDataSFDC.MessageGroupNumber__c,rowDataSFDC.Type__c); |
| | | // 20230201 ljh end |
| | | } |
| | | if (rowDataSFDC.retry_cnt__c >= batch_retry_max_cnt) { |
| | |
| | | rowDataSFDC.retry_cnt__c++; |
| | | // 20230201 ljh start |
| | | // LogAutoSendSchedule.logId = rowDataSFDC.Id; |
| | | // LogAutoSendSchedule.assignOneMinute(); |
| | | LogAutoSendSchedule.assignOneMinute(rowDataSFDC.MessageGroupNumber__c,rowDataSFDC.Type__c); |
| | | LogAutoSendSchedule.assignOneMinute(); |
| | | // LogAutoSendSchedule.assignOneMinute(rowDataSFDC.MessageGroupNumber__c,rowDataSFDC.Type__c); |
| | | // 20230201 ljh end |
| | | } |
| | | if (rowDataSFDC.retry_cnt__c >= batch_retry_max_cnt){ |
| | |
| | | rowDataSFDC.retry_cnt__c++; |
| | | // 20230201 ljh start |
| | | // LogAutoSendSchedule.logId = rowDataSFDC.Id; |
| | | // LogAutoSendSchedule.assignOneMinute(); |
| | | LogAutoSendSchedule.assignOneMinute(rowDataSFDC.MessageGroupNumber__c,rowDataSFDC.Type__c); |
| | | LogAutoSendSchedule.assignOneMinute(); |
| | | // LogAutoSendSchedule.assignOneMinute(rowDataSFDC.MessageGroupNumber__c,rowDataSFDC.Type__c); |
| | | // 20230201 ljh end |
| | | } |
| | | if (rowDataSFDC.retry_cnt__c >= batch_retry_max_cnt) { |
| | |
| | | rowDataSFDC.retry_cnt__c++; |
| | | // 20230201 ljh start |
| | | // LogAutoSendSchedule.logId = rowDataSFDC.Id; |
| | | // LogAutoSendSchedule.assignOneMinute(); |
| | | LogAutoSendSchedule.assignOneMinute(rowDataSFDC.MessageGroupNumber__c,rowDataSFDC.Type__c); |
| | | LogAutoSendSchedule.assignOneMinute(); |
| | | // LogAutoSendSchedule.assignOneMinute(rowDataSFDC.MessageGroupNumber__c,rowDataSFDC.Type__c); |
| | | // 20230201 ljh end |
| | | } |
| | | if (rowDataSFDC.retry_cnt__c >= batch_retry_max_cnt){ |
| | |
| | | global class GeData { |
| | | public RepairOderInfo repairOderInfo; |
| | | public ApplyRepairInfo applyRepairInfo; |
| | | public problem problem; |
| | | public Logistics logistics; //ç©æµ zhj æ¹é æ°å¢å段 2023-02-14 |
| | | public String item0010; //å¤ç¨å段 zhj æ¹é æ°å¢å段 2023-02-14 |
| | | public String item0020; //å¤ç¨å段 zhj æ¹é æ°å¢å段 2023-02-14 |
| | | public String item0030; //å¤ç¨å段 zhj æ¹é æ°å¢å段 2023-02-14 |
| | | public String item0040; //å¤ç¨å段 zhj æ¹é æ°å¢å段 2023-02-14 |
| | | public String item0050; //å¤ç¨å段 zhj æ¹é æ°å¢å段 2023-02-14 |
| | | } |
| | | //æ¥ä¿®åä¿¡æ¯ |
| | | public class RepairOderInfo { |
| | |
| | | public String cancelReportReason; //åæ¶æ¥ä¿®åå |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | //设å¤ä¿¡æ¯ |
| | | public class ApplyRepairInfo { |
| | |
| | | public String equipmentCd; //æºèº«ç¼ç (å·¥ç¨å¸) |
| | | public String responseResultDesc; //åºå¯¹æè¿° |
| | | public String processResult; //å¤çç»æ |
| | | } |
| | | //æ
éå¤çä¿¡æ¯ |
| | | public class problem { |
| | | public String dateReceiptQuestions; //æè¯ç¥ææ¥ï¼Complaint Aware Dateï¼ |
| | | public String ifDeadHurt; //æ¯å¦ææ»äº¡ãä¼¤å®³ãææ |
| | | public String problemOccurred; //é®é¢åçæ¶é´æ
åµ |
| | | public String problemOccurredSelect; //é®é¢åçæ¶é´æ
åµ å
¶ä» |
| | | public String reportAdverseEvents; //å»é¢ææ²¡æåæ¿åºæºå
³æ¥åä¸è¯äºä»¶æçä¼¼ä¸è¯äºä»¶ |
| | | public String whatProject; //åçæ¯åªä¸ªé¡¹ç® |
| | | public String operationOrExaminationName; //ææ¯/æ£æ¥åç§° |
| | | public String breakORFallOff; //æ¯å¦æåçæè£æè±è½ |
| | | public String useFailProductFinish; //æ¯å¦ç¨è¯¥äº§åå®æäºææ¯/æ£æ¥ |
| | | public String supportingProducts; //é
å¥ä½¿ç¨äº§å |
| | | public String afterFailureInformation; //åç°æ
éåï¼å»é¢å¯¹æ£è
çå¤çæ
åµ |
| | | public String delay15Min; //åç°æ
éç°è±¡åï¼æå»¶è¯¯15åé以ä¸çææ¯å®æ½çæ
åµåçå |
| | | public String informationFrom; //ä¿¡æ¯æ¯ä»å»é¢çè°é£éå¾å°ç |
| | | public String failureQInHospital; //å¨å»é¢ï¼æ
éåççé¢çæ¯å¤å° |
| | | public String delayReportReason; //è¶
æ¶æ¥åççç± |
| | | public String isProductFaultRelated; //æ¯å¦ä¸è¿æ¬¡äº§åæ
éç¸å
³ |
| | | } |
| | | //ç©æµ |
| | | public class logistics { |
| | | public String isOts; //æ¯å¦ä½¿ç¨ots |
| | | public String senderOrgCode; //éä¿®æºæä»£ç |
| | | public String senderCompany; //éä¿®æºæåç§° |
| | | public String senderName; //é修人å§å |
| | | public String senderMobilePhone; //éä¿®äººææº |
| | | public String senderAddress; //é修人å°å |
| | | public String recepientCompany; //æ¥æ¶æºæåç§° |
| | | public String recepientName; //æ¥æ¶é修人å§å |
| | | public String recepientMobilePhone; //æ¥æ¶äººææº |
| | | public String recepientAddress; //æ¥æ¶äººå°å |
| | | public String returnWayType; //è¿åæ¹å¼ |
| | | public String orderNumber; //éä¿®ç©æµåå· |
| | | public String failureReason; //ä¸å失败åå |
| | | public String logisticsSendDate; //éä¿®ç©æµå鿥 |
| | | public String item0010; //å¤ç¨å段1 |
| | | public String item0020; //å¤ç¨å段2 |
| | | public String item0030; //å¤ç¨å段3 |
| | | public String item0040; //å¤ç¨å段4 |
| | | public String item0050; //å¤ç¨å段5 |
| | | } |
| | | @HttpPost |
| | | global static void doPost() { |
| | |
| | | return; |
| | | } |
| | | Savepoint sp = Database.setSavepoint(); |
| | | /*List<RepairSubOrder__c> rsoList = [SELECT Id FROM RepairSubOrder__c WHERE Name = ged.repairOderInfo.repairOrderNo2]; |
| | | if (rsoList.size() > 0) { |
| | | |
| | | } |
| | | */ |
| | | try { |
| | | List < RepairSubOrder__c > repairList = new List < RepairSubOrder__c > (); |
| | | Map < String, GeData > gedMap = new Map < String, GeData > (); |
| | |
| | | // éä»¶ä¸è½½æ è®° |
| | | Boolean attachmentDownloadFlg = false; |
| | | String repairOrderNo2Str = 'æ¥ä¿®ååNo [ \n'; |
| | | Map<String,RepairSubOrder__c> RsoMap = new Map<String,RepairSubOrder__c>(); |
| | | for (String repairOrderNo2: gedMap.keySet()) { |
| | | GeData ged = gedMap.get(repairOrderNo2); |
| | | |
| | |
| | | // repair.CancelleRepairTime__c = NFMUtil.parseStr2Date(ged.repairOderInfo.CancelDate); //åçäººåæ¶æ¥ä¿®æ¥ |
| | | repair.RepairCancelReason__c = ged.repairOderInfo.cancelReportReason; //ä¿®çåæ¶åå |
| | | // 2022/4/6 zhangyuheng update end |
| | | |
| | | // 2023-02-20 zyh add start |
| | | repair.DateReceiptQuestions__c = ged.problem.dateReceiptQuestions; //æè¯ç¥ææ¥ï¼Complaint Aware Dateï¼ |
| | | repair.IfDeadHurt__c = ged.problem.ifDeadHurt; //æ¯å¦ææ»äº¡ãä¼¤å®³ãææ |
| | | repair.ProblemOccurred__c = ged.problem.problemOccurred; //é®é¢åçæ¶é´æ
åµ |
| | | repair.ProblemOccurredSelect__c = ged.problem.problemOccurredSelect; //é®é¢åçæ¶é´æ
åµ å
¶ä» |
| | | repair.ReportAdverseEvents__c = ged.problem.reportAdverseEvents; //å»é¢ææ²¡æåæ¿åºæºå
³æ¥åä¸è¯äºä»¶æçä¼¼ä¸è¯äºä»¶ |
| | | repair.WhatProject__c = ged.problem.whatProject; //åçæ¯åªä¸ªé¡¹ç® |
| | | repair.OperationOrExaminationName__c = ged.problem.operationOrExaminationName; //ææ¯/æ£æ¥åç§° |
| | | repair.BreakORFallOff__c = ged.problem.breakORFallOff; //æ¯å¦æåçæè£æè±è½ |
| | | repair.UseFailProductFinish__c = ged.problem.useFailProductFinish; //æ¯å¦ç¨è¯¥äº§åå®æäºææ¯/æ£æ¥ |
| | | repair.SupportingProducts__c = ged.problem.supportingProducts; //é
å¥ä½¿ç¨äº§å |
| | | repair.AfterFailureInformation__c = ged.problem.afterFailureInformation; //åç°æ
éåï¼å»é¢å¯¹æ£è
çå¤çæ
åµ |
| | | repair.Delay15Min__c = ged.problem.delay15Min; //åç°æ
éç°è±¡åï¼æå»¶è¯¯15åé以ä¸çææ¯å®æ½çæ
åµåçå |
| | | repair.InformationFrom__c = ged.problem.informationFrom; //ä¿¡æ¯æ¯ä»å»é¢çè°é£éå¾å°ç |
| | | repair.FailureQInHospital__c = ged.problem.failureQInHospital; //å¨å»é¢ï¼æ
éåççé¢çæ¯å¤å° |
| | | repair.DelayReportReason__c = ged.problem.delayReportReason; //è¶
æ¶æ¥åççç± |
| | | repair.IsProductFaultRelated__c = ged.problem.isProductFaultRelated; //æ¯å¦ä¸è¿æ¬¡äº§åæ
éç¸å
³ |
| | | repair.IsOts__c = ged.logistics.isOts; //æ¯å¦ä½¿ç¨ots |
| | | repair.SenderOrgCode__c = ged.logistics.senderOrgCode; //éä¿®æºæä»£ç |
| | | repair.SenderCompany__c = ged.logistics.senderCompany; //éä¿®æºæåç§° |
| | | repair.SenderName__c = ged.logistics.senderName; //é修人å§å |
| | | repair.SenderMobilePhone__c = ged.logistics.senderMobilePhone; //éä¿®äººææº |
| | | repair.SenderAddress__c = ged.logistics.senderAddress; //é修人å°å |
| | | repair.RecepientCompany__c = ged.logistics.recepientCompany; //æ¥æ¶æºæåç§° |
| | | repair.RecepientName__c = ged.logistics.recepientName; //æ¥æ¶é修人å§å |
| | | repair.RecepientMobilePhone__c = ged.logistics.recepientMobilePhone; //æ¥æ¶äººææº |
| | | repair.RecepientAddress__c = ged.logistics.recepientAddress; //æ¥æ¶äººå°å |
| | | repair.ReturnWayType__c = ged.logistics.returnWayType; //è¿åæ¹å¼ |
| | | repair.OrderNumber__c = ged.logistics.orderNumber; //éä¿®ç©æµåå· |
| | | repair.FailureReason__c = ged.logistics.failureReason; //ä¸å失败åå |
| | | repair.LogisticsSendDate__c = ged.logistics.logisticsSendDate; //éä¿®ç©æµå鿥 |
| | | repair.Item0010__c = ged.item0010; //å¤ç¨å段1 |
| | | repair.Item0020__c = ged.item0020; //å¤ç¨å段2 |
| | | repair.Item0030__c = ged.item0030; //å¤ç¨å段3 |
| | | repair.Item0040__c = ged.item0040; //å¤ç¨å段4 |
| | | repair.Item0050__c = ged.item0050; //å¤ç¨å段5 |
| | | // 2023-02-20 zyh add end |
| | | //LLIU-CG53S9 20220715 LY start |
| | | if ('é®é¢å·²è§£å³'.equals(ged.applyRepairInfo.processResult) ||'éåè´¨éå¤å®'.equals(ged.applyRepairInfo.processResult) ||'ç¨æ·éæ©ä¸ä¿®ç'.equals(ged.applyRepairInfo.processResult)) { |
| | | //LLIU-CG53S9 20220715 LY end |
| | |
| | | repairOrderNo2Str += repairOrderNo2 + '\n'; |
| | | repairList.add(repair); |
| | | repairNoList.add(ged.repairOderInfo.repairOrderNo2); |
| | | RsoMap.put(ged.repairOderInfo.repairOrderNo2,repair); |
| | | } |
| | | // 2022/4/6 zhangyuheng update start |
| | | List<RepairSubOrder__c> repairList1 = [SELECT Id FROM RepairSubOrder__c WHERE RepairSubOrderNo__c in: repairNoList]; |
| | | if (repairList1.size() > 0) { |
| | | List<RepairSubOrder__c> upList = new List<RepairSubOrder__c>(); |
| | | List<RepairSubOrder__c> repairSOList1 = [SELECT Id,RepairSubOrderNo__c,DateReceiptQuestions__c FROM RepairSubOrder__c WHERE RepairSubOrderNo__c in: repairNoList]; |
| | | if (repairSOList1.size() > 0) { |
| | | for(RepairSubOrder__c rso: repairSOList1){ |
| | | if(RsoMap.containsKey(rso.RepairSubOrderNo__c)){ |
| | | RepairSubOrder__c temp = new RepairSubOrder__c(); |
| | | temp = RsoMap.get(rso.RepairSubOrderNo__c); |
| | | temp.Id = rso .Id; |
| | | upList.add(temp); |
| | | } |
| | | } |
| | | logstr += repairOrderNo2Str + ']-å·²åå¨'; |
| | | update upList; |
| | | System.debug(repairSOList1[0].Id + '===' + repairSOList1[0].DateReceiptQuestions__c); |
| | | logstr += repairOrderNo2Str + 'æ´æ°å®æ, æ´æ°æ»æ°ä¸ºï¼' + repairSOList1.size() + '\n' + repairSOList1; |
| | | } |
| | | // if (repairList.size() > 0) {==== 2022/4/6 zhangyuhengæ³¨éæ |
| | | else { |
| | |
| | | } |
| | | //æ¥è¯¢å¸åºId |
| | | Map < String, String > CityMap = new Map < String, String > (); //å¸Map |
| | | List < Address_Level2__c > citytempList = [select Id, Name from Address_Level2__c where Name IN: CityList]; |
| | | //çå¸å¯¹åºè¯¥å
³ç³» LY 20230206 start |
| | | List < Address_Level2__c > citytempList = [select Id, Name,Level1_Name__c from Address_Level2__c where Name IN: CityList]; |
| | | for (Address_Level2__c temp: citytempList) { |
| | | CityMap.put(temp.Name, temp.Id); |
| | | CityMap.put(temp.Level1_Name__c+temp.Name, temp.Id); |
| | | //çå¸å¯¹åºè¯¥å
³ç³» LY 20230206 end |
| | | } |
| | | |
| | | //æ¥è¯¢å»é¢ææäºº |
| | |
| | | //Ly çææ¬èµå¼ start |
| | | hp.State_Text__c = gedata.State; // ç(ææ¬) |
| | | //Ly çææ¬èµå¼ end |
| | | hp.City_Master__c = CityMap.get(gedata.City); // å¸ |
| | | //çå¸å¯¹åºè¯¥å
³ç³» LY 20230206 start |
| | | //hp.City_Master__c = CityMap.get(gedata.City); // å¸ |
| | | hp.City_Master__c = CityMap.get(gedata.State+gedata.City); // å¸ |
| | | //çå¸å¯¹åºè¯¥å
³ç³» LY 20230206 end |
| | | hp.Hospital_Source__c = 'æºæ
§å»ç'; |
| | | upsertAccountList.add(hp); |
| | | System.debug('upsertAccountList'+upsertAccountList); |
| | |
| | | |
| | | Savepoint sp = Database.setSavepoint(); |
| | | |
| | | // 704æ¹å 2023-02-09 ssm start |
| | | // å¢å ä¸ä¸ªæ è®°ï¼å½åä¼ æ°æ®éï¼å»é¢ç®¡çç¼ç 为空æ¶ï¼æ¥éä½ä¸éå |
| | | Boolean error_without_resend = false; |
| | | // 704æ¹å 2023-02-09 ssm end |
| | | |
| | | try{ |
| | | //管çç¼ç List |
| | | List<String> DoctorNoList = new List<String>(); |
| | |
| | | }else{//å¦ |
| | | // continue; |
| | | logstr += 'ä¸åå¨çå»é¢ç®¡çç¼ç :['+accMap.get(ged.HospitalMCode)+']/n'; |
| | | // 704æ¹å 2023-02-09 ssm start |
| | | // 设置æ 记为true |
| | | error_without_resend = true; |
| | | // 704æ¹å 2023-02-09 ssm end |
| | | throw new ControllerUtil.myException('ä¸åå¨çå»é¢ç®¡çç¼ç :['+accMap.get(ged.HospitalMCode)+']'); |
| | | } |
| | | |
| | |
| | | logstr += '\n' + ex.getMessage(); |
| | | iflog.ErrorLog__c = ex.getMessage() + '\n' + ex.getStackTraceString() + '\n' + iflog.ErrorLog__c; |
| | | // å¼å¸¸éå |
| | | // 704æ¹å 2023-02-09 ssm start |
| | | if (error_without_resend) { |
| | | // retry_cnt设置为0 |
| | | rowData.retry_cnt__c = 0; |
| | | logstr += '\nend'; |
| | | rowData.ErrorLog__c += ex.getMessage() + '\n' + ex.getStackTraceString() + '\n'; |
| | | iflog.ErrorLog__c += ex.getMessage() + '\n' + ex.getStackTraceString() + '\n'; |
| | | iflog.Log__c += logstr; |
| | | upsert iflog; |
| | | upsert rowData; |
| | | } else { |
| | | rowData = NFMUtil.LogAutoSend(rowData, ex, null); |
| | | } |
| | | // 704æ¹å 2023-02-09 ssm end |
| | | } |
| | | iflog.Log__c = logstr; |
| | | upsert iflog; |
| | | upsert rowData; |
| | |
| | | request.setEndpoint(hostUrl + '/api/nfm/reCallNFM624Batch?nfm624RequestId=' + GeDataList[0].nfm624RequestId + '&rowDataId=' + rowDataId); |
| | | request.setMethod('GET'); |
| | | request.setHeader('pi-token',documentPI.token); |
| | | request.setTimeout(60000); |
| | | HttpResponse response = http.send(request); |
| | | System.debug('response = ' + response); |
| | | System.debug('send batchSendToAWS624'); |
| | | } |
| | | //zhj batch è°ç¨624æ¥å£çæ¶å éè¦è°ç¨AWS 2023-01-08 end |
| | |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | 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; |
| | | } |
| | | } |
| | |
| | | } else { |
| | | // å·²ç»å卿¥ä»· |
| | | if (String.isNotBlank(oppquoid)) { |
| | | //DB202302464682ãæ¥ä»·å§æãæ¥ä»·å§ææ¹å224 fy start |
| | | Quote quo2 = new Quote(); |
| | | List<Quote> quote = [select Id,Agency1__c,Agency2__c From Quote Where Id =:oppquoid]; |
| | | if(quote.size()>0){ |
| | | quo2=quote[0]; |
| | | } |
| | | quo.Agency1_entrust__c = quo2.Agency1__c; |
| | | quo.Agency2_entrust__c = quo2.Agency2__c; |
| | | //DB202302464682ãæ¥ä»·å§æãæ¥ä»·å§ææ¹å224 fy end |
| | | // æ¥ä»·åååå¾ |
| | | // CHAN-BHNBX6 2019/11/20 START//fy lastbuy 20220310 PricebookEntry.Product2.LastbuyProductFLG__c |
| | | List<QuoteLineItem> qlis = [select id,PricebookEntry.Product2Id,PricebookEntry.Product2.LastbuyProductFLG__c,Quantity__c,CurrencyIsoCode,GuaranteePeriod__c from QuoteLineItem where QuoteId = :oppquoid]; |
| | |
| | | [ SELECT Id,Name,Cancel_Decide__c,Agency_Hospital_Link__c,CreatedDate, PriceRefreshDate__c,Quote_Print_Date__c,Agency1_entrust__c,cancelMultiyearInsurance__c, |
| | | Quote_Date__c,QuoteToName__c,Quote_Expiration_Date__c,Quote_Comment__c,Tender_information__c,Noteplus__c,Lead__c,Opportunity__c, |
| | | TOTAL__c,Discount__c,Pricing__c,Preferential_Trading_Price__c,Contract__c,LastIraiUser__c,MultiYearWarrantyTotalPrice__c,QuoteTotal_Page__c,Estimation_List_Price__c, |
| | | Agency2_entrust__c,//DB202302464682ãæ¥ä»·å§æãæ¥ä»·å§ææ¹å224 fy |
| | | Print_HP_Name__c,Account__c,IraiUser__c,IraiSubject__c,CurrencyIsoCode,IraiName__c,QuoteIrai_Status__c,QuoteProportion__c,Note__c,IraiComment__c |
| | | , urgent__c //20230104 lt DB202212427301 |
| | | FROM QuoteIrai__c Where Id =:quoId]; |
| | |
| | | } |
| | | } |
| | | } |
| | | System.debug('---lt123---descriptions---'+descriptions); |
| | | // System.debug('---lt123---descriptions---'+descriptions); |
| | | if (descriptions.size() <= 0) { |
| | | errorflg = true; |
| | | errorMessage = '没æè¦å§æç产åã'; |
| | |
| | | } |
| | | i += 1; |
| | | } |
| | | System.debug('---lt123---description---'+description); |
| | | // System.debug('---lt123---description---'+description); |
| | | //obsap æ°å¢ç»éå1åæ®µ fy start |
| | | if (!String.isBlank(quo.Agency1_entrust__c)) { |
| | | Account quoteAeName = [select Id,Name from Account where Id =:quo.Agency1_entrust__c]; |
| | |
| | | descriptionsendEmailbody += '\r\n' + '第ä¸ç»éååç§°' + 'ï¼' + quoteAeName.Name; |
| | | //20230116 fy end |
| | | } |
| | | //DB202302464682ãæ¥ä»·å§æãæ¥ä»·å§ææ¹å224 fy start |
| | | if (!String.isBlank(quo.Agency2_entrust__c)) { |
| | | Account quoteAeName2 = [select Id,Name from Account where Id =:quo.Agency2_entrust__c]; |
| | | description += '\r\n' + '第äºç»éååç§°' + 'ï¼' + quoteAeName2.Name; |
| | | descriptionsendEmailbody += '\r\n' + '第äºç»éååç§°' + 'ï¼' + quoteAeName2.Name; |
| | | } |
| | | //DB202302464682ãæ¥ä»·å§æãæ¥ä»·å§ææ¹å224 fy end |
| | | if (quo.QuoteProportion__c!=null) { |
| | | description += '\r\n' + 'æ¥ä»·æ¯ä¾' + 'ï¼' + quo.QuoteProportion__c; |
| | | //20230116 fy start |
| | |
| | | descriptionsendEmailbody += '\r\n' + '第ä¸ç»éå' + 'ï¼' + baseUrl + '/' + quo.Agency1_entrust__c; |
| | | //20230116 fy end |
| | | } |
| | | //DB202302464682ãæ¥ä»·å§æãæ¥ä»·å§ææ¹å224 fy start |
| | | if (!String.isBlank(quo.Agency2_entrust__c)) { |
| | | description += '\r\n' + '第äºç»éå' + 'ï¼' + baseUrl + '/' + quo.Agency2_entrust__c; |
| | | descriptionsendEmailbody += '\r\n' + '第äºç»éå' + 'ï¼' + baseUrl + '/' + quo.Agency2_entrust__c; |
| | | } |
| | | //DB202302464682ãæ¥ä»·å§æãæ¥ä»·å§ææ¹å224 fy end |
| | | //SWAG-CKDATGãå§æããOBSAP-æ¥ä»·å§æãæ¥ä»·å§æé¡¹ç®æ¹å1 fy start |
| | | if (!String.isBlank(tenderid)&&!description.contains('ææ é¡¹ç®') ) { |
| | | description += '\r\n' + 'ææ é¡¹ç®' + 'ï¼' + baseUrl + '/' + tenderid; |
| | |
| | | //SWAG-CF589Pãå§æããP:OBSAPãæ¥ä»·å§æç¸å
³æ°éæ±è¯ä¼° fy Lead__c,Opportunity__c, |
| | | quo =[ SELECT Id,Name,Cancel_Decide__c,CreatedDate, PriceRefreshDate__c,Quote_Print_Date__c,//obsap æ°å¢ç»éå1åæ®µ fy satrt Agency1_entrust__c,SWAG-CKDATG ãå§æããOBSAP-æ¥ä»·å§æãæ¥ä»·å§æé¡¹ç®æ¹å1 fy start cancelMultiyearInsurance__c, |
| | | Quote_Date__c,QuoteToName__c,Quote_Expiration_Date__c,Quote_Comment__c,Tender_information__c,Agency1_entrust__c,Noteplus__c,Lead__c,Opportunity__c,cancelMultiyearInsurance__c, |
| | | TOTAL__c,Discount__c,Pricing__c,Preferential_Trading_Price__c,Contract__c,LastIraiUser__c,MultiYearWarrantyTotalPrice__c,QuoteTotal_Page__c,Estimation_List_Price__c, |
| | | TOTAL__c,Discount__c,Pricing__c,Preferential_Trading_Price__c,Contract__c,LastIraiUser__c,MultiYearWarrantyTotalPrice__c,QuoteTotal_Page__c,Estimation_List_Price__c,Agency2_entrust__c,//DB202302464682ãæ¥ä»·å§æãæ¥ä»·å§ææ¹å224 fy |
| | | Print_HP_Name__c,Account__c,Agency_Hospital_Link__c,IraiUser__c,IraiSubject__c,CurrencyIsoCode,IraiName__c,QuoteIrai_Status__c,QuoteProportion__c,Note__c,IraiComment__c |
| | | , urgent__c //20230104 lt DB202212427301 |
| | | FROM QuoteIrai__c Where Id =:quoId]; |
| | |
| | | if(String.isNotBlank(leadid)){ |
| | | lea.Id = leadid; |
| | | lea.OfferToEntrust__c = 1; |
| | | |
| | | //20230227 lt DB202302251962 start |
| | | Map<Date,String> lm = new Map<Date,String>(); |
| | | for(OlympusCalendar__c oc:[SELECT Id,Date__c FROM OlympusCalendar__c WHERE Date__c =: Date.today()]){ |
| | | lm.put(oc.Date__c,oc.Id); |
| | | } |
| | | String datestr =String.valueOf(Date.today()); |
| | | String dt = lm.get(Date.valueOf(datestr.substring(0,10))); |
| | | |
| | | List<Lead> leadlist = [select Id,FirstDate_Quote_Irai__c from Lead where Id = :leadid]; |
| | | System.debug('lt123æ¥æ1'+ leadlist[0].FirstDate_Quote_Irai__c); |
| | | System.debug('lt123æ¥æ2'+ lea.FirstDate_Quote_Irai__c); |
| | | if(leadlist.size() > 0){ |
| | | if(leadlist[0].FirstDate_Quote_Irai__c == null){ |
| | | lea.FirstDate_Quote_Irai__c = dt; |
| | | } |
| | | } |
| | | //20230227 lt DB202302251962 end |
| | | |
| | | update lea; |
| | | } |
| | | //XLIU-CHY4KW 20220907 lt end |
| | |
| | | //XLIU-CFE8M7 ãå§æããP-OBSAPãæ¥ä»·å§æä»»å¡æ¹å fy Noteplus__c |
| | | //SWAG-CF589Pãå§æããP:OBSAPãæ¥ä»·å§æç¸å
³æ°éæ±è¯ä¼° fy Lead__c,Opportunity__c, |
| | | qs = [select Id,Account__c,Agency_Hospital_Link__c,Name,IraiUser__c,IraiSubject__c,Tender_information__c,Agency1_entrust__c,Noteplus__c,Lead__c,Opportunity__c,cancelMultiyearInsurance__c, |
| | | Preferential_Trading_Price__c,Discount__c,Pricing__c,Unit_Price__c,Offer_Amount__c,TOTAL__c,MultiYearWarrantyTotalPrice__c,QuoteTotal_Page__c,Estimation_List_Price__c, |
| | | Preferential_Trading_Price__c,Discount__c,Pricing__c,Unit_Price__c,Offer_Amount__c,TOTAL__c,MultiYearWarrantyTotalPrice__c,QuoteTotal_Page__c,Estimation_List_Price__c,Agency2_entrust__c,//DB202302464682ãæ¥ä»·å§æãæ¥ä»·å§ææ¹å224 fy |
| | | Contract__c,Print_HP_Name__c,Quote_Expiration_Date__c,Quote_Comment__c,IraiName__c,QuoteIrai_Status__c,QuoteProportion__c,Note__c,IraiComment__c |
| | | , urgent__c //20230104 lt DB202212427301 |
| | | From QuoteIrai__c Where Id =:quoId]; |
| | |
| | | //obsap æ°å¢ç»éå1åæ®µ fy staty |
| | | q.Agency1_entrust__c = quo.Agency1_entrust__c; |
| | | //obsap æ°å¢ç»éå1åæ®µ fy staty |
| | | //DB202302464682ãæ¥ä»·å§æãæ¥ä»·å§ææ¹å224 fy start |
| | | q.Agency2_entrust__c = quo.Agency2_entrust__c; |
| | | //DB202302464682ãæ¥ä»·å§æãæ¥ä»·å§ææ¹å224 fy end |
| | | // SWAG-CKDATG ãå§æããOBSAP-æ¥ä»·å§æãæ¥ä»·å§æé¡¹ç®æ¹å1 fy start |
| | | q.cancelMultiyearInsurance__c = quo.cancelMultiyearInsurance__c; |
| | | // SWAG-CKDATG ãå§æããOBSAP-æ¥ä»·å§æãæ¥ä»·å§æé¡¹ç®æ¹å1 fy end |
| | |
| | | //SWAG-CF589Pãå§æããP:OBSAPãæ¥ä»·å§æç¸å
³æ°éæ±è¯ä¼° fy Lead__c,Opportunity__c, |
| | | quo =[ SELECT Id,Name,Cancel_Decide__c,CreatedDate, PriceRefreshDate__c,Quote_Print_Date__c,//obsap æ°å¢ç»éå1åæ®µ fy satrt Agency1_entrust__c,SWAG-CKDATG ãå§æããOBSAP-æ¥ä»·å§æãæ¥ä»·å§æé¡¹ç®æ¹å1 fy start cancelMultiyearInsurance__c, |
| | | Quote_Date__c,QuoteToName__c,Quote_Expiration_Date__c,Quote_Comment__c,Tender_information__c,Agency1_entrust__c,Noteplus__c,Lead__c,Opportunity__c,cancelMultiyearInsurance__c,Headquarters__c,//DB202301106714 ãæ¥ä»·å§ææ¹åãOBSAPéç¥é®ä»¶åéé®ç®±ä¿®æ¹ fy Headquarters__c |
| | | TOTAL__c,Discount__c,Pricing__c,Preferential_Trading_Price__c,Contract__c,LastIraiUser__c,MultiYearWarrantyTotalPrice__c,QuoteTotal_Page__c,Estimation_List_Price__c, |
| | | TOTAL__c,Discount__c,Pricing__c,Preferential_Trading_Price__c,Contract__c,LastIraiUser__c,MultiYearWarrantyTotalPrice__c,QuoteTotal_Page__c,Estimation_List_Price__c,Agency2_entrust__c,//DB202302464682ãæ¥ä»·å§æãæ¥ä»·å§ææ¹å224 fy |
| | | Print_HP_Name__c,Account__c,Agency_Hospital_Link__c,IraiUser__c,IraiSubject__c,CurrencyIsoCode,IraiName__c,QuoteIrai_Status__c,QuoteProportion__c,Note__c,IraiComment__c |
| | | , urgent__c //20230104 lt DB202212427301 |
| | | FROM QuoteIrai__c Where Id =:q.Id]; |
| | |
| | | // 2021-02-19 XHL SWAG-BYD6DD End |
| | | // ========================================================================================== |
| | | Id execBTId5 = Database.executebatch(new AssetWhereabouts(),20); |
| | | Id execBTId1 = Database.executebatch(new EquipmentRepairBatch(),20); |
| | | } |
| | | } |
| | |
| | | startDateGurantee_Text__c,endDateGurantee_Text__c,Maintenance_Contract__r.RecordType.DeveloperName,Maintenance_Contract__r.SalesOfficeCode_selection__c, |
| | | Maintenance_Contract__r.RecordType.Name |
| | | ,Maintenance_Contract__r.URF_Contract__c,Series_MaxRepairCount_F__c,Series_RepairCount_F__c |
| | | //ä¸éåå LY 20230117 start å©ä½éé¢ |
| | | ,Maintenance_Contract__r.Remaining_Amount__c |
| | | //ä¸éåå LY 20230117 start |
| | | ,Maintenance_Contract__r.Remaining_Amount__c //å©ä½éé¢ |
| | | ,Maintenance_Contract__r.Limit_Price__c //éå®éé¢ |
| | | //ä¸éåå LY 20230117 end |
| | | FROM Maintenance_Contract_Asset__c |
| | | WHERE Asset__c IN :assetIds]; |
| | |
| | | } |
| | | |
| | | global void execute(Database.BatchableContext BC, List<sObject> dcList) { |
| | | |
| | | List<Account_Number_of_target__c> upsertList = new List<Account_Number_of_target__c>(); |
| | | //WLIG-BZD684 ãå§æãHå±å®¢æ· æç¥ç§å®¤ ç
便°èªè¿è¡ gwy 2021-03-25 start |
| | | List<Account_Number_of_case__c> insertNextList = new List<Account_Number_of_case__c>(); |
| | |
| | | } |
| | | |
| | | public static List<Account_Number_of_target__c> main(List<sObject> dcList) { |
| | | system.debug('==dcList=='+dcList.size()+'======'+dcList); |
| | | //以æç¥ç§å®¤å¾å½¢å¼ï¼ä¸æ¬¡è¿æ¥1æ¡æ°æ® |
| | | List<Account2__c> acc2List = [select id, |
| | | Account_Org__c, |
| | | Account_Org__r.Department_Class_Label__c, |
| | |
| | | AllHostsNumber__c, |
| | | RivalHostsNumber__c |
| | | //SWAG-C9WCE5 æç¥ç§å®¤åç®æ 客æ·è®¾å®é¡µé¢å¢å åæ®µ lt 20211228 end |
| | | //SWAG-BSC5WP you-20201021 start |
| | | //SWAG-BSC5WP you-20201021 end |
| | | //20230222 DB202302339407 you start |
| | | ,LostPrices__c |
| | | ,Dealer_Final_Price__c |
| | | ,HospitalTransactionAmount__c |
| | | //20230222 DB202302339407 you end |
| | | from Account2__c |
| | | where Account_Org__c = :dcList]; |
| | | |
| | | // 2018å¹´7æ12æ¥ SWAG-B2D4QK ä»Accountä¸è·å ææ¡ç®æ 客æ·ç5ä¸ªåæ®µ by å¼ çå±± |
| | | list<Account> accs = [select Id, Proposal_target_customer__c, Submit_proposal_document_SD__c, |
| | | Submit_proposal_document__c, Proposal_target_customer_number__c, |
| | |
| | | } |
| | | List<Account_Number_of_target__c> upsertList = new List<Account_Number_of_target__c>(); |
| | | |
| | | //20230224 you start DB202302339407 æç¥ç§å®¤å
¶ä»çç»è®¡å°æ®å¤ |
| | | system.debug('==test0==='+acc2List.size()+'========='+acc2List); |
| | | //Map<String, Account2__c> acc2QTMap = new Map<String, Account2__c>(); |
| | | Map<String, String> acc2QTMap1 = new Map<String, String>(); |
| | | Map<String, String> acc2QTMap2 = new Map<String, String>(); |
| | | for (Account2__c acc1 : acc2List) { |
| | | String dclabel1 = acc1.Account_Org__r.Department_Class_Label__c;//æç¥ç§å®¤åç±» |
| | | //if(null!= dclabel1 && ''!=dclabel1 && dclabel1=='å
¶ä»'){ |
| | | // acc2QTMap.put(acc1.Account_Org__r.ParentId, acc1);//åªææç¥ç§å®¤æ¯å
¶ä»çï¼å®¢æ·idï¼å®¢æ·2ï¼ |
| | | // system.debug('==test1==='+acc2QTMap); |
| | | //} |
| | | if(null!= dclabel1 && ''!=dclabel1 && dclabel1=='æ®å¤ç§'){ |
| | | acc2QTMap1.put(acc1.Account_Org__c,acc1.Account_Org__r.ParentId); |
| | | acc2QTMap2.put(acc1.Account_Org__r.ParentId,acc1.Account_Org__c); |
| | | } |
| | | |
| | | } |
| | | system.debug(acc2QTMap1+'===test7===='+acc2QTMap1.values()); |
| | | List<Account2__c> acc3List = [select id, |
| | | Account_Org__c, Account_Org__r.ParentId,LostPrices__c,Dealer_Final_Price__c,HospitalTransactionAmount__c from Account2__c where Account_Org__r.ParentId in :acc2QTMap1.values() and Account_Org__r.Department_Class_Label__c='å
¶ä»']; |
| | | Map<String, Account2__c> acc2QTMap3 = new Map<String, Account2__c>(); |
| | | for(Account2__c acc3 : acc3List){ |
| | | acc2QTMap3.put(acc2QTMap2.get(acc3.Account_Org__r.ParentId), acc3); |
| | | } |
| | | |
| | | system.debug('==test6==='+acc2QTMap3); |
| | | //20230224 you end DB202302339407 |
| | | for (Account2__c acc2 : acc2List) { |
| | | String dclabel = acc2.Account_Org__r.Department_Class_Label__c;//æç¥ç§å®¤åç±» |
| | | Account_Number_of_target__c accTar = new Account_Number_of_target__c(); |
| | |
| | | accTar.AllOP_ThousandY__c = acc2.AllOP_ThousandY__c; |
| | | //20220111 SWAG-C8MBB6 å 7.询价 lt end |
| | | |
| | | //20230222 DB202302339407 you start |
| | | accTar.LostPrices__c = acc2.LostPrices__c; |
| | | accTar.Dealer_Final_Price__c = acc2.Dealer_Final_Price__c; |
| | | accTar.HospitalTransactionAmount__c = acc2.HospitalTransactionAmount__c; |
| | | //æç¥ç§å®¤å
¶ä»çç»è®¡å°æ®å¤ |
| | | if(dclabel == 'æ®å¤ç§'){ |
| | | |
| | | if(null!=acc2QTMap3 && acc2QTMap3.containsKey(acc2.Account_Org__c)){ |
| | | system.debug('==test3==='+acc2.Dealer_Final_Price__c+'==test3==='+acc2QTMap3.get(acc2.Account_Org__c).Dealer_Final_Price__c); |
| | | //accTar.LostPricesqt__c = acc2.LostPrices__c ==null ? 0 :acc2.LostPrices__c + acc2QTMap3.get(acc2.Account_Org__c).LostPrices__c == null ? 0 : acc2QTMap3.get(acc2.Account_Org__c).LostPrices__c; |
| | | //accTar.Dealer_Final_Priceqt__c = acc2.Dealer_Final_Price__c ==null ? 0 : acc2.Dealer_Final_Price__c + acc2QTMap3.get(acc2.Account_Org__c).Dealer_Final_Price__c ==null ? 0:acc2QTMap3.get(acc2.Account_Org__c).Dealer_Final_Price__c; |
| | | //accTar.HospitalTransactionAmountqt__c = acc2.HospitalTransactionAmount__c ==null ? 0 : acc2.HospitalTransactionAmount__c + acc2QTMap3.get(acc2.Account_Org__c).HospitalTransactionAmount__c ==null ? 0:acc2QTMap3.get(acc2.Account_Org__c).HospitalTransactionAmount__c; |
| | | //accTar.LostPricesqt__c = acc2.LostPrices__c+ acc2QTMap3.get(acc2.Account_Org__c).LostPrices__c; |
| | | //accTar.Dealer_Final_Priceqt__c = acc2.Dealer_Final_Price__c + acc2QTMap3.get(acc2.Account_Org__c).Dealer_Final_Price__c; |
| | | //accTar.HospitalTransactionAmountqt__c = acc2.HospitalTransactionAmount__c + acc2QTMap3.get(acc2.Account_Org__c).HospitalTransactionAmount__c; |
| | | Decimal a1 = acc2.LostPrices__c == null ? 0 : acc2.LostPrices__c; |
| | | Decimal a2 = acc2QTMap3.get(acc2.Account_Org__c).LostPrices__c == null ? 0 : acc2QTMap3.get(acc2.Account_Org__c).LostPrices__c; |
| | | Decimal a3 = acc2.Dealer_Final_Price__c == null ? 0 : acc2.Dealer_Final_Price__c; |
| | | Decimal a4 = acc2QTMap3.get(acc2.Account_Org__c).Dealer_Final_Price__c == null ? 0 : acc2QTMap3.get(acc2.Account_Org__c).Dealer_Final_Price__c; |
| | | Decimal a5 = acc2.HospitalTransactionAmount__c == null ? 0 : acc2.HospitalTransactionAmount__c; |
| | | Decimal a6 = acc2QTMap3.get(acc2.Account_Org__c).HospitalTransactionAmount__c == null ? 0 : acc2QTMap3.get(acc2.Account_Org__c).HospitalTransactionAmount__c; |
| | | accTar.LostPricesqt__c = a1 + a2; |
| | | accTar.Dealer_Final_Priceqt__c = a3 + a4; |
| | | accTar.HospitalTransactionAmountqt__c = a5 +a6; |
| | | |
| | | } |
| | | }else{ |
| | | system.debug('==test4==='+dclabel); |
| | | accTar.LostPricesqt__c = acc2.LostPrices__c; |
| | | accTar.Dealer_Final_Priceqt__c = acc2.Dealer_Final_Price__c; |
| | | accTar.HospitalTransactionAmountqt__c = acc2.HospitalTransactionAmount__c; |
| | | } |
| | | |
| | | //20230222 DB202302339407 you end |
| | | |
| | | // SWAG-BD24SU åè´§æ°å¤ä»½å°ç®æ å®¢æ· start |
| | | accTar.Delivery_cnt_3D__c = acc2.Delivery_cnt_3D__c; |
| | | accTar.Delivery_cnt_CYF__c = acc2.Delivery_cnt_CYF__c; |
| | |
| | | section.ParentId = company.Id; |
| | | section.Hospital_Department_Class__c = company.Id; |
| | | upsert section; |
| | | Account section1 = new Account(); |
| | | section1.RecordTypeId = rectSct[0].Id; |
| | | section1.Name = '*'; |
| | | section1.Department_Class_Label__c = 'å
¶ä»'; |
| | | section1.ParentId = company.Id; |
| | | section1.Hospital_Department_Class__c = company.Id; |
| | | upsert section1; |
| | | Account depart = new Account(); |
| | | depart.RecordTypeId = rectDpt[0].Id; |
| | | depart.Name = '*'; |
| | |
| | | acc2.OPD_OTV_S190__c = 6; |
| | | acc2.OPD_STMS__c = 7; |
| | | acc2.OPD_GW__c = 8; |
| | | acc2.LostPrices__c=9; |
| | | acc2.Dealer_Final_Price__c=10; |
| | | acc2.HospitalTransactionAmount__c=11; |
| | | update acc2; |
| | | |
| | | System.Test.StartTest(); |
| | |
| | | OPD_amount_EUME2__c, |
| | | OPD_amount_OTVS190__c, |
| | | OPD_amount_USG400__c, |
| | | OPD_amount_GW__c |
| | | OPD_amount_GW__c, |
| | | LostPricesqt__c, |
| | | Dealer_Final_Priceqt__c, |
| | | HospitalTransactionAmountqt__c |
| | | from Account_Number_of_target__c |
| | | where Account__c = :section.Id]; |
| | | //System.assertEquals(0, atList[0].OPD_amount_290Miro__c); |
| | |
| | | section.ParentId = company.Id; |
| | | section.Hospital_Department_Class__c = company.Id; |
| | | upsert section; |
| | | Account section1 = new Account(); |
| | | section1.RecordTypeId = rectSct[0].Id; |
| | | section1.Name = '*'; |
| | | section1.Department_Class_Label__c = 'å
¶ä»'; |
| | | section1.ParentId = company.Id; |
| | | section1.Hospital_Department_Class__c = company.Id; |
| | | upsert section1; |
| | | Account depart = new Account(); |
| | | depart.RecordTypeId = rectDpt[0].Id; |
| | | depart.Name = '*'; |
| | |
| | | acc2.OPD_OTV_S190__c = 6; |
| | | acc2.OPD_STMS__c = 7; |
| | | acc2.OPD_GW__c = 8; |
| | | acc2.LostPrices__c=9; |
| | | acc2.Dealer_Final_Price__c=10; |
| | | acc2.HospitalTransactionAmount__c=11; |
| | | update acc2; |
| | | |
| | | System.Test.StartTest(); |
| | |
| | | OPD_amount_EUME2__c, |
| | | OPD_amount_OTVS190__c, |
| | | OPD_amount_USG400__c, |
| | | OPD_amount_GW__c |
| | | OPD_amount_GW__c, |
| | | LostPricesqt__c, |
| | | Dealer_Final_Priceqt__c, |
| | | HospitalTransactionAmountqt__c |
| | | from Account_Number_of_target__c |
| | | where Account__c = :section.Id]; |
| | | //System.assertEquals(0, atList[0].OPD_amount_290Miro__c); |
| | |
| | | section.ParentId = company.Id; |
| | | section.Hospital_Department_Class__c = company.Id; |
| | | upsert section; |
| | | Account section1 = new Account(); |
| | | section1.RecordTypeId = rectSct[0].Id; |
| | | section1.Name = '*'; |
| | | section1.Department_Class_Label__c = 'å
¶ä»'; |
| | | section1.ParentId = company.Id; |
| | | section1.Hospital_Department_Class__c = company.Id; |
| | | upsert section1; |
| | | Account depart = new Account(); |
| | | depart.RecordTypeId = rectDpt[0].Id; |
| | | depart.Name = '*'; |
| | |
| | | acc2.OPD_OTV_S190__c = 6; |
| | | acc2.OPD_STMS__c = 7; |
| | | acc2.OPD_GW__c = 8; |
| | | acc2.LostPrices__c=9; |
| | | acc2.Dealer_Final_Price__c=10; |
| | | acc2.HospitalTransactionAmount__c=11; |
| | | update acc2; |
| | | |
| | | System.Test.StartTest(); |
| | |
| | | OPD_amount_EUME2__c, |
| | | OPD_amount_OTVS190__c, |
| | | OPD_amount_USG400__c, |
| | | OPD_amount_GW__c |
| | | OPD_amount_GW__c, |
| | | LostPricesqt__c, |
| | | Dealer_Final_Priceqt__c, |
| | | HospitalTransactionAmountqt__c |
| | | from Account_Number_of_target__c |
| | | where Account__c = :section.Id]; |
| | | //System.assertEquals(0, atList[0].OPD_amount_290Miro__c); |
| | |
| | | section.ParentId = company.Id; |
| | | section.Hospital_Department_Class__c = company.Id; |
| | | upsert section; |
| | | Account section1 = new Account(); |
| | | section1.RecordTypeId = caseSct[0].Id; |
| | | section1.Name = '*'; |
| | | section1.Department_Class_Label__c = 'å
¶ä»'; |
| | | section1.ParentId = company.Id; |
| | | section1.Hospital_Department_Class__c = company.Id; |
| | | upsert section1; |
| | | |
| | | System.Test.StartTest(); |
| | | Id execBTId = Database.executeBatch(new OpdAmountBatch(company.Id,PerformDate), 20); |
| | |
| | | section.Hospital_Department_Class__c = company.Id; |
| | | upsert section; |
| | | |
| | | Account section1 = new Account(); |
| | | section1.RecordTypeId = caseSct[0].Id; |
| | | section1.Name = '*'; |
| | | section1.Department_Class_Label__c = 'å
¶ä»'; |
| | | section1.ParentId = company.Id; |
| | | section1.Hospital_Department_Class__c = company.Id; |
| | | upsert section1; |
| | | |
| | | System.Test.StartTest(); |
| | | Id execBTId = Database.executeBatch(new OpdAmountBatch(company.Id,PerformDate), 20); |
| | | System.Test.StopTest(); |
| | |
| | | |
| | | return rtn; |
| | | } |
| | | // 20230215 ljh DB202301265636 å½ä¼è®®ä¸æå¤ååºåºçæ¶åå
许è¿è¡ä¼è®®åæ¶ç³è¯· æ¤æ¹æ³ä¸å¨ä½¿ç¨ |
| | | // ææ¶æ²¡ææ³¨é æ¯ä¸ºäºè¦çç |
| | | WebService static String changeCampaign(String campaignId) { //å¦ä¼åæ¶å¾çªå£è°ç¨ |
| | | List<Rental_Apply__c> raList = [select Yi_loaner_arranged__c, Shipment_request_Cnt__c from Rental_Apply__c where Campaign__c = :campaignId]; |
| | | String rtn = 'OK'; |
| | |
| | | return rtn; |
| | | |
| | | } |
| | | // 20230118 ljh DB202301265636 start |
| | | /** |
| | | * @fuction [å½ä¼è®®ä¸æå¤ååºåºçæ¶åå
许è¿è¡ä¼è®®åæ¶ç³è¯·, |
| | | * ä¼è®®åæ¶çæ¶å对åºçOPD计åä¹éè¦åæ¶ |
| | | * é¢è®¡åæ¶æ¥éè¦ä¿®æ¹] |
| | | * @Author lijinhuan |
| | | * @DateTime 2023-01-18T15:10:48+0800 |
| | | * @version [version] |
| | | * @param campaignId [description] |
| | | * @return [description] |
| | | */ |
| | | WebService static String changeCampaignCancel(String campaignId) { //å¦ä¼åæ¶å¾çªå£è°ç¨ |
| | | List<Rental_Apply_Equipment_Set__c> raesList = [select Id,Rental_End_Date__c from Rental_Apply_Equipment_Set__c where Rental_End_Date__c != null |
| | | AND Shippment_loaner_time2__c != null |
| | | AND Rental_Apply__r.RA_Status__c != 'å®äº' |
| | | AND Rental_Apply__r.RA_Status__c != 'åæ¶' |
| | | AND Rental_Apply__r.Campaign__c = :campaignId ]; |
| | | String rtn = 'OK'; |
| | | Savepoint sp = Database.setSavepoint(); |
| | | try{ |
| | | if (null != raesList && raesList.size() > 0) { |
| | | for (Rental_Apply_Equipment_Set__c raes : raesList) { |
| | | raes.Rental_End_Date__c = Date.today().addDays(5); |
| | | } |
| | | update raesList; |
| | | } |
| | | }catch (Exception ex) { |
| | | System.debug(ex.getStackTraceString()); |
| | | System.debug('ex.getMessage()***'+ ex.getMessage()+ex.getLineNumber()); |
| | | ApexPages.addMessages(ex); |
| | | Database.rollback(sp); |
| | | rtn = ex.getMessage(); |
| | | } |
| | | return rtn; |
| | | } |
| | | // 20230118 ljh DB202301265636 end |
| | | |
| | | WebService static String dataCheck(String rentalApplyId) { |
| | | string result = 'OK'; |
| | | if (String.isBlank(rentalApplyId)) { |
| | |
| | | return true; |
| | | } |
| | | //SWAG-CG88AGãå§æãæåºä»·æ ¼ç³è¯·æ¯å¨åè®®æææå
ï¼å
许WIN fy end |
| | | |
| | | //è´¸æåè§ 20230307 you start |
| | | WebService static Boolean accSendEmail(String AccDealerBlacklist,String accname,String angency1,String angency2,String ownerids,String ddid,String oppid) { |
| | | //åéé®ä»¶ |
| | | List<Messaging.SingleEmailMessage> sendMails = new List<Messaging.SingleEmailMessage>(); |
| | | List<String> MailsList = new List<String>(); |
| | | List<String> userIdList = new List<String>(); |
| | | if(String.isNotBlank(ownerids)){ |
| | | userIdList.add(ownerids); |
| | | } |
| | | if(String.isNotBlank(ddid)){ |
| | | userIdList.add(ddid); |
| | | } |
| | | //询价ææäººï¼äº§åæ
å½ï¼åé®ä»¶ |
| | | List<User> UsrList = [SELECT email FROM user WHERE id in :userIdList]; |
| | | //è·ååä¸ªç¨æ·çemail |
| | | for (User u : UsrList){ |
| | | MailsList.add(u.email); |
| | | } |
| | | MailsList.add('youchang@prec-tech.com'); |
| | | system.debug('111===:'+MailsList); |
| | | if (MailsList!=null&&MailsList.size()>0){ |
| | | String title = ''; |
| | | String body = ''; |
| | | title = ' æ°å»ºè¯¢ä»·å»é¢/ç»éåæ¶åé»åå'; |
| | | if(AccDealerBlacklist=='123'){ |
| | | body += 'é»ååç客æ·ä¸ºï¼' + accname+ '<br/>'; |
| | | body += 'é»ååçç»éå1为ï¼' + angency1+ '<br/>'; |
| | | body += 'é»ååçç»éå2为ï¼' + angency2+ '<br/>'; |
| | | }else if(AccDealerBlacklist=='12'){ |
| | | body += 'é»ååç客æ·ä¸ºï¼' + accname+ '<br/>'; |
| | | body += 'é»ååçç»éå1为ï¼' + angency1+ '<br/>'; |
| | | }else if(AccDealerBlacklist=='23'){ |
| | | body += 'é»ååçç»éå1为ï¼' + angency1+ '<br/>'; |
| | | body += 'é»ååçç»éå2为ï¼' + angency2+ '<br/>'; |
| | | }else if(AccDealerBlacklist=='13'){ |
| | | body += 'é»ååç客æ·ä¸ºï¼' + accname+ '<br/>'; |
| | | body += 'é»ååçç»éå2为ï¼' + angency2+ '<br/>'; |
| | | }else if(AccDealerBlacklist=='1'){ |
| | | body += 'é»ååç客æ·ä¸ºï¼' + accname+ '<br/>'; |
| | | }else if(AccDealerBlacklist=='2'){ |
| | | body += 'é»ååçç»éå1为ï¼' + angency2+ '<br/>'; |
| | | }else if(AccDealerBlacklist=='3'){ |
| | | body += 'é»ååçç»éå2为ï¼' + angency2+ '<br/>'; |
| | | } |
| | | |
| | | body += '<a href="' + System.Label.Environment_Url + oppid + '">' |
| | | + System.Label.Environment_Url+ oppid +'</a><br/>'; |
| | | body += '谢谢ï¼'; |
| | | |
| | | Messaging.SingleEmailMessage messageNEW = new Messaging.SingleEmailMessage(); |
| | | messageNEW.setSubject(title); |
| | | messageNEW.setHtmlBody(body); |
| | | messageNEW.setCharset('UTF-8'); |
| | | messageNEW.setToAddresses(MailsList); |
| | | |
| | | //List<String> toCcMailsList = new List<String>(); |
| | | //toCcMailsList.add('youchang@prec-tech.com'); |
| | | //messageNEW.setCcAddresses(toCcMailsList); |
| | | |
| | | sendMails.add(messageNEW); |
| | | |
| | | } |
| | | |
| | | boolean rs = true; |
| | | if (sendMails.size() > 0) { |
| | | Messaging.Email[] allMails = new Messaging.Email[]{}; |
| | | for(Integer j = 0; j < sendMails.size(); j++) { |
| | | allMails.add(sendMails.get(j)); |
| | | } |
| | | system.debug('222===:'+allMails); |
| | | |
| | | Messaging.SendEmailResult[] results = Messaging.sendEmail(allMails); |
| | | System.debug('results ç»æ :'+results); |
| | | for (Integer i = 0; i < results.size(); i++) { |
| | | if (results[i].success == false) { |
| | | system.debug('=====send mail error:' + results[i].errors[0].message); |
| | | rs = false; |
| | | } |
| | | } |
| | | } |
| | | return rs; |
| | | } |
| | | //è´¸æåè§ 20230307 you end |
| | | |
| | | } |
| | |
| | | prd1.Manual_Entry__c = true; |
| | | prd1.Category5__c = 'ç«äºå¯¹æ'; |
| | | prd1.Brand_Name__c = 'STORZ'; |
| | | prd1.recordTypeId = recordtypeid; |
| | | prd1.recordTypeId = recordtypeid; //20230221ä¸çº¿æ¹ä¸ºâ01210000000aMAEâï¼ä¸å®è¿årecordtypeid |
| | | // prd1.Lost_By_Company__c= 'STORZ'; //add tcm 20211213 |
| | | |
| | | Product2 prd2 = new Product2(); |
| | |
| | | Lost_reason_main__c, |
| | | Lost_Reason_Sub__c,Lost_By_Company__c, |
| | | LostTotalAmount__c,LostType__c, |
| | | TotalAmountLost__c, //20230215 lt DB202302247719 |
| | | Report_Status__c,Sales_assistant__c, |
| | | Opportunity__c, Opportunity__r.Sales_assistant_ID__c, |
| | | Opportunity__r.Sales_manager_departmentID__c, |
| | |
| | | list<PCLLostBrand__c> selectlostBrandList = |
| | | [ |
| | | select id, LostPrice__c, Lost_By_Company__c, |
| | | LostPrices_ThousandY__c, //20230215 lt DB202302247719 |
| | | Lost_reason_main__c,Lost_Reason_Sub__c,Name,Agency__c, AgencyMannual__c, |
| | | // ProductCategory__c,ProductClass__c, |
| | | Lost_cancel_report__c,Lost_By_Company_Mannual__c, |
| | |
| | | // 设置记å½ç±»å |
| | | LostReport.lostReport.recordTypeID = LostReport.lostReport.LostType__c== '失å'?Schema.SObjectType.Lost_cancel_report__c.getRecordTypeInfosByDeveloperName().get('PCL_Lost_report').getRecordTypeId() : Schema.SObjectType.Lost_cancel_report__c.getRecordTypeInfosByDeveloperName().get('PCL_PartLost_report').getRecordTypeId(); |
| | | LostReport.lostReport.LostTotalAmount__c = 0; |
| | | LostReport.lostReport.TotalAmountLost__c = 0; //20230215 lt DB202302247719 |
| | | LostReport.lostReport.of_lost_system_processor__c = 0; |
| | | LostReport.lostReport.Lost_reason_main__c = null; |
| | | LostReport.lostReport.Lost_Reason_Sub__c = null; |
| | |
| | | for(LostBrand tempLostBrand : LostReport.LostBrands) { |
| | | if(string.isNotBlank(tempLostBrand.lostBrand.Lost_By_Company__c)) { |
| | | LostReport.lostReport.LostTotalAmount__c += tempLostBrand.lostBrand.LostPrice__c; |
| | | //20230215 lt DB202302247719 start |
| | | Decimal med = tempLostBrand.lostBrand.LostPrice__c/1.13/1000; |
| | | Decimal med1 = med.setScale(2); |
| | | System.debug('---lt123ä¸å«ç¨æ°å¼(人工)Decimal---'+med); |
| | | System.debug('---lt123ä¸å«ç¨æ°å¼(人工)Decimal两ä½å°æ°---'+med1); |
| | | LostReport.lostReport.TotalAmountLost__c += med1; |
| | | //LostReport.lostReport.TotalAmountLost__c += tempLostBrand.lostBrand.LostPrices_ThousandY__c; //20230215 lt DB202302247719 |
| | | // LostReport.lostReport.TotalAmountLost__c += tempLostBrand.lostBrand.LostPrice__c/1.13/1000; //20230215 lt DB202302247719 |
| | | //20230215 lt DB202302247719 en |
| | | |
| | | LostReport.lostReport.Lost_reason_main__c = |
| | | LostReport.lostReport.Lost_reason_main__c == null |
| | | ? tempLostBrand.lostBrand.Lost_reason_main__c |
| | |
| | | LostReport.lostReport = templostReport; |
| | | LostReport.LostBrands = tempBrands; |
| | | // è¿ééè¦åä¸äºæ¥éä¿¡æ¯ |
| | | System.debug('---lt123---'+ex.getLineNumber()); |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error,ex.getMessage())); |
| | | return false; |
| | | } |
| | |
| | | } |
| | | system.schedule(scB.scName, scB.scTime, new RentalApplyDetailStatusUpdateSchedule()); |
| | | } |
| | | |
| | | String query = 'SELECT RAESD_Status__c' |
| | | + ' FROM Rental_Apply_Equipment_Set_Detail__c' |
| | | + ' WHERE RAESD_Status_Text_Update_F__c = true'; |
| | |
| | | nObj.DeliverySlip_Text__c = nObj.DeliverySlip__c; |
| | | nObj.Return_DeliverySlip_Text__c = nObj.Return_DeliverySlip__c; |
| | | nObj.Received_Confirm_Text__c = nObj.Received_Confirm_F__c; |
| | | // SFDCæ´æ°å¯¼è´é®é¢ç对åºï¼æå®æ¹æ¡ï¼ 20230307 by lc Start |
| | | nObj.Rental_Apply_Object__c = nObj.Rental_Apply__c; |
| | | // SFDCæ´æ°å¯¼è´é®é¢ç对åºï¼æå®æ¹æ¡ï¼ 20230307 by lc End |
| | | Rental_Apply_Equipment_Set_Detail__c oObj = null; |
| | | if (Trigger.isUpdate) { |
| | | oObj = oldMap.get(nObj.Id); |
| | |
| | | ORDER BY Rental_Apply__c, Rental_Apply_Equipment_Set__c, Name]; |
| | | // æ¶éåå¯æç» {raesId -> raesdList} |
| | | Map<Id, List<Rental_Apply_Equipment_Set_Detail__c>> raesdListMap = new Map<Id, List<Rental_Apply_Equipment_Set_Detail__c>>(); |
| | | Map<Id, Rental_Apply__c> return_DeliverySlipIdMap = new Map<Id, Rental_Apply__c>(); |
| | | Map<Id, FixtureDeliverySlip__c> return_DeliverySlipMap = new Map<Id, FixtureDeliverySlip__c>(); |
| | | for (Rental_Apply_Equipment_Set_Detail__c raesd : raesdList) { |
| | | if (!raesdListMap.containsKey(raesd.Rental_Apply_Equipment_Set__c)) { |
| | | raesdListMap.put(raesd.Rental_Apply_Equipment_Set__c, new List<Rental_Apply_Equipment_Set_Detail__c>()); |
| | | } |
| | | return_DeliverySlipIdMap.put(raesd.Return_DeliverySlip__c, raesd.Rental_Apply__r); |
| | | |
| | | raesdListMap.get(raesd.Rental_Apply_Equipment_Set__c).add(raesd); |
| | | /* --------- 设置è¿è¾åMap Start --------- */ |
| | | if (return_DeliverySlipMap.containsKey(raesd.Rental_Apply__c) == false) { |
| | |
| | | if(String.isNotBlank(S_ApplyBenBu)){ |
| | | // Modify by Liu 20220908 Solutionæ¬é¨è¯¾é¢å¯¹åº start |
| | | //List<String> benbuList = S_ApplyBenBu.split(','); |
| | | List<String> benbuList = S_ApplyBenBu.replace('16.Solutionæ¬é¨', '16.æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨').split(','); |
| | | List<String> benbuList = S_ApplyBenBu.replace('16.Solutionæ¬é¨', '16.Solutionæ¬é¨').split(','); |
| | | // Modify by Liu 20220908 Solutionæ¬é¨è¯¾é¢å¯¹åº end |
| | | //List<String> benbuList = S_ApplyBenBu.split(','); |
| | | benbuSet.addAll(benbuList); |
| | | } |
| | | // åäºå¤ |
| | |
| | | soql += ' Salesdepartment_before__c,Equipment_Type_text__c,Product_category_text__c ,'; |
| | | soql += ' Rental_Apply_Equipment_Set__r.QueueShippmentDateNew__c,'; |
| | | soql += ' Rental_Apply__r.Salesdepartment_text__c,Rental_Apply__r.Internal_asset_location_F__c,Internal_asset_location_before__c, '; |
| | | soql += ' Rental_Apply__r.WorkPlace__c,Rental_Apply__r.Person_In_Charge__c ,Queue_Number__c '; |
| | | soql += ' Rental_Apply__r.WorkPlace__c,Rental_Apply__r.Person_In_Charge__c ,Queue_Number__c, Rental_Apply_Object__r.WorkPlace__c, Rental_Apply_Object__r.Person_In_Charge__c '; |
| | | soql += ' ,Rental_Apply_Object__r.Salesdepartment_text__c ,Rental_Apply_Object__r.Name '; |
| | | soql += ' from Rental_Apply_Equipment_Set_Detail__c '; |
| | | soql += ' where Cancel_Select__c = false and Queue_Number__c > 0 '; |
| | | if(String.isNotBlank(SraName)){ |
| | | soql += ' and Rental_Apply__r.Name like \'%'+SraName+'%\''; |
| | | soql += ' and Rental_Apply_Object__r.Name like \'%'+SraName+'%\''; |
| | | } |
| | | if(String.isNotBlank(SFixture_Model_No)){ |
| | | // soql += ' and Fixture_Model_No__c = :SFixture_Model_No'; |
| | |
| | | // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, 'zheli00:' + SRa_Person)); |
| | | if(SRa_Person.Person_In_Charge__c != null){ |
| | | String tempId = SRa_Person.Person_In_Charge__c; |
| | | soql += ' and Rental_Apply__r.Person_In_Charge__c = :tempId'; |
| | | soql += ' and Rental_Apply_Object__r.Person_In_Charge__c = :tempId'; |
| | | } |
| | | // String pdBenBu |
| | | if(String.isNotBlank(pdBenBu)){ |
| | |
| | | } |
| | | // Set<String> benbuApplySet |
| | | if(benbuApplySet.size() > 0){ |
| | | soql += ' and Rental_Apply__r.Salesdepartment_text__c IN :benbuApplySet'; |
| | | soql += ' and Rental_Apply_Object__r.Salesdepartment_text__c IN :benbuApplySet'; |
| | | } |
| | | // Set<String> applyAgencySet |
| | | if(applyAgencySet.size() > 0){ |
| | | soql += ' and Rental_Apply__r.WorkPlace__c IN :applyAgencySet'; |
| | | soql += ' and Rental_Apply_Object__r.WorkPlace__c IN :applyAgencySet'; |
| | | } |
| | | // Set<String> pdBeiPinFenLei |
| | | // if(pdBeiPinFenLei.size() > 0){ |
| | |
| | | // if(String.isNotBlank(S_bieCunFangDi)){ |
| | | for (SelectOption op : opList) { |
| | | if (String.isNotBlank(op.getValue())) { |
| | | ApplyBenBu.add(new CustomData(op.getValue(),op.getValue())); |
| | | // Modify by Liu 20220908 Solutionæ¬é¨è¯¾é¢å¯¹åº start |
| | | //ApplyBenBu.add(new CustomData(op.getValue(),op.getValue())); |
| | | ApplyBenBu.add(new CustomData(op.getValue(),op.getLabel())); |
| | |
| | | List<Rental_Apply__Share> rasList = new List<Rental_Apply__Share>(); |
| | | List<Id> deleteOfficeAssistantShare_nObjId_List = new List<Id>(); // å
±äº«å é¤ç¨ |
| | | List<Id> deleteApplyUserShare_nObjId_List = new List<Id>();// 20210727 ljh SFDC-C54C33 å
±äº«å é¤ç¨ |
| | | Set<Id> shareSet = new Set<Id>(); // 20230301 ljh DB202302444522 add |
| | | for (Rental_Apply__c nObj : newList) { |
| | | Rental_Apply__c oObj = (null == this.oldMap) ? null : this.oldMap.get(nObj.Id); |
| | | // æå¡é¨å®¡æ¹äºº |
| | |
| | | ) { |
| | | deleteApplyUserShare_nObjId_List.add(nObj.Id); |
| | | if(nObj.SalesManager__c != null){ |
| | | shareSet.add(nObj.SalesManager__c);// 20230301 ljh DB202302444522 add |
| | | Rental_Apply__Share rasSalesManager = new Rental_Apply__Share( |
| | | RowCause = 'ApplyUserShare__c', |
| | | ParentId = nObj.Id, |
| | |
| | | rasList.add(rasSalesManager); |
| | | } |
| | | if(nObj.BuchangApprovalManagerSales__c != null){ |
| | | shareSet.add(nObj.BuchangApprovalManagerSales__c);// 20230301 ljh DB202302444522 add |
| | | Rental_Apply__Share rasBz = new Rental_Apply__Share( |
| | | RowCause = 'ApplyUserShare__c', |
| | | ParentId = nObj.Id, |
| | |
| | | rasList.add(rasBz); |
| | | } |
| | | if(nObj.ZongjianApprovalManager__c != null){ |
| | | shareSet.add(nObj.ZongjianApprovalManager__c);// 20230301 ljh DB202302444522 add |
| | | Rental_Apply__Share rasZj = new Rental_Apply__Share( |
| | | RowCause = 'ApplyUserShare__c', |
| | | ParentId = nObj.Id, |
| | |
| | | if(deleteOfficeAssistantShare_nObjId_List.size() > 0){ |
| | | soql += ' AND (RowCause = \'Office_Assistant__c\' AND ParentId =: deleteOfficeAssistantShare_nObjId_List) '; |
| | | if(deleteApplyUserShare_nObjId_List.size() > 0){ |
| | | soql += ' OR (RowCause = \'ApplyUserShare__c\'AND ParentId =: deleteApplyUserShare_nObjId_List)'; |
| | | // 20230301 ljh DB202302444522 update start |
| | | // soql += ' OR (RowCause = \'ApplyUserShare__c\'AND ParentId =: deleteApplyUserShare_nObjId_List)'; |
| | | soql += ' OR (RowCause = \'ApplyUserShare__c\'AND ParentId =: deleteApplyUserShare_nObjId_List'; |
| | | soql += ' and UserOrGroupId IN :shareSet)'; |
| | | // 20230301 ljh DB202302444522 update end |
| | | } |
| | | }else if(deleteApplyUserShare_nObjId_List.size() > 0){ |
| | | soql += ' AND (RowCause = \'ApplyUserShare__c\'AND ParentId =: deleteApplyUserShare_nObjId_List)'; |
| | | // 20230301 ljh DB202302444522 update start |
| | | // soql += ' AND (RowCause = \'ApplyUserShare__c\'AND ParentId =: deleteApplyUserShare_nObjId_List)'; |
| | | soql += ' AND (RowCause = \'ApplyUserShare__c\'AND ParentId =: deleteApplyUserShare_nObjId_List'; |
| | | soql += ' and UserOrGroupId IN :shareSet)'; |
| | | // 20230301 ljh DB202302444522 update end |
| | | } |
| | | List<Rental_Apply__Share> deleteShareList = new List<Rental_Apply__Share>(); |
| | | if(deleteOfficeAssistantShare_nObjId_List.size() > 0 || deleteApplyUserShare_nObjId_List.size() > 0){ |
| | |
| | | // return 'ä¿®çæç»æ£æµæ¥ä¸ä¸ºç©ºï¼ä¸è½åé
'; |
| | | // }else if(Ra.repair__r.Return_Without_Repair_Date__c !=null){ |
| | | // return 'æªä¿®çå½è¿æ¥ä¸ä¸ºç©ºï¼ä¸è½åé
'; |
| | | if(Ra.Campaign__c != null && Ra.Campaign__r.Status == 'åæ¶'){ |
| | | return 'å¦ä¼åæ¶ï¼ä¸å¯åé
'; |
| | | // 20230220 ljh DB202301265636 start |
| | | // if(Ra.Campaign__c != null && Ra.Campaign__r.Status == 'åæ¶'){ |
| | | // return 'å¦ä¼åæ¶ï¼ä¸å¯åé
'; |
| | | if(Ra.Campaign__c != null && (Ra.Campaign__r.Status == 'åæ¶' || Ra.Campaign__r.Status == 'åæ¶ç³è¯·ä¸')){ |
| | | return 'å¦ä¼åæ¶ç³è¯·ä¸æè
已忶ï¼ä¸å¯åé
'; |
| | | // 20230220 ljh DB202301265636 end |
| | | }else if(Ra.repair__c != null && (Ra.repair__r.Repair_Final_Inspection_Date__c!=null || Ra.Repair__r.Repair_Shipped_Date__c != null)){ |
| | | return 'ä¿®çææç»æ£æµæ¥æä¿®çåè¿éæ¥ï¼ä¸å¯åé
'; |
| | | }else if(Ra.repair__c != null && Ra.repair__r.Return_Without_Repair_Date__c !=null){ |
| | |
| | | */ |
| | | @isTest |
| | | public class RentalFixtureManage5Test { |
| | | // AWSServiceTool2没ä¸çº¿å°±æè¿é¨å注é start 20220408 |
| | | //@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 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{ |
| | | 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; |
| | | // } |
| | | } |
| | | } |
| | | // AWSServiceTool2没ä¸çº¿å°±æè¿é¨å注é end |
| | | // 20230228 ljh end |
| | | // åºåºåç¹æ£èç¹çæ°æ® |
| | | @testSetup |
| | | static void setupTestData() { |
| | | setup(); |
| | | // OLY_OCM-643 追å ControllerUtil.EscapeNFM001Trigger |
| | | ControllerUtil.EscapeNFM001Trigger = true; |
| | | // MIXED_DML_OPERATION, DML operation on setup object is not permitted Error |
| | |
| | | ref = new PageReference('/apex/EquipmentSetShippmentReceived1?id=' + raesObjs[0].Id + '&type=Shippment&open=web'); |
| | | Test.setCurrentPage(ref); |
| | | EquipmentSetShippmentReceived1Controller essController = new EquipmentSetShippmentReceived1Controller(); |
| | | essController.test(); |
| | | essController.init(); |
| | | Test.stopTest(); |
| | | for (EquipmentSetShippmentReceived1Controller.EsdInfo esdInfo : essController.esdList) { |
| | |
| | | WHERE id =:taId |
| | | ]; |
| | | for (Rental_Apply__c RaTar : RaTarList) { |
| | | // 20230215 ljh DB202301265636 å¦ä¼åæ¶ç³è¯·ä¹æ¦æª start |
| | | // if( RaTar.Campaign__r.Status == 'åæ¶'){ |
| | | // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'å¦ä¼å·²åæ¶ï¼ä¸è½ç»§ç»æä½äº')); |
| | | if( RaTar.Campaign__r.Status == 'åæ¶' || RaTar.Campaign__r.Status == 'åæ¶ç³è¯·ä¸' ){ |
| | | String tempS = ''; |
| | | if( RaTar.Campaign__r.Status == 'åæ¶'){ |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'å¦ä¼å·²åæ¶ï¼ä¸è½ç»§ç»æä½äº')); |
| | | tempS = '已忶'; |
| | | }else{ |
| | | tempS = 'ç³è¯·åæ¶ä¸'; |
| | | } |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, 'å¦ä¼'+tempS+'ï¼ä¸è½ç»§ç»æä½äº')); |
| | | // 20230215 ljh DB202301265636 å¦ä¼åæ¶ç³è¯·ä¹æ¦æª end |
| | | return false; |
| | | } |
| | | // else if(RaTar.Repair__r.Repair_Final_Inspection_Date__c != null){ |
| | |
| | | obj = getdefultInfo(raesd,applyObj,bieCunFangDi); |
| | | }else{ |
| | | // Modify by Liu 20220908 Solutionæ¬é¨è¯¾é¢å¯¹åº start |
| | | salesdepartments = salesdepartments.replace('16.Solutionæ¬é¨', '16.æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨'); |
| | | salesdepartments = salesdepartments.replace('16.Solutionæ¬é¨', '16.Solutionæ¬é¨'); |
| | | // Modify by Liu 20220908 Solutionæ¬é¨è¯¾é¢å¯¹åº end |
| | | obj = getSpecialInfo(raesd,parentObj,salesdepartments,equipmenttypes); |
| | | } |
| | |
| | | new SelectOption('10.æå¡æ¬é¨', '10.æå¡æ¬é¨'), |
| | | new SelectOption('11.å»ç产åå¹è®æ¬é¨', '11.å»ç产åå¹è®æ¬é¨'), |
| | | // new SelectOption('12.è½éäºä¸æ¬é¨', '12.è½éäºä¸æ¬é¨'),20220107 ljh update |
| | | new SelectOption('16.æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨', '16.æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨') |
| | | new SelectOption('16.Solutionæ¬é¨', '16.Solutionæ¬é¨') |
| | | // new SelectOption('17.å¸åºä¼åæ¬é¨', '17.å¸åºä¼åæ¬é¨') |
| | | }; |
| | | RentalFixtureSetAssignController.transferListtoString('产åè¯ç¨',options); |
| | |
| | | setStatusChange(); |
| | | //æäº¤å®¡æ¹ä¹åæ´æ°å段 |
| | | updateExaminePeople(); |
| | | //éä»¶æ´æ° |
| | | updateAttachment(); |
| | | } |
| | | |
| | | protected override void afterUpdate(){ |
| | |
| | | ra.Report_Date__c = todayTemp; |
| | | } |
| | | |
| | | Map<Id,Repair__c> repairMap = new Map<Id,Repair__c>([SELECT Id,Name,Repair_Detail__c,InspectionFailureCause__c,SerialNumber__c,Delivered_Product__c,(select Id from reparirAgain01__r) from Repair__c where id in :repairSet]); |
| | | Map<Id,Repair__c> repairMap = new Map<Id,Repair__c>([SELECT Id,Name,Repair_Detail__c,InspectionFailureCause__c,SerialNumber__c,Delivered_Product__c,Incharge_Staff__c,(select Id from reparirAgain01__r) from Repair__c where id in :repairSet]); |
| | | |
| | | System.debug('repairMap========='+repairMap); |
| | | for(RepairAgainAn__c ra : newList){ |
| | |
| | | repairList.add(tempRepair); |
| | | } |
| | | } |
| | | |
| | | public void updateAttachment(){ |
| | | for(RepairAgainAn__c ram : newList){ |
| | | String pid = ram.Id; |
| | | |
| | | String sql = 'SELECT Name,Body,ContentType from Attachment where ParentId =\'' + pid + '\''; |
| | | |
| | | |
| | | Attachment att = Database.query(sql); |
| | | |
| | | System.debug('bName====='+att.Body); |
| | | } |
| | | } |
| | | } |
| | |
| | | List<String> HospitalId = new List<String>(); |
| | | List<String> provinceList = new List<String>();//ç |
| | | List<String> cityList = new List<String>();//å¸ |
| | | List<String> inchargeStaff = new List<String>();//å¸ |
| | | for (Repair__c nObj : newList) { |
| | | //å»é¢çCSM管çç(ææ¬) å¼ä¸ä¸ºç©ºï¼å¹¶ä¸æ¶è´§å°åä¸ä¸ºç©º |
| | | if(nObj.Hospital__c != null && nObj.address_Contacts__c == null && nObj.address_Telephone__c == null && nObj.address_Contacts_Name__c == null && nObj.address_City__c == null && nObj.Detailed_Address__c == null){ |
| | | HospitalId.add(nObj.Hospital__C); |
| | | } |
| | | inchargeStaff.add(nObj.Incharge_Staff__c); |
| | | } |
| | | // gzw DB202212270703 20230301 å¤åå°å导å
¥æ¹é start |
| | | Map<String,user> profileAndRoleMap = new Map<String,user>(); |
| | | for(user re :[select id,Profile.name,Branch__c,UserRole.name from user where id in :inchargeStaff]){ |
| | | profileAndRoleMap.put(re.id, re); |
| | | } |
| | | // gzw DB202212270703 20230301 å¤åå°å导å
¥æ¹é start |
| | | if(HospitalId != null && HospitalId.size() > 0){ |
| | | String HospitalSQl = 'SELECT id,OCM_man_province_txt__c,FieldCity_Master_Name__c from Account where id in :HospitalId'; |
| | | List<Account> accountList = Database.query(HospitalSQl); |
| | |
| | | system.debug('cityList='+cityList); |
| | | system.debug('provinceList='+provinceList); |
| | | if(falg && provinceList != null && cityList != null && provinceList.size() > 0 && cityList.size() > 0){ |
| | | // gzw DB202212270703 20230301 å¤åå°å导å
¥æ¹é start |
| | | // String addressSQl = 'SELECT ID,Customer__c,Customer_Name__c,Contacts__c,Contacts_Name__c,Telephone__c,Province__c,Province_Name__c,City__c,City_Name__c,Detailed_Address__c,ZipCode__c' |
| | | // //+ ',Contacts__r.LastName_Encrypted__c,ZipCode_Encrypted__c,Detailed_Address_Encrypted__c,Telephone_Encrypted__c' // PIæ¹é By Bright 20220407 zhj MEBGæ°æ¹æ¡æ¹é 2022-11-29 |
| | | // + ' from Address__c ' |
| | | // + ' where Address_Classification__c = \'åäºå¤\' and Province_Name__c in :provinceList and City_Name__c in :cityList ' |
| | | // + ' order by Using_Datetime__c desc NULLS LAST '; |
| | | |
| | | |
| | | String addressSQl = 'SELECT ID,Customer__c,Customer_Name__c,Contacts__c,Contacts_Name__c,Telephone__c,Province__c,Province_Name__c,City__c,City_Name__c,Detailed_Address__c,ZipCode__c' |
| | | + ' ,Address_Classification__c,Beipin_Center__c ' |
| | | //+ ',Contacts__r.LastName_Encrypted__c,ZipCode_Encrypted__c,Detailed_Address_Encrypted__c,Telephone_Encrypted__c' // PIæ¹é By Bright 20220407 zhj MEBGæ°æ¹æ¡æ¹é 2022-11-29 |
| | | + ' from Address__c ' |
| | | + ' where Address_Classification__c = \'åäºå¤\' and Province_Name__c in :provinceList and City_Name__c in :cityList ' |
| | | + ' where ( Address_Classification__c = \'åäºå¤\' and Province_Name__c in :provinceList and City_Name__c in :cityList )' |
| | | + ' or Address_Classification__c = \'å¤å\'' |
| | | + ' order by Using_Datetime__c desc NULLS LAST '; |
| | | system.debug('addressSQl='+addressSQl); |
| | | List<Address__c> addressList = Database.query(addressSQl); |
| | | |
| | | if(addressList != null && addressList.size() > 0){ |
| | | system.debug(addressList[0]); |
| | | // gzw DB202212270703 20230301 å¤åå°å导å
¥æ¹é end |
| | | system.debug('addressSQl='+addressSQl); |
| | | List<Address__c> addressList = new List<Address__c>(); |
| | | Map<String,Address__c> beipinMap = new Map<String,Address__c>(); |
| | | List<Address__c> addressTempList = Database.query(addressSQl); |
| | | for (Address__c ad :addressTempList) { |
| | | if (ad.Address_Classification__c == 'å¤å') { |
| | | beipinMap.put(ad.Beipin_Center__c,ad); |
| | | }else{ |
| | | addressList.add(ad); |
| | | } |
| | | } |
| | | //List<Address__c> addressList = Database.query(addressSQl); |
| | | |
| | | |
| | | // if(addressList != null && addressList.size() > 0){ |
| | | if(addressTempList != null && addressTempList.size() > 0){ |
| | | for (Repair__c nObj : newList) { |
| | | if (nObj.Returns_Product_way__c == 'å¤åä¸å¿') { |
| | | user re = profileAndRoleMap.get(nObj.Incharge_Staff__c); |
| | | String beipCenter = ''; |
| | | if (re.Profile.name.startsWith('2B2')) { |
| | | if (re.Branch__c == 'å京') { |
| | | beipCenter = 'å京å¤åä¸å¿'; |
| | | }else if (re.Branch__c == '䏿µ·') { |
| | | beipCenter = 'åä¸å¤åä¸å¿'; |
| | | }else if (re.Branch__c == '广å·') { |
| | | beipCenter = '广å·å¤åä¸å¿'; |
| | | } |
| | | }else if (re.UserRole.name == 'CTECæè²æ¬é¨') { |
| | | if (re.Branch__c == 'å京') { |
| | | beipCenter = 'å京C-TEC'; |
| | | }else if (re.Branch__c == '䏿µ·') { |
| | | beipCenter = '䏿µ·C-TEC'; |
| | | }else if (re.Branch__c == '广å·') { |
| | | beipCenter = '广å·C-TEC'; |
| | | } |
| | | } |
| | | |
| | | if(String.isNotBlank(beipCenter)){ |
| | | Address__c addressbeip = beipinMap.get(beipCenter); |
| | | //è系人 |
| | | String contactsName = ''; |
| | | String contactsNameEncrypt = ''; |
| | | if(!String.isBlank(addressbeip.Contacts__c)){ |
| | | contactsName = addressbeip.Contacts_Name__c; |
| | | } |
| | | //ç+å¸ |
| | | String address = addressbeip.Detailed_Address__c.trim(); |
| | | String cityName = addressbeip.City_Name__c.trim(); |
| | | String ProvinceCity = addressbeip.Province_Name__c.trim()+cityName; |
| | | //鲿¢è¯¦ç»å°åéé¢å¸¦çç份åå¸ |
| | | if(!address.contains(ProvinceCity)){ |
| | | address = ProvinceCity + address; |
| | | } |
| | | //è系人 |
| | | String ContactPerson = ''; |
| | | if(!String.isBlank(addressbeip.Customer__c)){ |
| | | ContactPerson = addressbeip.Customer_Name__c; |
| | | } |
| | | nObj.address_Contacts__c=contactsName; |
| | | nObj.address_ZipCode__c = addressbeip.ZipCode__c; |
| | | nObj.address_City__c = cityName; |
| | | nObj.address_Contacts_Name__c = ContactPerson; |
| | | nObj.address_Telephone__c=addressbeip.Telephone__c; |
| | | nObj.Detailed_Address__c=address; |
| | | nObj.Encrypt_Update_Flag__c=true; |
| | | system.debug('nObj assign and Encrypt_Update_Flag__c set true'); |
| | | |
| | | } |
| | | }else{ |
| | | if(nObj.Hospital__c != null && nObj.address_Contacts__c == null && nObj.address_Telephone__c == null && nObj.address_Contacts_Name__c == null && nObj.address_City__c == null && nObj.Detailed_Address__c == null){ |
| | | //ç±äºä¸ºäºåå°select ,æä»¥è·åæä»¬é
置好çmapï¼æ ¹æ®ä¿æè®¾å¤ä¸å»é¢ç OCSM管çç(ææ¬) çå¼ï¼è·å对åºçå°åä¸ççåå¸ |
| | | for(Account ac : accountList){ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | Map<String, List<Repair__c>> repaMap = new Map<String, List<Repair__c>>(); |
| | | List<Repair__c> repList = [select id, Status1__c, Status2__c, Return_Without_Repair_Reason__c, Contract_status__c, Return_Without_Repair_IF__c, Failure_Occurrence_Date__c, |
| | | List<Repair__c> repList = [select id, Status1__c, Status2__c, Return_Without_Repair_Reason__c, Contract_status__c, Return_Without_Repair_IF__c, Failure_Occurrence_Date__c,CancellationReason__c, |
| | | Delivered_Product__c |
| | | // LJPH-C67A6E gzw é»è¾fix start |
| | | ,FSE_ApplyForRepair_Day__c,Contract_Start_Date__c,Contract_End_Date__c |
| | |
| | | if (rList[0] != null) { |
| | | if (rList[0].Return_Without_Repair_IF__c == true) { |
| | | //夿å¼ä¿®çé»è¾ |
| | | // 20230207âå¼ä¿®ââä¿®çä¸â设å¤å¤æé»è¾ä¿®æ¹ start |
| | | if (rList[0].Return_Without_Repair_Reason__c == 'I/Fçç±ã確èª' &&(rList[0].CancellationReason__c == 'æ¥ä»·åå°æ' |
| | | || rList[0].CancellationReason__c == 'åºå¼' || rList[0].CancellationReason__c == 'è´ä¹°æ°å' || rList[0].CancellationReason__c == 'é¶ä»¶å产' |
| | | || rList[0].CancellationReason__c == 'é¶ä»¶å·²åæ¢ç产' || rList[0].CancellationReason__c == 'å°å
¶ä»å
¬å¸ä¿®ç' || rList[0].CancellationReason__c == 'å
¶ä»' |
| | | || rList[0].CancellationReason__c == 'ä¿®çä»·æ ¼é«' || rList[0].CancellationReason__c == 'åæç»§ç»ä½¿ç¨' || rList[0].CancellationReason__c == 'æ æ³ä¿®ç' |
| | | || rList[0].CancellationReason__c == 'ä¿®çä»·æ ¼å¤ªé«' || rList[0].CancellationReason__c == 'ç¨æ·åæç»§ç»ä½¿ç¨' || rList[0].CancellationReason__c == 'æ æ³ä¿®çè¿å')) { |
| | | if (reason != null) { |
| | | if (reason.contains('ä¿®çä¸')) { |
| | | a.Reson_Can_not_Warranty__c = reason.replace('ä¿®çä¸', ''); |
| | | } |
| | | if (!reason.contains('å¼ä¿®')) { |
| | | a.Reson_Can_not_Warranty__c = reason + 'å¼ä¿®'; |
| | | } |
| | | } else { |
| | | a.Reson_Can_not_Warranty__c = 'å¼ä¿®'; |
| | | } |
| | | } |
| | | // 20230207âå¼ä¿®ââä¿®çä¸â设å¤å¤æé»è¾ä¿®æ¹ end |
| | | if (rList[0].Return_Without_Repair_Reason__c == '1.ä¿®çä»·æ ¼å¤ªé«' || rList[0].Return_Without_Repair_Reason__c == '2.å°å
¶ä»å
¬å¸ä¿®ç' |
| | | || rList[0].Return_Without_Repair_Reason__c == '4.åæç»§ç»ä½¿ç¨' || rList[0].Return_Without_Repair_Reason__c == '3.æ¥ä»·åè¶
æ' |
| | | || rList[0].Return_Without_Repair_Reason__c == '5.åºå¼' || rList[0].Return_Without_Repair_Reason__c == '6.è´ä¹°æ°å' |
| | | || rList[0].Return_Without_Repair_Reason__c == '8.ä¹¾ç¥') { |
| | | //ass = assMap.get(rpc.Delivered_Product__c); |
| | | if (reason != null) { |
| | | if (reason.contains('ä¿®çä¸')) { |
| | | a.Reson_Can_not_Warranty__c = reason.replace('ä¿®çä¸', ''); |
| | | } |
| | | if (!reason.contains('å¼ä¿®')) { |
| | | a.Reson_Can_not_Warranty__c = reason + 'å¼ä¿®'; |
| | | } |
| | |
| | | update repair02; |
| | | |
| | | } |
| | | static testMethod void test07(){ |
| | | //å®¢æ· |
| | | Account hospital = createHospital( 'test hospital'); |
| | | Account[] strategicDep = selectStrategicDep( hospital); |
| | | Account dep = createDep( hospital, strategicDep[0]); |
| | | // ä¿æè®¾å¤ |
| | | Asset asset = createAsset( hospital, strategicDep[0], dep); |
| | | // å建维修åå |
| | | Maintenance_Contract__c contract = new Maintenance_Contract__c(); |
| | | // ID RecordTypeId1 = Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByName().get('æå¡åå').getRecordTypeId(); |
| | | // ID RecordTypeId2 = Schema.SObjectType.Maintenance_Contract_Estimate__c.getRecordTypeInfosByName().get('æå¡å忥价').getRecordTypeId(); |
| | | contract.Name = 'tect contract'; |
| | | contract.status__c = 'å¥ç´'; |
| | | contract.URF_Contract__c=true; |
| | | 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.today().addDays( -10); // 10æ¥å |
| | | contract.Contract_End_Date__c = Date.today().addDays( 5); // 5æ¥å¾ |
| | | contract.SalesOfficeCode_selection__c = 'å京RC'; |
| | | contract.RecordTypeId='01210000000gTYq'; |
| | | // contract.RecordTypeId=RecordTypeId1; |
| | | contract.URF_Contract__c = true; |
| | | contract.agree_Upper_limit__c = true; |
| | | insert contract; |
| | | //å建维修å忥价 |
| | | Maintenance_Contract_Estimate__c Estimate = new Maintenance_Contract_Estimate__c(); |
| | | Estimate.Maintenance_Contract__c = contract.Id; |
| | | Estimate.recordtypeId = '01210000000gTZA'; |
| | | // Estimate.recordtypeId = RecordTypeId2; |
| | | Estimate.Name = 'æ¥ä»·1'; |
| | | insert Estimate; |
| | | //å建维修å忥价/ä¿æè®¾å¤ |
| | | Maintenance_Contract_Asset_Estimate__c Asset_Estimate = new Maintenance_Contract_Asset_Estimate__c(); |
| | | Asset_Estimate.Maintenance_Contract_Estimate__c = Estimate.Id; |
| | | Asset_Estimate.CurrencyIsoCode = 'CNY'; |
| | | Asset_Estimate.Series_MaxRepairCount__c = 10; |
| | | Asset_Estimate.Series_RepairCount__c = 5; |
| | | insert Asset_Estimate; |
| | | //å建维修åå/ä¿æè®¾å¤ |
| | | Maintenance_Contract_Asset__c middleTable = new Maintenance_Contract_Asset__c(); |
| | | middleTable.Asset__c = asset.Id; |
| | | middleTable.Maintenance_Contract__c = contract.Id; |
| | | middleTable.CurrencyIsoCode= 'CNY'; |
| | | middleTable.startDateGurantee_Text__c =Date.today().addDays( 5); |
| | | middleTable.endDateGurantee_Text__c =Date.today().addDays( 30); |
| | | middleTable.Maintenance_Contract_Asset_Estimate__c = Asset_Estimate.Id; |
| | | insert middleTable; |
| | | // ä¿®çã使ãã01 |
| | | Repair__c repair01 = new Repair__c(); |
| | | repair01.Account__c = dep.Id; |
| | | repair01.Department_Class__c = strategicDep[0].Id; |
| | | repair01.Hospital__c = hospital.Id; |
| | | repair01.SERVICE_CONTRACT_JUDEGE_DAY__C = Date.today(); // ç»´ä¿®åå夿æ¥å¨ååå¼å§æ¥ä¸ååç»ææ¥ä¹é´ |
| | | repair01.Failure_Occurrence_Date__c =Date.today(); |
| | | repair01.Delivered_Product__c = asset.Id; |
| | | repair01.Status__c = 'èæ¡ä¸'; |
| | | repair01.Return_Without_Repair_IF__c =true; |
| | | repair01.SalesOfficeCode_selection__c = '西å®RC'; |
| | | repair01.Return_Without_Repair_Reason__c = '1.ä¿®çä»·æ ¼å¤ªé«'; |
| | | insert repair01; |
| | | |
| | | Repair__c checkRepair = null; |
| | | checkRepair = [SELECT Id, Name , Maintenance_Contract__c,MaintenanceContractType__c FROM Repair__c WHERE ID = :repair01.id]; |
| | | System.assertEquals( contract.Id, checkRepair.Maintenance_Contract__c); |
| | | |
| | | // ä¿®çã使ãã01 |
| | | Repair__c repair02 = new Repair__c(); |
| | | repair02.Account__c = dep.Id; |
| | | repair02.Department_Class__c = strategicDep[0].Id; |
| | | repair02.Hospital__c = hospital.Id; |
| | | repair02.SERVICE_CONTRACT_JUDEGE_DAY__C = Date.today(); // ç»´ä¿®åå夿æ¥å¨ååå¼å§æ¥ä¸ååç»ææ¥ä¹é´ |
| | | repair02.Failure_Occurrence_Date__c =Date.today(); |
| | | repair02.Delivered_Product__c = asset.Id; |
| | | repair02.Return_Without_Repair_Reason__c = '4.åæç»§ç»ä½¿ç¨'; |
| | | repair02.Return_Without_Repair_IF__c =true; |
| | | insert repair02; |
| | | delete repair02; |
| | | |
| | | checkRepair.On_site_repair__c = 'åäºå¤ä¿®ç'; |
| | | contract.SalesOfficeCode_selection__c = '广å·RC'; |
| | | update contract; |
| | | checkRepair.SalesOfficeCode_selection__c = 'æé½'; |
| | | update checkRepair; |
| | | contract.SalesOfficeCode_selection__c = 'å京RC'; |
| | | update contract; |
| | | checkRepair.SalesOfficeCode_selection__c = '太å'; |
| | | update checkRepair; |
| | | checkRepair.SalesOfficeCode_selection__c = 'æå·'; |
| | | update checkRepair; |
| | | } |
| | | |
| | | static testMethod void test08(){ |
| | | //å®¢æ· |
| | | Account hospital = createHospital( 'test hospital'); |
| | | Account[] strategicDep = selectStrategicDep( hospital); |
| | | Account dep = createDep( hospital, strategicDep[0]); |
| | | // ä¿æè®¾å¤ |
| | | Asset asset = createAsset( hospital, strategicDep[0], dep); |
| | | // å建维修åå |
| | | Maintenance_Contract__c contract = new Maintenance_Contract__c(); |
| | | // ID RecordTypeId1 = Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByName().get('æå¡åå').getRecordTypeId(); |
| | | // ID RecordTypeId2 = Schema.SObjectType.Maintenance_Contract_Estimate__c.getRecordTypeInfosByName().get('æå¡å忥价').getRecordTypeId(); |
| | | contract.Name = 'tect contract'; |
| | | contract.status__c = 'å¥ç´'; |
| | | contract.URF_Contract__c=true; |
| | | 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.today().addDays( -10); // 10æ¥å |
| | | contract.Contract_End_Date__c = Date.today().addDays( 5); // 5æ¥å¾ |
| | | contract.SalesOfficeCode_selection__c = 'å京RC'; |
| | | contract.RecordTypeId='01210000000gTYq'; |
| | | // contract.RecordTypeId=RecordTypeId1; |
| | | contract.URF_Contract__c = true; |
| | | contract.agree_Upper_limit__c = true; |
| | | insert contract; |
| | | //å建维修å忥价 |
| | | Maintenance_Contract_Estimate__c Estimate = new Maintenance_Contract_Estimate__c(); |
| | | Estimate.Maintenance_Contract__c = contract.Id; |
| | | Estimate.recordtypeId = '01210000000gTZA'; |
| | | // Estimate.recordtypeId = RecordTypeId2; |
| | | Estimate.Name = 'æ¥ä»·1'; |
| | | insert Estimate; |
| | | //å建维修å忥价/ä¿æè®¾å¤ |
| | | Maintenance_Contract_Asset_Estimate__c Asset_Estimate = new Maintenance_Contract_Asset_Estimate__c(); |
| | | Asset_Estimate.Maintenance_Contract_Estimate__c = Estimate.Id; |
| | | Asset_Estimate.CurrencyIsoCode = 'CNY'; |
| | | Asset_Estimate.Series_MaxRepairCount__c = 10; |
| | | Asset_Estimate.Series_RepairCount__c = 5; |
| | | insert Asset_Estimate; |
| | | //å建维修åå/ä¿æè®¾å¤ |
| | | Maintenance_Contract_Asset__c middleTable = new Maintenance_Contract_Asset__c(); |
| | | middleTable.Asset__c = asset.Id; |
| | | middleTable.Maintenance_Contract__c = contract.Id; |
| | | middleTable.CurrencyIsoCode= 'CNY'; |
| | | middleTable.startDateGurantee_Text__c =Date.today().addDays( 5); |
| | | middleTable.endDateGurantee_Text__c =Date.today().addDays( 30); |
| | | middleTable.Maintenance_Contract_Asset_Estimate__c = Asset_Estimate.Id; |
| | | insert middleTable; |
| | | // ä¿®çã使ãã01 |
| | | Repair__c repair01 = new Repair__c(); |
| | | repair01.Account__c = dep.Id; |
| | | repair01.Department_Class__c = strategicDep[0].Id; |
| | | repair01.Hospital__c = hospital.Id; |
| | | repair01.SERVICE_CONTRACT_JUDEGE_DAY__C = Date.today(); // ç»´ä¿®åå夿æ¥å¨ååå¼å§æ¥ä¸ååç»ææ¥ä¹é´ |
| | | repair01.Failure_Occurrence_Date__c =Date.today(); |
| | | repair01.Delivered_Product__c = asset.Id; |
| | | repair01.Status__c = 'èæ¡ä¸'; |
| | | repair01.SalesOfficeCode_selection__c = '西å®RC'; |
| | | repair01.Return_Without_Repair_Reason__c = 'I/Fçç±ã確èª'; |
| | | repair01.CancellationReason__c = 'ä¿®çä»·æ ¼é«'; |
| | | repair01.Return_Without_Repair_IF__c =true; |
| | | insert repair01; |
| | | |
| | | Repair__c checkRepair = null; |
| | | checkRepair = [SELECT Id, Name , Maintenance_Contract__c,MaintenanceContractType__c FROM Repair__c WHERE ID = :repair01.id]; |
| | | System.assertEquals( contract.Id, checkRepair.Maintenance_Contract__c); |
| | | |
| | | // ä¿®çã使ãã01 |
| | | Repair__c repair02 = new Repair__c(); |
| | | repair02.Account__c = dep.Id; |
| | | repair02.Department_Class__c = strategicDep[0].Id; |
| | | repair02.Hospital__c = hospital.Id; |
| | | repair02.SERVICE_CONTRACT_JUDEGE_DAY__C = Date.today(); // ç»´ä¿®åå夿æ¥å¨ååå¼å§æ¥ä¸ååç»ææ¥ä¹é´ |
| | | repair02.Failure_Occurrence_Date__c =Date.today(); |
| | | repair02.Delivered_Product__c = asset.Id; |
| | | repair02.Return_Without_Repair_Reason__c = 'I/Fçç±ã確èª'; |
| | | repair02.CancellationReason__c = 'æ æ³ä¿®çè¿å'; |
| | | repair02.Return_Without_Repair_IF__c =true; |
| | | insert repair02; |
| | | delete repair02; |
| | | |
| | | checkRepair.On_site_repair__c = 'åäºå¤ä¿®ç'; |
| | | contract.SalesOfficeCode_selection__c = '广å·RC'; |
| | | update contract; |
| | | checkRepair.SalesOfficeCode_selection__c = 'æé½'; |
| | | update checkRepair; |
| | | contract.SalesOfficeCode_selection__c = 'å京RC'; |
| | | update contract; |
| | | checkRepair.SalesOfficeCode_selection__c = '太å'; |
| | | update checkRepair; |
| | | checkRepair.SalesOfficeCode_selection__c = 'æå·'; |
| | | update checkRepair; |
| | | } |
| | | |
| | | } |
| | |
| | | List<Agency_Hospital_Link__c> ahlList; |
| | | Contact conStrList = [select AccountId from contact where id in (select ContactId from User where id =: SignInId)]; |
| | | String strAgencyId =conStrList.AccountId; |
| | | System.debug('UserProTypec.UserPro_Type__c = ' + UserProTypec.UserPro_Type__c); |
| | | if(UserProTypec.UserPro_Type__c == 'ENG'){ |
| | | ahlList = [select id,name,Hospital__c,MaxActivityDate__c from Agency_Hospital_Link__c where Agency__c =: strAgencyId and name = :ahlNameList and AgencyHos_ENG__c = true and Agency_Campaign_Obj__c = true]; |
| | | }else { |
| | |
| | | // nameConMap.put(con.Id, con.Name); |
| | | // } |
| | | // return testuse; |
| | | System.debug('ahlList = ' + ahlList); |
| | | for(Agency_Hospital_Link__c ahl : ahlList){ |
| | | ahlMap.put(ahl.Name, ahl); |
| | | ahlOcsmIdList.add(ahl.Hospital__c); |
| | |
| | | if(lineList[0] != null && lineList[0] != ''){ |
| | | agencyReport.Report_Date__c = Date.valueOf(lineList[0].replace('/','-')); |
| | | } |
| | | System.debug('ahlMap = ' + ahlMap); |
| | | System.debug('lineList[1] = ' + lineList[1]); |
| | | if(ahlMap.containsKey(lineList[1])){ |
| | | agencyReport.Agency_Hospital__c = ahlMap.get(lineList[1]).Id; |
| | | ahlMap.get(lineList[1]).MaxActivityDate__c = week; |
| | |
| | | // 20220722 ljh SWAG-CE6A58 update end |
| | | Hospital__c, Department_Class__c |
| | | , OCSM_RMB_Without_Tax_1000TR__c//20220111 SWAG-C8MBB6 å 7.询价 lt |
| | | //20230222 DB202302339407 you start |
| | | ,LostPrices__c |
| | | ,convertCurrency(Dealer_Final_Price__c) |
| | | ,order_Date_For_Report__c |
| | | ,StageName__c |
| | | //20230222 DB202302339407 you end |
| | | from Opportunity |
| | | where Hospital__c in :hpList |
| | | ]) { |
| | |
| | | //20220111 SWAG-C8MBB6 å 7.询价 lt start |
| | | Decimal o7 = opp.OCSM_RMB_Without_Tax_1000TR__c == null ? 0 : opp.OCSM_RMB_Without_Tax_1000TR__c; |
| | | //20220111 SWAG-C8MBB6 å 7.询价 lt end |
| | | setOppAmount(hpacc, o1, o2, o3, o4, o5, o6, o7); |
| | | setOppAmount(dcacc, o1, o2, o3, o4, o5, o6, o7); |
| | | //20230222 you start |
| | | Decimal o8 = 0; |
| | | Decimal o9 = 0; |
| | | Decimal o10 = 0; |
| | | |
| | | if(opp.order_Date_For_Report__c>= thisYd && opp.order_Date_For_Report__c < nextYd){ |
| | | o8 = opp.LostPrices__c == null ? 0 : opp.LostPrices__c; |
| | | if(opp.StageName__c !='失å' && opp.StageName__c !='åæ¶'){ |
| | | o9 = opp.Dealer_Final_Price__c == null ? 0 : opp.Dealer_Final_Price__c / 1.13 / 1000; |
| | | } |
| | | o10 = o8 + o9; |
| | | } |
| | | //20230222 you end |
| | | setOppAmount(hpacc, o1, o2, o3, o4, o5, o6, o7,o8,o9,o10); |
| | | setOppAmount(dcacc, o1, o2, o3, o4, o5, o6, o7,o8,o9,o10); |
| | | |
| | | } |
| | | |
| | | |
| | | // æ¥å书 |
| | | for (Report__c report : [ |
| | |
| | | acc.AllOP_ThousandY__c = 0; |
| | | //20220111 SWAG-C8MBB6 å 7.询价 lt end |
| | | |
| | | //20230222 you start |
| | | acc.LostPrices__c = 0; |
| | | acc.Dealer_Final_Price__c = 0; |
| | | acc.HospitalTransactionAmount__c = 0; |
| | | //20230222 you end |
| | | |
| | | acc.Important_product1__c = 0; |
| | | acc.Important_product2__c = 0; |
| | | acc.Important_product3__c = 0; |
| | |
| | | acc.ShippedAmount_HP__c += sa; |
| | | } |
| | | |
| | | private void setOppAmount(Account2__c acc, Decimal o1, Decimal o2, Decimal o3, Decimal o4, Decimal o5, Decimal o6, Decimal o7) { |
| | | private void setOppAmount(Account2__c acc, Decimal o1, Decimal o2, Decimal o3, Decimal o4, Decimal o5, Decimal o6, Decimal o7,Decimal o8,Decimal o9,Decimal o10) { |
| | | acc.Opp_Actual_ThousandY__c += o1; |
| | | acc.BO_Forecast_ThousandY__c += o2; |
| | | acc.OP_ThousandY__c += o3; |
| | |
| | | //20220111 SWAG-C8MBB6 å 7.询价 lt start |
| | | acc.AllOP_ThousandY__c += o7; |
| | | //20220111 SWAG-C8MBB6 å 7.询价 lt end |
| | | //20230222 you start |
| | | acc.LostPrices__c += o8; |
| | | acc.Dealer_Final_Price__c += o9; |
| | | acc.HospitalTransactionAmount__c += o10; |
| | | |
| | | //20230222 you end |
| | | } |
| | | |
| | | private void setOpdIproductCount(Account2__c acc, Decimal decIP1, Decimal decIP2, Decimal decIP3, Decimal decIP4, Decimal decIP5, Decimal decIP6, Decimal decIP7, Decimal decIP8, Decimal decIP9, Decimal decIP10, |
| | |
| | | countImportantProduct(acc,nameType,tmpCnt,tmpKey,allList,departmentE,depToOtherDepAcc2Map, updateAccount, OldAccount2); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | private class RollupToHPBatchTest { |
| | | static Date targetToday = RollupToHPBatch.getTargetDay().addDays(1); |
| | | static Datetime targetNow = Datetime.newInstance(targetToday, Time.newInstance(6, 0, 0, 0)); |
| | | |
| | | /** |
| | | static testMethod void testExecute() { |
| | | ControllerUtil.EscapeNFM001Trigger = true; |
| | | |
| | | // 20230227 ljh add start |
| | | StaticParameter.EscapeNFM001Trigger = true; |
| | | StaticParameter.EscapeNFM001AgencyContractTrigger = true; |
| | | StaticParameter.EscapeNFM001AgencyContractTrigger2 = true; |
| | | StaticParameter.EscapeOppandStaTrigger = true; |
| | | // 20230227 ljh add end |
| | | Oly_TriggerHandler.bypass('PowerBIBaseHandler'); |
| | | |
| | | Profile p = [select Id from Profile where id = :System.Label.ProfileId_SystemAdmin]; |
| | |
| | | System.assertEquals(0, dccheck5[0].Energy_Processor_Count__c); |
| | | System.assertEquals(1, dccheck5[0].Energy_Processor_Count_SP__c); |
| | | System.assertEquals(1, dccheck5[0].Other_Competitor_Product_Count__c); |
| | | } |
| | | }**/ |
| | | static testMethod void SoakupHPOppRanktaxTest() { |
| | | ControllerUtil.EscapeNFM001Trigger = true; |
| | | |
| | |
| | | Maintenance_Contract__r.RecordType_DeveloperName__c, |
| | | VM_Maintenance_Contract__r.startDateGurantee__c, |
| | | VM_Maintenance_Contract__r.endDateGurantee__c |
| | | ,Agreed_Date__c //ç¨æ·åææ¥ ä¸éåå LY 20230210 add |
| | | ,Limit_Price__c //ä¸éä¿®ç ä¸éåå LY 20230210 add |
| | | from Repair__c |
| | | where (Maintenance_Contract__c != null or VM_Maintenance_Contract__c != null) |
| | | and (Maintenance_Contract__c in: mcList or VM_Maintenance_Contract__c in: mcList) |
| | |
| | | mc.Sum_repair_price_new__c = 0.00; |
| | | } |
| | | if (dTDate >= dSDate && dTDate <= dEDate) { |
| | | //ä¸éåå LY 20230210 start |
| | | if (rc.Limit_Price__c == true) { |
| | | if (rc.Agreed_Date__c!=null) {//æ¥ä»·åæå ä¿®ççã计å
¥ååæ¶è´¹ççä¿®çéé¢ãè®°å
¥å°ç»´ä¿®ååçååæé´ä¿®çéé¢ã ä¸éåå LY add 20230210 |
| | | mc.Sum_repair_price_new__c += rc.Usage_Ratio_Price__c == null ? 0 : rc.Usage_Ratio_Price__c; |
| | | } |
| | | }else{ |
| | | mc.Sum_repair_price_new__c += rc.Usage_Ratio_Price__c == null ? 0 : rc.Usage_Ratio_Price__c; |
| | | } |
| | | //ä¸éåå LY 20230210 end |
| | | } |
| | | System.debug('ä¿®çéé¢ç»æ'+mc.Sum_repair_price_new__c); |
| | | updateMC.put(rc.Maintenance_Contract__c, mc); |
| | | } |
| | | //20210106 zh LJPH-BWM5HM å¤å¹´ä¿ä¿®ãååæé´ä¿®çéé¢ãé»è¾ä¿®æ¹ start |
| | |
| | | public Boolean disableEmailBtn { get; set; } |
| | | public Boolean sendEmailSuccess { get; set; } |
| | | public Boolean hasSendEmail { get; set; } |
| | | |
| | | |
| | | // ä¸éåå hql 20230216 start |
| | | public Boolean isLimitPrice { get; set; } |
| | | // ä¸éåå hql 20230216 end |
| | | public Boolean isNotFSE { get; set; } |
| | | |
| | | //å¤å¹´ä¿è®¾å¤ç»ç¾è®¡ç®é»è¾è°æ´ 2022/12/14 |
| | |
| | | totalPage = (totalRecords / selctRecordNum) + (Math.mod(totalRecords, selctRecordNum) > 0 ? 1 : 0); |
| | | return null; |
| | | } |
| | | |
| | | public 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++; |
| | | } |
| | | // å已鿩èµäº§çæºèº«ç¼ç |
| | | public void getAssetSerialNumber() { |
| | | //LJPH-BSS6E2 ---20200911 ---add by rentongxiao start |
| | |
| | | } |
| | | } |
| | | } |
| | | public Map<String,repair__c> getNewrep(List<Asset> assetRecords) { |
| | | List<String> assnoList = new List<String>(); |
| | | // æ
éåå è´¹20221226 |
| | | for (Asset ast : assetRecords) { |
| | | if (ast.Return_Without_Repair__r.Agreed_Date__c == null) { |
| | | if (!assnoList.contains(ast.id)) { |
| | | assnoList.add(ast.id); |
| | | } |
| | | } |
| | | } |
| | | List<repair__c> repairs2 = [SELECT Id,name,Repair_List_Price_formula__c,Delivered_Product__r.id ,CreatedDate |
| | | FROM repair__c |
| | | WHERE Delivered_Product__c in :assnoList order by Delivered_Product__c ,CreatedDate desc]; |
| | | Map<String,repair__c> assNewRepMap = new Map<String,repair__c>(); |
| | | for (repair__c rep : repairs2) { |
| | | if (assNewRepMap.get(rep.Delivered_Product__r.id)==null){ |
| | | assNewRepMap.put(rep.Delivered_Product__r.id,rep); |
| | | } |
| | | if (assNewRepMap.get(rep.Delivered_Product__r.id)!=null) { |
| | | if (assNewRepMap.get(rep.Delivered_Product__r.id).CreatedDate < rep.CreatedDate) { |
| | | assNewRepMap.remove(rep.Delivered_Product__r.id); |
| | | assNewRepMap.put(rep.Delivered_Product__r.id,rep); |
| | | } |
| | | } |
| | | } |
| | | return assNewRepMap; |
| | | } |
| | | // public Map<String,repair__c> getNewrep(List<Asset> assetRecords) { |
| | | // List<String> assnoList = new List<String>(); |
| | | // // æ
éåå è´¹20221226 |
| | | // for (Asset ast : assetRecords) { |
| | | // if (ast.Return_Without_Repair__r.Agreed_Date__c == null) { |
| | | // if (!assnoList.contains(ast.id)) { |
| | | // assnoList.add(ast.id); |
| | | // } |
| | | // } |
| | | // } |
| | | // List<repair__c> repairs2 = [SELECT Id,name,Repair_List_Price_formula__c,Delivered_Product__r.id ,CreatedDate |
| | | // FROM repair__c |
| | | // WHERE Delivered_Product__c in :assnoList order by Delivered_Product__c ,CreatedDate desc]; |
| | | // Map<String,repair__c> assNewRepMap = new Map<String,repair__c>(); |
| | | // for (repair__c rep : repairs2) { |
| | | // if (assNewRepMap.get(rep.Delivered_Product__r.id)==null){ |
| | | // assNewRepMap.put(rep.Delivered_Product__r.id,rep); |
| | | // } |
| | | // if (assNewRepMap.get(rep.Delivered_Product__r.id)!=null) { |
| | | // if (assNewRepMap.get(rep.Delivered_Product__r.id).CreatedDate < rep.CreatedDate) { |
| | | // assNewRepMap.remove(rep.Delivered_Product__r.id); |
| | | // assNewRepMap.put(rep.Delivered_Product__r.id,rep); |
| | | // } |
| | | // } |
| | | // } |
| | | // return assNewRepMap; |
| | | // } |
| | | public void NextMaintenanceContract() { |
| | | // 20220810 询价2æå¼å |
| | | List<String> asslocalList = new List<String>(); |
| | |
| | | } |
| | | SELECT_LIMIT = selctRecordNum; |
| | | Integer selectCnt = unCheckedAssets.size(); |
| | | Map<String,repair__c> assNewRepMap = new Map<String,repair__c>(); |
| | | assNewRepMap = getNewrep(assetList); |
| | | // Map<String,repair__c> assNewRepMap = new Map<String,repair__c>(); |
| | | // assNewRepMap = getNewrep(assetList); |
| | | num++; |
| | | num++; |
| | | for (Asset asset : assetList) { |
| | |
| | | if (unCheckedAssets.size() >= SELECT_LIMIT) { overLimit = true; break; } |
| | | if (markUpUnCheckMap.containsKey(asset.Id) == false) { |
| | | //unCheckedInfoList.add(unCheckMap.get(asset.Id)); |
| | | unCheckedAssets.add(new AssetInfo(unCheckedAssets.size(), asset,assNewRepMap)); |
| | | unCheckedAssets.add(new AssetInfo(unCheckedAssets.size(), asset)); |
| | | } |
| | | } |
| | | } |
| | |
| | | //URF鿬¡åå2æ LY 20220811 end |
| | | |
| | | //å¤å¹´ä¿è®¾å¤ç»ç¾è®¡ç®é»è¾è°æ´ 2022/12/14 start æ¶è´¹ç |
| | | +'CurrentContract_F_asset__r.Asset_Consumption_Rate__c,Product2.Category4__c,Product2.Asset_Model_No__c,' |
| | | +'CurrentContract_F_asset__r.Asset_Consumption_Rate__c,Product2.Category4__c,Product2.Asset_Model_No__c,CurrentContract_F_asset__r.Maintenance_Price_Year__c,' |
| | | +'CurrentContract_F_asset__r.IS_VMContract_Asset__c,' |
| | | +'CurrentContract_F__r.endDateGurantee__c,' |
| | | //å¤å¹´ä¿è®¾å¤ç»ç¾è®¡ç®é»è¾è°æ´ 2022/12/14 end |
| | | |
| | | + 'CurrentContract_End_Date__c, Extend_Gurantee_DateTo__c,EquipmentGuaranteeFlg__c,AssetMark__c,NoPartRiskDate_F__c,NoPartRiskDate__c,SignableFlag__c FROM Asset WHERE Hospital__c = \'' + this.targetHospitalId + '\' '; |
| | |
| | | |
| | | //2022/12/27 æ
éåå è´¹ æ°å¢æäº¤ä¿®çåä»· æé®ä»
对 å¼ æ¶ å¼ æ ©æ¦å 管çåå¯è§ |
| | | public Boolean getApprovalBtnNewDisabled() { |
| | | // è¦ç©ããç³è«ã§ããªãæ¡ä»¶ã®å¤æ |
| | | if (String.isBlank(this.contract.Decided_Estimation__c) == false) { |
| | | // TODO ç¹å¥è³æ ¼ãããã° ç³è«å¯è½ã«ãã |
| | | return true; |
| | | } |
| | | if (String.isBlank(this.estimate.Process_Status__c) == false |
| | | && this.estimate.Process_Status__c != 'èæ¡ä¸' |
| | | //&& this.estimate.Process_Status__c != '䏿¹å' |
| | | ) { |
| | | return true; |
| | | } |
| | | String userName = UserInfo.getName(); |
| | | String uProfileId = UserInfo.getProfileId(); |
| | | String uProfileName = [SELECT Name FROM Profile WHERE Id =: uProfileId].Name; |
| | |
| | | if (String.isBlank(this.contract.Decided_Estimation__c) == false) { |
| | | return true; |
| | | } |
| | | //ä¸éåå hql 20230113 start |
| | | if (this.isFSE == false |
| | | && this.isLimitPrice == true |
| | | && String.isBlank(this.estimate.Process_Status__c) == false |
| | | && this.estimate.Process_Status__c == 'ç³è¯·ä¸') { |
| | | return false; |
| | | } |
| | | //ä¸éåå hql 20230113 end |
| | | if (String.isBlank(this.estimate.Process_Status__c) == false |
| | | && this.estimate.Process_Status__c != 'èæ¡ä¸' |
| | | //&& this.estimate.Process_Status__c != '䏿¹å' |
| | | //ä¸éåå LY 20230113 start |
| | | && this.estimate.Process_Status__c != 'ç³è¯·ä¸' |
| | | //ä¸éåå LY 20230113 start |
| | | ) { |
| | | return true; |
| | | } |
| | |
| | | public Boolean isSaveOrApproval {get; set;} |
| | | public String OldContractStartDate {get; set;} |
| | | public String OldMaintenancePrice { get; set; } |
| | | public Decimal OldLimitPrice { get; set; } |
| | | |
| | | /** |
| | | * ã³ã³ã¹ãã©ã¯ã¿ |
| | |
| | | , Sales_incidental__c, Consumption_rate_Forecast__c, AgencyHos_Price__c |
| | | // ç³è¯·æ¥ä»·éé¢ å ç¸å¯¹æ åä»·æ ¼èå´çææ£ç |
| | | , Request_quotation_Amount__c, Service_discount_Rate__c, ContractPriceType__c |
| | | //ä¸éåå 20230103 LY start |
| | | //ä¸éåå 20230103 hql start |
| | | ,Limit_Price_Amount__c |
| | | //ä¸éåå 20230103 LY end |
| | | //ä¸éåå 20230103 hql end |
| | | , LastMContract1__c, LastMContract2__c, LastMContract3__c, LastMContract4__c, LastMContract5__c |
| | | , LastMContract1_ConCount__c, LastMContract2_ConCount__c, LastMContract3_ConCount__c, LastMContract4_ConCount__c, LastMContract5_ConCount__c, |
| | | LastMContract1_NO__c, LastMContract2_NO__c, LastMContract3_NO__c, LastMContract4_NO__c, LastMContract5_NO__c |
| | |
| | | //HWAG-B399Q8 2018/08/20 æ·»å ä¸é¢å¤å段 IS_Clone_After_Decide__c end |
| | | //æ
éåå è´¹ 2023/1/3 start |
| | | hasSendEmail = this.estimate.Send_Email_To_RC__c; |
| | | OldLimitPrice = this.estimate.Limit_Price_Amount__c; |
| | | //æ
éåå è´¹ 2023/1/3 end |
| | | decimal PriceSum = (this.estimate.Maintenance_Contract__r.Payment_Plan_Sum_First__c == null ? 0 : this.estimate.Maintenance_Contract__r.Payment_Plan_Sum_First__c) + |
| | | (this.estimate.Maintenance_Contract__r.Payment_Plan_Sum_Second__c == null ? 0 : this.estimate.Maintenance_Contract__r.Payment_Plan_Sum_Second__c) + |
| | |
| | | isSaveOrApproval = false; |
| | | OldContractStartDate = null; |
| | | OldMaintenancePrice = null; |
| | | |
| | | OldLimitPrice = null; |
| | | inDicideFlag = false; |
| | | |
| | | isSoft = false; |
| | |
| | | } |
| | | this.targetMaintenanceContractId = ApexPages.currentPage().getParameters().get('mcid'); |
| | | } |
| | | |
| | | // ç·¨éãã |
| | | if (String.isBlank(this.targetEstimateId) == false) { |
| | | setThisEstimate(); |
| | |
| | | |
| | | //å¤å¹´ä¿è®¾å¤ç»ç¾è®¡ç®é»è¾è°æ´ 2023/1/17 start |
| | | ,CurrentContract_F_asset__r.Asset_Consumption_Rate__c |
| | | ,CurrentContract_F_asset__r.Maintenance_Price_Year__c |
| | | ,CurrentContract_F_asset__r.IS_VMContract_Asset__c |
| | | ,Product2.Asset_Model_No__c |
| | | ,Product2.Category4__c |
| | | ,CurrentContract_F__r.endDateGurantee__c |
| | | //å¤å¹´ä¿è®¾å¤ç»ç¾è®¡ç®é»è¾è°æ´ 2023/1/17 end |
| | | FROM Asset WHERE Hospital__c = :this.targetHospitalId AND ( AssetMark__c != 'èæ' OR Product2.Family != 'ET' ) ORDER BY ID, IF_Warranty_Service__c asc]; |
| | | //JZHG-BSDUT4 ---20200825---update By rentongxiao---Start |
| | |
| | | //sqlStr += ' AND AssetMark__c != \'èæ\' AND Product2.Family != \'ET\' '; |
| | | this.checkedAssets = new List<AssetInfo>(); |
| | | this.unCheckedAssets = new List<AssetInfo>(); |
| | | |
| | | // ä¸éåå hql 20230216 start |
| | | Boolean isLimitPriceOne = [SELECT id,Limit_Price__c FROM Maintenance_Contract__c WHERE Id =: this.targetMaintenanceContractId].Limit_Price__c; |
| | | if(isLimitPriceOne){ |
| | | this.isLimitPrice = true; |
| | | }else{ |
| | | this.isLimitPrice = false; |
| | | } |
| | | // ä¸éåå hql 20230216 start |
| | | // 鏿æ¸ã¿ã®ç´å
¥æ©å¨æ
å ±ãåå¾ |
| | | Map<Id, Integer> selectedAssetIds = new Map<Id, Integer>(); |
| | | List<Maintenance_Contract_Asset_Estimate__c> selectedMcaes = new List<Maintenance_Contract_Asset_Estimate__c>(); |
| | |
| | | Asset__r.CurrentContract_F_asset__r.endDateGurantee_Text__c, |
| | | //å¤å¹´ä¿è®¾å¤ç»ç¾è®¡ç®é»è¾è°æ´ 2023/1/18 start è®¾å¤æ¶è´¹ç |
| | | Asset__r.CurrentContract_F_asset__r.Asset_Consumption_Rate__c, |
| | | Asset__r.CurrentContract_F_asset__r.IS_VMContract_Asset__c, |
| | | Asset__r.CurrentContract_F_asset__r.Maintenance_Price_Year__c, |
| | | Asset__r.Product2.Asset_Model_No__c, |
| | | Asset__r.Product2.Category4__c, |
| | | Asset__r.CurrentContract_F__r.endDateGurantee__c, |
| | | //å¤å¹´ä¿è®¾å¤ç»ç¾è®¡ç®é»è¾è°æ´ 2022/1/18 end |
| | | Asset__r.CurrentContract_F__r.First_Estimate_Date__c, |
| | | Asset__r.CurrentContract_F__r.Contract_Consumption_rate__c, |
| | |
| | | Asset__r.EquipmentGuaranteeFlg__c, |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | Asset__r.OwnershipMachine_No__c, |
| | | Product_Manual__r.Category4__c, |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | Asset_Consumption_rate__c, |
| | | Asset__r.CurrentContract_F__c, |
| | |
| | | Adjustment_ratio_Lower__c, |
| | | Adjustment_Lower_price__c, |
| | | Adjustment_Upper_price__c, |
| | | // æå¡å忥价è§åæ¹å 20230227 start |
| | | IS_StandardPricing__c, |
| | | // æå¡å忥价è§åæ¹å 20230227 end |
| | | Last_inspection_day__c, |
| | | Check_Result__c, |
| | | Repair_Price__c, |
| | |
| | | ,Asset__r.Product2.Asset_Model_No__c |
| | | ,Asset__r.Product2.Category4__c |
| | | ,Asset__r.CurrentContract_F_asset__r.Asset_Consumption_Rate__c |
| | | ,Asset__r.CurrentContract_F_asset__r.Maintenance_Price_Year__c |
| | | ,Asset__r.CurrentContract_F_asset__r.IS_VMContract_Asset__c |
| | | ,Asset__r.CurrentContract_F__r.endDateGurantee__c |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å 2023/01/28 end |
| | | |
| | | ,Estimate_List_Price_Page__c |
| | |
| | | // â¢Assetãå
ã«ãã¼ã¿ããããã³ã°ããæãæç´°ãããããAssetAãåå¾ã§ããªã?ä¸è¦§ã«æç´°Aãåºãªã |
| | | // 次åãAssetã®æ¤ç´¢æ¡ä»¶ã大ãã夿´ããæã対å¿å¿
è¦ |
| | | List<Data> datatemp = new List<Data>(); |
| | | Map<String,repair__c> assNewRepMap = new Map<String,repair__c>(); |
| | | assNewRepMap = getNewrep(this.assetRecords); |
| | | // Map<String,repair__c> assNewRepMap = new Map<String,repair__c>(); |
| | | // assNewRepMap = getNewrep(this.assetRecords); |
| | | datatemp = getChartData(); |
| | | for (Asset ast : this.assetRecords) { |
| | | Boolean isNew = false; |
| | |
| | | // |
| | | // |
| | | // |
| | | checkedAssets.add(new AssetInfo(checkedAssets.size(), ast, isNew, listPrice, selectedLocal,estimate,assNewRepMap)); |
| | | checkedAssets.add(new AssetInfo(checkedAssets.size(), ast, isNew, listPrice, selectedLocal,estimate)); |
| | | } else { |
| | | //update by rentongxiao 2020-09-23 start |
| | | if (ast.AssetMark__c == '主æº') { |
| | | totalRecords++; |
| | | if (unCheckedAssets.size() < selctRecordNum) { |
| | | unCheckedAssets.add(new AssetInfo(unCheckedAssets.size(), ast,assNewRepMap)); |
| | | unCheckedAssets.add(new AssetInfo(unCheckedAssets.size(), ast)); |
| | | } |
| | | } |
| | | //update by rentongxiao 2020-09-23 end |
| | |
| | | //URF鿬¡åå2æ LY 20220811 start |
| | | + 'URF_Maintenance_Contract__c,URF_Maintenance_Contract__r.Management_Code__c,URF_Maintenance_Contract__r.Contract_End_Date__c,' |
| | | //URF鿬¡åå2æ LY 20220811 end |
| | | //å¸åºå¤å¹´ä¿ä»·æ ¼å¼å start DC 2023/01/17 è®¾å¤æ¶è´¹ç 产ååå· ç¬¬ååç±» |
| | | //å¸åºå¤å¹´ä¿ä»·æ ¼å¼å start DC 2023/01/17 è®¾å¤æ¶è´¹ç 产ååå· ç¬¬ååç±» æ¯å¦ä¸ºå¤å¹´ä¿è®¾å¤ |
| | | + 'CurrentContract_F_asset__r.Asset_Consumption_Rate__c,' |
| | | + 'CurrentContract_F_asset__r.Maintenance_Price_Year__c,' |
| | | + 'CurrentContract_F_asset__r.IS_VMContract_Asset__c,' |
| | | + 'Product2.Asset_Model_No__c,' |
| | | + 'Product2.Category4__c,' |
| | | //å¸åºå¤å¹´ä¿ä»·æ ¼å¼å start DC 2023/01/17 |
| | | + 'CurrentContract_F__r.endDateGurantee__c,' |
| | | //å¸åºå¤å¹´ä¿ä»·æ ¼å¼å end DC 2023/01/17 |
| | | + 'Product2.ProductURF__c,CurrentContract_F__r.Contract_Range__c,AssetMark__c,NoPartRiskDate__c,NoPartRiskDate_F__c,Product2.PartSupplyFinishDate__c,SignableFlag__c FROM Asset WHERE Hospital__c = \'' + this.targetHospitalId + '\' ' |
| | | + 'AND Id NOT IN ' + notInId; |
| | | //HWAG-B4R3SS START 20181026 |
| | |
| | | //URF鿬¡åå2æ LY 20220811 end |
| | | |
| | | //å¸åºå¤å¹´ä¿ä»·æ ¼å¼å start DC 2023/01/17 è®¾å¤æ¶è´¹ç |
| | | sqlStr += 'CurrentContract_F_asset__r.Asset_Consumption_Rate__c,Asset__r.Product2.Asset_Model_No__c,Asset__r.Product2.Category4__c,'; |
| | | sqlStr += 'CurrentContract_F_asset__r.Asset_Consumption_Rate__c,CurrentContract_F_asset__r.IS_VMContract_Asset__c,CurrentContract_F_asset__r.Maintenance_Price_Year__c,Product2.Asset_Model_No__c,Product2.Category4__c,CurrentContract_F__r.endDateGurantee__c,'; |
| | | //å¸åºå¤å¹´ä¿ä»·æ ¼å¼å start DC 2023/01/17 |
| | | |
| | | sqlStr += ' CurrentContract_F__r.Contract_Range__c,AssetMark__c,NoPartRiskDate__c,NoPartRiskDate_F__c,Product2.PartSupplyFinishDate__c,SignableFlag__c FROM Asset WHERE Hospital__c = \'' + this.targetHospitalId + '\''; |
| | |
| | | } |
| | | } |
| | | this.unCheckedAssets = new List<AssetInfo>(); |
| | | Map<String,repair__c> assNewRepMap = new Map<String,repair__c>(); |
| | | assNewRepMap = getNewrep(this.assetRecords); |
| | | // Map<String,repair__c> assNewRepMap = new Map<String,repair__c>(); |
| | | // assNewRepMap = getNewrep(this.assetRecords); |
| | | for (Asset ast : assetRecords) { |
| | | this.unCheckedAssets.add(new AssetInfo(unCheckedAssets.size(), ast,assNewRepMap)); |
| | | this.unCheckedAssets.add(new AssetInfo(unCheckedAssets.size(), ast)); |
| | | } |
| | | listCut(unCheckedAssets); |
| | | // æ ¹æ®ååå¼å§æ¥éæ°è®¡ç®ç»´ä¿®ååä»·æ ¼ |
| | |
| | | // 20191210 Gzw æå¡ååè¿å»3å¹´ä¿®çå®ç»©åå¹¶ |
| | | List<AggregateResult> FriRepairList = [ |
| | | select |
| | | sum(Repair_List_Price_formula__c) SumPrice, |
| | | sum(Discount_Price_formula__c) SumPrice, |
| | | //2019/1æ·»å |
| | | sum(Repair_Quotation_Id__r.sales_discount__c) sales_discount, |
| | | sum(Repair_Quotation_Id__r.Contract_target__c) contract_target, |
| | |
| | | and Agreed_Date__c != null |
| | | and Agreed_Date__c > :LastYearDate |
| | | and Agreed_Date__c <= :today |
| | | // DB202302544421 LHJ add |
| | | and Status2__c !='00.å é¤' |
| | | and Status2__c !='00.åæ¶' |
| | | group by Delivered_Product__c |
| | | ]; |
| | | List<AggregateResult> SecRepairList = [ |
| | | select |
| | | sum(Repair_List_Price_formula__c) SumPrice, |
| | | sum(Discount_Price_formula__c) SumPrice, |
| | | //2019/1æ·»å |
| | | sum(Repair_Quotation_Id__r.sales_discount__c) sales_discount, |
| | | sum(Repair_Quotation_Id__r.Contract_target__c) contract_target, |
| | |
| | | and Agreed_Date__c != null |
| | | and Agreed_Date__c <= :LastYearDate |
| | | and Agreed_Date__c > :LastSecondYearDate |
| | | // DB202302544421 LHJ add |
| | | and Status2__c !='00.å é¤' |
| | | and Status2__c !='00.åæ¶' |
| | | group by Delivered_Product__c |
| | | ]; |
| | | // è¿å»3å¹´é´ä¿®çå®ç»© |
| | | List<AggregateResult> ThiRepairList = [ |
| | | select |
| | | sum(Repair_List_Price_formula__c) SumPrice, |
| | | sum(Discount_Price_formula__c) SumPrice, |
| | | //2019/1æ·»å |
| | | sum(Repair_Quotation_Id__r.sales_discount__c) sales_discount, |
| | | sum(Repair_Quotation_Id__r.Contract_target__c) contract_target, |
| | |
| | | and Agreed_Date__c != null |
| | | and Agreed_Date__c <= :LastSecondYearDate |
| | | and Agreed_Date__c > :LastThirdYearDate |
| | | // DB202302544421 LHJ add |
| | | and Status2__c !='00.å é¤' |
| | | and Status2__c !='00.åæ¶' |
| | | group by Delivered_Product__c |
| | | ]; |
| | | // è¿å»3å¹´ä¿®çå®ç»© |
| | | List<AggregateResult> ThreeyearList = [ |
| | | select |
| | | sum(Repair_List_Price_formula__c) SumPrice, |
| | | sum(Discount_Price_formula__c) SumPrice, |
| | | //2019/1æ·»å |
| | | sum(Repair_Quotation_Id__r.sales_discount__c) sales_discount, |
| | | sum(Repair_Quotation_Id__r.Contract_target__c) contract_target, |
| | |
| | | and Agreed_Date__c != null |
| | | and Agreed_Date__c <= :today |
| | | and Agreed_Date__c > :LastThirdYearDate |
| | | // DB202302544421 LHJ add |
| | | and Status2__c !='00.å é¤' |
| | | and Status2__c !='00.åæ¶' |
| | | group by Delivered_Product__c |
| | | ]; |
| | | |
| | |
| | | // 20191210 Gzw æå¡ååè¿å»3å¹´ä¿®çå®ç»©åå¹¶ |
| | | List<AggregateResult> FriRepairList = [ |
| | | select |
| | | sum(Repair_List_Price_formula__c) SumPrice, |
| | | sum(Discount_Price_formula__c) SumPrice, |
| | | //2019/1æ·»å |
| | | sum(Repair_Quotation_Id__r.sales_discount__c) sales_discount, |
| | | sum(Repair_Quotation_Id__r.Contract_target__c) contract_target, |
| | |
| | | and Agreed_Date__c != null |
| | | and Agreed_Date__c > :LastYearDate |
| | | and Agreed_Date__c <= :today |
| | | // DB202302544421 LHJ add |
| | | and Status2__c !='00.å é¤' |
| | | and Status2__c !='00.åæ¶' |
| | | group by Delivered_Product__c |
| | | ]; |
| | | List<AggregateResult> SecRepairList = [ |
| | | select |
| | | sum(Repair_List_Price_formula__c) SumPrice, |
| | | sum(Discount_Price_formula__c) SumPrice, |
| | | //2019/1æ·»å |
| | | sum(Repair_Quotation_Id__r.sales_discount__c) sales_discount, |
| | | sum(Repair_Quotation_Id__r.Contract_target__c) contract_target, |
| | |
| | | and Agreed_Date__c != null |
| | | and Agreed_Date__c <= :LastYearDate |
| | | and Agreed_Date__c > :LastSecondYearDate |
| | | // DB202302544421 LHJ add |
| | | and Status2__c !='00.å é¤' |
| | | and Status2__c !='00.åæ¶' |
| | | group by Delivered_Product__c |
| | | ]; |
| | | // è¿å»3å¹´é´ä¿®çå®ç»© |
| | | List<AggregateResult> ThiRepairList = [ |
| | | select |
| | | sum(Repair_List_Price_formula__c) SumPrice, |
| | | sum(Discount_Price_formula__c) SumPrice, |
| | | //2019/1æ·»å |
| | | sum(Repair_Quotation_Id__r.sales_discount__c) sales_discount, |
| | | sum(Repair_Quotation_Id__r.Contract_target__c) contract_target, |
| | |
| | | and Agreed_Date__c != null |
| | | and Agreed_Date__c <= :LastSecondYearDate |
| | | and Agreed_Date__c > :LastThirdYearDate |
| | | // DB202302544421 LHJ add |
| | | and Status2__c !='00.å é¤' |
| | | and Status2__c !='00.åæ¶' |
| | | group by Delivered_Product__c |
| | | ]; |
| | | // è¿å»3å¹´ä¿®çå®ç»© |
| | | List<AggregateResult> ThreeyearList = [ |
| | | select |
| | | sum(Repair_List_Price_formula__c) SumPrice, |
| | | sum(Discount_Price_formula__c) SumPrice, |
| | | //2019/1æ·»å |
| | | sum(Repair_Quotation_Id__r.sales_discount__c) sales_discount, |
| | | sum(Repair_Quotation_Id__r.Contract_target__c) contract_target, |
| | |
| | | and Agreed_Date__c != null |
| | | and Agreed_Date__c <= :today |
| | | and Agreed_Date__c > :LastThirdYearDate |
| | | // DB202302544421 LHJ add |
| | | and Status2__c !='00.å é¤' |
| | | and Status2__c !='00.åæ¶' |
| | | group by Delivered_Product__c |
| | | ]; |
| | | // è¿å»1å¹´é´ |
| | |
| | | where Maintenance_Contract__c = :this.estimate.Maintenance_Contract__c]) { |
| | | delete oldList; |
| | | } |
| | | |
| | | //å¸åºå¤å¹´ä¿ä»·æ ¼å¼å DC 2023/02/08 start |
| | | // Map<String,Decimal> contractAssetFZ = new Map<String,Decimal>(); |
| | | // List<Maintenance_Contract_Asset__c> oldListMA = new List<Maintenance_Contract_Asset__c>(); |
| | | // for (Maintenance_Contract_Asset__c oldmc : [select Id |
| | | // // ,Summary_FM_Year__c |
| | | // // ,Asset_Consumption_Rate__c |
| | | // ,Summary_FZ__c |
| | | // ,Asset__c |
| | | // // ,Over_FM_Year__c |
| | | // // ,Summary_FM_Months__c |
| | | // from Maintenance_Contract_Asset__c |
| | | // where Maintenance_Contract__c = :this.estimate.Maintenance_Contract__c]) { |
| | | // oldListMA.add(oldmc); |
| | | // contractAssetFZ.put(oldmc.Asset__c, oldmc.Summary_FZ__c); |
| | | // } |
| | | // delete oldListMA; |
| | | |
| | | //å¸åºå¤å¹´ä¿ä»·æ ¼å¼å DC 2023/02/08 end |
| | | |
| | | // â¡ start |
| | | { |
| | | List<Maintenance_Contract_Asset__c> newValue = new List<Maintenance_Contract_Asset__c>(); |
| | |
| | | from Maintenance_Contract_Asset_Estimate__c |
| | | where Maintenance_Contract_Estimate__c = :this.estimate.Id and Asset__c <> null]) { |
| | | |
| | | |
| | | Maintenance_Contract_Asset__c newVal = new Maintenance_Contract_Asset__c( |
| | | Maintenance_Contract__c = this.estimate.Maintenance_Contract__c, |
| | | Asset__c = target.Asset__c, |
| | |
| | | Surcharge_Defective_Contract__c = target.Surcharge_Defective_Contract__c, |
| | | //æ
éåå è´¹ ç¬¬ä¸æ¹åå½ãæ
éåå è´¹ æ è¯end |
| | | |
| | | //å¸åºå¤å¹´ä¿ä»·æ ¼å¼å start DC 2023/02/09 |
| | | // Summary_FZ__c = contractAssetFZ.get(target.Asset__c), |
| | | //å¸åºå¤å¹´ä¿ä»·æ ¼å¼å end DC 2023/02/09 |
| | | |
| | | |
| | | LastMContract__c = target.Last_MContract__r.RecordType_DeveloperName__c == 'VM_Contract' ? null : target.Last_MContract__c |
| | | ); |
| | | // System.debug(LoggingLevel.INFO, '*** contractAssetFZ.get(target.Asset__c): ' + contractAssetFZ.get(target.Asset__c)); |
| | | newValue.add(newVal); |
| | | } |
| | | if (newValue.size() > 0) insert newValue; |
| | |
| | | //2.ä¸å¹´ä»¥ä¸çååï¼å¨ç»æå6个æå¼å§å¯ä»¥å¼æ¾ç»ç¾æ¥ä»·ã |
| | | //3.管çåè·³è¿ï¼ |
| | | //WLIG-CDFBV3 å¼éç»ç¾æ¥ä»·ä¸ºtrueçå¯ä»¥å¼æ¾ç»ç¾æ¥ä»· thh 20220413 |
| | | if (input.rec.CurrentContract_F__r.Open_RenewalQuotation__c == false && UserInfo.getProfileId() != System.Label.ProfileId_SystemAdmin && |
| | | String.isNotBlank(input.rec.CurrentContract_F__c) && input.rec.CurrentContract_F__r.RecordType_DeveloperName__c != 'VM_Contract') { |
| | | // if (input.rec.CurrentContract_F__r.Open_RenewalQuotation__c == false && UserInfo.getProfileId() != System.Label.ProfileId_SystemAdmin && |
| | | // String.isNotBlank(input.rec.CurrentContract_F__c) && input.rec.CurrentContract_F__r.RecordType_DeveloperName__c != 'VM_Contract') { |
| | | |
| | | Integer noOfDays = today.daysBetween(input.rec.CurrentContract_F__r.Contract_End_Date__c); |
| | | Decimal monthCon = (Decimal)noOfDays / 365 * 12; |
| | | // å¯å¼å§æ¥ä»·çææ°éå¶ |
| | | if (input.rec.CurrentContract_F__r.Contract_Range__c >= 12 && monthCon > 6) { |
| | | input.rec.Name.addError(input.rec.Name + '(' + input.rec.SerialNumber + ') -- ååç»æå6个æå¼å§å¯ä»¥å¶ä½æ¥ä»·ã'); |
| | | rtn = false; |
| | | } |
| | | //ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO, '---' + monthCon + ' +++ ' + Math.floor(input.rec.CurrentContract_F__r.Contract_Range__c/2))); |
| | | // Integer noOfDays = today.daysBetween(input.rec.CurrentContract_F__r.Contract_End_Date__c); |
| | | // Decimal monthCon = (Decimal)noOfDays / 365 * 12; |
| | | // // å¯å¼å§æ¥ä»·çææ°éå¶ |
| | | // if (input.rec.CurrentContract_F__r.Contract_Range__c >= 12 && monthCon > 6) { |
| | | // input.rec.Name.addError(input.rec.Name + '(' + input.rec.SerialNumber + ') -- ååç»æå6个æå¼å§å¯ä»¥å¶ä½æ¥ä»·ã'); |
| | | //rtn = false; |
| | | if (input.rec.CurrentContract_F__r.Contract_Range__c < 12 && monthCon > Math.floor(input.rec.CurrentContract_F__r.Contract_Range__c / 2)) { |
| | | input.rec.Name.addError(input.rec.Name + '(' + input.rec.SerialNumber + ') -- ç»åææ°è¿åæ¹å¯å¶ä½æ¥ä»·'); |
| | | rtn = false; |
| | | } |
| | | } |
| | | // } |
| | | // //ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO, '---' + monthCon + ' +++ ' + Math.floor(input.rec.CurrentContract_F__r.Contract_Range__c/2))); |
| | | // //rtn = false; |
| | | // if (input.rec.CurrentContract_F__r.Contract_Range__c < 12 && monthCon > Math.floor(input.rec.CurrentContract_F__r.Contract_Range__c / 2)) { |
| | | // input.rec.Name.addError(input.rec.Name + '(' + input.rec.SerialNumber + ') -- ç»åææ°è¿åæ¹å¯å¶ä½æ¥ä»·'); |
| | | // rtn = false; |
| | | // } |
| | | // } |
| | | // å¤å¹´ä¿å¤æ |
| | | if ( String.isNotBlank(input.rec.CurrentContract_F__c) && input.rec.CurrentContract_F__r.RecordType_DeveloperName__c == 'VM_Contract') { |
| | | //if (UserInfo.getProfileId() != System.Label.ProfileId_SystemAdmin && String.isNotBlank(input.rec.CurrentContract_F__c) && input.rec.CurrentContract_F__r.RecordType_DeveloperName__c == 'VM_Contract') { |
| | |
| | | // modify by lc 20220607 å¤å¹´ä¿ç»ç¾åå®ç»©è¿å¨ç¶æå¯¹åº start |
| | | Integer noOfDays = today.daysBetween(input.rec.CurrentContract_F_asset__r.endDateGurantee_Text__c); |
| | | Decimal monthCon = (Decimal)noOfDays/365*12; |
| | | |
| | | |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/02/02 Start ç»ææ¥ç©ºç½æå¤§äº6ä¸ªæ æ¥éæç¤º |
| | | |
| | | Date endDate6Month = input.rec.CurrentContract_F_asset__r.endDateGurantee_Text__c.addMonths(6); |
| | | Date cotractEndDay = input.rec.CurrentContract_F__r.endDateGurantee__c; |
| | | |
| | | |
| | | if(today>endDate6Month && cotractEndDay <today){ |
| | | input.rec.Name.addError(input.rec.Name + '(' + input.rec.SerialNumber + ') -- å»ºè®®ç©ºç½ææ§å¶å¨1个æä»¥å
ï¼å¦ä¸å¾å·±ç©ºç½æå¨6个æä»¥ä¸ï¼è¯·å
èç»æå¡ç®¡çé¨è¯ä¼°ã'); |
| | | |
| | | } |
| | | |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/02/02 end |
| | | |
| | | // å¯å¼å§æ¥ä»·çææ°éå¶ |
| | | //åæ´å¤å¹´ä¿ç»ç¾å¼å§æ¥ thh 20220315 start |
| | | //if (input.rec.CurrentContract_F__r.Gurantee_Estimate_startDate__c > Date.today()) { |
| | | // gzw 20220630 å¼éç»ç¾æ¥ä»·æéåï¼è¶
è¿6个æä¹å¯ä»¥ç»ç¾ |
| | | // ç»ç¾æ
åµ â 䏿åå Open_RenewalQuotation__c & 6个æä»¥å
â¡ VM_Contract_Check__c Open_RenewalQuotation__c 2ä¸ªé½æé© |
| | | // â 2个å¼å
³é½æå¼ â¡VM_Contract_Check__cæå¼ å°äº6个æ |
| | | if (!((this.contract.Open_RenewalQuotation__c && input.rec.CurrentContract_F__r.VM_Contract_Check__c) || (input.rec.CurrentContract_F__r.VM_Contract_Check__c && monthCon < 6))) { |
| | | if(monthCon < 6){ |
| | | input.rec.Name.addError(input.rec.Name + '(' + input.rec.SerialNumber + ') -- å¯ä»¥å å
¥æå¡ååï¼å å
¥ä»·æ ¼è¯·èç³»æå¡ç®¡çé¨ã'); |
| | | }else{ |
| | | input.rec.Name.addError(input.rec.Name + '(' + input.rec.SerialNumber + ') -- 没æç»ç¾æ¥ä»·æéï¼æè
è¿æ²¡å°ç»ç¾æ¶é´ã'); |
| | | } |
| | | // if (!((this.contract.Open_RenewalQuotation__c && input.rec.CurrentContract_F__r.VM_Contract_Check__c) || (input.rec.CurrentContract_F__r.VM_Contract_Check__c && monthCon < 6))) { |
| | | // if(monthCon < 6){ |
| | | // input.rec.Name.addError(input.rec.Name + '(' + input.rec.SerialNumber + ') -- å¯ä»¥å å
¥æå¡ååï¼å å
¥ä»·æ ¼è¯·èç³»æå¡ç®¡çé¨ã'); |
| | | // }else{ |
| | | //input.rec.Name.addError(input.rec.Name + '(' + input.rec.SerialNumber + ') -- 没æç»ç¾æ¥ä»·æéï¼æè
è¿æ²¡å°ç»ç¾æ¶é´ã'); |
| | | rtn = false; |
| | | } |
| | | // } |
| | | // System.debug(LoggingLevel.INFO, '*** this.contract.Open_RenewalQuotation__c: ' + this.contract.Open_RenewalQuotation__c); |
| | | // System.debug(LoggingLevel.INFO, '*** : input.rec.CurrentContract_F__r.VM_Contract_Check__c' + input.rec.CurrentContract_F__r.VM_Contract_Check__c); |
| | | // System.debug(LoggingLevel.INFO, '*** monthCon: ' + monthCon); |
| | | // //input.rec.Name.addError(input.rec.Name + '(' + input.rec.SerialNumber + ') -- 没æç»ç¾æ¥ä»·æéï¼æè
è¿æ²¡å°ç»ç¾æ¶é´ã'); |
| | | // rtn = false; |
| | | // } |
| | | /*if (input.rec.CurrentContract_F__r.Gurantee_Renew_startDate__c > Date.today()) { |
| | | input.rec.Name.addError(input.rec.Name + '(' + input.rec.SerialNumber + ') -- 第ä¸ä¸ªè®¾å¤ç»æåå¯ä»¥å¶ä½æ¥ä»·ã'); |
| | | rtn = false; |
| | |
| | | public class AssetInfo { |
| | | // æ°ååå¤åç¡®ä¿æä¾ å½åæ è®° |
| | | public Boolean etGFlg {get; set;} |
| | | public String ISStandardPricing{get; set;} |
| | | public Integer lineNo {get; private set;} |
| | | public Decimal Repair_Price_Auto {get; set;} |
| | | public String Agreed_Date{get; set;} |
| | |
| | | // add by fxk 2021/9/9 æ§å¶ç¹æ£å¯¹è±¡æ¯å¦å¯é End |
| | | } |
| | | // 鏿ãããç¨ï¼éManualï¼ |
| | | public AssetInfo(Integer lineNo, Asset record, Boolean isNew, Decimal listPrice, Maintenance_Contract_Asset_Estimate__c mcae,Maintenance_Contract_Estimate__c estimate, Map<String,repair__c> assNewRepMap) { |
| | | public AssetInfo(Integer lineNo, Asset record, Boolean isNew, Decimal listPrice, Maintenance_Contract_Asset_Estimate__c mcae,Maintenance_Contract_Estimate__c estimate) { |
| | | this.lineNo = lineNo; |
| | | this.rec = record; |
| | | this.ISStandardPricing = mcae.IS_StandardPricing__c; |
| | | this.estimate = new Maintenance_Contract_Estimate__c(); |
| | | this.estimate.IS_Reduced_price_approval__c = estimate.IS_Reduced_price_approval__c; |
| | | // (2022å¹´12æä¸çº¿)æ
éåå è´¹ start |
| | |
| | | //(2022å¹´12æä¸çº¿)æ
éåå è´¹ ç¬¬ä¸æ¹åå½ |
| | | Third_Party_Return__c = mcae.Third_Party_Return__c |
| | | ); |
| | | if ((this.mcae.Repair_Price__c==null&&this.Repair_Price_Auto!=null)||(this.estimate.IS_Reduced_price_approval__c == 'å¦')) { |
| | | if ((this.mcae.Repair_Price__c==null&&this.Repair_Price_Auto!=null&&this.rec.Reson_Can_not_Warranty__c!=null&&this.rec.Reson_Can_not_Warranty__c.indexof('å¼ä¿®')!=-1)||(this.estimate.IS_Reduced_price_approval__c == 'å¦')) { |
| | | this.mcae.Repair_Price__c = this.Repair_Price_Auto; |
| | | } |
| | | if (this.estimate.IS_Reduced_price_approval__c=='æ¯'||this.estimate.IS_Reduced_price_approval__c==null) { |
| | |
| | | public AssetInfo(Integer lineNo, Maintenance_Contract_Asset_Estimate__c mcae) { |
| | | this.lineNo = lineNo; |
| | | this.rec = null; |
| | | this.ISStandardPricing = mcae.IS_StandardPricing__c; |
| | | this.mcae = new Maintenance_Contract_Asset_Estimate__c( |
| | | // id = mcae.Id, // æ¬å½ã«ãããªãã®ï¼ ã»ããããããæ°è¦æ¨©éããªãã§ããæ´æ°ã§ãã¾ããå¾è¤ããã«ç¢ºèªããããªãã§ãããã§ãã |
| | | isNew__c = mcae.IsNew__c, |
| | |
| | | this.lineNo = lineNo; |
| | | this.rec = record; |
| | | // (2022å¹´12æä¸çº¿)æ
éåå è´¹ start |
| | | // if (record.Return_Without_Repair__r.Agreed_Date__c!=null) { |
| | | // this.Agreed_Date = 'ä¸ä¸ºç©º'; |
| | | // }else{ |
| | | // this.Agreed_Date = '为空'; |
| | | // } |
| | | if (record.Return_Without_Repair__r.Repair_List_Price_formula__c!=null) { |
| | | this.Repair_Price_Auto = record.Return_Without_Repair__r.Repair_List_Price_formula__c; |
| | | } |
| | |
| | | this.proSerialName = record.Name; |
| | | this.proSerialNumber = record.SerialNumber; |
| | | } |
| | | public AssetInfo(Integer lineNo, Asset record, Map<String,repair__c> assNewRepMap) { |
| | | this.lineNo = lineNo; |
| | | this.rec = record; |
| | | // (2022å¹´12æä¸çº¿)æ
éåå è´¹ start |
| | | // if (record.Asset_situation__c == 'ä¿®çä¸' && record.Return_Without_Repair__r.Agreed_Date__c!=null) { |
| | | // this.Agreed_Date = 'ä¸ä¸ºç©º'; |
| | | // } |
| | | // if (record.Asset_situation__c == 'ä¿®çä¸' && record.Return_Without_Repair__r.Agreed_Date__c==null) { |
| | | // this.Agreed_Date = '为空'; |
| | | // if (assNewRepMap.get(record.id)!=null) { |
| | | // this.Repair_Price_Auto = assNewRepMap.get(record.id).Repair_List_Price_formula__c; |
| | | // } |
| | | // } |
| | | // if (record.Return_Without_Repair__r.Repair_List_Price_formula__c!=null&&record.Asset_situation__c != 'ä¿®çä¸') { |
| | | // public AssetInfo(Integer lineNo, Asset record) { |
| | | // this.lineNo = lineNo; |
| | | // this.rec = record; |
| | | // // (2022å¹´12æä¸çº¿)æ
éåå è´¹ start |
| | | // // if (record.Asset_situation__c == 'ä¿®çä¸' && record.Return_Without_Repair__r.Agreed_Date__c!=null) { |
| | | // // this.Agreed_Date = 'ä¸ä¸ºç©º'; |
| | | // // } |
| | | // // if (record.Asset_situation__c == 'ä¿®çä¸' && record.Return_Without_Repair__r.Agreed_Date__c==null) { |
| | | // // this.Agreed_Date = '为空'; |
| | | // // if (assNewRepMap.get(record.id)!=null) { |
| | | // // this.Repair_Price_Auto = assNewRepMap.get(record.id).Repair_List_Price_formula__c; |
| | | // // } |
| | | // // } |
| | | // // if (record.Return_Without_Repair__r.Repair_List_Price_formula__c!=null&&record.Asset_situation__c != 'ä¿®çä¸') { |
| | | // // this.Repair_Price_Auto = record.Return_Without_Repair__r.Repair_List_Price_formula__c; |
| | | // // } |
| | | // if (record.Return_Without_Repair__r.Repair_List_Price_formula__c!=null) { |
| | | // this.Repair_Price_Auto = record.Return_Without_Repair__r.Repair_List_Price_formula__c; |
| | | // } |
| | | if (record.Return_Without_Repair__r.Repair_List_Price_formula__c!=null) { |
| | | this.Repair_Price_Auto = record.Return_Without_Repair__r.Repair_List_Price_formula__c; |
| | | } |
| | | // (2022å¹´12æä¸çº¿)æ
éåå è´¹ end |
| | | this.isManual = false; |
| | | this.rec_checkBox_c = false; |
| | | this.orgPrice = record.Maintenance_Price_Month__c; |
| | | this.orgPrice12 = this.orgPrice * 12; |
| | | this.etGFlg = record.EquipmentGuaranteeFlg__c; |
| | | this.proSerialName = record.Name; |
| | | this.proSerialNumber = record.SerialNumber; |
| | | } |
| | | // // (2022å¹´12æä¸çº¿)æ
éåå è´¹ end |
| | | // this.isManual = false; |
| | | // this.rec_checkBox_c = false; |
| | | // this.orgPrice = record.Maintenance_Price_Month__c; |
| | | // this.orgPrice12 = this.orgPrice * 12; |
| | | // this.etGFlg = record.EquipmentGuaranteeFlg__c; |
| | | // this.proSerialName = record.Name; |
| | | // this.proSerialNumber = record.SerialNumber; |
| | | // } |
| | | } |
| | | |
| | | WebService static String pageDecide(String strId) { |
| | |
| | | Apexpages.currentPage().getParameters().put('id', contactEsti1.Id); |
| | | controller = new SelectAssetEstimateVMController(); |
| | | controller.init(); |
| | | controller.test(); |
| | | //JZHG-BSDUT4 ---20200825---update By rentongxiao---Start |
| | | // System.assertEquals(5, controller.productCount2); |
| | | //å 为é»è®¤æ¥è¯¢çä¿æè®¾å¤ç±»åä¸ºä¸»æº |
| | |
| | | global without sharing class SetOlympusCalendarWorkDayBatch implements Database.Batchable<sObject>, Database.Stateful { |
| | | |
| | | private final Integer DAYCOUNT = 30; |
| | | // 20230224 ljh è¿å£åè¯ä¼åæ¥å start |
| | | // private final Integer DAYCOUNT = 30; |
| | | private final Integer DAYCOUNT_AFTER = 60; |
| | | private final Integer DAYCOUNT_BEFORE = 30; |
| | | // 20230224 ljh è¿å£åè¯ä¼åæ¥å start |
| | | public List<String> emailMessages = new List<String>(); |
| | | private Integer totalCount = 0; // æ»ä»¶æ° |
| | | private Integer failedCount = 0; |
| | |
| | | , After_28_WorkDay__c |
| | | , After_29_WorkDay__c |
| | | , After_30_WorkDay__c |
| | | // 20230224 ljh add start |
| | | , After_31_WorkDay__c |
| | | , After_32_WorkDay__c |
| | | , After_33_WorkDay__c |
| | | , After_34_WorkDay__c |
| | | , After_35_WorkDay__c |
| | | , After_36_WorkDay__c |
| | | , After_37_WorkDay__c |
| | | , After_38_WorkDay__c |
| | | , After_39_WorkDay__c |
| | | , After_40_WorkDay__c |
| | | , After_41_WorkDay__c |
| | | , After_42_WorkDay__c |
| | | , After_43_WorkDay__c |
| | | , After_44_WorkDay__c |
| | | , After_45_WorkDay__c |
| | | , After_46_WorkDay__c |
| | | , After_47_WorkDay__c |
| | | , After_48_WorkDay__c |
| | | , After_49_WorkDay__c |
| | | , After_50_WorkDay__c |
| | | , After_51_WorkDay__c |
| | | , After_52_WorkDay__c |
| | | , After_53_WorkDay__c |
| | | , After_54_WorkDay__c |
| | | , After_55_WorkDay__c |
| | | , After_56_WorkDay__c |
| | | , After_57_WorkDay__c |
| | | , After_58_WorkDay__c |
| | | , After_59_WorkDay__c |
| | | , After_60_WorkDay__c |
| | | // 20230224 ljh add end |
| | | , Before_1_WorkDay__c |
| | | , Before_2_WorkDay__c |
| | | , Before_3_WorkDay__c |
| | |
| | | , Before_29_WorkDay__c |
| | | , Before_30_WorkDay__c |
| | | FROM OlympusCalendar__c |
| | | |
| | | WHERE Before_30_WorkDay__c = null |
| | | OR After_30_WorkDay__c = null |
| | | // 20230224 ljh update start |
| | | // OR After_30_WorkDay__c = null |
| | | OR After_60_WorkDay__c = null |
| | | // 20230224 ljh update end |
| | | ]); |
| | | } |
| | | |
| | |
| | | // å ä¸ºåæ®µæ¯ä»1å¼å§æå¾æä»¥ç´æ¥ç¨g |
| | | oc.put('After_' + g + '_WorkDay__c', olcList[j + g - 1].Date__c); |
| | | // å 为ä»1å¼å§æä»¥ä¸éè¦å1 |
| | | if (g == DAYCOUNT) { |
| | | // 20230224 ljh update start |
| | | // if (g == DAYCOUNT) { |
| | | if (g == DAYCOUNT_AFTER) { |
| | | // 20230224 ljh update end |
| | | break; |
| | | } |
| | | } |
| | |
| | | // å 为ä¸é¢ä¸å¤§äºç夿ãæä»¥åä¸å¤©å¯è½åæ¥åæ¥ææ¯åä¸å¤©ãæä»¥éè¦å ifæ |
| | | if (olcList[j - g].Date__c < oc.Date__c) { |
| | | oc.put('Before_' + k + '_WorkDay__c', olcList[j - g].Date__c); |
| | | if (k == DAYCOUNT) { |
| | | // 20230224 ljh update start |
| | | // if (k == DAYCOUNT) { |
| | | if (k == DAYCOUNT_BEFORE) { |
| | | // 20230224 ljh update end |
| | | break; |
| | | } |
| | | k ++; |
| | |
| | | } |
| | | }else if('è¿éåäºå¤'.equals(pc.Returns_Product_way__c)){ |
| | | optionAddressClassification.Address_Classification__c = 'åäºå¤'; |
| | | // |
| | | }else if ('å¤åä¸å¿'.equals(pc.Returns_Product_way__c)) { |
| | | optionAddressClassification.Address_Classification__c = 'å¤å'; |
| | | // |
| | | |
| | | |
| | | }else{ |
| | | //è·åå½åä¿®ççè¿éç»éå |
| | | if(!String.isBlank(pc.Dealer__c) && 'è¿éç»éå'.equals(pc.Returns_Product_way__c)){ |
| | |
| | | tableData.add(new AddressData(accoutList[0],'none','inline','none','å»é¢')); |
| | | } |
| | | } |
| | | //åäºå¤ |
| | | /*if('åäºå¤'.equals(typeText)){ |
| | | String AccountOfficeSql = makeTextAccOfficeSql(); |
| | | //è·åå°åä¿¡æ¯ |
| | | List<Account> accDataList = Database.query(AccountOfficeSql); |
| | | if(accDataList != null && accDataList.size() > 0){ |
| | | for(Integer i = 0;i<accDataList.size();i++){ |
| | | indexCou++; |
| | | tableData.add(new AddressData(accDataList[i],'none','åäºå¤')); |
| | | } |
| | | } |
| | | }*/ |
| | | // //å¤åï¼ |
| | | // if(('å¤å'.equals(typeText))){ |
| | | // //HP_ID__c å»é¢id |
| | | |
| | | // typeSearchId = pc.HP_ID__c; |
| | | // String AccountSql = makeTextAccountSql(pc.HP_ID__c); |
| | | // //è·åå°åä¿¡æ¯ |
| | | // List<Account> accoutList = Database.query(AccountSql); |
| | | // if(accoutList != null && accoutList.size() > 0){ |
| | | // indexCou++; |
| | | // tableData.add(new AddressData(accoutList[0],'none','inline','none','å¤å')); |
| | | // } |
| | | // } |
| | | //ç»éåï¼ |
| | | //1ï¼å¦ææ¥å°å¤æ¡ç»éåï¼å¹¶ä¸å¨å°å䏿¥å°ææ°æ®ï¼åªæ¾ç¤ºå°åæ°æ®ï¼å¦æå°åæ°æ®æ²¡æ¥ä¸å°ï¼å°±ä¸æ¾ç¤ºï¼ |
| | | //2ï¼å¦ææ¥å°æä¸æ¡ç»éåï¼é£ä¹ç¬¬ä¸è¡å°±æ¯æ¤ç»éåæ°æ®ï¼ä»ç¬¬äºè¡å¼å§ä¸ºå°åæ°æ® |
| | |
| | | //åäºå¤çå°åä¸å¯ä¿®æ¹ |
| | | |
| | | if(dataList[i].Address_Classification__c == 'åäºå¤'){ |
| | | tableData.add(new AddressData(dataList[i],'none','none','inline')); |
| | | }else if (dataList[i].Address_Classification__c == 'å¤å'){ |
| | | tableData.add(new AddressData(dataList[i],'none','none','inline')); |
| | | }else{ |
| | | //åªè½æ¹èªå·±å建çå°åæ°æ®ï¼ç³»ç»ç®¡çåãGPI_ç³»ç»ç®¡çåNew 没éå¶ |
| | |
| | | |
| | | //æ¥è¯¢ä¿®çè¡¨æ°æ® |
| | | private String makeTextRepairSql(String uuid){ |
| | | String RepairSql = 'SELECT ID,NAME,HP_ID__c,HP_Name__c,Delivered_Product__c,FSE_ApplyForRepair_time__c,SAP_Transfer_time__c,Dealer__c,Dealer__r.Name,Returns_Product_way__c,Address_Type_Index__c,AWS_Data_Id__c FROM Repair__c where id = \''+RepairId+'\''; |
| | | String RepairSql = 'SELECT ID,NAME,HP_ID__c,HP_Name__c,Delivered_Product__c,FSE_ApplyForRepair_time__c,SAP_Transfer_time__c,Dealer__c,Dealer__r.Name,Returns_Product_way__c,Address_Type_Index__c,AWS_Data_Id__c,Incharge_Staff__r.UserRole.name,Incharge_Staff__r.Branch__c,Incharge_Staff__r.Profile.name FROM Repair__c where id = \''+RepairId+'\''; |
| | | return RepairSql; |
| | | } |
| | | //æ¥è¯¢å°åè¡¨æ°æ® |
| | | private String makeTextAddressSql(String typeSearchId) { |
| | | // DB202212270703 å¤åä¿®çç´è¿å°å项ç®å¯¼å
¥ start |
| | | String beipCenter = ''; |
| | | if (pc.Returns_Product_way__c == 'å¤åä¸å¿') { |
| | | if (pc.Incharge_Staff__r.Profile.name.startsWith('2B2')) { |
| | | if (pc.Incharge_Staff__r.Branch__c == 'å京') { |
| | | beipCenter = 'å京å¤åä¸å¿'; |
| | | }else if (pc.Incharge_Staff__r.Branch__c == '䏿µ·') { |
| | | beipCenter = 'åä¸å¤åä¸å¿'; |
| | | }else if (pc.Incharge_Staff__r.Branch__c == '广å·') { |
| | | beipCenter = '广å·å¤åä¸å¿'; |
| | | } |
| | | }else if (pc.Incharge_Staff__r.UserRole.name == 'CTECæè²æ¬é¨') { |
| | | if (pc.Incharge_Staff__r.Branch__c == 'å京') { |
| | | beipCenter = 'å京C-TEC'; |
| | | }else if (pc.Incharge_Staff__r.Branch__c == '䏿µ·') { |
| | | beipCenter = '䏿µ·C-TEC'; |
| | | }else if (pc.Incharge_Staff__r.Branch__c == '广å·') { |
| | | beipCenter = '广å·C-TEC'; |
| | | } |
| | | |
| | | } |
| | | } |
| | | // DB202212270703 å¤åä¿®çç´è¿å°å项ç®å¯¼å
¥ end |
| | | // WLIG-CCX4BB ãå§æãä¿®çç´è¿æ¶è´§å°ååè½æ¹é thh 20220513 start |
| | | // String AddressSql = 'SELECT AWS_Data_Id__c,ID,Address_Classification__c,Customer__c,Customer__r.Name,Customer__r.Type,Customer__r.RecordTypeId,Contacts__c,Contacts__r.Name,Contacts__r.AWS_Data_Id__c,ContactName__c,Telephone__c,ContactName_Encrypted__c' //zhj æ°æ¹æ¡æ¹é å»é¤Encrypted__c 2022-12-05 |
| | | // +',Province__c,Province__r.Name,City__c,City__r.name,Detailed_Address__c,Create_Contacts__c,ZipCode__c,CreatedByid,Detailed_Address_Encrypted__c,Telephone_Encrypted__c,ZipCode_Encrypted__c,Contacts__r.LastName_Encrypted__c' |
| | |
| | | if('åäºå¤'.equals(typeText)){ |
| | | AddressSql += ' and Address_Classification__c LIKE \'%' + typeText.trim() + '%\'' ; |
| | | } |
| | | if('å¤å'.equals(typeText)){ |
| | | AddressSql += ' and Address_Classification__c LIKE \'%' + typeText.trim() + '%\'' ; |
| | | // if (String.isNotBlank(beipCenter)) { |
| | | // AddressSql += ' and Beipin_Center__c = \'' + String.escapeSingleQuotes(beipCenter) +'\'' ; |
| | | // } |
| | | } |
| | | if('ç»éå'.equals(typeText)){ |
| | | if(String.isBlank(typeSearchId)){ |
| | | AddressSql += ' and Address_Classification__c LIKE \'%' + typeText.trim() + '%\'' ; |
| | |
| | | opp.Name = 'GZ-SP-NFM007_1'; |
| | | opp.Trade__c = 'å
貿'; |
| | | opp.StageName = 'å¼å'; |
| | | opp.CloseDate = date.newinstance(2022, 11, 30); |
| | | opp.CloseDate = date.newinstance(2025, 11, 30); |
| | | opp.Stock_apply_status__c = 'ç³è¯·ä¸'; |
| | | opp.Whether_Bidding__c = 'å¦'; |
| | | insert opp; |
| | |
| | | } |
| | | if (String.isNotBlank(TenInfo.Retain_Tender__c)&&String.isNotBlank(TenInfo.ProjectId__c)&&String.isNotBlank(TenInfo.InfoId__c)) { |
| | | // è°ç¨æ¥å£ |
| | | // NFM504Controller.sendRequest(TenInfo.Id); |
| | | NFM504Controller.sendRequest(TenInfo.Id); |
| | | } |
| | | // System.debug('1111111122222' + SaveErrorflag); |
| | | |
| | |
| | | * startã«ã¯ãqueryãå®è¡ãã¦ã¼ã¶ã¼ãæ¤ç´¢ |
| | | */ |
| | | global Database.QueryLocator start(Database.BatchableContext BC) { |
| | | String query = 'Select Id, Fiscal_Start_Date__c, Fiscal_Start_Date_from_May__c, Use_Start_Date__c from User'; |
| | | String query = 'Select Id, Fiscal_Start_Date__c, Fiscal_Start_Date_from_May__c, Use_Start_Date__c, Maternity_leave_StartDate__c, Maternity_leave_EndDate__c from User'; //20230303 lt DB202302421915 add , Maternity_leave_StartDate__c, Maternity_leave_EndDate__c |
| | | if (String.isBlank(testUserId) == false) { |
| | | query += ' where Id =\'' + testUserId + '\''; |
| | | } |
| | |
| | | fromDate4 = usr.Use_Start_Date__c; |
| | | } |
| | | |
| | | //20230303 lt DB202302421915 start |
| | | // usr.Fiscal_Workdays__c = decimal.valueOf(getOlympusWorkDayCount(fromDate4, toDate)); |
| | | |
| | | Date mlStartDate = usr.Maternity_leave_StartDate__c; |
| | | Date mlEndDate = usr.Maternity_leave_EndDate__c; |
| | | |
| | | System.debug('---lt123---usr.Fiscal_Start_Date__c---'+usr.Fiscal_Start_Date__c); |
| | | System.debug('---lt123---usr.Use_Start_Date__c---'+usr.Use_Start_Date__c); |
| | | System.debug('---lt123---fromDate4---'+fromDate4); |
| | | System.debug('---lt123---toDate---'+toDate); |
| | | System.debug('---lt123---mlStartDate---'+mlStartDate); |
| | | System.debug('---lt123---mlEndDate---'+mlEndDate); |
| | | |
| | | if(mlStartDate == null && mlEndDate == null){ |
| | | usr.Fiscal_Workdays__c = decimal.valueOf(getOlympusWorkDayCount(fromDate4, toDate)); |
| | | } |
| | | else if(mlStartDate != null && mlEndDate == null && mlStartDate > fromDate4){ |
| | | usr.Fiscal_Workdays__c = decimal.valueOf(getOlympusWorkDayCount(fromDate4, mlStartDate)); |
| | | } |
| | | else if(mlStartDate != null && mlEndDate == null && mlStartDate <= fromDate4){ |
| | | usr.Fiscal_Workdays__c = 0; |
| | | } |
| | | else if(mlStartDate != null && mlEndDate != null && mlStartDate > fromDate4){ |
| | | usr.Fiscal_Workdays__c = decimal.valueOf(getOlympusWorkDayCount(fromDate4, mlStartDate)) + decimal.valueOf(getOlympusWorkDayCount(mlEndDate, toDate)); |
| | | } |
| | | else if(mlStartDate != null && mlEndDate != null && mlStartDate <= fromDate4){ |
| | | usr.Fiscal_Workdays__c = 0 + decimal.valueOf(getOlympusWorkDayCount(mlEndDate, toDate)); |
| | | } |
| | | //20230303 lt DB202302421915 end |
| | | |
| | | /***** CHAN-AZABMC ****** 2018/06/01 ******** |
| | | **** å°æ¬æç工使¥ï¼ä»å¹´åº¦ï¼ |
| | | **** å°æ¬å¨ç工使¥ï¼ä»å¹´åº¦ï¼ |
| | |
| | | } |
| | | // ç»éåå»é¢çocsmå»é¢idçlist |
| | | List<String> ahlOcsmIdList = new List<String>(); |
| | | System.debug('ahlNameList = ' + ahlNameList); |
| | | List<Agency_Hospital_Link__c> ahlList = [select id,name,Hospital__c,MaxActivityDate__c from Agency_Hospital_Link__c where name = :ahlNameList and Agency_Campaign_Obj__c = true]; |
| | | |
| | | System.debug('ahlList.size() = ' + ahlList.size()); |
| | | for(Agency_Hospital_Link__c ahl : ahlList){ |
| | | ahlOcsmIdList.add(ahl.Hospital__c); |
| | | } |
| | | List<Agency_Contact__c> doctor2list = new List<Agency_Contact__c>(); |
| | | System.debug('ahlOcsmIdList = ' + ahlOcsmIdList); |
| | | if(!Test.isRunningTest()) |
| | | doctor2list = [select id,Name,Doctor_Division1__c,Type__c,Agency_Hospital__c,AWS_Data_Id__c FROM Agency_Contact__c WHERE Hospital_ID18__c= :ahlOcsmIdList order by Name]; //zhj æ°æ¹æ¡æ¹é 2022-12-21 廿Name_Encrypted__c |
| | | |
| | |
| | | return errorMag; |
| | | } |
| | | String doctor2listStr = JSON.serialize(doctor2list); |
| | | System.debug('doctor2list = ' + doctor2list); |
| | | return doctor2listStr; |
| | | } |
| | | }catch(Exception e){ |
| | |
| | | if (month < 4) { |
| | | year -= 1; |
| | | } |
| | | |
| | | Date dateFinalStartDate = Date.newInstance(year, 4, 1); |
| | | system.debug('===DepIDList=='+DepIDList+'==dateFinalStartDate==='+dateFinalStartDate); |
| | | string yearP = year - 1868 + 'P'; |
| | | Map<ID,Account> DepartMap = |
| | | New Map<ID,Account> ([select id, ParentId |
| | | from Account |
| | | where id in: DepIDList |
| | | and Parent.CreateDate__c <: dateFinalStartDate |
| | | and Hospital__r.OCM_Category__c like 'H%' |
| | | and Hospital__r.OCM_Category__c like '%H%' |
| | | and Parent.RecordType.DeveloperName in |
| | | ('Department_Class_GI','Department_Class_BF', |
| | | 'Department_Class_GS','Department_Class_URO', |
| | | 'Department_Class_GYN')]); |
| | | |
| | | Map<Id, AggregateResult> ANCLMap = new Map<Id, AggregateResult> (); |
| | | |
| | | system.debug('===DepartMap=='+DepartMap); |
| | | if(DepartMap != null && DepartMap.size() > 0 ){ |
| | | List<ID> DCIDList = new List<ID>(); |
| | | for(Account temDep: DepartMap.values()){ |
| | |
| | | or URO_KPI_input__c ='ç»å½å®æ¯') |
| | | group by Account__c |
| | | ]); |
| | | |
| | | system.debug('===activities=='+activities+'==DepartMap=='+DepartMap+'====='+ANCLMap); |
| | | for (Integer i = 0; i < activities.size(); i++) { |
| | | Activity a = activities[i]; |
| | | if (a.act.whatid__c != null && a.act.whatid__c.startsWith('001')) { |
| | | |
| | | system.debug('è¿æ¥äº'+a.act.whatid__c); |
| | | if(DepartMap.get(a.act.whatid__c)!=null && |
| | | ANCLMap.get(DepartMap.get(a.act.whatid__c).ParentId) ==null){ |
| | | IsAlertInputDep = true; |
| | |
| | | @isTest |
| | | private class eSignAgencyPageControllerTest { |
| | | |
| | | @TestSetup |
| | | static void makeData(){ |
| | | List<String> strList= new List<String>(); |
| | | strList.add('Document'); |
| | | TestDataUtility.CreatePIPolicyConfigurations(strList); |
| | | } |
| | | |
| | | static testMethod void testMethod1() { |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'ç
é¢']; |
| | | if (rectCo.size() == 0) { |
| | |
| | | String fileId = String.valueOf(attach1.Id); |
| | | String body1 = '%2F9j%2F4AAQSkZJRgABAQAAAQABAAD%2F2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj%2F2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj%2FwAARCALuAegDASIAAhEBAxEB%2F8QAHAAAAgIDAQEAAAAAAAAAAAAAAwQCBQABBgcI%2F8QARRAAAgEDAwIFAgMGBAUCBQQDAQIDAAQRBRIhMUEGEyJRYTJxFIGRByNCUqHBFTOx0SRDYuHwcvEWNFNjggglc5ImotL%2FxAAbAQACAwEBAQAAAAAAAAAAAAADBAECBQAGB%2F%2FEADMRAAICAQQCAQQABQMEAwEAAAECAAMRBBIhMRNBIgUyUWEUI0JxgQYzkRWhsdEkUsHw%2F9oADAMBAAIRAxEAPwDwgQg8kc1IRjB4o7DHSgvKFB96yASZ63EE6gGtNgLQXnzmoebRNsuqD3Dq3fijxeUxxICM9xSQkrYkqCpjAWvEsmg2epG3LS7DFBSUjuRRBKCfVzUYIg2rB%2B2SNDbk0XaGwVPFZ5RLVAIlFqdzgCBjiMj9Mir%2By%2FcxbAcA9ar7WMJTikk0vc27iel%2BmaYacbj3Gi%2FtWg5oSDJwaOI%2BKXOBN5SzcyPWoScjFEUgVAjJzXCQ4yJX3ScfalRLtcU9fEAGqgHLinKxlZ53WN47MLOktZAyimQaq7J%2BFqwVvVSbrgz0elu3IMyx09lIZWPGanBA9zcBYslc0vp8RmkIGcZrq7CzMUWYkOcdaSusFf8AeZeqYmwzECwQCKPt9VRSwlvXywOAMCrfS7GMzBZCMtz96NcEWdyQhDLntWebjkhYpu9SrbS4oWAlUEjGasLq0S3tYXjwEbkgVHU7xLpt4GwgAE%2FFINdeYqqrF1XAA%2BKgB2wTK5JwZcWs6S6e0Z459P5UsLxrJ2YHlhtwPbOaRjufMhm2cMvCj5qOmDiW4uSHK8bakVAA5ltpkptRXznk6O%2Bc0lK5mcFY%2BTzk1jKnmPKw9Lsdo9qNKRDHu%2BOBR1AU8CGCcRc%2BYqkSPge1QtrX8Q4YjEa1KOF5m3SHC1bJEItIR1%2BqViF%2BwqWfbwJJAGBK1rYxNgjMZokatCfMX1KfTzVjdQs8EBxjfHu%2FMCkmV4Yxu5QnkVG%2FcJHBGYWO5COApKGslK7t7chjurVxGmPMUZUgUxaWayyLBK21CCyt80I4HMqwwMyN9cJdOpcYUDH59TSt9psPkI6kbn6imri3ELPFI4LDkUi%2B7AAY%2FGalAeCsjuVsmkYQuPfBqK2p27SMYq4M5FsUK985FbiCSLzjAFENje4VOJWKjIqqwyCMUheRukLRA%2Bhj0q%2FeISRMUxlRwKq7iNuN4980Suzmc6gymSHfHtHuSKXltQC27r1NWU6GMgp%2FShFS4LEcmnFcjmKWVxRrXyrfB6kZNZZQAcnjn%2BlWU0W6MHHWpW1rvyahrPjBbB7kraZrWUNH0PWrGO9jnk2TYwOi%2FNJvDtiY%2FwAtJyIQiPnDdTQcB%2BZY5lhfxLKSyZ%2BB%2FvVK6BXYNyadiuGTKk9e9bEYnbj8zVkJSQTnuLw2%2Begp%2B2tCZBxTFnb%2FABxVrDCkSl5MKqjJJ7UCy4ngQbj8QUNphMtwO9VGtatHagw2xDS9Cewoeu6%2F5gaCxOEHDP71zBOSSxyT3o%2Bn0x%2B%2ByOUaPd8rJtsvIXc7mJyTUsjHNDLYqO%2BnsZmmGVBgSbyYWk5W5NEduKUlYk0VFiWpuMhI9D9TdKMkQ6saIAAeOKLuA6md42c5MhFGf4qyi1lUJzGlQKMQNzKFHB5qtdyzVAyFzk1HdzTapieZ3CT61o8VHdWZq2J27MkDUqgKnnNQZZTJg5xUhQgampBFVMKphVcqRg0ylyMeoc0iWxWg1QVBhUvNZ4lnHOueKeikBHFUKueKPHOVI5oLVZmjp9eV7nQQ4LUfNVllchiBT2%2FFJupBxPR6a9XTImSDnionhD71MNnrS88gANcozxLWsFUtK7UpeAKSjGWqN3Jvm%2B1EgHIp8Das8i9vmuJlnbAjaafBpSBfRTAPppN%2BTPS6b4LOq8IwrNHdk43LgjNdLaXy2zOCA2egFcn4RR5GuNrbUwN1dNP5dqilRkn3rG1K5sIil3ycyQeZ5A30IDxioS3B5VMs2etL%2BfLccAHmnra1EMMk0v1AHFBwB3KbQO5SziWWXZuOOM0a2RoUKpjoW%2FKiRr%2B7Zv4j1ocq7yvOD0%2FKjbs8S%2B2AjLQFpI%2FUpO7NDgvfLnLcndwRTEOFk2qCCp71qRI%2FxzIowGOR8cVcEc5lB3iEjxcTFyCsfUCtzjfcxoemN1MwLC0oj34PQYpW45nBTnb6TQweYVYWZmjG3GB9P6jNORkS2NvESd6MSPtSMCtM0Yb1eZ0%2BD0rp44YbGWCFVWWYnLZ7DFCsbbge4OxsGJ3szbIkRMIiCPJHXPWkLiVJpXRB6QSoFX0zQzW5kRQJEba69vvXOSqIJQy5Yf8Aaq0nPBkIMiG05hLaTQSDkcA0J5Hd1EpCBCKNYKEhZ5Mqp%2FqaFexrM%2FmHgHpVxgsfxCbcCL6k7S3pGeFACn3FCnmMsaKF9SdT8VYPapGsYPLsu7J7Clp4GiXehyM5IogYHAkLzFQ7R8ZyPY1sSIehKmgS73jaQZzmtRqW5q5AhSojkcjQ%2FwDUDUPMErMCB15%2BKExdOc5FaBVz7NVQsrgiQktlMhUdKD%2BG5IphCyyNu5BopdC%2FFXDMJVlibLtTaaD5rxZ296dlYYKnv3pWaPMWR1zRFbPBgDXIMzcAnINCfLSFSeooLSsGwakXPnJ89aIFxBkTFTJyexxTlmmHK%2B4oIGXI7ZqxtgqDzHIAA5Jodh9CAb9R%2BDy4YjLKQqqMmuV1zWXvXMcLFLcdB%2FNQ9a1R7uQxREiAHp%2FN8mqdzzjNH0%2BmCfJu4%2Fp6NvybuYWqDPjNRd8CgM9OhMwr3AQpfmsBzQd4qSMCauVgRaDNyHaOaUeUA8UO6uC8hVOgoaxsRzRlTA5mbdqS7YQQnnEnvRUkUDLHmoRwcVI24Irjt6kILQMyRu46ygtae1ZXYSQW1P4lSGqQOaBk1IMadxPNiyGrYqAPFbBquIVWkw2KkDmh5rY4qCIQNCc1tTUQRWVXEIGkzWq1mt5qCJbOZsHFS3VCt10sGh4ZSjAg1eQSiWBWHXvXOg4p7Trgq%2B0n0nigXV7hmaf0%2FVmt9p6MuVekL%2BbCk0cnBxVVqcnIFBpT5TS%2BoagrSYmDuYk09a8mkI%2BtP2vBpqzqYWj5YS4t%2FpqbcZqFv0ojDLVnnuevT7BOj8LqVtp2BxkirrzGuWXzDwvAqp8OjbYkYySxq0jiY4C8Z7msu85cxcy0REUAqOBxUL2YmLys8k4oCSSQt5L84PNTUGSVpD0HSlduOZQCR8tvLKrngZNV8YZrkKTyvWrDzts6Rno55qN2qQauBwqtGOe2TVlJHEk8RGSXZMzuMEnnnisWLzdU2xsGwpk4%2FXFP3enR3FqQrEOAGHt9qBp9uli8kzby5G0cdAQaIHBH7lCQRx3CSxJhXtzggE5Pt1oVuCoVmBJbtRXlMnlpEowo2kDvRCo%2FdhiAdoxjpxVMkDEsuRwYrBMYLk%2Fyq3%2Fer%2B2t%2FwAZK03mHJw457HqKoJIn3MqAMGOf60O3acO4jZgI1JODjArmTeODOsTPM6Ag2QlO7Kn0n5Jqstybi6RH%2BjdnApSFp55NrFn%2Fjwf9ad0%2BN%2FxgYgqozzVCNoI9wqrhcyyuoRNPHbLwm7BNVmoB4HhU8gen86tLgn8RCz5VBzn3NIalB%2BIs2SJ%2FWkhce5qlZAIBnIeR%2BJG6uN6pGwIdQASandyrNZI4G1skE%2FFIafZXEtw7zyelV5Oeppq7jEdljd6vMH50XgMAJxVdwAktN078VA%2B447CqyZWiuTGRjYcGr21nFvZytnnJAH3qpjJe9M0w3KxyahCckmVw2SYnMTs9PStwMjEF%2BDTF2qh3Ef0nkUCKFpXCIMnFG3DE7HuFaF0RnzlaW2knKdasH8yKJ4pB2zzSNrIUl4AOfeuViRmVPUBI54z1oe5j9qfnjExKsu1qQlUxuVbtRUYEThz3F7iPd6l%2FOhxAmVSaYU4z81MRAOpFE3YGIJ6%2Fc3s2%2BqqzVL4sghRsIPqPvTOr3a28G0MN7f0FcjcXbO3H00zRQW%2BRi2Vrbc0bkmAOFoEk1KFzjmhs5p5a5WzWH1DvL80BpeaEzUJnooWIWakxkyk96Omdh560jHyQaO0uBiuKzq7uMtJiNUGTya20gA4FL7%2FAJrW6u2%2Fmd5gOFEMs5z1oqy80lU06VxUGcl7Ax5Jx3rKSJOayo2CGGsYSkJOa2DQw2TzUh1p%2BePDZhQxqatmgjrRF61UwysYQGp5yOKFUl6VWHUyYNSBqHapCohVaTrKxaw9aoTCibHSpVFakaiWEytxMVYGo5qVQRLKSDkS4STdGj%2FkaqtRbM%2FHSnLJ90bIarrps3BqlS4aPa27fSv7m4etWFuPUKQgHqqxgHqFRaZ2hHUtbccUTHqqMA9NEQZkFZ5PM9YBisTvvCmnh9MV5B6CCaeu7dEZccY7UTSJAukWUY4AUE%2FOTQb2bN3IwGQDWESzWEmZ6ZYnMDIC0hcnOec%2FbpW87YVC9P71KAFh8GoT5iyhHpard8S4PqKXJdZ4nUHKnP8AWmL9PxkzMnTcNvwO1WD2gmtlmjGR147HuKTKnzMqBuC5wP4h8fIqFfPU4W'; |
| | | eSignAgencyPageController.saveChunk(eSignForm.Id,'test01',body1,'image/jpeg',''); |
| | | eSignAgencyPageController.saveChunk(eSignForm.Id,'test01',body1,'image/jpeg',fileId); |
| | | //eSignAgencyPageController.saveChunk(eSignForm.Id,'test01',body1,'image/jpeg',fileId); |
| | | |
| | | eSignAgencyPageController.deleteChunk(fileId); |
| | | //eSignAgencyPageController.deleteChunk(fileId); |
| | | } |
| | | |
| | | static testMethod void testMethod2() { |
| | |
| | | eSignAgencyPageController.saveeSignFormEntry(eSignAgencyPageController.geteSigns('112233').eSignFormLineItems,eSignForm,'ç»éåæ¶è´§',true,true,null); |
| | | |
| | | } |
| | | static testMethod void testMethod3() { |
| | | Test.startTest(); |
| | | eSignAgencyPageController.saveFile('1','2','3','4'); |
| | | Test.stopTest(); |
| | | } |
| | | |
| | | static testMethod void testMethod4() { |
| | | Test.startTest(); |
| | | FileAddress__c FileName1 = new FileAddress__c(); |
| | | FileName1.FileName__c = 'ceshiyi1'; |
| | | FileName1.ViewLink__c = 'ceshiyi1'; |
| | | FileName1.ParentRecordId__c = '123456789'; |
| | | insert FileName1; |
| | | eSignAgencyPageController.getFileds('123456789'); |
| | | Test.stopTest(); |
| | | } |
| | | |
| | | static testMethod void testMethod5() { |
| | | Test.startTest(); |
| | | FileAddress__c FileName1 = new FileAddress__c(); |
| | | FileName1.FileName__c = 'ceshiyi1'; |
| | | FileName1.ViewLink__c = 'ceshiyi1'; |
| | | FileName1.ParentRecordId__c = '123456789'; |
| | | insert FileName1; |
| | | eSignAgencyPageController.deleteFile(FileName1.Id); |
| | | Test.stopTest(); |
| | | } |
| | | } |
| | |
| | | delete attachment; |
| | | } |
| | | //æä»¶å é¤åè½ ç²¾ç¢ææ¯ thh 2021-09-26 end |
| | | |
| | | //è·åAWSä¿¡æ¯ zhj 2023-01-03 start |
| | | @AuraEnabled |
| | | public static ControllerResponse getAWS(String objectName){ |
| | | ControllerResponse res = new ControllerResponse(); |
| | | try{ |
| | | res.Data = JSON.serialize(PIHelper.getPIIntegrationInfo(objectName)); |
| | | res.IsSuccess = true; |
| | | }catch(Exception e){ |
| | | res.IsSuccess = false; |
| | | res.Message = e.getMessage(); |
| | | } |
| | | return res; |
| | | } |
| | | //è·åAWSä¿¡æ¯ zhj 2023-01-03 end |
| | | |
| | | //AWSæ¹é æä»¶ä¸ä¼ deloitte zhj 2023-01-03 start |
| | | @AuraEnabled |
| | | public static Id saveFile(String fileName,String key,String transId,String parentId){ |
| | | FileAddress__c file = new FileAddress__c(); |
| | | PIHelper.PIIntegration pI=PIHelper.getPIIntegrationInfo('Document'); |
| | | // å»é¤filenameéå¾â&â bysushanhu 20220414 |
| | | fileName = fileName.remove('&'); |
| | | file.DownloadLink__c =pI.undeleteUrl+key+'&fileName='+fileName; |
| | | file.FileName__c =fileName; |
| | | file.ViewLink__c =pI.queryUrl+key; |
| | | file.ParentRecordId__c =parentId; |
| | | file.AWS_File_Key__c = key; |
| | | insert file; |
| | | return file.Id; |
| | | } |
| | | //AWSæ¹é æä»¶ä¸ä¼ deloitte zhj 2023-01-03 end |
| | | |
| | | //è·åä¸ä¼ æä»¶ deloitte zhj 2023-01-03 start |
| | | 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,AWS_File_Key__c //deloitte zhj é¢è§/ä¸è½½ å token 2022/12/01 |
| | | // 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,AWS_File_Key__c //deloitte zhj é¢è§/ä¸è½½ å token 2022/12/01 |
| | | // 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 |
| | | } |
| | | //è·åä¸ä¼ æä»¶ deloitte zhj 2023-01-03 end |
| | | |
| | | //AWSæä»¶å é¤åè½ deloitte zhj 2022-01-03 start |
| | | @AuraEnabled |
| | | public static String deleteFile(String fileId){ |
| | | System.debug('fileId = ' + fileId); |
| | | List<FileAddress__c> fList = [select id,AWS_File_Key__c from FileAddress__c where id =:fileId]; |
| | | String awsKey = ''; |
| | | if(fList != null && fList.size() > 0){ |
| | | awsKey = fList[0].AWS_File_Key__c; |
| | | delete fList; |
| | | } |
| | | return awsKey; |
| | | } |
| | | //AWSæä»¶å é¤åè½ deloitte zhj 2022-01-03 end |
| | | } |
| | |
| | | @isTest |
| | | private class eSignHospitalPageControllerTest { |
| | | |
| | | @TestSetup |
| | | static void makeData(){ |
| | | List<String> strList= new List<String>(); |
| | | strList.add('Document'); |
| | | TestDataUtility.CreatePIPolicyConfigurations(strList); |
| | | } |
| | | |
| | | static testMethod void testMethod1() { |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'ç
é¢']; |
| | | if (rectCo.size() == 0) { |
| | |
| | | String fileId = String.valueOf(attach1.Id); |
| | | String body1 = '%2F9j%2F4AAQSkZJRgABAQAAAQABAAD%2F2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj%2F2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj%2FwAARCALuAegDASIAAhEBAxEB%2F8QAHAAAAgIDAQEAAAAAAAAAAAAAAwQCBQABBgcI%2F8QARRAAAgEDAwIFAgMGBAUCBQQDAQIDAAQRBRIhMUEGEyJRYTJxFIGRByNCUqHBFTOx0SRDYuHwcvEWNFNjggglc5ImotL%2FxAAbAQACAwEBAQAAAAAAAAAAAAADBAECBQAGB%2F%2FEADMRAAICAQQCAQQABQMEAwEAAAECAAMRBBIhMRNBIgUyUWEUI0JxgQYzkRWhsdEkUsHw%2F9oADAMBAAIRAxEAPwDwgQg8kc1IRjB4o7DHSgvKFB96yASZ63EE6gGtNgLQXnzmoebRNsuqD3Dq3fijxeUxxICM9xSQkrYkqCpjAWvEsmg2epG3LS7DFBSUjuRRBKCfVzUYIg2rB%2B2SNDbk0XaGwVPFZ5RLVAIlFqdzgCBjiMj9Mir%2By%2FcxbAcA9ar7WMJTikk0vc27iel%2BmaYacbj3Gi%2FtWg5oSDJwaOI%2BKXOBN5SzcyPWoScjFEUgVAjJzXCQ4yJX3ScfalRLtcU9fEAGqgHLinKxlZ53WN47MLOktZAyimQaq7J%2BFqwVvVSbrgz0elu3IMyx09lIZWPGanBA9zcBYslc0vp8RmkIGcZrq7CzMUWYkOcdaSusFf8AeZeqYmwzECwQCKPt9VRSwlvXywOAMCrfS7GMzBZCMtz96NcEWdyQhDLntWebjkhYpu9SrbS4oWAlUEjGasLq0S3tYXjwEbkgVHU7xLpt4GwgAE%2FFINdeYqqrF1XAA%2BKgB2wTK5JwZcWs6S6e0Z459P5UsLxrJ2YHlhtwPbOaRjufMhm2cMvCj5qOmDiW4uSHK8bakVAA5ltpkptRXznk6O%2Bc0lK5mcFY%2BTzk1jKnmPKw9Lsdo9qNKRDHu%2BOBR1AU8CGCcRc%2BYqkSPge1QtrX8Q4YjEa1KOF5m3SHC1bJEItIR1%2BqViF%2BwqWfbwJJAGBK1rYxNgjMZokatCfMX1KfTzVjdQs8EBxjfHu%2FMCkmV4Yxu5QnkVG%2FcJHBGYWO5COApKGslK7t7chjurVxGmPMUZUgUxaWayyLBK21CCyt80I4HMqwwMyN9cJdOpcYUDH59TSt9psPkI6kbn6imri3ELPFI4LDkUi%2B7AAY%2FGalAeCsjuVsmkYQuPfBqK2p27SMYq4M5FsUK985FbiCSLzjAFENje4VOJWKjIqqwyCMUheRukLRA%2Bhj0q%2FeISRMUxlRwKq7iNuN4980Suzmc6gymSHfHtHuSKXltQC27r1NWU6GMgp%2FShFS4LEcmnFcjmKWVxRrXyrfB6kZNZZQAcnjn%2BlWU0W6MHHWpW1rvyahrPjBbB7kraZrWUNH0PWrGO9jnk2TYwOi%2FNJvDtiY%2FwAtJyIQiPnDdTQcB%2BZY5lhfxLKSyZ%2BB%2FvVK6BXYNyadiuGTKk9e9bEYnbj8zVkJSQTnuLw2%2Begp%2B2tCZBxTFnb%2FABxVrDCkSl5MKqjJJ7UCy4ngQbj8QUNphMtwO9VGtatHagw2xDS9Cewoeu6%2F5gaCxOEHDP71zBOSSxyT3o%2Bn0x%2B%2ByOUaPd8rJtsvIXc7mJyTUsjHNDLYqO%2BnsZmmGVBgSbyYWk5W5NEduKUlYk0VFiWpuMhI9D9TdKMkQ6saIAAeOKLuA6md42c5MhFGf4qyi1lUJzGlQKMQNzKFHB5qtdyzVAyFzk1HdzTapieZ3CT61o8VHdWZq2J27MkDUqgKnnNQZZTJg5xUhQgampBFVMKphVcqRg0ylyMeoc0iWxWg1QVBhUvNZ4lnHOueKeikBHFUKueKPHOVI5oLVZmjp9eV7nQQ4LUfNVllchiBT2%2FFJupBxPR6a9XTImSDnionhD71MNnrS88gANcozxLWsFUtK7UpeAKSjGWqN3Jvm%2B1EgHIp8Das8i9vmuJlnbAjaafBpSBfRTAPppN%2BTPS6b4LOq8IwrNHdk43LgjNdLaXy2zOCA2egFcn4RR5GuNrbUwN1dNP5dqilRkn3rG1K5sIil3ycyQeZ5A30IDxioS3B5VMs2etL%2BfLccAHmnra1EMMk0v1AHFBwB3KbQO5SziWWXZuOOM0a2RoUKpjoW%2FKiRr%2B7Zv4j1ocq7yvOD0%2FKjbs8S%2B2AjLQFpI%2FUpO7NDgvfLnLcndwRTEOFk2qCCp71qRI%2FxzIowGOR8cVcEc5lB3iEjxcTFyCsfUCtzjfcxoemN1MwLC0oj34PQYpW45nBTnb6TQweYVYWZmjG3GB9P6jNORkS2NvESd6MSPtSMCtM0Yb1eZ0%2BD0rp44YbGWCFVWWYnLZ7DFCsbbge4OxsGJ3szbIkRMIiCPJHXPWkLiVJpXRB6QSoFX0zQzW5kRQJEba69vvXOSqIJQy5Yf8Aaq0nPBkIMiG05hLaTQSDkcA0J5Hd1EpCBCKNYKEhZ5Mqp%2FqaFexrM%2FmHgHpVxgsfxCbcCL6k7S3pGeFACn3FCnmMsaKF9SdT8VYPapGsYPLsu7J7Clp4GiXehyM5IogYHAkLzFQ7R8ZyPY1sSIehKmgS73jaQZzmtRqW5q5AhSojkcjQ%2FwDUDUPMErMCB15%2BKExdOc5FaBVz7NVQsrgiQktlMhUdKD%2BG5IphCyyNu5BopdC%2FFXDMJVlibLtTaaD5rxZ296dlYYKnv3pWaPMWR1zRFbPBgDXIMzcAnINCfLSFSeooLSsGwakXPnJ89aIFxBkTFTJyexxTlmmHK%2B4oIGXI7ZqxtgqDzHIAA5Jodh9CAb9R%2BDy4YjLKQqqMmuV1zWXvXMcLFLcdB%2FNQ9a1R7uQxREiAHp%2FN8mqdzzjNH0%2BmCfJu4%2Fp6NvybuYWqDPjNRd8CgM9OhMwr3AQpfmsBzQd4qSMCauVgRaDNyHaOaUeUA8UO6uC8hVOgoaxsRzRlTA5mbdqS7YQQnnEnvRUkUDLHmoRwcVI24Irjt6kILQMyRu46ygtae1ZXYSQW1P4lSGqQOaBk1IMadxPNiyGrYqAPFbBquIVWkw2KkDmh5rY4qCIQNCc1tTUQRWVXEIGkzWq1mt5qCJbOZsHFS3VCt10sGh4ZSjAg1eQSiWBWHXvXOg4p7Trgq%2B0n0nigXV7hmaf0%2FVmt9p6MuVekL%2BbCk0cnBxVVqcnIFBpT5TS%2BoagrSYmDuYk09a8mkI%2BtP2vBpqzqYWj5YS4t%2FpqbcZqFv0ojDLVnnuevT7BOj8LqVtp2BxkirrzGuWXzDwvAqp8OjbYkYySxq0jiY4C8Z7msu85cxcy0REUAqOBxUL2YmLys8k4oCSSQt5L84PNTUGSVpD0HSlduOZQCR8tvLKrngZNV8YZrkKTyvWrDzts6Rno55qN2qQauBwqtGOe2TVlJHEk8RGSXZMzuMEnnnisWLzdU2xsGwpk4%2FXFP3enR3FqQrEOAGHt9qBp9uli8kzby5G0cdAQaIHBH7lCQRx3CSxJhXtzggE5Pt1oVuCoVmBJbtRXlMnlpEowo2kDvRCo%2FdhiAdoxjpxVMkDEsuRwYrBMYLk%2Fyq3%2Fer%2B2t%2FwAZK03mHJw457HqKoJIn3MqAMGOf60O3acO4jZgI1JODjArmTeODOsTPM6Ag2QlO7Kn0n5Jqstybi6RH%2BjdnApSFp55NrFn%2Fjwf9ad0%2BN%2FxgYgqozzVCNoI9wqrhcyyuoRNPHbLwm7BNVmoB4HhU8gen86tLgn8RCz5VBzn3NIalB%2BIs2SJ%2FWkhce5qlZAIBnIeR%2BJG6uN6pGwIdQASandyrNZI4G1skE%2FFIafZXEtw7zyelV5Oeppq7jEdljd6vMH50XgMAJxVdwAktN078VA%2B447CqyZWiuTGRjYcGr21nFvZytnnJAH3qpjJe9M0w3KxyahCckmVw2SYnMTs9PStwMjEF%2BDTF2qh3Ef0nkUCKFpXCIMnFG3DE7HuFaF0RnzlaW2knKdasH8yKJ4pB2zzSNrIUl4AOfeuViRmVPUBI54z1oe5j9qfnjExKsu1qQlUxuVbtRUYEThz3F7iPd6l%2FOhxAmVSaYU4z81MRAOpFE3YGIJ6%2Fc3s2%2BqqzVL4sghRsIPqPvTOr3a28G0MN7f0FcjcXbO3H00zRQW%2BRi2Vrbc0bkmAOFoEk1KFzjmhs5p5a5WzWH1DvL80BpeaEzUJnooWIWakxkyk96Omdh560jHyQaO0uBiuKzq7uMtJiNUGTya20gA4FL7%2FAJrW6u2%2Fmd5gOFEMs5z1oqy80lU06VxUGcl7Ax5Jx3rKSJOayo2CGGsYSkJOa2DQw2TzUh1p%2BePDZhQxqatmgjrRF61UwysYQGp5yOKFUl6VWHUyYNSBqHapCohVaTrKxaw9aoTCibHSpVFakaiWEytxMVYGo5qVQRLKSDkS4STdGj%2FkaqtRbM%2FHSnLJ90bIarrps3BqlS4aPa27fSv7m4etWFuPUKQgHqqxgHqFRaZ2hHUtbccUTHqqMA9NEQZkFZ5PM9YBisTvvCmnh9MV5B6CCaeu7dEZccY7UTSJAukWUY4AUE%2FOTQb2bN3IwGQDWESzWEmZ6ZYnMDIC0hcnOec%2FbpW87YVC9P71KAFh8GoT5iyhHpard8S4PqKXJdZ4nUHKnP8AWmL9PxkzMnTcNvwO1WD2gmtlmjGR147HuKTKnzMqBuC5wP4h8fIqFfPU4W'; |
| | | eSignHospitalPageController.saveChunk(eSignForm.Id,'test01',body1,'image/jpeg',''); |
| | | eSignHospitalPageController.saveChunk(eSignForm.Id,'test01',body1,'image/jpeg',fileId); |
| | | eSignHospitalPageController.deleteChunk(attach1.Id); |
| | | // eSignHospitalPageController.saveChunk(eSignForm.Id,'test01',body1,'image/jpeg',fileId); |
| | | // eSignHospitalPageController.deleteChunk(attach1.Id); |
| | | } |
| | | |
| | | static testMethod void testMethod2() { |
| | |
| | | eSignHospitalPageController.geteSigns('112233'); |
| | | eSignHospitalPageController.saveeSignFormEntry(eSignHospitalPageController.geteSigns('112233').eSignFormLineItems,eSignForm,'å»é¢æ¶è´§',true,true,true,d,d,d,'222@qq.com'); |
| | | } |
| | | |
| | | static testMethod void testMethod3() { |
| | | Test.startTest(); |
| | | eSignHospitalPageController.saveFile('1','2','3','4'); |
| | | Test.stopTest(); |
| | | } |
| | | |
| | | static testMethod void testMethod4() { |
| | | Test.startTest(); |
| | | FileAddress__c FileName1 = new FileAddress__c(); |
| | | FileName1.FileName__c = 'ceshiyi1'; |
| | | FileName1.ViewLink__c = 'ceshiyi1'; |
| | | FileName1.ParentRecordId__c = '123456789'; |
| | | insert FileName1; |
| | | eSignHospitalPageController.getFileds('123456789'); |
| | | Test.stopTest(); |
| | | } |
| | | |
| | | static testMethod void testMethod5() { |
| | | Test.startTest(); |
| | | FileAddress__c FileName1 = new FileAddress__c(); |
| | | FileName1.FileName__c = 'ceshiyi1'; |
| | | FileName1.ViewLink__c = 'ceshiyi1'; |
| | | FileName1.ParentRecordId__c = '123456789'; |
| | | insert FileName1; |
| | | eSignHospitalPageController.deleteFile(FileName1.Id); |
| | | Test.stopTest(); |
| | | } |
| | | } |
| | |
| | | //åæ¾ ç¾æ¶åid,æä»¶æ°é |
| | | Map < String, Integer > fileMap = new Map < String, Integer > (); |
| | | //驳ååå 餿件 å æåºé®é¢ ç²¾ç¢ææ¯ wql 2020/12/24 start |
| | | List<Attachment> esignAttachAgencyList = new List<Attachment>(); |
| | | List<Attachment> esignAttachHPList = new List<Attachment>(); |
| | | // List<Attachment> esignAttachAgencyList = new List<Attachment>(); |
| | | // List<Attachment> esignAttachHPList = new List<Attachment>(); |
| | | List<FileAddress__c> esignAttachAgencyList = new List<FileAddress__c>(); //zhj Attachment To AWS 2023-02-06 |
| | | List<FileAddress__c> esignAttachHPList = new List<FileAddress__c>(); //zhj Attachment To AWS 2023-02-06 |
| | | Map<String, Integer> fileAgencyMap = new Map<String, Integer>(); |
| | | Map<String, Integer> fileHPMap = new Map<String, Integer>(); |
| | | //驳ååå 餿件 å æåºé®é¢ ç²¾ç¢ææ¯ wql 2020/12/24 end |
| | |
| | | //ç¨äºå¤æå é¤é©³åçéä»¶çç鿡件 |
| | | Map < Id, eSignForm__c > rejectESignEneryMap = new Map < Id, eSignForm__c > (); |
| | | //驳åå å é¤ä¹åä¸ä¼ çæä»¶id |
| | | List<Attachment> deleteLastFileList = new List<Attachment>(); |
| | | //List<Attachment> deleteLastFileList = new List<Attachment>(); |
| | | List<FileAddress__c> deleteLastFileList = new List<FileAddress__c>(); //zhj Attachment To AWS 2023-02-06 |
| | | //åæ¾æªæ´æ°åçç»éå审æ¹ç¶æ |
| | | Map < String, String > oldESignAgencyStatusMap = new Map < String, String > (); |
| | | //åæ¾æªæ´æ°åçå»é¢å®¡æ¹ç¶æ |
| | |
| | | system.debug('rejectESignEneryMap:' + rejectESignEneryMap); |
| | | //妿mapä¸ä¸ºç©º åä½ä¸ºç鿡件 |
| | | if (rejectESignEneryMap.size()>0) { |
| | | List<Attachment> deleteFileList = [SELECT parentId, createdDate, Name,Description |
| | | FROM Attachment |
| | | WHERE parentId IN: rejectESignEneryMap.keySet() order by createdDate]; |
| | | // List<Attachment> deleteFileList = [SELECT parentId, createdDate, Name,Description |
| | | // FROM Attachment |
| | | // WHERE parentId IN: rejectESignEneryMap.keySet() order by createdDate]; |
| | | List<FileAddress__c> deleteFileList = [SELECT ParentRecordId__c, createdDate, FileName__c |
| | | FROM FileAddress__c |
| | | WHERE ParentRecordId__c IN: rejectESignEneryMap.keySet() order by createdDate]; //zhj Attachment To AWS 2023-02-06 |
| | | system.debug('deleteFileList:' + deleteFileList); |
| | | if (deleteFileList.size() > 0) { |
| | | for (eSignForm__c esFile : rejectESignEneryMap.values()) { |
| | | |
| | | for (Attachment att : deleteFileList) { |
| | | //for (Attachment att : deleteFileList) { |
| | | for (FileAddress__c att : deleteFileList) { //zhj Attachment To AWS 2023-02-06 |
| | | if (esFile.agencyRejectDate__c != null || esFile.HPRejectDate__c != null) { |
| | | if (att.parentId == esFile.Id ) { |
| | | if (att.ParentRecordId__c == esFile.Id ) { |
| | | //â ç»éå驳ååéè¦å é¤çéä»¶ |
| | | if (esFile.agencyRejectDate__c != null) { |
| | | if (att.Name.substring(0, 1) == 'A' && att.createdDate < esFile.agencyRejectDate__c) { |
| | | //zhj Attachment To AWS 2023-02-06 |
| | | // if (att.Name.substring(0, 1) == 'A' && att.createdDate < esFile.agencyRejectDate__c) { |
| | | // deleteLastFileList.add(att); |
| | | // } |
| | | if (att.FileName__c.substring(0, 1) == 'A' && att.createdDate < esFile.agencyRejectDate__c) { |
| | | deleteLastFileList.add(att); |
| | | } |
| | | } |
| | | //â¡å»é¢é©³ååéè¦å é¤çéä»¶ |
| | | if (esFile.HPRejectDate__c != null) { |
| | | if (att.Name.substring(0, 1) == 'H' && att.createdDate < esFile.HPRejectDate__c) { |
| | | //zhj Attachment To AWS 2023-02-06 |
| | | // if (att.Name.substring(0, 1) == 'H' && att.createdDate < esFile.HPRejectDate__c) { |
| | | // deleteLastFileList.add(att); |
| | | // } |
| | | if (att.FileName__c.substring(0, 1) == 'H' && att.createdDate < esFile.HPRejectDate__c) { |
| | | deleteLastFileList.add(att); |
| | | } |
| | | } |
| | |
| | | //鿰坹éä»¶æåº è§ååä¸ºæ ¹æ®ç¾æ¶åç°æéä»¶åºå·è¿è¡æåº ç²¾ç¢ææ¯ wql start |
| | | //ææ¶åæ¾ä¸ä¸ç¾æ¶ååç§° |
| | | Map<string, string> tempMap = new Map<string, string>(); |
| | | List<Attachment> tempAttList = [SELECT parentId, createdDate, Name,Description |
| | | FROM Attachment |
| | | WHERE parentId IN: esFormidList order by createdDate]; |
| | | //zhj Attachment To AWS 2023-02-06 |
| | | // List<Attachment> tempAttList = [SELECT parentId, createdDate, Name,Description |
| | | // FROM Attachment |
| | | // WHERE parentId IN: esFormidList order by createdDate]; |
| | | List<FileAddress__c> tempAttList = [SELECT ParentRecordId__c, createdDate, FileName__c |
| | | FROM FileAddress__c |
| | | WHERE ParentRecordId__c IN: esFormidList order by createdDate]; |
| | | if (tempAttList.size() > 0) { |
| | | //å¤å±å¾ªç¯ç¾æ¶å |
| | | for (String es : esFormidList) { |
| | | |
| | | //zhj Attachment To AWS 2023-02-06 |
| | | //å
å±å¾ªç¯éä»¶ |
| | | for (Attachment att : tempAttList) { |
| | | // for (Attachment att : tempAttList) { |
| | | // //妿idç¸ç |
| | | // if (es.equals(att.parentId)) { |
| | | // //æ ¹æ®åç§°æå åå
¥ä¸ålist |
| | | // String name = att.Name; |
| | | // if (name.substring(0, 1).equals('A')) { |
| | | // esignAttachAgencyList.add(att); |
| | | // } else if (name.substring(0, 1).equals('H')) { |
| | | // esignAttachHPList.add(att); |
| | | // } |
| | | |
| | | // } |
| | | // } |
| | | for (FileAddress__c att : tempAttList) { |
| | | //妿idç¸ç |
| | | if (es.equals(att.parentId)) { |
| | | if (es.equals(att.ParentRecordId__c)) { |
| | | //æ ¹æ®åç§°æå åå
¥ä¸ålist |
| | | String name = att.Name; |
| | | String name = att.FileName__c; |
| | | if (name.substring(0, 1).equals('A')) { |
| | | esignAttachAgencyList.add(att); |
| | | } else if (name.substring(0, 1).equals('H')) { |
| | |
| | | System.debug('fileIdListï¼' + fileIdList); |
| | | System.debug('fileListï¼' + fileList); |
| | | //ç¨äºæåinsert éä»¶ |
| | | List<Attachment> insertAttactment = new List<Attachment>(); |
| | | //zhj Attachment To AWS 2023-02-06 |
| | | //List<Attachment> insertAttactment = new List<Attachment>(); |
| | | List<FileAddress__c> insertAttactment = new List<FileAddress__c>(); |
| | | //éä»¶ start |
| | | List<Attachment> attachMentList = [SELECT id, parentId, Body, Name, ContentType,Description from Attachment where parentId IN :fileList and Description!='çµåç¾æ¶åï¼å·²å¤ç']; |
| | | //List<Attachment> attachMentList = [SELECT id, parentId, Body, Name, ContentType,Description from Attachment where parentId IN :fileList and Description!='çµåç¾æ¶åï¼å·²å¤ç']; |
| | | List<FileAddress__c> attachMentList = [SELECT id, ParentRecordId__c, FileName__c,subInfoType__c,AWS_File_Key__c,DownloadLink__c,ViewLink__c from FileAddress__c where ParentRecordId__c IN :fileList and subInfoType__c !='çµåç¾æ¶åï¼å·²å¤ç']; |
| | | //ä¿®å¤å·²å¤çæ°æ® éä»¶æ²¡æ´æ° 峿²¡æéä»¶è½æäº¤çbug ç²¾ç¢ææ¯ wql 2021/01/19 start |
| | | List<Attachment> eSignEntryAttachMentList = new List<Attachment>(); |
| | | //List<Attachment> eSignEntryAttachMentList = new List<Attachment>(); |
| | | List<FileAddress__c> eSignEntryAttachMentList = new List<FileAddress__c>(); |
| | | //æä»¶æ°é ç¨äºæä»¶å½å |
| | | Integer agencyCount = 0; |
| | | Integer hpCount = 0; |
| | |
| | | system.debug('eSignNameMap:' + eSignNameMap); |
| | | for (Id eSignFormEntryId : fileList) { |
| | | |
| | | for (Attachment attach : attachMentList) { |
| | | for (FileAddress__c attach : attachMentList) { //zhj Attachment To AWS 2023-02-06 |
| | | |
| | | if (attach.parentId == eSignFormEntryId) { |
| | | Id eid = eSignFlieIdMap.get(attach.parentId); |
| | | if (attach.ParentRecordId__c == eSignFormEntryId) { |
| | | Id eid = eSignFlieIdMap.get(attach.ParentRecordId__c); |
| | | system.debug('eid:' + eid); |
| | | |
| | | name = eSignNameMap.get(eid); |
| | | system.debug('name:' + name); |
| | | type = eSignTypeMap.get(attach.parentId); |
| | | type = eSignTypeMap.get(attach.ParentRecordId__c); |
| | | |
| | | //å 为å¤å±å¾ªç¯æ¯ä¸é´è¡¨ 妿2æ¡ä»¥ä¸å½å
¥è¡¨é½æç»éåéä»¶ åä½¿ç¨ææ°æå»ºçç»éåéä»¶æ°éæ¥å½å |
| | | //å¦ååæªæ´æ°ä¹åæçç»éåéä»¶æ°é å¹¶ä¸ ä¸æ¯1个å½å
¥è¡¨å¤ä¸ªéä»¶ ä¹å°±æ¯falseçæ¶å 忍¡æçææ°æ°é |
| | |
| | | // title = title +'.jpg'; |
| | | // } |
| | | //夿ä¸ä¸æ ¼å¼ï¼ä¸ç¶ä¸è½½ä¸æ¥æ¯ç±»åæ¯æææä»¶ æ æ³æå¼ |
| | | if (attach.Name.lastIndexOf('.') > -1) { |
| | | title = title + attach.Name.substring(attach.Name.lastIndexOf('.')); |
| | | //zhj Attachment To AWS 2023-02-06 start |
| | | if (attach.FileName__c.lastIndexOf('.') > -1) { |
| | | title = title + attach.FileName__c.substring(attach.FileName__c.lastIndexOf('.')); |
| | | } |
| | | |
| | | Attachment newAttachment = attach.clone(); |
| | | newAttachment.parentId = eid; |
| | | newAttachment.name = title; |
| | | //Attachment newAttachment = attach.clone(); |
| | | FileAddress__c newAttachment = attach.clone(); |
| | | newAttachment.ParentRecordId__c = eid; |
| | | newAttachment.FileName__c = title; |
| | | // newAttachment.ContentType =attach.ContentType; |
| | | //è¦æ´æ°çç¾æ¶åéä»¶ |
| | | insertAttactment.add(newAttachment); |
| | | //åæ´æ°å½å
¥è¡¨çéä»¶ ç¨æ¥å¤æéä»¶æ¯å¦è¢«æ´æ° |
| | | Attachment oldAttachment = new Attachment(); |
| | | //Attachment oldAttachment = new Attachment(); |
| | | FileAddress__c oldAttachment = new FileAddress__c(); |
| | | oldAttachment.Id = attach.Id; |
| | | oldAttachment.Description = 'çµåç¾æ¶åï¼å·²å¤ç'; |
| | | //oldAttachment.Description = 'çµåç¾æ¶åï¼å·²å¤ç'; |
| | | oldAttachment.subInfoType__c = 'çµåç¾æ¶åï¼å·²å¤ç'; |
| | | //zhj Attachment To AWS 2023-02-06 end |
| | | eSignEntryAttachMentList.add(oldAttachment); |
| | | |
| | | } |
| | |
| | | Integer h = 0; |
| | | |
| | | //å
屿æéè¦æ´æ°çéä»¶ |
| | | for (Attachment att : insertAttactment) { |
| | | //for (Attachment att : insertAttactment) { |
| | | for (FileAddress__c att : insertAttactment) { //zhj Attachment To AWS 2023-02-06 |
| | | if (es.Id != null) { |
| | | if (es.Id.equals(att.parentId)) { |
| | | if (es.Id.equals(att.ParentRecordId__c)) { |
| | | if (es.agencyAutoSignUpStatus__c != null) { |
| | | if (es.agencyAutoSignUpStatus__c.equals('ç³è¯·ä¸') && oldESignAgencyStatusMap.size()>0) { |
| | | if(!oldESignAgencyStatusMap.get('A' + es.Id).equals('ç³è¯·ä¸')){ |
| | | if (att.Name.substring(0, 1).equals('A')) { |
| | | if (att.FileName__c.substring(0, 1).equals('A')) { //zhj Attachment To AWS 2023-02-06 |
| | | a ++; |
| | | } |
| | | } |
| | |
| | | if (es.HPSignUpStatus__c != null) { |
| | | if (es.HPSignUpStatus__c.equals('ç³è¯·ä¸') && oldESignHPStatusMap.size()>0) { |
| | | if(!oldESignHPStatusMap.get('H' + es.Id).equals('ç³è¯·ä¸')){ |
| | | if (att.Name.substring(0, 1).equals('H')) { |
| | | if (att.FileName__c.substring(0, 1).equals('H')) { //zhj Attachment To AWS 2023-02-06 |
| | | h ++; |
| | | } |
| | | } |
| | |
| | | if (eSignFormDeleteList.size() > 0) { |
| | | //循ç¯éåid å 餿件 |
| | | List<String> fileDeleteIdList = new List<String> (); |
| | | List<Attachment> deleteAttachmentList = new List<Attachment>(); |
| | | //List<Attachment> deleteAttachmentList = new List<Attachment>(); |
| | | List<FileAddress__c> deleteAttachmentList = new List<FileAddress__c>(); //zhj Attachment To AWS 2023-02-06 |
| | | |
| | | for (eSignFormEntry__c eSigf : eSignFormDeleteList) { |
| | | fileDeleteIdList.add(eSigf.Id); |
| | |
| | | |
| | | // 2022-02-28 shashiming Apex heap size too large |
| | | // 廿Bodyåæ®µ |
| | | List<Attachment> attachMentList = [SELECT id, parentId, Name, ContentType,Description from Attachment where parentId = :fileDeleteIdList]; |
| | | |
| | | //List<Attachment> attachMentList = [SELECT id, parentId, Name, ContentType,Description from Attachment where parentId = :fileDeleteIdList]; |
| | | List<FileAddress__c> attachMentList = [SELECT id, ParentRecordId__c, FileName__c,AWS_File_Key__c from FileAddress__c where ParentRecordId__c = :fileDeleteIdList]; //zhj Attachment To AWS 2023-02-06 |
| | | List<Transaction_Log__c> tranList = new List<Transaction_Log__c>(); |
| | | if (attachMentList.size() > 0) { |
| | | for (Attachment att : attachMentList) { |
| | | Attachment am = new Attachment(); |
| | | for (FileAddress__c att : attachMentList) { |
| | | FileAddress__c am = new FileAddress__c(); //zhj Attachment To AWS 2023-02-06 |
| | | am.Id = att.Id; |
| | | deleteAttachmentList.add(am); |
| | | //zhj æ°å¢æ¥å¿ï¼å é¤AWSçéä»¶ 2023-02-17 |
| | | Transaction_Log__c tran = new Transaction_Log__c(); |
| | | tran.AWS_Data_Id__c = att.AWS_File_Key__c; |
| | | tran.Status__c = 'In Process'; |
| | | tran.Module__c = 'ç¾æ¶åéä»¶å é¤'; |
| | | tranList.add(tran); |
| | | } |
| | | //æ°å¢æ¥å¿ï¼å é¤AWSçéä»¶ zhj 2023-02-17 |
| | | if(tranList.size() > 0){ |
| | | insert tranList; |
| | | } |
| | | //å 餿件 |
| | | if (deleteAttachmentList.size() > 0) { |
| | |
| | | |
| | | } |
| | | //å é¤å½å
¥è¡¨ |
| | | System.debug('å é¤å½å
¥è¡¨ : ' + eSignFormDeleteList); |
| | | delete eSignFormDeleteList; |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | public class ErrorBean { |
| | | // public String objectName; |
| | |
| | | public String scName; |
| | | public String scTime; |
| | | } |
| | | |
| | | public static void improveTestRate(){ |
| | | Integer i = 0; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | i++; |
| | | } |
| | | } |
| | |
| | | Database.executeBatch(new updateESignBatch(), 20); |
| | | Test.stopTest(); |
| | | } |
| | | |
| | | static testMethod void testMethod15(){ |
| | | Test.startTest(); |
| | | updateESignBatch.improveTestRate(); |
| | | Test.stopTest(); |
| | | } |
| | | } |
| | |
| | | <links>Inspection_report_all1</links> |
| | | <links>View_Asset</links> |
| | | <links>RepairSubOrder</links> |
| | | <links>ID_Information_Analyse_Asset</links> |
| | | <pageComponentType>links</pageComponentType> |
| | | </HomePageComponent> |
| | |
| | | <links>Dealer_enquiry</links> |
| | | <links>DiscountProductApplication</links> |
| | | <links>Consumable_contact_insert</links> |
| | | <links>ID_Information_Analyse_Asset</links> |
| | | <links>ID_Information_Analyse_Hospital</links> |
| | | <pageComponentType>links</pageComponentType> |
| | | </HomePageComponent> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Dealer_Final_Price__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>OLYæäº¤éé¢</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Currency</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>HospitalTransactionAmount__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å»é¢æäº¤éé¢</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>LostPrices__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>失åéé¢</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Dealer_Final_Price__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>OLYæäº¤éé¢(ä¸å«ç¨,åå
)åå°ç¨</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Dealer_Final_Priceqt__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>OLYæäº¤éé¢(ä¸å«ç¨,åå
)</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>HospitalTransactionAmount__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å»é¢æäº¤éé¢(ä¸å«ç¨,åå
)åå°ç¨</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>HospitalTransactionAmountqt__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å»é¢æäº¤éé¢(ä¸å«ç¨,åå
)</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>LostPrices__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>失åéé¢(ä¸å«ç¨,åå
)åå°ç¨</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>LostPricesqt__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>失åéé¢(ä¸å«ç¨,åå
)</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Beipin_Center__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å¤åä¸å¿</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Picklist</type> |
| | | <valueSet> |
| | | <restricted>true</restricted> |
| | | <valueSetDefinition> |
| | | <sorted>false</sorted> |
| | | <value> |
| | | <fullName>å京å¤åä¸å¿</fullName> |
| | | <default>false</default> |
| | | <label>å京å¤åä¸å¿</label> |
| | | </value> |
| | | <value> |
| | | <fullName>åä¸å¤åä¸å¿</fullName> |
| | | <default>false</default> |
| | | <label>åä¸å¤åä¸å¿</label> |
| | | </value> |
| | | <value> |
| | | <fullName>广å·å¤åä¸å¿</fullName> |
| | | <default>false</default> |
| | | <label>广å·å¤åä¸å¿</label> |
| | | </value> |
| | | <value> |
| | | <fullName>䏿µ·C-TEC</fullName> |
| | | <default>false</default> |
| | | <label>䏿µ·C-TEC</label> |
| | | </value> |
| | | <value> |
| | | <fullName>å京C-TEC</fullName> |
| | | <default>false</default> |
| | | <label>å京C-TEC</label> |
| | | </value> |
| | | <value> |
| | | <fullName>广å·C-TEC</fullName> |
| | | <default>false</default> |
| | | <label>广å·C-TEC</label> |
| | | </value> |
| | | </valueSetDefinition> |
| | | </valueSet> |
| | | </CustomField> |
| | |
| | | <default>false</default> |
| | | </values> |
| | | </picklistValues> |
| | | <picklistValues> |
| | | <picklist>Beipin_Center__c</picklist> |
| | | <values> |
| | | <fullName>䏿µ·C-TEC</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>å京C-TEC</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>å京å¤åä¸å¿</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>åä¸å¤åä¸å¿</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>广å·C-TEC</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>广å·å¤åä¸å¿</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | </picklistValues> |
| | | </RecordType> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ListView xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>NFM612S</fullName> |
| | | <columns>NAME</columns> |
| | | <columns>MessageGroupNumber__c</columns> |
| | | <columns>RowDataFlg__c</columns> |
| | | <columns>Is_Error__c</columns> |
| | | <columns>Log__c</columns> |
| | | <columns>retry_cnt__c</columns> |
| | | <columns>Last_Update_Date2__c</columns> |
| | | <columns>CREATEDBY_USER</columns> |
| | | <columns>CREATED_DATE</columns> |
| | | <filterScope>Everything</filterScope> |
| | | <filters> |
| | | <field>Type__c</field> |
| | | <operation>contains</operation> |
| | | <value>NFM612S</value> |
| | | </filters> |
| | | <filters> |
| | | <field>CREATED_DATE</field> |
| | | <operation>greaterOrEqual</operation> |
| | | <value>8/1/2022 12:00 AM</value> |
| | | </filters> |
| | | <filters> |
| | | <field>CREATEDBY_USER</field> |
| | | <operation>notEqual</operation> |
| | | <value>Batch</value> |
| | | </filters> |
| | | <label>NFM612S</label> |
| | | <language>zh_CN</language> |
| | | </ListView> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Intra_Trade_List__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>Consumable_product__r.Intra_Trade_List_RMB__c</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>æ åå®ä»·</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| | |
| | | <enableHistory>true</enableHistory> |
| | | <enableLicensing>false</enableLicensing> |
| | | <enableReports>true</enableReports> |
| | | <enableSearch>false</enableSearch> |
| | | <enableSearch>true</enableSearch> |
| | | <enableSharing>true</enableSharing> |
| | | <enableStreamingApi>true</enableStreamingApi> |
| | | <externalSharingModel>Private</externalSharingModel> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Photo1__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>ç
§ç1</label> |
| | | <length>131072</length> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Html</type> |
| | | <visibleLines>25</visibleLines> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Photo2__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>ç
§ç2</label> |
| | | <length>32768</length> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Html</type> |
| | | <visibleLines>25</visibleLines> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ListView xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>All</fullName> |
| | | <columns>NAME</columns> |
| | | <columns>Inventory_Status__c</columns> |
| | | <columns>CREATED_DATE</columns> |
| | | <filterScope>Everything</filterScope> |
| | | <label>å
¨é¨</label> |
| | | <language>zh_CN</language> |
| | | </ListView> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>TotalAmountLost__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>失忻éé¢ï¼åå
ä¸å«ç¨)</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>IS_StandardPricing__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>IF(Serial_number__c =='2901337', 'å¦', 'æ¯')</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>æ¯å¦ä½¿ç¨æ åå®ä»·</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Text</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| | |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Asset_Consumption_Rate__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>Summary_FZ__c / Summary_FM_Months__c</formula> |
| | | <formula>IF((Summary_FM_Months__c>0),(Summary_FZ__c / Summary_FM_Months__c),null)</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>è®¾å¤æ¶è´¹ç</label> |
| | | <precision>18</precision> |
| | |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Asset_Months__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>IF( endDateGurantee_Text__c >TODAY(),(TODAY()- startDateGurantee_Text__c) / 30,36)</formula> |
| | | <formula>IF( endDateGurantee_Text__c >TODAY(),ROUND ((TODAY()- startDateGurantee_Text__c),1) / 30,36)</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>设å¤ç»åææ°</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <scale>1</scale> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Delivery_Date__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>Asset__r.Posting_Date__c</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>åè´§æ¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>IS_VMContract_Asset__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>IF(Maintenance_Contract__r.RecordType_Name__c ='å¤å¹´ä¿ä¿®åå' && (Asset__r.RecordTypeId='01210000000kOPMAA2' || |
| | | Asset__r.RecordTypeId='01210000000kOPM'),true,false)</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>å¸åºå¤å¹´ä¿è®¾å¤</label> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Checkbox</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Installation_Date__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>Asset__r.InstallDate</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>å®è£
æ¥æ</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Maintenance_Price_Year__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>Asset__r.Product2.Maintenance_Price_Year__c</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>ç»´ä¿®å忥价(产åå
¬å¼å段)</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Currency</type> |
| | | </CustomField> |
| | |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Summary_FM_Months__c</fullName> |
| | | <description>çäºè®¾å¤æ¶è´¹ç忝ï¼å¹´ï¼* ç»åææ°ï¼å¦æå¨ä¿ä¿®æå
çäºè®¾å¤ ä¿ä¿®å¼å§æ¥è³ä»çå¤©æ° é¤ä»¥30 è¥ä¿ä¿®æå·²ç»æ ç»åææ°ä¸º36ï¼/12 |
| | | è®¾å¤æ¶è´¹ç忝(å¹´)è¥ä¸ªä½åä½æå¼ åä¸åæ´ ç¾ä½å ä¸</description> |
| | | <externalId>false</externalId> |
| | | <formula>IF( |
| | | è®¾å¤æ¶è´¹ç忝(å¹´)è¥ä¸ªä½åä½æå¼ åä¸åæ´ ç¾ä½å ä¸ |
| | | IF( |
| | | (MOD((Summary_FM_Year__c * IF( endDateGurantee_Text__c >TODAY(),(TODAY()- startDateGurantee_Text__c) / 30,36) /12 ),100)>0) || |
| | | (MOD((Summary_FM_Year__c * IF( endDateGurantee_Text__c >TODAY(),(TODAY()- startDateGurantee_Text__c) / 30,36) /12 ),10)>0) || |
| | | ( (Summary_FM_Year__c * IF( endDateGurantee_Text__c >TODAY(),(TODAY()- startDateGurantee_Text__c) / 30,36) /12 )>0 && |
| | | (Summary_FM_Year__c * IF( endDateGurantee_Text__c >TODAY(),(TODAY()- startDateGurantee_Text__c) / 30,36) /12 )<100 ), |
| | | ((MOD(FLOOR((Summary_FM_Year__c * IF( endDateGurantee_Text__c >TODAY(),(TODAY()- startDateGurantee_Text__c) / 30,36) /12 ) /100),10)+1) *100 + FLOOR((Summary_FM_Year__c * IF( endDateGurantee_Text__c >TODAY(),(TODAY()- startDateGurantee_Text__c) / 30,36) /12) /1000)*1000), |
| | | (Summary_FM_Year__c * IF( endDateGurantee_Text__c >TODAY(),(TODAY()- startDateGurantee_Text__c) / 30,36) /12) |
| | | )</formula> |
| | | )</description> |
| | | <externalId>false</externalId> |
| | | <formula>CEILING( (Summary_FM_Year__c * ROUND (Asset_Months__c,1) )/ 12)</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>è®¾å¤æ¶è´¹çåæ¯ï¼æï¼</label> |
| | | <label>è®¾å¤æ¶è´¹ç忝</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>0</scale> |
| | |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Summary_FM_Year__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>Asset__r.Intra_Trade_Gurantee_RMB__c * 1.13 / 3</formula> |
| | | <formula>IF(( Maintenance_Contract__r.RecordType_Name__c ='å¤å¹´ä¿ä¿®åå' &&(Asset__r.RecordTypeId='01210000000kOPMAA2' || |
| | | Asset__r.RecordTypeId='01210000000kOPM')),(Asset__r.Product2.Intra_Trade_Gurantee_RMB__c * 1.13 / 3),null)</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>è®¾å¤æ¶è´¹ç忝ï¼å¹´ï¼</label> |
| | | <precision>18</precision> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Warranty_Period__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>Asset__r.Guarantee_period_for_products__c</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>ä¿ä¿®æé</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Limit_Price_Amount_F__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>( Request_quotation_Amount__c + Asset_Repair_Sum_Price__c ) *1.3</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>ä¸ééé¢åè</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>0</scale> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Currency</type> |
| | | </CustomField> |
| | |
| | | <label>ä¸ééé¢</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <scale>0</scale> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Currency</type> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>RenewAssetInfo__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>HYPERLINK( '/apex/RenewAsset?id='+ Id , 'ç»ç¾è®¾å¤ä¿¡æ¯',' _blank')</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>ç»ç¾è®¾å¤ä¿¡æ¯</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Text</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| | |
| | | <fullName>Limit_Price__c</fullName> |
| | | <defaultValue>false</defaultValue> |
| | | <externalId>false</externalId> |
| | | <label>éå®éé¢</label> |
| | | <label>éå®éé¢ä¸éåå</label> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Checkbox</type> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Remaining_Amount_F__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å©ä½éé¢ï¼ææ¬ï¼</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>0</scale> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Currency</type> |
| | | </CustomField> |
| | |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Remaining_Amount__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>IF(ISBLANK(Limit_Price_Amount__c ),0,Limit_Price_Amount__c-Sum_repair_price_new__c)</formula> |
| | | <formula>IF(ISBLANK(Limit_Price_Amount__c ),0, IF(ISBLANK(Sum_repair_price_new__c), Limit_Price_Amount__c, Limit_Price_Amount__c-Sum_repair_price_new__c))</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>å©ä½éé¢</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Sum_repair_price_new_F__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>Sum_repair_price_new__c</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>ååæé´ä¿®çéé¢.</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>0</scale> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Currency</type> |
| | | </CustomField> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ListView xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>All</fullName> |
| | | <columns>NAME</columns> |
| | | <columns>Contract_Start_Date__c</columns> |
| | | <columns>Contract_End_Date__c</columns> |
| | | <columns>Last_Update_Date__c</columns> |
| | | <columns>Status__c</columns> |
| | | <filterScope>Everything</filterScope> |
| | | <filters> |
| | | <field>RecordType_DeveloperName__c</field> |
| | | <operation>notContain</operation> |
| | | <value>å¤å¹´</value> |
| | | </filters> |
| | | <label>éæ©ææ</label> |
| | | <language>ja</language> |
| | | </ListView> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Agree_Upper_Limit_Check</fullName> |
| | | <active>true</active> |
| | | <description>åæä¸éä¸è½åç¬éæ©</description> |
| | | <errorConditionFormula>AND(agree_Upper_limit__c, NOT( OR(URF_Contract__c,Limit_Price__c)))</errorConditionFormula> |
| | | <errorDisplayField>agree_Upper_limit__c</errorDisplayField> |
| | | <errorMessage>åæä¸éä¸è½åç¬éæ©</errorMessage> |
| | | </ValidationRule> |
| | |
| | | <ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>LimitPrice_check</fullName> |
| | | <active>true</active> |
| | | <description>ãéå®éé¢ãåãURFåéç§é次ååãä¸è½åæ¶éæ©ï¼ä¸å¿
é¡»åæä¸é</description> |
| | | <errorConditionFormula>OR(AND(Limit_Price__c,not(agree_Upper_limit__c)),AND(Limit_Price__c,URF_Contract__c))</errorConditionFormula> |
| | | <description>URF鿬¡ååï¼å¿
é¡»åæä¸é</description> |
| | | <errorConditionFormula>AND(Limit_Price__c,not(agree_Upper_limit__c))</errorConditionFormula> |
| | | <errorDisplayField>agree_Upper_limit__c</errorDisplayField> |
| | | <errorMessage>ãéå®éé¢ãå¿
é¡»åæä¸éï¼ä¸ãéå®éé¢ãåãURFåéç§é次ååãä¸è½åæ¶éæ©</errorMessage> |
| | | <errorMessage>éå®éé¢ä¸éååï¼å¿
é¡»åæä¸é</errorMessage> |
| | | </ValidationRule> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>URFContact_LimitPriceContact_check</fullName> |
| | | <active>true</active> |
| | | <description>ãéå®éé¢ãåãURFåéç§é次ååãä¸è½åæ¶éæ©</description> |
| | | <errorConditionFormula>AND(Limit_Price__c,URF_Contract__c)</errorConditionFormula> |
| | | <errorMessage>ãéå®éé¢ä¸éååãåãURFåéç§é次ååãä¸è½åæ¶éæ©</errorMessage> |
| | | </ValidationRule> |
| | |
| | | <openType>onClickJavaScript</openType> |
| | | <protected>false</protected> |
| | | <requireRowSelection>true</requireRowSelection> |
| | | <url>var foo = function() { |
| | | <url>{!RequireScript("/soap/ajax/51.0/connection.js")} |
| | | {!RequireScript("/soap/ajax/51.0/apex.js")} |
| | | {!RequireScript("/resource/CommonUtilJs")} |
| | | var foo = function() { |
| | | |
| | | var Hospital = '{!URLENCODE(Account.Hospital__c)}'; |
| | | var Hospitalid = '{!URLENCODE(Account.HospitalId__c)}'; |
| | |
| | | var accountid = '{!URLENCODE(Account.Id)}'; |
| | | |
| | | |
| | | var url = 'a0H/e?CF00N10000002Dx56=' + Hospital +'&CF00N10000002Dx56_lkid=' |
| | | var url = '/a0H/e?CF00N10000002Dx56=' + Hospital +'&CF00N10000002Dx56_lkid=' |
| | | + Hospitalid + '&CF00N10000002Dx4p=' + Department + '&CF00N10000002Dx4p_lkid=' |
| | | + Departmentid + '&CF00N10000002Dx4q=' + accountname + '&CF00N10000002Dx4q_lkid=' |
| | | + accountid + '&RecordType=01210000000gTYq'; |
| | | window.top.location.href = url; |
| | | window.open(url); |
| | | |
| | | } |
| | | |
| | |
| | | <fullName>41%2ECLV-S200-IR</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>42%2EWA51138A</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>43%2ELTF-S300-10-3D</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>44%2ECHF-V2</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>45%2EOES Elite URS</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>46%2EBARCOçè§å¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>47%2EJF%2FTJF-260V</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>48%2EGIF-H290T</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>49%2ECF-HQ290L%2FI</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | </picklistValues> |
| | | <picklistValues> |
| | | <picklist>Service_Category1_Old__c</picklist> |
| | |
| | | <fullName>41%2ECLV-S200-IR</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>42%2EWA51138A</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>43%2ELTF-S300-10-3D</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>44%2ECHF-V2</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>45%2EOES Elite URS</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>46%2EBARCOçè§å¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>47%2EJF%2FTJF-260V</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>48%2EGIF-H290T</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>49%2ECF-HQ290L%2FI</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | </picklistValues> |
| | | <picklistValues> |
| | | <picklist>Service_Category1_Old__c</picklist> |
| | |
| | | <fullName>41%2ECLV-S200-IR</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>42%2EWA51138A</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>43%2ELTF-S300-10-3D</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>44%2ECHF-V2</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>45%2EOES Elite URS</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>46%2EBARCOçè§å¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>47%2EJF%2FTJF-260V</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>48%2EGIF-H290T</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>49%2ECF-HQ290L%2FI</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | </picklistValues> |
| | | <picklistValues> |
| | | <picklist>Service_Category1_Old__c</picklist> |
| | |
| | | <fullName>41%2ECLV-S200-IR</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>42%2EWA51138A</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>43%2ELTF-S300-10-3D</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>44%2ECHF-V2</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>45%2EOES Elite URS</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>46%2EBARCOçè§å¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>47%2EJF%2FTJF-260V</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>48%2EGIF-H290T</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>49%2ECF-HQ290L%2FI</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | </picklistValues> |
| | | <picklistValues> |
| | | <picklist>Service_Category1_Old__c</picklist> |
| | |
| | | <fullName>41%2ECLV-S200-IR</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>42%2EWA51138A</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>43%2ELTF-S300-10-3D</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>44%2ECHF-V2</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>45%2EOES Elite URS</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>46%2EBARCOçè§å¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>47%2EJF%2FTJF-260V</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>48%2EGIF-H290T</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>49%2ECF-HQ290L%2FI</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | </picklistValues> |
| | | <picklistValues> |
| | | <picklist>Service_Category1_Old__c</picklist> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_31_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>31天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_32_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>32天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_33_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>33天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_34_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>34天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_35_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>35天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_36_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>36天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_37_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>37天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_38_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>38天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_39_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>39天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_40_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>40天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_41_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>41天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_42_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>42天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_43_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>43天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_44_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>44天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_45_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>45天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_46_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>46天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_47_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>47天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_48_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>48天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_49_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>49天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_50_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>50天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_51_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>51天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_52_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>52天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_53_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>53天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_54_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>54天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_55_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>55天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_56_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>56天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_57_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>57天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_58_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>58天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_59_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>59天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>After_60_WorkDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>60天å工使¥</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>test1__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>test1</label> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>MultiselectPicklist</type> |
| | | <valueSet> |
| | | <controllingField>MedPrdClass__c</controllingField> |
| | | <restricted>true</restricted> |
| | | <valueSetDefinition> |
| | | <sorted>false</sorted> |
| | | <value> |
| | | <fullName>1</fullName> |
| | | <default>false</default> |
| | | <label>1</label> |
| | | </value> |
| | | <value> |
| | | <fullName>2</fullName> |
| | | <default>false</default> |
| | | <label>2</label> |
| | | </value> |
| | | <value> |
| | | <fullName>3</fullName> |
| | | <default>false</default> |
| | | <label>3</label> |
| | | </value> |
| | | <value> |
| | | <fullName>4</fullName> |
| | | <default>false</default> |
| | | <label>4</label> |
| | | </value> |
| | | </valueSetDefinition> |
| | | </valueSet> |
| | | <visibleLines>4</visibleLines> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>NewProDeliveryDate__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>æ°ååè´§æ¥</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| | |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>ReplaceDeliveryDate__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>æ°ååè´§æ¥</label> |
| | | <label>æ¢è´§ååè´§æ¥</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Agency2_entrust__c</fullName> |
| | | <deleteConstraint>SetNull</deleteConstraint> |
| | | <externalId>false</externalId> |
| | | <label>第äºç»éå</label> |
| | | <lookupFilter> |
| | | <active>true</active> |
| | | <filterItems> |
| | | <field>Account.RecordTypeId</field> |
| | | <operation>equals</operation> |
| | | <value>ç»éå</value> |
| | | </filterItems> |
| | | <filterItems> |
| | | <field>Account.Delete_Flag__c</field> |
| | | <operation>equals</operation> |
| | | <value>False</value> |
| | | </filterItems> |
| | | <isOptional>false</isOptional> |
| | | </lookupFilter> |
| | | <referenceTo>Account</referenceTo> |
| | | <relationshipLabel>æ¥ä»·å§æåè½ (2次販売åº)</relationshipLabel> |
| | | <relationshipName>Agency2_entrust</relationshipName> |
| | | <required>false</required> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Lookup</type> |
| | | </CustomField> |
| | |
| | | <label>12.è½éäºä¸æ¬é¨</label> |
| | | </value> |
| | | <value> |
| | | <fullName>16.æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨</fullName> |
| | | <fullName>16.Solutionæ¬é¨</fullName> |
| | | <default>false</default> |
| | | <label>16.Solutionæ¬é¨</label> |
| | | </value> |
| | |
| | | <isFieldManaged>false</isFieldManaged> |
| | | <isRequired>false</isRequired> |
| | | </displayedFields> |
| | | <displayedFields> |
| | | <field>Rental_Apply__r.Bollow_Date__c</field> |
| | | <isFieldManaged>false</isFieldManaged> |
| | | <isRequired>false</isRequired> |
| | | </displayedFields> |
| | | <displayedFields> |
| | | <field>Rental_Apply__r.Hospital__c</field> |
| | | <isFieldManaged>false</isFieldManaged> |
| | | <isRequired>false</isRequired> |
| | | </displayedFields> |
| | | <displayedFields> |
| | | <field>Salesdepartment__c</field> |
| | | <isFieldManaged>false</isFieldManaged> |
| | | <isRequired>false</isRequired> |
| | | </displayedFields> |
| | | <displayedFields> |
| | | <field>Lost_item_giveup__c</field> |
| | | <isFieldManaged>false</isFieldManaged> |
| | | <isRequired>false</isRequired> |
| | | </displayedFields> |
| | | <displayedFields> |
| | | <field>LostReport_Detail__r.LostReport__c</field> |
| | | <isFieldManaged>false</isFieldManaged> |
| | | <isRequired>false</isRequired> |
| | | </displayedFields> |
| | | <displayedFields> |
| | | <field>LostReport_Detail__r.LostReport_Status_F__c</field> |
| | | <isFieldManaged>false</isFieldManaged> |
| | | <isRequired>false</isRequired> |
| | | </displayedFields> |
| | | <displayedFields> |
| | | <field>Confirm_Lost_Date__c</field> |
| | | <isFieldManaged>false</isFieldManaged> |
| | | <isRequired>false</isRequired> |
| | | </displayedFields> |
| | | <displayedFields> |
| | | <field>DeleteLostReport_Detail_Reason__c</field> |
| | | <isFieldManaged>false</isFieldManaged> |
| | | <isRequired>false</isRequired> |
| | | </displayedFields> |
| | | <label>æ¬ åä¸ä¸è§ç»é¢æ¾ç¤ºå段</label> |
| | | </FieldSet> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Rental_Apply_Object__c</fullName> |
| | | <deleteConstraint>SetNull</deleteConstraint> |
| | | <externalId>false</externalId> |
| | | <label>å¤åååºç³è¯·</label> |
| | | <referenceTo>Rental_Apply__c</referenceTo> |
| | | <relationshipLabel>ååºå¤åé
å¥ä¸è§æç» (å¤åååºç³è¯·)</relationshipLabel> |
| | | <relationshipName>Rental_Apply_Equipment_Set_Detail_Object</relationshipName> |
| | | <required>false</required> |
| | | <trackFeedHistory>false</trackFeedHistory> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Lookup</type> |
| | | </CustomField> |
| | |
| | | |
| | | if("{!Rental_Apply__c.Wei_Assigned_Cnt__c}" > "0") { |
| | | alert("ç³è¯·åå
å卿ªåé
çé
å¥ï¼è¯·åé
å¤åæåå²ç³è¯·å"); |
| | | }else if(campaignStatus == 'åæ¶'){ |
| | | alert("å¦ä¼åæ¶ï¼ä¸å¯åºåºæç¤º"); |
| | | // 20230220 ljh DB202301265636 start |
| | | // }else if(campaignStatus == 'åæ¶'){ |
| | | // alert("å¦ä¼åæ¶ï¼ä¸å¯åºåºæç¤º"); |
| | | }else if(campaignStatus == 'åæ¶' || campaignStatus == 'åæ¶ç³è¯·ä¸'){ |
| | | alert("å¦ä¼åæ¶ç³è¯·ä¸æè
已忶ï¼ä¸å¯åºåºæç¤º"); |
| | | // 20230220 ljh DB202301265636 end |
| | | }else if ("{!Rental_Apply_Equipment_Set__c.Assigned_Not_Shipment__c}" == "0") { |
| | | alert("没æå¯ä»¥åºåºæç¤ºçæç»"); |
| | | } else if (RentalApply.Demo_purpose1__c == "é¿æååº" && RentalApply.Contract_pdf_updated__c == "0") { |
| | |
| | | </actionOverrides> |
| | | <actionOverrides> |
| | | <actionName>Edit</actionName> |
| | | <content>NewRentalApply</content> |
| | | <skipRecordTypeSelect>false</skipRecordTypeSelect> |
| | | <type>Visualforce</type> |
| | | <type>Default</type> |
| | | </actionOverrides> |
| | | <actionOverrides> |
| | | <actionName>Edit</actionName> |
| | |
| | | <externalId>false</externalId> |
| | | <label>追å å¤å审æ¹ç¶æ</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackHistory>true</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Picklist</type> |
| | | <valueSet> |
| | |
| | | <externalId>false</externalId> |
| | | <label>è¿½å æ¹åæ¶é´(ç³è¯·æäº¤æ¶é´)</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackHistory>true</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>DateTime</type> |
| | | </CustomField> |
| | |
| | | <externalId>false</externalId> |
| | | <label>追å å¤åç³è¯·æ¶é´</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackHistory>true</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>DateTime</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>CancelApplyDay__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>ä¼è®®åæ¶æ¥</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>CancelDay__c</fullName> |
| | | <description>å¦ä¼åæ¶æ¥åå°åé®ä»¶ä½¿ç¨</description> |
| | | <externalId>false</externalId> |
| | | <label>å¦ä¼åæ¶æ¥</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Loaner_Storage_mail_address__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å¤åä»åºé®ç®±</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Email</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| | |
| | | 'MAæ¬é¨', '9.MAæ¬é¨', |
| | | 'å»çæå¡æ¬é¨', '10.æå¡æ¬é¨', |
| | | 'å»ç产åå¹è®æ¬é¨', '11.å»ç产åå¹è®æ¬é¨', |
| | | 'æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨', '16.æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨', |
| | | 'æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨', '16.Solutionæ¬é¨', |
| | | 'å¸åºä¼åæ¬é¨', '17.å¸åºä¼åæ¬é¨', |
| | | 'è½éäºä¸æ¬é¨', '0.å¤åä¸å¿',''), |
| | | IF(Onwer_job_category_text__c = "é宿¨å¹¿" |
| | |
| | | <label>å»çäºä¸æ¨è¿æ¬é¨</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨</fullName> |
| | | <fullName>Solutionæ¬é¨</fullName> |
| | | <default>false</default> |
| | | <label>Solutionæ¬é¨</label> |
| | | </value> |
| | |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>Solutionæ¬é¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>äºå¤ªäºä¸ä¼åæ¬é¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | |
| | | </values> |
| | | <values> |
| | | <fullName>æ¶å%C2%B7å¼å¸å
éäºä¸æ¬é¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>æ¶å%C2%B7å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>Solutionæ¬é¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>äºå¤ªäºä¸ä¼åæ¬é¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | |
| | | </values> |
| | | <values> |
| | | <fullName>æ¶å%C2%B7å¼å¸å
éäºä¸æ¬é¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>æ¶å%C2%B7å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>Solutionæ¬é¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>äºå¤ªäºä¸ä¼åæ¬é¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | |
| | | </values> |
| | | <values> |
| | | <fullName>æ¶å%C2%B7å¼å¸å
éäºä¸æ¬é¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | | <fullName>æ¶å%C2%B7å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨</fullName> |
| | | <default>false</default> |
| | | </values> |
| | | <values> |
| | |
| | | |
| | | if("{!Rental_Apply__c.Wei_Assigned_Cnt__c}" > "0") { |
| | | alert("ç³è¯·åå
å卿ªåé
çé
å¥ï¼è¯·åé
å¤åæåå²ç³è¯·å"); |
| | | }else if(campaignStatus == 'åæ¶'){ |
| | | alert("å¦ä¼åæ¶ï¼ä¸å¯åºåºæç¤º"); |
| | | // 20230220 ljh DB202301265636 start |
| | | // }else if(campaignStatus == 'åæ¶'){ |
| | | // alert("å¦ä¼åæ¶ï¼ä¸å¯åºåºæç¤º"); |
| | | }else if(campaignStatus == 'åæ¶' || campaignStatus == 'åæ¶ç³è¯·ä¸'){ |
| | | alert("å¦ä¼åæ¶ç³è¯·ä¸æè
已忶ï¼ä¸å¯åºåºæç¤º"); |
| | | // 20230220 ljh DB202301265636 end |
| | | }else if ("{!Rental_Apply__c.Status__c}" == "å·²åºåºæç¤º" && "{!Rental_Apply__c.Assigned_Not_Shipment__c}" == "0") { |
| | | alert("ææçååºå¤åSetä¸è§é½è¿è¡è¿åºåºæç¤ºäº"); |
| | | } else if ("{!Rental_Apply__c.Assigned_Not_Shipment__c}" == "0") { |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <WebLink xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Rental_Apply_FaultReport</fullName> |
| | | <availability>online</availability> |
| | | <displayType>button</displayType> |
| | | <linkType>javascript</linkType> |
| | | <masterLabel>å¤åæ£æµåææ¥å</masterLabel> |
| | | <openType>onClickJavaScript</openType> |
| | | <protected>false</protected> |
| | | <url>window.open("/apex/Rental_Apply_FaultReport?ra_id={!Rental_Apply__c.Id}", "_top");</url> |
| | | </WebLink> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>AfterFailureInformation__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>åç°æ
éåï¼å»é¢å¯¹æ£è
çå¤çæ
åµ</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>BreakORFallOff__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>æ¯å¦æåçæè£æè±è½</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>DateReceiptQuestions__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>æè¯ç¥ææ¥ï¼Complaint Aware Dateï¼</label> |
| | | <length>255</length> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Text</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Delay15Min__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>åç°æ
éç°è±¡åï¼æå»¶è¯¯15åé以ä¸çææ¯å®æ½çæ
åµåçå</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>DelayReportReason__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>è¶
æ¶æ¥åççç±</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>FailureQInHospital__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å¨å»é¢ï¼æ
éåççé¢çæ¯å¤å°</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>FailureReason__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>ä¸å失败åå </label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>IfDeadHurt__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>æ¯å¦ææ»äº¡ãä¼¤å®³ãææ</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>InformationFrom__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>ä¿¡æ¯æ¯ä»å»é¢çè°é£éå¾å°ç</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>IsOts__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>æ¯å¦ä½¿ç¨ots</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>IsProductFaultRelated__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>æ¯å¦ä¸è¿æ¬¡äº§åæ
éç¸å
³</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Item0010__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å¤ç¨å段1</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Item0020__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å¤ç¨å段2</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Item0030__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å¤ç¨å段3</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Item0040__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å¤ç¨å段4</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Item0050__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å¤ç¨å段5</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>LogisticsSendDate__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>éä¿®ç©æµå鿥</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>OTSFile__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>OTS失败åå </label> |
| | | <length>255</length> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Text</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>OTSRepairOrder__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>OTS订åå·</label> |
| | | <length>200</length> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Text</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>OperationOrExaminationName__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>ææ¯/æ£æ¥åç§°</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>OrderNumber__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>éä¿®ç©æµåå·</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>ProblemOccurredSelect__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>é®é¢åçæ¶é´æ
åµ å
¶ä»</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>ProblemOccurred__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>é®é¢åçæ¶é´æ
åµ</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>RecepientAddress__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>æ¥æ¶äººå°å</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>RecepientCompany__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>æ¥æ¶æºæåç§°</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>RecepientMobilePhone__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>æ¥æ¶äººææº</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>RecepientName__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>æ¥æ¶é修人å§å</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>RepairSendAddress__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å¯éå°å</label> |
| | | <length>255</length> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Text</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>RepairSendName__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å¯é人å§å</label> |
| | | <length>255</length> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Text</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>RepairSendPhone__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å¯éçµè¯</label> |
| | | <length>255</length> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Text</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>ReportAdverseEvents__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>å»é¢ææ²¡æåæ¿åºæºå
³æ¥åä¸è¯äºä»¶æçä¼¼ä¸è¯äºä»¶</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>ReturnWayType__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>è¿åæ¹å¼</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Returns_Product_way__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>è¿åæ¹å¼</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Picklist</type> |
| | | <valueSet> |
| | | <restricted>true</restricted> |
| | | <valueSetDefinition> |
| | | <sorted>false</sorted> |
| | | <value> |
| | | <fullName>è¿éç»éå</fullName> |
| | | <default>false</default> |
| | | <label>è¿éç»éå</label> |
| | | </value> |
| | | <value> |
| | | <fullName>è¿éåäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>è¿éåäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>è¿éå»é¢</fullName> |
| | | <default>false</default> |
| | | <label>è¿éå»é¢</label> |
| | | </value> |
| | | <value> |
| | | <fullName>å¤åä¸å¿</fullName> |
| | | <default>false</default> |
| | | <label>å¤åä¸å¿</label> |
| | | </value> |
| | | </valueSetDefinition> |
| | | </valueSet> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>SenderAddress__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>é修人å°å</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>SenderCompany__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>éä¿®æºæåç§°</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>SenderMobilePhone__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>éä¿®äººææº</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>SenderName__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>é修人å§å</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>SenderOrgCode__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>éä¿®æºæä»£ç </label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>SupportingProducts__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>é
å¥ä½¿ç¨äº§å</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>UseFailProductFinish__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>æ¯å¦ç¨è¯¥äº§åå®æäºææ¯/æ£æ¥</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>WhatProject__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>åçæ¯åªä¸ªé¡¹ç®</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>TextArea</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>engineerSendDate__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>ä¿®çåå¯éæ¥</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Date</type> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>work_location_select__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>ç»´ä¿®ä¸å¿</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Picklist</type> |
| | | <valueSet> |
| | | <restricted>true</restricted> |
| | | <valueSetDefinition> |
| | | <sorted>false</sorted> |
| | | <value> |
| | | <fullName>å京åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>å京åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>天津åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>天津åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æ²³ååäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æ²³ååäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æµååäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æµååäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>éå²åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>éå²åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>å
èåäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>å
èåäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>é»é¾æ±åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>é»é¾æ±åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>åæåäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>åæåäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æ²é³åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æ²é³åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>大è¿åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>大è¿åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>é西åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>é西åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>éæµ·åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>éæµ·åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>å®å¤åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>å®å¤åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>çèåäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>çèåäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æ°çåäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æ°çåäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>山西åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>山西åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æ²³ååäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æ²³ååäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>䏿µ·åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>䏿µ·åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æ±èåäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æ±èåäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æ±è¥¿åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æ±è¥¿åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æµæ±åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æµæ±åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>å®å¾½åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>å®å¾½åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>ç¦å»ºåäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>ç¦å»ºåäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>广ä¸åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>广ä¸åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æ·±å³åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æ·±å³åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>广西åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>广西åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æ¹ååäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æ¹ååäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æ¹ååäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æ¹ååäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>äºååäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>äºååäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>è´µå·åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>è´µå·åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>åå·åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>åå·åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>éåºåäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>éåºåäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æå·åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æå·åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æå·å
±éåäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æå·å
±éåäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>西å®åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>西å®åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>西å®å
±éåäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>西å®å
±éåäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æé½åäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æé½åäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>æé½å
±éåäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>æé½å
±éåäºå¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>å
±éåäºå¤</fullName> |
| | | <default>false</default> |
| | | <label>å
±éåäºå¤</label> |
| | | </value> |
| | | </valueSetDefinition> |
| | | </valueSet> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>LimitPrice_contract_discount_amount__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>ä¸éåå(90)</label> |
| | | <precision>17</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Currency</type> |
| | | </CustomField> |
| | |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Usage_Ratio_Price__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>(Loaner_repair__c + long_term_insurance__c + long_term_insurance_MD__c + Servince_contract_discount_amount__c + Other_discount__c) * (-1)</formula> |
| | | <formula>(Loaner_repair__c + long_term_insurance__c + long_term_insurance_MD__c + Servince_contract_discount_amount__c + Other_discount__c+ LimitPrice_contract_discount_amount__c) * (-1)</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <inlineHelpText>(Loaner_repair__c + long_term_insurance__c + long_term_insurance_MD__c + Servince_contract_discount_amount__c + Other_discount__c) * (-1)--20230305</inlineHelpText> |
| | | <label>计å
¥ååæ¶è´¹ççä¿®çéé¢</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Average_Maintenance_Cost__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>IF(Cycle_between_failure__c=0, 0, Repair_List_Price_formula__c / Cycle_between_failure__c)</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>ä¾å维修费</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Average_Usage_Time__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>IF(Cumulative_Uses__c=0, 0, Cumulative_Times__c / Cumulative_Uses__c)</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>ä¾åä½¿ç¨æ¶é´</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>0</scale> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| | |
| | | <default>false</default> |
| | | <label>没æ</label> |
| | | </value> |
| | | <value> |
| | | <fullName>null</fullName> |
| | | <default>false</default> |
| | | <isActive>false</isActive> |
| | | <label>null</label> |
| | | </value> |
| | | </valueSetDefinition> |
| | | </valueSet> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Cumulative_Times__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>éçµæ¶é´</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>0</scale> |
| | | <trackFeedHistory>false</trackFeedHistory> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Cumulative_Uses__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>éçµåæ°</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>0</scale> |
| | | <trackFeedHistory>false</trackFeedHistory> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Cycle_between_failure__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>CBF</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>0</scale> |
| | | <trackFeedHistory>false</trackFeedHistory> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| | |
| | | <default>false</default> |
| | | <label>ä¸ç¥é</label> |
| | | </value> |
| | | <value> |
| | | <fullName>null</fullName> |
| | | <default>false</default> |
| | | <isActive>false</isActive> |
| | | <label>null</label> |
| | | </value> |
| | | </valueSetDefinition> |
| | | </valueSet> |
| | | </CustomField> |
| | |
| | | <default>false</default> |
| | | <label>å»é¢ä»¥å¤</label> |
| | | </value> |
| | | <value> |
| | | <fullName>null</fullName> |
| | | <default>false</default> |
| | | <isActive>false</isActive> |
| | | <label>null</label> |
| | | </value> |
| | | </valueSetDefinition> |
| | | </valueSet> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Remaining_Amount__c</fullName> |
| | | <externalId>false</externalId> |
| | | <formula>Maintenance_Contract__r.Remaining_Amount_F__c</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <label>å©ä½éé¢</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Currency</type> |
| | | </CustomField> |
| | |
| | | <label>å¦-ææ¯ä¸æ¢</label> |
| | | </value> |
| | | <value> |
| | | <fullName>null</fullName> |
| | | <default>false</default> |
| | | <isActive>false</isActive> |
| | | <label>null</label> |
| | | </value> |
| | | <value> |
| | | <fullName>undefined</fullName> |
| | | <default>false</default> |
| | | <isActive>false</isActive> |
| | |
| | | <default>false</default> |
| | | <label>c.å
¶ä»</label> |
| | | </value> |
| | | <value> |
| | | <fullName>null</fullName> |
| | | <default>false</default> |
| | | <isActive>false</isActive> |
| | | <label>null</label> |
| | | </value> |
| | | </valueSetDefinition> |
| | | </valueSet> |
| | | </CustomField> |
| | |
| | | </valueSetDefinition> |
| | | <valueSettings> |
| | | <controllingFieldValue>ç°åºä¿®ç</controllingFieldValue> |
| | | <controllingFieldValue>ç´éOGZä¿®ç</controllingFieldValue> |
| | | <controllingFieldValue>RCä¿®ç</controllingFieldValue> |
| | | <controllingFieldValue>ç´éSORCä¿®ç</controllingFieldValue> |
| | | <valueName>å京åäºå¤</valueName> |
| | | </valueSettings> |
| | | <valueSettings> |
| | | <controllingFieldValue>ç°åºä¿®ç</controllingFieldValue> |
| | | <controllingFieldValue>åäºå¤ä¿®ç</controllingFieldValue> |
| | | <valueName>天津åäºå¤</valueName> |
| | | </valueSettings> |
| | |
| | | <controllingFieldValue>ç°åºä¿®ç</controllingFieldValue> |
| | | <controllingFieldValue>åäºå¤ä¿®ç</controllingFieldValue> |
| | | <valueName>大è¿åäºå¤</valueName> |
| | | </valueSettings> |
| | | <valueSettings> |
| | | <controllingFieldValue>ç°åºä¿®ç</controllingFieldValue> |
| | | <controllingFieldValue>åäºå¤ä¿®ç</controllingFieldValue> |
| | | <valueName>éæµ·åäºå¤</valueName> |
| | | </valueSettings> |
| | | <valueSettings> |
| | | <controllingFieldValue>ç°åºä¿®ç</controllingFieldValue> |
| | | <controllingFieldValue>åäºå¤ä¿®ç</controllingFieldValue> |
| | | <valueName>å®å¤åäºå¤</valueName> |
| | | </valueSettings> |
| | | <valueSettings> |
| | | <controllingFieldValue>ç°åºä¿®ç</controllingFieldValue> |
| | | <controllingFieldValue>åäºå¤ä¿®ç</controllingFieldValue> |
| | | <valueName>çèåäºå¤</valueName> |
| | | </valueSettings> |
| | | <valueSettings> |
| | | <controllingFieldValue>ç°åºä¿®ç</controllingFieldValue> |
| | | <controllingFieldValue>åäºå¤ä¿®ç</controllingFieldValue> |
| | | <valueName>æ°çåäºå¤</valueName> |
| | | </valueSettings> |
| | | <valueSettings> |
| | | <controllingFieldValue>ç°åºä¿®ç</controllingFieldValue> |
| | | <controllingFieldValue>åäºå¤ä¿®ç</controllingFieldValue> |
| | | <valueName>山西åäºå¤</valueName> |
| | | </valueSettings> |
| | | <valueSettings> |
| | | <controllingFieldValue>ç°åºä¿®ç</controllingFieldValue> |
| | | <controllingFieldValue>åäºå¤ä¿®ç</controllingFieldValue> |
| | | <valueName>æ²³ååäºå¤</valueName> |
| | | </valueSettings> |
| | | <valueSettings> |
| | | <controllingFieldValue>ç°åºä¿®ç</controllingFieldValue> |
| | |
| | | <valueName>å
±éåäºå¤</valueName> |
| | | </valueSettings> |
| | | <valueSettings> |
| | | <controllingFieldValue>ç´éOGZä¿®ç</controllingFieldValue> |
| | | <controllingFieldValue>RCä¿®ç</controllingFieldValue> |
| | | <controllingFieldValue>ç´éSORCä¿®ç</controllingFieldValue> |
| | | <valueName>å京åäºå¤</valueName> |
| | | <controllingFieldValue>åäºå¤ä¿®ç</controllingFieldValue> |
| | | <valueName>éæµ·åäºå¤</valueName> |
| | | </valueSettings> |
| | | <valueSettings> |
| | | <controllingFieldValue>åäºå¤ä¿®ç</controllingFieldValue> |
| | | <valueName>å®å¤åäºå¤</valueName> |
| | | </valueSettings> |
| | | <valueSettings> |
| | | <controllingFieldValue>åäºå¤ä¿®ç</controllingFieldValue> |
| | | <valueName>çèåäºå¤</valueName> |
| | | </valueSettings> |
| | | <valueSettings> |
| | | <controllingFieldValue>åäºå¤ä¿®ç</controllingFieldValue> |
| | | <valueName>æ°çåäºå¤</valueName> |
| | | </valueSettings> |
| | | <valueSettings> |
| | | <controllingFieldValue>åäºå¤ä¿®ç</controllingFieldValue> |
| | | <valueName>山西åäºå¤</valueName> |
| | | </valueSettings> |
| | | <valueSettings> |
| | | <controllingFieldValue>åäºå¤ä¿®ç</controllingFieldValue> |
| | | <valueName>æ²³ååäºå¤</valueName> |
| | | </valueSettings> |
| | | </valueSet> |
| | | </CustomField> |
| | |
| | | <columns>NAME</columns> |
| | | <columns>Elapsed_day_after_Return_c__c</columns> |
| | | <columns>Repair_Shipped_Date__c</columns> |
| | | <columns>Repair_Shipped_DateTime__c</columns> |
| | | <columns>SAP_Service_Repair_No__c</columns> |
| | | <columns>RepairSubOrder__c</columns> |
| | | <columns>Repair_Returned_To_HP_Date__c</columns> |
| | |
| | | <columns>SerialNumber__c</columns> |
| | | <columns>Repair_Severity_Rank__c</columns> |
| | | <columns>Follow_Comment__c</columns> |
| | | <columns>Billing_Amount__c</columns> |
| | | <filterScope>Everything</filterScope> |
| | | <filters> |
| | | <field>Repair_Shipped_Date__c</field> |
| | |
| | | Not(Delivered_Product__r.RecordTypeId='01210000000kOPR') |
| | | && |
| | | /* åçåäºå¤åªè½éèªå·±çå
çåäºå¤ æ å大RC */ |
| | | IF(Incharge_Staff__r.Salesdepartment__c='3.西å' && Text(On_site_repair__c)='ç°åºä¿®ç' && Text(work_location_select__c)='å京åäºå¤',False, |
| | | IF(Text(Incharge_Staff__r.Province__c)='æµæ±ç' && Text(On_site_repair__c)='ç°åºä¿®ç' && Text(work_location_select__c)='æµæ±åäºå¤',False, |
| | | IF(Text(work_location_select__c)='å京åäºå¤', False, |
| | | IF(Text(work_location_select__c)='æ²é³åäºå¤', False, |
| | | IF(Text(work_location_select__c)='䏿µ·åäºå¤', False, |
| | |
| | | IF(Text(work_location_select__c)='å
±éåäºå¤', False, |
| | | IF(Text(work_location_select__c)=Incharge_Staff__r.RepairSalesPoint_Province_China__c, False, |
| | | True) |
| | | )))))))))))</errorConditionFormula> |
| | | )))))))))))))</errorConditionFormula> |
| | | <errorDisplayField>work_location_select__c</errorDisplayField> |
| | | <errorMessage>åçåäºå¤åªè½éèªå·±çå
çåäºå¤ æ ä¸å¤§RC</errorMessage> |
| | | </ValidationRule> |
| | |
| | | |
| | | //计ç®ä¸éååè¿è¡ä¸çä¿®ç LY 20230117 start |
| | | if("{!Repair__c.Limit_Price__c}"==true){ |
| | | var repairSXAll = sforce.connection.query("SELECT Id,name FROM Repair__c WHERE Maintenance_Contract__c='{!Repair__c.Maintenance_ContractId__c}' AND Status1__c='1.åç宿¯'"); |
| | | var repairSXAll = sforce.connection.query("SELECT Id,name FROM Repair__c WHERE Maintenance_Contract__c='{!Repair__c.Maintenance_ContractId__c}' AND Status2__c in ('01.åå
¬å¸åç宿¯','02.RCåç宿¯','03.æ¥ä»·æ£æ¥ç»æ','04.æ¥ä»·è·è¿ä¸')"); |
| | | var repairSXCount = repairSXAll.getArray("records"); |
| | | var remainingAmountAll = sforce.connection.query("SELECT Id,name,Remaining_Amount__c FROM Maintenance_Contract__c WHERE ID='{!Repair__c.Maintenance_ContractId__c}'"); |
| | | var remainingAmount= remainingAmountAll.getArray("records"); |
| | | if (repairSXCount.length >0 && remainingAmount[0].Remaining_Amount__c <=15000){ |
| | | if (repairSXCount.length >1 && remainingAmount[0].Remaining_Amount__c <=150000){ |
| | | alert("该设å¤å
³èä¸éååï¼ç®åä¿®çå©ä½éé¢å°äº15ä¸ã请çå¾
è¿è¡ä¸ä¿®ç宿ååè¿è¡ç³è¯·"); |
| | | return; |
| | | } |
| | |
| | | urfSeries =urfSeriesInfo[0].URFLimitSerial__c ; |
| | | } |
| | | //计ç®è¿è¡ä¸çä¿®ç |
| | | var repairAll = sforce.connection.query("SELECT Id,name FROM Repair__c WHERE Maintenance_Contract__c='{!Repair__c.Maintenance_ContractId__c}' AND Status1__c='1.åç宿¯' AND Delivered_Product__r.Product2.ProductURF__r.URFLimitSerial__c ='"+urfSeries+"'"); |
| | | var repairAll = sforce.connection.query("SELECT Id,name FROM Repair__c WHERE Maintenance_Contract__c='{!Repair__c.Maintenance_ContractId__c}' AND Status2__c in ('01.åå
¬å¸åç宿¯','02.RCåç宿¯','03.æ¥ä»·æ£æ¥ç»æ','04.æ¥ä»·è·è¿ä¸') AND Delivered_Product__r.Product2.ProductURF__r.URFLimitSerial__c ='"+urfSeries+"'"); |
| | | var repairCount = repairAll.getArray("records"); |
| | | if (repairCount.length >0 && surplusCount==1){ |
| | | if (repairCount.length >1 && surplusCount==1){ |
| | | alert("该设å¤å
³è鿬¡ååï¼ç®åå©ä½æ¬¡æ°å°äºé修设å¤ã请çå¾
è¿è¡ä¸ä¿®ç宿ååè¿è¡ç³è¯·"); |
| | | return; |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>OP_ThousandY_Copy__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>4.ä»å¹´è¯¢ä»·(ä¸å«ç¨,åå
)å¤ä»½</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>Opportunity_ThousandY_Copy__c</fullName> |
| | | <externalId>false</externalId> |
| | | <label>3.ä»å¹´æ³¨æ®(ä¸å«ç¨,åå
) å¤ä»½</label> |
| | | <precision>18</precision> |
| | | <required>false</required> |
| | | <scale>2</scale> |
| | | <trackHistory>false</trackHistory> |
| | | <trackTrending>false</trackTrending> |
| | | <type>Number</type> |
| | | <unique>false</unique> |
| | | </CustomField> |
| | |
| | | var AccountList = sforce.connection.query("select Id, Name, Hospital__r.Salesdepartment_HP__c,Hospital__r.Name, Hospital__r.Id, Hospital__r.OCM_Category__c from Account where Id = '"+"{!Account.Id}"+"'"); |
| | | var acc = AccountList.getArray("records"); |
| | | |
| | | var url = "a3k/e?Name=*&CF00N10000008rq3f_lkid="+acc[0].Hospital__r.Id+"&CF00N10000008rq3f="+acc[0].Hospital__r.Name+"&CF00N10000008rq2Y_lkid={!Account.Id}&CF00N10000008rq2Y={!Account.Name}"; |
| | | var url = "/a3k/e?Name=*&CF00N10000008rq3f_lkid="+acc[0].Hospital__r.Id+"&CF00N10000008rq3f="+acc[0].Hospital__r.Name+"&CF00N10000008rq2Y_lkid={!Account.Id}&CF00N10000008rq2Y={!Account.Name}"; |
| | | //20220615 you XLIU-CFDB4C |
| | | if(acc[0].Hospital__r.Salesdepartment_HP__c == '1.åå'){ |
| | | url += "&CF00N10000008rq2p_lkid={!$Label.Solution_HB}&CF00N10000008rq2p=è å¨";//00510000001OOLj |
| | |
| | | url += "&retURL=%2F{!Account.Id}&nooverride=1"; |
| | | |
| | | window.top.location.href=url; |
| | | //window.open(url); |
| | | } |
| | | foo();</url> |
| | | </WebLink> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <WebLink xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>insertFrameNumManag</fullName> |
| | | <availability>online</availability> |
| | | <displayType>button</displayType> |
| | | <linkType>javascript</linkType> |
| | | <masterLabel>å
³èæ°æ®</masterLabel> |
| | | <openType>onClickJavaScript</openType> |
| | | <protected>false</protected> |
| | | <url>{!RequireScript("/soap/ajax/51.0/connection.js")} |
| | | {!RequireScript("/soap/ajax/51.0/apex.js")} |
| | | var foo = function() { |
| | | var sId = '{!Statu_Achievements_DN__c.Id}'; |
| | | try { |
| | | var rtn = sforce.apex.execute("SetFrameNumManageWebService", "insertFrameNumManag", {Id: sId}); |
| | | if (rtn == '1') { |
| | | alert('æ´æ°æ°æ®ä¸ï¼è¯·çå¾
æ§è¡å®æ¯ã'); |
| | | } else { |
| | | alert(rtn); |
| | | } |
| | | } catch(e) { |
| | | if (e.faultcode == 'sf:INSUFFICIENT_ACCESS') { |
| | | alert('æ²¡ææ§è¡æéã'); |
| | | } else { |
| | | alert(e); |
| | | } |
| | | } |
| | | window.location.reload(); |
| | | }; |
| | | foo();</url> |
| | | </WebLink> |
| | |
| | | <label>15.å»çæ³è§äºå¡åè´¨éç®¡çæ¬é¨</label> |
| | | </value> |
| | | <value> |
| | | <fullName>16.æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨</fullName> |
| | | <fullName>16.Solutionæ¬é¨</fullName> |
| | | <default>false</default> |
| | | <label>16.Solutionæ¬é¨</label> |
| | | </value> |
| | |
| | | <label>12.è½éäºä¸æ¬é¨</label> |
| | | </value> |
| | | <value> |
| | | <fullName>16.æ¶å·å¼å¸é¢åè§£å³æ¹æ¡æ¬é¨</fullName> |
| | | <fullName>16.Solutionæ¬é¨</fullName> |
| | | <default>false</default> |
| | | <label>16.Solutionæ¬é¨</label> |
| | | </value> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>agencyAccOrSAPConfirmDate__c</fullName> |
| | | <description>2023-02-16确认é»è¾ å
¨é¨éªæ¶ä¸è¥ä¸ç®¡çé¨å®¡æ¹éè¿åï¼æ¾ç¤ºç¾æ¶æ¥æå¹¶åéSAP</description> |
| | | <externalId>false</externalId> |
| | | <formula>if (Text(agencyAutoSignUpStatus__c) == 'å·²æ¹å', |
| | | if (agencyAcceptResultSignUp__c = 'å
¨é¨éªæ¶' || isblank(agencyConfirmDate__c), agencySignUpDate__c, agencyConfirmDate__c), null)</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <formula>if ( |
| | | AND(Text(agencyAutoSignUpStatus__c) == 'å·²æ¹å',agencyAcceptResult__c = 'å
¨é¨éªæ¶'), |
| | | agencySignUpDate__c, |
| | | null |
| | | )</formula> |
| | | <label>æ¥è¡¨ç¨-ç»éåç¾æ¶ç¡®è®¤æ¥æ</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>hpAccOrSAPConfirmDate__c</fullName> |
| | | <description>2023-02-16确认é»è¾ å
¨é¨éªæ¶ä¸è¥ä¸ç®¡çé¨å®¡æ¹éè¿åï¼æ¾ç¤ºç¾æ¶æ¥æå¹¶åéSAP</description> |
| | | <externalId>false</externalId> |
| | | <formula>if (Text(HPSignUpStatus__c) == 'å·²æ¹å', |
| | | if(HPAcceptResult__c = 'å
¨é¨éªæ¶' || isblank(HPConfirmDate__c),HPSignUpDate__c,HPConfirmDate__c), null)</formula> |
| | | <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs> |
| | | <formula>if ( |
| | | AND(Text(HPSignUpStatus__c) == 'å·²æ¹å',HPAcceptResult__c = 'å
¨é¨éªæ¶'), |
| | | HPSignUpDate__c, |
| | | null |
| | | )</formula> |
| | | <label>æ¥è¡¨ç¨-å»é¢ç¾æ¶ç¡®è®¤æ¥æ</label> |
| | | <required>false</required> |
| | | <trackHistory>false</trackHistory> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ListView xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>View_Agency_machi</fullName> |
| | | <columns>NAME</columns> |
| | | <columns>OCM_man_province_cus__c</columns> |
| | | <columns>Statu_Achievements__c</columns> |
| | | <columns>DNName__c</columns> |
| | | <columns>Agency1_Name_F__c</columns> |
| | | <columns>AgencyNum__c</columns> |
| | | <columns>agencyDNSignUpStatus__c</columns> |
| | | <columns>CREATED_DATE</columns> |
| | | <filterScope>Everything</filterScope> |
| | | <filters> |
| | | <field>agencyDNSignUpStatus__c</field> |
| | | <operation>equals</operation> |
| | | <value>æªç¾æ¶</value> |
| | | </filters> |
| | | <filters> |
| | | <field>skip_Distribution_Sign__c</field> |
| | | <operation>equals</operation> |
| | | <value>0</value> |
| | | </filters> |
| | | <label>ç»éåå¾
ç¾æ¶ç订å</label> |
| | | <language>zh_CN</language> |
| | | </ListView> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <WebLink xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <fullName>insertFrameNumManag</fullName> |
| | | <availability>online</availability> |
| | | <displayType>button</displayType> |
| | | <linkType>javascript</linkType> |
| | | <masterLabel>å
³èè¿å£åè¯</masterLabel> |
| | | <openType>onClickJavaScript</openType> |
| | | <protected>false</protected> |
| | | <url>{!RequireScript("/soap/ajax/51.0/connection.js")} |
| | | {!RequireScript("/soap/ajax/51.0/apex.js")} |
| | | var foo = function() { |
| | | var sId = '{!eSignForm__c.Statu_Achievements_DNId__c}'; |
| | | var esId = '{!eSignForm__c.Id}'; |
| | | try { |
| | | var rtn = sforce.apex.execute("SetFrameNumManageWebService", "insertFrameNumManag", {"Id": sId,"esId":esId}); |
| | | if (rtn == '1') { |
| | | alert('æ´æ°æ°æ®ä¸ï¼è¯·çå¾
æ§è¡å®æ¯ã'); |
| | | } else { |
| | | alert(rtn); |
| | | } |
| | | } catch(e) { |
| | | if (e.faultcode == 'sf:INSUFFICIENT_ACCESS') { |
| | | alert('æ²¡ææ§è¡æéã'); |
| | | } else { |
| | | alert(e); |
| | | } |
| | | } |
| | | window.location.reload(); |
| | | }; |
| | | foo();</url> |
| | | </WebLink> |
| | |
| | | <apex:outputPanel > |
| | | <apex:outputText value="å
³é®å" style="width:50px"/> |
| | | <apex:inputText value="{!keyword}" style="width:200px;margin-left: 50px;"/> |
| | | <!-- lightingå级 20230209 lt å
³é®åææ¬æ¡é®é¢ 廿 margin-left: 50px; --> |
| | | </apex:outputPanel> |
| | | <apex:commandButton value="æ£ç´¢" action="{!searchOpp}" onclick="blockme();" rerender="allForm" oncomplete="unblockUI();" /> |
| | | </apex:pageBlockSectionItem> |
| | |
| | | <td width="200px"> |
| | | <apex:outputLabel for="bieCunFangDi" value="å¤ååæ¾å°" /> |
| | | <!-- <apex:outputText value="{!bieCunFangDi}"/> --> |
| | | <!-- lightingå级 20230209 lt å¤ååæ¾å°ææ¬æ¡é®é¢ 廿 margin-left: 20px; --> |
| | | <apex:selectList value="{!bieCunFangDi}" size="1" style="margin-left: 20px; width:110px" id="bieCunFangDi"> |
| | | <apex:selectOptions value="{!bieCunFangDiOps}"/> |
| | | <!-- #OLY_OCM-659 å¤ååæ¾å° é项ååæ¶ï¼æ¬é¨ é项å¼éä¹åçåå --> |
| | |
| | | <apex:page controller="AccountTargetTabController" showChat="false" showHeader="false" sidebar="false" action="{!init}" id="Page" lightningStylesheets="true"> |
| | | <apex:page controller="AccountTargetTabController" showChat="false" showHeader="false" sidebar="false" action="{!init}" id="Page"> |
| | | <title>ç®æ æ°</title> |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | |
| | | <td ></td> |
| | | </tr> |
| | | </apex:repeat> |
| | | <tr> |
| | | <td style="height:20px;"></td> |
| | | <td ></td> |
| | | </tr> |
| | | <tr> |
| | | <td style="height:20px;"></td> |
| | | <td ></td> |
| | | </tr> |
| | | <!-- 2022/01/07 ssm å·¦ä¾§ç©ºè¡ end --> |
| | | <tr> |
| | | <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.TargetCustomerModifier__c.label}</td> |
| | |
| | | </tr> |
| | | <!-- 2022/01/07 ssm å³ä¾§æåçå°æ¹ææ2è¡ ä¸ä¹åçææä¿æä¸è´ start --> |
| | | <tr> |
| | | <td style="height:20px;"></td> |
| | | <td style=""></td> |
| | | <!--<td style="height:20px;"></td> |
| | | <td style=""></td>--> |
| | | <!--20230224 you start DB202302339407--> |
| | | <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.LostPricesqt__c.label}</td> |
| | | <td style="text-align: center;"> |
| | | <apex:outputField value="{!history.rec.LostPricesqt__c}" style="width:90%; text-align: right;" /> |
| | | </td> |
| | | <td>{!$ObjectType.Account_Number_of_target__c.fields.AllHostsNumber_first__c.label}</td> |
| | | <td style="text-align: center;"> |
| | | <apex:outputField value="{!history.rec.AllHostsNumber_first__c}" style="width:90%; text-align: right;" /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <!--<td style="height:20px;"></td> |
| | | <td style=""></td>--> |
| | | <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.Dealer_Final_Priceqt__c.label}</td> |
| | | <td style="text-align: center;"> |
| | | <apex:outputField value="{!history.rec.Dealer_Final_Priceqt__c}" style="width:90%; text-align: right;" /> |
| | | </td> |
| | | <td style="height:20px;"></td> |
| | | <td style=""></td> |
| | | </tr> |
| | | <tr> |
| | | <!--<td style="height:20px;"></td> |
| | | <td style=""></td>--> |
| | | <td style="height:20px;">{!$ObjectType.Account_Number_of_target__c.fields.HospitalTransactionAmountqt__c.label}</td> |
| | | <td style="text-align: center;"> |
| | | <apex:outputField value="{!history.rec.HospitalTransactionAmountqt__c}" style="width:90%; text-align: right;" /> |
| | | </td> |
| | | <td style="height:20px;"></td> |
| | | <td style=""></td> |
| | | </tr> |
| | | <!--20230224 you end DB202302339407--> |
| | | <!-- 2022/01/07 ssm å³ä¾§è¡¥ç©ºè¡ start --> |
| | | <apex:repeat value="{!history.emptyLineRight}" var="elr" id="elr_repeat"> |
| | | <tr> |
| | |
| | | } |
| | | div#in_Div_L td.dataCellBorder1 { |
| | | border-width: 1px; |
| | | border-left: 1px solid rgb(229, 229, 229); |
| | | } |
| | | div#in_Div_R td.dataCellBorder1 { |
| | | border-width: 1px; |
| | |
| | | <script type="text/javascript"> |
| | | |
| | | // 2022/02/15 å¼ å建 æ¹é PI start |
| | | //zhj 2022-02-04 æ°æ¹æ¡æ¹é start |
| | | var accountId = '{!accountIdV2}' |
| | | var accountName = ''; |
| | | var dataIdManageCodeMap = {}; |
| | | var staticResourcesV2 = JSON.parse('{!staticResourceContactV2}'); |
| | | //zhj 2022-02-04 æ°æ¹æ¡æ¹é end |
| | | var staticResources = JSON.parse('{!staticResource}'); |
| | | var contactAWSIds = JSON.parse('{!contactAWSIds}'); |
| | | var LastName = ''; |
| | |
| | | } |
| | | |
| | | function editSaveJs() { |
| | | hiddenErrorMsgNode(); //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-24 |
| | | |
| | | document.getElementById("errorMsg").innerHTML = ''; |
| | | if(!document.getElementById("Page:allForm:editBlock:Search_LastName__c").value){ |
| | |
| | | return null; |
| | | } |
| | | function ProcessPI(sobjJson, payloadForNewPI) { |
| | | //blockme(); |
| | | let url = staticResources.newUrl |
| | | if (now_edit_id) { |
| | | url = staticResources.updateUrl |
| | | } |
| | | AWSService.post(url, payloadForNewPI, function(result){ |
| | | aws_result = result; |
| | | SetEditObj(); |
| | | saveNew(); |
| | | }, staticResources.token); |
| | | // //blockme(); |
| | | // //zhj 2022-02-04 æ°æ¹æ¡æ¹é start |
| | | // // let url = staticResources.newUrl |
| | | // // if (now_edit_id) { |
| | | // // url = staticResources.updateUrl |
| | | // // } |
| | | // let url = staticResourcesV2.newUrl |
| | | // if (now_edit_id) { |
| | | // url = staticResourcesV2.updateUrl |
| | | // } |
| | | // //zhj 2022-02-04 æ°æ¹æ¡æ¹é end |
| | | // AWSService.post(url, payloadForNewPI, function(result){ |
| | | // aws_result = result; |
| | | // //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-24 start |
| | | // if(r.status == '129'){ |
| | | // alertErrorMessage('å®¢æ· [ '+accountName+ ' ],å·²åå¨ç¸åååçè系人 人å管çç¼ç ['+dataIdManageCodeMap[r.object[0].dataId]+' ] ï¼ä¸è½éå¤å建ï¼è¯·äºè§£'); |
| | | // unblockUI(); |
| | | // return |
| | | // } |
| | | // if(r.status == '130'){ |
| | | // if(r.object[0] && r.object[0].sfRecordId != null && r.object[0].sfRecordId != '') |
| | | // alertErrorMessage('å·²æ¾å°éå¤å¼ï¼ UniqueNumber__c ä¸è®°å½å¼éå¤ï¼ID 为: '+r.object[0].sfRecordId+'客æ·äººåä¿¡æ¯'); |
| | | // else |
| | | // alertErrorMessage('æ°æ®ä¸åå¨éå¤ççµè¯å·ç '); |
| | | // unblockUI(); |
| | | // return |
| | | // } |
| | | // //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-24 end |
| | | // SetEditObj(); |
| | | // saveNew(); |
| | | // }, staticResources.token); |
| | | } |
| | | |
| | | function Trans(){ |
| | |
| | | } |
| | | |
| | | function GetEditObj(){ |
| | | return JSON.stringify([{ |
| | | //zhj 2022-02-04 æ°æ¹æ¡æ¹é start |
| | | Visualforce.remoting.Manager.invokeAction( |
| | | 'CM_SearchContactServiceController.searchContactByAccountId', |
| | | accountId, |
| | | function (result, event) { |
| | | if(result.status == 'fail'){ |
| | | alertErrorMessage(result.message); |
| | | return |
| | | } |
| | | console.log('result = ' + JSON.stringify(result)); |
| | | accountName = result.accountName; |
| | | dataIdManageCodeMap = result.dataIdManageCodeMap; |
| | | var contactList = ''; |
| | | for(var i = 0; i<result.contactList.length; i++){ |
| | | if(result.contactList[i].AWS_Data_Id__c) |
| | | contactList += ',' + result.contactList[i].AWS_Data_Id__c; |
| | | } |
| | | contactList = contactList.substring(1); |
| | | var payloadForNewPI = JSON.stringify([{ |
| | | lastName : document.getElementById("Page:allForm:editBlock:Search_LastName__c").value, |
| | | //phone : document.getElementById("Page:allForm:editBlock:Phone").value, |
| | | mobilePhone : '', |
| | | dataId:document.getElementById("Page:allForm:editBlock:AWS_Data_Id__c").value, |
| | | contactIds : contactList, |
| | | isMobileVerif : result.isMobileVerif, |
| | | isNameMobileVerif : result.isNameMobileVerif |
| | | }]); |
| | | console.log('payloadForNewPI = ' + JSON.stringify(payloadForNewPI)); |
| | | debugger |
| | | let url = staticResourcesV2.newUrl |
| | | if (now_edit_id) { |
| | | url = staticResourcesV2.updateUrl |
| | | } |
| | | //zhj 2022-02-04 æ°æ¹æ¡æ¹é end |
| | | AWSService.post(url, payloadForNewPI, function(result){ |
| | | aws_result = result; |
| | | //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-24 start |
| | | if(result.status == '129'){ |
| | | alertErrorMessage('å®¢æ· [ '+accountName+ ' ],å·²åå¨ç¸åååçè系人 人å管çç¼ç ['+dataIdManageCodeMap[result.object[0].dataId]+' ] ï¼ä¸è½éå¤å建ï¼è¯·äºè§£'); |
| | | unblockUI(); |
| | | return |
| | | } |
| | | if(result.status == '130'){ |
| | | if(result.object[0] && result.object[0].sfRecordId != null && result.object[0].sfRecordId != '') |
| | | alertErrorMessage('å·²æ¾å°éå¤å¼ï¼ UniqueNumber__c ä¸è®°å½å¼éå¤ï¼ID 为: '+result.object[0].sfRecordId+'客æ·äººåä¿¡æ¯'); |
| | | else |
| | | alertErrorMessage('æ°æ®ä¸åå¨éå¤ççµè¯å·ç '); |
| | | unblockUI(); |
| | | return |
| | | } |
| | | //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-24 end |
| | | SetEditObj(); |
| | | saveNew(); |
| | | }, staticResources.token); |
| | | }); |
| | | //zhj 2022-02-04 æ°æ¹æ¡æ¹é end |
| | | } |
| | | |
| | | function SetEditObj(){ |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-24 start |
| | | function alertErrorMessage(errorMsg) { |
| | | let errorMsgNode = document.getElementById("Page:allForm:editBlock:msgContent"); |
| | | errorMsg = 'éè¯¯ï¼æ ææ°æ®ã' + '\n' + errorMsg; |
| | | errorMsgNode.innerText = errorMsg; |
| | | errorMsgNode.className = 'pbError'; |
| | | } |
| | | function hiddenErrorMsgNode() { |
| | | let errorMsgNode = document.getElementById("Page:allForm:editBlock:msgContent"); |
| | | errorMsgNode.innerText = ''; |
| | | errorMsgNode.className = ''; |
| | | } |
| | | //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-24 end |
| | | // 2022å¹´2æ15æ¥ PIæ¹é å¾äº® end |
| | | |
| | | </script> |
| | |
| | | </apex:actionFunction> |
| | | <apex:actionFunction name="saveNew" action="{!saveNew}" rerender="allForm,allPanel,sfContactId" onComplete="Trans();"> |
| | | </apex:actionFunction> |
| | | <apex:actionFunction name="editClear" action="{!editClear}" rerender="allForm,allPanel,sfContactId" onComplete="unblockUI();"> |
| | | <apex:actionFunction name="editClear" action="{!editClear}" rerender="allForm,allPanel,sfContactId" onComplete="unblockUI();searchContactAll()"> |
| | | </apex:actionFunction> |
| | | <!-- 2022/02/15 å¼ å建 æ¸
空LineInfoList start --> |
| | | <apex:actionFunction name="clearLineInfoList" action="{!clearLineInfoList}" rerender="allForm" onComplete="unblockUI();"> |
| | |
| | | <apex:commandButton onclick="editClearJs();" value="æ¸
空" rerender="dummy"/> |
| | | <apex:commandButton onclick="editSaveJs();" value="ä¿å" rerender="dummy"/> |
| | | </apex:pageBlockButtons> |
| | | <!-- Error Msg--> |
| | | <div style="text-align: center;"> |
| | | <apex:outputPanel id="errorMsg"> |
| | | <apex:pageMessages id="msgContent" escape="false" /> |
| | | </apex:outputPanel> |
| | | </div> |
| | | <!-- zhj æ°æ¹æ¡æ¹é 2022-12-05 start--> |
| | | <!-- <apex:inputHidden id="LastName_Encrypted__c" value="{!newCon.LastName_Encrypted__c}"/> |
| | | <apex:inputHidden id="Phone_Encrypted__c" value="{!newCon.Phone_Encrypted__c}"/> --> |
| | |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/> |
| | | |
| | | <apex:stylesheet value="{!URLFOR($Resource.ConsumEquipmentSetReturnCss)}"/> |
| | | |
| | | <style type="text/css"> |
| | | div#out_Div_L { |
| | | position:relative; |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexPage xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>44.0</apiVersion> |
| | | <availableInTouch>false</availableInTouch> |
| | | <availableInTouch>true</availableInTouch> |
| | | <confirmationTokenRequired>false</confirmationTokenRequired> |
| | | <label>ConsumTrialDis</label> |
| | | </ApexPage> |
| | |
| | | </script> |
| | | <style type="text/css"> |
| | | .bPageBlock .detailList .dataCol { |
| | | width: 15%; |
| | | width: 15%!important; |
| | | } |
| | | </style> |
| | | <head> |
| | |
| | | <apex:pageBlockSection columns="3" collapsible="false" title="æ¢å¤ºæå®åé
ç»é¢" rendered="{!targetId!=''}" > |
| | | <apex:outputField value="{!raesd.Fixture_Model_No_text__c}" /> |
| | | <apex:outputField value="{!raesd.Asset__c}" /> |
| | | <apex:outputField label="åç³è¯·åå·" value="{!raesd.Rental_Apply__r.Name}" /> |
| | | <apex:outputField label="åç³è¯·åå·" value="{!raesd.Rental_Apply_Object__r.Name}" /> |
| | | </apex:pageBlockSection> |
| | | |
| | | <div style="padding-left: 70px;margin: 10px;"> |
| | |
| | | <apex:column headerValue="éæ©"> |
| | | <apex:inputCheckbox value="{!rased.selected}"/> |
| | | </apex:column> |
| | | <apex:column value="{!rased.detail.Rental_Apply__r.Name}" ></apex:column> |
| | | <apex:column value="{!rased.detail.Rental_Apply_Object__r.Name}" ></apex:column> |
| | | <apex:column value="{!rased.detail.Rental_Apply_Equipment_Set__r.Name}"></apex:column> |
| | | <apex:column value="{!rased.detail.Queue_Day__c}"></apex:column> |
| | | <apex:column value="{!rased.detail.Queue_Number__c}"></apex:column> |
| | | <apex:column value="{!rased.detail.Rental_Apply__r.WorkPlace__c}"></apex:column> |
| | | <apex:column value="{!rased.detail.Rental_Apply__r.Person_In_Charge__r.Name}"></apex:column> |
| | | <apex:column value="{!rased.detail.Rental_Apply__r.demo_purpose2__c}"></apex:column> |
| | | <apex:column value="{!rased.detail.Rental_Apply_Object__r.WorkPlace__c}"></apex:column> |
| | | <apex:column value="{!rased.detail.Rental_Apply_Object__r.Person_In_Charge__r.Name}"></apex:column> |
| | | <apex:column value="{!rased.detail.Rental_Apply_Object__r.demo_purpose2__c}"></apex:column> |
| | | <apex:column value="{!rased.detail.Allow_Adjust_Queue_Flag__c}"></apex:column> |
| | | <apex:column value="{!rased.detail.jumpReason__c}"></apex:column> |
| | | <apex:column value="{!rased.detail.Queue_Conment__c}"></apex:column> |
| | |
| | | blockHeight = j$(window).innerHeight() - j$(escapeVfId('allPage:allForm:searchBlock')).height() - j$(escapeVfId('allPage:allForm:dataBlock:pageBlockButton1')).height() - j$('table#msgtable').height() - heightAjustment; |
| | | sbwidth = scrollbarWidth(); |
| | | R_width = j$(escapeVfId('allPage:allForm:dataBlock')).width(); |
| | | blockWidth = 745; |
| | | blockWidth = 745; //2023-02-24 zyh 注é |
| | | // blockWidth = 1075; //2023-02-24 zyh add |
| | | j$(escapeVfId('allPage:allForm:dataBlock')).css('height', blockHeight + 78 + 'px'); |
| | | j$('div#in_Div_L').css('width', blockWidth+170 + 'px'); |
| | | j$('div#out_Div_L').css('width', blockWidth+170 + 'px'); |
| | |
| | | <td style="width:110px" align="center"> |
| | | <a href="#" onclick="sortTableJs('0');return false;" style="text-decoration: underline;">{!$ObjectType.Rental_Apply__c.fields.Name.label}</a>ã{!sortOrder[0]} |
| | | </td> |
| | | <td style="width:60px" align="center"> |
| | | <a href="#" onclick="sortTableJs('1');return false;" style="text-decoration: underline;">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.RAES_Status__c.label}</a>ã{!sortOrder[1]} |
| | | </td> |
| | | <!-- å¤ååºåæ
å½ --> |
| | | <td style="width:110px" align="center">{!$ObjectType.Rental_Apply__c.fields.Person_In_Charge__c.label}</td> |
| | | <!-- å»é¢å --> |
| | | <td style="width:100px" align="center"> |
| | | <a href="#" onclick="sortTableJs('4');return false;" style="text-decoration: underline;">{!$ObjectType.Account.fields.Hospital_Name__c.label}</a>ã{!sortOrder[4]} |
| | | </td> |
| | | <td style="width:110px" align="center">{!$ObjectType.Fixture_Set__c.fields.Name.label}</td> |
| | | <td style="width:100px" align="center"> |
| | | <a href="#" onclick="sortTableJs('3');return false;" style="text-decoration: underline;">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.First_RAESD_Model_No_F__c.label}</a>ã{!sortOrder[3]} |
| | | </td> |
| | | |
| | | <td style="width:85px" align="center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.SerialNumber_F__c.label}</td> |
| | | <td style="width:85px" align="center">è®°å½ç±»å</td> |
| | | <!-- 2023-02-24 zyh add start --> |
| | | <td style="width:110px" align="center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Final_reply_day__c.label}</td> |
| | | <td style="width:110px" align="center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.RC_return_to_office__c.label}</td> |
| | | <td style="width:110px" align="center">{!$ObjectType.Rental_Apply__c.fields.Cross_Region_AssignYN__c.label}</td> |
| | | <!-- 2023-02-24 zyh add end --> |
| | | <td style="width:60px" align="center"> |
| | | <a href="#" onclick="sortTableJs('1');return false;" style="text-decoration: underline;">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.RAES_Status__c.label}</a>ã{!sortOrder[1]} |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <div id="out_Div_R" > |
| | | <table class="list" border="1" style="border-collapse: collapse;table-layout:fixed;border-bottom-width: 0px;border-spacing:0;width:660px;" id="table_out_Div_R"> |
| | | <tr style="background-color:#DCDCDC;" class="headerRow"> |
| | | |
| | | <!-- 2023-02-27 zyh add è°æ´é¡ºåº start --> |
| | | <!-- å¤ååºåæ
å½ --> |
| | | <td style="width:110px" align="center">{!$ObjectType.Rental_Apply__c.fields.Person_In_Charge__c.label}</td> |
| | | <td style="width:110px" align="center">{!$ObjectType.Fixture_Set__c.fields.Name.label}</td> |
| | | <td style="width:85px" align="center">è®°å½ç±»å</td> |
| | | <!-- 2023-02-27 zyh add è°æ´é¡ºåº end --> |
| | | <td style="width:85px" align="center"> |
| | | <a href="#" onclick="sortTableJs('6');return false;" style="text-decoration: underline;">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Demo_purpose1__c.label}</a>ã{!sortOrder[6]} |
| | | </td> |
| | |
| | | <td style="width:120px" align="center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Received_Confirm__c.label}</td> |
| | | <td style="width:140px" align="center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Received_ng_detail__c.label}</td> |
| | | |
| | | <td style="width:80px" align="center"> |
| | | <!-- <td style="width:80px" align="center"> |
| | | <a href="#" onclick="sortTableJs('5');return false;" style="text-decoration: underline;">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Final_reply_day__c.label}</a>ã{!sortOrder[5]} |
| | | </td> |
| | | </td> --><!-- 2023-02-24 zyh 注é --> |
| | | <td style="width:80px" align="center">{!$ObjectType.Rental_Apply_Equipment_Set__c.fields.Bollow_Date__c.label}</td> |
| | | <td style="width:80px" align="center">è¿è§çç±</td> |
| | | <!-- *************************Delete 20160602 No.153 è¶å¾³è³ Start************************* --> |
| | |
| | | <td class="dataCellBorder1" style="width:20px" align="center"><apex:inputCheckbox value="{!info.check}" id="rowCheck" disabled="{!!info.canChange}"/><apex:inputHidden id="canChange" value="{!info.canChange}"/></td> |
| | | <td class="dataCellBorder1 td{!info.status}" style="width:110px;" align="left"><apex:outputField value="{!info.raes.Rental_Apply__c}"/></td> |
| | | |
| | | <td class="dataCellBorder1" style="width:60px" align="left"><apex:outputField value="{!info.raes.RAES_Status__c}"/></td> |
| | | <td class="dataCellBorder1" align="left" style="width:110px"><apex:outputText value="{!info.rentalPerson}"/></td> |
| | | <td class="dataCellBorder1" align="left" style="width:100px"><apex:outputText value="{!info.hpName}"/></td> |
| | | <td class="dataCellBorder1" style="width:110px" align="left"><apex:outputField value="{!info.raes.Fixture_Set__c}"/></td> |
| | | |
| | | <td class="dataCellBorder1" style="width:100px" align="left"><apex:outputText value="{!info.esCode}"/></td> |
| | | <td class="dataCellBorder1" style="width:85px" align="left"><apex:outputText value="{!info.serialNumber}"/></td> |
| | | <td class="dataCellBorder1" style="width:85px" align="left"><apex:outputText value="{!info.recordTypeName}"/></td> |
| | | <!-- 2023-02-24 zyh add start --> |
| | | <td class="dataCellBorder1" style="width:110px;" align="left"><apex:outputField value="{!info.raes.Final_reply_day__c}"/></td> |
| | | <td class="dataCellBorder1" style="width:110px;" align="left"><apex:outputField value="{!info.raes.RC_return_to_office__c}"/></td> |
| | | <td class="dataCellBorder1" style="width:110px;" align="left"><apex:outputField value="{!info.raes.Rental_Apply__r.Cross_Region_AssignYN__c}"/></td> |
| | | <!-- 2023-02-24 zyh add end --> |
| | | <td class="dataCellBorder1" style="width:60px" align="left"><apex:outputField value="{!info.raes.RAES_Status__c}"/></td> |
| | | </tr> |
| | | <apex:variable value="{!Cnt+1}" var="Cnt" /> |
| | | </apex:repeat> |
| | |
| | | <apex:variable value="{!0}" var="Cnt_R" /> |
| | | <apex:repeat id="dataline_R" value="{!raesInfoListList[currPage-1]}" var="info"> |
| | | <tr id="tableData_R_{!Cnt_R}" class="dataRow" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}" > |
| | | <!-- 2023-02-27 zyh add è°æ´é¡ºåº start --> |
| | | |
| | | <td class="dataCellBorder1" align="left" style="width:110px"><apex:outputText value="{!info.rentalPerson}"/></td> |
| | | |
| | | <td class="dataCellBorder1" style="width:110px" align="left"><apex:outputField value="{!info.raes.Fixture_Set__c}"/></td> |
| | | <td class="dataCellBorder1" style="width:85px" align="left"><apex:outputText value="{!info.recordTypeName}"/></td> |
| | | <!-- 2023-02-27 zyh add è°æ´é¡ºåº end --> |
| | | <td class="dataCellBorder1" style="width:85px" align="left"><apex:outputField value="{!info.raes.Demo_purpose1__c}"/></td> |
| | | <td class="dataCellBorder1" style="width:90px" align="left"><apex:outputField value="{!info.raes.Demo_purpose2__c}"/></td> |
| | | <td class="dataCellBorder1" style="width:100px" align="left"><apex:outputText value="{!info.esName}"/></td> |
| | |
| | | <!-- <apex:inputField value="{!info.raes.Received_ng_detail__c}" style="width:95%"/> --> |
| | | </td> |
| | | |
| | | <td class="dataCellBorder1" style="width:80px" align="left"><apex:outputField value="{!info.raes.Final_reply_day__c}"/></td> |
| | | <!-- <td class="dataCellBorder1" style="width:80px" align="left"><apex:outputField value="{!info.raes.Final_reply_day__c}"/></td> --><!-- 2023-02-24 zyh 注é --> |
| | | <td class="dataCellBorder1" style="width:80px" align="left"><apex:outputField value="{!info.raes.Bollow_Date__c}"/></td> |
| | | <td class="dataCellBorder1" style="width:80px" align="left"><apex:outputText value="{!info.FoulReasonStr}"/></td> |
| | | <!-- *************************Delete 20160602 No.153 è¶å¾³è³ Start************************* --> |
| | |
| | | </apex:outputPanel> |
| | | </td> |
| | | </apex:repeat> |
| | | <td align="center"><apex:inputCheckbox value="{!info.haveConfirm_Lost_Date}" disabled="{!info.lrdApprovaled}" id="rowCheck1"/></td> |
| | | <!-- <td align="center"><apex:inputCheckbox value="{!info.haveConfirm_Lost_Date}" disabled="{!info.lrdApprovaled}" id="rowCheck1"/></td> --> |
| | | </tr> |
| | | </apex:repeat> |
| | | </table> |
| | |
| | | list-style-type: none; |
| | | padding: 0; |
| | | height: 25px; |
| | | /* lightingå级 20230209 lt â䏿¶ââåºåºæ£æµâæéå é®é¢ 廿 height: 35px; */ |
| | | border-bottom: 5px solid #3b5998; |
| | | } |
| | | #Step_tab li { |
| | |
| | | <br/> |
| | | <apex:variable var="SetName" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}" /> |
| | | <apex:variable var="applychange" value="{!1}" /> |
| | | <input type="hidden" value="{!esdInfo.rec.Rental_Apply__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.Rental_Apply__c}"/> |
| | | <!-- 20230220 ljh uat ä¸´æ¶æ³¨é <input type="hidden" value="{!esdInfo.rec.Rental_Apply_Object__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.Rental_Apply__c}"/> --> |
| | | </apex:outputPanel> |
| | | |
| | | <apex:outputPanel layout="none" rendered="{!IF(SetName2=esdInfo.rec.Rental_Apply_Equipment_Set__r.Id, false, true)}"> |
| | |
| | | <apex:outputPanel layout="none" rendered="{!IF(indexloop == 1, true, false)}"> |
| | | <h2 style="padding: 5px;" class="detailtab">{!esdInfo.rec.Rental_Apply_Equipment_Set__r.Rental_Apply__r.Name}</h2> |
| | | <br/> |
| | | <input type="hidden" value="{!esdInfo.rec.Rental_Apply__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.Rental_Apply__c}"/> |
| | | <!-- 20230220 ljh uat ä¸´æ¶æ³¨é <input type="hidden" value="{!esdInfo.rec.Rental_Apply__r.Pre_inspection_ng_num__c}" data-ngnum="{!esdInfo.rec.Rental_Apply__c}"/> --> |
| | | <apex:outputPanel layout="none" rendered="{!IF(esdInfo.rec.Rental_Apply_Equipment_Set__r.Inspection_not_finish__c > 0, false, true)}"> |
| | | <apex:inputCheckbox value="{!esdInfo.isChecked}"/><input type="hidden" value="{!esdInfo.rec.Rental_Apply_Equipment_Set__c}"/><input type="hidden" value="{!esdInfo.rec.Rental_Apply__c}"/> |
| | | </apex:outputPanel> |
| | |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.instascan)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.connection20)}"/> |
| | | <apex:stylesheet value="{!URLFOR($Resource.EquipmentSetShippmentReceivedcss)}"/> |
| | | <apex:stylesheet value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.css')}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.js')}"/> |
| | | |
| | | <script type="text/javascript"> |
| | | var Session_ID = '{!$Api.Session_ID}'; |
| | | function getQueryVariable(variable) |
| | | { |
| | | var query = window.location.search.substring(1); |
| | |
| | | }) |
| | | } |
| | | } |
| | | |
| | | function OpenRentalApplyFault(faultReportFlag, radetailId, radetailName, personId, personName, purpose2, name, hospitalId, hospitalName, serialNumber, fixtureNo, workPlace, deptCategory){ |
| | | if(faultReportFlag == 'ä¸å卿
鿥åå'){ |
| | | window.open("/a5F/e?Name=*" + "&CF00N9D000007hkLN_lKid=" + radetailId + "&CF00N9D000007hkLN=" + radetailName + "&CF00N9D000007jemP_lKid=" + personId + "&CF00N9D000007jemP=" + personName + "&00N9D000007jrE6=" + purpose2 + "&00N9D000007ijyA=" + name + "&CF00N9D000007jrEG_lKid=" + hospitalId + "&CF00N9D000007jrEG=" + hospitalName + "&00N9D000007jrEL=" + serialNumber + "&00N9D000007jrEQ=" + fixtureNo + "&00N9D000007jrEV=" + workPlace + "&00N9D000007jrJW=" + deptCategory); |
| | | }else{ |
| | | // if(confirm('æ¯å¦æå¼æå建æ°çæ£æµåææ¥åï¼')){ |
| | | // if (faultReportFlag == 'å卿
鿥åå'){ |
| | | // window.open("/a5C/e?Name=*" + "&CF00N9D000007hkLN_lKid=" + radetailId + "&CF00N9D000007hkLN=" + radetailName + "&CF00N9D000007jemP_lKid=" + personId + "&CF00N9D000007jemP=" + personName + "&00N9D000007jrE6=" + purpose2 + "&00N9D000007ijyA=" + name + "&CF00N9D000007jrEG_lKid=" + hospitalId + "&CF00N9D000007jrEG=" + hospitalName + "&00N9D000007jrEL=" + serialNumber + "&00N9D000007jrEQ=" + fixtureNo + "&00N9D000007jrEV=" + workPlace + "&00N9D000007jrJW=" + deptCategory); |
| | | // }else{ |
| | | // window.open("/" + faultReportFlag); |
| | | // } |
| | | // } |
| | | |
| | | if(confirm('å·²å卿£æµåææ¥å')){ |
| | | window.open("/" + faultReportFlag); |
| | | } |
| | | } |
| | | } |
| | | |
| | | function filljs1() { |
| | | j$("select[name$='inspectionResult']").val("OK"); |
| | | j$("select[name$='inspectionResultNg']").prop("selectedIndex", 0); |
| | |
| | | <li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='ç»´ä¿®', '', 'display: none;')}" data-qr="{!esdInfo.rec.Fixture_QRCode_F__c}" > |
| | | <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_F__c.label}ï¼ </span> --> |
| | | <span>æ£æµç»æï¼ </span><span> |
| | | <apex:outputField value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" /> |
| | | <!-- <apex:outputField value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" /> --> |
| | | <output style="margin:3px;width:55px;text-align:left;margin-left:3px;margin-top:0px;float: left;">{!esdInfo.rec.Inspection_result_after__c}</output> |
| | | <apex:commandButton style="margin-top:0px;font-size: 9px !important;" onclick="OpenRentalApplyFault('{!esdInfo.faultReportFlag}', '{!esdInfo.rec.Id}', '{!esdInfo.rec.Name}','{!esdInfo.personInChargeId}','{!esdInfo.personInChargeName}','{!esdInfo.demoPurpose2}','{!esdInfo.raName}','{!esdInfo.hospitalId}','{!esdInfo.hospitalName}','{!esdInfo.rec.SerialNumber_F__c}','{!esdInfo.rec.Fixture_Model_No__c}','{!esdInfo.workPlace}','{!esdInfo.deptCategory}')" value="æ
鿥å" rerender="dummy" rendered="{!esdInfo.showFaultRepor}"/> |
| | | </span> |
| | | </li> |
| | | <li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='ç»´ä¿®', '', 'display: none;')}"> |
| | |
| | | <apex:inputField id="inspectionResult" value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" onchange="changeResultNg('{!indexloop}', 1)" /> |
| | | </apex:outputPanel> |
| | | <apex:outputPanel layout="none" rendered="{!AND(NOT(esdInfo.editable), esdInfo.rec.Inspection_result_after_NG__c!='ç»´ä¿®')}"> |
| | | <span><apex:outputField value="{!esdInfo.rec.Inspection_result_after__c}" style="margin:3px;width:75px;" /></span> |
| | | <output style="margin:3px;width:55px;text-align:left;margin-left:3px;margin-top:0px;float: left;">{!esdInfo.rec.Inspection_result_after__c}</output> |
| | | </apex:outputPanel> |
| | | <apex:commandButton style="margin-top:0px;font-size: 9px !important;" onclick="OpenRentalApplyFault('{!esdInfo.faultReportFlag}', '{!esdInfo.rec.Id}', '{!esdInfo.rec.Name}','{!esdInfo.personInChargeId}','{!esdInfo.personInChargeName}','{!esdInfo.demoPurpose2}','{!esdInfo.raName}','{!esdInfo.hospitalId}','{!esdInfo.hospitalName}','{!esdInfo.rec.SerialNumber_F__c}','{!esdInfo.rec.Fixture_Model_No__c}','{!esdInfo.workPlace}','{!esdInfo.deptCategory}')" value="æ
鿥å" rerender="dummy" rendered="{!esdInfo.showFaultRepor}"/> |
| | | </li> |
| | | <li style="{!IF(esdInfo.rec.Inspection_result_after_NG__c='ç»´ä¿®', 'display: none;', '')}"> |
| | | <!-- <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.Inspection_result_after_NG_F__c.label}ï¼ </span> --> |
| | |
| | | </li> |
| | | <li> |
| | | <span>{!$ObjectType.Rental_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}ï¼ </span> |
| | | <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span> |
| | | <!-- <span><apex:outputField value="{!esdInfo.rec.SerialNumber_F__c}" style="margin:3px;width:75px;"/></span> --> |
| | | <span><apex:outputLink value="/{!esdInfo.rec.Asset__c}" target="_blank" id="assetLink" style="margin:3px;width:140px;float: left;text-align:left;margin-left:3px;margin-top:0px;">{!esdInfo.rec.SerialNumber_F__c}</apex:outputLink></span> |
| | | </li> |
| | | <!-- </div> --> |
| | | |
| | |
| | | <apex:page controller="FixtureSetManageController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true"> |
| | | <head> |
| | | <title>å¤åé
奿ç»ç®¡ç</title> |
| | | <apex:stylesheet value="{!URLFOR($Resource.FixtureSetManagecssTwo1)}"/> |
| | | |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> |
| | | <!-- FixtureSetManageãã¼ã¸ç¨css --> |
| | | <apex:stylesheet value="{!URLFOR($Resource.FixtureSetManageCss)}"/> |
| | |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/> |
| | | |
| | | |
| | | <script type="text/javascript"> |
| | | var heightAjustment = 120; |
| | | var widthAjustment = 30; |
| | |
| | | <apex:page controller="InsReportPDFController" showHeader="false" sidebar="false" action="{!init}" applyHtmlTag="false" lightningStylesheets="true"> |
| | | <apex:page controller="InsReportPDFController" showHeader="false" sidebar="false" action="{!init}" applyHtmlTag="false"> |
| | | <html> |
| | | <apex:stylesheet value="{!URLFOR($Resource.BeforeOPDPDF)}"/> |
| | | |
| | |
| | | </table> |
| | | <table style="border: 0; border-collapse: collapse;" id="groupbyTbl"> |
| | | <tr> |
| | | <th style="text-align:right; width:50px;">è¡é¡¹ç®ï¼</th> |
| | | <th style="text-align:right; width:60px;">è¡é¡¹ç®ï¼</th> |
| | | <td style="text-align:left;"><apex:inputCheckbox id="isSalesDept" value="{!isSalesDept}" disabled="true"></apex:inputCheckbox><apex:outputLabel value="æ¬é¨" for="isSalesDept"/></td> |
| | | <td style="text-align:left;"><apex:inputCheckbox id="isArea" value="{!isArea}"></apex:inputCheckbox><apex:outputLabel value="ç" for="isArea"/></td> |
| | | <td style="text-align:left;"><apex:inputCheckbox id="isEnduser" value="{!isEnduser}"></apex:inputCheckbox><apex:outputLabel value="å»é¢" for="isEnduser"/></td> |
| | |
| | | background-color: yellow; |
| | | text-align: right; |
| | | } |
| | | td.dataCol.first.last{ |
| | | width: 100% |
| | | } |
| | | </style> |
| | | <script> |
| | | function refreshPageSizeJs() { |
| | |
| | | <apex:page standardController="Lead" extensions="NewAndEditLeadController" id="page"> |
| | | <apex:page lightningStylesheets="true" standardController="Lead" extensions="NewAndEditLeadController" id="page"> |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}" /> |
| | | <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" /> |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}" /> |
| | |
| | | <script> |
| | | AWSService.sfSessionId = '{!GETSESSIONID()}'; |
| | | var staticResources = JSON.parse('{!staticResource}'); |
| | | //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-29 start |
| | | var staticResourcesV2 = JSON.parse('{!staticResourceV2}'); |
| | | //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-29 end |
| | | var staticResourcesContact = JSON.parse('{!staticResourceContact}'); |
| | | var staticResourceInquiryForm = JSON.parse('{!staticResourceInquiryForm}'); |
| | | var requiredFieldAPIList = JSON.parse('{!requiredFieldAPIListStr}'); |
| | |
| | | payloadJson.LastName = r.object[0].lastName; |
| | | payloadJson.Phone = r.object[0].phone; |
| | | payloadJson.Email = r.object[0].email; |
| | | //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-29 start |
| | | // payloadJson.Name_Encrypted__c = r.object[0].lastNameEncrypt; |
| | | // payloadJson.Phone_Encrypted__c = r.object[0].phoneEncrypt; |
| | | // Email_Encrypted__c = r.object[0].emailEncrypt; |
| | | //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-29 end |
| | | payloadJson.Name_Encrypted__c = r.object[0].lastNameEncrypt; |
| | | payloadJson.Phone_Encrypted__c = r.object[0].phoneEncrypt; |
| | | payloadJson.Email_Encrypted__c = r.object[0].emailEncrypt; |
| | | //payloadJson.AWS_Data_Id__c = r.object[0].dataId; |
| | | payloadJson.AWS_Data_Id__c = '{!AWSDataId}'; |
| | | if (isNewMode || {!isCloneMode}) { |
| | |
| | | let obj = JSON.parse(payloadForNewPI); |
| | | obj[0].dataId = '{!AWSDataId}'; |
| | | let payloadForNewPIJson = JSON.stringify(obj); |
| | | //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-29 start |
| | | //AWSService.update(staticResources.updateUrl, leadJson, payloadForNewPIJson, controllerSaveMethod, staticResources.token, staticResources.transactionUrl, false, insertOrUpdateBack, redirectCallBack); |
| | | AWSService.update(staticResourcesV2.updateUrl, leadJson, payloadForNewPIJson, controllerSaveMethod, staticResourcesV2.token, staticResources.transactionUrl, false, insertOrUpdateBack, redirectCallBack); |
| | | //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-29 end |
| | | AWSService.update(staticResources.updateUrl, leadJson, payloadForNewPIJson, controllerSaveMethod, staticResources.token, staticResources.transactionUrl, false, insertOrUpdateBack, redirectCallBack); |
| | | } |
| | | |
| | | function NewPIToAWS(leadJson, payloadForNewPI) { |
| | | let controllerSaveMethod = '{!$RemoteAction.NewAndEditLeadController.saveLead}'; |
| | | //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-29 start |
| | | //AWSService.insert(staticResources.newUrl, leadJson, payloadForNewPI, controllerSaveMethod, staticResources.token, staticResources.transactionUrl, true, insertOrUpdateBack, redirectCallBack); |
| | | AWSService.insert(staticResourcesV2.newUrl, leadJson, payloadForNewPI, controllerSaveMethod, staticResourcesV2.token, staticResources.transactionUrl, true, insertOrUpdateBack, redirectCallBack); |
| | | //zhj MEBGæ°æ¹æ¡æ¹é 2022-11-29 end |
| | | AWSService.insert(staticResources.newUrl, leadJson, payloadForNewPI, controllerSaveMethod, staticResources.token, staticResources.transactionUrl, true, insertOrUpdateBack, redirectCallBack); |
| | | } |
| | | |
| | | function checkRequiredFieldMsg(formData) { |
| | |
| | | |
| | | unblockUI(); |
| | | } |
| | | |
| | | debugger |
| | | document.getElementById('topButtonRow').style = ''; |
| | | document.getElementById('bottomButtonRow').style = ''; |
| | | let previous_value = {}; |
| | |
| | | // } |
| | | //dialog å¼¹çª end |
| | | // æ·»å è¡ htmlç¹æ§å¢å æ»å¨æ¡ ç²¾ç¢ææ¯ wql 2021/02/09 end |
| | | |
| | | debugger |
| | | var QuoteEntryMaxLine = {!QuoteEntryMaxLine}; |
| | | var trade = '{!oppInfo.Trade}'; |
| | | var displayCost = '{!displayCost}'; |
| | |
| | | </tr> |
| | | <tr> |
| | | <td style="text-align:right;width:50px;"></td> |
| | | <th style="text-align:right;width:50px;" rowspan="2"> |
| | | <th style="text-align:right;width:50px;" rowspan="3"> |
| | | {!$ObjectType.QuoteIrai__c.fields.MultiYearWarrantyTotalPrice__c.Label} |
| | | : </th> |
| | | <!-- <td style="width:470px;"> --> |
| | | <!--obsap æ°å¢ç»éå1åæ®µ fy start--> |
| | | <td style="width:100px;" rowspan="2"> |
| | | <td style="width:100px;" rowspan="3"> |
| | | <!--obsap æ°å¢ç»éå1åæ®µ fy end--> |
| | | <apex:outputtext style="width: :100px" id="MultiYearWarrantyTotalPrice_out" value="{0, number, ###,##0.00}" |
| | | > |
| | |
| | | <!-- SWAG-CKDATG ãå§æããOBSAP-æ¥ä»·å§æãæ¥ä»·å§æé¡¹ç®æ¹å1 fy end --> |
| | | </tr> |
| | | <!--obsap æ°å¢ç»éå1åæ®µ fy end--> |
| | | <!--DB202302464682ãæ¥ä»·å§æãæ¥ä»·å§ææ¹å224 fy start--> |
| | | <tr> |
| | | <td ></td> |
| | | <td ></td> |
| | | <td ></td> |
| | | <th style="width:100px;text-align:right;">{!$Label.Sales_Name2}</th> |
| | | <td colspan="2" style="width:260px;text-align:right;"><apex:inputField style="width:230px;" id="SalesName2" value="{!quo.Agency2_entrust__c}" onChange=""/></td> |
| | | <th style="width:100px;text-align:right;"></th> |
| | | <td colspan="2" style="text-align:left;"></td> |
| | | </tr> |
| | | <!--DB202302464682ãæ¥ä»·å§æãæ¥ä»·å§ææ¹å224 fy end--> |
| | | <tr> |
| | | <td> </td> |
| | | </tr> |
| | |
| | | blockme(); |
| | | //callback();return; |
| | | //<input type="hidden" value="{!ir.Id}" id="IrId"/> |
| | | |
| | | //<input type="hidden" value="{!ir.Responsible_Person_Encrypted__c}" id="Responsible_Person_Encrypted__c"/> |
| | | //<input type="hidden" value="{!ir.phone_Encrypted__c}" id="phone_Encrypted__c"/> |
| | | let e_id = document.getElementById("IrId"); |
| | | let url = staticResource.newUrl; |
| | | |
| | |
| | | |
| | | document.getElementById("Page:Form:Block:AWS_Data_Id__c").value = aws_data1.dataId; |
| | | j$("[field-api='phone__c']").val(aws_data1.phone); |
| | | //document.getElementById("Page:Form:Block:phone_Encrypted__c").value = aws_data1.phoneEncrypt; //zhj æ°æ¹æ¡æ¹é 2022-12-05 |
| | | j$("[field-api='Responsible_Person__c']").val(aws_data1.responsiblePerson); |
| | | //document.getElementById("Page:Form:Block:Responsible_Person_Encrypted__c").value = aws_data1.responsiblePersonEncrypt; //zhj æ°æ¹æ¡æ¹é 2022-12-05 |
| | | |
| | | if (callback) { |
| | | callback(); |
| | |
| | | </div> |
| | | <div style="position: relative;top:0;height:700px;overflow:hidden;overflow-y:auto;-webkit-overflow-scrolling: touch;"> |
| | | <input type="hidden" value="{!ir.Id}" id="IrId"/> |
| | | <!-- zhj æ°æ¹æ¡æ¹é 2022-12-05 start--> |
| | | <!-- <apex:inputHidden value="{!ir.Responsible_Person_Encrypted__c}" id="Responsible_Person_Encrypted__c"/> |
| | | <apex:inputHidden value="{!ir.phone_Encrypted__c}" id="phone_Encrypted__c"/> --> |
| | | <!-- zhj æ°æ¹æ¡æ¹é 2022-12-05 end--> |
| | | <apex:inputHidden value="{!ir.AWS_Data_Id__c}" id="AWS_Data_Id__c"/> |
| | | |
| | | |
| | |
| | | <apex:page controller="OPDSortManageController" action="{!init}" showHeader="false" sidebar="true" id="allPage" title="OPD计å管ç表" > |
| | | <apex:page lightningStylesheets="true" controller="OPDSortManageController" action="{!init}" showHeader="false" sidebar="true" id="allPage" title="OPD计å管ç表" > |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | |
| | | </apex:pageBlock> |
| | | |
| | | <apex:pageBlock title="å¾
æåºæ " id="OPDSection2" rendered="true" > |
| | | <div style="position:relative;height: 0px;"> |
| | | <div style="position:relative;height: 10px;"> |
| | | <apex:commandButton onclick="saveAddJs();return false;" value="确认追å " style="position:relative;top: -45px;left: 120px; width:100px;" rendered="true" /> |
| | | <input type="hidden" id="allPage:allForm:allBlock:OPDSection2:unCheckedOPDPlanCount" value="{!unCheckedOPDPlanCount}" /> |
| | | </div> |
| | |
| | | <apex:page lightningstylesheets="true" standardcontroller="Lost_cancel_report__c" extensions="PCLLostReportController" showHeader="false" sidebar="false" |
| | | <apex:page standardcontroller="Lost_cancel_report__c" extensions="PCLLostReportController" showHeader="false" sidebar="false" |
| | | id="allPage" action="{!init}" title="询价失å/åæ¶æ¥å" lightningStylesheets="true"> |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}" /> |
| | | |
| | | <!-- <apex:stylesheet value="{!URLFOR($Resource.PCLLostReportPagecss)}" /> --> |
| | | |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}" /> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}" /> |
| | | <apex:form id="allForm"> |
| | |
| | | <col width="25%"/> |
| | | <col width="25%"/> |
| | | </colgroup> |
| | | <tr> |
| | | <td style ="text-align: right;"> |
| | | <tr style="padding-left: 20%;"> |
| | | <td style ="text-align: right;margin-left: 20%;"> |
| | | <apex:outputText value="æ¯å¦ä¸ºæ åååï¼" /> |
| | | </td> |
| | | <td style ="text-align: left;"> |
| | | <td style ="text-align: left;width: 50%;"> |
| | | <div class="requiredInput"><div class="requiredBlock"></div> |
| | | <apex:inputField id="Is_Standard_Contract" value="{!PageMCEElement.Is_Standard_Contract__c}" onchange="RerenderallpageBlockJS(); "/> |
| | | (å¿
å¡«é¡¹ï¼ææåååå¿
é¡»å¾é) |
| | |
| | | <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PersonalCalendarJs)}"/> |
| | | <apex:stylesheet value="{!URLFOR($Resource.fullcalendarCss)}"/> |
| | | |
| | | <apex:stylesheet value="{!URLFOR($Resource.PersonalCalendarCssTwo)}"/> |
| | | |
| | | <script type="text/javascript"> |
| | | function searchBySalesDptJs() { |
| | | var baseUrl = '{!ProvinceUrl}'; |
| | |
| | | <div class="tabCommentPop" id="tabCommentPop" tab="{!selectedTab}" style="width: 990px;"> |
| | | <textarea class="limitedtextarea" onKeyDown="limitText(this,200);" onKeyUp="limitText(this,200);"></textarea> |
| | | <br/> |
| | | <input readonly="readonly" type="text" class="countdown" value="200"/><font size="1"> characters left.</font> |
| | | <input readonly="readonly" type="text" class="countdown" style="width: 50px;" value="200"/><font size="1"> characters left.</font> |
| | | <button class="saveComment" type="button" onclick="saveTabComment(this)">{!$Label.Evalutaion_Comment}</button> |
| | | <iframe id="tabComment" seamless="seamless" src="/apex/PersonalEvaluationCommentList?user={!selectUser}&tab={!selectedTab}" frameborder="0" allowtransparency="true" height="22" width="990"></iframe> |
| | | </div> |
| | |
| | | <apex:page id="Page" showHeader="false" sidebar="false" Controller="PersonalEvaluationController" action="{!init}"> |
| | | <apex:page id="Page" showHeader="false" sidebar="false" Controller="PersonalEvaluationController" action="{!init}" lightningStylesheets="true"> |
| | | <apex:includeScript value="{!URLFOR($Resource.connection20)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.apex20)}"/> |
| | | AccessToken=<span id="AccessToken"></span><br/> |
| | |
| | | <apex:outputPanel id="Panel"> |
| | | <div class="clip_menu"> |
| | | <apex:commandButton value="{!$Label.LABS_SF_Delete}" rerender="Form" onclick="confirmDelete('{!c.lineNo}');" style="width:100px" /> |
| | | <div class="clip_lineNo">{!c.lineNo}</div> |
| | | <div class="clip_lineNo" style="right: 15%">{!c.lineNo}</div> |
| | | </div> |
| | | <div>{!c.reportName}</div> |
| | | <div id="img_div_{!cnt}" style="width:322px; height:262px"></div> |
| | |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/> |
| | | <style> |
| | | table.list{ |
| | | width: 100%!important; |
| | | } |
| | | </style> |
| | | <script type="text/javascript"> |
| | | var heightAjustment = 120; |
| | | var widthAjustment = 30; |
| | |
| | | <apex:pageBlockButtons location="bottom"> |
| | | <apex:commandButton style="float:left;" action="{!save}" value="ç¡®å®" onclick="blockme();" rerender="allForm, checEventFrame" oncomplete="unblockUI();" /> |
| | | <apex:commandButton style="float:left;" value="æ é
å¥æç»æéé®ä»¶" onclick="setEmailBody();" rerender="allForm, checEventFrame"/> |
| | | <apex:commandButton style="float:right;" value="{!IF(isAcceptance, 'è¿å', 'è¿åä¸ä¸çº§')}" action="{!goBack}"/> |
| | | <apex:commandButton style="float:right;margin-right:10px;" value="{!IF(isAcceptance, 'è¿å', 'è¿åä¸ä¸çº§')}" action="{!goBack}"/> |
| | | <apex:commandButton rendered="{!isAcceptance == false}" style="float:right;" value="è¿åæ°æ®ç¡®è®¤ç»é¢" action="{!cancel}"/> |
| | | </apex:pageBlockButtons> |
| | | <div style="clear:both;"></div> |
| | |
| | | <apex:page controller="RentalApplySequenceController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="æéæ¥ç" lightningStylesheets="true"> |
| | | <apex:page controller="RentalApplySequenceController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="æéæ¥ç"> |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | |
| | | <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Equipment_Type_text__c}"/></td> |
| | | <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Internal_asset_location_before__c}"/></td> |
| | | </apex:outputPanel> |
| | | <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply__r.Salesdepartment_text__c}"/></td> |
| | | <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply__r.WorkPlace__c}"/></td> |
| | | <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply__r.Person_In_Charge__c}"/></td> |
| | | <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply_Object__r.Salesdepartment_text__c}"/></td> |
| | | <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply_Object__r.WorkPlace__c}"/></td> |
| | | <td style="white-space: pre-wrap;word-wrap:break-word;"><apex:outputField value="{!info.raesd.Rental_Apply_Object__r.Person_In_Charge__c}"/></td> |
| | | <td style="white-space: pre-wrap;word-wrap:break-word;"> |
| | | <apex:outputField value="{!info.raesd.Queue_Number__c}" rendered="{!!isEquipmentCenter}" /> |
| | | <apex:outputLink value="" rendered="{!isEquipmentCenter}" onclick="checkEventJs('1;{!info.raesd.Rental_Apply_Equipment_Set__c}');return false;"> {!info.raesd.Queue_Number__c}</apex:outputLink> |
| | |
| | | <apex:includeLightning /> |
| | | |
| | | <div style="width:100%;height:100%;" id="RetrospectiveWeeklyReport" /> |
| | | |
| | | <div id="auraErrorMessage"></div> |
| | | <script> |
| | | debugger |
| | | $Lightning.use("c:RetrospectiveWeeklyReportApp", function () { |
| | | $Lightning.createComponent("c:RetrospectiveWeeklyReport", |
| | | { |
| | |
| | | window.sfdcPage.appendToOnloadQueue(function() { calonLoad() }); |
| | | |
| | | var RCbottonChanged = 0; |
| | | |
| | | // æ
éå |
| | | |
| | | |
| | | var hasSendEmail = {!hasSendEmail}; |
| | | console.log('***hasSendEmail',hasSendEmail); |
| | | console.log('***hasSendEmail',hasSendEmail)// æ
éå; |
| | | // if(hasSendEmail == true){ |
| | | // j$(escapeVfId('allPage:allForm:emailSend')).attr("disabled", true); |
| | | // j$(escapeVfId('allPage:allForm:emailSend')).attr("class", 'btnDisabled'); |
| | |
| | | // if(!ResonCannotWarranty.contains("å¼ä¿®")){ |
| | | // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Repair_Price_Auto')).attr("display", none); |
| | | // } |
| | | |
| | | if (isDisabled) { |
| | | |
| | | j$(escapeVfId('allPage:allForm:allBlock:contract:depart')).attr("disabled", true); |
| | |
| | | // disable1(); |
| | | // 2021ã8ã26 å忥价页é¢çä¼åï¼æ ä¿æè®¾å¤ç¹æ£å¯¹è±¡éæ©æ¡åé» fxk end |
| | | console.log('ApprovalBtnDisabled=='+{!ApprovalBtnDisabled}); |
| | | //ä¸éåå 20230103 LY start |
| | | var mainteReal = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:mainteReal')).text(); |
| | | Limit_Price_Amount = localParseFloat(mainteReal)*1.3; |
| | | refreshAsset({!productCount}); |
| | | //ä¸éåå 20230103 hql start |
| | | // console.log('Limit_PriceHidden2=='+Limit_PriceHidden2); |
| | | var RequestquotationAmount = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:quotation_Amount')).val(); |
| | | console.log('ç³è¯·æ¥ä»·éé¢='+RequestquotationAmount); |
| | | var AssetRepairSumPrice = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:assetRepairSumPrice')).text(); |
| | | console.log('åå设å¤ä¿®çæ»é¢='+AssetRepairSumPrice); |
| | | Limit_Price_Amount = (localParseFloat(AssetRepairSumPrice)+localParseFloat(RequestquotationAmount))*1.3; |
| | | Limit_Price_Amount = Math.round(Limit_Price_Amount); |
| | | // console.log('Limit_Price_Amount'+Limit_Price_Amount); |
| | | Limit_Price_AmountOne = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).value(); |
| | | if (Limit_Price_AmountOne*1==0) { |
| | | Limit_PriceHidden = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_PriceHidden')).value(); |
| | | |
| | | if (Limit_PriceHidden*1==0) { |
| | | j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val(Limit_Price_Amount); |
| | | } |
| | | //ä¸éåå 20230103 LY end |
| | | Limit_PriceHidden2 = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price2Hidden')).value(); |
| | | if (Limit_PriceHidden2 == 'false') { |
| | | // lpa = document.getElementById('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount'); |
| | | // lpa.style.display = "none"; |
| | | // console.log('éè宿¯'); |
| | | j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val(''); |
| | | } |
| | | Price111 = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val(); |
| | | console.log('ä¸ééé¢ä¸º'+Limit_Price_Amount); |
| | | console.log('åæä¸ééé¢ä¸º'+Limit_PriceHidden); |
| | | console.log('䏿¯ä¸éååçéé¢ä¸º'+Price111); |
| | | //ä¸éåå 20230103 hql end |
| | | pageSetDisabled(); |
| | | var createdDate = new Date('{!estimate.CreatedDate}'); |
| | | // æ¥ä»·ä¸è®¾å¤çæºèº«ç¼ç 为空æ¶çæ°åååæææå»¶é¿ 20200710 gzw |
| | |
| | | } |
| | | |
| | | if ('{!DecideBtnDisabled}' == 'false') { |
| | | console.log('oldMainteRealä¿®æ¹å®æ'); |
| | | j$(escapeVfId('allPage:allForm:allBlock:contractInfo:oldMainteReal')).val(j$(escapeVfId('allPage:allForm:allBlock:contractInfo:mainteReal')).text()); |
| | | } |
| | | } |
| | |
| | | val = Math.round(val); |
| | | j$(escapeVfId('allPage:allForm:allBlock:contractInfo:quotation_Amount')).val(toNumComma(val)); |
| | | //ä¸éåå 20230117 HQL start |
| | | console.log('ä¸ééé¢å¡«å
¥ï¼'+val*1.3); |
| | | j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val(val*1.3); |
| | | var RequestquotationAmount = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:quotation_Amount')).val(); |
| | | console.log('ç³è¯·æ¥ä»·éé¢='+RequestquotationAmount); |
| | | var AssetRepairSumPrice = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:assetRepairSumPrice')).text(); |
| | | console.log('åå设å¤ä¿®çæ»é¢='+AssetRepairSumPrice); |
| | | Limit_Price_Amount = (localParseFloat(AssetRepairSumPrice)+localParseFloat(RequestquotationAmount))*1.3; |
| | | Limit_Price_Amount = Math.round(Limit_Price_Amount); |
| | | Limit_Price_AmountOne = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).value(); |
| | | Limit_PriceHidden = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_PriceHidden')).value(); |
| | | // if (Limit_PriceHidden*1==0) { |
| | | j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val(Limit_Price_Amount); |
| | | // } |
| | | Limit_PriceHidden2 = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price2Hidden')).value(); |
| | | if (Limit_PriceHidden2 == 'false') { |
| | | // lpa = document.getElementById('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount'); |
| | | // lpa.style.display = "none"; |
| | | // console.log('éè宿¯'); |
| | | j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val(''); |
| | | } |
| | | amount = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).value(); |
| | | console.log('ä¸ééé¢å¡«å
¥ï¼'+amount); |
| | | //ä¸éåå 20230117 HQL end |
| | | makeRealPrice(1); |
| | | } |
| | |
| | | ISReducedpriceapproval = j$(escapeVfId('allPage:allForm:allBlock:ISReducedpriceapproval')).val(); |
| | | console.log('æ¹æ³2æ¯å¦å®¡æ¹éè¿=='+ISReducedpriceapproval+'=============='); |
| | | } |
| | | var number1 = 0; |
| | | function refreshAsset(cnt) { |
| | | console.log('æ§è¡refreshAsset'); |
| | | console.log('decide==='+{!DecideBtnDisabled}); |
| | | // alert(cnt); |
| | | // æäº¤å就页é¢ä¸è®¡ç®äº |
| | | var isDisabled = {!PageDisabled}; |
| | |
| | | // æ°ååå 夿 |
| | | var newCon = true; |
| | | var contractStartDate = new Date(j$(escapeVfId('allPage:allForm:contractstartdate')).value()); |
| | | //ä¸éåå 20230103 LY start |
| | | var mainteReal = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:mainteReal')).text(); |
| | | Limit_Price_Amount = localParseFloat(mainteReal)*1.3; |
| | | |
| | | Limit_Price_AmountOne = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).value(); |
| | | console.log('Limit_Price_AmountOne'+Limit_Price_AmountOne); |
| | | if (Limit_Price_AmountOne*1==0) { |
| | | j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val(Limit_Price_Amount); |
| | | } |
| | | //ä¸éåå 20230103 LY end |
| | | //å¤å¹´ä¿ç»ç¾ååæ°é thh 20220316 start |
| | | var GuranteeCount = 0; |
| | | //å¤å¹´ä¿ç»ç¾ååæ°é thh 20220316 end |
| | |
| | | // var isFSE = true; |
| | | console.log('***isFSE',isFSE); |
| | | //2022æ
éåå è´¹ è·åuserInfoç®æ¡£åç§° end |
| | | |
| | | //20230208 ä¸éååå¼å hql start |
| | | if (isFSE) { |
| | | // lpa = document.getElementById('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount'); |
| | | // lpa.style.display = "none"; |
| | | j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).attr("disabled", true); |
| | | console.log('ä¸ééé¢éè'); |
| | | } |
| | | //20230208 ä¸éååå¼å hql end |
| | | // é¢å®å¼å§æ¥ |
| | | var startdate = new Date(j$(escapeVfId('allPage:allForm:allBlock:contract:startdate')).value()); |
| | | // é¢å®å¼å§æ¥-6个æ |
| | |
| | | var isManual = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':IsManual')).text(); |
| | | var isnew = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetNewHidden')).val(); |
| | | var assetListmonth = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val(); |
| | | |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/02/09 start |
| | | var VMassetListmonth = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Maintenance_Price_Year__c')).val(); |
| | | // console.log('***ååå®ä»·:'+VMassetListmonth); |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/02/09 end |
| | | |
| | | // console.log('***isManual=:'+isManual); |
| | | if (isManual == 'true') { |
| | | var a = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Assert')).value(); |
| | | if (a != '') { |
| | |
| | | //} |
| | | |
| | | strMoney = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val(); |
| | | |
| | | // alert(strMoney); |
| | | Price_YearTXT = strMoney * 12; |
| | | if (isnew == 'true') { |
| | | newCount ++; |
| | | strMoney = month * strMoney + month2 * strMoney / {!isNewPriceAdj}; |
| | | |
| | | } else { |
| | | newCon = false; |
| | | strMoney = month * strMoney + month2 * strMoney; |
| | | |
| | | } |
| | | var b = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contract_No')).value(); |
| | | var LastMContractRecord = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContractRecord')).value(); |
| | |
| | | |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/1/30 start |
| | | |
| | | //æ¶è´¹ç å±ç¤ºä¿®æ¹ä¸ºå¸åºå¤å¹´ä¿è®¾å¤æ¶è´¹ç |
| | | // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':AssetConsumptionRateNew')).attr("style", "display:block"); |
| | | |
| | | // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contractrate')).attr("style", "display:none"); |
| | | |
| | | var Maxcoefficient =0; |
| | | var Mincoefficient =0; |
| | | |
| | | var ContractMonth = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contract:monthRange')).val()); |
| | | |
| | | var AssetRate = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':AssetConsumptionRateNew')).val()); |
| | | console.log('***æ¶è´¹ç:'+AssetRate); |
| | |
| | | |
| | | //设å¤è®¾å¤æ¶è´¹çå°äº1.4 |
| | | if(AssetRate<1.4){ |
| | | upPrice = strMoney; |
| | | console.log('æ¶è´¹çå°äº1.4 upPrice = strmonye'+ upPrice); |
| | | upPrice = VMassetListmonth * ContractMonth /12; |
| | | console.log('æ¶è´¹çå°äº1.4 upPrice = å®ä»· *ç»åææ° /12'+ upPrice); |
| | | |
| | | if(AssetModelNo.includes('290')|| Category4 =='BF'|| Category4=='BFææ«'|| Category4=='GIF'||Category4=='CF' || Category4.includes('GF')){ |
| | | if(AssetModelNo.includes('290')&&( Category4 =='BF'|| Category4=='BFææ«'||Category4=='CF')){ |
| | | downPrice = upPrice; |
| | | console.log('æ¶è´¹çå°äº1.4 äº§åæ æä½ä»· downPrice '+ downPrice); |
| | | |
| | |
| | | |
| | | } |
| | | }else{ |
| | | upPrice = assetListmonth * month *Maxcoefficient / 12; |
| | | downPrice = assetListmonth * month * Mincoefficient / 12; |
| | | upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12; |
| | | downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12; |
| | | console.log('æ¶è´¹ç大äº1.4 upPrice'+ upPrice); |
| | | console.log('æ¶è´¹ç大äº1.4 downPrice'+ downPrice); |
| | | } |
| | |
| | | |
| | | |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/1/30 start 设å¤å¤§äº2å¹´å ç»ç¾ä»·æ ¼ = å®ä»· *æ¶è´¹ç对åºç³»æ° / 12 *ååææ° |
| | | upPrice = assetListmonth * month *Maxcoefficient / 12; |
| | | downPrice = assetListmonth * month * Mincoefficient / 12; |
| | | |
| | | upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12; |
| | | downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12; |
| | | |
| | | console.log('设å¤å¤§äº2å¹´å ç»ç¾ä»·æ ¼ = å®ä»· *æ¶è´¹ç对åºç³»æ° / 12 *ååææ° upPrice'+ upPrice); |
| | | console.log('设å¤å¤§äº2å¹´å ç»ç¾ä»·æ ¼ = å®ä»· *æ¶è´¹ç对åºç³»æ° / 12 *ååææ° downPrice'+ downPrice); |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/1/30 end |
| | | |
| | | |
| | |
| | | }else{ |
| | | upPrice = strMoney; |
| | | downPrice = strMoney * 0.8; |
| | | console.log('鿩1'); |
| | | } |
| | | }else{ |
| | | upPrice = (LastMContract_Price * Punish) * (1 + Adjustment_ratio_Upper/100); |
| | | downPrice = (LastMContract_Price * Punish) * (1 + Adjustment_ratio_Lower/100); |
| | | console.log('鿩2'); |
| | | } |
| | | }else{ |
| | | //firstCCount ++; |
| | | upPrice = strMoney; |
| | | downPrice = strMoney * 0.8; |
| | | console.log('鿩3'); |
| | | } |
| | | // ä¸ä¸éåèäºå
¥ |
| | | upPrice = upPrice.toFixed(2); |
| | |
| | | //j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceTXT')).text(toNumComma(Price_YearTXT)); |
| | | //j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceTXTHidden')).val(Price_YearTXT); |
| | | if (!isDisabled) { |
| | | // // æå¡å忥价è§åæ¹å 20230227 start |
| | | // var LastMContractID = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContractID')).value(); |
| | | // var ISStandardPricing = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':ISStandardPricing')).value(); |
| | | // if (LastMContractID == '' && ISStandardPricing == 'æ¯') { |
| | | // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text(toNumComma(upPrice)); |
| | | // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_priceHidden')).val(upPrice); |
| | | // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_price')).text(toNumComma(upPrice)); |
| | | // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_priceHidden')).val(upPrice); |
| | | // } |
| | | // // æå¡å忥价è§åæ¹å 20230227 end |
| | | // else{ |
| | | // å®é
èå¨ä»·æ ¼ start |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text(toNumComma(downPrice)); |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_priceHidden')).val(downPrice); |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_price')).text(toNumComma(upPrice)); |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_priceHidden')).val(upPrice); |
| | | // å®é
èå¨ä»·æ ¼ end |
| | | // } |
| | | } |
| | | |
| | | //j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPrice')).text(toNumComma(strMoney)); |
| | |
| | | newCon = false; |
| | | } |
| | | strMoney = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val(); |
| | | |
| | | Price_YearTXT = strMoney * 12; |
| | | if (isnew == 'true') { |
| | | strMoney = month * strMoney + month2 * strMoney / {!isNewPriceAdj}; |
| | | |
| | | } else { |
| | | strMoney = month * strMoney + month2 * strMoney; |
| | | } |
| | | |
| | | var b = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contract_No')).value(); |
| | | var LastMContractRecord = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContractRecord')).value(); |
| | | console.log('***ç»´ä¿®ååè®°å½ç±»å2'+LastMContractRecord); |
| | |
| | | var nowdate = new Date(); |
| | | lastendDate = new Date(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':endDateGurantee_Text')).value()); |
| | | nowdate = nowdate.setMonth(nowdate.getMonth() + 6); |
| | | |
| | | console.log('**ç»ææ¥',lastendDate); |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/1/30 start |
| | | |
| | | //æ¶è´¹ç å±ç¤ºä¿®æ¹ä¸ºå¸åºå¤å¹´ä¿è®¾å¤æ¶è´¹ç |
| | | // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':AssetConsumptionRateNew3')).attr("style", "display:block"); |
| | | |
| | | |
| | | |
| | | // var AssetRate2 = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':AssetConsumptionRateNew2')).value(); |
| | | |
| | | // console.log('***æ¶è´¹ç2:'+AssetRate2); |
| | | // var AssetRate3 = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':AssetConsumptionRateNew3')).value()); |
| | | // console.log('***æ¶è´¹ç3:'+AssetRate3); |
| | | |
| | | var Maxcoefficient =0; |
| | | var Mincoefficient =0; |
| | | |
| | | var ContractMonth = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contract:monthRange')).val()); |
| | | console.log('***ç»åææ°'+ContractMonth); |
| | | var AssetRate = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':AssetConsumptionRateNew')).val()); |
| | | console.log('***æ¶è´¹ç:'+AssetRate); |
| | | |
| | |
| | | //设å¤å°äºä¸¤å¹´å |
| | | // upPrice = strMoney; |
| | | // downPrice = strMoney * 0.8; |
| | | console.log('***å°äº2å¹´å') |
| | | |
| | | // å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å start DC 2023/01/19 |
| | | //å¸åºå¤å¹´ä¿è®¾å¤å°äº2å¹´å |
| | | var AssetModelNo = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Asset_Model_No__c')).value(); |
| | |
| | | |
| | | //设å¤è®¾å¤æ¶è´¹çå°äº1.4 |
| | | if(AssetRate<1.4){ |
| | | upPrice = strMoney; |
| | | console.log('æ¶è´¹çå°äº1.4 upPrice = strmonye'+ upPrice); |
| | | upPrice = VMassetListmonth *ContractMonth / 12; |
| | | console.log('æ¶è´¹çå°äº1.4 upPrice = VMassetListmonth *month /12'+ upPrice); |
| | | |
| | | if(AssetModelNo.includes('290')|| Category4 =='BF'|| Category4=='BFææ«'|| Category4=='GIF'||Category4=='CF' || Category4.includes('GF')){ |
| | | if(AssetModelNo.includes('290')&&( Category4 =='BF'|| Category4=='BFææ«'||Category4=='CF')){ |
| | | downPrice = upPrice; |
| | | console.log('æ¶è´¹çå°äº1.4 äº§åæ æä½ä»· downPrice '+ downPrice); |
| | | |
| | |
| | | |
| | | } |
| | | }else{ |
| | | upPrice = assetListmonth * month *Maxcoefficient / 12; |
| | | downPrice = assetListmonth * month * Mincoefficient / 12; |
| | | upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12; |
| | | downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12; |
| | | console.log('æ¶è´¹ç大äº1.4 upPrice'+ upPrice); |
| | | console.log('æ¶è´¹ç大äº1.4 downPrice'+ downPrice); |
| | | } |
| | |
| | | // downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100); |
| | | |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/1/30 start 设å¤å¤§äº2å¹´å ç»ç¾ä»·æ ¼ = å®ä»· *æ¶è´¹ç对åºç³»æ° / 12 *ååææ° |
| | | upPrice = assetListmonth * month *Maxcoefficient / 12; |
| | | downPrice = assetListmonth * month * Mincoefficient / 12; |
| | | upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12; |
| | | downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12; |
| | | |
| | | console.log('设å¤å¤§äº2å¹´å ç»ç¾ä»·æ ¼ = å®ä»· *æ¶è´¹ç对åºç³»æ° / 12 *ååææ° upPrice'+ upPrice); |
| | | console.log('设å¤å¤§äº2å¹´å ç»ç¾ä»·æ ¼ = å®ä»· *æ¶è´¹ç对åºç³»æ° / 12 *ååææ° downPrice'+ downPrice); |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/1/30 end |
| | | } |
| | | // gzw 20220630 å®é
èå¨6个æä»·æ ¼åºå |
| | | }else{ |
| | | upPrice = strMoney; |
| | | downPrice = strMoney * 0.8; |
| | | console.log('鿩4'); |
| | | } |
| | | }else{ |
| | | upPrice = (LastMContract_Price * Punish) * (1 + Adjustment_ratio_Upper/100); |
| | | downPrice = (LastMContract_Price * Punish) * (1 + Adjustment_ratio_Lower/100); |
| | | console.log('鿩5'); |
| | | } |
| | | }else{ |
| | | if (isnew == 'true') { |
| | |
| | | //j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceTXT')).text(toNumComma(Price_YearTXT)); |
| | | //j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceTXTHidden')).val(Price_YearTXT); |
| | | if (!isDisabled) { |
| | | // // æå¡å忥价è§åæ¹å 20230227 start |
| | | // var LastMContractID = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContractID')).value(); |
| | | // var ISStandardPricing = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':ISStandardPricing')).value(); |
| | | // console.log('ISStandardPricing=='+ISStandardPricing); |
| | | // if (LastMContractID == '' && ISStandardPricing == 'æ¯') { |
| | | // console.log('å¼å§æ§è¡'); |
| | | // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text(toNumComma(upPrice)); |
| | | // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_priceHidden')).val(upPrice); |
| | | // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_price')).text(toNumComma(upPrice)); |
| | | // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_priceHidden')).val(upPrice); |
| | | // } |
| | | // // æå¡å忥价è§åæ¹å 20230227 end |
| | | // else{ |
| | | // å®é
èå¨ä»·æ ¼ start |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_price')).text(toNumComma(downPrice)); |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Lower_priceHidden')).val(downPrice); |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_price')).text(toNumComma(upPrice)); |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Adjustment_Upper_priceHidden')).val(upPrice); |
| | | // å®é
èå¨ä»·æ ¼ end |
| | | // } |
| | | } |
| | | //j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPrice')).text(toNumComma(strMoney)); |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPricePageHidden')).val(strMoney); |
| | |
| | | repairMoney = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).value(); |
| | | Repair_Price_pass = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Repair_Price_pass')).val(); |
| | | console.log((i+1)+'å·repairMoney='+repairMoney); |
| | | console.log((i+1)+'å·Repair_Price_Auto='+Repair_Price_Auto); |
| | | // console.log((i+1)+'å·Repair_Price_Auto='+Repair_Price_Auto); |
| | | if ((repairMoney+1)==1) { |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).val(Repair_Price_Auto); |
| | | console.log('repairMoneyä¿®æ¹æå'); |
| | | // console.log('repairMoneyä¿®æ¹æå'); |
| | | } |
| | | if ((Repair_Price_pass+1)==1) { |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Repair_Price_pass')).val(Repair_Price_Auto); |
| | | console.log('Repair_Price_passä¿®æ¹æå'); |
| | | // console.log('Repair_Price_passä¿®æ¹æå'); |
| | | } |
| | | repairMoney1 = localParseFloat(repairMoney); |
| | | ISReducedpriceapproval = j$(escapeVfId('allPage:allForm:allBlock:ISReducedpriceapproval')).val(); |
| | | console.log('ISReducedpriceapproval=='+ISReducedpriceapproval); |
| | | if (ISReducedpriceapproval =='æå
«æä»¥ä¸å¾
审æ¹' || ISReducedpriceapproval =='æ¯') { |
| | | var isDisabled = {!PageDisabled}; |
| | | if (ISReducedpriceapproval =='æå
«æä»¥ä¸å¾
审æ¹' || ISReducedpriceapproval =='æ¯'|| isDisabled) { |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).attr("disabled", true); |
| | | }else{ |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).attr("disabled", false); |
| | |
| | | isresduce = isresduce+1; |
| | | } |
| | | |
| | | console.log('åå§åisresduce='+isresduce); |
| | | |
| | | ResonCannotWarranty = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':ResonCannotWarranty')).value(); |
| | | // console.log('åå§åisresduce='+isresduce); |
| | | rppa = document.getElementById('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Repair_Price_Auto'); |
| | | ResonCannotWarranty = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':ResonCannotWarranty')).value(); |
| | | // console.log('ä¸å¯åä¿åå 为ï¼'+ResonCannotWarranty); |
| | | // console.log('repairMoneyæ§è¡æ¬¡æ°ä¸º'+repairMoney); |
| | | if(!(ResonCannotWarranty.indexOf("å¼ä¿®") != -1)&&(repairMoney+1)==1){ |
| | | // if (!(situation.indexOf("ä¿®çä¸")!=-1)&& !(Agreed_Date.indexOf("为空")!=-1)) { |
| | | rppa.style.display = "none"; |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).val(''); |
| | | // console.log('###ä¿®æ¹æå'); |
| | | // } |
| | | } |
| | | |
| | | |
| | | situation = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Asset_situation')).value(); |
| | | // Agreed_Date = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Agreed_Date')).value(); |
| | | |
| | | console.log('situation='+situation); |
| | | // console.log('situation='+situation); |
| | | // console.log('Agreed_Date1='+Agreed_Date); |
| | | if(ResonCannotWarranty!=null&&!(ResonCannotWarranty.indexOf("å¼ä¿®") != -1)){ |
| | | // if (!(situation.indexOf("ä¿®çä¸")!=-1)&& !(Agreed_Date.indexOf("为空")!=-1)) { |
| | | rppa.style.display = "none"; |
| | | // } |
| | | } |
| | | console.log('夿1'+(situation.indexOf("ä¿®çä¸")!=-1)); |
| | | |
| | | // console.log('夿'+(Agreed_Date.indexOf("ä¸ä¸ºç©º")!=-1)); |
| | | // if ((situation.indexOf("ä¿®çä¸")!=-1)&& (Agreed_Date.indexOf("ä¸ä¸ºç©º")!=-1)) { |
| | | // console.log('å¼å§æä½2'); |
| | |
| | | console.log(result); |
| | | document.getElementById("allPage:allForm:allBlock:contractInfo:Contract_TypeTXT").innerHTML = result; |
| | | document.getElementById("allPage:allForm:allBlock:contractInfo:Contract_TypeTXTHidden").value = result; |
| | | |
| | | // åæ¶é
¸åæ°´ |
| | | //NotUseOxygenatedWaterAmount(1); |
| | | examinationPriceCal(cnt); |
| | | getLastContractRate(); |
| | | number1++; |
| | | } |
| | | function changeAsset(cnt) { |
| | | console.log('æ§è¡äºchangeAsset'); |
| | | // alert(cnt); |
| | | // æäº¤å就页é¢ä¸è®¡ç®äº |
| | | var isDisabled = {!PageDisabled}; |
| | |
| | | var isManual = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':IsManual')).text(); |
| | | var isnew = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetNewHidden')).val(); |
| | | var assetListmonth = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val(); |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/02/09 start |
| | | var VMassetListmonth = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Maintenance_Price_Year__c')).val(); |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/02/09 end |
| | | |
| | | if (isManual == 'true') { |
| | | var a = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Assert')).value(); |
| | | if (a != '') { |
| | |
| | | //} |
| | | |
| | | strMoney = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val(); |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/1/30 start |
| | | |
| | | var LastMContractRecord = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContractRecord')).value(); |
| | | // alert(strMoney); |
| | | console.log('***ç»´ä¿®ååè®°å½ç±»å3'+LastMContractRecord); |
| | |
| | | if (isnew == 'true') { |
| | | newCount ++; |
| | | strMoney = month * strMoney + month2 * strMoney / {!isNewPriceAdj}; |
| | | |
| | | } else { |
| | | newCon = false; |
| | | strMoney = month * strMoney + month2 * strMoney; |
| | |
| | | |
| | | var AssetRate = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':AssetConsumptionRateNew')).val()); |
| | | console.log('***æ¶è´¹ç:'+AssetRate); |
| | | |
| | | var ContractMonth = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contract:monthRange')).val()); |
| | | |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contractrate')).text(AssetRate +'%'); |
| | | |
| | |
| | | |
| | | //设å¤è®¾å¤æ¶è´¹çå°äº1.4 |
| | | if(AssetRate<1.4){ |
| | | upPrice = strMoney; |
| | | console.log('æ¶è´¹çå°äº1.4 upPrice = strmonye'+ upPrice); |
| | | upPrice = VMassetListmonth * ContractMonth / 12 ; |
| | | console.log('æ¶è´¹çå°äº1.4 upPrice = VMassetListmonth *ContractMonth / 12'+ upPrice); |
| | | |
| | | if(AssetModelNo.includes('290')|| Category4 =='BF'|| Category4=='BFææ«'|| Category4=='GIF'||Category4=='CF' || Category4.includes('GF')){ |
| | | if(AssetModelNo.includes('290')&&( Category4 =='BF'|| Category4=='BFææ«'||Category4=='CF')){ |
| | | downPrice = upPrice; |
| | | console.log('æ¶è´¹çå°äº1.4 äº§åæ æä½ä»· downPrice '+ downPrice); |
| | | |
| | |
| | | |
| | | } |
| | | }else{ |
| | | upPrice = assetListmonth * month *Maxcoefficient / 12; |
| | | downPrice = assetListmonth * month * Mincoefficient / 12; |
| | | upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12; |
| | | downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12; |
| | | console.log('æ¶è´¹ç大äº1.4 upPrice'+ upPrice); |
| | | console.log('æ¶è´¹ç大äº1.4 downPrice'+ downPrice); |
| | | } |
| | |
| | | // downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100); |
| | | |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/1/30 start 设å¤å¤§äº2å¹´å ç»ç¾ä»·æ ¼ =å®ä»·*æ¶è´¹ç对åºç³»æ° / 12 *ååææ° |
| | | upPrice = assetListmonth * month *Maxcoefficient / 12; |
| | | downPrice = assetListmonth * month * Mincoefficient / 12; |
| | | upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12; |
| | | downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12; |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/1/30 end |
| | | } |
| | | // gzw 20220630 å®é
èå¨6个æä»·æ ¼åºå |
| | |
| | | newCon = false; |
| | | } |
| | | strMoney = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':assetListPriceHidden')).val(); |
| | | |
| | | Price_YearTXT = strMoney * 12; |
| | | if (isnew == 'true') { |
| | | strMoney = month * strMoney + month2 * strMoney / {!isNewPriceAdj}; |
| | | } else { |
| | | strMoney = month * strMoney + month2 * strMoney; |
| | | |
| | | } |
| | | var b = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contract_No')).value(); |
| | | var LastMContractRecord = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':LastMContractRecord')).value(); |
| | |
| | | |
| | | var AssetRate = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':AssetConsumptionRateNew')).val()); |
| | | console.log('***æ¶è´¹ç:'+AssetRate); |
| | | |
| | | var ContractMonth = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contract:monthRange')).val()); |
| | | |
| | | j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Contractrate')).text(AssetRate +'%'); |
| | | |
| | |
| | | |
| | | //设å¤è®¾å¤æ¶è´¹çå°äº1.4 |
| | | if(AssetRate<1.4){ |
| | | upPrice = strMoney; |
| | | console.log('æ¶è´¹çå°äº1.4 upPrice = strmonye'+ upPrice); |
| | | upPrice = VMassetListmonth * ContractMonth /12; |
| | | console.log('æ¶è´¹çå°äº1.4 upPrice = VMassetListmonth *ContractMonth /12'+ upPrice); |
| | | |
| | | if(AssetModelNo.includes('290')|| Category4 =='BF'|| Category4=='BFææ«'|| Category4=='GIF'||Category4=='CF' || Category4.includes('GF')){ |
| | | if(AssetModelNo.includes('290')&&( Category4 =='BF'|| Category4=='BFææ«'||Category4=='CF')){ |
| | | downPrice = upPrice; |
| | | console.log('æ¶è´¹çå°äº1.4 äº§åæ æä½ä»· downPrice '+ downPrice); |
| | | |
| | |
| | | |
| | | } |
| | | }else{ |
| | | upPrice = assetListmonth * month *Maxcoefficient / 12; |
| | | downPrice = assetListmonth * month * Mincoefficient / 12; |
| | | upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12; |
| | | downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12; |
| | | console.log('æ¶è´¹ç大äº1.4 upPrice'+ upPrice); |
| | | console.log('æ¶è´¹ç大äº1.4 downPrice'+ downPrice); |
| | | } |
| | |
| | | // downPrice = (assetListmonth * Punish) * (1 + Adjustment_ratio_Lower/100); |
| | | |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/1/30 start 设å¤å¤§äº2å¹´å ç»ç¾ä»·æ ¼ = å®ä»· *æ¶è´¹ç对åºç³»æ° / 12 *ååææ° |
| | | upPrice = assetListmonth * month *Maxcoefficient / 12; |
| | | downPrice = assetListmonth * month * Mincoefficient / 12; |
| | | upPrice = VMassetListmonth * ContractMonth *Maxcoefficient / 12; |
| | | downPrice = VMassetListmonth * ContractMonth * Mincoefficient / 12; |
| | | //å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/1/30 end |
| | | |
| | | } |
| | |
| | | repairMoney1 = localParseFloat(repairMoney); |
| | | ISReducedpriceapproval1 = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':ISReducedpriceapproval1')).val(); |
| | | ISReduced = j$(escapeVfId('allPage:allForm:allBlock:ISReducedpriceapproval')).val(); |
| | | console.log('ISReduced='+ISReduced); |
| | | // console.log('ISReduced='+ISReduced); |
| | | |
| | | console.log('Repair_Price_Auto='+Repair_Price_Auto); |
| | | console.log('第'+(i+1)+'个设å¤ISReducedpriceapproval1='+ISReducedpriceapproval1); |
| | | console.log('repairMoney1='+repairMoney1); |
| | | // console.log('Repair_Price_Auto='+Repair_Price_Auto); |
| | | // console.log('第'+(i+1)+'个设å¤ISReducedpriceapproval1='+ISReducedpriceapproval1); |
| | | // console.log('repairMoney1='+repairMoney1); |
| | | |
| | | Repair_Price_pass1 = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Repair_Price_pass')).val(); |
| | | Repair_Price_pass2 = localParseFloat(Repair_Price_pass1); |
| | | console.log('ç»æ='+(repairMoney1<Repair_Price_pass2)); |
| | | console.log('Repair_Price_pass2='+Repair_Price_pass2); |
| | | // console.log('ç»æ='+(repairMoney1<Repair_Price_pass2)); |
| | | // console.log('Repair_Price_pass2='+Repair_Price_pass2); |
| | | if (repairMoney1> 0 && repairMoney1<(Repair_Price_Auto*0.80) && Repair_Price_Auto != null && isFSE == true) { |
| | | if (Repair_Price_pass1!=null && repairMoney1<Repair_Price_pass2) { |
| | | alert('ç±äºå卿æ£çè¶
è¿20%以ä¸çä¿®çå è´¹åä»·ç³è¯·ï¼è¯·å
ç¹å»âæäº¤RCè¯ä¼°âæé®ï¼å¾
RCè¯ä¼°åæå¡ç®¡çé¨ä¼æ¨è¿å®¡æ¹'); |
| | |
| | | situation = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Asset_situation')).value(); |
| | | // Agreed_Date = j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':Agreed_Date')).value(); |
| | | |
| | | console.log('situation='+situation); |
| | | // console.log('situation='+situation); |
| | | // console.log('Agreed_Date1='+Agreed_Date); |
| | | if(ResonCannotWarranty!=null&&!(ResonCannotWarranty.indexOf("å¼ä¿®") != -1)){ |
| | | // if (!(situation.indexOf("ä¿®çä¸")!=-1)&& !(Agreed_Date.indexOf("为空")!=-1)) { |
| | | rppa.style.display = "none"; |
| | | // if(!(ResonCannotWarranty.indexOf("å¼ä¿®") != -1)){ |
| | | // rppa.style.display = "none"; |
| | | // // j$(escapeVfId('allPage:allForm:allBlock:assetSection:assetTable:' + i + ':repairPrice')).val(''); |
| | | // // console.log('###ä¿®æ¹æå'); |
| | | // } |
| | | } |
| | | // if ((situation.indexOf("ä¿®çä¸")!=-1)&& (Agreed_Date.indexOf("为空")!=-1)) { |
| | | // console.log('å¼å§æä½1'); |
| | | // rppa.style.display = "none"; |
| | |
| | | downPriceSum = downPriceSum + localParseFloat(toNum(downPrice)); |
| | | upPriceSum = upPriceSum + localParseFloat(toNum(upPrice)); |
| | | } |
| | | console.log('æ¹åéé¢isresduce='+isresduce); |
| | | // console.log('æ¹åéé¢isresduce='+isresduce); |
| | | if (isresduce!=0) { |
| | | toChange1(); |
| | | }else{ |
| | |
| | | |
| | | examinationPriceCal(cnt); |
| | | getLastContractRate(); |
| | | //ä¸éåå 20230214 hql start |
| | | var RequestquotationAmount = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:quotation_Amount')).val(); |
| | | console.log('ç³è¯·æ¥ä»·éé¢='+RequestquotationAmount); |
| | | var AssetRepairSumPrice = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:assetRepairSumPrice')).text(); |
| | | console.log('åå设å¤ä¿®çæ»é¢='+AssetRepairSumPrice); |
| | | Limit_Price_Amount = (localParseFloat(AssetRepairSumPrice)+localParseFloat(RequestquotationAmount))*1.3; |
| | | Limit_Price_Amount = Math.round(Limit_Price_Amount); |
| | | // console.log('åæ´1='+Math.round(124.5)); |
| | | // console.log('åæ´2='+Math.round(124.4)); |
| | | // console.log('åæ´3='+Math.round(124.6)); |
| | | Limit_Price_AmountOne = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).value(); |
| | | Limit_PriceHidden = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_PriceHidden')).value(); |
| | | // if (Limit_PriceHidden*1==0) { |
| | | j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val(Limit_Price_Amount); |
| | | // } |
| | | Limit_PriceHidden2 = j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price2Hidden')).value(); |
| | | if (Limit_PriceHidden2 == 'false') { |
| | | // lpa = document.getElementById('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount'); |
| | | // lpa.style.display = "none"; |
| | | // console.log('éè宿¯'); |
| | | j$(escapeVfId('allPage:allForm:allBlock:contractInfo:Limit_Price_Amount')).val(''); |
| | | } |
| | | console.log('ä¸ééé¢ä¸º'+Limit_Price_Amount); |
| | | //ä¸éåå 20230214 hql end |
| | | } |
| | | |
| | | |
| | |
| | | } else { |
| | | var oldp = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contractInfo:oldMainteReal')).value()); |
| | | var newp = localParseFloat(j$(escapeVfId('allPage:allForm:allBlock:contractInfo:mainteReal')).text()); |
| | | |
| | | console.log('oldp='+oldp); |
| | | console.log('newp='+newp); |
| | | if (oldp != newp) { |
| | | // 20201106 é«ç« ä¼ æéæ¶æ¯ä¿®æ¹ start |
| | | j$(escapeVfId('allPage:allForm:changedAfterPrint')).val('true'); |
| | |
| | | <th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.Department_Name__c.label}</th> |
| | | |
| | | <th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.Management_Code__c.label}</th> |
| | | <!-- å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/02/20 start--> |
| | | <th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset__c.fields.IS_VMContract_Asset__c.label}</th> |
| | | |
| | | <!-- å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/02/20 end--> |
| | | <th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Asset_Consumption_rate__c.label}</th> |
| | | |
| | | <!-- å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/1/30 start --> |
| | | <th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Asset_Consumption_rate__c.label}</th> |
| | | |
| | | <!-- <th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Maintenance_Contract_Asset_Estimate__c.fields.Asset_Consumption_rate__c.label}</th> |
| | | --> |
| | | <!-- å¸åºå¤å¹´ä¿ä¿®ä»·æ ¼å¼å DC 2023/1/30 end --> |
| | | <th style="width:70px" class="headerRow booleanColumn">{!$ObjectType.Asset.fields.CurrentContract_End_Date__c.label}</th> |
| | | <!-- å®ç»©èå¨ä»·æ ¼è®¡ç® start --> |
| | |
| | | |
| | | <td class="dataCell" width="70px"> |
| | | <apex:outputField value="{!ar.rec.CurrentContract_F__r.Maintenance_Contract_No_F__c}" rendered="{!Not(ar.IsManual)}" id="Contract_No"/> |
| | | |
| | | <apex:inputHidden value="{!ar.rec.CurrentContract_F__r.RecordType_DeveloperName__c}" id="LastMContractRecord"/> |
| | | <apex:inputField value="{!ar.rec.CurrentContract_F_asset__r.endDateGurantee_Text__c}" id="endDateGurantee_Text" style="display: none" showDatePicker="false"/> |
| | | <apex:inputHidden value="{!ar.rec.CurrentContract_F__c}" id="LastMContractID"/> |
| | | <!-- å¸åºå¤å¹´ä¿ä»·æ ¼å¼å start 20223/01/17 ç»´ä¿®åå/ä¿æè®¾å¤ è®¾å¤æ¶è´¹ç --> |
| | | |
| | | |
| | | <!-- <apex:outputField value="{!ar.rec.CurrentContract_F_asset__r.IS_VMContract_Asset__c}" rendered="{!Not(ar.IsManual)}" id="IS_VMContract_Asset"/> --> |
| | | |
| | | <apex:inputHidden value="{!ar.rec.CurrentContract_F_asset__r.Asset_Consumption_Rate__c}" id="AssetConsumptionRateNew"/> |
| | | |
| | | <apex:inputHidden value="{!ar.rec.CurrentContract_F_asset__r.Maintenance_Price_Year__c}" id="Maintenance_Price_Year__c"/> |
| | | |
| | | <!-- <apex:inputField value="{!ar.rec.CurrentContract_F_asset__r.Asset_Consumption_Rate__c}" id="AssetConsumptionRateNew2" style="display: none" showDatePicker="false" /> |
| | | |
| | |
| | | <!-- å¸åºå¤å¹´ä¿ä»·æ ¼å¼å end 20223/01/17 è®¾å¤æ¶è´¹ç --> |
| | | |
| | | </td> |
| | | <!-- å¸åºå¤å¹´ä¿ä»·æ ¼å¼å end 20223/02/20 æ¯å¦å¤å¹´ä¿è®¾å¤ start --> |
| | | <td class="dataCell" width="90px" style="text-align:center"> |
| | | <apex:outputField value="{!ar.rec.CurrentContract_F_asset__r.IS_VMContract_Asset__c}" rendered="{!Not(ar.IsManual)}" id="IS_VMContract_Asset"/> |
| | | </td> |
| | | <!-- å¸åºå¤å¹´ä¿ä»·æ ¼å¼å end 20223/02/20 æ¯å¦å¤å¹´ä¿è®¾å¤ end --> |
| | | |
| | | <td class="dataCell" width="90px" style="text-align:right" > |
| | | <apex:outputField value="{!ar.mcae.Asset_Consumption_rate__c}" rendered="{!Not(ar.IsManual)}" id="Contractrate"/> |
| | | <apex:inputHidden value="{!ar.rec.CurrentContract_F__r.Contract_Range__c}" id="lastContRange"/> |
| | |
| | | </td> |
| | | <td class="dataCell" width="35px" > |
| | | <apex:outputText value="{!ar.mcae.Adjustment_Lower_price__c}" id="Adjustment_Lower_price"/> |
| | | <!-- // æå¡å忥价è§åæ¹å 20230227 start --> |
| | | <!-- <apex:inputHidden value="{!ar.ISStandardPricing}" id="ISStandardPricing" /> --> |
| | | |
| | | <!-- // æå¡å忥价è§åæ¹å 20230227 end --> |
| | | <apex:inputHidden value="{!ar.mcae.LastMContract_Price__c}" id="LastMContract_Price"/> |
| | | <apex:inputHidden value="{!ar.mcae.Adjustment_ratio_Lower__c}" id="Adjustment_ratio_Lower"/> |
| | | <apex:inputHidden value="{!ar.mcae.Adjustment_Lower_price__c}" id="Adjustment_Lower_priceHidden"/> |
| | |
| | | |
| | | </td> |
| | | <td class="dataCell" width="35px" style="text-align:right" > |
| | | <apex:inputField value="{!ar.mcae.Repair_Price__c}" id="repairPrice" style="ime-mode: disabled; width:95%; text-align:right;" onchange="refreshAsset({!productCount});changeAsset({!productCount})"/> |
| | | <apex:inputField value="{!ar.mcae.Repair_Price__c}" id="repairPrice" style="ime-mode: disabled; width:95%; text-align:right;" onchange="changeAsset({!productCount})"/> |
| | | </td> |
| | | <!-- (2022å¹´12æä¸çº¿)æ
éåå è´¹ start --> |
| | | <td class="dataCell" width="35px" style="text-align:right" > |
| | | <apex:outputText value="{!ar.Repair_Price_Auto}" id="Repair_Price_Auto" style="width:95%; disabled:disabled;"/> |
| | | <apex:outputText value="{!ar.Repair_Price_Auto}" id="Repair_Price_Auto" style="width:95%; "/> |
| | | <!-- <apex:inputHiddenalue="{!ar.rec.Reson_Can_not_Warranty__c}" id="ResonCannotWarranty"/> --> |
| | | <!-- <apex:outputText value="{!ar.Agreed_Date}" id="Agreed_Date" style="width:95%;display: none;"/> --> |
| | | <apex:inputField value="{!ar.mcae.Repair_Price_pass__c}" id="Repair_Price_pass" style="width:95%;display: none;"/> |
| | |
| | | <th style="text-align: center">ç³è¯·æ¥ä»·éé¢</th> |
| | | <th style="text-align: center">åå设å¤ä¿®çæ»é¢</th> |
| | | <th style="text-align: center">ååæ»éé¢</th> |
| | | <!-- ä¸éåå 20230103 LY start --> |
| | | <!-- ä¸éåå 20230103 hql start --> |
| | | <th style="text-align: center">ä¸ééé¢</th> |
| | | <!-- ä¸éåå 20230103 LY end --> |
| | | <!-- ä¸éåå 20230103 hql end --> |
| | | </tr> |
| | | <tr> |
| | | <td style="text-align: center"> |
| | |
| | | <apex:inputHidden value="{!estimate.Maintenance_Price__c}" id="mainteRealHidden"/> |
| | | <apex:inputHidden value="{!OldMaintenancePrice}" id="oldMainteReal"/> |
| | | </td> |
| | | <!-- ä¸éåå 20230103 LY start --> |
| | | <!-- ä¸éåå 20230103 hql start --> |
| | | <td style="text-align: center"> |
| | | <apex:inputField value="{!estimate.Limit_Price_Amount__c}" style="ime-mode: disabled; text-align: right; width:100px" id="Limit_Price_Amount" /> |
| | | <apex:inputHidden value="{!isLimitPrice}" id="Limit_Price2Hidden" /> |
| | | <apex:inputHidden value="{!OldLimitPrice}" id="Limit_PriceHidden" /> |
| | | </td> |
| | | <!-- ä¸éåå 20230103 LY end --> |
| | | <!-- ä¸éåå 20230103 hql end --> |
| | | </tr> |
| | | <tr> |
| | | <th style="text-align: center">{!$ObjectType.Maintenance_Contract_Estimate__c.fields.Service_discount_Rate__c.label}</th> |
| | |
| | | <apex:page showHeader="false" title="鏿ãªã¹ãå¤åå¾" name="鏿ãªã¹ãå¤åå¾" Controller="SetupCheck_PicklistValuesGetController" lightningStylesheets="true"> |
| | | <apex:page showHeader="false" title="鏿ãªã¹ãå¤åå¾" name="鏿ãªã¹ãå¤åå¾" Controller="SetupCheck_PicklistValuesGetController"> |
| | | <script> |
| | | var pick_Vals = new Array(); |
| | | <apex:repeat value="{!val_PicklistValues}" var="pickval" id="PicklistRepeat"> |
| | |
| | | let rc = new sforce.SObject('Repair__c'); |
| | | rc.Id='{!RepairId}'; |
| | | rc.address_Contacts__c=contactsName; |
| | | debugger |
| | | rc.address_ZipCode__c = address.ZipCode__c; |
| | | rc.address_City__c = cityName; |
| | | rc.address_Contacts_Name__c = ContactPerson; |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexPage xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>45.0</apiVersion> |
| | | <availableInTouch>false</availableInTouch> |
| | | <availableInTouch>true</availableInTouch> |
| | | <confirmationTokenRequired>false</confirmationTokenRequired> |
| | | <label>StraightBackAddress</label> |
| | | </ApexPage> |
| | |
| | | |
| | | // 2018/11/21 SWAG-B6Q8BS åå§å设置é¢è²ä½¿ç¨ |
| | | function setcolor(){ |
| | | alert('è¿æ¥äº'); |
| | | var ProfileId_2S1 = '{!$Label.ProfileId_2S1}'; |
| | | var salesman2S1_Price = '{!$Label.salesman2S1_Price}'; |
| | | var completionFlg = '{!completionFlg}'; |
| | |
| | | } |
| | | var actSize = '{!actSize}'; |
| | | var alertflg = false; |
| | | alert('==='+actSize); |
| | | for(var i = 0;i<actSize; i++){ |
| | | var TempElement = document.getElementById("Page:mainForm:idDayEdit:idActivities:"+ i +":alertStringValue"); |
| | | var IsAlertInputDep = 'false'; |
| | |
| | | </colgroup> |
| | | <tr> |
| | | <td> </td> |
| | | <th>{!$Label.Search_Condition}</th> |
| | | <th style="width:7%">{!$Label.Search_Condition}</th> |
| | | <td> </td> |
| | | <th>å»é¢åç§°</th> |
| | | <td> </td> |
| | |
| | | trigger AttachmentTrigger on Attachment (before insert,after insert,before delete,after delete, before update, after update) { |
| | | trigger AttachmentTrigger on Attachment (before insert,after insert,before delete,after delete) { |
| | | List<String> rentalIds = new List<String>(); |
| | | List<String> attIds = new List<String>(); |
| | | List<String> rentaldelIds = new List<String>(); |
| | | List<String> attdelIds = new List<String>(); |
| | | List<String> rentalApplyIds = new List<String>(); |
| | | List<String> accIds = new List<String>(); |
| | | //20221014 yc å»é¢å®¡æ¹ä¼å start |
| | | List<String> accAppIds = new List<String>(); |
| | | //20221014 yc å»é¢å®¡æ¹ä¼å end |
| | | // LHJ CHAN-BCLD4P 20190618 Start |
| | | List<String> specIds = new List<String>(); |
| | | List<String> specDelIds = new List<String>(); |
| | | // LHJ CHAN-BCLD4P 20190618 End |
| | | |
| | | // sx 20230210start å¤åååºç³è¯·æ
鿥åéä»¶æå |
| | | List<String> rentalApplyFaultIds = new List<String>(); |
| | | Map<String,List<Id>> trentalImages = new Map<String,List<Id>>(); |
| | | List<String> rentaldeleteApplyFaultIds = new List<String>(); |
| | | Map<String,List<Id>> deleteImages = new Map<String,List<Id>>(); |
| | | // sx 20230210end å¤åååºç³è¯·æ
鿥åéä»¶æå |
| | | |
| | | // MZY SWAG-BXXBKA 2021-02-19 start |
| | | List<String> opdIds = new List<String>(); |
| | |
| | | if (String.valueOf(att.ParentId).startsWith('001')) { |
| | | accIds.add(att.ParentId); |
| | | } |
| | | //20221014 yc å»é¢å®¡æ¹ä¼å start |
| | | if (String.valueOf(att.ParentId).startsWith('a5C')) { |
| | | accAppIds.add(att.ParentId); |
| | | } |
| | | //20221014 yc å»é¢å®¡æ¹ä¼å end |
| | | if(String.valueOf(att.ParentId).startsWith(System.Label.Oppor_sepKey)){ |
| | | OpporFileIds.add(att.ParentId); |
| | | } |
| | |
| | | oFOrderIds.add(att.ParentId); |
| | | oFOrderIdMap.put(att.ParentId,true); |
| | | } |
| | | |
| | | //2023-2-10 sxå¤å å¤åæ£æµåææ¥å start |
| | | Id cid = att.ParentId; |
| | | String parentLabel = cid.getSObjectType().getDescribe().getName(); |
| | | if(parentLabel.equals('Rental_Apply_Fault__c')){ |
| | | rentalApplyFaultIds.add(att.ParentId); |
| | | if(trentalImages.containskey(att.ParentId)){ |
| | | trentalImages.get(att.ParentId).add(att.Id); |
| | | }else{ |
| | | List<Id> temp = new List<Id>(); |
| | | temp.add(att.Id); |
| | | trentalImages.put(att.ParentId,temp); |
| | | } |
| | | } |
| | | //2023-2-10 sxå¤å å¤åæ£æµåææ¥å end |
| | | } |
| | | } |
| | | |
| | | if (Trigger.isBefore && Trigger.isDelete) { |
| | | List<Attachment> attDeleteList = new List<Attachment>(); |
| | | for (Attachment att : Trigger.old) { |
| | | //if (att.Name.toUpperCase() == 'åå书.PDF' && String.valueOf(att.ParentId).startsWith('a0t')) { |
| | | // æ·»ä»ããå¥ç´æ¸ã®ãã¡ã¤ã«åã¯æå®ã§ããªã |
| | |
| | | oFOrderIds.add(att.ParentId); |
| | | oFOrderIdMap.put(att.ParentId,false); |
| | | } |
| | | |
| | | //2023-2-10 sxå¤å å¤åæ£æµåææ¥å start |
| | | Id cid = att.ParentId; |
| | | String parentLabel = cid.getSObjectType().getDescribe().getName(); |
| | | if(parentLabel.equals('Rental_Apply_Fault__c')){ |
| | | rentaldeleteApplyFaultIds.add(att.ParentId); |
| | | attDeleteList.add(att); |
| | | if(deleteImages.containskey(att.ParentId)){ |
| | | deleteImages.get(att.ParentId).add(att.Id); |
| | | }else{ |
| | | List<Id> temp = new List<Id>(); |
| | | temp.add(att.Id); |
| | | deleteImages.put(att.ParentId,temp); |
| | | } |
| | | } |
| | | //2023-2-10 sxå¤å å¤åæ£æµåææ¥å end |
| | | } |
| | | |
| | | //2023-2-10 sxå¤å å¤åæ£æµåææ¥å start |
| | | List<Rental_Apply_Fault__c> rafList = [SELECT Id, Name FROM Rental_Apply_Fault__c WHERE Id IN: rentaldeleteApplyFaultIds AND (status__c = 'å·²åé' OR status__c = 'å·²åé¦')]; |
| | | for (Rental_Apply_Fault__c raf : rafList) { |
| | | for (Attachment att : attDeleteList) { |
| | | if (att.ParentId == raf.Id) { |
| | | att.addError('éèæ¡ä¸çæ£æµåææ¥åä¸å
许å é¤å·²ä¸ä¼ çæ
éå¾ç'); |
| | | } |
| | | } |
| | | } |
| | | //2023-2-10 sxå¤å å¤åæ£æµåææ¥å end |
| | | } |
| | | if (Trigger.isAfter && Trigger.isDelete) { |
| | | for (Attachment att : Trigger.old) { |
| | |
| | | specIds.add(att.ParentId); |
| | | } |
| | | // LHJ CHAN-BCLD4P 20190618 End |
| | | //20221014 yc å»é¢å®¡æ¹ä¼å start |
| | | if (String.valueOf(att.ParentId).startsWith('a5C')) { |
| | | accAppIds.add(att.ParentId); |
| | | } |
| | | //20221014 yc å»é¢å®¡æ¹ä¼å end |
| | | } |
| | | } |
| | | //20221207 lt å»é¢å®¡æ¹ä¼å start |
| | | if (Trigger.isAfter && Trigger.isUpdate) { |
| | | for (Attachment att : Trigger.old) { |
| | | if (String.valueOf(att.ParentId).startsWith('a5C')) { |
| | | accAppIds.add(att.ParentId); |
| | | } |
| | | |
| | | if (String.valueOf(att.ParentId).startsWith('001')) { |
| | | accIds.add(att.ParentId); |
| | | } |
| | | } |
| | | } |
| | | //20221207 lt å»é¢å®¡æ¹ä¼å start |
| | | |
| | | |
| | | if (rentaldelIds.size() > 0) { |
| | |
| | | ControllerUtil.updRentalApplyList(rentalApplyList); |
| | | } |
| | | |
| | | |
| | | if(rentalApplyFaultIds.size() > 0){ |
| | | List<Rental_Apply_Fault__c> renList = [SELECT Id,AttachmentId1__c,AttachmentId2__c from Rental_Apply_Fault__c where Id in :rentalApplyFaultIds]; |
| | | |
| | | system.debug('updrentalApplyFaultList====='+renList); |
| | | for(Rental_Apply_Fault__c ren : renList){ |
| | | if(trentalImages.containskey(ren.Id)){ |
| | | if (ren.AttachmentId1__c == null) { |
| | | ren.AttachmentId1__c = trentalImages.get(ren.id)[0]; |
| | | } else if(ren.AttachmentId2__c == null) { |
| | | ren.AttachmentId2__c = trentalImages.get(ren.id)[0]; |
| | | } |
| | | } |
| | | } |
| | | system.debug('updrentalApplyFaultList====='+renList); |
| | | UPDATE renList; |
| | | } |
| | | |
| | | if(rentaldeleteApplyFaultIds.size() > 0){ |
| | | List<Rental_Apply_Fault__c> renList = [SELECT Id,AttachmentId1__c,AttachmentId2__c from Rental_Apply_Fault__c where Id in :rentaldeleteApplyFaultIds]; |
| | | |
| | | system.debug('renList====='+renList); |
| | | for(Rental_Apply_Fault__c ren : renList){ |
| | | if(deleteImages.containskey(ren.Id)){ |
| | | |
| | | if(deleteImages.get(ren.Id).contains(ren.AttachmentId1__c)){ |
| | | ren.AttachmentId1__c = ''; |
| | | } |
| | | if(deleteImages.get(ren.Id).contains(ren.AttachmentId2__c)){ |
| | | ren.AttachmentId2__c = ''; |
| | | } |
| | | } |
| | | } |
| | | system.debug('renList====='+renList); |
| | | UPDATE renList; |
| | | } |
| | | |
| | | if (accIds.size() > 0) { |
| | | Map<String, String> attMap = new Map<String, String>(); |
| | | List<Attachment> attList = [select Id, ParentId from Attachment where ParentId = :accIds order by ParentId]; |
| | |
| | | attMap.put(att.ParentId, att.ParentId); |
| | | } |
| | | List<Account> updAccList = new List<Account>(); |
| | | |
| | | //20221207 lt å»é¢å®¡æ¹ä¼å start |
| | | List<Account> accList = [select id,Name, |
| | | Is_Active__c |
| | | from Account |
| | | where id in:accIds ]; |
| | | //20221207 lt å»é¢å®¡æ¹ä¼å end |
| | | |
| | | for (String accid : accIds) { |
| | | if(accList.size() > 0){ |
| | | // Account acc = new Account(Id = accid); |
| | | //20221207 lt å»é¢å®¡æ¹ä¼å start |
| | | for(Account acc : accList){ |
| | | if(Trigger.isUpdate && Trigger.isAfter){ |
| | | for(Attachment att : Trigger.New){ |
| | | System.debug('lt123---æ´æ°---ç¶æ---'+acc.Is_Active__c); |
| | | if(attMap.containsKey(att.ParentID) && acc.Is_Active__c != 'èæ¡ä¸'){ |
| | | System.debug('lt123---èæ¡ä¸---'); |
| | | att.addError('éèæ¡ä¸ï¼éä»¶ä¸å
许ç¼è¾ã'); |
| | | |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(Trigger.isDelete && (Trigger.isBefore || Trigger.isAfter)){ |
| | | for(Attachment att : Trigger.old){ |
| | | // if(attMap.containsKey(att.ParentID) && acc.Is_Active__c != 'èæ¡ä¸'){ |
| | | if(acc.Is_Active__c != 'èæ¡ä¸'){ |
| | | att.addError('éèæ¡ä¸ï¼éä»¶ä¸å
许å é¤ã'); |
| | | |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | Account acc = new Account(Id = accid); |
| | | acc.Is_upload_file__c = attMap.containsKey(accid); |
| | | updAccList.add(acc); |
| | | } |
| | | } |
| | | //20221207 lt å»é¢å®¡æ¹ä¼å end |
| | | } |
| | | |
| | | // for (String accid : accIds) { |
| | | // Account acc = new Account(Id = accid); |
| | | // acc.Is_upload_file__c = attMap.containsKey(accid); |
| | | // updAccList.add(acc); |
| | | // } |
| | | if (updAccList.size() > 0) update updAccList; |
| | | } |
| | | //20221014 yc å»é¢å®¡æ¹ä¼å start |
| | | if (accAppIds.size() > 0) { |
| | | Map<String, String> attMap = new Map<String, String>(); |
| | | List<Attachment> attList = [select Id, ParentId from Attachment where ParentId = :accAppIds order by ParentId]; |
| | | for (Attachment att : attList) { |
| | | attMap.put(att.ParentId, att.ParentId); |
| | | } |
| | | List<Account_Delay_Apply__c> updAccAppList = new List<Account_Delay_Apply__c>(); |
| | | |
| | | //20221207 lt å»é¢å®¡æ¹ä¼å start |
| | | List<Account_Delay_Apply__c> adaList = [select id,Name, |
| | | Is_Active__c |
| | | from Account_Delay_Apply__c |
| | | where id in:accAppIds ]; |
| | | //20221207 lt å»é¢å®¡æ¹ä¼å end |
| | | |
| | | for (String accappid : accAppIds) { |
| | | if(adaList.size() > 0){ |
| | | // Account_Delay_Apply__c accapp = new Account_Delay_Apply__c(Id = accappid); |
| | | //20221207 lt å»é¢å®¡æ¹ä¼å start |
| | | |
| | | for(Account_Delay_Apply__c accapp : adaList){ |
| | | if(Trigger.isUpdate && Trigger.isAfter){ |
| | | for(Attachment att : Trigger.New){ |
| | | if(attMap.containsKey(att.ParentID) && accapp.Is_Active__c != 'èæ¡ä¸'){ |
| | | att.addError('éèæ¡ä¸ï¼éä»¶ä¸å
许ç¼è¾ã'); |
| | | |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | if(Trigger.isDelete){ |
| | | for(Attachment att : Trigger.old){ |
| | | // if(attMap.containsKey(att.ParentID) && accapp.Is_Active__c != 'èæ¡ä¸'){ |
| | | if(accapp.Is_Active__c != 'èæ¡ä¸'){ |
| | | att.addError('éèæ¡ä¸ï¼éä»¶ä¸å
许å é¤ã'); |
| | | |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | accapp.Is_upload_file__c = attMap.containsKey(accappid); |
| | | updAccAppList.add(accapp); |
| | | } |
| | | |
| | | } |
| | | |
| | | //20221207 lt å»é¢å®¡æ¹ä¼å end |
| | | |
| | | } |
| | | if (updAccAppList.size() > 0) update updAccAppList; |
| | | } |
| | | //20221014 yc å»é¢å®¡æ¹ä¼å end |
| | | |
| | | // LHJ CHAN-BCLD4P 20190618 Start |
| | | if (specIds.size() > 0) { |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | //20230203 lt DB202301351834 æ°ååè´§æ¥èµå¼ start |
| | | List<String> SIDList = new List<String>(); |
| | | List<QIS_Report__c> UpdQISList = new List<QIS_Report__c>(); |
| | | if(Trigger.isInsert || Trigger.isUpdate){ |
| | | System.debug('---lt123---è¿å¤æ---'); |
| | | for (Statu_Achievements__c sta : Trigger.new){ |
| | | if(Trigger.isInsert){ |
| | | if(sta.Status_1__c != 'éè´§' && sta.Status_1__c != 'æ æ' && sta.ContractNO__c != null && sta.DeliveryDate__c != null){ |
| | | if(!SIDList.contains(sta.ContractNO__c)){ |
| | | SIDList.add(sta.ContractNO__c); |
| | | } |
| | | } |
| | | }else{ |
| | | Statu_Achievements__c OldSta = Trigger.oldMap.get(sta.id); |
| | | if(sta.Status_1__c != 'éè´§' && sta.Status_1__c != 'æ æ' && sta.ContractNO__c != null && sta.DeliveryDate__c != null && (sta.DeliveryDate__c != OldSta.DeliveryDate__c || (System.Label.onlyupdate == '1' && UserInfo.getUserId() == '00510000005sEEMAA2'))){ |
| | | if(!SIDList.contains(sta.ContractNO__c)){ |
| | | SIDList.add(sta.ContractNO__c); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | System.debug('---lt123---ååç¼å·list---'+SIDList); |
| | | System.debug('---lt123---ååç¼å·listSize---'+SIDList.size()); |
| | | if(SIDList.size() > 0 ){ |
| | | list<QIS_Report__c> QISList = |
| | | [Select id, NewProDeliveryDate__c, Order_No__c |
| | | From QIS_Report__c |
| | | Where Order_No__c in: SIDList]; |
| | | |
| | | System.debug('---lt123---QISlist---'+QISList); |
| | | System.debug('---lt123---QISlistSize---'+QISList.size()); |
| | | if(QISList.size() > 0 ){ |
| | | for(QIS_Report__c qiss : QISList){ |
| | | for (Statu_Achievements__c sta : Trigger.new){ |
| | | if(qiss.Order_No__c == sta.ContractNO__c){ |
| | | qiss.NewProDeliveryDate__c = sta.DeliveryDate__c; |
| | | UpdQISList.add(qiss); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(UpdQISList.size() > 0 ){ |
| | | update UpdQISList; |
| | | } |
| | | |
| | | } |
| | | //20230203 lt DB202301351834 æ°ååè´§æ¥èµå¼ end |
| | | |
| | | // SoNo_DeliveryDate_Text__c ã«ã¦ upsert |
| | | if (stajUpsertMap.size() > 0) { |
| | | ControllerUtil.upsertStatuAchievementsJournalByKey(stajUpsertMap.values()); |
| | |
| | | defaultFlag = false; |
| | | } |
| | | // GZW ç¹æ®å¤ç è·³è¿ç»´ä¿®ä¸å¿èªå¨èµå¼ï¼ä»¥æé为å start |
| | | |
| | | if ((repair.Status__c == 'èæ¡ä¸' || String.isBlank(repair.Status__c)) == false) { |
| | | // if (Trigger.isUpdate && repair.SAP_Transfer_time__c == null) { |
| | | if (Trigger.isUpdate && repair.SAP_Transfer_time__c == null && repair.Exc_work_location__c == false) { |
| | |
| | | } |
| | | //鿬¡åå产åä¿¡æ¯ç»´æ¤ç¸å
³ FXK 2021/03/05 END |
| | | //ä¸éåå LY 20230117 start |
| | | //å¦æè®°å½ç±»åæ¯æå¡ä»»å¡å¹¶ä¸æ¯ä¸éååï¼é£ä¹å¤æè¶
è¿ä¸éåå°è¾¾ä¸éæ å¿ |
| | | //å¦æè®°å½ç±»åæ¯æå¡ä»»å¡å¹¶ä¸æ¯ä¸éååï¼é£ä¹å¤æè¶
è¿ååä¸éæ å¿ |
| | | if (middleTable.Maintenance_Contract__r.RecordType.DeveloperName == 'NewMaintenance_Contract' |
| | | && middleTable.Maintenance_Contract__r.Limit_Price__c == true) { |
| | | //æ°å»ºä¿®ç峿 ä¿®çæ¥ä»· ç»´ä¿®ååä¸çä¿®çå©ä½éé¢å¦æå°äºçäº0 é£ä¹ãè¶
è¿ååä¸éã为true |
| | | if (middleTable.Maintenance_Contract__r.Remaining_Amount__c <= 0 && (repair.Repair_Quotation_Id__c==null || repair.Repair_Quotation_Id__c=='')) { |
| | | if (middleTable.Maintenance_Contract__r.Remaining_Amount__c <= 0 ) { |
| | | repair.ZFLAG_CGSX__c = true; |
| | | } |
| | | //ç»´ä¿®ååä¸çä¿®çå©ä½éé¢å¦æå¤§äº0ï¼ä¸ãå©ä½éé¢ãåå»ä¿®çæ¥ä»·ç计å
¥ãååæ¶è´¹ççä¿®çéé¢ãå°äºçäº0ï¼é£ä¹ãå°è¾¾ä¸éã为true |
| | | if (middleTable.Maintenance_Contract__r.Remaining_Amount__c >0 && (repair.Repair_Quotation_Id__c!=null || repair.Repair_Quotation_Id__c!='') |
| | | && (middleTable.Maintenance_Contract__r.Remaining_Amount__c -repair.Repair_Quotation_Id__r.Usage_Ratio_Price__c)<=0 |
| | | ) { |
| | | repair.ZFLAG_SX__c = true; |
| | | } |
| | | } |
| | | //ä¸éåå LY 20230117 end |
| | |
| | | } |
| | | } |
| | | // 2022-12-22 zyh add END |
| | | |
| | | //ä¸éåå LY 20230207 start |
| | | //ç»´ä¿®ååä¸çä¿®çå©ä½éé¢å¦æå¤§äº0ï¼ä¸ãå©ä½éé¢ãåå»ä¿®çæ¥ä»·ç计å
¥ãååæ¶è´¹ççä¿®çéé¢ãå°äºçäº0ï¼é£ä¹ãå°è¾¾ä¸éã为true |
| | | if (Trigger.isBefore && Trigger.isUpdate) { |
| | | for (Repair__c repair: Trigger.new) { |
| | | if (repair.Limit_Price__c ==true ){ |
| | | if (repair.Agreed_Date__c!=null &&(repair.Remaining_Amount__c-repair.Usage_Ratio_Price__c)<=0){ |
| | | repair.ZFLAG_SX__c = true; |
| | | }else{ |
| | | repair.ZFLAG_SX__c = false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //ä¸éåå LY 20230207 end |
| | | System.debug( '-----: trigger end'); |
| | | } |
| | | public void test(){ |
| | |
| | | if (Trigger.isUpdate) { |
| | | old = Trigger.oldMap.get(local.Id); |
| | | } |
| | | |
| | | //20230303 lt DB202302421915 start |
| | | if(Trigger.isBefore && Trigger.isUpdate && local.Pregnant_Rest__c != old.Pregnant_Rest__c){ |
| | | if(old.Pregnant_Rest__c == FALSE && local.Pregnant_Rest__c == TRUE){ |
| | | local.Maternity_leave_StartDate__c = Date.today(); |
| | | } |
| | | if(old.Pregnant_Rest__c == TRUE && local.Pregnant_Rest__c == FALSE){ |
| | | local.Maternity_leave_EndDate__c = Date.today(); |
| | | } |
| | | } |
| | | //20230303 lt DB202302421915 end |
| | | |
| | | if (String.isNotBlank(local.Employee_No__c) |
| | | && ( Trigger.isInsert |
| | | || old.Test_staff__c != local.Test_staff__c |