fix 优化datetime格式
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
using Dlhis.Basic.Api.Dto;
|
using Dlhis.Basic.Api.Dto;
|
||||||
using Dlhis.Basic.Api.Request;
|
|
||||||
using Kurisu.RemoteCall.Attributes;
|
using Kurisu.RemoteCall.Attributes;
|
||||||
using Kurisu.RemoteCall.Default;
|
using Kurisu.RemoteCall.Default;
|
||||||
|
|
||||||
@@ -11,7 +10,4 @@ public interface IBusinessPlacePermissionsApi
|
|||||||
[Auth]
|
[Auth]
|
||||||
[Get("/api/businessplacepermissions/my")]
|
[Get("/api/businessplacepermissions/my")]
|
||||||
Task<DefaultApiResult<List<BusinessPlaceDto>>> GetMyAsync();
|
Task<DefaultApiResult<List<BusinessPlaceDto>>> GetMyAsync();
|
||||||
|
|
||||||
[Post("/api/gainfoPermissions/reset")]
|
|
||||||
Task<DefaultApiResult> ResetAsync(GainfoPermissionResetRequest request);
|
|
||||||
}
|
}
|
||||||
12
Src/Dlhis.Basic.Api/IGainfoPermissionApi.cs
Normal file
12
Src/Dlhis.Basic.Api/IGainfoPermissionApi.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using Dlhis.Basic.Api.Request;
|
||||||
|
using Kurisu.RemoteCall.Attributes;
|
||||||
|
using Kurisu.RemoteCall.Default;
|
||||||
|
|
||||||
|
namespace Dlhis.Basic.Api;
|
||||||
|
|
||||||
|
[EnableRemoteClient(Name = "basic-service", BaseUrl = "${InternalRequest:BasicRequestUrl}")]
|
||||||
|
public interface IGainfoPermissionApi
|
||||||
|
{
|
||||||
|
[Post("/api/gainfoPermissions/reset")]
|
||||||
|
Task<DefaultApiResult> ResetAsync(GainfoPermissionResetRequest request);
|
||||||
|
}
|
||||||
@@ -27,7 +27,7 @@ public class DevicePermissionsController : ControllerBase
|
|||||||
[HttpPost("assign")]
|
[HttpPost("assign")]
|
||||||
[Transactional]
|
[Transactional]
|
||||||
[IgnoreTenant]
|
[IgnoreTenant]
|
||||||
public async Task AssignAsync(DevicePermissionSaveReuqest request)
|
public async Task AssignAsync(DevicePermissionSaveRequest request)
|
||||||
{
|
{
|
||||||
await _devicePermissionService.AssignAsync(request);
|
await _devicePermissionService.AssignAsync(request);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using Kurisu.AspNetCore.Utils.Extensions;
|
|||||||
|
|
||||||
namespace Dlhis.Basic.Device.Request;
|
namespace Dlhis.Basic.Device.Request;
|
||||||
|
|
||||||
public class DevicePermissionSaveReuqest : IValidatableObject
|
public class DevicePermissionSaveRequest : IValidatableObject
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 分配类型 AssignTypeEnumType
|
/// 分配类型 AssignTypeEnumType
|
||||||
@@ -12,7 +12,7 @@ public interface IDevicePermissionService : IScopeDependency
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="reuqest"></param>
|
/// <param name="reuqest"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task AssignAsync(DevicePermissionSaveReuqest reuqest);
|
Task AssignAsync(DevicePermissionSaveRequest reuqest);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取分配的权限
|
/// 获取分配的权限
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class DevicePermissionService : IDevicePermissionService
|
|||||||
_currentUser = currentUser;
|
_currentUser = currentUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task AssignAsync(DevicePermissionSaveReuqest request)
|
public async Task AssignAsync(DevicePermissionSaveRequest request)
|
||||||
{
|
{
|
||||||
var tenantId = request.AssignType == AssignTypeEnumType.Department ? request.TenantId : _currentUser.GetStringTenantId();
|
var tenantId = request.AssignType == AssignTypeEnumType.Department ? request.TenantId : _currentUser.GetStringTenantId();
|
||||||
|
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ public class DishesResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单位
|
/// 单位
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<string> Units => CurrnetUnits.ToObject<List<string>>();
|
public List<string> Units => CurrentUnits.ToObject<List<string>>();
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string CurrnetUnits { get; set; }
|
public string CurrentUnits { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 图片
|
/// 图片
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class DishesService : IDishesService
|
|||||||
.Select((x, category) => new DishesResponse
|
.Select((x, category) => new DishesResponse
|
||||||
{
|
{
|
||||||
Id = x.Id,
|
Id = x.Id,
|
||||||
CurrnetUnits = x.Units.ToString(),
|
CurrentUnits = x.Units.ToString(),
|
||||||
CategoryName = category.Name,
|
CategoryName = category.Name,
|
||||||
}, true)
|
}, true)
|
||||||
.ToPageListAsync(request);
|
.ToPageListAsync(request);
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using Dlhis.Entity.Basic.Enums;
|
using Dlhis.Entity.Basic.Enums;
|
||||||
|
using Kurisu.AspNetCore.Utils.Converters;
|
||||||
using Kurisu.AspNetCore.Utils.Extensions;
|
using Kurisu.AspNetCore.Utils.Extensions;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Dlhis.Basic.Organization.Response;
|
namespace Dlhis.Basic.Organization.Response;
|
||||||
|
|
||||||
@@ -43,6 +45,7 @@ public class GainfoCurrentResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 出生日期/生日
|
/// 出生日期/生日
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime Birthday { get; set; }
|
public DateTime Birthday { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using Dlhis.Entity.Basic.Enums;
|
using Dlhis.Entity.Basic.Enums;
|
||||||
|
using Kurisu.AspNetCore.Utils.Converters;
|
||||||
using Kurisu.AspNetCore.Utils.Extensions;
|
using Kurisu.AspNetCore.Utils.Extensions;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Dlhis.Basic.Organization.Response;
|
namespace Dlhis.Basic.Organization.Response;
|
||||||
|
|
||||||
@@ -68,6 +70,7 @@ public class GainfoDetailResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 出生日期
|
/// 出生日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime Birthday { get; set; }
|
public DateTime Birthday { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
namespace Dlhis.Basic.Organization.Response
|
|
||||||
{
|
|
||||||
public class GainfoGainfoNumbersResponse
|
|
||||||
{
|
|
||||||
public int OnlineNumber { get; set; }
|
|
||||||
public int OfflineNumber { get; set; }
|
|
||||||
public int AttendanceNumber{ get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -59,11 +59,13 @@ public class GainfoPageResponse
|
|||||||
/// 性别
|
/// 性别
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GenderEnumType Gender { get; set; }
|
public GenderEnumType Gender { get; set; }
|
||||||
|
|
||||||
public string GenderDesc => Gender.GetDescription();
|
public string GenderDesc => Gender.GetDescription();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生日
|
/// 生日
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime Birthday { get; set; }
|
public DateTime Birthday { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
namespace Dlhis.Basic.Organization.Response
|
|
||||||
{
|
|
||||||
public class GetAssignGroupResponse
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
using Dlhis.Basic.Device.Response;
|
using Dlhis.Basic.Device.Response;
|
||||||
|
|
||||||
namespace Dlhis.Basic.Organization.Response
|
namespace Dlhis.Basic.Organization.Response;
|
||||||
|
|
||||||
|
public class GetDevicesUnderGroupByUserNoResponse
|
||||||
{
|
{
|
||||||
public class GetDevicesUnderGroupByUserNoResponse
|
public Guid GroupCode { get; set; }
|
||||||
{
|
|
||||||
public Guid GroupCode { get; set; }
|
public List<DevicePageResponse> Devices { get; set; }
|
||||||
public List<DevicePageResponse> Devices { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
namespace Dlhis.Basic.Organization.Response
|
|
||||||
{
|
|
||||||
public class GetPlaceByGainfoResponse
|
|
||||||
{
|
|
||||||
public Guid PlaceCode { get; set; }
|
|
||||||
public string PlaceName { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using Newtonsoft.Json;
|
using Kurisu.AspNetCore.Utils.Converters;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Dlhis.Canteen.MealSupplementRecord.Response;
|
namespace Dlhis.Canteen.MealSupplementRecord.Response;
|
||||||
|
|
||||||
@@ -7,6 +8,7 @@ public class MealSupplementRecordItemResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 餐补日期
|
/// 餐补日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using Dlhis.Entity.Basic.Enums;
|
using Dlhis.Entity.Basic.Enums;
|
||||||
|
using Kurisu.AspNetCore.Utils.Converters;
|
||||||
using Kurisu.AspNetCore.Utils.Extensions;
|
using Kurisu.AspNetCore.Utils.Extensions;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Dlhis.Canteen.MealSupplementRecord.Response;
|
namespace Dlhis.Canteen.MealSupplementRecord.Response;
|
||||||
|
|
||||||
@@ -30,6 +32,7 @@ public class MealSupplementRecordResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 考勤日期
|
/// 考勤日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class OrdersController : ControllerBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加充值/消费订单
|
/// 添加充值
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request"></param>
|
/// <param name="request"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
using Dlhis.Entity.Canteen.Enums;
|
|
||||||
using Kurisu.AspNetCore.Utils.Extensions;
|
|
||||||
|
|
||||||
namespace Dlhis.Canteen.Order.Response;
|
|
||||||
|
|
||||||
public class BalanceRecordByUserResponse
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 流水号
|
|
||||||
/// </summary>
|
|
||||||
public string No { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 金额
|
|
||||||
/// </summary>
|
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 学工号
|
|
||||||
/// </summary>
|
|
||||||
public string UserCode { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 部门号
|
|
||||||
/// </summary>
|
|
||||||
public string DepartmentNo { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 来源
|
|
||||||
/// </summary>
|
|
||||||
public BalanceRecordSourceEnumType Source { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 来源CN
|
|
||||||
/// </summary>
|
|
||||||
public string SourceCN => Source.GetDescription();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 收入/支出
|
|
||||||
/// </summary>
|
|
||||||
public BalanceRecordTypeEnumType Type { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 收入/支出
|
|
||||||
/// </summary>
|
|
||||||
public string TypeCN => Type.GetDescription();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 金额 + - 表示
|
|
||||||
/// </summary>
|
|
||||||
public decimal Amount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 消费时间
|
|
||||||
/// </summary>
|
|
||||||
public DateTime CostDateTime { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 备注
|
|
||||||
/// </summary>
|
|
||||||
public string Remark { get; set; }
|
|
||||||
}
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
namespace Dlhis.Canteen.Order.Response
|
|
||||||
{
|
|
||||||
public class BalanceRecordCostIdResponse
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 成本中心
|
|
||||||
/// </summary>
|
|
||||||
public string CostId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 早餐人数
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public int BreakfastNumberOfPeople { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 早餐单价price
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal BreakfastPrice { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 早餐金额
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal BreakfastAmount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 午餐人数
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public int LunchNumberOfPeople { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 午餐单价price
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal LunchPrice { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 午餐金额
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal LunchAmount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 晚餐人数
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public int DinnerNumberOfPeople { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 晚餐单价price
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal DinnerPrice { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 晚餐金额
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal DinnerAmount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 宵夜人数
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public int LateNightNumberOfPeople { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 宵夜单价price
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal LateNightPrice { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 宵夜金额
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal LateNightAmount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 总金额
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal TotalAmount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 总人数
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public int TotalNumberOfPeople { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
using Dlhis.Entity.Canteen.Enums;
|
using Dlhis.Entity.Canteen.Enums;
|
||||||
|
using Kurisu.AspNetCore.Utils.Converters;
|
||||||
using Kurisu.AspNetCore.Utils.Extensions;
|
using Kurisu.AspNetCore.Utils.Extensions;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Dlhis.Canteen.Order.Response;
|
namespace Dlhis.Canteen.Order.Response;
|
||||||
|
|
||||||
@@ -40,6 +42,7 @@ public class BalanceRecordDeviceResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 所属成本日期
|
/// 所属成本日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime CostDate { get; set; }
|
public DateTime CostDate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -99,9 +102,3 @@ public class BalanceRecordDeviceResponse
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string TenantName { get; set; }
|
public string TenantName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class BalanceRecordDeviceItemResponse
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using Dlhis.Entity.Canteen.Enums;
|
using Dlhis.Entity.Canteen.Enums;
|
||||||
|
using Kurisu.AspNetCore.Utils.Converters;
|
||||||
using Kurisu.AspNetCore.Utils.Extensions;
|
using Kurisu.AspNetCore.Utils.Extensions;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Dlhis.Canteen.Order.Response;
|
namespace Dlhis.Canteen.Order.Response;
|
||||||
|
|
||||||
@@ -46,6 +48,7 @@ public class BalanceRecordResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 所属成本日期
|
/// 所属成本日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime CostDate { get; set; }
|
public DateTime CostDate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -57,12 +60,14 @@ public class BalanceRecordResponse
|
|||||||
/// 来源
|
/// 来源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public BalanceRecordSourceEnumType Source { get; set; }
|
public BalanceRecordSourceEnumType Source { get; set; }
|
||||||
|
|
||||||
public string SourceDesc => Source.GetDescription();
|
public string SourceDesc => Source.GetDescription();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 收入/支出
|
/// 收入/支出
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public BalanceRecordTypeEnumType Type { get; set; }
|
public BalanceRecordTypeEnumType Type { get; set; }
|
||||||
|
|
||||||
public string TypeDesc => Type.GetDescription();
|
public string TypeDesc => Type.GetDescription();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -79,6 +84,7 @@ public class BalanceRecordResponse
|
|||||||
/// 餐次
|
/// 餐次
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ShiftEnumType? ShiftType { get; set; }
|
public ShiftEnumType? ShiftType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 餐次
|
/// 餐次
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,113 +0,0 @@
|
|||||||
using SqlSugar;
|
|
||||||
|
|
||||||
namespace Dlhis.Canteen.Order.Response
|
|
||||||
{
|
|
||||||
public class BalanceRecordSummaryRespones
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 部门号
|
|
||||||
/// </summary>
|
|
||||||
public string DepartmentNo { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 部门名称
|
|
||||||
/// </summary>
|
|
||||||
public string DepartmentName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 成本中心
|
|
||||||
/// </summary>
|
|
||||||
public string CostId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 消费者所在基地
|
|
||||||
/// </summary>
|
|
||||||
public string OriginTenantId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 早餐人数
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public int BreakfastNumberOfPeople { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 早餐单价price
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal BreakfastPrice { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 早餐金额
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal BreakfastAmount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 午餐人数
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public int LunchNumberOfPeople { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 午餐单价price
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal LunchPrice { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 午餐金额
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal LunchAmount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 晚餐人数
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public int DinnerNumberOfPeople { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 晚餐单价price
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal DinnerPrice { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 晚餐金额
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal DinnerAmount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 宵夜人数
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public int LateNightNumberOfPeople { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 宵夜单价price
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal LateNightPrice { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 宵夜金额
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal LateNightAmount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 总金额
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public decimal TotalAmount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 总人数
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public int TotalNumberOfPeople { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,40 +1,39 @@
|
|||||||
namespace Dlhis.Canteen.Order.Response
|
namespace Dlhis.Canteen.Order.Response;
|
||||||
|
|
||||||
|
public class ConsumeNumberResponse
|
||||||
{
|
{
|
||||||
public class ConsumeNumberResponse
|
/// <summary>
|
||||||
{
|
/// 消费机总数
|
||||||
/// <summary>
|
/// </summary>
|
||||||
/// 消费机总数
|
public int Total { get; set; }
|
||||||
/// </summary>
|
|
||||||
public int Total { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 消费机离线数
|
/// 消费机离线数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int OffNumber { get; set; }
|
public int OffNumber { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 营业点总数
|
/// 营业点总数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int PlaceNumber { get; set; }
|
public int PlaceNumber { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 可消费人数
|
/// 可消费人数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ConsumerableNumber { get; set; }
|
public int ConsumerableNumber { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 人均日消费额
|
/// 人均日消费额
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int DailyNumber { get; set; }
|
public int DailyNumber { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 日消费额走势图
|
/// 日消费额走势图
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<ConsumptionTrendResponse> Days { get; set; }
|
public List<ConsumptionTrendResponse> Days { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 月消费额走势图
|
/// 月消费额走势图
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<ConsumptionTrendResponse> Months { get; set; }
|
public List<ConsumptionTrendResponse> Months { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,20 +1,19 @@
|
|||||||
namespace Dlhis.Canteen.Order.Response
|
namespace Dlhis.Canteen.Order.Response;
|
||||||
|
|
||||||
|
public class ConsumptionTrendResponse
|
||||||
{
|
{
|
||||||
public class ConsumptionTrendResponse
|
/// <summary>
|
||||||
{
|
/// 时间
|
||||||
/// <summary>
|
/// </summary>
|
||||||
/// 时间
|
public string DateTime { get; set; }
|
||||||
/// </summary>
|
|
||||||
public string DateTime { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 当日/月消费总额
|
/// 当日/月消费总额
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public decimal CurrentAmount { get; set; }
|
public decimal CurrentAmount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 消费总额
|
/// 消费总额
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public decimal TotalAmount { get; set; }
|
public decimal TotalAmount { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,117 +1,115 @@
|
|||||||
using Dlhis.Entity.Device.Enums;
|
using Dlhis.Entity.Device.Enums;
|
||||||
using Kurisu.AspNetCore.Utils.Extensions;
|
using Kurisu.AspNetCore.Utils.Extensions;
|
||||||
|
|
||||||
namespace Dlhis.Canteen.Order.Response
|
namespace Dlhis.Canteen.Order.Response;
|
||||||
|
|
||||||
|
public class DevicePageResponse
|
||||||
{
|
{
|
||||||
public class DevicePageResponse
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设备code
|
||||||
|
/// </summary>
|
||||||
|
public Guid Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设备唯一码,IP/MAC/SNO
|
||||||
|
/// </summary>
|
||||||
|
public string UniqueNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 心跳间隔
|
||||||
|
/// </summary>
|
||||||
|
public int HeartbeatInterval { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 品牌
|
||||||
|
/// </summary>
|
||||||
|
public string Brand { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 供应商
|
||||||
|
/// </summary>
|
||||||
|
public string Supplier { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设备功能 DeviceFuncEnumType
|
||||||
|
/// </summary>
|
||||||
|
public List<DeviceFuncEnumType> Funcs
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
get
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 设备code
|
|
||||||
/// </summary>
|
|
||||||
public Guid Code { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 设备唯一码,IP/MAC/SNO
|
|
||||||
/// </summary>
|
|
||||||
public string UniqueNo { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 心跳间隔
|
|
||||||
/// </summary>
|
|
||||||
public int HeartbeatInterval { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 品牌
|
|
||||||
/// </summary>
|
|
||||||
public string Brand { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 供应商
|
|
||||||
/// </summary>
|
|
||||||
public string Supplier { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 设备功能 DeviceFuncEnumType
|
|
||||||
/// </summary>
|
|
||||||
public List<DeviceFuncEnumType> Funcs
|
|
||||||
{
|
{
|
||||||
get
|
if (FuncsStr.IsEmpty()) FuncsStr = "[]";
|
||||||
{
|
|
||||||
if (FuncsStr.IsEmpty()) FuncsStr = "[]";
|
|
||||||
|
|
||||||
return FuncsStr.ToObject<List<DeviceFuncEnumType>>();
|
return FuncsStr.ToObject<List<DeviceFuncEnumType>>();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string FuncsStr { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 设备机功能类型
|
|
||||||
/// </summary>
|
|
||||||
public DeviceTypeEnumType Type { get; set; }
|
|
||||||
|
|
||||||
public string TypeDescription
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return Type.GetDescription();
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
return string.Empty;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 部署点
|
|
||||||
/// </summary>
|
|
||||||
public string DeployPlace { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 部署坐标
|
|
||||||
/// </summary>
|
|
||||||
public string DeployPosition { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 部署方向
|
|
||||||
/// </summary>
|
|
||||||
public string DeployDirection { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 模板code
|
|
||||||
/// </summary>
|
|
||||||
public Guid TemplateCode { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 连接信息
|
|
||||||
/// </summary>
|
|
||||||
public string ConnectionInfo { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否启用
|
|
||||||
/// </summary>
|
|
||||||
public bool Enable { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否在线
|
|
||||||
/// </summary>
|
|
||||||
public bool IsOnline { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 消费总额
|
|
||||||
/// </summary>
|
|
||||||
public decimal Amount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 消费人次
|
|
||||||
/// </summary>
|
|
||||||
public int UserCount { get; set; }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string FuncsStr { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设备机功能类型
|
||||||
|
/// </summary>
|
||||||
|
public DeviceTypeEnumType Type { get; set; }
|
||||||
|
|
||||||
|
public string TypeDescription
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return Type.GetDescription();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 部署点
|
||||||
|
/// </summary>
|
||||||
|
public string DeployPlace { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 部署坐标
|
||||||
|
/// </summary>
|
||||||
|
public string DeployPosition { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 部署方向
|
||||||
|
/// </summary>
|
||||||
|
public string DeployDirection { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 模板code
|
||||||
|
/// </summary>
|
||||||
|
public Guid TemplateCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 连接信息
|
||||||
|
/// </summary>
|
||||||
|
public string ConnectionInfo { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否启用
|
||||||
|
/// </summary>
|
||||||
|
public bool Enable { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否在线
|
||||||
|
/// </summary>
|
||||||
|
public bool IsOnline { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 消费总额
|
||||||
|
/// </summary>
|
||||||
|
public decimal Amount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 消费人次
|
||||||
|
/// </summary>
|
||||||
|
public int UserCount { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
using Dlhis.Entity.Canteen.Enums;
|
using Dlhis.Entity.Canteen.Enums;
|
||||||
|
using Kurisu.AspNetCore.Utils.Converters;
|
||||||
using Kurisu.AspNetCore.Utils.Extensions;
|
using Kurisu.AspNetCore.Utils.Extensions;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Dlhis.Canteen.Order.Response;
|
namespace Dlhis.Canteen.Order.Response;
|
||||||
|
|
||||||
@@ -64,6 +66,7 @@ public class OrderBookingResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 订餐日期
|
/// 订餐日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime BookingDate { get; set; }
|
public DateTime BookingDate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
//namespace Dlhis.Canteen.Order.Response;
|
|
||||||
|
|
||||||
//public class OrderDetailResponse
|
|
||||||
//{
|
|
||||||
// /// <summary>
|
|
||||||
// /// 菜品编码
|
|
||||||
// /// </summary>
|
|
||||||
// public string DishesCode { get; set; }
|
|
||||||
|
|
||||||
// /// <summary>
|
|
||||||
// /// 菜品名称
|
|
||||||
// /// </summary>
|
|
||||||
// public string Name { get; set; }
|
|
||||||
|
|
||||||
// /// <summary>
|
|
||||||
// /// 单价
|
|
||||||
// /// </summary>
|
|
||||||
// public decimal Price { get; set; }
|
|
||||||
|
|
||||||
// /// <summary>
|
|
||||||
// /// 数量
|
|
||||||
// /// </summary>
|
|
||||||
// public int Number { get; set; }
|
|
||||||
|
|
||||||
// /// <summary>
|
|
||||||
// /// 单位
|
|
||||||
// /// </summary>
|
|
||||||
// public string Unit { get; set; }
|
|
||||||
|
|
||||||
// /// <summary>
|
|
||||||
// /// 图片
|
|
||||||
// /// </summary>
|
|
||||||
// public string ImageUrl { get; set; }
|
|
||||||
//}
|
|
||||||
@@ -17,7 +17,7 @@ public class GainfoUpdateService : IGainfoUpdateService
|
|||||||
private readonly IDbContext _dbContext;
|
private readonly IDbContext _dbContext;
|
||||||
private readonly ILogger<GainfoUpdateService> _logger;
|
private readonly ILogger<GainfoUpdateService> _logger;
|
||||||
private readonly ITenantApi _tenantApi;
|
private readonly ITenantApi _tenantApi;
|
||||||
private readonly IBusinessPlacePermissionsApi _businessPlacePermissionsApi;
|
private readonly IGainfoPermissionApi _gainfoPermissionApi;
|
||||||
private readonly IDevicePermissionApi _devicePermissionApi;
|
private readonly IDevicePermissionApi _devicePermissionApi;
|
||||||
private readonly IJinkoSapService _jinkoSapService;
|
private readonly IJinkoSapService _jinkoSapService;
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ public class GainfoUpdateService : IGainfoUpdateService
|
|||||||
public GainfoUpdateService(IDbContext dbContext,
|
public GainfoUpdateService(IDbContext dbContext,
|
||||||
ILogger<GainfoUpdateService> logger,
|
ILogger<GainfoUpdateService> logger,
|
||||||
ITenantApi tenantApi,
|
ITenantApi tenantApi,
|
||||||
IBusinessPlacePermissionsApi businessPlacePermissionsApi,
|
IGainfoPermissionApi gainfoPermissionApi,
|
||||||
IDevicePermissionApi devicePermissionApi,
|
IDevicePermissionApi devicePermissionApi,
|
||||||
IJinkoSapService jinkoSapService)
|
IJinkoSapService jinkoSapService)
|
||||||
{
|
{
|
||||||
@@ -36,7 +36,7 @@ public class GainfoUpdateService : IGainfoUpdateService
|
|||||||
_dbContext.Client.QueryFilter.Clear();
|
_dbContext.Client.QueryFilter.Clear();
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_tenantApi = tenantApi;
|
_tenantApi = tenantApi;
|
||||||
_businessPlacePermissionsApi = businessPlacePermissionsApi;
|
_gainfoPermissionApi = gainfoPermissionApi;
|
||||||
_devicePermissionApi = devicePermissionApi;
|
_devicePermissionApi = devicePermissionApi;
|
||||||
_jinkoSapService = jinkoSapService;
|
_jinkoSapService = jinkoSapService;
|
||||||
}
|
}
|
||||||
@@ -156,8 +156,6 @@ public class GainfoUpdateService : IGainfoUpdateService
|
|||||||
var existsUpdateWorkCodes = originUpdates.Select(x => x.ZWORKCODE).ToList();
|
var existsUpdateWorkCodes = originUpdates.Select(x => x.ZWORKCODE).ToList();
|
||||||
var originInserts = persons.Where(x => searchCodes.Contains(x.ZWORKCODE)).Where(x => !existsUpdateWorkCodes.Contains(x.ZWORKCODE)).ToList();
|
var originInserts = persons.Where(x => searchCodes.Contains(x.ZWORKCODE)).Where(x => !existsUpdateWorkCodes.Contains(x.ZWORKCODE)).ToList();
|
||||||
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
var updates = ToGainfoSap(originUpdates);
|
var updates = ToGainfoSap(originUpdates);
|
||||||
_logger.LogWarning("SAP分批更新数:{count}", updates.Count);
|
_logger.LogWarning("SAP分批更新数:{count}", updates.Count);
|
||||||
var inserts = ToGainfoSap(originInserts);
|
var inserts = ToGainfoSap(originInserts);
|
||||||
@@ -165,7 +163,6 @@ public class GainfoUpdateService : IGainfoUpdateService
|
|||||||
|
|
||||||
foreach (var item in inserts)
|
foreach (var item in inserts)
|
||||||
{
|
{
|
||||||
i++;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var no = await InsertPersonAsync(item);
|
var no = await InsertPersonAsync(item);
|
||||||
@@ -179,7 +176,6 @@ public class GainfoUpdateService : IGainfoUpdateService
|
|||||||
|
|
||||||
foreach (var item in updates)
|
foreach (var item in updates)
|
||||||
{
|
{
|
||||||
i++;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var no = await _dbContext.Queryable<GainfoEntity>().Where(x => x.Code == item.ename).Select(x => x.No).SingleAsync();
|
var no = await _dbContext.Queryable<GainfoEntity>().Where(x => x.Code == item.ename).Select(x => x.No).SingleAsync();
|
||||||
@@ -200,7 +196,7 @@ public class GainfoUpdateService : IGainfoUpdateService
|
|||||||
{
|
{
|
||||||
no = await UpdatePersonAsync(item);
|
no = await UpdatePersonAsync(item);
|
||||||
_logger.LogWarning("执行更新成功 工号:{code},姓名:{name}", item.ename, item.gname);
|
_logger.LogWarning("执行更新成功 工号:{code},姓名:{name}", item.ename, item.gname);
|
||||||
await _businessPlacePermissionsApi.ResetAsync(new GainfoPermissionResetRequest
|
await _gainfoPermissionApi.ResetAsync(new GainfoPermissionResetRequest
|
||||||
{
|
{
|
||||||
UserNo = no
|
UserNo = no
|
||||||
});
|
});
|
||||||
@@ -351,7 +347,7 @@ public class GainfoUpdateService : IGainfoUpdateService
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await _businessPlacePermissionsApi.ResetAsync(new GainfoPermissionResetRequest
|
await _gainfoPermissionApi.ResetAsync(new GainfoPermissionResetRequest
|
||||||
{
|
{
|
||||||
IsLeave = true,
|
IsLeave = true,
|
||||||
UserNo = gainfo.No
|
UserNo = gainfo.No
|
||||||
@@ -468,79 +464,71 @@ public class GainfoUpdateService : IGainfoUpdateService
|
|||||||
{
|
{
|
||||||
return data.Select(person =>
|
return data.Select(person =>
|
||||||
{
|
{
|
||||||
GainfoSapEntity o = null;
|
//var position = _positions.FirstOrDefault(x => x.No == person.PLANS);
|
||||||
try
|
|
||||||
|
var rzrq = person.ZRZRQ;
|
||||||
|
var lzrq = person.ZLZRQ;
|
||||||
|
var rmk = $"入职时间:{rzrq.ToString("yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture)} ";
|
||||||
|
|
||||||
|
if (lzrq != null && lzrq.Value.ToString("yyyy-MM-dd") != "1900-01-01")
|
||||||
|
rmk += $"离职时间:{lzrq.Value.ToString("yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture)} ";
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(person.MGTXT))
|
||||||
|
rmk += $"变更原因:{person.MGTXT}";
|
||||||
|
|
||||||
|
var native = GetNative(person.ZZ_SFZH);
|
||||||
|
var sex = person.GESCH == "2" ? "F" : "M";
|
||||||
|
|
||||||
|
person.ZZ_SFZH = person.ZZ_SFZH?.TrimStart();
|
||||||
|
GainfoSapEntity o = new()
|
||||||
{
|
{
|
||||||
//var position = _positions.FirstOrDefault(x => x.No == person.PLANS);
|
gname = person.NAME,
|
||||||
|
ename = person.ZWORKCODE,
|
||||||
|
idno = person.ZZ_SFZH,
|
||||||
|
birthday = person.GBDAT,
|
||||||
|
ZZ_KLX = person.ZZ_KLX,
|
||||||
|
email = person.ZXUELI,
|
||||||
|
appellation = person.ORGEH,
|
||||||
|
phone = person.ZMOBILE,
|
||||||
|
ZSTATUS = person.ZSTATUS,
|
||||||
|
createdate = person.ZRZRQ,
|
||||||
|
PERNR = person.PERNR,
|
||||||
|
WERKS = person.WERKS,
|
||||||
|
KOSTL = person.KOSTL,
|
||||||
|
ZZ_ZD = person.ZZ_ZD,
|
||||||
|
Z_ZJ = person.Z_ZJ,
|
||||||
|
STELL = person.STELL,
|
||||||
|
STELL_NM = person.STELL_NM,
|
||||||
|
ZLZRQ = person.ZLZRQ,
|
||||||
|
MASSN = person.MASSN,
|
||||||
|
MNTXT = person.MNTXT,
|
||||||
|
remark = rmk,
|
||||||
|
native = native,
|
||||||
|
sex = sex,
|
||||||
|
logdate = DateTime.Now,
|
||||||
|
isowner = int.Parse(person.ZSTATUS) < 5 ? "T" : "F",
|
||||||
|
@class = "C",
|
||||||
|
country = person.ZZ_COUNNM,
|
||||||
|
log_ip = "127.0.0.1",
|
||||||
|
log_shift = "1",
|
||||||
|
log_id = "XX",
|
||||||
|
address = "",
|
||||||
|
occupation = "99",
|
||||||
|
nation = "01",
|
||||||
|
idcls = "ID",
|
||||||
|
ZZ_COUNNM = person.ZZ_COUNNM,
|
||||||
|
ZZ_GZDJDNM = person.ZZ_GZDJDNM,
|
||||||
|
ZZ_GZDCQNM = person.ZZ_GZDCQNM,
|
||||||
|
};
|
||||||
|
|
||||||
var rzrq = person.ZRZRQ;
|
return o;
|
||||||
var lzrq = person.ZLZRQ;
|
|
||||||
var rmk = $"入职时间:{rzrq.ToString("yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture)} ";
|
|
||||||
|
|
||||||
if (lzrq != null && lzrq.Value.ToString("yyyy-MM-dd") != "1900-01-01")
|
|
||||||
rmk += $"离职时间:{lzrq.Value.ToString("yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture)} ";
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(person.MGTXT))
|
|
||||||
rmk += $"变更原因:{person.MGTXT}";
|
|
||||||
|
|
||||||
var native = GetNative(person.ZZ_SFZH);
|
|
||||||
var sex = person.GESCH == "2" ? "F" : "M";
|
|
||||||
|
|
||||||
person.ZZ_SFZH = person.ZZ_SFZH?.TrimStart();
|
|
||||||
o = new GainfoSapEntity
|
|
||||||
{
|
|
||||||
gname = person.NAME,
|
|
||||||
ename = person.ZWORKCODE,
|
|
||||||
idno = person.ZZ_SFZH,
|
|
||||||
birthday = person.GBDAT,
|
|
||||||
ZZ_KLX = person.ZZ_KLX,
|
|
||||||
email = person.ZXUELI,
|
|
||||||
appellation = person.ORGEH,
|
|
||||||
phone = person.ZMOBILE,
|
|
||||||
ZSTATUS = person.ZSTATUS,
|
|
||||||
createdate = person.ZRZRQ,
|
|
||||||
PERNR = person.PERNR,
|
|
||||||
WERKS = person.WERKS,
|
|
||||||
KOSTL = person.KOSTL,
|
|
||||||
ZZ_ZD = person.ZZ_ZD,
|
|
||||||
Z_ZJ = person.Z_ZJ,
|
|
||||||
STELL = person.STELL,
|
|
||||||
STELL_NM = person.STELL_NM,
|
|
||||||
ZLZRQ = person.ZLZRQ,
|
|
||||||
MASSN = person.MASSN,
|
|
||||||
MNTXT = person.MNTXT,
|
|
||||||
remark = rmk,
|
|
||||||
native = native,
|
|
||||||
sex = sex,
|
|
||||||
logdate = DateTime.Now,
|
|
||||||
isowner = int.Parse(person.ZSTATUS) < 5 ? "T" : "F",
|
|
||||||
@class = "C",
|
|
||||||
country = person.ZZ_COUNNM,
|
|
||||||
log_ip = "127.0.0.1",
|
|
||||||
log_shift = "1",
|
|
||||||
log_id = "XX",
|
|
||||||
address = "",
|
|
||||||
occupation = "99",
|
|
||||||
nation = "01",
|
|
||||||
idcls = "ID",
|
|
||||||
ZZ_COUNNM = person.ZZ_COUNNM,
|
|
||||||
ZZ_GZDJDNM = person.ZZ_GZDJDNM,
|
|
||||||
ZZ_GZDCQNM = person.ZZ_GZDCQNM,
|
|
||||||
};
|
|
||||||
|
|
||||||
return o;
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
}).ToList();
|
}).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetNative(string idno)
|
private static string GetNative(string idNo)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(idno) || idno.Length < 6) return null;
|
if (string.IsNullOrWhiteSpace(idNo) || idNo.Length < 6) return null;
|
||||||
idno = idno.TrimStart();
|
idNo = idNo.TrimStart();
|
||||||
return idno[..6];
|
return idNo[..6];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user