|
|
@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.uas.platform.b2b.dao.OfficeTaskDao;
|
|
|
import com.uas.platform.b2b.mobile.dao.OutPlanDao;
|
|
|
import com.uas.platform.b2b.mobile.dao.OutSignDao;
|
|
|
@@ -41,9 +42,10 @@ public class WorkScheduleServiceImpl implements WorkScheduleService {
|
|
|
public ModelMap getWorkSchedule(Long emcode, Long enuu) {
|
|
|
ModelMap map = new ModelMap();
|
|
|
UserCenter user = userCenterDao.getUserInfoByEmcodeAndEnuu(emcode, enuu);
|
|
|
- WorkSchedule workSchedule = new WorkSchedule();
|
|
|
if (user != null) {
|
|
|
+ WorkSchedule workSchedule = new WorkSchedule();
|
|
|
List<OutPlan> meOutPlans = outPlanDao.findByRecorderCodeAndEnuu(emcode, enuu);
|
|
|
+ System.out.println(JSON.toJSON(meOutPlans));
|
|
|
List<OutPlanInfo> planInfos = new ArrayList<OutPlanInfo>();
|
|
|
if (!CollectionUtils.isEmpty(meOutPlans)) {
|
|
|
for (OutPlan ou : meOutPlans) {
|
|
|
@@ -62,9 +64,9 @@ public class WorkScheduleServiceImpl implements WorkScheduleService {
|
|
|
info.setMpd_status(detail.getMpd_status());
|
|
|
info.setMpd_outdate(detail.getMpd_outdate());
|
|
|
info.setMpd_arrivedate(detail.getMpd_arrivedate());
|
|
|
- planInfos.add(info);
|
|
|
}
|
|
|
}
|
|
|
+ planInfos.add(info);
|
|
|
}
|
|
|
}
|
|
|
// List<OutSign> meOutSigns = outSignDao.findByEnuuAndEmcode(enuu,
|
|
|
@@ -74,6 +76,7 @@ public class WorkScheduleServiceImpl implements WorkScheduleService {
|
|
|
workSchedule.setOutPlan(planInfos);
|
|
|
map.put("me", workSchedule);
|
|
|
if (user.getIsAdmin().equals(Constant.YES)) {// 管理员,获取下属任务等
|
|
|
+ WorkSchedule workSchedules = new WorkSchedule();
|
|
|
List<OutPlan> outPlans = outPlanDao.findByEnuu(enuu);
|
|
|
List<OutPlanInfo> othOutPlans = new ArrayList<OutPlanInfo>();
|
|
|
if (!CollectionUtils.isEmpty(outPlans)) {
|
|
|
@@ -118,9 +121,9 @@ public class WorkScheduleServiceImpl implements WorkScheduleService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- workSchedule.setTask(othTasks);
|
|
|
- workSchedule.setOutPlan(othOutPlans);
|
|
|
- map.put("other", workSchedule);
|
|
|
+ workSchedules.setTask(othTasks);
|
|
|
+ workSchedules.setOutPlan(othOutPlans);
|
|
|
+ map.put("other", workSchedules);
|
|
|
}
|
|
|
}
|
|
|
return map;
|