Browse Source

单位体检次数

bjmzak
wxd 2 years ago
parent
commit
80fcce5f63
  1. 2
      src/Shentun.Peis.Application.Contracts/CustomerOrgRegisters/CreateCustomerOrgRegisterDto.cs
  2. 4
      src/Shentun.Peis.Application.Contracts/CustomerOrgRegisters/CustomerOrgRegisterDto.cs
  3. 21
      src/Shentun.Peis.Application/CustomerOrgRegisters/CustomerOrgRegisterAppService.cs
  4. 8
      src/Shentun.Peis.Application/CustomerReports/CustomerReportAppService.cs
  5. 4
      src/Shentun.Peis.Domain/CustomerOrgRegisters/CustomerOrgRegister.cs
  6. 4
      src/Shentun.Peis.Domain/CustomerOrgRegisters/CustomerOrgRegisterManager.cs
  7. 13431
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240412020145_init20240412003.Designer.cs
  8. 62
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240412020145_init20240412003.cs
  9. 8
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

2
src/Shentun.Peis.Application.Contracts/CustomerOrgRegisters/CreateCustomerOrgRegisterDto.cs

@ -22,7 +22,7 @@ namespace Shentun.Peis.CustomerOrgRegisters
/// <summary>
/// 计划号
/// </summary>
public string? RegisterNo { get; set; }
public string RegisterNo { get; set; }
/// <summary>

4
src/Shentun.Peis.Application.Contracts/CustomerOrgRegisters/CustomerOrgRegisterDto.cs

@ -25,7 +25,7 @@ namespace Shentun.Peis.CustomerOrgRegisters
/// <summary>
/// 计划号
/// </summary>
public string? RegisterNo { get; set; }
public string RegisterNo { get; set; }
/// <summary>
@ -43,7 +43,7 @@ namespace Shentun.Peis.CustomerOrgRegisters
/// <summary>
/// 结束日期
/// </summary>
public string? EndTime { get; set; }
public string EndTime { get; set; }
/// <summary>

21
src/Shentun.Peis.Application/CustomerOrgRegisters/CustomerOrgRegisterAppService.cs

@ -68,6 +68,7 @@ namespace Shentun.Peis.CustomerOrgRegisters
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[RemoteService(false)]
public override async Task<PagedResultDto<CustomerOrgRegisterDto>> GetListAsync(PagedAndSortedResultRequestDto input)
{
return await base.GetListAsync(input);
@ -107,10 +108,8 @@ namespace Shentun.Peis.CustomerOrgRegisters
Id = s.Id,
LastModificationTime = s.LastModificationTime,
LastModifierId = s.LastModifierId,
//BeginTime = s.BeginTime.ToDateTime(TimeOnly.MinValue),
//EndTime = s.EndTime.GetValueOrDefault().ToDateTime(TimeOnly.MinValue),
BeginTime = s.BeginTime.ToString("yyyy/MM/dd"),
EndTime = s.EndTime.GetValueOrDefault().ToDateTime(TimeOnly.MinValue).ToString("yyyy/MM/dd"),
BeginTime = DataHelper.ConversionDateToString(s.BeginTime),
EndTime = DataHelper.ConversionDateToString(s.EndTime),
RegisterName = s.RegisterName,
RegisterNo = s.RegisterNo,
MedicalTimes = s.MedicalTimes,
@ -147,7 +146,7 @@ namespace Shentun.Peis.CustomerOrgRegisters
return dto;
}
/// <summary>
/// 更新 是否完成状态
@ -202,24 +201,22 @@ namespace Shentun.Peis.CustomerOrgRegisters
var entlist = (await Repository.GetQueryableAsync()).Where(m => m.CustomerOrgId == CustomerOrgId).ToList();
var entdto = entlist.Select( s => new CustomerOrgRegisterDto
var entdto = entlist.Select(s => new CustomerOrgRegisterDto
{
CreationTime = s.CreationTime,
CreatorId = s.CreatorId,
Id = s.Id,
LastModificationTime = s.LastModificationTime,
LastModifierId = s.LastModifierId,
//BeginTime = s.BeginTime.ToDateTime(TimeOnly.MinValue),
//EndTime = s.EndTime.GetValueOrDefault().ToDateTime(TimeOnly.MinValue),
BeginTime = s.BeginTime.ToString("yyyy/MM/dd"),
EndTime = s.EndTime.GetValueOrDefault().ToDateTime(TimeOnly.MinValue).ToString("yyyy/MM/dd"),
BeginTime = DataHelper.ConversionDateToString(s.BeginTime),
EndTime = DataHelper.ConversionDateToString(s.EndTime),
RegisterName = s.RegisterName,
RegisterNo = s.RegisterNo,
MedicalTimes = s.MedicalTimes,
IsComplete = s.IsComplete,
CustomerOrgId = s.CustomerOrgId,
CreatorName = _cacheService.GetUserNameAsync(s.CreatorId).Result,
LastModifierName = _cacheService.GetUserNameAsync(s.LastModifierId).Result
CreatorName = _cacheService.GetUserNameAsync(s.CreatorId).Result,
LastModifierName = _cacheService.GetUserNameAsync(s.LastModifierId).Result
}).OrderBy(o => o.MedicalTimes).ToList();
return entdto;

8
src/Shentun.Peis.Application/CustomerReports/CustomerReportAppService.cs

@ -880,8 +880,8 @@ namespace Shentun.Peis.CustomerReports
{
CustomerOrgs = query.Select(s => new GetUnitPhysicalExaminationStandardReport_CustomerOrg
{
BeginTime = s.a.BeginTime.ToString(),
EndTime = s.a.EndTime != null ? s.a.EndTime.ToString() : "",
BeginTime = DataHelper.ConversionDateToString(s.a.BeginTime),
EndTime = DataHelper.ConversionDateToString(s.a.EndTime),
CustomerOrgName = s.ab != null ? s.ab.DisplayName : "",
MedicalTimes = s.a.MedicalTimes
}).ToList(),
@ -931,8 +931,8 @@ namespace Shentun.Peis.CustomerReports
{
CustomerOrgs = query.Select(s => new GetUnitPhysicalExaminationStandardReport_CustomerOrg
{
BeginTime = s.a.BeginTime.ToString(),
EndTime = s.a.EndTime != null ? s.a.EndTime.ToString() : "",
BeginTime = DataHelper.ConversionDateToString(s.a.BeginTime),
EndTime = DataHelper.ConversionDateToString(s.a.EndTime),
CustomerOrgName = s.ab != null ? s.ab.DisplayName : "",
MedicalTimes = s.a.MedicalTimes
}).ToList(),

4
src/Shentun.Peis.Domain/CustomerOrgRegisters/CustomerOrgRegister.cs

@ -54,12 +54,12 @@ namespace Shentun.Peis.Models
/// 开始日期
/// </summary>
[Column("begin_time")]
public DateOnly BeginTime { get; set; }
public DateTime BeginTime { get; set; }
/// <summary>
/// 结束日期
/// </summary>
[Column("end_time")]
public DateOnly? EndTime { get; set; }
public DateTime? EndTime { get; set; }
/// <summary>
/// 完成标志
/// </summary>

4
src/Shentun.Peis.Domain/CustomerOrgRegisters/CustomerOrgRegisterManager.cs

@ -67,7 +67,7 @@ namespace Shentun.Peis.CustomerOrgRegisters
CustomerOrgRegister entity = new CustomerOrgRegister
{
BeginTime = DateOnly.FromDateTime(DateTime.Now),
BeginTime = DateTime.Now,
CustomerOrgId = CustomerOrgId,
IsComplete = 'N',
MedicalTimes = (short)MedicalTimes,
@ -95,7 +95,7 @@ namespace Shentun.Peis.CustomerOrgRegisters
entity.IsComplete = IsComplete;
if (IsComplete == 'Y')
{
entity.EndTime = DateOnly.FromDateTime(DateTime.Now);
entity.EndTime = DateTime.Now;
}
else
{

13431
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240412020145_init20240412003.Designer.cs
File diff suppressed because it is too large
View File

62
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240412020145_init20240412003.cs

@ -0,0 +1,62 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class init20240412003 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<DateTime>(
name: "end_time",
table: "customer_org_register",
type: "timestamp without time zone",
nullable: true,
comment: "结束日期",
oldClrType: typeof(DateOnly),
oldType: "date",
oldNullable: true,
oldComment: "结束日期");
migrationBuilder.AlterColumn<DateTime>(
name: "begin_time",
table: "customer_org_register",
type: "timestamp without time zone",
nullable: false,
defaultValueSql: "(date(timezone('UTC-8'::text, now())) - 1)",
comment: "开始日期",
oldClrType: typeof(DateOnly),
oldType: "date",
oldDefaultValueSql: "(date(timezone('UTC-8'::text, now())) - 1)",
oldComment: "开始日期");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<DateOnly>(
name: "end_time",
table: "customer_org_register",
type: "date",
nullable: true,
comment: "结束日期",
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true,
oldComment: "结束日期");
migrationBuilder.AlterColumn<DateOnly>(
name: "begin_time",
table: "customer_org_register",
type: "date",
nullable: false,
defaultValueSql: "(date(timezone('UTC-8'::text, now())) - 1)",
comment: "开始日期",
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldDefaultValueSql: "(date(timezone('UTC-8'::text, now())) - 1)",
oldComment: "开始日期");
}
}
}

8
src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

@ -2642,9 +2642,9 @@ namespace Shentun.Peis.Migrations
.HasColumnType("uuid")
.HasColumnName("id");
b.Property<DateOnly>("BeginTime")
b.Property<DateTime>("BeginTime")
.ValueGeneratedOnAdd()
.HasColumnType("date")
.HasColumnType("timestamp without time zone")
.HasColumnName("begin_time")
.HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)")
.HasComment("开始日期");
@ -2670,8 +2670,8 @@ namespace Shentun.Peis.Migrations
.IsFixedLength()
.HasComment("单位编号");
b.Property<DateOnly?>("EndTime")
.HasColumnType("date")
b.Property<DateTime?>("EndTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("end_time")
.HasComment("结束日期");

Loading…
Cancel
Save