|
|
@@ -31,15 +31,15 @@ public class Tinvoiceapply extends Controller {
|
|
|
if (content.containsKey("where")) {
|
|
|
JSONObject whereObject = content.getJSONObject("where");
|
|
|
if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
|
|
|
- where = where + " and (t1.finvoicename like'%" + whereObject.getString("condition") + "%' " +
|
|
|
+ where = where + " and (t3.fagentname like'%" + whereObject.getString("condition") + "%' or t3.fagentshortname like'%" + whereObject.getString("condition") + "%' or t1.finvoicename like'%" + whereObject.getString("condition") + "%' " +
|
|
|
"or exists(select tinvoicebillid from tinvoicebill where siteid=t1.siteid and tinvoiceapplyid=t1.tinvoiceapplyid and (invoicecode like'%" + whereObject.getString("condition") + "%' or invoiceno like'%" + whereObject.getString("condition") +
|
|
|
"%')))";
|
|
|
}
|
|
|
if (whereObject.containsKey("fbegdate") && !"".equals(whereObject.getString("fbegdate"))) {
|
|
|
- where = where + " and t1.createdate >='" + whereObject.getString("fbegdate") + "'";
|
|
|
+ where = where + " and t1.checkdate >='" + whereObject.getString("fbegdate") + "'";
|
|
|
}
|
|
|
if (whereObject.containsKey("fenddate") && !"".equals(whereObject.getString("fenddate"))) {
|
|
|
- where = where + " and t1.createdate <='" + whereObject.getString("fenddate") + "'";
|
|
|
+ where = where + " and t1.checkdate <='" + whereObject.getString("fenddate") + "'";
|
|
|
}
|
|
|
}
|
|
|
SQLFactory factory = new SQLFactory(this, "¾ÏúÉÌ·¢Æ±Áбí²éѯ", pageSize, pageNumber, sort);
|