|
|
@@ -25,7 +25,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
|
|
|
+ " p.pd_prodcode prodCode,p.pr_spec prodSpec, 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.whname whname, 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.pi_receivename receiveName, p.pd_factory factory, p.sendcode sendcode from erp$prodiodetail p where enuu = ?";
|
|
|
- // 查询近三个月的数据
|
|
|
+ // 查询近八个月的数据
|
|
|
sql = sql + " and p.pi_date between add_months(sysdate,-8) and sysdate ";
|
|
|
Object[] args = new Object[] { enUu };
|
|
|
if (!CollectionUtils.isEmpty(filter)) {
|
|
|
@@ -106,13 +106,18 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
|
|
|
sql = sql + " and pr_spec = '" + strs[4] + "'";
|
|
|
}
|
|
|
}
|
|
|
+ // 如果没有时间筛选,默认为近八个月的数据
|
|
|
if (fromDate != null) {
|
|
|
sql = sql + " and pi_date>" + "to_date('" + new java.sql.Date(new Date(fromDate).getTime())
|
|
|
+ "','yyyy-mm-dd')";
|
|
|
+ } else {
|
|
|
+ sql = sql + "and pi_date > to_date (add_months(sysdate,-8))";
|
|
|
}
|
|
|
if (endDate != null) {
|
|
|
sql = sql + " and pi_date<" + "to_date('" + new java.sql.Date(new Date(endDate).getTime())
|
|
|
+ "','yyyy-mm-dd')";
|
|
|
+ } else {
|
|
|
+ sql = sql + "and pi_date < to_date (sysdate)";
|
|
|
}
|
|
|
|
|
|
Object[] args = new Object[] { enUu };
|