You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/09/19 20:11:59 UTC
svn commit: r577408 - in /ofbiz/trunk/applications/manufacturing:
script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
servicedef/services_production_run.xml
webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
Author: jacopoc
Date: Wed Sep 19 11:11:58 2007
New Revision: 577408
URL: http://svn.apache.org/viewvc?rev=577408&view=rev
Log:
Misc cleanups and refactoring for the issueProductionRunComponent* services; added ability to specify the location from where the materials are issued.
Modified:
ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
Modified: ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml?rev=577408&r1=577407&r2=577408&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml (original)
+++ ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml Wed Sep 19 11:11:58 2007
@@ -31,20 +31,16 @@
<set value="WEGS_CREATED" field="lookupComponentsMap.statusId"/>
<set field="lookupComponentsMap.workEffortGoodStdTypeId" value="PRUNT_PROD_NEEDED"/>
- <find-by-and entity-name="WorkEffortGoodStandard" list-name="components" map-name="lookupComponentsMap" />
+ <find-by-and entity-name="WorkEffortGoodStandard" list-name="components" map-name="lookupComponentsMap"/>
+ <filter-list-by-date list-name="components"/>
<!-- now go through each work effort good standard and call a service to issue the inventory -->
<iterate list-name="components" entry-name="component">
<if-not-empty field-name="component.productId">
<clear-field field-name="callSvcMap"/>
<set-service-fields to-map-name="callSvcMap" service-name="issueProductionRunTaskComponent" map-name="component"/>
- <set from-field="workEffort" field="callSvcMap.workEffort"/>
- <set from-field="component" field="callSvcMap.workEffortGoodStandard"/>
<set from-field="reserveOrderEnumId" field="callSvcMap.reserveOrderEnumId"/>
<set field="callSvcMap.description" value="BOM Part"/>
<call-service service-name="issueProductionRunTaskComponent" in-map-name="callSvcMap"/>
-
- <set value="WEGS_COMPLETED" field="component.statusId"/>
- <store-value value-name="component"/>
</if-not-empty>
</iterate>
<log level="info" message="Issued inventory for workEffortId ${workEffort.workEffortId}."/>
@@ -52,11 +48,16 @@
</if-not-empty>
</simple-method>
<simple-method method-name="issueProductionRunTaskComponent" short-description="Issues the Inventory for a Production Run Task Component" login-required="false">
- <if-empty field-name="parameters.workEffortGoodStandard">
+ <if-empty field-name="parameters.fromDate">
<set from-field="parameters.productId" field="productId"/>
<set from-field="parameters.quantity" field="estimatedQuantity" default-value="0.0" type="Double"/>
<else>
- <set from-field="parameters.workEffortGoodStandard" field="workEffortGoodStandard"/>
+ <entity-one entity-name="WorkEffortGoodStandard" value-name="workEffortGoodStandard" auto-field-map="false">
+ <field-map field-name="workEffortId" env-name="parameters.workEffortId"/>
+ <field-map field-name="productId" env-name="parameters.productId"/>
+ <field-map field-name="fromDate" env-name="parameters.fromDate"/>
+ <field-map field-name="workEffortGoodStdTypeId" value="PRUNT_PROD_NEEDED"/>
+ </entity-one>
<set from-field="workEffortGoodStandard.productId" field="productId"/>
<set from-field="workEffortGoodStandard.estimatedQuantity" field="estimatedQuantity"/>
</else>
@@ -68,12 +69,7 @@
<now-timestamp-to-env env-name="nowTimestamp"/>
<!-- NOTE: the inventory will be issued from the WorkEffort.facilityId -->
- <if-empty field-name="parameters.workEffort">
- <entity-one entity-name="WorkEffort" value-name="workEffort"/>
- <else>
- <set from-field="parameters.workEffort" field="workEffort"/>
- </else>
- </if-empty>
+ <entity-one entity-name="WorkEffort" value-name="workEffort"/>
<!-- before we do the find, put together the orderBy list based on which reserveOrderEnumId is specified -->
<if-compare value="INVRO_FIFO_EXP" operator="equals" field-name="reserveOrderEnumId" map-name="parameters">
@@ -97,6 +93,9 @@
<field-to-list field-name="orderByString" list-name="orderByList"/>
<set from-field="productId" field="lookupFieldMap.productId"/>
<set from-field="workEffort.facilityId" field="lookupFieldMap.facilityId"/>
+ <if-not-empty field-name="parameters.locationSeqId">
+ <set from-field="parameters.locationSeqId" field="lookupFieldMap.locationSeqId"/>
+ </if-not-empty>
<find-by-and entity-name="InventoryItem" map-name="lookupFieldMap" list-name="inventoryItemList" order-by-list-name="orderByList"/>
<set from-field="estimatedQuantity" field="parameters.quantityNotIssued"/>
Modified: ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml?rev=577408&r1=577407&r2=577408&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml (original)
+++ ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml Wed Sep 19 11:11:58 2007
@@ -145,13 +145,17 @@
location="org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml" invoke="issueProductionRunTaskComponent" auth="false">
<description>
Issues the Inventory for a Production Run Task Component. For more info see the issueProductionRunTask service.
+ If fromDate is passed, then the WorkEffortGoodStandard record with pk composed of (workEffortId|productId|fromDate)
+ with type PRUNT_PROD_NEEDED is retrieved and used to get the quantity; its status is also updated to COMPLETED after
+ the issuance is done.
+ If locationSeqId is provided, then the items are only issued from the inventory items associated to the location.
</description>
<attribute name="workEffortId" type="String" mode="IN" optional="false"/>
<attribute name="productId" type="String" mode="IN" optional="false"/>
+ <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
<attribute name="quantity" type="Double" mode="IN" optional="true"/>
- <attribute name="workEffort" type="GenericValue" mode="IN" optional="true"/>
- <attribute name="workEffortGoodStandard" type="GenericValue" mode="IN" optional="true"/>
<attribute name="reserveOrderEnumId" type="String" mode="IN" optional="true"/>
+ <attribute name="locationSeqId" type="String" mode="IN" optional="true"/>
<attribute name="reasonEnumId" type="String" mode="IN" optional="true"/>
<attribute name="description" type="String" mode="IN" optional="true"/>
</service>
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml?rev=577408&r1=577407&r2=577408&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml Wed Sep 19 11:11:58 2007
@@ -635,8 +635,7 @@
<form name="IssueProductionRunComponent" type="single" target="issueProductionRunTaskComponent" title="">
<auto-fields-service service-name="issueProductionRunTaskComponent"/>
<field name="productionRunId"><hidden/></field>
- <field name="workEffort"><ignored/></field>
- <field name="workEffortGoodStandard"><ignored/></field>
+ <field name="fromDate"><ignored/></field>
<field name="reserveOrderEnumId"><ignored/></field>
<field name="workEffortId" title="${uiLabelMap.ManufacturingTask}">
<drop-down allow-empty="false">