Commit b2e69739 by mobh Committed by chenzg

修改问题

parent 142499db
......@@ -11,6 +11,8 @@ import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import cn.timer.api.dto.xcgl.*;
import lombok.SneakyThrows;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated;
......@@ -1003,6 +1005,7 @@ public class SalaryManagementController {
/**
* 调薪
*/
@SneakyThrows(Exception.class)
@PostMapping(value = "/payensaad")
@ApiOperation(value = "调薪", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult EnterSalaryAdjustment(@CurrentUser UserBean userBean,@RequestBody FixedsalaryDto fixedsalarydto) {
......@@ -1018,8 +1021,8 @@ public class SalaryManagementController {
return new ResponseResult().fail("调薪成功失败, 已存在生效日期" + fixedsalarydto.getSxrq() + "的待生效记录, 请到调薪记录页面查看!");
}
int txzt = 2;
if (curDate.equals(fixedsalarydto.getSxrq())) {
// 生效日期在当天, 立即生效, 原使用中的记录变成历史记录
if (DateUtil.getFormat(fixedsalarydto.getSxrq()) <= DateUtil.getFormat(curDate)) {
// 生效日期在当天或之前的, 立即生效, 原使用中的记录变成历史记录
XcglAssoXzdadx xzds = new LambdaQueryChainWrapper<XcglAssoXzdadx>(xcglassoxzdadxmapper)
.eq(XcglAssoXzdadx::getUserid, Integer.valueOf(fixedsalarydto.getUserid()))
.eq(XcglAssoXzdadx::getTxzt, 0)
......@@ -1072,6 +1075,7 @@ public class SalaryManagementController {
/**
* 调薪记录编辑保存
*/
@SneakyThrows(Exception.class)
@PostMapping(value = "/saveTXjlEdit")
@ApiOperation(value = "调薪", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult saveTXjlEdit(@CurrentUser UserBean userBean,@RequestBody FixedsalaryDto fixedsalarydto) {
......@@ -1087,8 +1091,8 @@ public class SalaryManagementController {
return new ResponseResult().fail("调薪成功失败, 已存在生效日期" + fixedsalarydto.getSxrq() + "的待生效记录, 请到调薪记录页面查看!");
}
int txzt = 2;
if (curDate.equals(fixedsalarydto.getSxrq())) {
// 生效日期在当天, 立即生效, 原使用中的记录变成历史记录
if (DateUtil.getFormat(fixedsalarydto.getSxrq()) <= DateUtil.getFormat(curDate)) {
// 生效日期在当天或之前的, 立即生效, 原使用中的记录变成历史记录
XcglAssoXzdadx xzds = new LambdaQueryChainWrapper<XcglAssoXzdadx>(xcglassoxzdadxmapper)
.eq(XcglAssoXzdadx::getUserid, Integer.valueOf(fixedsalarydto.getUserid()))
.eq(XcglAssoXzdadx::getTxzt, 0)
......@@ -1578,7 +1582,7 @@ public class SalaryManagementController {
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(cal.getId());//薪资项id
xzb.setXzxjg(Double.valueOf(cal.getRsz()));//薪资项结果
xzb.setXzxjg(StringUtils.isBlank(cal.getRsz()) ? 0 : Double.valueOf(cal.getRsz()));//薪资项结果
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.xzbinsert(xzb);
}
......
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