Commit 221c6ac8 by wukaiqiang

修复经营类报表数据查询不出问题。

parent 45f22a15
......@@ -52,7 +52,7 @@ public class OperationsReportsDaoImpl implements OperationsReportsDao {
if (endDate != null && !(endDate.isEmpty()))
hql.append(" and salesSummary.deal_Time <= :endDate ");
if (stationList != null && !(stationList.isEmpty()))
hql.append(" AND station.id IN ( :stationList ) ");
hql.append(" AND hex(salesSummary.station_id) IN ( :stationList ) ");
hql.append(" GROUP BY salesSummary.station_id,\r\n" + " salesSummary.dinas_type_id ");
hql.append(" UNION ALL ");
hql.append(
......@@ -79,7 +79,7 @@ public class OperationsReportsDaoImpl implements OperationsReportsDao {
if (endDate != null && !(endDate.isEmpty()))
hql.append(" and salesSummary.deal_Time <= :endDate ");
if (stationList != null && !(stationList.isEmpty()))
hql.append(" AND station.id IN ( :stationList ) ");
hql.append(" AND hex(salesSummary.station_id) IN ( :stationList ) ");
hql.append(" GROUP BY salesSummary.station_id ");
hql.append(" UNION ALL ");
hql.append(" SELECT '总计' AS stationName, \r\n" + " '———' AS dinasTypeName, ");
......@@ -105,7 +105,7 @@ public class OperationsReportsDaoImpl implements OperationsReportsDao {
if (endDate != null && !(endDate.isEmpty()))
hql.append(" and salesSummary.deal_Time <= :endDate ");
if (stationList != null && !(stationList.isEmpty()))
hql.append(" AND station.id IN ( :stationList ) ");
hql.append(" AND hex(salesSummary.station_id) IN ( :stationList ) ");
hql.append(" ) AS result ");
hql.append(
" ORDER BY (result.stationName = '总计') DESC,result.stationName, (result.dinasTypeName = '小计') ASC ");
......@@ -124,7 +124,7 @@ public class OperationsReportsDaoImpl implements OperationsReportsDao {
if (resultList.isEmpty())
return null;
List<OperationsReports> list = new ArrayList<OperationsReports>();
if(list.size() > 1) {
if(resultList.size() > 1) {
for (Tuple resule : resultList) {
OperationsReports operationsReports = new OperationsReports();
if (String.valueOf(resule.get(0)) != "null") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment