|
@@ -55,6 +55,7 @@ import com.jeeplus.modules.workcalendar.service.WorkCalendarService;
|
|
|
import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
|
|
|
import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
|
|
|
import net.sf.json.JSONArray;
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
import org.apache.shiro.authz.UnauthorizedException;
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
@@ -634,37 +635,71 @@ public class LoginController extends BaseController{
|
|
|
workProjectNotifyPage.setPageSize(10);
|
|
|
// 查询中台待办数据
|
|
|
List<WorkProjectNotify> notifyList = centerCpaTaskService.getNotifyList(workProjectNotify);
|
|
|
- //苏州分公司cloud数据
|
|
|
- List<Map<String, Object>> result = new ArrayList<>();
|
|
|
- Object sz = szFlowRequest.getNotifyList(workProjectNotify, "sz", user);
|
|
|
- List<Map<String, Object>> res = (List) JSONObject.parseArray(JSON.toJSONString(sz));
|
|
|
- result.addAll((List) JSON.parseArray(JSON.toJSONString(res)));
|
|
|
- List<WorkProjectNotify> processVos = SzConvertServiceUtil.convertWorkProjectNotifyList(result);
|
|
|
- if (processVos.size()>0){
|
|
|
- Page<WorkProjectNotify> notifyPage = workProjectNotifyService.findPage(new Page<WorkProjectNotify>(1, 10), workProjectNotify);
|
|
|
- List<WorkProjectNotify> list = notifyPage.getList();
|
|
|
- processVos.addAll(list);
|
|
|
- disposePageResp(processVos); // 查询结果处理
|
|
|
- workProjectNotifyPage.getList().addAll(processVos);
|
|
|
- Page<WorkProjectNotify> resultPage = ConvertServiceUtil.getSortAndPaging(workProjectNotifyPage, workProjectNotifyPage.getList());
|
|
|
- model.addAttribute("notifyPage", resultPage.getList());
|
|
|
- model.addAttribute("notifyCount", workProjectNotifyPage.getList().size());//未读通知条数
|
|
|
- model.addAttribute("notifyCount1", workProjectNotifyPage.getCount());//未读通知条数
|
|
|
- } else if (notifyList.size() > 0) {
|
|
|
- disposePageResp(notifyList); // 查询结果处理
|
|
|
- workProjectNotifyPage.getList().addAll(notifyList);
|
|
|
- Page<WorkProjectNotify> resultPage = ConvertServiceUtil.getSortAndPaging(workProjectNotifyPage, workProjectNotifyPage.getList());
|
|
|
- model.addAttribute("notifyPage", resultPage.getList());
|
|
|
- model.addAttribute("notifyCount", workProjectNotifyPage.getList().size());//未读通知条数
|
|
|
- model.addAttribute("notifyCount1", workProjectNotifyPage.getCount());//未读通知条数
|
|
|
- } else {
|
|
|
- // 中台没有查询到待办时,查询本系统待办分页数据
|
|
|
- Page<WorkProjectNotify> notifyPage = workProjectNotifyService.findPage(new Page<WorkProjectNotify>(1, 10), workProjectNotify);
|
|
|
- disposePageResp(notifyPage.getList()); // 查询结果处理
|
|
|
- model.addAttribute("notifyPage", notifyPage.getList());
|
|
|
- model.addAttribute("notifyCount", notifyPage.getList().size());//未读通知条数
|
|
|
- model.addAttribute("notifyCount1", notifyPage.getCount());//未读通知条数
|
|
|
+ if (CollectionUtils.isEmpty(notifyList)){
|
|
|
+ String connect = JedisUtils.get("connect");
|
|
|
+ if (StringUtils.isNotBlank(connect) && connect.equals("true")){
|
|
|
+ //苏州分公司cloud数据
|
|
|
+ List<Map<String, Object>> result = new ArrayList<>();
|
|
|
+ Object sz = szFlowRequest.getNotifyList(workProjectNotify, "sz", user);
|
|
|
+ List<Map<String, Object>> res = (List) JSONObject.parseArray(JSON.toJSONString(sz));
|
|
|
+ if (res != null){
|
|
|
+ result.addAll((List) JSON.parseArray(JSON.toJSONString(res)));
|
|
|
+ List<WorkProjectNotify> processVos = SzConvertServiceUtil.convertWorkProjectNotifyList(result);
|
|
|
+ if (processVos.size()>0){
|
|
|
+ Page<WorkProjectNotify> notifyPage = workProjectNotifyService.findPage(new Page<WorkProjectNotify>(1, 10), workProjectNotify);
|
|
|
+ List<WorkProjectNotify> list = notifyPage.getList();
|
|
|
+ processVos.addAll(list);
|
|
|
+ disposePageResp(processVos); // 查询结果处理
|
|
|
+ workProjectNotifyPage.getList().addAll(processVos);
|
|
|
+ Page<WorkProjectNotify> resultPage = ConvertServiceUtil.getSortAndPaging(workProjectNotifyPage, workProjectNotifyPage.getList());
|
|
|
+ model.addAttribute("notifyPage", resultPage.getList());
|
|
|
+ model.addAttribute("notifyCount", workProjectNotifyPage.getList().size());//未读通知条数
|
|
|
+ model.addAttribute("notifyCount1", workProjectNotifyPage.getCount());//未读通知条数
|
|
|
+ }else {
|
|
|
+ // 中台没有查询到待办时,查询本系统待办分页数据
|
|
|
+ Page<WorkProjectNotify> notifyPage = workProjectNotifyService.findPage(new Page<WorkProjectNotify>(1, 10), workProjectNotify);
|
|
|
+ disposePageResp(notifyPage.getList()); // 查询结果处理
|
|
|
+ model.addAttribute("notifyPage", notifyPage.getList());
|
|
|
+ model.addAttribute("notifyCount", notifyPage.getList().size());//未读通知条数
|
|
|
+ model.addAttribute("notifyCount1", notifyPage.getCount());//未读通知条数
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 本系统待办分页数据查询
|
|
|
+ Page<WorkProjectNotify> notifyPage = workProjectNotifyService.findPage(new Page<WorkProjectNotify>(1, 10), workProjectNotify);
|
|
|
+ disposePageResp(notifyPage.getList()); // 查询结果处理
|
|
|
+ model.addAttribute("notifyPage", notifyPage.getList());
|
|
|
+ model.addAttribute("notifyCount", notifyPage.getList().size());//未读通知条数
|
|
|
+ model.addAttribute("notifyCount1", notifyPage.getCount());//未读通知条数
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ // 本系统待办分页数据查询
|
|
|
+ Page<WorkProjectNotify> notifyPage = workProjectNotifyService.findPage(new Page<WorkProjectNotify>(1, 10), workProjectNotify);
|
|
|
+ disposePageResp(notifyPage.getList()); // 查询结果处理
|
|
|
+ model.addAttribute("notifyPage", notifyPage.getList());
|
|
|
+ model.addAttribute("notifyCount", notifyPage.getList().size());//未读通知条数
|
|
|
+ model.addAttribute("notifyCount1", notifyPage.getCount());//未读通知条数
|
|
|
+ }
|
|
|
+
|
|
|
+ }else {
|
|
|
+ if (notifyList.size() > 0) {
|
|
|
+ disposePageResp(notifyList); // 查询结果处理
|
|
|
+ workProjectNotifyPage.getList().addAll(notifyList);
|
|
|
+ Page<WorkProjectNotify> resultPage = ConvertServiceUtil.getSortAndPaging(workProjectNotifyPage, workProjectNotifyPage.getList());
|
|
|
+ model.addAttribute("notifyPage", resultPage.getList());
|
|
|
+ model.addAttribute("notifyCount", workProjectNotifyPage.getList().size());//未读通知条数
|
|
|
+ model.addAttribute("notifyCount1", workProjectNotifyPage.getCount());//未读通知条数
|
|
|
+ }else {
|
|
|
+ // 本系统待办分页数据查询
|
|
|
+ Page<WorkProjectNotify> notifyPage = workProjectNotifyService.findPage(new Page<WorkProjectNotify>(1, 10), workProjectNotify);
|
|
|
+ disposePageResp(notifyPage.getList()); // 查询结果处理
|
|
|
+ model.addAttribute("notifyPage", notifyPage.getList());
|
|
|
+ model.addAttribute("notifyCount", notifyPage.getList().size());//未读通知条数
|
|
|
+ model.addAttribute("notifyCount1", notifyPage.getCount());//未读通知条数
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
} else {
|
|
|
// 本系统待办分页数据查询
|
|
|
Page<WorkProjectNotify> notifyPage = workProjectNotifyService.findPage(new Page<WorkProjectNotify>(1, 10), workProjectNotify);
|