Commit 58ebe2e5 by 翁国栋

8小时运营后台--

查询用户剩余假期
parent 16a10b13
......@@ -923,7 +923,7 @@ public class TimeCardController {
}
balance.setBalanceDays(balanceDays);
//TODO
KqglAssoLeaveBalance balan = kqglassoleavebalancemapper.selectOne(new QueryWrapper<KqglAssoLeaveBalance>().lambda().eq(KqglAssoLeaveBalance::getUserid, balance.getUserid())
.orderByDesc(KqglAssoLeaveBalance :: getModifyNumber).last("LIMIT 1"));
if(balan != null) {
......@@ -3336,6 +3336,22 @@ public class TimeCardController {
return ResultUtil.data(null,"操作成功!");
}
/**
* 根据用户id获取用户剩余假期
*/
@GetMapping(value = "/get_time_balance")
@ApiOperation(value = "根据用户id获取用户剩余假期", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 3)
public Result<Double> get_time_balance(@RequestParam("userId") Integer id,@CurrentUser UserBean userBean,@RequestParam("leaveRulesId")Integer leaveRulesId) {
KqglAssoLeaveEmployeeBalance emba = KqglAssoLeaveEmployeeBalance.builder().build().selectOne(new QueryWrapper<KqglAssoLeaveEmployeeBalance>().lambda().eq(KqglAssoLeaveEmployeeBalance::getLeaveRulesId, leaveRulesId)
.eq(KqglAssoLeaveEmployeeBalance::getUserid, id).eq(KqglAssoLeaveEmployeeBalance::getOrgCode, userBean.getOrgCode()));
if(emba!=null){
return ResultUtil.data(emba.getBalanceDays(),"操作成功!");
}
return ResultUtil.data(0.00,"操作失败!");
}
......
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