您位於此處:
InsProductJSONService:getCoverageChanges
將此服務用於續約,以取得兩個產品 JSON 之間的涵蓋範圍變更。您可以使用產生的差異對應在 UI 中或產生的文件中顯示。
方法:getCoverageChanges
服務會傳回已變更的涵蓋範圍,以及已新增和已移除的涵蓋範圍,並醒目提示屬性的變更。
運作方式
-
使用
inputKey1的值尋找一個產品 JSON,其中包含涵蓋範圍以供比較。 -
使用
inputKey2的值尋找另一個產品 JSON,其中包含要比較的涵蓋範圍。 -
傳回變更對應,其中醒目提示選取的選擇性涵蓋範圍、未選取的選擇性涵蓋範圍,以及屬性
userValues中的變更。
輸出 JSON
服務會傳回差異對應,其中包含從原則新增和移除的涵蓋範圍,以及具有不同屬性值的涵蓋範圍。
如果原則包含孫系層級涵蓋範圍差異,則這些差異會顯示在 productCode 或 instanceKey 下方的差異地圖中。
以下是差異地圖中的不同索引鍵:
關鍵字 |
描述 |
|---|---|
|
第一個產品 JSON,但第二個產品 JSON 中不包含的涵蓋範圍清單。 |
|
不在第一個產品 JSON,而是在第二個產品 JSON 中的涵蓋範圍清單。 |
|
第一個產品 JSON 中所選涵蓋範圍的清單,但第二個產品 JSON 中未選取的清單。 |
|
未在第一個產品 JSON 中,但在第二個產品 JSON 中選取的所選涵蓋範圍清單。 |
|
第一個產品 JSON 中具有第二個產品 JSON 中不同屬性 userValues 的涵蓋範圍清單。 |
{
"result": {
"root": {
"addedCoverages": [{
"displaySequence": 8,
"Id": "01t1J00000AvEx5QAF",
"Name": "BoCovNoAttr1",
"ProductCode": "BCNA1",
"IsRecommended__c": false,
"RecordTypeName__c": "CoverageSpec",
"IsConfigurable__c": false,
"productId": "01t1J00000AvEx5QAF",
"pciId": "a1x1J0000043KKDQA2",
"isOptional": false,
"isSelected": true,
"attributeCategories": {
"totalSize": 0
}
}],
"unselectedCoverages": [{
"attributeCategories": {
...
}
"isSelected": true,
"isOptional": false,
"ImageId": "/sfc/servlet.shepherd/version/renditionDownload?rendition=ORIGINAL_Png&versionId=0681J000002tD9wQAE",
"pciId": "a1x1J000002FPmwQAG",
"productId": "01t1J000009rd2ZQAQ",
"IsConfigurable__c": true,
"RecordTypeName__c": "CoverageSpec",
"PricingSource__c": "premiumCamera__premiumCamera",
"IsRecommended__c": false,
"LineOfBusiness__c": "Property & Casualty",
"ProductCode": "C",
"Family": "Personal Lines",
"Name": "Camera",
"Id": "01t1J000009rd2ZQAQ",
"displaySequence": 7
}],
"selectedCoverages": [{
"displaySequence": 2,
"Id": "01t1J000009rd2VQAQ",
"Name": "Jewelry",
"Family": "Personal Lines",
"ProductCode": "J",
"IsRecommended__c": false,
"PricingSource__c": "premiumJewelry__premiumJewelry",
"RecordTypeName__c": "CoverageSpec",
"IsConfigurable__c": true,
"productId": "01t1J000009rd2VQAQ",
"pciId": "a1x1J000002bVjvQAE",
"ImageId": "/servlet/servlet.FileDownload?file=00P1J00000YMFBZUA5",
"eligibilityCriteria": "X.limitCovX > 3000",
"isOptional": true,
"isSelected": true,
"attributeCategories": {
...
}
}],
"changedCoverages": [{
"changedAttributes": {
"limitCoverageC": {
"newValue": "200000",
"oldValue": "100000"
}
}