Commit b58ce55a by wukaiqiang

1.修改统计查询 like时无法获取参数问题

2.修改预付款表下载模板
parent 1cf7fea2
...@@ -82,10 +82,11 @@ public class PaymentDetailsDaoImpl implements PaymentDetailsDao { ...@@ -82,10 +82,11 @@ public class PaymentDetailsDaoImpl implements PaymentDetailsDao {
hql.append(" and result.createTime >= :startDate "); hql.append(" and result.createTime >= :startDate ");
if (endDate != null && !(endDate.isEmpty())) if (endDate != null && !(endDate.isEmpty()))
hql.append(" and result.createTime <= :endDate "); hql.append(" and result.createTime <= :endDate ");
if (purchaseSandUnit != null && !(purchaseSandUnit.isEmpty())) if (purchaseSandUnit != null && !(purchaseSandUnit.isEmpty())) {
hql.append(" and result.purchaseSandUnit like " + "%" + " :purchaseSandUnit " + "% "); hql.append(" and result.purchaseSandUnit like ").append( " :purchaseSandUnitId " );
}
if (project != null && !(project.isEmpty())) if (project != null && !(project.isEmpty()))
hql.append(" and result.project like " + "%" + " :project " + "% "); hql.append(" and result.project like ").append( " :project " );
if (fundType != null && !(fundType.isEmpty())) if (fundType != null && !(fundType.isEmpty()))
hql.append(" and result.fundType = :fundType "); hql.append(" and result.fundType = :fundType ");
hql.append(" ORDER BY result.createTime DESC "); hql.append(" ORDER BY result.createTime DESC ");
...@@ -98,9 +99,9 @@ public class PaymentDetailsDaoImpl implements PaymentDetailsDao { ...@@ -98,9 +99,9 @@ public class PaymentDetailsDaoImpl implements PaymentDetailsDao {
if (endDate != null && !(endDate.isEmpty())) if (endDate != null && !(endDate.isEmpty()))
query.setParameter("endDate", endDate); query.setParameter("endDate", endDate);
if (purchaseSandUnit != null && !(purchaseSandUnit.isEmpty())) if (purchaseSandUnit != null && !(purchaseSandUnit.isEmpty()))
query.setParameter("purchaseSandUnit", purchaseSandUnit); query.setParameter("purchaseSandUnitId", "%"+purchaseSandUnit+"%");
if (project != null && !(project.isEmpty())) if (project != null && !(project.isEmpty()))
query.setParameter("project", project); query.setParameter("project", "%"+project+"%");
if (fundType != null && !(fundType.isEmpty())) if (fundType != null && !(fundType.isEmpty()))
query.setParameter("fundType", fundType); query.setParameter("fundType", fundType);
if (regionalCompany != null && !(regionalCompany.isEmpty())) if (regionalCompany != null && !(regionalCompany.isEmpty()))
......
...@@ -32,6 +32,7 @@ public class DownLoadStatisticsController { ...@@ -32,6 +32,7 @@ public class DownLoadStatisticsController {
response.reset(); response.reset();
response.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");
response.setContentType("application/x-www-form-urlencoded"); response.setContentType("application/x-www-form-urlencoded");
if(exportParamStr!=null&&exportParamStr.length()!=0) {
JSONObject obj = new JSONObject(exportParamStr); JSONObject obj = new JSONObject(exportParamStr);
try { try {
ConditionsDetailsInfo conditionsDetailsInfo = new ConditionsDetailsInfo(); ConditionsDetailsInfo conditionsDetailsInfo = new ConditionsDetailsInfo();
...@@ -52,5 +53,8 @@ public class DownLoadStatisticsController { ...@@ -52,5 +53,8 @@ public class DownLoadStatisticsController {
// TODO Auto-generated catch block // TODO Auto-generated catch block
logger.info("导出数据时出现错误信息!请确认!"+e.getMessage()); logger.info("导出数据时出现错误信息!请确认!"+e.getMessage());
} }
}else {
logger.info("导出参数为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