This commit is contained in:
jiangyong27 2025-03-27 19:48:56 +08:00
parent cd27b06448
commit e42ddaeb56
1 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,9 @@ func (c *Calculator) Test(sess *session.AdminSession, req *api.TestCalculatorReq
staffUser, err := dao.NewStaffUserDao().Get(cast.ToInt64(req.StaffId))
session.CheckDBError(err)
session.CheckNilError(staffUser, "员工不存在")
if staffUser.CorpId != sess.GetCorpId() {
panic("不要乱来")
}
salaryServ := CommonService.NewStaffSalary(staffUser)
salary, err := salaryServ.CalcSalary(nil, time.Now().AddDate(0, -1, 0).Format("200601"))
if err != nil {