Commit 7b6d9e57 authored by hongguangwu's avatar hongguangwu

收入优化

parent 1fe9fe49
......@@ -21,14 +21,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
......@@ -56,9 +53,6 @@ public class TSalaryStandardController {
private final TSalaryStandardService tSalaryStandardService;
private final TApprovalRecordService auditLogService;
/**
* 简单分页查询-申请
*
......@@ -184,15 +178,8 @@ public class TSalaryStandardController {
|| s.getStatus() == SalaryConstants.STATUS[7]) {
YifuUser user = SecurityUtils.getUser();
if (user != null) {
TApprovalRecord tApprovalRecord = new TApprovalRecord();
tApprovalRecord.setApprovalResult(CommonConstants.TWO_STRING);
tApprovalRecord.setApprovalOpinion(tSalaryStandard.getRemark());
tApprovalRecord.setSalaryId(tSalaryStandard.getId());
tApprovalRecord.setNodeId("提交审核");
tApprovalRecord.setApprovalMan(user.getId());
tApprovalRecord.setApprovalManName(user.getNickname());
tApprovalRecord.setApprovalTime(DateUtil.getCurrentDateTime());
auditLogService.save(tApprovalRecord);
// 添加流程进展明细
tSalaryStandardService.saveRecordLog(s, user, CommonConstants.TWO_STRING, "提交审核");
tSalaryStandard.setSubmitTime(new Date());
tSalaryStandard.setStatus(CommonConstants.ONE_INT);
tSalaryStandardService.updateById(tSalaryStandard);
......
......@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
......@@ -79,5 +80,19 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
**/
R<String> doSend(String id);
/**
* @Description: 分页查询-申请
* @Author: hgw
* @Date: 2022/9/6 16:02
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard>
**/
IPage<TSalaryStandard> getTSalaryStandardPageApply(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard);
/**
* @Description: 添加流程进展明细
* @Author: hgw
* @Date: 2022/9/6 15:59
* @return: void
**/
void saveRecordLog(TSalaryStandard tSalaryStandard, YifuUser user, String status, String nodeId);
}
......@@ -92,6 +92,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
@Autowired
private EkpSalaryUtil ekpSalaryUtil;
@Autowired
private TApprovalRecordService auditLogService;
/**
* 标准薪酬工资表简单分页查询
*
......@@ -545,10 +548,14 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
s.setSendMonth(DateUtil.addMonth(0));
s.setStatus(SalaryConstants.STATUS[3]);
this.updateById(s);
// 添加流程进展明细
this.saveRecordLog(s, user, CommonConstants.ZERO_STRING, "发送数字化平台");
return R.ok("发送成功!");
} else {
s.setStatus(SalaryConstants.STATUS[10]);
this.updateById(s);
// 添加流程进展明细
this.saveRecordLog(s, user, CommonConstants.ONE_STRING, "发送数字化平台");
return R.ok("发送失败!");
}
} else {
......@@ -559,4 +566,23 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
}
/**
* @Description: 添加流程进展明细
* @Author: hgw
* @Date: 2022/9/6 16:02
* @return: void
**/
@Override
public void saveRecordLog(TSalaryStandard tSalaryStandard, YifuUser user, String status, String nodeId) {
TApprovalRecord tApprovalRecord = new TApprovalRecord();
tApprovalRecord.setApprovalResult(status);
tApprovalRecord.setApprovalOpinion(tSalaryStandard.getRemark());
tApprovalRecord.setSalaryId(tSalaryStandard.getId());
tApprovalRecord.setNodeId(nodeId);
tApprovalRecord.setApprovalMan(user.getId());
tApprovalRecord.setApprovalManName(user.getNickname());
tApprovalRecord.setApprovalTime(DateUtil.getCurrentDateTime());
auditLogService.save(tApprovalRecord);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment