|
|
@@ -37,7 +37,10 @@ import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
|
|
import cn.iocoder.yudao.module.system.api.dept.PostApi;
|
|
|
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
|
|
import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
|
|
|
+import cn.iocoder.yudao.module.system.api.dicttenant.DictDataTenantApi;
|
|
|
+import cn.iocoder.yudao.module.system.api.dicttenant.dto.DictDataTenantRespDTO;
|
|
|
import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
|
|
|
+import cn.iocoder.yudao.module.system.enums.dicttenant.DictTypeTenantEnum;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
@@ -108,6 +111,8 @@ public class OaLeaveServiceImpl implements OaLeaveService {
|
|
|
@Resource
|
|
|
private NotifyMessageSendApi notifyMessageSendApi;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private DictDataTenantApi dictDataTenantApi;
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@@ -689,6 +694,15 @@ public class OaLeaveServiceImpl implements OaLeaveService {
|
|
|
if (StrUtil.isNotBlank(oaLeaveDO.getAuditStatus())) {
|
|
|
oaLeaveRespVO.setAuditStatusDesc(OaAuditStatusEnum.getByStatus(oaLeaveDO.getAuditStatus()));
|
|
|
}
|
|
|
+ // 请假类型
|
|
|
+ if (StrUtil.isNotBlank(oaLeaveDO.getLeaveType())) {
|
|
|
+ List<DictDataTenantRespDTO> dictDataList = dictDataTenantApi.getDictDataList(DictTypeTenantEnum.TENANT_LEAVE_TYPE.getType());
|
|
|
+ Map<String, String> dictDataMap = CollectionUtils.convertMap(dictDataList, DictDataTenantRespDTO::getDictType, DictDataTenantRespDTO::getLabel);
|
|
|
+ String leaveTypeDesc = dictDataMap.get(oaLeaveDO.getLeaveType());
|
|
|
+ if (StrUtil.isNotBlank(leaveTypeDesc)) {
|
|
|
+ oaLeaveRespVO.setLeaveTypeDesc(leaveTypeDesc);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
String procInstId = oaLeaveDO.getProcInstId();
|
|
|
if (StrUtil.isNotBlank(procInstId)) {
|
|
|
@@ -820,6 +834,11 @@ public class OaLeaveServiceImpl implements OaLeaveService {
|
|
|
Map<String, String> statusMap = Arrays.stream(OaAuditStatusEnum.values())
|
|
|
.collect(Collectors.toMap(OaAuditStatusEnum::getStatus, OaAuditStatusEnum::getStatusDesc));
|
|
|
|
|
|
+ // 请假类型
|
|
|
+ List<DictDataTenantRespDTO> dictDataList = dictDataTenantApi.getDictDataList(DictTypeTenantEnum.TENANT_LEAVE_TYPE.getType());
|
|
|
+ Map<String, String> dictDataMap = CollectionUtils.convertMap(dictDataList, DictDataTenantRespDTO::getDictType, DictDataTenantRespDTO::getLabel);
|
|
|
+
|
|
|
+
|
|
|
for (OaLeaveRespVO respVO : oaLeaveRespVOList) {
|
|
|
// 当前处理人
|
|
|
if (respVO.getCurrentAuditEmployeeId() != null) {
|
|
|
@@ -844,6 +863,13 @@ public class OaLeaveServiceImpl implements OaLeaveService {
|
|
|
}
|
|
|
// 状态
|
|
|
respVO.setAuditStatusDesc(statusMap.get(respVO.getAuditStatus()));
|
|
|
+ // 请假类型
|
|
|
+ if (StrUtil.isNotBlank(respVO.getLeaveType())) {
|
|
|
+ String leaveTypeDesc = dictDataMap.get(respVO.getLeaveType());
|
|
|
+ if (StrUtil.isNotBlank(leaveTypeDesc)) {
|
|
|
+ respVO.setLeaveTypeDesc(leaveTypeDesc);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|