|
@@ -3,6 +3,7 @@ package com.fjhx.oa.flow;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fjhx.common.enums.FlowStatusEnum1;
|
|
|
+import com.fjhx.common.utils.Assert;
|
|
|
import com.fjhx.file.entity.FileInfoVo;
|
|
|
import com.fjhx.file.entity.ObsFile;
|
|
|
import com.fjhx.file.utils.ObsFileUtil;
|
|
@@ -12,10 +13,12 @@ import com.fjhx.oa.entity.adjust.dto.AdjustSalaryApplyDto;
|
|
|
import com.fjhx.oa.entity.adjust.po.AdjustSalaryApply;
|
|
|
import com.fjhx.oa.entity.adjust.po.AdjustSalaryDetail;
|
|
|
import com.fjhx.oa.entity.user.dto.UserSalaryManageDto;
|
|
|
+import com.fjhx.oa.entity.user.po.UserSalary;
|
|
|
import com.fjhx.oa.entity.user.po.UserSalaryDetail;
|
|
|
import com.fjhx.oa.service.adjust.AdjustSalaryApplyService;
|
|
|
import com.fjhx.oa.service.adjust.AdjustSalaryDetailService;
|
|
|
import com.fjhx.oa.service.user.UserSalaryManageService;
|
|
|
+import com.fjhx.oa.service.user.UserSalaryService;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -33,6 +36,8 @@ public class AdjustSalaryApplyFlow extends FlowDelegate {
|
|
|
private AdjustSalaryDetailService adjustSalaryDetailService;
|
|
|
@Resource
|
|
|
private UserSalaryManageService userSalaryManageService;
|
|
|
+ @Resource
|
|
|
+ private UserSalaryService userSalaryService;
|
|
|
|
|
|
@Override
|
|
|
public String getFlowKey() {
|
|
@@ -46,6 +51,11 @@ public class AdjustSalaryApplyFlow extends FlowDelegate {
|
|
|
dto.setStatus(FlowStatusEnum1.UNDER_REVIEW.getKey());
|
|
|
dto.setUserId(SecurityUtils.getUserId());
|
|
|
|
|
|
+ //赋值原薪资管理id
|
|
|
+ UserSalary oldUserSalary = userSalaryService.getOne(q -> q.eq(UserSalary::getUserId, dto.getUserId()).eq(UserSalary::getIsCurrentVer, 1));
|
|
|
+ Assert.notEmpty(oldUserSalary, "未找到历史薪资信息!");
|
|
|
+ dto.setOldUserSalaryId(oldUserSalary.getId());
|
|
|
+
|
|
|
//回填用户名
|
|
|
String nickName = SecurityUtils.getLoginUser().getUser().getNickName();
|
|
|
submitData.put("userName", nickName);
|