|
|
@@ -544,6 +544,16 @@ public class Order extends Controller {
|
|
|
if (whereObject.containsKey("enddate") && !"".equals(whereObject.getString("enddate"))) {
|
|
|
where.append(" and t1.billdate <='").append(whereObject.getString("enddate")).append("' ");
|
|
|
}
|
|
|
+ if (whereObject.containsKey("remarks") && !"".equals(whereObject.getString("remarks"))) {
|
|
|
+ where.append("and t1.remarks like'%").append(whereObject.getString("remarks")).append("%' ");
|
|
|
+ }
|
|
|
+ if (whereObject.containsKey("agentinfo") && !"".equals(whereObject.getString("agentinfo"))) {
|
|
|
+ where.append(" and(");
|
|
|
+ where.append(" t2.enterprisename like'%").append(whereObject.getString("agentinfo")).append("%' ");
|
|
|
+ where.append("or t7.agentnum like'%").append(whereObject.getString("agentinfo")).append("%' ");
|
|
|
+ where.append(")");
|
|
|
+ }
|
|
|
+
|
|
|
// if (whereObject.containsKey("writeoffstatus") && !"".equals(whereObject.getString("writeoffstatus"))) {
|
|
|
// String writeoffstatus = whereObject.getStringValue("writeoffstatus");
|
|
|
// if (writeoffstatus.equals("未核销")) {
|
|
|
@@ -706,29 +716,38 @@ public class Order extends Controller {
|
|
|
if (whereObject.containsKey("enddate") && !"".equals(whereObject.getString("enddate"))) {
|
|
|
where.append(" and t1.billdate <='").append(whereObject.getString("enddate")).append("' ");
|
|
|
}
|
|
|
-
|
|
|
- if (whereObject.containsKey("writeoffstatus") && !"".equals(whereObject.getString("writeoffstatus"))) {
|
|
|
- String writeoffstatus = whereObject.getStringValue("writeoffstatus");
|
|
|
- if (writeoffstatus.equals("未核销")) {
|
|
|
- where.append(" and t7.writeoffamount = 0");
|
|
|
- } else if (writeoffstatus.equals("已核销")) {
|
|
|
- where.append(" and t7.writeoffamount = t7.amount and t7.amount > 0");
|
|
|
- } else {
|
|
|
- where.append(" and t7.writeoffamount < t7.amount and t7.writeoffamount > 0");
|
|
|
- }
|
|
|
-
|
|
|
+ if (whereObject.containsKey("remarks") && !"".equals(whereObject.getString("remarks"))) {
|
|
|
+ where.append("and t1.remarks like'%").append(whereObject.getString("remarks")).append("%' ");
|
|
|
}
|
|
|
- if (whereObject.containsKey("invoicestatus") && !"".equals(whereObject.getString("invoicestatus"))) {
|
|
|
- String invoicestatus = whereObject.getStringValue("invoicestatus");
|
|
|
- if (invoicestatus.equals("未开票")) {
|
|
|
- where.append(" and t7.invoiceamount = 0");
|
|
|
- } else if (invoicestatus.equals("已开票")) {
|
|
|
- where.append(" and t7.invoiceamount = t7.amount and t7.amount > 0");
|
|
|
- } else {
|
|
|
- where.append(" and t7.invoiceamount < t7.amount and t7.invoiceamount > 0");
|
|
|
- }
|
|
|
-
|
|
|
+ if (whereObject.containsKey("agentinfo") && !"".equals(whereObject.getString("agentinfo"))) {
|
|
|
+ where.append(" and(");
|
|
|
+ where.append(" t2.enterprisename like'%").append(whereObject.getString("agentinfo")).append("%' ");
|
|
|
+ where.append("or t7.agentnum like'%").append(whereObject.getString("agentinfo")).append("%' ");
|
|
|
+ where.append(")");
|
|
|
}
|
|
|
+
|
|
|
+// if (whereObject.containsKey("writeoffstatus") && !"".equals(whereObject.getString("writeoffstatus"))) {
|
|
|
+// String writeoffstatus = whereObject.getStringValue("writeoffstatus");
|
|
|
+// if (writeoffstatus.equals("未核销")) {
|
|
|
+// where.append(" and t7.writeoffamount = 0");
|
|
|
+// } else if (writeoffstatus.equals("已核销")) {
|
|
|
+// where.append(" and t7.writeoffamount = t7.amount and t7.amount > 0");
|
|
|
+// } else {
|
|
|
+// where.append(" and t7.writeoffamount < t7.amount and t7.writeoffamount > 0");
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
+// if (whereObject.containsKey("invoicestatus") && !"".equals(whereObject.getString("invoicestatus"))) {
|
|
|
+// String invoicestatus = whereObject.getStringValue("invoicestatus");
|
|
|
+// if (invoicestatus.equals("未开票")) {
|
|
|
+// where.append(" and t7.invoiceamount = 0");
|
|
|
+// } else if (invoicestatus.equals("已开票")) {
|
|
|
+// where.append(" and t7.invoiceamount = t7.amount and t7.amount > 0");
|
|
|
+// } else {
|
|
|
+// where.append(" and t7.invoiceamount < t7.amount and t7.invoiceamount > 0");
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
ArrayList<Long> sys_enterpriseids = Hr.getAgents(this, hrid);
|