Commit f3d32e90 by 陶然

不合格不自动回传

parent f81a1099
......@@ -122,7 +122,7 @@ namespace Njhg.Third.Semir.Jobs
TaskContext.Message = "暂无数据处理";
return true;
}
var semirKvids = semirs.ConvertAll(o => o.Kvid);
//var semirKvids = semirs.ConvertAll(o => o.Kvid);
var instance = Activator.CreateInstance(typeof(SemirOrder)) as IEntityIsThirdReportOrder;
var successed = 0;
......@@ -133,13 +133,20 @@ namespace Njhg.Third.Semir.Jobs
//else skip++;
//TaskContext.Message = $"待回传订单:{semir.SerialNumber},包含报告:{semir.ReportIds} , 成功回传:{successed}条,跳过{skip}条。";
//return true;
foreach (var kvid in semirKvids)
foreach (var order in semirs)
{
var result = instance.OnUploadThirdReport(kvid);
var thirdDetails = conn.Select<ThirdReportOrderDetail>(o => o.ThirdOrderKvid == order.Kvid);
if (thirdDetails.IsNullOrEmpty()) continue;
var reports = conn.SelectByIds<Report>(thirdDetails.ConvertAll(o => o.ReportKvid));
if (reports.IsNullOrEmpty()) continue;
if (reports.Exists(o => o.Status < (int)ReportStatusType.ReportIssue)) continue;
if (reports.Exists(o => o.TestJudgement=="不合格")) continue;
var result = instance.OnUploadThirdReport(order.Kvid);
if (result) successed++;
else skip++;
}
TaskContext.Message = $"合计待回传订单:{semirKvids.Count}条,成功回传:{successed}条,跳过{skip}条。";
TaskContext.Message = $"合计待回传订单:{semirs.Count}条,成功回传:{successed}条,跳过{skip}条。";
return true;
}
catch (Exception ex)
......
......@@ -32,8 +32,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Kivii.Common.V4.5, Version=5.6.2024.1160, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Kivii.Common.5.6.2024.1160\lib\net45\Kivii.Common.V4.5.dll</HintPath>
<HintPath>..\..\..\packages\Kivii.Common.5.6.2024.1160\lib\net45\Kivii.Common.V4.5.dll</HintPath>
</Reference>
<Reference Include="Kivii.Core.V4.5, Version=5.6.2023.9000, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
......@@ -67,7 +66,7 @@
<None Include="Resources\南京海关森马质检接口描述.docx" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Kivii.Biz.Lims1.0\Src\Kivii.Biz.Lims.V1.0.csproj">
<ProjectReference Include="..\..\..\Kivii.K5\Kivii.Biz.Lims.V1.0\Src\Kivii.Biz.Lims.V1.0.csproj">
<Project>{c2a2c9b2-e412-4267-8dad-4c37a3fe33e3}</Project>
<Name>Kivii.Biz.Lims.V1.0</Name>
</ProjectReference>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment