fix 营业点餐次修改
This commit is contained in:
@@ -58,6 +58,17 @@ public class BusinessPlacesController : ControllerBase
|
||||
await _businessPlaceService.SaveAsync(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 营业点保存餐次
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("shift/save")]
|
||||
public async Task SaveShiftAsync(BusinessPlaceSaveShiftRequest request)
|
||||
{
|
||||
await _businessPlaceService.SaveShiftAsync(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据手工号获取餐别
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace Dlhis.Basic.BusinessPlace.Request;
|
||||
|
||||
public class BusinessPlaceSaveShiftRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 营业点id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐次code
|
||||
/// </summary>
|
||||
public Guid ShiftCode { get; set; }
|
||||
}
|
||||
@@ -1,12 +1,16 @@
|
||||
using Dlhis.Basic.BusinessPlace.Request;
|
||||
using Dlhis.Basic.BusinessPlace.Response;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using Kurisu.SqlSugar.Attributes;
|
||||
|
||||
namespace Dlhis.Basic.BusinessPlace.Services;
|
||||
|
||||
public interface IBusinessPlaceService : IScopeDependency
|
||||
{
|
||||
/// <summary>
|
||||
/// 营业点分页
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
Task<Pagination<BusinessPlaceResponse>> GetPageAsync(BusinessPlacePageRequest request);
|
||||
|
||||
/// <summary>
|
||||
@@ -15,6 +19,17 @@ public interface IBusinessPlaceService : IScopeDependency
|
||||
/// <returns></returns>
|
||||
Task<List<BusinessPlaceResponse>> GetOpenedListAsync();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 保存营业点
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
Task SaveAsync(BusinessPlaceSaveRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// 营业点保存餐次
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
Task SaveShiftAsync(BusinessPlaceSaveShiftRequest request);
|
||||
}
|
||||
|
||||
@@ -22,46 +22,68 @@ public class BusinessPlaceService : IBusinessPlaceService
|
||||
|
||||
public async Task<Pagination<BusinessPlaceResponse>> GetPageAsync(BusinessPlacePageRequest request)
|
||||
{
|
||||
var page = await _dbContext.Queryable<CanteenBusinessPlaceEntity>()
|
||||
var page = await _dbContext.Queryable<BusinessPlaceEntity>()
|
||||
.WhereIF(request.Search.IsPresent(), x => x.CustomCode.Contains(request.Search))
|
||||
.WhereIF(request.Catalog.HasValue, x => x.Catalog == request.Catalog)
|
||||
.WhereIF(request.Status.HasValue, x => x.Status == request.Status)
|
||||
.WhereIF(request.Source.HasValue, x => x.Source == request.Source)
|
||||
.Select<BusinessPlaceResponse>()
|
||||
.ToPageListAsync(request);
|
||||
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
public async Task<List<BusinessPlaceResponse>> GetOpenedListAsync()
|
||||
{
|
||||
return await _dbContext.Queryable<CanteenBusinessPlaceEntity>()
|
||||
return await _dbContext.Queryable<BusinessPlaceEntity>()
|
||||
.Where(x => x.Status == CanteenBusinessPlaceStatusEnumType.Opened)
|
||||
.Select<BusinessPlaceResponse>()
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task SaveAsync(BusinessPlaceSaveRequest request)
|
||||
{
|
||||
await CheckExistsCustomCodeAsync(request);
|
||||
|
||||
if (!request.Id.HasValue)
|
||||
{
|
||||
var entity = request.Adapt<CanteenBusinessPlaceEntity>();
|
||||
var entity = request.Adapt<BusinessPlaceEntity>();
|
||||
entity.Code = Guid.NewGuid();
|
||||
await _dbContext.InsertAsync(entity);
|
||||
}
|
||||
else
|
||||
{
|
||||
var entity = await _dbContext.Queryable<CanteenBusinessPlaceEntity>().FirstAsync(x => x.Id == request.Id);
|
||||
var entity = await _dbContext.Queryable<BusinessPlaceEntity>().FirstAsync(x => x.Id == request.Id);
|
||||
request.Adapt(entity);
|
||||
|
||||
await _dbContext.UpdateAsync(entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public async Task SaveShiftAsync(BusinessPlaceSaveShiftRequest request)
|
||||
{
|
||||
var place = await _dbContext.Queryable<BusinessPlaceEntity>().Where(x => x.Id == request.Id).FirstAsync();
|
||||
place.ThrowIfNull("营业点不存在");
|
||||
|
||||
var relationship = await _dbContext.Queryable<BusinessPlaceShiftRelationshipEntity>().Where(x => x.PlaceCode == place.Code).FirstAsync();
|
||||
if (relationship == null)
|
||||
{
|
||||
await _dbContext.InsertAsync(new BusinessPlaceShiftRelationshipEntity
|
||||
{
|
||||
PlaceCode = place.Code,
|
||||
ShiftCode = request.ShiftCode,
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
relationship.ShiftCode = request.ShiftCode;
|
||||
await _dbContext.UpdateAsync(relationship);
|
||||
}
|
||||
}
|
||||
|
||||
//*********************************************** help methods ***************************************************//
|
||||
|
||||
/// <summary>
|
||||
@@ -71,7 +93,7 @@ public class BusinessPlaceService : IBusinessPlaceService
|
||||
/// <returns></returns>
|
||||
private async Task CheckExistsCustomCodeAsync(BusinessPlaceSaveRequest request)
|
||||
{
|
||||
var existsSameCustomCode = await _dbContext.Queryable<CanteenBusinessPlaceEntity>()
|
||||
var existsSameCustomCode = await _dbContext.Queryable<BusinessPlaceEntity>()
|
||||
.Where(x => x.CustomCode == request.CustomCode)
|
||||
.WhereIF(request.Id.HasValue, x => x.Id != request.Id)
|
||||
.AnyAsync();
|
||||
|
||||
@@ -33,6 +33,16 @@ public class BusinessShiftsController : ControllerBase
|
||||
return await _businessPlaceShiftService.GetPageAsync(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 餐次列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
public async Task<List<BusinessPlaceShiftResponse>> GetListAsync()
|
||||
{
|
||||
return await _businessPlaceShiftService.GetListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 餐次保存
|
||||
/// </summary>
|
||||
|
||||
@@ -4,5 +4,5 @@ namespace Dlhis.Basic.BusinessShift.Request;
|
||||
|
||||
public class BusinessPlaceShiftPageRequest : PageDto
|
||||
{
|
||||
public Guid? BusinessPlaceCode { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kurisu.Core.CustomClass;
|
||||
|
||||
namespace Dlhis.Basic.BusinessShift.Request;
|
||||
|
||||
public class BusinessPlaceShiftSaveMealShiftRequest : IValidatableObject
|
||||
{
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐次Code
|
||||
/// </summary>
|
||||
public Guid ShiftCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// mealshift
|
||||
/// </summary>
|
||||
public string ShiftType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 序号
|
||||
/// </summary>
|
||||
public int Sequence { get; set; } = 100;
|
||||
|
||||
/// <summary>
|
||||
/// 时间段
|
||||
/// </summary>
|
||||
public TimePeriod TimePeriod { get; set; }
|
||||
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (TimePeriod.Start == TimePeriod.End)
|
||||
{
|
||||
yield return new ValidationResult("时间段设置区间有误,开始时段不能等于结束时段.", new[] { nameof(TimePeriod) });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,39 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kurisu.Core.CustomClass;
|
||||
|
||||
namespace Dlhis.Basic.BusinessShift.Request;
|
||||
|
||||
public class BusinessPlaceShiftSaveRequest : IValidatableObject
|
||||
public class BusinessPlaceShiftSaveRequest
|
||||
{
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 营业点代号
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "营业点不能为空")]
|
||||
public Guid BusinessPlaceCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义代号 mealshift
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "餐次编号不能为空")]
|
||||
[Required(ErrorMessage = "餐次手工号不能为空")]
|
||||
public string CustomCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 序号
|
||||
/// 餐次名称
|
||||
/// </summary>
|
||||
public int Sequence { get; set; } = 100;
|
||||
|
||||
/// <summary>
|
||||
/// 时间段
|
||||
/// </summary>
|
||||
public TimePeriod TimePeriod { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (TimePeriod.Start == TimePeriod.End)
|
||||
{
|
||||
yield return new ValidationResult("时间段设置区间有误,开始时段不能等于结束时段.", new[] { nameof(TimePeriod) });
|
||||
}
|
||||
}
|
||||
[Required(ErrorMessage = "餐次名称")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
@@ -4,21 +4,6 @@ public class BusinessPlaceShiftResponse
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 营业点代号
|
||||
/// </summary>
|
||||
public Guid BusinessPlaceCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 营业点手工号
|
||||
/// </summary>
|
||||
public string BusinessPlaceCustomCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 营业点
|
||||
/// </summary>
|
||||
public string BusinessPlace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 代号
|
||||
/// </summary>
|
||||
@@ -33,14 +18,4 @@ public class BusinessPlaceShiftResponse
|
||||
/// 餐次名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 经营开始时间
|
||||
/// </summary>
|
||||
public TimeOnly Start { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 经营结束时间
|
||||
/// </summary>
|
||||
public TimeOnly End { get; set; }
|
||||
}
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
|
||||
public class BusinessPlaceShiftTinyResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 自定义代号
|
||||
/// </summary>
|
||||
public string CustomCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐次名称
|
||||
/// </summary>
|
||||
|
||||
@@ -9,7 +9,11 @@ public interface IBusinessPlaceShiftService : IScopeDependency
|
||||
{
|
||||
Task<Pagination<BusinessPlaceShiftResponse>> GetPageAsync(BusinessPlaceShiftPageRequest request);
|
||||
|
||||
Task<List<BusinessPlaceShiftResponse>> GetListAsync();
|
||||
|
||||
Task SaveAsync(BusinessPlaceShiftSaveRequest request);
|
||||
|
||||
Task SaveMealShiftsAsync(List<BusinessPlaceShiftSaveMealShiftRequest> requests);
|
||||
|
||||
Task<BusinessPlaceWithShiftResponse> GetShiftsByPlaceCustomCodeAsync(string placeCustomCode);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ using Kurisu.SqlSugar.Attributes;
|
||||
using Kurisu.SqlSugar.Extensions;
|
||||
using Kurisu.SqlSugar.Services;
|
||||
using Mapster;
|
||||
using Org.BouncyCastle.Asn1.Ocsp;
|
||||
|
||||
namespace Dlhis.Basic.BusinessShift.Services.Implements;
|
||||
|
||||
@@ -27,58 +28,81 @@ public class BusinessPlaceShiftService : IBusinessPlaceShiftService
|
||||
|
||||
public async Task<Pagination<BusinessPlaceShiftResponse>> GetPageAsync(BusinessPlaceShiftPageRequest request)
|
||||
{
|
||||
var page = await _dbContext.Queryable<CanteenBusinessShiftEntity>()
|
||||
.LeftJoin<CanteenBusinessPlaceEntity>((shift, place) => shift.BusinessPlaceCode == place.Code)
|
||||
.LeftJoin<BasicTypeEntity>((shift, place, type) => shift.Code.ToString() == type.Code)
|
||||
.WhereIF(request.Search.IsPresent(), (shift, place) => shift.CustomCode.Contains(request.Search))
|
||||
.WhereIF(request.BusinessPlaceCode.HasValue, (shift, place) => shift.BusinessPlaceCode == request.BusinessPlaceCode)
|
||||
.Select((shift, place, type) => new BusinessPlaceShiftResponse
|
||||
{
|
||||
Id = shift.Id,
|
||||
BusinessPlaceCode = place.Code,
|
||||
BusinessPlaceCustomCode = place.CustomCode,
|
||||
BusinessPlace = place.Name,
|
||||
Code = shift.Code,
|
||||
CustomCode = shift.CustomCode,
|
||||
Name = type.Display,
|
||||
Start = shift.Start,
|
||||
End = shift.End
|
||||
})
|
||||
var page = await _dbContext.Queryable<BusinessShiftEntity>()
|
||||
.WhereIF(request.Search.IsPresent(), (shift) => shift.CustomCode.Contains(request.Search) || shift.Name.Contains(request.Search))
|
||||
.Select<BusinessPlaceShiftResponse>()
|
||||
.ToPageListAsync(request);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
public async Task<List<BusinessPlaceShiftResponse>> GetListAsync()
|
||||
{
|
||||
var result = await _dbContext.Queryable<BusinessShiftEntity>()
|
||||
.Select<BusinessPlaceShiftResponse>().ToListAsync();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task SaveAsync(BusinessPlaceShiftSaveRequest request)
|
||||
{
|
||||
await CheckExistsCustomCodeAsync(request);
|
||||
await DuplicateTimePeriodAsync(request);
|
||||
await CheckPlaceExistsAsync(request.BusinessPlaceCode);
|
||||
|
||||
await CheckExistsAsync(request);
|
||||
|
||||
if (!request.Id.HasValue)
|
||||
{
|
||||
var entity = request.Adapt<CanteenBusinessShiftEntity>();
|
||||
var entity = request.Adapt<BusinessShiftEntity>();
|
||||
|
||||
entity.Code = Guid.NewGuid();
|
||||
entity.Start = request.TimePeriod.Start.Value;
|
||||
entity.End = request.TimePeriod.End.Value;
|
||||
|
||||
await _dbContext.InsertAsync(entity);
|
||||
}
|
||||
else
|
||||
{
|
||||
var entity = await _dbContext.Queryable<CanteenBusinessShiftEntity>().FirstAsync(x => x.Id == request.Id);
|
||||
entity.Adapt(request);
|
||||
var entity = await _dbContext.Queryable<BusinessShiftEntity>().FirstAsync(x => x.Id == request.Id);
|
||||
entity.ThrowIfNull("餐次不存在");
|
||||
|
||||
request.Adapt(entity);
|
||||
await _dbContext.UpdateAsync(entity);
|
||||
}
|
||||
}
|
||||
|
||||
[Transactional]
|
||||
public async Task SaveMealShiftsAsync(List<BusinessPlaceShiftSaveMealShiftRequest> requests)
|
||||
{
|
||||
var mealShifts = await GetMealShiftAsync();
|
||||
|
||||
foreach (var request in requests)
|
||||
{
|
||||
var shift = await CheckExistsShiftAsync(request.ShiftCode);
|
||||
await CheckExistsMealShiftAsync(request);
|
||||
await DuplicateTimePeriodAsync(request);
|
||||
mealShifts.Contains(request.ShiftType).ThrowIfFalse($"{request.ShiftType}不存在");
|
||||
|
||||
if (!request.Id.HasValue)
|
||||
{
|
||||
var entity = request.Adapt<BusinessShiftMealRelationshipEntity>();
|
||||
|
||||
entity.ShiftCode = shift.Code;
|
||||
entity.ShiftCustomCode = shift.CustomCode;
|
||||
entity.Start = request.TimePeriod.Start.Value;
|
||||
entity.End = request.TimePeriod.End.Value;
|
||||
|
||||
await _dbContext.InsertAsync(entity);
|
||||
}
|
||||
else
|
||||
{
|
||||
var entity = await _dbContext.Queryable<BusinessShiftEntity>().FirstAsync(x => x.Id == request.Id);
|
||||
entity.ThrowIfNull("餐次不存在");
|
||||
|
||||
request.Adapt(entity);
|
||||
await _dbContext.UpdateAsync(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreTenant]
|
||||
public async Task<BusinessPlaceWithShiftResponse> GetShiftsByPlaceCustomCodeAsync(string placeCustomCode)
|
||||
{
|
||||
var place = await _dbContext.Queryable<CanteenBusinessPlaceEntity>().Where(x => x.CustomCode == placeCustomCode).FirstAsync();
|
||||
var place = await _dbContext.Queryable<BusinessPlaceEntity>().Where(x => x.CustomCode == placeCustomCode).FirstAsync();
|
||||
if (place == null)
|
||||
{
|
||||
return new BusinessPlaceWithShiftResponse()
|
||||
@@ -87,8 +111,17 @@ public class BusinessPlaceShiftService : IBusinessPlaceShiftService
|
||||
};
|
||||
}
|
||||
|
||||
var shifts = await _dbContext.Queryable<CanteenBusinessShiftEntity>()
|
||||
.Where(x => x.BusinessPlaceCode == place.Code)
|
||||
var relationship = await _dbContext.Queryable<BusinessPlaceShiftRelationshipEntity>().Where(x => x.PlaceCode == place.Code).FirstAsync();
|
||||
if (relationship == null)
|
||||
{
|
||||
return new BusinessPlaceWithShiftResponse()
|
||||
{
|
||||
Shifts = new List<BusinessPlaceShiftTinyResponse>()
|
||||
};
|
||||
}
|
||||
|
||||
var shifts = await _dbContext.Queryable<BusinessShiftMealRelationshipEntity>()
|
||||
.Where(x => x.ShiftCode == relationship.ShiftCode)
|
||||
.OrderBy(x => x.Sequence) //排序
|
||||
.ToListAsync();
|
||||
|
||||
@@ -97,15 +130,15 @@ public class BusinessPlaceShiftService : IBusinessPlaceShiftService
|
||||
var tenantInfo = tenantResult.Data;
|
||||
|
||||
var list = new List<BusinessPlaceShiftTinyResponse>();
|
||||
foreach (CanteenBusinessShiftEntity shiftinfo in shifts)
|
||||
foreach (BusinessShiftMealRelationshipEntity shiftinfo in shifts)
|
||||
{
|
||||
var name = _dbContext.Queryable<BasicTypeEntity>()
|
||||
.Where(x => x.Code == shiftinfo.CustomCode.ToString())
|
||||
.Where(x => x.Code == shiftinfo.ShiftType.ToString())
|
||||
.Select(x => x.Display)
|
||||
.First();
|
||||
|
||||
var shift = new BusinessPlaceShiftTinyResponse
|
||||
{
|
||||
CustomCode = shiftinfo.CustomCode,
|
||||
Name = name,
|
||||
Start = shiftinfo.Start,
|
||||
End = shiftinfo.End
|
||||
@@ -122,24 +155,18 @@ public class BusinessPlaceShiftService : IBusinessPlaceShiftService
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//*********************************************** help methods ***************************************************//
|
||||
|
||||
|
||||
private async Task CheckPlaceExistsAsync(Guid code)
|
||||
{
|
||||
var existsPlace = await _dbContext.Queryable<CanteenBusinessPlaceEntity>().AnyAsync(x => x.Code == code);
|
||||
existsPlace.ThrowIfFalse("营业点不存在,请检查.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 时间段重合检查
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
private async Task DuplicateTimePeriodAsync(BusinessPlaceShiftSaveRequest request)
|
||||
private async Task DuplicateTimePeriodAsync(BusinessPlaceShiftSaveMealShiftRequest request)
|
||||
{
|
||||
var periods = await _dbContext.Queryable<CanteenBusinessShiftEntity>()
|
||||
.Where(x => x.BusinessPlaceCode == request.BusinessPlaceCode)
|
||||
var periods = await _dbContext.Queryable<BusinessShiftMealRelationshipEntity>()
|
||||
.Where(x => x.ShiftCode == request.ShiftCode)
|
||||
.WhereIF(request.Id.HasValue, x => x.Id != request.Id)
|
||||
.Select(x => new TimePeriod
|
||||
{
|
||||
@@ -156,18 +183,41 @@ public class BusinessPlaceShiftService : IBusinessPlaceShiftService
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 检查重复手工号
|
||||
/// 检查重复
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
private async Task CheckExistsCustomCodeAsync(BusinessPlaceShiftSaveRequest request)
|
||||
private async Task CheckExistsAsync(BusinessPlaceShiftSaveRequest request)
|
||||
{
|
||||
var existsSameCustomCode = await _dbContext.Queryable<CanteenBusinessShiftEntity>()
|
||||
.Where(x => x.CustomCode == request.CustomCode)
|
||||
var existsSameCustomCode = await _dbContext.Queryable<BusinessShiftEntity>()
|
||||
.Where(x => x.CustomCode == request.CustomCode || x.Name == request.Name)
|
||||
.WhereIF(request.Id.HasValue, x => x.Id != request.Id)
|
||||
.AnyAsync();
|
||||
|
||||
existsSameCustomCode.ThrowIfTrue($"自定义手工号[{request.CustomCode}]存在重复,请检查.");
|
||||
existsSameCustomCode.ThrowIfTrue($"自定义手工号或者名称存在重复,请检查.");
|
||||
}
|
||||
|
||||
private async Task<BusinessShiftEntity> CheckExistsShiftAsync(Guid shiftCode)
|
||||
{
|
||||
var shift = await _dbContext.Queryable<BusinessShiftEntity>().Where(x => x.Code == shiftCode).FirstAsync();
|
||||
shift.ThrowIfNull("餐次不存在");
|
||||
|
||||
return shift;
|
||||
}
|
||||
|
||||
private async Task<List<string>> GetMealShiftAsync()
|
||||
{
|
||||
return await _dbContext.Queryable<BasicTypeEntity>().Where(x => x.Type == "mealshift").Select(x => x.Code).ToListAsync();
|
||||
}
|
||||
|
||||
private async Task CheckExistsMealShiftAsync(BusinessPlaceShiftSaveMealShiftRequest request)
|
||||
{
|
||||
var exists = await _dbContext.Queryable<BusinessShiftMealRelationshipEntity>()
|
||||
.Where(x => x.ShiftCode == request.ShiftCode)
|
||||
.Where(x => x.ShiftType == request.ShiftType)
|
||||
.WhereIF(request.Id.HasValue, x => x.Id != request.Id)
|
||||
.AnyAsync();
|
||||
|
||||
exists.ThrowIfTrue("重复设置!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ using Dlhis.Basic.Device.Services;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Org.BouncyCastle.Asn1.Ocsp;
|
||||
|
||||
namespace Dlhis.Basic.Device.Controllers;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public class DeviceConnectService : IDeviceConnectService
|
||||
[IgnoreTenant]
|
||||
public async Task<string> ResigterAsync(DeviceResigterRequest request)
|
||||
{
|
||||
var businessPlace = await _dbContext.Queryable<CanteenBusinessPlaceEntity>().Where(x => x.CustomCode == request.BusinessCustomCode).FirstAsync();
|
||||
var businessPlace = await _dbContext.Queryable<BusinessPlaceEntity>().Where(x => x.CustomCode == request.BusinessCustomCode).FirstAsync();
|
||||
businessPlace.ThrowIfNull("营业点不存在");
|
||||
|
||||
var device = await GetEnableDeviceAsync(request.UniqueNo, false, request.DeployPlace, businessPlace.TenantId);
|
||||
@@ -71,7 +71,7 @@ public class DeviceConnectService : IDeviceConnectService
|
||||
var registry = await _dbContext.Queryable<DeviceRegistryEntity>().Where(x => x.DeviceUniqueNo == request.UniqueNo).FirstAsync();
|
||||
registry.ThrowIfNull($"{request.UniqueNo}的设备注册信息不存在,无法设置营业点");
|
||||
|
||||
var businessPlace = await _dbContext.Queryable<CanteenBusinessPlaceEntity>().Where(x => x.Code == request.BusinessPlaceCode).FirstAsync();
|
||||
var businessPlace = await _dbContext.Queryable<BusinessPlaceEntity>().Where(x => x.Code == request.BusinessPlaceCode).FirstAsync();
|
||||
businessPlace.ThrowIfNull("营业点不存在,无法设置到设备注册信息中");
|
||||
|
||||
//更新营业点信息
|
||||
|
||||
@@ -65,7 +65,6 @@ public class DeviceGroupService : IDeviceGroupService
|
||||
{
|
||||
var entity = await _dbContext.Queryable<DeviceGroupEntity>().Where(x => x.Id == request.Id).FirstAsync();
|
||||
entity.ThrowIfNull("设备组不存在,无法更新");
|
||||
|
||||
entity.Editable.ThrowIfFalse("不可编辑当前组");
|
||||
|
||||
var nextDevices = await GetDevicesAsync(entity.Code);
|
||||
@@ -78,6 +77,7 @@ public class DeviceGroupService : IDeviceGroupService
|
||||
(request.Type.HasValue && request.Type != entity.Type && nextDevices.Any()).ThrowIfTrue("分组设备类型不匹配,无法修改类型");
|
||||
}
|
||||
|
||||
request.Adapt(entity);
|
||||
await _dbContext.UpdateAsync(entity);
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,6 @@ public class DeviceGroupService : IDeviceGroupService
|
||||
var relationships = await _dbContext.Queryable<DeviceGroupRelationshipEntity>().Where(x => x.GroupCode == request.GroupCode).ToListAsync();
|
||||
await _dbContext.DeleteAsync(relationships);
|
||||
|
||||
|
||||
var entities = request.DeviceCodes.Select(x => new DeviceGroupRelationshipEntity
|
||||
{
|
||||
GroupCode = request.GroupCode,
|
||||
|
||||
@@ -9,7 +9,6 @@ using Kurisu.AspNetCore.Utils.Extensions;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using Kurisu.SqlSugar.Attributes;
|
||||
using Kurisu.SqlSugar.Services;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Dlhis.Basic.Device.Services.Implements;
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public class GainfoGroupsController : ControllerBase
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[HttpPost("save")]
|
||||
public async Task SaveAsync(GainfoGroupSaveRequest request)
|
||||
{
|
||||
await _gainfoGroupService.SaveAsync(request);
|
||||
|
||||
@@ -37,8 +37,8 @@ public class BalanceService : IBalanceService
|
||||
var page = await _dbContext.Queryable<BalanceRecordEntity>()
|
||||
.LeftJoin<GainfoEntity>((record, ga) => record.UserNo == ga.No)
|
||||
.LeftJoin<DepartmentEntity>((record, ga, department) => ga.DepartmentNo == department.No)
|
||||
.LeftJoin<CanteenBusinessPlaceEntity>((record, ga, department, bplace) => record.BusinessPlaceCode == bplace.Code)
|
||||
.LeftJoin<CanteenBusinessShiftEntity>((record, ga, department, bplace, bshift) => record.BusinessShiftCode == bshift.Code)
|
||||
.LeftJoin<BusinessPlaceEntity>((record, ga, department, bplace) => record.BusinessPlaceCode == bplace.Code)
|
||||
.LeftJoin<BusinessShiftEntity>((record, ga, department, bplace, bshift) => record.BusinessShiftCode == bshift.Code)
|
||||
.LeftJoin<BasicTypeEntity>((record, ga, department, bplace, bshift, type) => record.BusinessShiftCode.ToString() == type.Code)
|
||||
.WhereIF(request.SearchDateTimePeriod?.Start.HasValue == true, record => record.CostDate >= request.SearchDateTimePeriod.Start)
|
||||
.WhereIF(request.SearchDateTimePeriod?.End.HasValue == true, record => record.CostDate <= request.SearchDateTimePeriod.End)
|
||||
@@ -160,8 +160,8 @@ public class BalanceService : IBalanceService
|
||||
{
|
||||
var paeginfo = await _dbContext.Queryable<BalanceRecordEntity>()
|
||||
.LeftJoin<DepartmentEntity>((record, department) => record.DepartmentNo == department.No)
|
||||
.LeftJoin<CanteenBusinessPlaceEntity>((record, department, bplace) => record.BusinessPlaceCode == bplace.Code)
|
||||
.LeftJoin<CanteenBusinessShiftEntity>((record, department, bplace, bshift) => record.BusinessShiftCode == bshift.Code)
|
||||
.LeftJoin<BusinessPlaceEntity>((record, department, bplace) => record.BusinessPlaceCode == bplace.Code)
|
||||
.LeftJoin<BusinessShiftEntity>((record, department, bplace, bshift) => record.BusinessShiftCode == bshift.Code)
|
||||
.LeftJoin<BasicTypeEntity>((record, department, bplace, bshift, type) => record.BusinessShiftCode.ToString() == type.Code)
|
||||
.WhereIF(!request.Name.IsEmpty(), record => record.Name == request.Name)
|
||||
.WhereIF(!request.DepartmentNo.IsEmpty(), record => record.DepartmentNo == request.DepartmentNo)
|
||||
@@ -436,8 +436,8 @@ public class BalanceService : IBalanceService
|
||||
var page = await _dbContext.Queryable<BalanceRecordEntity>()
|
||||
.LeftJoin<GainfoEntity>((record, ga) => record.UserNo == ga.No)
|
||||
.LeftJoin<DepartmentEntity>((record, ga, department) => ga.DepartmentNo == department.No)
|
||||
.LeftJoin<CanteenBusinessPlaceEntity>((record, ga, department, bplace) => record.BusinessPlaceCode == bplace.Code)
|
||||
.LeftJoin<CanteenBusinessShiftEntity>((record, ga, department, bplace, bshift) => record.BusinessShiftCode == bshift.Code)
|
||||
.LeftJoin<BusinessPlaceEntity>((record, ga, department, bplace) => record.BusinessPlaceCode == bplace.Code)
|
||||
.LeftJoin<BusinessShiftEntity>((record, ga, department, bplace, bshift) => record.BusinessShiftCode == bshift.Code)
|
||||
.LeftJoin<BasicTypeEntity>((record, ga, department, bplace, bshift, type) => record.BusinessShiftCode.ToString() == type.Code)
|
||||
.WhereIF(request.SearchDate.HasValue, record => record.CostDate >= start)
|
||||
.WhereIF(request.SearchDate.HasValue, record => record.CostDate <= end)
|
||||
@@ -492,8 +492,8 @@ public class BalanceService : IBalanceService
|
||||
var page = await _dbContext.Queryable<BalanceRecordEntity>()
|
||||
.LeftJoin<GainfoEntity>((record, ga) => record.UserNo == ga.No)
|
||||
.LeftJoin<DepartmentEntity>((record, ga, department) => ga.DepartmentNo == department.No)
|
||||
.LeftJoin<CanteenBusinessPlaceEntity>((record, ga, department, bplace) => record.BusinessPlaceCode == bplace.Code)
|
||||
.LeftJoin<CanteenBusinessShiftEntity>((record, ga, department, bplace, bshift) => record.BusinessShiftCode == bshift.Code)
|
||||
.LeftJoin<BusinessPlaceEntity>((record, ga, department, bplace) => record.BusinessPlaceCode == bplace.Code)
|
||||
.LeftJoin<BusinessShiftEntity>((record, ga, department, bplace, bshift) => record.BusinessShiftCode == bshift.Code)
|
||||
.LeftJoin<BasicTypeEntity>((record, ga, department, bplace, bshift, type) => record.BusinessShiftCode.ToString() == type.Code)
|
||||
.WhereIF(request.SearchDateTimePeriod?.Start.HasValue == true, record => record.CostDate >= request.SearchDateTimePeriod.Start)
|
||||
.WhereIF(request.SearchDateTimePeriod?.End.HasValue == true, record => record.CostDate <= request.SearchDateTimePeriod.End)
|
||||
@@ -557,7 +557,7 @@ public class BalanceService : IBalanceService
|
||||
|
||||
var offCount = devices.Where(x => x.Enable == false).Count();
|
||||
|
||||
var places = await _dbContext.Queryable<CanteenBusinessPlaceEntity>()
|
||||
var places = await _dbContext.Queryable<BusinessPlaceEntity>()
|
||||
.ToListAsync();
|
||||
|
||||
var time = DateTime.Now.ToString("yyyy-MM-dd");
|
||||
@@ -740,7 +740,7 @@ public class BalanceService : IBalanceService
|
||||
{
|
||||
var shiftCodeDict = new Dictionary<string, string>();
|
||||
|
||||
var shifts = await _dbContext.Queryable<CanteenBusinessShiftEntity>().ToListAsync();
|
||||
var shifts = await _dbContext.Queryable<BusinessShiftEntity>().ToListAsync();
|
||||
//guid
|
||||
var breakfastCode = shifts.Where(x => x.CustomCode == "shift-breakfast").Select(x => x.Code).First().ToString();
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ using Dlhis.Entity.Basic.Entity;
|
||||
using Dlhis.Entity.Canteen.Entities;
|
||||
using Dlhis.Entity.Canteen.Enums;
|
||||
using Dlhis.Entity.Device.Entities;
|
||||
using Dlhis.Entity.Sys.Entities;
|
||||
using Kurisu.AspNetCore.UnifyResultAndValidation;
|
||||
using Kurisu.AspNetCore.Utils;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
@@ -66,10 +65,10 @@ public class OrderService : IOrderService
|
||||
}
|
||||
else
|
||||
{
|
||||
_ = long.TryParse(request.UserUniqueNo, out userId);
|
||||
_ = long.TryParse(request.UserUniqueNo, out userId);
|
||||
}
|
||||
var gainfo = await _dbContext.Queryable<GainfoEntity>()
|
||||
.Where(x => x.No == request.UserUniqueNo || x.Code == request.UserUniqueNo || x.Id == userId|| x.CardNo == card)
|
||||
.Where(x => x.No == request.UserUniqueNo || x.Code == request.UserUniqueNo || x.Id == userId || x.CardNo == card)
|
||||
.FirstAsync();
|
||||
|
||||
|
||||
@@ -134,11 +133,20 @@ public class OrderService : IOrderService
|
||||
device.ThrowIfNull("设备不存在或者尚未启用");
|
||||
var registry = await _dbContext.Queryable<DeviceRegistryEntity>().Where(x => x.DeviceUniqueNo == request.DeviceUniqueNo).FirstAsync();
|
||||
registry.ThrowIfNull("设备尚未注册");
|
||||
var businessPlace = await _dbContext.Queryable<CanteenBusinessPlaceEntity>().Where(x => x.Code == registry.BusinessPlaceCode).FirstAsync();
|
||||
businessPlace.ThrowIfNull("营业点尚未设置");
|
||||
var businessPlaceInfo = await _dbContext.Queryable<BusinessPlaceEntity>()
|
||||
.LeftJoin<BusinessPlaceShiftRelationshipEntity>((x, sr) => x.Code == sr.PlaceCode)
|
||||
.Where(x => x.Code == registry.BusinessPlaceCode)
|
||||
.Select((x, sr) => new
|
||||
{
|
||||
x.Code,
|
||||
sr.ShiftCode,
|
||||
x.TenantId
|
||||
})
|
||||
.FirstAsync();
|
||||
businessPlaceInfo.ThrowIfNull("营业点尚未设置");
|
||||
|
||||
//获取当前消费餐次
|
||||
var shifts = await _dbContext.Queryable<CanteenBusinessShiftEntity>().Where(x => x.BusinessPlaceCode == businessPlace.Code).ToListAsync();
|
||||
var shifts = await _dbContext.Queryable<BusinessShiftMealRelationshipEntity>().Where(x => x.ShiftCode == businessPlaceInfo.ShiftCode).ToListAsync();
|
||||
|
||||
var shift = shifts.FirstOrDefault(x => new TimePeriod()
|
||||
{
|
||||
@@ -184,8 +192,9 @@ public class OrderService : IOrderService
|
||||
UserNo = gainfo.No,
|
||||
UserCode = gainfo.Code,
|
||||
Amount = request.Amount,
|
||||
BusinessPlaceCode = businessPlace.Code,
|
||||
BusinessShiftCode = shift?.Code,
|
||||
BusinessPlaceCode = businessPlaceInfo.Code,
|
||||
BusinessShiftCode = shift?.ShiftCode,
|
||||
ShiftType = shift?.ShiftType,
|
||||
CostDate = costDate.Date,
|
||||
CostId = gainfo.CostId,
|
||||
DepartmentNo = gainfo.DepartmentNo,
|
||||
@@ -206,7 +215,7 @@ public class OrderService : IOrderService
|
||||
CostDateTime = request.CostDateTime,
|
||||
|
||||
//标识当前消费的基地
|
||||
TenantId = businessPlace.TenantId,
|
||||
TenantId = businessPlaceInfo.TenantId,
|
||||
};
|
||||
|
||||
var orderId = await _dbContext.InsertReturnIdentityAsync(order);
|
||||
@@ -364,7 +373,7 @@ public class OrderService : IOrderService
|
||||
/// <param name="order"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="UserFriendlyException"></exception>
|
||||
private async Task Verify(Dictionary<CanteenSettingItemEnumType, string> settings, List<CanteenBusinessShiftEntity> shifts, DateTime costDateTime, CanteenOrderEntity order)
|
||||
private async Task Verify(Dictionary<CanteenSettingItemEnumType, string> settings, List<BusinessShiftMealRelationshipEntity> shifts, DateTime costDateTime, CanteenOrderEntity order)
|
||||
{
|
||||
//在线
|
||||
if (!order.IsOffline)
|
||||
@@ -388,7 +397,7 @@ public class OrderService : IOrderService
|
||||
var dayMarketCostMax = GetSetting<decimal>(settings, CanteenSettingItemEnumType.DayMarketCostMax);
|
||||
if (dayMarketCostMax != default)
|
||||
{
|
||||
var businessPlaceCodes = await _dbContext.Queryable<CanteenBusinessPlaceEntity>()
|
||||
var businessPlaceCodes = await _dbContext.Queryable<BusinessPlaceEntity>()
|
||||
.Where(x => x.Catalog == CanteenBusinessPlaceCatalogEnumType.Supermarket)
|
||||
.Select(x => x.Code).ToListAsync();
|
||||
|
||||
@@ -473,7 +482,7 @@ public class OrderService : IOrderService
|
||||
/// <returns></returns>
|
||||
/// <exception cref="UserFriendlyException"></exception>
|
||||
/// <exception cref="VersionExceptions"></exception>
|
||||
private async Task GenerateConsumeRecordAsync(long orderId, Dictionary<CanteenSettingItemEnumType, string> settings, List<CanteenBusinessShiftEntity> shifts, DateTime costDateTime)
|
||||
private async Task GenerateConsumeRecordAsync(long orderId, Dictionary<CanteenSettingItemEnumType, string> settings, List<BusinessShiftMealRelationshipEntity> shifts, DateTime costDateTime)
|
||||
{
|
||||
var order = await _dbContext.Queryable<CanteenOrderEntity>().Where(x => x.Id == orderId).FirstAsync();
|
||||
//校验
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace Dlhis.Entity.Basic.Entity;
|
||||
/// <summary>
|
||||
/// 营业点
|
||||
/// </summary>
|
||||
[SugarTable(TableName = "CanteenBusinessPlace", TableDescription = "营业点")]
|
||||
public class CanteenBusinessPlaceEntity : SugarBaseEntity, ITenantId
|
||||
[SugarTable(TableName = "BusinessPlace", TableDescription = "营业点")]
|
||||
public class BusinessPlaceEntity : SugarBaseEntity, ITenantId
|
||||
{
|
||||
/// <summary>
|
||||
/// 代号
|
||||
@@ -0,0 +1,18 @@
|
||||
using Kurisu.Core.DataAccess.Entity;
|
||||
using Kurisu.SqlSugar;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.Entity.Basic.Entity;
|
||||
|
||||
[SugarTable(TableName = "BusinessPlaceShiftRelationship", TableDescription = "营业点餐次关系")]
|
||||
public class BusinessPlaceShiftRelationshipEntity : SugarBaseEntity, ITenantId
|
||||
{
|
||||
[SugarColumn(ColumnDescription = "营业点code")]
|
||||
public Guid PlaceCode { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnDescription = "餐次code")]
|
||||
public Guid ShiftCode { get; set; }
|
||||
|
||||
public string TenantId { get; set; }
|
||||
}
|
||||
32
Src/Dlhis.Entity/Basic/Entity/BusinessShiftEntity.cs
Normal file
32
Src/Dlhis.Entity/Basic/Entity/BusinessShiftEntity.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Kurisu.Core.DataAccess.Entity;
|
||||
using Kurisu.SqlSugar;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.Entity.Basic.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 营业点餐次
|
||||
/// </summary>
|
||||
[SugarTable(TableName = "BusinessShift", TableDescription = "营业点餐次")]
|
||||
public class BusinessShiftEntity : SugarBaseEntity, ITenantId
|
||||
{
|
||||
/// <summary>
|
||||
/// 代号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "code")]
|
||||
public Guid Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义代号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "自定义手工号")]
|
||||
public string CustomCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐次名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "餐次名称")]
|
||||
public string Name { get; set; }
|
||||
|
||||
public string TenantId { get; set; }
|
||||
}
|
||||
@@ -4,29 +4,26 @@ using SqlSugar;
|
||||
|
||||
namespace Dlhis.Entity.Basic.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 营业点餐次
|
||||
/// </summary>
|
||||
[SugarTable(TableName = "CanteenBusinessShift", TableDescription = "营业点餐次")]
|
||||
public class CanteenBusinessShiftEntity : SugarBaseEntity, ITenantId
|
||||
[SugarTable(TableName = "BusinessShiftMealRelationship", TableDescription = "营业点餐次组合")]
|
||||
public class BusinessShiftMealRelationshipEntity : SugarBaseEntity, ITenantId
|
||||
{
|
||||
/// <summary>
|
||||
/// 营业点代号
|
||||
/// 餐次组合Code
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "营业点code")]
|
||||
public Guid BusinessPlaceCode { get; set; }
|
||||
[SugarColumn(ColumnDescription = "餐次组合Code", UniqueGroupNameList = new[] { "idx_CanteenBusinessShiftRelationship_shiftcode_shifttype" })]
|
||||
public Guid ShiftCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 代号
|
||||
/// 餐次组合手工号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "code")]
|
||||
public Guid Code { get; set; }
|
||||
[SugarColumn(ColumnDescription = "餐次组合手工号")]
|
||||
public string ShiftCustomCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义代号
|
||||
/// 餐次
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "自定义手工号")]
|
||||
public string CustomCode { get; set; }
|
||||
[SugarColumn(ColumnDescription = "餐次", UniqueGroupNameList = new[] { "idx_CanteenBusinessShiftRelationship_shiftcode_shifttype" })]
|
||||
public string ShiftType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 经营开始时间
|
||||
@@ -46,5 +43,6 @@ public class CanteenBusinessShiftEntity : SugarBaseEntity, ITenantId
|
||||
[SugarColumn(ColumnDescription = "序号")]
|
||||
public int Sequence { get; set; }
|
||||
|
||||
|
||||
public string TenantId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ public class BalanceRecordEntity : SugarBaseEntity, ITenantId
|
||||
/// <summary>
|
||||
/// 营业点
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "营业点" , IsNullable = true)]
|
||||
[SugarColumn(ColumnDescription = "营业点", IsNullable = true)]
|
||||
public Guid? BusinessPlaceCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -73,6 +73,12 @@ public class BalanceRecordEntity : SugarBaseEntity, ITenantId
|
||||
[SugarColumn(ColumnDescription = "餐次", IsNullable = true)]
|
||||
public Guid? BusinessShiftCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 餐次段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "餐次段", IsNullable = true)]
|
||||
public string ShiftType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属成本日期
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user