|
|
@@ -418,7 +418,7 @@ public class stockbill extends Controller {
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "sys_enterprise_contacts", "t4", "t1.rec_contactsid=t4.contactsid and t1.siteid = t4.siteid");
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "sa_accountbalance", "t5", "t5.sys_enterpriseid=t1.sys_enterpriseid and t1.siteid = t5.siteid and t5.sa_accountclassid =(select t1.sa_accountclassid from sa_accountclass t1 where t1.siteid='" + siteid + "' and t1.accountname='现金账户')",
|
|
|
"discountamount");
|
|
|
- querySQL.addJoinTable(JOINTYPE.left, "(select dataid,count(0) as printcount from sys_report_session where table_name='st_stockbill' GROUP BY dataid)", "t11", "t11.dataid=t1.st_stockbillid", "printcount");
|
|
|
+ //querySQL.addJoinTable(JOINTYPE.left, "(select dataid,table_name,count(0) as printcount from sys_report_session GROUP BY dataid,table_name)", "t11", "t11.dataid=t1.st_stockbillid and t11.table_name='st_stockbill'", "printcount");
|
|
|
querySQL.addQueryFields("recname", "t4.name");
|
|
|
querySQL.addQueryFields("recphonenumber", "t4.phonenumber");
|
|
|
querySQL.addQueryFields("recaddress", "t4.address");
|
|
|
@@ -445,6 +445,7 @@ public class stockbill extends Controller {
|
|
|
querySQL.setWhere(where);
|
|
|
querySQL.setCondition("t1.billno", "t1.outplace", "t3.agentnum", " t2.enterprisename", "t6.depname");
|
|
|
querySQL.setPage(pageSize, pageNumber);
|
|
|
+ System.err.println(querySQL.getSQL());
|
|
|
Rows rows = querySQL.query();
|
|
|
|
|
|
|
|
|
@@ -452,7 +453,7 @@ public class stockbill extends Controller {
|
|
|
HashMap<Long, Integer> reportMap = Report.getViewCount(this, "st_stockbill", ids);
|
|
|
for (Row row : rows) {
|
|
|
if (reportMap.containsKey(row.getLong("st_stockbillid"))) {
|
|
|
- row.put("printcount1", reportMap.get(row.getLong("st_stockbillid")));
|
|
|
+ row.put("printcount", reportMap.get(row.getLong("st_stockbillid")));
|
|
|
}
|
|
|
}
|
|
|
if (billtypes.contains("返修出库")) {
|