diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinacialExpenseController.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinacialExpenseController.java index faf977b9..e3a22a9b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinacialExpenseController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinacialExpenseController.java @@ -8,6 +8,7 @@ import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.remind.service.RemindService; import com.ruoyi.financial.domain.VO.FinacialExpenseVo; import com.ruoyi.system.domain.Vo.BaseExpenseAccountVo; +import com.ruoyi.system.mapper.BaseExpenseAccountMapper; import com.ruoyi.system.service.*; import org.activiti.engine.RuntimeService; import org.activiti.engine.TaskService; @@ -84,12 +85,11 @@ public class FinacialExpenseController extends BaseController @RequiresPermissions("financial:expense:list") @PostMapping("/list") @ResponseBody - public TableDataInfo list(FinacialExpense finacialExpense) - { + public TableDataInfo list(FinacialExpense finacialExpense) throws Exception { startPage(); BaseExpenseAccountVo baseExpenseAccount = new BaseExpenseAccountVo(); baseExpenseAccount.setAuditStatus("1"); - baseExpenseAccount.setManagerAuditStatus("1"); +// baseExpenseAccount.setManagerAuditStatus("1"); List list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount); return getDataTable(list); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java index b3cd511f..eb6a6b89 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java @@ -115,18 +115,8 @@ public class BaseExpenseAccountController extends BaseController @ResponseBody public TableDataInfo list(BaseExpenseAccountVo baseExpenseAccount) throws Exception { startPage(); - SysUser curUser = ShiroUtils.getSysUser(); - Long userId = curUser.getUserId(); - Set roleKeys = roleService.selectRoleKeys(userId); List list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount); -// 获取当前登录名下可看用户列表 - Set users = baseExpenseAccountService.userLimitedList(roleKeys,curUser); - - List matchedList = list.stream() - .filter(expenseAccount -> users.contains(expenseAccount.getApplyUser())) - .collect(Collectors.toList()); - - return getDataTable(matchedList); + return getDataTable(list); } /** @@ -136,8 +126,7 @@ public class BaseExpenseAccountController extends BaseController @Log(title = "报销单", businessType = BusinessType.EXPORT) @PostMapping("/export") @ResponseBody - public AjaxResult export(BaseExpenseAccountVo baseExpenseAccount) - { + public AjaxResult export(BaseExpenseAccountVo baseExpenseAccount) throws Exception { List list = baseExpenseAccountService.selectBaseExpenseAccountList(baseExpenseAccount); ExcelUtil util = new ExcelUtil(BaseExpenseAccountVo.class); return util.exportExcel(list, "报销单数据"); @@ -208,7 +197,8 @@ public class BaseExpenseAccountController extends BaseController map1.put("year", dateArray[0]); map1.put("month", dateArray[1]); map1.put("day", dateArray[2]); - map1.put("fullName", baseExpenseAccount.getFullName()); + SysUser printUser = sysUserService.selectUserByLoginName(baseExpenseAccount.getFullName()); + map1.put("fullName", printUser.getUserName()); BigDecimal sum = BigDecimal.ZERO; for (BaseExpenseAccountChild baseExpenseAccountChild : list) { BigDecimal baseExpenseAccountChildAmounts = baseExpenseAccountChild.getAmounts(); @@ -339,12 +329,19 @@ public class BaseExpenseAccountController extends BaseController String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1); boolean approvedFlag = processService.complete(taskId, instanceId, baseExpenseAccountVo.getApplyTitle(), baseExpenseAccountVo.getExpenseCode(), - "expense", new HashMap(), request); + "finacialExpense", new HashMap(), request); + Task nextTask = taskService.createTaskQuery() + .processInstanceId(instanceId) + .singleResult(); + String nextVerifyName = ""; + if(nextTask != null){ + nextVerifyName = nextTask.getTaskDefinitionKey().substring(0, 1).toUpperCase() + nextTask.getTaskDefinitionKey().substring(1); + } if(!approvedFlag){ // 审核状态-审核拒绝 - if(verifyName.contains("Bxjl")||verifyName.contains("Bxzg")){ + if(verifyName.contains("Bxjl")||verifyName.contains("Bxzg")||verifyName.contains("Yfzj")||verifyName.contains("Fzjl")){ baseExpenseAccountVo.setAuditStatus("2"); - }else if(verifyName.contains("Fzjl")||verifyName.contains("Zozj")){ + }else if(verifyName.contains("Zozj")){ baseExpenseAccountVo.setManagerAuditStatus("2"); baseExpenseAccountVo.setAuditStatus("2"); }else if(verifyName.contains("Cw")){ @@ -352,29 +349,25 @@ public class BaseExpenseAccountController extends BaseController baseExpenseAccountVo.setAuditStatus("2"); } }else{ - if(verifyName.contains("Bxzg")){ - baseExpenseAccountVo.setAuditStatus("1"); - }else if(verifyName.contains("Zozj")){ - baseExpenseAccountVo.setManagerAuditStatus("1"); - baseExpenseAccountVo.setAuditStatus("1"); - }else if(verifyName.contains("Cw")){ - baseExpenseAccountVo.setFinanceAuditStatus("1"); - baseExpenseAccountVo.setAuditStatus("1"); +// 审核通过 + if(nextVerifyName!=null){ + if(nextVerifyName.contains("Cw")){ +// 进行到财务审核,上级审核通过 + baseExpenseAccountVo.setAuditStatus("1"); + }else if(nextVerifyName.contains("Zozj")){ +// 进行到总经理审核,上级审核及财务审核通过 + baseExpenseAccountVo.setFinanceAuditStatus("1"); + baseExpenseAccountVo.setAuditStatus("1"); + } } } // 如果任务已结束更新业务表状态 方法中传入的值为原来的instanceId,只是做了调整 boolean processIsFinish = processService.judgeProcessIsFinish(instanceId); if (processIsFinish) { // 审核通过 - if(verifyName.contains("Bxzg")){ - baseExpenseAccountVo.setAuditStatus("1"); - }else if(verifyName.contains("Zozj")){ - baseExpenseAccountVo.setManagerAuditStatus("1"); - baseExpenseAccountVo.setAuditStatus("1"); - }else if(verifyName.contains("Cw")){ - baseExpenseAccountVo.setFinanceAuditStatus("1"); - baseExpenseAccountVo.setAuditStatus("1"); - } + baseExpenseAccountVo.setManagerAuditStatus("1"); + baseExpenseAccountVo.setFinanceAuditStatus("1"); + baseExpenseAccountVo.setAuditStatus("1"); // 提交 if("submit".equals(instanceType)){ // 使用状态-是 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountService.java index 7d9029d2..ee994539 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseExpenseAccountService.java @@ -33,7 +33,7 @@ public interface IBaseExpenseAccountService */ // public List selectBaseExpenseAccountList(BaseExpenseAccount baseExpenseAccount); - public List selectBaseExpenseAccountList(BaseExpenseAccountVo baseExpenseAccount); + public List selectBaseExpenseAccountList(BaseExpenseAccountVo baseExpenseAccount) throws Exception; /** * 新增报销单 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java index 51160211..465134b4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java @@ -5,6 +5,8 @@ import java.util.stream.Collectors; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.page.PageDomain; @@ -17,6 +19,8 @@ import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; import com.ruoyi.system.domain.BaseExpenseAccountChild; import com.ruoyi.system.domain.Vo.BaseExpenseAccountVo; +import com.ruoyi.system.domain.Vo.BaseRequisitioningOrderVo; +import com.ruoyi.system.mapper.SysDeptMapper; import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.service.IBaseExpenseAccountChildService; import com.ruoyi.system.service.ISysRoleService; @@ -71,6 +75,9 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService @Autowired private ISysUserService sysUserService; + @Autowired + private SysDeptMapper deptMapper; + /** * 查询报销单 * @@ -95,14 +102,26 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService * @return 报销单 */ @Override - public List selectBaseExpenseAccountList(BaseExpenseAccountVo baseExpenseAccount) - { + public List selectBaseExpenseAccountList(BaseExpenseAccountVo baseExpenseAccount) throws Exception { + SysUser curUser = ShiroUtils.getSysUser(); + Long userId = curUser.getUserId(); + Set roleKeys = roleService.selectRoleKeys(userId); + List Volist = baseExpenseAccountMapper.selectBaseExpenseAccountList(baseExpenseAccount); + +// 获取当前登录名下可看用户列表 + Set users = userLimitedList(roleKeys,curUser); + + List matchedList = Volist.stream() + .filter(expenseAccount -> users.contains(expenseAccount.getApplyUser())) + .collect(Collectors.toList()); + PageDomain pageDomain = TableSupport.buildPageRequest(); Integer pageNum = pageDomain.getPageNum(); Integer pageSize = pageDomain.getPageSize(); PageHelper.startPage(pageNum, pageSize); //PageHelper 仅对第一List分页有效 - Page list = (Page) baseExpenseAccountMapper.selectBaseExpenseAccountList(baseExpenseAccount); + PageInfo pageInfo = new PageInfo<>(matchedList); + List list = pageInfo.getList(); Page returnList = new Page<>(); for(BaseExpenseAccountVo baseExpenseAccountVo : list){ SysUser sysUser = userMapper.selectUserByLoginName(baseExpenseAccountVo.getCreateBy()); @@ -144,16 +163,18 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService baseExpenseAccountVo.setTaskName("未启动"); } baseExpenseAccountVo.setTaskStatus(baseExpenseAccountVo.getTaskName()); - if(baseExpenseAccountVo.getAuditStatus()!=null){ - if(baseExpenseAccountVo.getAuditStatus().equals("1")){ + if(baseExpenseAccountVo.getManagerAuditStatus()!=null){ + if(baseExpenseAccountVo.getManagerAuditStatus().equals("1")){ baseExpenseAccountVo.setTaskStatus("审核通过"); - }else if(baseExpenseAccountVo.getAuditStatus().equals("2")){ + }else if(baseExpenseAccountVo.getAuditStatus().equals("2") + ||baseExpenseAccountVo.getFinanceAuditStatus().equals("2") + ||baseExpenseAccountVo.getManagerAuditStatus().equals("2")){ baseExpenseAccountVo.setTaskStatus("审核拒绝"); } } returnList.add(baseExpenseAccountVo); } - returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.getTotal()); + returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.size()); returnList.setPageNum(pageNum); returnList.setPageSize(pageSize); return returnList; @@ -338,6 +359,23 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService SysUser user = ShiroUtils.getSysUser(); baseExpenseAccount.setApplyUser(user.getLoginName()); baseExpenseAccount.setApplyTime(DateUtils.getNowDate()); + Set roleKeys = roleService.selectRoleKeys(user.getUserId()); + if(roleKeys.contains("admin")||roleKeys.contains("ywjlRole")||roleKeys.contains("yfzjRole") + ||roleKeys.contains("fzjlRole")||roleKeys.contains("pzjlRole") + ||roleKeys.contains("shjlRole") ||roleKeys.contains("cwzgRole") + ||roleKeys.contains("zozjRole")){ + // 角色包含业务经理、研发总监、副总经理、品质经理、售后经理、财务主管、总经总助、admin 直接到财务审核 + // 上级审核设置为通过 + baseExpenseAccount.setAuditStatus("1"); + } + if(roleKeys.contains("cwshRole")){ + //财务审核转到总经理 + // 上级审核、财务审核设置为通过 + baseExpenseAccount.setAuditStatus("1"); + baseExpenseAccount.setFinanceAuditStatus("1"); + } + + String applyTitle = ""; if (baseExpenseAccount.getExpenseId() == null || baseExpenseAccount.getExpenseId() == 0){ insertBaseExpenseAccount(baseExpenseAccount); @@ -374,7 +412,7 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService private ProcessInstance startProcessInstance(String applyTitle, String instanceType, BaseExpenseAccount baseExpenseAccount, SysUser user) { Long expenseId = baseExpenseAccount.getExpenseId(); String businessKey = expenseId.toString(); // 实体类 ID,作为流程的业务 key - String key = "expense"; + String key = "finacialExpense"; Map variables = new HashMap<>(); // 构造authority传参 buildAuthority(user, variables); @@ -392,52 +430,84 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService Set roleKeys = roleService.selectRoleKeys(user.getUserId()); variables.put("authority",1); + variables.put("zgExist",false); + variables.put("jlExist",true); + variables.put("yfzjExist",false); + variables.put("fzjlExist",false); //判断请购人的角色,进入相应的逻辑,设置节点审批人变量 - if(roleKeys.contains("ywyRole") || roleKeys.contains("ywjlRole") || roleKeys.contains("ywzgRole")){ - // 业务经理 + if(roleKeys.contains("ywyRole")){ + // 业务员/业务助理--->业务部经理 variables.put("bxjlRole","ywjlRole"); - // 业务主管 - variables.put("bxzgRole","ywzgRole"); - }else if(roleKeys.contains("cgyRole") || roleKeys.contains("cgjlRole") || roleKeys.contains("cgzgRole")){ - // 采购经理 - variables.put("bxjlRole","cgjlRole"); - // 采购主管 - variables.put("bxzgRole","cgzgRole"); - }else if(roleKeys.contains("wwyRole") || roleKeys.contains("wwjlRole") || roleKeys.contains("wwzgRole")){ - // 委外经理 - variables.put("bxjlRole","wwjlRole"); - // 委外主管 - variables.put("bxzgRole","wwzgRole"); - }else if (roleKeys.contains("gcwyRole") || roleKeys.contains("gcjlRole") || roleKeys.contains("gczgRole")){ - // 工程经理 + }else if(roleKeys.contains("jggcsRole")){ + //结构工程师--->工程经理--->研发总监 variables.put("bxjlRole","gcjlRole"); - // 工程主管 - variables.put("bxzgRole","gczgRole"); - } else if (roleKeys.contains("scyRole") || roleKeys.contains("scjlRole") || roleKeys.contains("sczgRole")){ - // 生产经理 + variables.put("yfzjExist",true); + }else if(roleKeys.contains("dqgcsRole")){ + //电气工程师--->电气主管--->研发总监 + variables.put("bxzgRole","dqzgRole"); + variables.put("jlExist",false); + variables.put("yfzjExist",true); + }else if(roleKeys.contains("rjgcsRole")||roleKeys.contains("csgcsRole")||roleKeys.contains("gcwyRole") + ||roleKeys.contains("dqzgRole")||roleKeys.contains("gcjlRole")){ + //软件工程师/测试工程师/工程文员--->研发总监 + //电气主管 ---> 研发总监 + //工程经理 ---> 研发总监 + variables.put("jlExist",false); + variables.put("yfzjExist",true); + } else if(roleKeys.contains("cgyRole")||roleKeys.contains("ckzgRole") + ||roleKeys.contains("hrjlRole")||roleKeys.contains("scjlRole")){ + // 采购员--->副总经理 + // 仓库主管 ---> 副总经理 + // 人事经理 ---> 副总经理 + // 生产经理 ---> 副总经理 + variables.put("jlExist",false); + variables.put("fzjlExist",true); + }else if (roleKeys.contains("scyRole")){ + // 生产员--->生产经理--->副总经理 variables.put("bxjlRole","scjlRole"); - // 生产主管 - variables.put("bxzgRole","sczgRole"); - }else if (roleKeys.contains("shgcsRole") || roleKeys.contains("shjlRole") || roleKeys.contains("shzgRole")){ - // 售后经理 - variables.put("bmjlRole","shjlRole"); - // 售后主管 - variables.put("bmzgRole","shzgRole"); - }else if(roleKeys.contains("cgyyRole") || roleKeys.contains("ckjlRole") || roleKeys.contains("ckzgRole")){ - variables.put("bmjlRole","ckjlRole"); - // 仓库主管 - variables.put("bmzgRole","ckzgRole"); - }else if (roleKeys.contains("cwRole") || roleKeys.contains("cwjlRole")|| roleKeys.contains("cwzgRole")){ - variables.put("bmjlRole","cwjlRole"); - // 财务主管 - variables.put("bmzgRole","cwzgRole"); - }else{ - variables.put("authority",2); + variables.put("fzjlExist",true); + }else if(roleKeys.contains("pzwyRole")||roleKeys.contains("iqczyRole")||roleKeys.contains("ipqczyRole")||roleKeys.contains("fqczyRole")){ + // IQC/IPQC/FQC/品质文员--->品质经理 + variables.put("bxjlRole","pzjlRole"); + }else if (roleKeys.contains("shgcsRole")){ + // 售后工程师--->售后主管--->售后经理 + variables.put("bxjlRole","shjlRole"); + variables.put("bxzgRole","shzgRole"); + variables.put("zgExist",true); + }else if (roleKeys.contains("shzgRole")){ + // 售后主管--->售后经理 + variables.put("bxjlRole","shjlRole"); + } else if(roleKeys.contains("cgyyRole")){ + // 仓库文员--->仓库主管--->副总经理 + variables.put("bxzgRole","ckzgRole"); + variables.put("zgExist",true); + variables.put("fzjlExist",true); + variables.put("jlExist",false); + }else if(roleKeys.contains("hrzyRole")){ + // 人事助理/专员--->人事经理--->副总经理 + variables.put("fzjlExist",true); + variables.put("bxjlRole","hrjlRole"); + }else if (roleKeys.contains("cwzyRole")){ + // 会计--->财务主管 + variables.put("bxzgRole","cwzgRole"); + variables.put("zgExist",true); + variables.put("jlExist",false); } - if(roleKeys.contains("admin")){ - // 角色包含业务经理、采购经理、工程经理、生产经理 + if(roleKeys.contains("admin")||roleKeys.contains("ywjlRole")||roleKeys.contains("yfzjRole") + ||roleKeys.contains("fzjlRole")||roleKeys.contains("pzjlRole") + ||roleKeys.contains("shjlRole") ||roleKeys.contains("cwzgRole") + ||roleKeys.contains("zozjRole")){ + // 角色包含业务经理、研发总监、副总经理、品质经理、售后经理、财务主管、总经总助、admin 直接到财务审核 + variables.put("jlExist",true); + } + if(roleKeys.contains("cwshRole")){ + //财务审核转到总经理 variables.put("authority",2); } + if(roleKeys.contains("zjlRole")){ + //总经理直接通过 + variables.put("authority",3); + } } @Override public Object getId() { @@ -458,33 +528,47 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService Set curUserName = new HashSet<>(); curUserName.add(curUser.getLoginName()); - if(roleKeys.contains("zjlRole") || roleKeys.contains("zozjRole") || roleKeys.contains("fzjlRole") || roleKeys.contains("admin")){ + if(roleKeys.contains("zjlRole") || roleKeys.contains("zozjRole") + || roleKeys.contains("fzjlRole") || roleKeys.contains("admin") + || roleKeys.contains("cwshRole")){ Set users = sysUserlist.stream() .map(SysUser::getLoginName) // 提取每个 SysUser 对象的 name 属性 .collect(Collectors.toSet()); return users; - }else if(roleKeys.contains("gczgRole") || roleKeys.contains("sczgRole") || roleKeys.contains("cgzgRole") - || roleKeys.contains("ywzgRole")|| roleKeys.contains("wwzgRole")|| roleKeys.contains("shzgRole") - || roleKeys.contains("ckzgRole")|| roleKeys.contains("cwzgRole")) { -// 部门主管查询部门的所有,查看对应部门下的所有 + }else if(roleKeys.contains("gcjlRole") || roleKeys.contains("scjlRole") || roleKeys.contains("cgjlRole") + || roleKeys.contains("ywjlRole")|| roleKeys.contains("wwjlRole")|| roleKeys.contains("shjlRole") + || roleKeys.contains("ckjlRole")|| roleKeys.contains("yfzjRole")|| roleKeys.contains("cwjlRole")) { + // 部门经理查询部门所属下的所有 + // 去除列表中部门id为空的数据 sysUserlist = sysUserlist.stream().filter(item->(item.getDeptId()!=null)).collect(Collectors.toList()); - List findUser = sysUserlist.stream().filter(item -> (item.getDeptId().equals(curUser.getDeptId()))).collect(Collectors.toList()); + List eyeDepts = deptMapper.selectChildrenDeptById(curUser.getDeptId()); + // 提取部门id + Set deptIds = eyeDepts.stream() + .map(SysDept::getDeptId) // 假设 SysDept 有一个 getDeptId 方法 + .collect(Collectors.toSet()); + // 添加当前经理部门id + deptIds.add(curUser.getDeptId()); + // 过滤 sysUserlist,只保留那些 deptId 存在于 deptIds 集合中的用户 + List findUser = sysUserlist.stream() + .filter(item -> deptIds.contains(item.getDeptId())) + .collect(Collectors.toList()); + findUser.add(curUser); Set users = findUser.stream() .map(SysUser::getLoginName) .collect(Collectors.toSet()); // 使用 Set 可以提高查找效率 return users; - }else if(roleKeys.contains("gcjlRole") || roleKeys.contains("scjlRole") || roleKeys.contains("cgjlRole") - || roleKeys.contains("ywjlRole")|| roleKeys.contains("wwjlRole")|| roleKeys.contains("shjlRole") - || roleKeys.contains("ckjlRole")|| roleKeys.contains("cwjlRole")) { -// 部门经理查询部门的所有,查看对应部门下的所有 + }else if(roleKeys.contains("gczgRole") || roleKeys.contains("sczgRole") || roleKeys.contains("cgzgRole") + || roleKeys.contains("ywzgRole")|| roleKeys.contains("wwzgRole")|| roleKeys.contains("shzgRole") + || roleKeys.contains("ckzgRole")|| roleKeys.contains("cwzgRole")) { +// 部门主管查看部门的所有,查看自己所属的所有 sysUserlist = sysUserlist.stream().filter(item->(item.getDeptId()!=null)).collect(Collectors.toList()); List findUser = sysUserlist.stream().filter(item -> (item.getDeptId().equals(curUser.getDeptId()))).collect(Collectors.toList()); // 过滤出与 curUser 不同且 roles 包含curUser相同roleKey的用户 findUser = findUser.stream() - .filter(user -> !user.getRoles().stream()//去除部门下主管角色 + .filter(user -> !user.getRoles().stream()//去除同部门下主管角色 .anyMatch(role -> role.getRoleKey().endsWith("zgRole"))) - .filter(user -> !user.getRoles().stream() + .filter(user -> !user.getRoles().stream()//去除同部门下经理角色 .anyMatch(role -> role.getRoleKey().endsWith("jlRole"))) .collect(Collectors.toList()); diff --git a/ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountMapper.xml index 6b7dadf9..0a2279a6 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountMapper.xml @@ -78,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and b.apply_time = #{applyTime} and b.expense_code like concat('%',#{keyword},'%') - and b.create_time between #{params.beginTime} and #{params.endTime} + and Date(b.create_time) between #{params.beginTime} and #{params.endTime} ' + value + ''; } }, - {title: '上级审核状态',field: 'auditStatus',align: 'center', + {title: '当前状态',field: 'taskStatus', + align: 'center', formatter: function(value, row, index) { - return $.table.selectDictLabel(auditStatusData, value); + return '' + value + ''; } }, - {title: '总经理审核状态',field: 'managerAuditStatus',align: 'center', + {title: '上级审核状态',field: 'auditStatus',align: 'center', formatter: function(value, row, index) { return $.table.selectDictLabel(auditStatusData, value); } @@ -161,6 +163,11 @@ return $.table.selectDictLabel(finacialExpenseStatusDatas, value); } }, + {title: '总经理审核状态',field: 'managerAuditStatus',align: 'center', + formatter: function(value, row, index) { + return $.table.selectDictLabel(auditStatusData, value); + } + }, {title: '报销单编号',field: 'expenseCode',align: 'center',}, {title: '报销人',field: 'applyUser',align: 'center',}, {title: '报销方式',field: 'expenseMethod', align: 'center', diff --git a/ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html b/ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html index 077cc6fb..7c6dfc65 100644 --- a/ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html +++ b/ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html @@ -144,8 +144,8 @@ {title:'流程作废实例ID',field: 'cancelInstanceId',visible: false,align: 'center',}, {title: '流程恢复实例ID',field: 'restoreInstanceId', visible: false,align: 'center',}, {title: '流程实例类型', field: 'instanceTypeName',visible: false,align: 'center',}, - {title: '申请人',field: 'applyUserName', align: 'center', - formatter: function(value, row, index) {return '' + (value ? value : "-") + '';} + {title: '申请人',field: 'applyUserName', align: 'center', + // formatter: function(value, row, index) {return '' + (value ? value : "-") + '';} }, {title: '申请时间',field: 'applyTime',width: 150,align: 'center',}, {title: '当前任务ID',field: 'taskId',visible: false,align: 'center',}, @@ -167,14 +167,14 @@ return $.table.selectDictLabel(auditStatusData, value); } }, - {title: '总经理状态',field: 'managerAuditStatus',align: 'center', + {title: '财务状态',field: 'financeAuditStatus',align: 'center', formatter: function(value, row, index) { - return $.table.selectDictLabel(auditStatusData, value); + return $.table.selectDictLabel(finacialExpenseStatusDatas, value); } }, - {title: '财务状态',field: 'financeAuditStatus',align: 'center', + {title: '总经理状态',field: 'managerAuditStatus',align: 'center', formatter: function(value, row, index) { - return $.table.selectDictLabel(finacialExpenseStatusDatas, value); + return $.table.selectDictLabel(auditStatusData, value); } }, {title: '报销单编号',field: 'expenseCode',align: 'center',}, @@ -220,7 +220,7 @@ actions.push(' 进度查看 '); } if(row.auditStatus=="1" && row.managerAuditStatus=="1") { - actions.push(' 导出 '); + actions.push(' 导出 '); } if(row.auditStatus=="1" && row.financeAuditStatus=="3" && row.managerAuditStatus=="1") { actions.push(' 确认打款'); @@ -297,8 +297,11 @@ $.modal.open("确认打款",prefix + "/confirmExpense/" + expenseId); } /*导出报销单*/ - function exportExpense(expenseId){ - window.location.href = prefix + "/excelExpenseVoucher/" + expenseId; + function exportExpense(expenseId,expenseCode){ + var tipMsg = `确定导出 ${expenseCode} 单据吗?`; + $.modal.confirm(tipMsg,function(){ + window.location.href = prefix + "/excelExpenseVoucher/" + expenseId; + }) } diff --git a/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskYfzjVerify.html b/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskYfzjVerify.html new file mode 100644 index 00000000..52cc2128 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/baseExpense/taskYfzjVerify.html @@ -0,0 +1,268 @@ + + + + + + + + +
+
+ + + + + + + +
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+ 选择报销分类信息 +
+
+
+
+
+
+
+
+
+ + + + + + + \ No newline at end of file