|
@@ -1642,8 +1642,19 @@ public class MtTaskController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //检查如果是流程参与人员,不能看书记区长、区领导的批示留言数据
|
|
|
+ List<TaskMemberBean> taskMemberBeans = taskManager.findTaskMembersByTaskId(id);
|
|
|
+ final List<TaskMemberBean> currentMemberBeans = TaskMemberUtil.getMemberBeansByPid(taskMemberBeans, userId);
|
|
|
+ List<Long> shujQuzhangQuLingDaoPersonIds = null;
|
|
|
+ if(!user.hasRole("ShujQuzhang", "QuLingDao")){
|
|
|
+ isNodeManager = TaskMemberUtil.isNodeManager(taskMemberBeans, currentMemberBeans, userId);
|
|
|
+ if(isNodeManager){
|
|
|
+ shujQuzhangQuLingDaoPersonIds = TaskMemberAgentUtil.getAccountPersonByRoleCodes(
|
|
|
+ AppContext.currentLoginAccount(), List.of("ShujQuzhang", "QuLingDao"));
|
|
|
+ }
|
|
|
+ }
|
|
|
// 获得该事项的查看次数以及批示次数
|
|
|
- List<Map<String, Object>> maps = taskManager.findInstructionsAndLeavingaMessageCount(id);
|
|
|
+ List<Map<String, Object>> maps = taskManager.findInstructionsAndLeavingaMessageCount(id, shujQuzhangQuLingDaoPersonIds);
|
|
|
List<Map<String, Object>> instructionsCount = maps.stream().filter(map -> {
|
|
|
Integer ptype = (Integer) map.get("ptype");
|
|
|
boolean flag = TaskProcessTypeEnum.Instructions.getKey()==ptype || TaskProcessTypeEnum.ProgressReport.getKey() == ptype;
|
|
@@ -1668,6 +1679,7 @@ public class MtTaskController extends BaseController {
|
|
|
//model.put("instructionsCount",instructionsCount.size() == 0 ? "0" : String.valueOf(instructionsCount.get(0).get("count")));
|
|
|
model.put("instructionsCount", instructAndMsg);
|
|
|
model.put("leavingaMessageCount",LeavingaMessageCount.size() == 0 ? "0" : String.valueOf(LeavingaMessageCount.get(0).get("count")));
|
|
|
+ AppContext.putThreadContext("notShowSJQZQLDpishi", shujQuzhangQuLingDaoPersonIds);
|
|
|
model.put("allTask",taskManager.countTaskProcess("-1","","",-1,-1,"","",cid,id,personId));
|
|
|
|
|
|
//查询事项的类型是否允许显示汇报进度
|
|
@@ -6888,15 +6900,31 @@ public class MtTaskController extends BaseController {
|
|
|
Long id=ReqUtil.getLong(request, "id");
|
|
|
try {
|
|
|
Long cid = AppContext.currentLoginCorporation();
|
|
|
+ User user = AppContext.getCurrentUser();
|
|
|
+ Long userId = user.getId();
|
|
|
+
|
|
|
Long personId = AppContext.currentUserId();
|
|
|
ITaskManager manager = AppContext.getBean(ITaskManager.class);
|
|
|
List<ViewTaskVo> viewTaskVos = manager.findViewTaskVos(String.valueOf(id), BehaviorEnum.BehSummaryBehTypeEnum.ViewTask.getKey());
|
|
|
// List<Map<String, Object>> instructionsCount = manager.findInstructionsCount(id);
|
|
|
//查批示和留言
|
|
|
- List<Map<String, Object>> instructionsCount = manager.findInstructionsAndLeavingaMessageCount(id);
|
|
|
+ List<TaskMemberBean> taskMemberBeans = taskManager.findTaskMembersByTaskId(id);
|
|
|
+ final List<TaskMemberBean> currentMemberBeans = TaskMemberUtil.getMemberBeansByPid(taskMemberBeans, userId);
|
|
|
+ List<Long> shujQuzhangQuLingDaoPersonIds = null;
|
|
|
+ if(!user.hasRole("ShujQuzhang", "QuLingDao")){
|
|
|
+ boolean isNodeManager = TaskMemberUtil.isNodeManager(taskMemberBeans, currentMemberBeans, userId);
|
|
|
+ if(isNodeManager){
|
|
|
+ shujQuzhangQuLingDaoPersonIds = TaskMemberAgentUtil.getAccountPersonByRoleCodes(
|
|
|
+ AppContext.currentLoginAccount(), List.of("ShujQuzhang", "QuLingDao"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Map<String, Object>> instructionsCount = manager.findInstructionsAndLeavingaMessageCount(id,
|
|
|
+ shujQuzhangQuLingDaoPersonIds);
|
|
|
|
|
|
modelMap.put("viewCount",viewTaskVos.size());
|
|
|
//modelMap.put("allTask",manager.countTaskProcessSummaryByTaskId(id));
|
|
|
+ AppContext.putThreadContext("notShowSJQZQLDpishi", shujQuzhangQuLingDaoPersonIds);
|
|
|
modelMap.put("allTask",taskManager.countTaskProcess("-1","","",-1,-1,"","",cid,id,personId));
|
|
|
modelMap.put("instructionsCount",instructionsCount.size() == 0 ? "0" : String.valueOf(instructionsCount.get(0).get("count")));
|
|
|
RespUtil.rendJson(response, modelMap);
|