|
|
@ -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());
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* 这里因为是改为工作流 借阅状态修改在查询列表接口的修改审批状态那里修改了
|
|
|
|
* 这里因为是改为工作流 借阅状态修改在查询列表接口的修改审批状态那里修改了
|
|
|
|
* 所以这里改为查询历史记录列表里面有没有已被借阅未归还 通过案卷号查询
|
|
|
|
* 所以这里改为查询历史记录列表里面有没有已被借阅未归还 通过案卷号查询
|
|
|
|