|
@@ -1031,17 +1031,24 @@ public class SubquestioninfoserviceImpl implements Subquestioninfoservice {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @TargetDataSource("secondary")
|
|
|
public Page pageBySub(Page page, String subId) {
|
|
|
- StringBuffer sql = new StringBuffer();
|
|
|
- sql.append(" SELECT a.file_type fileType,a.file_addre,a.file_name,DATE_FORMAT(a.comple_date,'%Y-%m-%d') as comple_date,a.comple_desc,a.status ,b.sub_name subName,f.title unitTitle,a.date_apply,a.title,c.title as kind_sourceid,d.title as kind_typeid,a.date_conf ");
|
|
|
- sql.append(" FROM sub_q_info a LEFT JOIN sub_info b on a.sub_id =b.id ");
|
|
|
- sql.append(" LEFT JOIN t_systable c on a.kind_sourceid=c.id ");
|
|
|
- sql.append(" LEFT JOIN t_systable d on a.kind_typeid=d.id ");
|
|
|
- sql.append(" LEFT JOIN j_unit f on f.id=b.unit_id ");
|
|
|
- sql.append(" WHERE a.logic_delete_flag = 0 and a.sub_id = '"+ subId+"' ");
|
|
|
- sql.append(" GROUP BY a.id ");
|
|
|
- sql.append(" ORDER BY date_conf desc ");
|
|
|
- return subquestionInfoDao.queryForListBySql(sql.toString(), page);
|
|
|
+ PageHelper.startPage(page.getPageNo(), page.getPageSize());
|
|
|
+ List<Map<String, Object>> mapList = subquestionInfoMapper.pageQueryQuestionListBySubId(subId);
|
|
|
+ PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(mapList);
|
|
|
+ page.setList(mapList);
|
|
|
+ page.setTotalCount(pageInfo.getTotal());
|
|
|
+ return page;
|
|
|
+ // StringBuffer sql = new StringBuffer();
|
|
|
+ // sql.append(" SELECT a.file_type fileType,a.file_addre,a.file_name,DATE_FORMAT(a.comple_date,'%Y-%m-%d') as comple_date,a.comple_desc,a.status ,b.sub_name subName,f.title unitTitle,a.date_apply,a.title,c.title as kind_sourceid,d.title as kind_typeid,a.date_conf ");
|
|
|
+ // sql.append(" FROM sub_q_info a LEFT JOIN sub_info b on a.sub_id =b.id ");
|
|
|
+ // sql.append(" LEFT JOIN t_systable c on a.kind_sourceid=c.id ");
|
|
|
+ // sql.append(" LEFT JOIN t_systable d on a.kind_typeid=d.id ");
|
|
|
+ // sql.append(" LEFT JOIN j_unit f on f.id=b.unit_id ");
|
|
|
+ // sql.append(" WHERE a.logic_delete_flag = 0 and a.sub_id = '"+ subId+"' ");
|
|
|
+ // sql.append(" GROUP BY a.id ");
|
|
|
+ // sql.append(" ORDER BY date_conf desc ");
|
|
|
+ // return subquestionInfoDao.queryForListBySql(sql.toString(), page);
|
|
|
}
|
|
|
|
|
|
@Override
|