| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.constant.DictConstants; |
| | | import com.ruoyi.common.core.domain.entity.TDept; |
| | | import com.ruoyi.common.utils.DictUtils; |
| | | import com.ruoyi.system.mapper.OaApprovalMapper; |
| | | import com.ruoyi.system.mapper.TDeptMapper; |
| | | import com.ruoyi.system.model.OaApproval; |
| | | import com.ruoyi.system.query.ApprovalListQuery; |
| | | import com.ruoyi.system.query.ApprovalNodeListQuery; |
| | | import com.ruoyi.system.service.OaApprovalService; |
| | | import com.ruoyi.system.vo.system.ApprovalVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | List<ApprovalVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | for (ApprovalVO approvalVO : list) { |
| | | StringBuilder deptName = new StringBuilder(); |
| | | for (String deptId : approvalVO.getDeptIds().split(",")) { |
| | | String orDefault = deptMaps.getOrDefault(Integer.parseInt(deptId), ""); |
| | | deptName.append(orDefault).append(","); |
| | | if(StringUtils.hasLength(approvalVO.getDeptIds())&&approvalVO.getDeptIds().equals("-1")){ |
| | | approvalVO.setDeptName("所有部门"); |
| | | }else{ |
| | | for (String deptId : approvalVO.getDeptIds().split(",")) { |
| | | String orDefault = deptMaps.getOrDefault(Integer.parseInt(deptId), ""); |
| | | deptName.append(orDefault).append(","); |
| | | } |
| | | approvalVO.setDeptName(deptName.substring(0,deptName.length()-1)); |
| | | } |
| | | approvalVO.setDeptName(deptName.substring(0,deptName.length()-1)); |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |