Commit bb65062d by mobh

修改问题

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