借阅工作流

new
Js 1 year ago
parent 40eba6b618
commit 20158a2025

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.archives.service.borrowapply; package cn.iocoder.yudao.module.archives.service.borrowapply;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.extra.spring.SpringUtil;
import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.string.StringUtils; import cn.iocoder.yudao.framework.common.util.string.StringUtils;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
@ -15,8 +16,12 @@ import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi;
import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheet.QuotationSheetDO; import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheet.QuotationSheetDO;
import cn.iocoder.yudao.module.bs.enums.BillTypeEnum; import cn.iocoder.yudao.module.bs.enums.BillTypeEnum;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.dal.mysql.dept.DeptMapper;
import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.val;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -56,6 +61,12 @@ public class BorrowApplyServiceImpl implements BorrowApplyService {
@Resource @Resource
private BpmProcessInstanceApi processInstanceApi; private BpmProcessInstanceApi processInstanceApi;
@Resource
private AdminUserMapper userMapper;
@Resource
private DeptMapper deptMapper;
@Override @Override
@Transactional @Transactional
public CommonResult<BorrowApplyDO> createBorrowApply(BorrowApplyCreateReqVO createReqVO) { public CommonResult<BorrowApplyDO> createBorrowApply(BorrowApplyCreateReqVO createReqVO) {
@ -64,7 +75,9 @@ public class BorrowApplyServiceImpl implements BorrowApplyService {
} }
// 插入 // 插入
BorrowApplyDO borrowApply = BorrowApplyConvert.INSTANCE.convert(createReqVO); BorrowApplyDO borrowApply = BorrowApplyConvert.INSTANCE.convert(createReqVO);
LoginUser userDo = SecurityFrameworkUtils.getLoginUser();
AdminUserDO user = userMapper.selectById(userDo.getId());
borrowApply.setUserName(user.getNickname()).setDeptName(deptMapper.selectById(user.getDeptId()).getName());
/* /*
* *
* *

Loading…
Cancel
Save