From d5a5d550eaab3c104721bd310067577ec88c3b35 Mon Sep 17 00:00:00 2001 From: yxt_djz <313618925@qq.com> Date: Mon, 20 Jun 2022 19:28:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E5=A4=96=E9=87=87=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=8A=9E=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/flowtask/FlowTaskService.java | 2 +- .../portal/biz/sysuser/SysUserService.java | 27 +++++++++++++++- .../baseoutsourcingapplicationAdd.vue | 31 ++++++++++++++----- .../workflow/baseoutsourcingapplication.vue | 28 ++++++++++------- anrui-system-ui/src/views/flow/doneList.vue | 3 +- 5 files changed, 69 insertions(+), 22 deletions(-) diff --git a/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java b/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java index c788f3379f..0c9796402c 100644 --- a/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java +++ b/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java @@ -1080,7 +1080,7 @@ public class FlowTaskService extends MybatisBaseService map= flowTaskMapper.getHistTaskByID(task.getProcessInstanceId(),targetIds.get(0)); - Map map2= flowTaskMapper.getTaskByDefKey(task.getProcessInstanceId(),item.getId()); + Map map2= flowTaskMapper.getTaskByDefKey(task.getProcessInstanceId(),targetIds.get(0)); String id_ = map2.get("id_").toString(); String assignee_ = map.get("ASSIGNEE_").toString(); taskService.setAssignee(id_,assignee_); diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java index 1ce4b6e9a5..fd6123da6f 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java @@ -35,6 +35,7 @@ import com.yxt.common.base.utils.*; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; +import org.apache.commons.collections.map.HashedMap; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -856,7 +857,31 @@ public class SysUserService extends MybatisBaseService { public ResultBean getUsersByRoleSid(String roleSid) { List users = baseMapper.getUsersByRoleSid(roleSid); - ResultBean objectResultBean = ResultBean.fireSuccess().setData(users); + List l=new ArrayList<>(); + for(SysUserVo s:users){ + l.add(s.getDepartmentName()==null?"":s.getDepartmentName()); + } + HashSet set = new HashSet(l); + //把List集合所有元素清空 + l.clear(); + //把HashSet对象添加至List集合 + l.addAll(set); + List> r=new ArrayList<>(); + for(String s:l){ + if(StringUtils.isNotBlank(s)){ + Map m=new HashMap<>(); + List us=new ArrayList<>(); + for(SysUserVo su:users){ + if(s!=null&&s.equals(su.getDepartmentName())){ + us.add(su); + } + } + m.put("dept",s); + m.put("users",us); + r.add(m); + } + } + ResultBean objectResultBean = ResultBean.fireSuccess().setData(r); return objectResultBean; } } \ No newline at end of file diff --git a/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue b/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue index e6638c248c..e87287a550 100644 --- a/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue +++ b/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue @@ -196,10 +196,10 @@ - + + + + +
+ + {{item.dept}} + + + + + {{ item.name }} + + + +
+ +
@@ -421,11 +440,9 @@ export default { }, //选择下一环节的用户 checkedUser(val) { - const choosetItem = this.users.filter((item) => item.sid == val) - console.log(this.users); - console.log(choosetItem); - this.userName = choosetItem[0].name - this.formobj.nextUserSid = choosetItem[0].sid + + this.userName = val.name + this.formobj.nextUserSid =val.sid this.nodeUserDialogVisible = false }, doSubmit(row) { diff --git a/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplication.vue b/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplication.vue index f0019c8769..89b7e3e876 100644 --- a/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplication.vue +++ b/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplication.vue @@ -108,15 +108,20 @@ - - 选择动作 - - - {{ item.name }} - - - +
+ + {{item.dept}} + + + + + {{ item.name }} + + + +
+
@@ -252,9 +257,8 @@ export default { }, //选中下一环节的用户 checkedUser(val) { - const choosetItem = this.users.filter((item) => item.sid == val) - this.userName = choosetItem[0].name - this.userSid = choosetItem[0].sid + this.userName = val.name + this.userSid = val.sid this.nodeUserDialogVisible = false }, /** xml 文件 */ diff --git a/anrui-system-ui/src/views/flow/doneList.vue b/anrui-system-ui/src/views/flow/doneList.vue index 4802983415..f711f4b5e2 100644 --- a/anrui-system-ui/src/views/flow/doneList.vue +++ b/anrui-system-ui/src/views/flow/doneList.vue @@ -72,7 +72,8 @@