Commit bc73868e by wukaiqiang

Merge branch 'feature/form_statistics_05' into 'develop'

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

See merge request kunlun/xyst_dinas/xyst_dinas_backend!32
parents 3ef88c0b b58ce55a
......@@ -82,10 +82,11 @@ public class PaymentDetailsDaoImpl implements PaymentDetailsDao {
hql.append(" and result.createTime >= :startDate ");
if (endDate != null && !(endDate.isEmpty()))
hql.append(" and result.createTime <= :endDate ");
if (purchaseSandUnit != null && !(purchaseSandUnit.isEmpty()))
hql.append(" and result.purchaseSandUnit like " + "%" + " :purchaseSandUnit " + "% ");
if (purchaseSandUnit != null && !(purchaseSandUnit.isEmpty())) {
hql.append(" and result.purchaseSandUnit like ").append( " :purchaseSandUnitId " );
}
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()))
hql.append(" and result.fundType = :fundType ");
hql.append(" ORDER BY result.createTime DESC ");
......@@ -98,9 +99,9 @@ public class PaymentDetailsDaoImpl implements PaymentDetailsDao {
if (endDate != null && !(endDate.isEmpty()))
query.setParameter("endDate", endDate);
if (purchaseSandUnit != null && !(purchaseSandUnit.isEmpty()))
query.setParameter("purchaseSandUnit", purchaseSandUnit);
query.setParameter("purchaseSandUnitId", "%"+purchaseSandUnit+"%");
if (project != null && !(project.isEmpty()))
query.setParameter("project", project);
query.setParameter("project", "%"+project+"%");
if (fundType != null && !(fundType.isEmpty()))
query.setParameter("fundType", fundType);
if (regionalCompany != null && !(regionalCompany.isEmpty()))
......
......@@ -32,6 +32,7 @@ public class DownLoadStatisticsController {
response.reset();
response.setCharacterEncoding("UTF-8");
response.setContentType("application/x-www-form-urlencoded");
if(exportParamStr!=null&&exportParamStr.length()!=0) {
JSONObject obj = new JSONObject(exportParamStr);
try {
ConditionsDetailsInfo conditionsDetailsInfo = new ConditionsDetailsInfo();
......@@ -52,5 +53,8 @@ public class DownLoadStatisticsController {
// TODO Auto-generated catch block
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