Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing Details

Uat_IRC_Net8
hang 2024-12-30 18:24:24 +08:00
commit 33c27cccc2
8 changed files with 18670 additions and 3 deletions

View File

@ -9642,6 +9642,11 @@
问题标识
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionTrialAddOrEdit.DefaultValue">
<summary>
默认值
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionTrialAddOrEdit.QuestionEnName">
<summary>
问题英文名称
@ -9735,6 +9740,11 @@
问题标识
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit.DefaultValue">
<summary>
默认值
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit.QuestionEnName">
<summary>
问题英文名称
@ -10418,6 +10428,11 @@
是否是裁判问题
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCalculateTableQuestionsOutDto.DefaultValue">
<summary>
默认值
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCalculateTableQuestionsOutDto.ClassifyEditType">
<summary>
分类编辑类型 是否可编辑

View File

@ -465,6 +465,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public QuestionMark? QuestionMark { get; set; }
/// <summary>
/// 默认值
/// </summary>
public string DefaultValue { get; set; } = string.Empty;
/// <summary>
/// 问题英文名称
/// </summary>
@ -603,6 +608,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public QuestionMark? QuestionMark { get; set; }
/// <summary>
/// 默认值
/// </summary>
public string DefaultValue { get; set; } = string.Empty;
/// <summary>
/// 问题英文名称
/// </summary>
@ -1735,6 +1745,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
[Comment("问题标识")]
public QuestionMark? QuestionMark { get; set; }
/// <summary>
/// 默认值
/// </summary>
public string DefaultValue { get; set; } = string.Empty;
[Comment("字典code")]
public string DictionaryCode { get; set; } = string.Empty;
[Comment("数值类型")]

View File

@ -1,8 +1,10 @@
using DocumentFormat.OpenXml.EMMA;
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Infrastructure;
using MassTransit;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
@ -425,7 +427,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
{
tableAnswerList.Add(new ReadingTableQuestionAnswer()
{
Answer = string.Empty,
Answer = otherQuestion.DefaultValue,
QuestionId = tableQuestion.Id,
TrialId = taskinfo.TrialId,
VisitTaskId = taskinfo.Id,
@ -591,6 +593,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
public async Task<decimal> GetFatFractionAvg(ReadingCalculateDto inDto)
{
decimal result = 0;
var rowInfo = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction)
.SelectMany(x => x.TableRowInfoList).ToList();
@ -633,7 +636,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var avgAnswernum= answers.Select(x=>x.IsNullOrEmptyReturn0()).Average(x=>x);
avgAnswer = decimal.Round(avgAnswernum, inDto.DigitPlaces, MidpointRounding.AwayFromZero).ToString("F" + inDto.DigitPlaces.ToString());
}
if(item.TableQuestionList.Where(x => x.QuestionMark== QuestionMark.IsMeasurable).Select(x => x.Answer).FirstOrDefault().EqEnum(YesOrNoOrNa.No))
{
avgAnswer = "NA";
}
tableAnswers.Add(new ReadingTableQuestionAnswer()
{
Answer = avgAnswer,
@ -666,7 +672,31 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
{
ReadingCalculateDto readingData = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
var markList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync();
var rowInfo = readingData.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction)
.SelectMany(x => x.TableRowInfoList).ToList();
var tableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.IsMeasurable && x.Answer.IsNotNullOrEmpty())).ToList();
if (tableQuestionList.Count() != 8)
{
throw new BusinessValidationFailedException(_localizer["MRIPDFF_AllNeedToBeMark"]);
}
var notableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.IsMeasurable && x.Answer.EqEnum(YesOrNoOrNa.No))).ToList();
foreach (var item in notableQuestionList)
{
if (markList.Any(x => x.RowId == item.RowId))
{
throw new BusinessValidationFailedException(_localizer["MRIPDFF_NeedClearMark"]);
}
}
}
}
}

View File

@ -65,7 +65,8 @@ public class ReadingTableQuestionSystem : BaseAddAuditEntity
[Comment("问题名称")]
public string QuestionName { get; set; } = string.Empty;
[Comment("默认值")]
public string DefaultValue { get; set; } = string.Empty;
public IsRequired IsRequired { get; set; }
[Comment("排序号")]

View File

@ -93,6 +93,9 @@ public class ReadingTableQuestionTrial : BaseAddAuditEntity
public ShowQuestion ShowQuestion { get; set; }
public int? MaxRowCount { get; set; }
[Comment("默认值")]
public string DefaultValue { get; set; } = string.Empty;
[Comment("图片数量")]
public int? ImageCount { get; set; }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,44 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class tableDefaultValue : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "DefaultValue",
table: "ReadingTableQuestionTrial",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "",
comment: "默认值");
migrationBuilder.AddColumn<string>(
name: "DefaultValue",
table: "ReadingTableQuestionSystem",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "",
comment: "默认值");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "DefaultValue",
table: "ReadingTableQuestionTrial");
migrationBuilder.DropColumn(
name: "DefaultValue",
table: "ReadingTableQuestionSystem");
}
}
}

View File

@ -6582,6 +6582,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasColumnType("nvarchar(400)")
.HasComment("数据表名称");
b.Property<string>("DefaultValue")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)")
.HasComment("默认值");
b.Property<Guid?>("DependParentId")
.HasColumnType("uniqueidentifier")
.HasComment("关联父问题");
@ -6796,6 +6802,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("DefaultValue")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)")
.HasComment("默认值");
b.Property<Guid?>("DependParentId")
.HasColumnType("uniqueidentifier");