| | |
| | | using SqlSugar; |
| | | |
| | | namespace MES.Service.service.BasicData; |
| | | |
| | | /// <summary> |
| | | /// 员工信息 |
| | | /// </summary> |
| | | public class MesStaffManager : Repository<MesStaff> |
| | | { |
| | | // Save 方法用于保存单个员工记录,根据类型执行不同的操作 |
| | |
| | | PhoneNumber = staff.FMobile, |
| | | Remark = staff.FDescription, |
| | | FforbidStatus = staff.FForbidStatus, |
| | | FSubsidiary = staff.FUseOrgId, |
| | | Fumbrella = staff.FCreateOrgId, |
| | | //FSubsidiary = staff.FUseOrgId, |
| | | //Fumbrella = staff.FCreateOrgId, |
| | | // 如果存在,使用现有的CreateDate,后续将删除后重新插入 |
| | | // 如果不存在,设为当前时间 |
| | | CreateDate = existingCustomer?.CreateDate ?? DateTime.Now, |
| | | //CreateDate = DateTime.Now, |
| | | LastupdateDate = DateTime.Now, |
| | | Type = staff.Type |
| | | Type = staff.Type, |
| | | |
| | | FSubsidiary = string.IsNullOrEmpty(staff.FUseOrgId) ? "1" : staff.FUseOrgId, |
| | | Fumbrella = string.IsNullOrEmpty(staff.FCreateOrgId) ? "1" : staff.FCreateOrgId, |
| | | }; |
| | | |
| | | if (staff.FStaffStartDate != null) |