Author: sichen
Date: Wed Apr 25 10:20:21 2007 New Revision: 532412 URL: http://svn.apache.org/viewvc?view=rev&rev=532412 Log: Adding a sequenceId field to the OrderItemShipGrpInvRes entity and ordering secondarily by this field when inventory reservations are retrieved in the balanceInventoryItems service, as an aid to prioritizing reservations when a RDBMS (such as MySQL) doesn't support fractional seconds on timestamp fields Modified: ofbiz/trunk/applications/order/entitydef/entitymodel.xml ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml ofbiz/trunk/applications/product/servicedef/services_facility.xml Modified: ofbiz/trunk/applications/order/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel.xml?view=diff&rev=532412&r1=532411&r2=532412 ============================================================================== --- ofbiz/trunk/applications/order/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/order/entitydef/entitymodel.xml Wed Apr 25 10:20:21 2007 @@ -833,6 +833,7 @@ <field name="createdDatetime" type="date-time"></field> <field name="promisedDatetime" type="date-time"></field> <field name="currentPromisedDate" type="date-time"></field> + <field name="sequenceId" type="numeric"></field> <field name="oldPickStartDate" col-name="PICK_START_DATE" type="date-time"></field> <!-- this is no longer used and is here for migration or whatever if needed --> <prim-key field="orderId"/> <prim-key field="shipGroupSeqId"/> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml?view=diff&rev=532412&r1=532411&r2=532412 ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml Wed Apr 25 10:20:21 2007 @@ -161,6 +161,7 @@ <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantityNotAvailable"/> <set from-field="parameters.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/> <set from-field="promisedDatetime" field="reserveOisgirMap.promisedDatetime"/> + <set from-field="parameters.sequenceId" field="reserveOisgirMap.sequenceId"/> <call-service service-name="reserveOrderItemInventory" in-map-name="reserveOisgirMap"/> <clear-field field-name="reserveOisgirMap"/> <else> @@ -218,6 +219,7 @@ <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantityNotAvailable"/> <set from-field="parameters.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/> <set from-field="parameters.promisedDatetime" field="reserveOisgirMap.promisedDatetime"/> + <set from-field="parameters.sequenceId" field="reserveOisgirMap.sequenceId"/> <call-service service-name="reserveOrderItemInventory" in-map-name="reserveOisgirMap"/> <clear-field field-name="reserveOisgirMap"/> </else> @@ -265,6 +267,9 @@ <set from-field="parameters.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/> <set from-field="promisedDatetime" field="reserveOisgirMap.promisedDatetime"/> <set field="reserveOisgirMap.quantity" value="1" type="Double"/> + <if-not-empty field-name="parameters.sequenceId"> + <set field="reserveOisgirMap.sequenceId" from-field="parameters.sequenceId"/> + </if-not-empty> <call-service service-name="reserveOrderItemInventory" in-map-name="reserveOisgirMap"/> <clear-field field-name="reserveOisgirMap"/> @@ -303,6 +308,9 @@ <set from-field="parameters.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/> <set from-field="parameters.deductAmount" field="reserveOisgirMap.quantity"/> <set from-field="promisedDatetime" field="reserveOisgirMap.promisedDatetime"/> + <if-not-empty field-name="parameters.sequenceId"> + <set field="reserveOisgirMap.sequenceId" from-field="parameters.sequenceId"/> + </if-not-empty> <call-service service-name="reserveOrderItemInventory" in-map-name="reserveOisgirMap"/> <clear-field field-name="reserveOisgirMap"/> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml?view=diff&rev=532412&r1=532411&r2=532412 ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml Wed Apr 25 10:20:21 2007 @@ -615,7 +615,8 @@ <!-- sort the list by date --> <string-to-list string="reservedDatetime" list-name="orderByList"/> <order-value-list list-name="reservations" order-by-list-name="orderByList"/> - + <set field="orderByList[]" value="sequenceId"/> + <list-to-list list-name="privilegedReservations" to-list-name="allReservations"/> <list-to-list list-name="reservations" to-list-name="allReservations"/> @@ -640,6 +641,7 @@ <set from-field="oisgir.reserveOrderEnumId" field="resMap.reserveOrderEnumId"/> <set field="resMap.requireInventory" value="N"/> <set from-field="oisgir.shipGroupSeqId" field="resMap.shipGroupSeqId"/> + <set from-field="oisgir.sequenceId" field="resMap.sequenceId"/> <call-service service-name="reserveProductInventory" in-map-name="resMap"/> <clear-field field-name="resMap"/> </iterate> Modified: ofbiz/trunk/applications/product/servicedef/services_facility.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_facility.xml?view=diff&rev=532412&r1=532411&r2=532412 ============================================================================== --- ofbiz/trunk/applications/product/servicedef/services_facility.xml (original) +++ ofbiz/trunk/applications/product/servicedef/services_facility.xml Wed Apr 25 10:20:21 2007 @@ -212,6 +212,7 @@ <attribute name="reservedDatetime" type="Timestamp" mode="IN" optional="true"/> <attribute name="requireInventory" type="String" mode="IN" optional="false"/> <attribute name="reserveOrderEnumId" type="String" mode="IN" optional="false"/> + <attribute name="sequenceId" type="Long" mode="IN" optional="true"/> <attribute name="quantityNotReserved" type="Double" mode="OUT" optional="false"/> </service> <service name="reserveProductInventoryByFacility" engine="simple" @@ -229,6 +230,7 @@ <attribute name="reservedDatetime" type="Timestamp" mode="IN" optional="true"/> <attribute name="requireInventory" type="String" mode="IN" optional="false"/> <attribute name="reserveOrderEnumId" type="String" mode="IN" optional="true"/> + <attribute name="sequenceId" type="Long" mode="IN" optional="true"/> <attribute name="quantityNotReserved" type="Double" mode="OUT" optional="false"/> </service> <service name="reserveProductInventoryByContainer" engine="simple" @@ -246,6 +248,7 @@ <attribute name="reservedDatetime" type="Timestamp" mode="IN" optional="true"/> <attribute name="requireInventory" type="String" mode="IN" optional="false"/> <attribute name="reserveOrderEnumId" type="String" mode="IN" optional="true"/> + <attribute name="sequenceId" type="Long" mode="IN" optional="true"/> <attribute name="quantityNotReserved" type="Double" mode="OUT" optional="false"/> </service> <service name="reserveOrderItemInventory" engine="simple" |
On Apr 25, 2007, at 11:20 AM, [hidden email] wrote: > Author: sichen > Date: Wed Apr 25 10:20:21 2007 > New Revision: 532412 > > URL: http://svn.apache.org/viewvc?view=rev&rev=532412 > Log: > Adding a sequenceId field to the OrderItemShipGrpInvRes entity and > ordering secondarily by this field when inventory reservations are > retrieved in the balanceInventoryItems service, as an aid to > prioritizing reservations when a RDBMS (such as MySQL) doesn't > support fractional seconds on timestamp fields fields are sub-second? I believe the general SQL convention for this is actually detailed down to nano-seconds. Is there another data type we should be using, or perhaps doing something different with the JDBC driver? -David smime.p7s (3K) Download Attachment |
Free forum by Nabble | Edit this page |