109 lines
3.6 KiB
Java
109 lines
3.6 KiB
Java
<#include "HfRpConfig.ftl">
|
|
<#include "HfExpGrpList.ftl">
|
|
[
|
|
{
|
|
"Header": {
|
|
"ProjectID": "${projectRP}"
|
|
},
|
|
"ID": {
|
|
"RefID": "${item.item_code?trim?json_string}"
|
|
},
|
|
"Payload": {
|
|
"DescriptionsByLanguage": [{
|
|
"ShortDescription": "${item.short_designation?json_string}",
|
|
"LongDescription": "${item.designation?json_string}",
|
|
"TechnicalDetails": "${item.item_description?json_string}",
|
|
"LanguageCodeISO6391": "${text_language_rfx}"
|
|
}
|
|
],
|
|
"ExpiryConstraint": {
|
|
"Type": "${ExpiryGroupList[item.expiry_group_code]!"UNKNOWN_DATE"}"
|
|
},
|
|
|
|
<#-- Item metadata inclusion -->
|
|
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">
|
|
|
|
<#-- Item Photo URI could be added here -->
|
|
<#if item.url?? && item.url!="">
|
|
,
|
|
"PhotoURI": "${item.url?json_string}"
|
|
</#if>
|
|
|
|
<#-- Loop for the Logistical Variants - LV -->
|
|
<#if item.logistical_variant_list?? && (item.logistical_variant_list?size == item.logistical_variant_list?filter(l ->l??)?size)>
|
|
,
|
|
"LogisticVariants": [
|
|
|
|
<#list item.logistical_variant_list as logistical_variant>
|
|
{
|
|
"LVID": "${logistical_variant.logistical_variant_code?json_string}",
|
|
"Name" : "${logistical_variant.lv_type_code?json_string}",
|
|
|
|
<#if logistical_variant.id_list?? && (logistical_variant.id_list?size == logistical_variant.id_list?filter(l ->l??)?size)>
|
|
"Codes": [
|
|
<#list logistical_variant.id_list as id>
|
|
{
|
|
"Key": "${(id.logistical_variant_ID_type_code!"")?json_string}",
|
|
"Value": "${(id.logistical_variant_ID_code!"")?json_string}"
|
|
}<#sep>,</#sep>
|
|
</#list>
|
|
],
|
|
</#if>
|
|
|
|
<#-- LV Metadata inclusion -->
|
|
<#include "RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl">,
|
|
|
|
<#if logistical_variant.base_lv?? && logistical_variant.base_lv!="">
|
|
"IsBaseLogisticVariant": ${logistical_variant.base_lv},
|
|
</#if>
|
|
|
|
<#if logistical_variant.base_lv != "true">
|
|
"RefLV": "${logistical_variant.subpackaging_lv_code?json_string}",
|
|
</#if>
|
|
|
|
"QuantityInRefLV": ${logistical_variant.quantity_in_subpackaging_lv},
|
|
|
|
"NetWeight": {
|
|
"Value": ${logistical_variant.net_weight},
|
|
"Unit": "${weight_unit_rfx}"
|
|
},
|
|
"GrossWeight": {
|
|
"Value": ${logistical_variant.gross_weight},
|
|
"Unit": "${weight_unit_rfx}"
|
|
},
|
|
"Volume": {
|
|
"Value": ${logistical_variant.volume},
|
|
"Unit": "${volume_unit_rfx}"
|
|
},
|
|
"Height": {
|
|
"Value": ${logistical_variant.height},
|
|
"Unit": "${length_unit_rfx}"
|
|
},
|
|
"Width": {
|
|
"Value": ${logistical_variant.width},
|
|
"Unit": "${length_unit_rfx}"
|
|
},
|
|
"Length": {
|
|
"Value": ${logistical_variant.depth},
|
|
"Unit": "${length_unit_rfx}"
|
|
},
|
|
|
|
|
|
<#if logistical_variant.packaging_lv == "true">
|
|
"BranchIDs": ["${logistical_variant.logistical_variant_code}"]
|
|
<#else>
|
|
"BranchIDs": []
|
|
</#if>
|
|
|
|
}
|
|
<#sep>,</#sep>
|
|
|
|
</#list>
|
|
]
|
|
</#if>
|
|
<#-- End of LV loop -->
|
|
|
|
}
|
|
}
|
|
]
|