|
|
@@ -58,7 +58,7 @@ public class WorkScheduleServiceImpl implements WorkScheduleService {
|
|
|
+ "d.opd_actdate mpd_actdate, d.opd_outdate mpd_outdate, d.opd_recorddate mpd_recorddate, d.opd_status mpd_status, d.opd_statuscode mpd_statuscode, "
|
|
|
+ "d.opd_distance mpd_distance, d.opd_longitude mpd_longitude, d.opd_latitude mpd_latitude, d.opd_company mpd_company, d.opd_firsttime mpd_firsttime, "
|
|
|
+ "d.opd_lasttime mpd_lasttime from mobile$outplandetail d where d.opd_opid = o.op_id and o.op_enuu = "
|
|
|
- + enuu + " and o.op_recordercode = " + emcode + " and to_char(d.opd_arrivedate,'yyyymm') = '" + date
|
|
|
+ + enuu + " and o.op_recordercode = " + emcode + " and date_format(d.opd_arrivedate,'%Y%m') = '" + date
|
|
|
+ "')";
|
|
|
List<OutPlan> meOutPlans = commonDao.query(sql, OutPlan.class);
|
|
|
List<OutPlanInfo> planInfos = new ArrayList<OutPlanInfo>();
|
|
|
@@ -92,13 +92,13 @@ 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_domancode = " + emcode
|
|
|
- + " and to_char(ta_startdate,'yyyymm') = '" + date + "'";
|
|
|
+ + " and date_format(ta_startdate,'%Y%m') = '" + date + "'";
|
|
|
// 录入人是自己而且是待确认的
|
|
|
String metaskSql = "select t.ta_id id, t.ta_code code, t.ta_detail detail, t.ta_recordercode recordercode, t.ta_recorder recorder, "
|
|
|
+ "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_status = '待确认'" + " and to_char(ta_startdate,'yyyymm') = '" + date + "'";
|
|
|
+ + "ta_uu = " + enuu + " and ta_recordercode = " + emcode + " and ta_domancode <>" + emcode
|
|
|
+ + " and ta_status = '待确认'" + " and date_format(ta_startdate,'%Y%m') = '" + date + "'";
|
|
|
List<OfficeTask> task = commonDao.query(taskSql, OfficeTask.class);
|
|
|
List<OfficeTask> meTask = commonDao.query(metaskSql, OfficeTask.class);
|
|
|
task.addAll(meTask);
|
|
|
@@ -117,7 +117,7 @@ public class WorkScheduleServiceImpl implements WorkScheduleService {
|
|
|
+ "d.opd_actdate mpd_actdate, d.opd_outdate mpd_outdate, d.opd_recorddate mpd_recorddate, d.opd_status mpd_status, d.opd_statuscode mpd_statuscode, "
|
|
|
+ "d.opd_distance mpd_distance, d.opd_longitude mpd_longitude, d.opd_latitude mpd_latitude, d.opd_company mpd_company, d.opd_firsttime mpd_firsttime, "
|
|
|
+ "d.opd_lasttime mpd_lasttime from mobile$outplandetail d where d.opd_opid = o.op_id and o.op_enuu = "
|
|
|
- + enuu + " and to_char(d.opd_arrivedate,'yyyymm') = '" + date + "')";
|
|
|
+ + enuu + " and date_format(d.opd_arrivedate,'%Y%m') = '" + date + "')";
|
|
|
List<OutPlan> outPlans = commonDao.query(outsql, OutPlan.class);
|
|
|
List<OutPlanInfo> othOutPlans = new ArrayList<OutPlanInfo>();
|
|
|
if (!CollectionUtils.isEmpty(outPlans)) {
|
|
|
@@ -150,7 +150,7 @@ public class WorkScheduleServiceImpl implements WorkScheduleService {
|
|
|
String othtaSql = "select o.ta_id id, o.ta_code code, o.ta_detail detail, o.ta_recordercode recordercode, "
|
|
|
+ "o.ta_recorder recorder, o.ta_doman doman, o.ta_domancode domancode, o.ta_startdate startdate, "
|
|
|
+ "o.ta_enddate enddate,o.ta_status status, o.ta_recorddate recorddate,o.ta_uu uu, o.ta_taskname taskname from office$task o where o.ta_uu = "
|
|
|
- + enuu + " and to_char(ta_startdate,'yyyymm') = '" + date + "'";
|
|
|
+ + enuu + " and date_format(ta_startdate,'%Y%m') = '" + date + "'";
|
|
|
List<OfficeTask> tasks = commonDao.query(othtaSql, OfficeTask.class);
|
|
|
List<OfficeTask> othTasks = new ArrayList<OfficeTask>();
|
|
|
if (!CollectionUtils.isEmpty(tasks)) {
|
|
|
@@ -203,9 +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_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 + "'))";
|
|
|
+ + "vr_emuu = " + emuu + " and vr_enuu = " + enuu + " and (date_format(vr_startdate,'%Y%m') = '" + date
|
|
|
+ + "' or ( vr_startdate is null and date_format(vr_enddate,'%Y%m') = '" + date
|
|
|
+ + "') or (vr_startdate is null and vr_enddate is null and date_format(vr_date,'%Y%m') = '" + date + "'))";
|
|
|
List<VisitRecord> records = commonDao.query(sql, VisitRecord.class);
|
|
|
return records;
|
|
|
}
|
|
|
@@ -214,9 +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_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 + "'))";
|
|
|
+ + "vr_enuu = " + enuu + "and (date_format(vr_startdate,'%Y%m') = '" + date
|
|
|
+ + "' or ( vr_startdate is null and date_format(vr_enddate,'%Y%m') = '" + date
|
|
|
+ + "') or (vr_startdate is null and vr_enddate is null and date_format(vr_date,'%Y%m') = '" + date + "'))";
|
|
|
List<VisitRecord> records = commonDao.query(sql, VisitRecord.class);
|
|
|
return records;
|
|
|
}
|