haogh 6 月之前
父節點
當前提交
50a57ce757

+ 8 - 1
src/cn/hmsoft/art/data/dao/ly/LyRoomWrittenDao.java

@@ -78,6 +78,13 @@ public class LyRoomWrittenDao extends PlatformDaoSupport<LyRoomWritten> {
 		sql += " group by room_seq,room_name  ";
 		return this.findMapBySql(sql, ly_room_id);
 	}
-	
+
+	public List<Map<String,Object>> listAspectTicketNum(Integer ly_room_id) {
+		String sql = "SELECT aspect_name,min(ticket_no) start_num,max(ticket_no) end_num FROM ly_std_subject t,std_reg r,ly_room_written w,std_enrol e  ";
+		sql += " WHERE t.std_id=r.std_id AND t.ly_room_id=w.ly_room_id AND t.std_id=e.std_id AND t.ly_room_id=?   ";
+		sql += " AND t.subject_type='Written' GROUP BY e.aspect_name ORDER BY start_num  ";
+		return this.listMapBySql(sql, ly_room_id);
+
+	}
 
 }

+ 2 - 0
src/cn/hmsoft/art/data/dao/ly/LyStdSubjectDao.java

@@ -28,6 +28,8 @@ public class LyStdSubjectDao extends PlatformDaoSupport<LyStdSubject> {
 	 */
 	public List<StdReg> listGroupStdByAspectTicketNum(int ly_group_id) {
 		String sql = "select aspect_ticket_num,std.std_id,std.std_province from ly_std_subject sb,std_reg std where std.std_id=sb.std_id and ly_group_id=? group by aspect_ticket_num,std.std_id,std.std_province order by aspect_ticket_num";
+		//TODO 临时处理
+//		String sql = "select aspect_ticket_num,std.std_id,std.std_province from ly_std_subject sb,std_reg std where std.std_id=sb.std_id and ly_group_id=? group by aspect_ticket_num,std.std_id,std.std_province order by std.STD_PARAM1+0";
 		return this.listBySql(StdReg.class, sql, ly_group_id);
 	}