hg merge release-2.1 (merge release2.1 into development)
This commit is contained in:
commit
376d6ea1ec
|
@ -27,8 +27,6 @@ AS
|
|||
WHERE b.M_ProductBOM_ID=p.M_Product_ID
|
||||
AND b.M_Product_ID=Product_ID
|
||||
AND b.M_ProductBOM_ID != Product_ID
|
||||
AND p.IsBOM='Y'
|
||||
AND p.IsVerified='Y'
|
||||
AND b.IsActive='Y';
|
||||
--
|
||||
BEGIN
|
||||
|
|
|
@ -27,8 +27,6 @@ AS
|
|||
WHERE b.M_ProductBOM_ID=p.M_Product_ID
|
||||
AND b.M_Product_ID=Product_ID
|
||||
AND b.M_ProductBOM_ID != Product_ID
|
||||
AND p.IsBOM='Y'
|
||||
AND p.IsVerified='Y'
|
||||
AND b.IsActive='Y';
|
||||
--
|
||||
BEGIN
|
||||
|
|
|
@ -27,8 +27,6 @@ AS
|
|||
WHERE b.M_ProductBOM_ID=p.M_Product_ID
|
||||
AND b.M_Product_ID=Product_ID
|
||||
AND b.M_ProductBOM_ID != Product_ID
|
||||
AND p.IsBOM='Y'
|
||||
AND p.IsVerified='Y'
|
||||
AND b.IsActive='Y';
|
||||
--
|
||||
BEGIN
|
||||
|
|
|
@ -20,8 +20,6 @@ BEGIN
|
|||
WHERE b.M_ProductBOM_ID=p.M_Product_ID
|
||||
AND b.M_Product_ID=Product_ID
|
||||
AND b.M_ProductBOM_ID != Product_ID
|
||||
AND p.IsBOM='Y'
|
||||
AND p.IsVerified='Y'
|
||||
AND b.IsActive='Y'
|
||||
LOOP
|
||||
v_ProductPrice := bomPriceLimit (bom.M_ProductBOM_ID, PriceList_Version_ID);
|
||||
|
|
|
@ -20,8 +20,6 @@ BEGIN
|
|||
WHERE b.M_ProductBOM_ID=p.M_Product_ID
|
||||
AND b.M_Product_ID=Product_ID
|
||||
AND b.M_ProductBOM_ID != Product_ID
|
||||
AND p.IsBOM='Y'
|
||||
AND p.IsVerified='Y'
|
||||
AND b.IsActive='Y'
|
||||
LOOP
|
||||
v_ProductPrice := bomPriceList (bom.M_ProductBOM_ID, PriceList_Version_ID);
|
||||
|
|
|
@ -20,8 +20,6 @@ BEGIN
|
|||
WHERE b.M_ProductBOM_ID=p.M_Product_ID
|
||||
AND b.M_Product_ID=Product_ID
|
||||
AND b.M_ProductBOM_ID != Product_ID
|
||||
AND p.IsBOM='Y'
|
||||
AND p.IsVerified='Y'
|
||||
AND b.IsActive='Y'
|
||||
LOOP
|
||||
v_ProductPrice := bomPriceStd (bom.M_ProductBOM_ID, PriceList_Version_ID);
|
||||
|
|
|
@ -0,0 +1,157 @@
|
|||
CREATE OR REPLACE FUNCTION BOMPRICELIMIT
|
||||
(
|
||||
Product_ID IN NUMBER,
|
||||
PriceList_Version_ID IN NUMBER
|
||||
)
|
||||
RETURN NUMBER
|
||||
/*************************************************************************
|
||||
* The contents of this file are subject to the Compiere License. You may
|
||||
* obtain a copy of the License at http://www.compiere.org/license.html
|
||||
* Software is on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
|
||||
* express or implied. See the License for details. Code: Compiere ERP+CRM
|
||||
* Copyright (C) 1999-2002 Jorg Janke, ComPiere, Inc. All Rights Reserved.
|
||||
*************************************************************************
|
||||
* $Id: BOM_PriceLimit.sql,v 1.1 2006/04/21 17:51:58 jjanke Exp $
|
||||
***
|
||||
* Title: Return Limit Price of Product/BOM
|
||||
* Description:
|
||||
* if not found: 0
|
||||
************************************************************************/
|
||||
AS
|
||||
v_Price NUMBER;
|
||||
v_ProductPrice NUMBER;
|
||||
-- Get BOM Product info
|
||||
CURSOR CUR_BOM IS
|
||||
SELECT b.M_ProductBOM_ID, b.BOMQty, p.IsBOM
|
||||
FROM M_PRODUCT_BOM b, M_PRODUCT p
|
||||
WHERE b.M_ProductBOM_ID=p.M_Product_ID
|
||||
AND b.M_Product_ID=Product_ID
|
||||
AND b.M_ProductBOM_ID != Product_ID
|
||||
AND b.IsActive='Y';
|
||||
--
|
||||
BEGIN
|
||||
-- Try to get price from PriceList directly
|
||||
SELECT COALESCE (SUM(PriceLimit), 0)
|
||||
INTO v_Price
|
||||
FROM M_PRODUCTPRICE
|
||||
WHERE M_PriceList_Version_ID=PriceList_Version_ID AND M_Product_ID=Product_ID;
|
||||
-- DBMS_OUTPUT.PUT_LINE('Price=' || v_Price);
|
||||
|
||||
-- No Price - Check if BOM
|
||||
IF (v_Price = 0) THEN
|
||||
FOR bom IN CUR_BOM LOOP
|
||||
v_ProductPrice := Bompricelimit (bom.M_ProductBOM_ID, PriceList_Version_ID);
|
||||
v_Price := v_Price + (bom.BOMQty * v_ProductPrice);
|
||||
END LOOP;
|
||||
END IF;
|
||||
--
|
||||
RETURN v_Price;
|
||||
END Bompricelimit;
|
||||
/
|
||||
|
||||
CREATE OR REPLACE FUNCTION BOMPRICELIST
|
||||
(
|
||||
Product_ID IN NUMBER,
|
||||
PriceList_Version_ID IN NUMBER
|
||||
)
|
||||
RETURN NUMBER
|
||||
/*************************************************************************
|
||||
* The contents of this file are subject to the Compiere License. You may
|
||||
* obtain a copy of the License at http://www.compiere.org/license.html
|
||||
* Software is on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
|
||||
* express or implied. See the License for details. Code: Compiere ERP+CRM
|
||||
* Copyright (C) 1999-2002 Jorg Janke, ComPiere, Inc. All Rights Reserved.
|
||||
*************************************************************************
|
||||
* $Id: BOM_PriceList.sql,v 1.1 2006/04/21 17:51:58 jjanke Exp $
|
||||
***
|
||||
* Title: Return List Price of Product/BOM
|
||||
* Description:
|
||||
* if not found: 0
|
||||
************************************************************************/
|
||||
AS
|
||||
v_Price NUMBER;
|
||||
v_ProductPrice NUMBER;
|
||||
-- Get BOM Product info
|
||||
CURSOR CUR_BOM IS
|
||||
SELECT b.M_ProductBOM_ID, b.BOMQty, p.IsBOM
|
||||
FROM M_PRODUCT_BOM b, M_PRODUCT p
|
||||
WHERE b.M_ProductBOM_ID=p.M_Product_ID
|
||||
AND b.M_Product_ID=Product_ID
|
||||
AND b.M_ProductBOM_ID != Product_ID
|
||||
AND b.IsActive='Y';
|
||||
--
|
||||
BEGIN
|
||||
-- Try to get price from pricelist directly
|
||||
SELECT COALESCE (SUM(PriceList), 0)
|
||||
INTO v_Price
|
||||
FROM M_PRODUCTPRICE
|
||||
WHERE M_PriceList_Version_ID=PriceList_Version_ID AND M_Product_ID=Product_ID;
|
||||
-- DBMS_OUTPUT.PUT_LINE('Price=' || Price);
|
||||
|
||||
-- No Price - Check if BOM
|
||||
IF (v_Price = 0) THEN
|
||||
FOR bom IN CUR_BOM LOOP
|
||||
v_ProductPrice := Bompricelist (bom.M_ProductBOM_ID, PriceList_Version_ID);
|
||||
v_Price := v_Price + (bom.BOMQty * v_ProductPrice);
|
||||
-- DBMS_OUTPUT.PUT_LINE('Qry=' || bom.BOMQty || ' @ ' || v_ProductPrice || ', Price=' || v_Price);
|
||||
END LOOP; -- BOM
|
||||
END IF;
|
||||
--
|
||||
RETURN v_Price;
|
||||
END Bompricelist;
|
||||
/
|
||||
|
||||
CREATE OR REPLACE FUNCTION BOMPRICESTD
|
||||
(
|
||||
Product_ID IN NUMBER,
|
||||
PriceList_Version_ID IN NUMBER
|
||||
)
|
||||
RETURN NUMBER
|
||||
/*************************************************************************
|
||||
* The contents of this file are subject to the Compiere License. You may
|
||||
* obtain a copy of the License at http://www.compiere.org/license.html
|
||||
* Software is on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
|
||||
* express or implied. See the License for details. Code: Compiere ERP+CRM
|
||||
* Copyright (C) 1999-2002 Jorg Janke, ComPiere, Inc. All Rights Reserved.
|
||||
*************************************************************************
|
||||
* $Id: BOM_PriceStd.sql,v 1.1 2006/04/21 17:51:58 jjanke Exp $
|
||||
***
|
||||
* Title: Return Standard Price of Product/BOM
|
||||
* Description:
|
||||
* if not found: 0
|
||||
************************************************************************/
|
||||
AS
|
||||
v_Price NUMBER;
|
||||
v_ProductPrice NUMBER;
|
||||
-- Get BOM Product info
|
||||
CURSOR CUR_BOM IS
|
||||
SELECT b.M_ProductBOM_ID, b.BOMQty, p.IsBOM
|
||||
FROM M_PRODUCT_BOM b, M_PRODUCT p
|
||||
WHERE b.M_ProductBOM_ID=p.M_Product_ID
|
||||
AND b.M_Product_ID=Product_ID
|
||||
AND b.M_ProductBOM_ID != Product_ID
|
||||
AND b.IsActive='Y';
|
||||
--
|
||||
BEGIN
|
||||
-- Try to get price from pricelist directly
|
||||
SELECT COALESCE(SUM(PriceStd), 0)
|
||||
INTO v_Price
|
||||
FROM M_PRODUCTPRICE
|
||||
WHERE M_PriceList_Version_ID=PriceList_Version_ID AND M_Product_ID=Product_ID;
|
||||
-- DBMS_OUTPUT.PUT_LINE('Price=' || v_Price);
|
||||
|
||||
-- No Price - Check if BOM
|
||||
IF (v_Price = 0) THEN
|
||||
FOR bom IN CUR_BOM LOOP
|
||||
v_ProductPrice := Bompricestd (bom.M_ProductBOM_ID, PriceList_Version_ID);
|
||||
v_Price := v_Price + (bom.BOMQty * v_ProductPrice);
|
||||
-- DBMS_OUTPUT.PUT_LINE('Price=' || v_Price);
|
||||
END LOOP; -- BOM
|
||||
END IF;
|
||||
--
|
||||
RETURN v_Price;
|
||||
END Bompricestd;
|
||||
/
|
||||
|
||||
SELECT register_migration_script('201505201243_IDEMPIERE-2625.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,113 @@
|
|||
CREATE OR REPLACE FUNCTION bompricelimit (in product_id numeric, in pricelist_version_id numeric) RETURNS numeric AS
|
||||
$BODY$
|
||||
DECLARE
|
||||
v_Price NUMERIC;
|
||||
v_ProductPrice NUMERIC;
|
||||
bom RECORD;
|
||||
|
||||
BEGIN
|
||||
-- Try to get price from PriceList directly
|
||||
SELECT COALESCE (SUM(PriceLimit), 0)
|
||||
INTO v_Price
|
||||
FROM M_ProductPrice
|
||||
WHERE M_PriceList_Version_ID=PriceList_Version_ID AND M_Product_ID=Product_ID;
|
||||
|
||||
-- No Price - Check if BOM
|
||||
IF (v_Price = 0) THEN
|
||||
FOR bom IN
|
||||
SELECT b.M_ProductBOM_ID, b.BOMQty, p.IsBOM
|
||||
FROM M_Product_BOM b, M_Product p
|
||||
WHERE b.M_ProductBOM_ID=p.M_Product_ID
|
||||
AND b.M_Product_ID=Product_ID
|
||||
AND b.M_ProductBOM_ID != Product_ID
|
||||
AND b.IsActive='Y'
|
||||
LOOP
|
||||
v_ProductPrice := bomPriceLimit (bom.M_ProductBOM_ID, PriceList_Version_ID);
|
||||
v_Price := v_Price + (bom.BOMQty * v_ProductPrice);
|
||||
END LOOP;
|
||||
END IF;
|
||||
--
|
||||
RETURN v_Price;
|
||||
|
||||
END;
|
||||
|
||||
$BODY$
|
||||
LANGUAGE 'plpgsql' STABLE
|
||||
;
|
||||
|
||||
CREATE OR REPLACE FUNCTION bompricelist (in product_id numeric, in pricelist_version_id numeric) RETURNS numeric AS
|
||||
$BODY$
|
||||
DECLARE
|
||||
v_Price NUMERIC;
|
||||
v_ProductPrice NUMERIC;
|
||||
bom RECORD;
|
||||
|
||||
BEGIN
|
||||
-- Try to get price from pricelist directly
|
||||
SELECT COALESCE (SUM(PriceList), 0)
|
||||
INTO v_Price
|
||||
FROM M_ProductPrice
|
||||
WHERE M_PriceList_Version_ID=PriceList_Version_ID AND M_Product_ID=Product_ID;
|
||||
|
||||
-- No Price - Check if BOM
|
||||
IF (v_Price = 0) THEN
|
||||
FOR bom IN
|
||||
SELECT b.M_ProductBOM_ID, b.BOMQty, p.IsBOM
|
||||
FROM M_Product_BOM b, M_Product p
|
||||
WHERE b.M_ProductBOM_ID=p.M_Product_ID
|
||||
AND b.M_Product_ID=Product_ID
|
||||
AND b.M_ProductBOM_ID != Product_ID
|
||||
AND b.IsActive='Y'
|
||||
LOOP
|
||||
v_ProductPrice := bomPriceList (bom.M_ProductBOM_ID, PriceList_Version_ID);
|
||||
v_Price := v_Price + (bom.BOMQty * v_ProductPrice);
|
||||
END LOOP;
|
||||
END IF;
|
||||
--
|
||||
RETURN v_Price;
|
||||
|
||||
END;
|
||||
|
||||
$BODY$
|
||||
LANGUAGE 'plpgsql' STABLE
|
||||
;
|
||||
|
||||
CREATE OR REPLACE FUNCTION bompricestd (in product_id numeric, in pricelist_version_id numeric) RETURNS numeric AS
|
||||
$BODY$
|
||||
DECLARE
|
||||
v_Price NUMERIC;
|
||||
v_ProductPrice NUMERIC;
|
||||
bom RECORD;
|
||||
|
||||
BEGIN
|
||||
-- Try to get price from PriceList directly
|
||||
SELECT COALESCE(SUM(PriceStd), 0)
|
||||
INTO v_Price
|
||||
FROM M_ProductPrice
|
||||
WHERE M_PriceList_Version_ID=PriceList_Version_ID AND M_Product_ID=Product_ID;
|
||||
|
||||
-- No Price - Check if BOM
|
||||
IF (v_Price = 0) THEN
|
||||
FOR bom IN
|
||||
SELECT b.M_ProductBOM_ID, b.BOMQty, p.IsBOM
|
||||
FROM M_Product_BOM b, M_Product p
|
||||
WHERE b.M_ProductBOM_ID=p.M_Product_ID
|
||||
AND b.M_Product_ID=Product_ID
|
||||
AND b.M_ProductBOM_ID != Product_ID
|
||||
AND b.IsActive='Y'
|
||||
LOOP
|
||||
v_ProductPrice := bomPriceStd (bom.M_ProductBOM_ID, PriceList_Version_ID);
|
||||
v_Price := v_Price + (bom.BOMQty * v_ProductPrice);
|
||||
END LOOP;
|
||||
END IF;
|
||||
--
|
||||
RETURN v_Price;
|
||||
|
||||
END;
|
||||
|
||||
$BODY$
|
||||
LANGUAGE 'plpgsql' STABLE
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201505201243_IDEMPIERE-2625.sql') FROM dual
|
||||
;
|
|
@ -76,6 +76,8 @@ public class CopyFromBankStmt extends SvrProcess
|
|||
|
||||
for (MBankStatementLine fromLine : from.getLines(false))
|
||||
{
|
||||
if (!fromLine.isActive())
|
||||
continue;
|
||||
if (fromLine.getC_Payment_ID() > 0)
|
||||
{
|
||||
// check if payment is used on another statement
|
||||
|
|
|
@ -101,9 +101,11 @@ public class Doc_BankStatement extends Doc
|
|||
for (int i = 0; i < lines.length; i++)
|
||||
{
|
||||
MBankStatementLine line = lines[i];
|
||||
DocLine_Bank docLine = new DocLine_Bank(line, this);
|
||||
|
||||
list.add(docLine);
|
||||
if(line.isActive())
|
||||
{
|
||||
DocLine_Bank docLine = new DocLine_Bank(line, this);
|
||||
list.add(docLine);
|
||||
}
|
||||
}
|
||||
|
||||
// Return Array
|
||||
|
|
|
@ -317,6 +317,8 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
|
|||
for (int i = 0; i < lines.length; i++)
|
||||
{
|
||||
MBankStatementLine line = lines[i];
|
||||
if (!line.isActive())
|
||||
continue;
|
||||
total = total.add(line.getStmtAmt());
|
||||
if (line.getDateAcct().before(minDate))
|
||||
minDate = line.getDateAcct();
|
||||
|
|
|
@ -170,8 +170,6 @@ public class Language implements Serializable
|
|||
StringBuilder msglog = new StringBuilder("Adding Language=").append(language).append(", Country=").append(country).append(", Locale=").append(locale);
|
||||
log.info (msglog.toString());
|
||||
}
|
||||
StringBuilder msglog = new StringBuilder("Adding Language=").append(language).append(", Country=").append(country).append(", Locale=").append(locale);
|
||||
log.warning(msglog.toString());
|
||||
if (idxReplace >= 0) {
|
||||
s_languages.set(idxReplace, ll);
|
||||
} else {
|
||||
|
|
|
@ -2053,6 +2053,9 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
adTabbox.getSelectedGridTab().dataRefreshAll(true, true);
|
||||
adTabbox.getSelectedGridTab().refreshParentTabs();
|
||||
statusBar.setStatusLine(statusLine);
|
||||
if( adTabbox.getSelectedDetailADTabpanel() != null &&
|
||||
adTabbox.getSelectedDetailADTabpanel().getGridTab() != null )
|
||||
adTabbox.getSelectedDetailADTabpanel().getGridTab().dataRefreshAll(true, true);
|
||||
}
|
||||
if (dirtyTabpanel != null) {
|
||||
if (dirtyTabpanel == adTabbox.getSelectedDetailADTabpanel())
|
||||
|
|
|
@ -162,7 +162,11 @@ public final class AEnv
|
|||
if (AD_Window_ID == 0)
|
||||
return;
|
||||
MTable table = MTable.get(Env.getCtx(), AD_Table_ID);
|
||||
zoom(AD_Window_ID, MQuery.getEqualQuery(table.getKeyColumns()[0], Record_ID));
|
||||
MQuery query = MQuery.getEqualQuery(table.getKeyColumns()[0], Record_ID);
|
||||
query.setZoomTableName(table.getTableName());
|
||||
query.setZoomColumnName(table.getKeyColumns()[0]);
|
||||
query.setZoomValue(Record_ID);
|
||||
zoom(AD_Window_ID, query);
|
||||
} // zoom
|
||||
|
||||
/*************************************************************************
|
||||
|
|
|
@ -211,7 +211,8 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
|
|||
infoWindow = MInfoWindow.get(p_keyColumn.replace("_ID", ""), null);
|
||||
addEventListener(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, this);
|
||||
addEventListener(ON_RUN_PROCESS, this);
|
||||
|
||||
addEventListener(Events.ON_CLOSE, this);
|
||||
|
||||
} // InfoPanel
|
||||
|
||||
private void init()
|
||||
|
@ -1441,7 +1442,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
|
|||
// do nothing when parameter not change and at window mode, or at dialog mode but select non record
|
||||
onOk();
|
||||
}
|
||||
}else if (event.getName().equals(Events.ON_CANCEL)){
|
||||
}else if (event.getName().equals(Events.ON_CANCEL) || (event.getTarget().equals(this) && event.getName().equals(Events.ON_CLOSE))){
|
||||
m_cancel = true;
|
||||
dispose(false);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ public abstract class CreateFromRMA extends CreateFrom {
|
|||
sqlStmt.append("SELECT iol.M_InOutLine_ID, iol.Line, ");
|
||||
sqlStmt.append("COALESCE(p.Name, c.Name) AS ProductName, ");
|
||||
sqlStmt.append("iol.QtyEntered, ");
|
||||
sqlStmt.append("iol.movementQty, ");
|
||||
sqlStmt.append("iol.movementQty-(SELECT COALESCE((SELECT SUM(rmal.qty) FROM M_RMALine rmal JOIN M_RMA rma ON rma.M_RMA_ID=rmal.M_RMA_ID WHERE rmal.M_InOutLine_ID=iol.M_InOutLine_ID AND rma.DocStatus IN ('CO','CL')),0)) AS MovementQty, ");
|
||||
sqlStmt.append("CASE WHEN iol.M_AttributeSetInstance_ID IS NOT NULL THEN (SELECT SerNo FROM M_AttributeSetInstance asi WHERE asi.M_AttributeSetInstance_ID=iol.M_AttributeSetInstance_ID) END as ASI ");
|
||||
sqlStmt.append("FROM M_InOutLine iol ");
|
||||
sqlStmt.append("LEFT JOIN M_Product p ON p.M_Product_ID = iol.M_Product_ID ");
|
||||
|
@ -136,7 +136,7 @@ public abstract class CreateFromRMA extends CreateFrom {
|
|||
miniTable.setColumnClass(2, String.class, true); // 2-Product
|
||||
miniTable.setColumnClass(3, String.class, true); // 3-ASI
|
||||
miniTable.setColumnClass(4, BigDecimal.class, true); // 4-Qty
|
||||
miniTable.setColumnClass(5, BigDecimal.class, true); // 5-Delivered Qty
|
||||
miniTable.setColumnClass(5, BigDecimal.class, false); // 5-Delivered Qty
|
||||
|
||||
// Table UI
|
||||
miniTable.autoSize();
|
||||
|
|
|
@ -1362,6 +1362,8 @@ public class DB_Oracle implements AdempiereDatabase
|
|||
}
|
||||
rs = stmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
// reload the record being locked - it could have changed in a different thread - IDEMPIERE-2629
|
||||
po.load(po.get_TrxName());
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -1089,6 +1089,8 @@ public class DB_PostgreSQL implements AdempiereDatabase
|
|||
|
||||
rs = stmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
// reload the record being locked - it could have changed in a different thread - IDEMPIERE-2629
|
||||
po.load(po.get_TrxName());
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -11,9 +11,27 @@ the new webservice will have the following parameters:
|
|||
|
||||
Note, if you need to define new datatypes you need to define them in WEB-INF/xsd/idempiere-schema.xsd
|
||||
and generate the idempiere-xmlbeans.jar again with this command:
|
||||
|
||||
scomp -out ./WEB-INF/lib/idempiere-xmlbeans.jar ./WEB-INF/xsd/idempiere-schema.xsd
|
||||
|
||||
scomp will generate the corresponding classes to manipulate the xml objects from the messages
|
||||
|
||||
To install xmlbeans Git Clone URL: git://git.apache.org/xmlbeans.git
|
||||
cd xmlbeans/
|
||||
./xbeanenv.sh
|
||||
ant
|
||||
|
||||
Environment example:
|
||||
export XMLBEANS_HOME=/opt/xmlbeans
|
||||
export PATH=$PATH:$XMLBEANS_HOME/bin
|
||||
export XMLBEANS_LIB=$XMLBEANS_HOME/build/lib
|
||||
export JAVA_HOME=/usr/lib/jvm/java-1.7.0...(your path)
|
||||
|
||||
Apps:
|
||||
ant
|
||||
svn
|
||||
git
|
||||
|
||||
|
||||
The method will be called modelSetDocAction - the model in name indicates that the web service is going to be based on model classes, current web services are based in UI instead of model.
|
||||
|
||||
|
|
|
@ -1478,6 +1478,9 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
|
|||
|
||||
POInfo poinfo = POInfo.getPOInfo(ctx, table.getAD_Table_ID());
|
||||
int cnt = 0;
|
||||
int rowCnt = 0;
|
||||
int offset = modelCRUD.getOffset();
|
||||
int limit = modelCRUD.getLimit();
|
||||
|
||||
PreparedStatement pstmtquery = null;
|
||||
ResultSet rsquery = null;
|
||||
|
@ -1539,6 +1542,9 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
|
|||
DataSet ds = resp.addNewDataSet();
|
||||
while (rsquery.next ()) {
|
||||
cnt++;
|
||||
if ((offset >= cnt) || (limit > 0 && offset+limit < cnt))
|
||||
continue;
|
||||
rowCnt++;
|
||||
DataRow dr = ds.addNewDataRow();
|
||||
for (int i = 0; i < poinfo.getColumnCount(); i++) {
|
||||
String columnName = poinfo.getColumnName(i);
|
||||
|
@ -1560,11 +1566,11 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
|
|||
rsquery = null; pstmtquery = null;
|
||||
}
|
||||
|
||||
resp.setSuccess(true);
|
||||
resp.setRowCount(cnt);
|
||||
resp.setNumRows(cnt);
|
||||
resp.setSuccess(true);
|
||||
resp.setRowCount(rowCnt);
|
||||
resp.setNumRows(rowCnt);
|
||||
resp.setTotalRows(cnt);
|
||||
resp.setStartRow(1);
|
||||
resp.setStartRow(offset);
|
||||
|
||||
return ret;
|
||||
} finally {
|
||||
|
|
|
@ -263,6 +263,8 @@
|
|||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:element>
|
||||
<xsd:element name="Offset" type="xsd:int" maxOccurs="1" minOccurs="0"/>
|
||||
<xsd:element name="Limit" type="xsd:int" maxOccurs="1" minOccurs="0"/>
|
||||
<xsd:element name="DataRow" type="tns:DataRow" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
|
Loading…
Reference in New Issue