This commit is contained in:
lijiaqi 2024-01-10 14:23:56 +08:00
parent 708195d8df
commit 8cd1b34bca
2 changed files with 10 additions and 0 deletions

View File

@ -48,6 +48,9 @@ public class WorkFlowDto extends WorkFlow {
@ApiModelProperty(value = "是否能发起维修流程")
private Boolean isRepair;
@ApiModelProperty(value = "部门名称")
private String deptName;
}

View File

@ -18,7 +18,9 @@ import com.ydool.oa.workFlow.enums.WorkFlowStepTypeEnum;
import com.ydool.oa.workFlow.enums.WorkFlowTypeEnum;
import com.ydool.oa.workFlow.service.WorkFlowStepLogService;
import com.ydool.oa.workFlow.service.WorkFlowStepService;
import com.ydool.system.entity.Dept;
import com.ydool.system.entity.User;
import com.ydool.system.service.impl.DeptServiceImpl;
import com.ydool.system.service.impl.UserServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.AfterMapping;
@ -46,6 +48,11 @@ public interface WorkFlowWrapper extends BaseWrapper<WorkFlow, WorkFlowDto> {
User user = userService.getById(obj.getUserId());
if (ObjUtil.isNotNull(user)) {
dto.setUserName(user.getUserName());
DeptServiceImpl deptService = SpringUtil.getBean(DeptServiceImpl.class);
Dept dept = deptService.getById(user.getDept());
if (ObjUtil.isNotNull(dept)) {
dto.setDeptName(dept.getName());
}
}
dto.setTypeName(WorkFlowTypeEnum.valueOf(obj.getType().toUpperCase()).getName());