Browse Source

更新OA首页数据获取的方法

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@8250 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 9 years ago
parent
commit
a7332a04f1

+ 1 - 1
src/main/java/com/uas/platform/b2b/mobile/enumeration/MobileStatus.java

@@ -66,7 +66,7 @@ public enum MobileStatus {
 	/**
 	 * {@code 205 待确认}
 	 */
-	confirmed(205, "待确认"),
+	unconfirmed(205, "待确认"),
 
 	/**
 	 * {@code 206 已完成}

+ 7 - 3
src/main/java/com/uas/platform/b2b/mobile/service/impl/WorkScheduleServiceImpl.java

@@ -98,7 +98,7 @@ public class WorkScheduleServiceImpl implements WorkScheduleService {
 					+ "t.ta_doman doman, t.ta_domancode domancode, t.ta_startdate startdate, t.ta_enddate enddate, t.ta_status status, "
 					+ "t.ta_statuscode statuscode, t.ta_recorddate recorddate, t.ta_uu uu, t.ta_taskname taskname  from office$task t where "
 					+ "ta_uu = " + enuu + " and ta_recordercode = " + emcode + "and ta_domancode <>" + emcode
-					+ " and ta_statuscode = 'unconfirmed'" + " and  to_char(ta_startdate,'yyyymm') = '" + date + "'";
+					+ " and ta_status = '待确认'" + " and  to_char(ta_startdate,'yyyymm') = '" + date + "'";
 			List<OfficeTask> task = commonDao.query(taskSql, OfficeTask.class);
 			List<OfficeTask> meTask = commonDao.query(metaskSql, OfficeTask.class);
 			task.addAll(meTask);
@@ -203,7 +203,9 @@ public class WorkScheduleServiceImpl implements WorkScheduleService {
 	public List<VisitRecord> getRecordsInOneMonth(Long emuu, Long enuu, String date) {
 		String sql = "select p.vr_detail vr_detail, p.vr_emname vr_emname, p.vr_id vr_id, p.vr_startdate vr_startdate, p.vr_cuaddress vr_cuaddress, "
 				+ "p.vr_title vr_title, p.vr_enddate vr_enddate, p.vr_cucontact vr_cucontact, p.vr_cuname vr_cuname, p.vr_date vr_date from mobile$visitrecord p where "
-				+ "vr_emuu = " + emuu + " and vr_enuu = " + enuu + " and to_char(vr_date,'yyyymm') = '" + date + "'";
+				+ "vr_emuu = " + emuu + " and vr_enuu = " + enuu + "and (to_char(vr_startdate,'yyyymm') = '" + date
+				+ "' or ( vr_startdate is null and to_char(vr_enddate,'yyyymm') = '" + date
+				+ "') or (vr_startdate is null and vr_enddate is null and to_char(vr_date,'yyyymm') = '" + date + "'))";
 		List<VisitRecord> records = commonDao.query(sql, VisitRecord.class);
 		return records;
 	}
@@ -212,7 +214,9 @@ public class WorkScheduleServiceImpl implements WorkScheduleService {
 	public List<VisitRecord> getRecordsInOneMonth(Long enuu, String date) {
 		String sql = "select p.vr_detail vr_detail, p.vr_emname vr_emname, p.vr_id vr_id, p.vr_startdate vr_startdate, p.vr_cuaddress vr_cuaddress, "
 				+ "p.vr_title vr_title, p.vr_enddate vr_enddate, p.vr_cucontact vr_cucontact, p.vr_cuname vr_cuname,  p.vr_date vr_date  from mobile$visitrecord p where "
-				+ "vr_enuu = " + enuu + " and to_char(vr_date,'yyyymm') = '" + date + "'";
+				+ "vr_enuu = " + enuu + "and (to_char(vr_startdate,'yyyymm') = '" + date
+				+ "' or ( vr_startdate is null and to_char(vr_enddate,'yyyymm') = '" + date
+				+ "') or (vr_startdate is null and vr_enddate is null and to_char(vr_date,'yyyymm') = '" + date + "'))";
 		List<VisitRecord> records = commonDao.query(sql, VisitRecord.class);
 		return records;
 	}