Parcourir la source

【前台】+【更改对账导出Excel无法全部导出的Bug】

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@3335 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
aof il y a 10 ans
Parent
commit
c7b3fe4bb3

+ 9 - 7
src/main/java/com/uas/platform/b2b/service/impl/ErpProdIODetailServiceImpl.java

@@ -55,15 +55,17 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService{
 				+ " p.pd_prodcode prodCode, p.pr_title prodTitle,p.pd_qty qty, p.pi_date piDate, p.pd_orderprice  orderPrice, p.pi_currency currency, p.pd_taxrate taxrate, p.pd_ycheckqty yCheckQty,"
 				+ " p.pd_prodcode prodCode, p.pr_title prodTitle,p.pd_qty qty, p.pi_date piDate, p.pd_orderprice  orderPrice, p.pi_currency currency, p.pd_taxrate taxrate, p.pd_ycheckqty yCheckQty,"
 				+ " p.pd_thischeckqty thisCheckQty, p.custuu custUu, p.custname custName, p.enuu enUu, p.sourceid sourceId, p.pi_sourcetable sourceTable, p.pi_rate rate, p.pi_receivecode receiveCode,"
 				+ " p.pd_thischeckqty thisCheckQty, p.custuu custUu, p.custname custName, p.enuu enUu, p.sourceid sourceId, p.pi_sourcetable sourceTable, p.pi_rate rate, p.pi_receivecode receiveCode,"
 				+ " p.pi_receivename receiveName from erp$prodiodetail p where enuu = ?";
 				+ " p.pi_receivename receiveName from erp$prodiodetail p where enuu = ?";
-		String[] strs = keyword.split("-");
-		if(strs.length == 1 ) {
-			sql = sql + " and custname = '" +	strs[0] +"'";
-		}
-		if(strs.length == 2 ) {
-			if(strs[0].length() != 0) {
+		if(keyword != "") {
+			String[] strs = keyword.split("-");
+			if(strs.length == 1 ) {
 				sql = sql + " and custname = '" +	strs[0] +"'";
 				sql = sql + " and custname = '" +	strs[0] +"'";
 			}
 			}
-			sql = sql + " and pi_receivename = '" +	strs[1] +"'";
+			if(strs.length == 2 ) {
+				if(strs[0].length() != 0) {
+					sql = sql + " and custname = '" +	strs[0] +"'";
+				}
+				sql = sql + " and pi_receivename = '" +	strs[1] +"'";
+			}
 		}
 		}
 		if(fromDate != null) {
 		if(fromDate != null) {
 			sql = sql + " and pi_date>" + "to_date('" + new java.sql.Date(new Date(fromDate).getTime()) + "','yyyy-mm-dd')";
 			sql = sql + " and pi_date>" + "to_date('" + new java.sql.Date(new Date(fromDate).getTime()) + "','yyyy-mm-dd')";