Commit f4356ff9 by 陶然

init

parent e504a481
......@@ -20,51 +20,51 @@ namespace Njhg.Third.Semir.Entities
public Report OnInstanceThirdReport(Guid ThirdReportOrderKvid)
{
return null;
//if (ThirdReportOrderKvid == Guid.Empty) return null;
//var conn = KiviiContext.GetOpenedDbConnection<ThirdReportOrder>();
//var third = conn.SingleById<ThirdReportOrder>(ThirdReportOrderKvid);
//if (third == null) return null;
//if (third.ThirdType != typeof(SemirOrder).FullName) return null;
//if (third.Metadata == null) return null;
//var semir = third.Metadata.DicToObject();
//return null;
if (ThirdReportOrderKvid == Guid.Empty) return null;
var conn = KiviiContext.GetOpenedDbConnection<ThirdReportOrder>();
var third = conn.SingleById<ThirdReportOrder>(ThirdReportOrderKvid);
if (third == null) return null;
if (third.ThirdType != typeof(SemirOrder).FullName) return null;
if (third.Metadata == null) return null;
var semir = third.Metadata.DicToObject();
//var report = new Report();
//report.BizId = third.SerialNumber;
//report.BizKvid = third.Kvid;
//report.BizType = typeof(ThirdReportOrder).FullName;
//report.ReportId = $"{semir.BRAND_DISPLAY}{DateTime.Now:yyyyMMddHHmmss}";
////contract.OrderID = semir.DOC_NO;
//report.Type = "B";
//report.TypeEx = "W";
//report.TypeName = "委托送样";
//report.Category = "SE";
//report.DemanderName = semir.COMPANY_NAME;
//report.DemanderContactName = semir.CONTACT_PERSON;
//report.DemanderContactNumber = semir.CONTACT_PHONE;
//report.DemanderContactAddress = semir.COMPANY_ADDRESS;
var report = new Report();
report.BizId = third.SerialNumber;
report.BizKvid = third.Kvid;
report.BizType = typeof(ThirdReportOrder).FullName;
report.ReportId = $"{semir.BRAND_DISPLAY}{DateTime.Now:yyyyMMddHHmmss}";
//contract.OrderID = semir.DOC_NO;
report.Type = "B";
report.TypeEx = "W";
report.TypeName = "委托送样";
report.Category = "SE";
report.DemanderName = semir.COMPANY_NAME;
report.DemanderContactName = semir.CONTACT_PERSON;
report.DemanderContactNumber = semir.CONTACT_PHONE;
report.DemanderContactAddress = semir.COMPANY_ADDRESS;
//report.SampleManufacturerName = semir.APPLY_ORG_NAME;
//report.SampleManufacturerContactName = semir.PAYER_CONTACT_PERSON;
//report.SampleManufacturerContactNumber = semir.PAYER_CONTACT_PHONE;
//report.SampleManufacturerAddress = semir.PAYER_ORG_ADDRESS;
report.SampleManufacturerName = semir.APPLY_ORG_NAME;
report.SampleManufacturerContactName = semir.PAYER_CONTACT_PERSON;
report.SampleManufacturerContactNumber = semir.PAYER_CONTACT_PHONE;
report.SampleManufacturerAddress = semir.PAYER_ORG_ADDRESS;
//report.SampleName = semir.MAT_NAME;
//report.SampleBrand = semir.BRAND_DISPLAY;
//report.SampleGradeSafety = semir.CHECK_LEVEL;
//report.SampleGrade = semir.SAMPLE_GRADE;
report.SampleName = semir.MAT_NAME;
report.SampleBrand = semir.BRAND_DISPLAY;
report.SampleGradeSafety = semir.CHECK_LEVEL;
report.SampleGrade = semir.SAMPLE_GRADE;
//report.SampleBatchNumber = semir.FG_MAT_CODE;
report.SampleBatchNumber = semir.FG_MAT_CODE;
//var details = new List<string>();
//foreach (var detail in semir.ITEMS)
//{
// details.Add($"{detail.ITEM_NAME}({detail.ITEM_STANDARD})");
//}
//var tasks = string.Join("、", details.ToArray());
//report.Metadata = new Dictionary<string, string>();
//report.Metadata.Add("ERemark", tasks);
//return report;
var details = new List<string>();
foreach (var detail in semir.ITEMS)
{
details.Add($"{detail.ITEM_NAME}({detail.ITEM_STANDARD})");
}
var tasks = string.Join("、", details.ToArray());
report.Metadata = new Dictionary<string, string>();
report.Metadata.Add("ERemark", tasks);
return report;
}
public bool OnRejectThirdReport(Guid ThirdReportOrderKvid)
......
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