Commit c5bf4ef2 by ilal

提交

parent b8d452a3
...@@ -639,8 +639,19 @@ public class SalaryManagementController { ...@@ -639,8 +639,19 @@ public class SalaryManagementController {
@ApiOperation(value = "修改薪资规则", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "修改薪资规则", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> Modifysalaryrule(@CurrentUser UserBean userBean,@RequestBody ModifysalaryruleDto modifysalaryruledto) { public Result<Object> Modifysalaryrule(@CurrentUser UserBean userBean,@RequestBody ModifysalaryruleDto modifysalaryruledto) {
return XcglAssoJsgzzx.builder().gsid(modifysalaryruledto.getXcjsgzid()).gsgs(modifysalaryruledto.getFormula()) XcglAssoXcjsgz xcjsgz = XcglAssoXcjsgz.builder().id(modifysalaryruledto.getXcjsgzid()).build().selectById();
.rule(modifysalaryruledto.getFormula()).id(modifysalaryruledto.getJsgzzxid()).build().updateById() ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!"); //11:应发工资 13:实发工资
if(modifysalaryruledto.getXcjsgzid().equals(11) || modifysalaryruledto.getXcjsgzid().equals(13)) {
if(!xcjsgz.getGsxs().equals(modifysalaryruledto.getFormula())) {
XcglAssoJsgzzx.builder().gsid(modifysalaryruledto.getXcjsgzid()).gsgs(modifysalaryruledto.getFormula())
.rule(modifysalaryruledto.getFormula()).rulestate(3).id(modifysalaryruledto.getJsgzzxid()).build().updateById();
}
}else {
XcglAssoJsgzzx.builder().gsid(modifysalaryruledto.getXcjsgzid()).gsgs(modifysalaryruledto.getFormula())
.rule(modifysalaryruledto.getFormula()).id(modifysalaryruledto.getJsgzzxid()).build().updateById();
}
return ResultUtil.success("操作成功!");
} }
/** /**
...@@ -1692,10 +1703,10 @@ public class SalaryManagementController { ...@@ -1692,10 +1703,10 @@ public class SalaryManagementController {
//公式计算 //公式计算
//(固定公式计算):迟到早退扣款、事假扣款、病假扣款、旷工扣款、司龄工资、应发工资、实发工资 //(固定公式计算):迟到早退扣款、事假扣款、病假扣款、旷工扣款、司龄工资、应发工资、实发工资
if(xzx.getRulestate() == 2) { if(xzx.getRulestate().equals(2)) {
if(xzx.getIsCustom() == 0 && xzx.getOptionid() == 43) {//司龄工资 if(xzx.getIsCustom() == 0 && xzx.getOptionid() == 31) {//司龄工资
String formula = xzx.getGsgs();//#司龄#*100 String formula = xzx.getGsgs();//#司龄#*100
String qaz = formula.replace("#司龄#", "+secretary_ling+"); String qaz = formula.replace("#司龄#", String.valueOf(secretary_ling));
double result = Double.valueOf(String.valueOf(js.eval(qaz))); double result = Double.valueOf(String.valueOf(js.eval(qaz)));
XcglAssoXzb.builder().xzxjg(result).build().update(new QueryWrapper<XcglAssoXzb>().lambda().eq(XcglAssoXzb::getXzxid, xzx.getId()).eq(XcglAssoXzb::getUserid, pag.getUserid())); XcglAssoXzb.builder().xzxjg(result).build().update(new QueryWrapper<XcglAssoXzb>().lambda().eq(XcglAssoXzb::getXzxid, xzx.getId()).eq(XcglAssoXzb::getUserid, pag.getUserid()));
......
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