This commit is contained in:
2025-04-28 16:04:47 +08:00
parent 3efe047233
commit af5743fb96
3 changed files with 468 additions and 6 deletions

View File

@@ -59,8 +59,6 @@ namespace Pilot_KD_Parino.QPHY_AutoWrire
public override void OnLoad(EventArgs e)
{
base.OnLoad(e);
var showParameter = new DynamicFormShowParameter();
showParameter.FormId = "NAAD_ZiDongHeXiao";
showParameter.ParentPageId = this.View.PageId;
@@ -427,6 +425,9 @@ namespace Pilot_KD_Parino.QPHY_AutoWrire
FType = Convert.ToString(item["FType"]),
FISHX = item["FISHX"]?.ToString(),
FWeiYi = item["FWeiYi"]?.ToString(),
FaHuoAmount30Days = Convert.ToDouble( item["FaHuoAmount30Days"].ToString()),
FInvoiceAmount30Days= Convert.ToDouble(item["FInvoiceAmount30Days"].ToString()),
}).ToList();
var SaleBILLLISNew = SaleBILLLIS.Where(a => a.FISHX != "已核销配对").ToList();
var ReceiveBILLLIST2 = new List<CombinaClass>();
@@ -473,7 +474,7 @@ namespace Pilot_KD_Parino.QPHY_AutoWrire
//var dasdsas = oneToOneTemp.Where(h => h.FBIllNO == "PL-XSDD20250400471").FirstOrDefault();
var saleList1 = oneToOneTemp.Select(t => t.FBIllNO).Distinct().ToList();
var ReceiveList1 = oneToOneTemp.Select(t => t.UFbillNo).Distinct().ToList();
if (saleList1.Count > ReceiveList1.Count)
if (saleList1.Count() > ReceiveList1.Count())
{
List<string> deleteFBIllNOList = new List<string>();
ReceiveList1.ForEach(t =>
@@ -557,7 +558,7 @@ namespace Pilot_KD_Parino.QPHY_AutoWrire
//var dasdsas = oneToOneTemp.Where(h => h.FBIllNO == "PL-XSDD20250400471").FirstOrDefault();
var saleList22 = oneToOneTemp2.Select(t => t.FBIllNO).Distinct().ToList();
var ReceiveList22 = oneToOneTemp2.Select(t => t.UFbillNo).Distinct().ToList();
if (saleList22.Count > ReceiveList22.Count)
if (saleList22.Count() > ReceiveList22.Count())
{
List<string> deleteFBIllNOList = new List<string>();
ReceiveList22.ForEach(t =>
@@ -636,13 +637,13 @@ namespace Pilot_KD_Parino.QPHY_AutoWrire
var SaleBILLLIS2Sa333 = SaleBILLLISNew.Where(t => t.FISHX != "已核销配对" && t.FDAMOUNT > 0 ).OrderBy(t => t.FClient).ThenByDescending(t => t.FDate).ToList();
ReceiveBILLLIST = ReceiveBILLLIST2.Where(a => a.F_RowNew == 1 && a.FISHX != "已核销配对" && a.FDAMOUNT > 0).OrderBy(t => t.FClient).ThenByDescending(t => t.FDate).ToList();
var oneToOneTemp3 = (from q in SaleBILLLIS2Sa222
var oneToOneTemp3 = (from q in SaleBILLLIS2Sa333
join u in ReceiveBILLLIST on new { q.FClient, FDAMOUNT = q.FInvoiceAmount30Days } equals new { u.FClient, u.FDAMOUNT }
select new { q.FClient, q.FBIllNO, q.FCONTRACTNUMBER, u.FDAMOUNT, UFbillNo = u.FBIllNO }).ToList();
//var dasdsas = oneToOneTemp.Where(h => h.FBIllNO == "PL-XSDD20250400471").FirstOrDefault();
var saleList33 = oneToOneTemp3.Select(t => t.FBIllNO).Distinct().ToList();
var ReceiveList33 = oneToOneTemp3.Select(t => t.UFbillNo).Distinct().ToList();
if (SaleBILLLIS2Sa333.Count > ReceiveList33.Count)
if (SaleBILLLIS2Sa333.Count() > ReceiveList33.Count())
{
List<string> deleteFBIllNOList = new List<string>();
ReceiveList33.ForEach(t =>
@@ -1612,7 +1613,11 @@ namespace Pilot_KD_Parino.QPHY_AutoWrire
this.View.Model.SetValue("F_Ordercategory2", SaleBILLLIS2[i].F_Ordercategory2, i);
this.View.Model.SetValue("F_Ordercategory", SaleBILLLIS2[i].F_Ordercategory, i);
this.View.Model.SetValue("FInvoiceAmount", SaleBILLLIS2[i].FInvoiceAmount, i);
this.View.Model.SetValue("FInvoiceAmount30Days", SaleBILLLIS2[i].FInvoiceAmount30Days, i);
this.View.Model.SetValue("FaHuoAmount30Days", SaleBILLLIS2[i].FaHuoAmount30Days, i);
//FaHuoAmount30Days = Convert.ToDouble(item["FaHuoAmount30Days"]),
//FInvoiceAmount30Days = Convert.ToDouble(item["FInvoiceAmount30Days"]),
}