105 lines
3.2 KiB
Java
105 lines
3.2 KiB
Java
<#include "HfRpConfig.ftl">
|
|
[
|
|
{
|
|
"Header": {
|
|
"ProjectID": "${projectRP}"
|
|
},
|
|
"ID": {
|
|
"RefID": "${item.item_code}"
|
|
},
|
|
"Payload": {
|
|
"DescriptionsByLanguage": [{
|
|
"ShortDescription": "${item.short_designation?json_string}",
|
|
"LongDescription": "${item.designation?json_string}",
|
|
"TechnicalDetails": "${item.item_description?json_string}",
|
|
"LanguageCodeISO6391": "${text_language_rfx}"
|
|
}
|
|
],
|
|
<#-- /!\ table de correspondance à faire disparaitre /!\ -->
|
|
<#assign ExpiryConstraint = {"REC":"PRODUCTION_DATE", "DDM":"BEST_BEFORE_DATE", "DLC":"USE_BY_DATE"}/>
|
|
"ExpiryConstraint": {
|
|
"Type": "${ExpiryConstraint[item.expiry_group_code]!"UNKNOWN_DATE"}"
|
|
},
|
|
|
|
<#-- Item metadata inclusion -->
|
|
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">
|
|
|
|
<#-- Item Photo URI could be added here -->
|
|
<#--"PhotoURI": " ", -->
|
|
|
|
<#-- Loop for the Logistical Variants - LV -->
|
|
<#if item.logistical_variant_list??>
|
|
"LogisticVariants": [
|
|
|
|
<#list item.logistical_variant_list as logistical_variant>
|
|
{
|
|
"LVID": "${logistical_variant.logistical_variant_code}",
|
|
"Name" : "${logistical_variant.lv_type_code}",
|
|
|
|
<#if logistical_variant.id_list??>
|
|
"Codes": [
|
|
<#list logistical_variant.id_list as id>
|
|
{
|
|
"Key": "${id.logistical_variant_ID_type_code}",
|
|
"Value": "${id.logistical_variant_ID_code}"
|
|
}<#sep>,</#sep>
|
|
</#list>
|
|
],
|
|
</#if>
|
|
|
|
<#-- LV Metadata inclusion -->
|
|
<#include "RFXtoRP_HsaItm_ItemCreated_LVMetadata.ftl">
|
|
|
|
|
|
"IsBaseLogisticVariant": ${logistical_variant.base_lv},
|
|
|
|
<#if logistical_variant.base_lv != "true">
|
|
"RefLV": "${logistical_variant.subpackaging_lv_code}",
|
|
</#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 -->
|
|
|
|
}
|
|
}
|
|
]
|