Commit 6738f2b7 by ilal Committed by chenzg

提交

parent c490a256
......@@ -555,6 +555,20 @@ public class YgglController {
insertErrors.add(yme);
}
//假期规则初始化
String current_time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
List<KqglAssoLeaveRules> rul = KqglAssoLeaveRules.builder().build().selectList(new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, orgCode));
for(KqglAssoLeaveRules r : rul) {
if(r.getLeaveBalance() == 0) {
KqglAssoLeaveEmployeeBalance.builder().leaveRulesId(r.getId()).userid(login.getId()).balanceDays(-1).modifyUserid(userBean.getEmpNum()).modifyTimer(current_time).orgCode(userBean.getOrgCode()).build().insert();
}else {
KqglAssoLeaveEmployeeBalance.builder().leaveRulesId(r.getId()).userid(login.getId()).balanceDays(0.0).modifyUserid(userBean.getEmpNum()).modifyTimer(current_time).orgCode(userBean.getOrgCode()).build().insert();
}
}
}
JSONObject obj = JSONUtil.createObj();
......
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