过滤窗口查询修改
This commit is contained in:
parent
025aeb299e
commit
de7d316849
@ -1,22 +1,18 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm\\",
|
||||
"WorkspaceRootPath": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm_Git\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{FFC984E2-278D-4951-94F0-31F8FBEE69EA}|Pilot.Report.Exploitation\\Pilot.Report.Exploitation.csproj|f:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\piolot_repotform\\pilot.report.exploitation\\common\\loghelp.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{FFC984E2-278D-4951-94F0-31F8FBEE69EA}|Pilot.Report.Exploitation\\Pilot.Report.Exploitation.csproj|solutionrelative:pilot.report.exploitation\\common\\loghelp.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
"AbsoluteMoniker": "D:0:0:{FFC984E2-278D-4951-94F0-31F8FBEE69EA}|Pilot.Report.Exploitation\\Pilot.Report.Exploitation.csproj|f:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\piolot_repotform_git\\pilot.report.exploitation\\receivables\\receivablesdetails.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{FFC984E2-278D-4951-94F0-31F8FBEE69EA}|Pilot.Report.Exploitation\\Pilot.Report.Exploitation.csproj|solutionrelative:pilot.report.exploitation\\receivables\\receivablesdetails.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{FFC984E2-278D-4951-94F0-31F8FBEE69EA}|Pilot.Report.Exploitation\\Pilot.Report.Exploitation.csproj|f:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\piolot_repotform\\pilot.report.exploitation\\resultskanbansummary\\resultskanbansumreport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"AbsoluteMoniker": "D:0:0:{FFC984E2-278D-4951-94F0-31F8FBEE69EA}|Pilot.Report.Exploitation\\Pilot.Report.Exploitation.csproj|F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm_Git\\pilot.report.exploitation\\resultskanbansummary\\resultskanbansumreport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{FFC984E2-278D-4951-94F0-31F8FBEE69EA}|Pilot.Report.Exploitation\\Pilot.Report.Exploitation.csproj|solutionrelative:pilot.report.exploitation\\resultskanbansummary\\resultskanbansumreport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{FFC984E2-278D-4951-94F0-31F8FBEE69EA}|Pilot.Report.Exploitation\\Pilot.Report.Exploitation.csproj|f:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\piolot_repotform\\pilot.report.exploitation\\saleorderprogress\\phbsaleorderreport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{FFC984E2-278D-4951-94F0-31F8FBEE69EA}|Pilot.Report.Exploitation\\Pilot.Report.Exploitation.csproj|solutionrelative:pilot.report.exploitation\\saleorderprogress\\phbsaleorderreport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{FFC984E2-278D-4951-94F0-31F8FBEE69EA}|Pilot.Report.Exploitation\\Pilot.Report.Exploitation.csproj|F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm\\pilot.report.exploitation\\annualsalespaymentsum\\annualsalespaymentsumreport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{FFC984E2-278D-4951-94F0-31F8FBEE69EA}|Pilot.Report.Exploitation\\Pilot.Report.Exploitation.csproj|solutionrelative:pilot.report.exploitation\\annualsalespaymentsum\\annualsalespaymentsumreport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
"AbsoluteMoniker": "D:0:0:{FFC984E2-278D-4951-94F0-31F8FBEE69EA}|Pilot.Report.Exploitation\\Pilot.Report.Exploitation.csproj|F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm_Git\\pilot.report.exploitation\\common\\loghelp.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{FFC984E2-278D-4951-94F0-31F8FBEE69EA}|Pilot.Report.Exploitation\\Pilot.Report.Exploitation.csproj|solutionrelative:pilot.report.exploitation\\common\\loghelp.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
@ -26,58 +22,45 @@
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 1,
|
||||
"SelectedChildIndex": 0,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "PHBSaleOrderReport.cs",
|
||||
"DocumentMoniker": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm\\Pilot.Report.Exploitation\\SaleOrderProgress\\PHBSaleOrderReport.cs",
|
||||
"RelativeDocumentMoniker": "Pilot.Report.Exploitation\\SaleOrderProgress\\PHBSaleOrderReport.cs",
|
||||
"ToolTip": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm\\Pilot.Report.Exploitation\\SaleOrderProgress\\PHBSaleOrderReport.cs",
|
||||
"RelativeToolTip": "Pilot.Report.Exploitation\\SaleOrderProgress\\PHBSaleOrderReport.cs",
|
||||
"ViewState": "AgIAAKABAAAAAAAAAAAqwMMBAAAAAAAAAAAAAA==",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "ReceivablesDetails.cs",
|
||||
"DocumentMoniker": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm_Git\\Pilot.Report.Exploitation\\Receivables\\ReceivablesDetails.cs",
|
||||
"RelativeDocumentMoniker": "Pilot.Report.Exploitation\\Receivables\\ReceivablesDetails.cs",
|
||||
"ToolTip": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm_Git\\Pilot.Report.Exploitation\\Receivables\\ReceivablesDetails.cs",
|
||||
"RelativeToolTip": "Pilot.Report.Exploitation\\Receivables\\ReceivablesDetails.cs",
|
||||
"ViewState": "AgIAAPEAAAAAAAAAAAAUwP0AAABwAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-03-14T11:58:47.06Z",
|
||||
"WhenOpened": "2025-03-15T12:19:32.438Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"DocumentIndex": 2,
|
||||
"Title": "Loghelp.cs",
|
||||
"DocumentMoniker": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm\\Pilot.Report.Exploitation\\Common\\Loghelp.cs",
|
||||
"DocumentMoniker": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm_Git\\Pilot.Report.Exploitation\\Common\\Loghelp.cs",
|
||||
"RelativeDocumentMoniker": "Pilot.Report.Exploitation\\Common\\Loghelp.cs",
|
||||
"ToolTip": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm\\Pilot.Report.Exploitation\\Common\\Loghelp.cs",
|
||||
"ToolTip": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm_Git\\Pilot.Report.Exploitation\\Common\\Loghelp.cs",
|
||||
"RelativeToolTip": "Pilot.Report.Exploitation\\Common\\Loghelp.cs",
|
||||
"ViewState": "AgIAAAkAAAAAAAAAAAAowA8AAAAVAAAAAAAAAA==",
|
||||
"ViewState": "AgIAAAkAAAAAAAAAAAA7wA8AAAAVAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-03-14T11:47:51.103Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2025-03-14T11:47:51.103Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "ResultsKanbanSumReport.cs",
|
||||
"DocumentMoniker": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm\\Pilot.Report.Exploitation\\ResultsKanbanSummary\\ResultsKanbanSumReport.cs",
|
||||
"DocumentMoniker": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm_Git\\Pilot.Report.Exploitation\\ResultsKanbanSummary\\ResultsKanbanSumReport.cs",
|
||||
"RelativeDocumentMoniker": "Pilot.Report.Exploitation\\ResultsKanbanSummary\\ResultsKanbanSumReport.cs",
|
||||
"ToolTip": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm\\Pilot.Report.Exploitation\\ResultsKanbanSummary\\ResultsKanbanSumReport.cs",
|
||||
"ToolTip": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm_Git\\Pilot.Report.Exploitation\\ResultsKanbanSummary\\ResultsKanbanSumReport.cs",
|
||||
"RelativeToolTip": "Pilot.Report.Exploitation\\ResultsKanbanSummary\\ResultsKanbanSumReport.cs",
|
||||
"ViewState": "AgIAAKECAAAAAAAAAAA1wNACAAABAAAAAAAAAA==",
|
||||
"ViewState": "AgIAAKICAAAAAAAAAAAUwNACAAABAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-03-14T11:26:46.159Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "AnnualSalesPaymentSumReport.cs",
|
||||
"DocumentMoniker": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm\\Pilot.Report.Exploitation\\AnnualSalesPaymentSum\\AnnualSalesPaymentSumReport.cs",
|
||||
"RelativeDocumentMoniker": "Pilot.Report.Exploitation\\AnnualSalesPaymentSum\\AnnualSalesPaymentSumReport.cs",
|
||||
"ToolTip": "F:\\\u73E0\u6D77\u9879\u76EE\\\u6D3E\u8BFA\u9879\u76EE\\\u6D3E\u8BFA\u62A5\u8868(1)\\\u6D3E\u8BFA\u62A5\u8868\\\u4EE3\u7801\\Piolot_RepotForm\\Pilot.Report.Exploitation\\AnnualSalesPaymentSum\\AnnualSalesPaymentSumReport.cs",
|
||||
"RelativeToolTip": "Pilot.Report.Exploitation\\AnnualSalesPaymentSum\\AnnualSalesPaymentSumReport.cs",
|
||||
"ViewState": "AgIAAF8AAAAAAAAAAAAQwHkAAAAWAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-03-14T11:25:52.658Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -190,6 +190,7 @@ namespace Pilot.Report.Exploitation.Receivables
|
||||
|
||||
if (action.ReturnData != null)
|
||||
{
|
||||
string wheresql = " 1=1 ";
|
||||
FilterParameter returnData = action.ReturnData as FilterParameter;//过滤框返回的数据
|
||||
DynamicObject dyObj = returnData.CustomFilter as DynamicObject;
|
||||
//获取组织FID
|
||||
@ -198,24 +199,36 @@ namespace Pilot.Report.Exploitation.Receivables
|
||||
if (FSaleOrg != null)
|
||||
{
|
||||
FSaleOrgId = Convert.ToString(FSaleOrg["ID"]);
|
||||
wheresql += $@" and [F_000]={FSaleOrgId}";
|
||||
}
|
||||
//获取开发日期
|
||||
var FSDate = Convert.ToString(dyObj["F_YKQC_Date_re5"]);
|
||||
if (!string.IsNullOrWhiteSpace(FSDate))
|
||||
{
|
||||
wheresql += $@" and [F_014]>='{FSDate}'";
|
||||
}
|
||||
//获取结束日期
|
||||
var FEDate = Convert.ToString(dyObj["F_YKQC_Date_apv"]);
|
||||
if (!string.IsNullOrWhiteSpace(FEDate))
|
||||
{
|
||||
wheresql += $@" and [F_014] <= '{FSDate}'";
|
||||
}
|
||||
|
||||
//获取合同类型
|
||||
DynamicObject HTLX = dyObj["F_YKQC_Assistant_dvn"] as DynamicObject;
|
||||
string HTLXFid = "";
|
||||
if (HTLX != null)
|
||||
{
|
||||
HTLXFid = Convert.ToString(HTLX["ID"]);
|
||||
HTLXFid = Convert.ToString(HTLX["Name"]);
|
||||
wheresql += $@" and [F_059] <= '{HTLXFid}'";
|
||||
}
|
||||
//获取购货单位
|
||||
DynamicObject CUST = dyObj["F_YKQC_Base_qtr"] as DynamicObject;
|
||||
string CustFid = "";
|
||||
if (CUST != null)
|
||||
{
|
||||
CustFid = Convert.ToString(CUST["ID"]);
|
||||
CustFid = Convert.ToString(CUST["name"]);
|
||||
wheresql += $@" and [F_005] = '{CustFid}'";
|
||||
}
|
||||
//获取销售员
|
||||
DynamicObject XSY = dyObj["F_YKQC_Base_tzk"] as DynamicObject;
|
||||
@ -223,6 +236,7 @@ namespace Pilot.Report.Exploitation.Receivables
|
||||
if (XSY != null)
|
||||
{
|
||||
XSYFid = Convert.ToString(XSY["ID"]);
|
||||
wheresql += $@" and [销售员ID] = '{CustFid}'";
|
||||
}
|
||||
//获取项目名称
|
||||
DynamicObject GCXM = dyObj["F_YKQC_Base_uky"] as DynamicObject;
|
||||
@ -230,181 +244,38 @@ namespace Pilot.Report.Exploitation.Receivables
|
||||
if(GCXM != null)
|
||||
{
|
||||
GCXMFid = Convert.ToString(GCXM["NAME"]);
|
||||
wheresql += $@" and [项目名称] = '{CustFid}'";
|
||||
}
|
||||
this.View.Model.DeleteEntryData("F_MBBA_Entity_qtr");
|
||||
|
||||
//获取表1
|
||||
var sql_1 = string.Format(@"Delete ReceivablesDetailsTable Where F_002='合计:';");
|
||||
var sql_1 = "";
|
||||
|
||||
sql_1 += string.Format(@"/*dialect*/Select * From (Select * From ReceivablesDetailsTable
|
||||
sql_1 += string.Format($@"/*dialect*/Select * From (Select * From View_PerformanceSharing_yuyubo where {wheresql}
|
||||
Union ALL
|
||||
(Select
|
||||
null,'','合计:','','','','','','','',SUM(F_010),
|
||||
'','','','',SUM(F_015),'',SUM(F_017),SUM(F_018),SUM(F_019),SUM(F_020),SUM(F_021),SUM(F_022),'',SUM(F_024),SUM(F_025),
|
||||
'',SUM(F_027),'','','','','',SUM(F_033),'','',SUM(F_036),'','','','','','','','','','','','','','','','','','',SUM(F_055),'','','','','','','','',''
|
||||
From ReceivablesDetailsTable)) W Order by W.F_001");
|
||||
'','','','','','',SUM(F_017),SUM(F_018),SUM(F_019),SUM(F_020),SUM(F_021),SUM(F_022),'',SUM(F_024),SUM(F_025),
|
||||
'',SUM(F_027),'','','','','','','','',SUM(F_036),'','','','','','','','','','','','','','','','','','','','','','','','','','','',''
|
||||
From
|
||||
(select distinct [销售单主键ID],[销售员ID],[F_010],F_017,F_018,F_019,F_020,F_021,F_022 ,F_024 ,F_025,
|
||||
F_027,F_036 from
|
||||
View_PerformanceSharing_yuyubo
|
||||
where {wheresql}
|
||||
) a )) W Order by W.F_001");
|
||||
|
||||
var sql_2 = string.Format(@"Delete ReceivablesDetailsTable Where F_002='合计:';");
|
||||
var sql_2 = "";
|
||||
sql_2 += string.Format(@"/*dialect*/Select top 1 * From ReceivablesDetailsTable");
|
||||
|
||||
var sql_List2 = DBUtils.ExecuteDynamicObject(Context, sql_2);
|
||||
|
||||
|
||||
//判断是否存在表
|
||||
if (sql_List2.Count() <= 0)
|
||||
{
|
||||
/*this.View.ShowMessage("FSaleOrgId :" + FSaleOrgId + "," + "FSDate:" + FSDate + ","
|
||||
+ "FEDate :" + FEDate + "," + "HTLXFid:" + HTLXFid + "," + "CustFid:" + CustFid + ","
|
||||
+ "XSYFid:" + XSYFid + "," + "GCXMFid:" + GCXMFid);*/
|
||||
string sql = string.Format(@"/*dialect*/EXEC [GetReceiveData2] '{0}','{1}','{2}','{3}','{4}','{5}','{6}';", FSaleOrgId, FSDate, FEDate,HTLXFid
|
||||
, CustFid, XSYFid, GCXMFid);
|
||||
{
|
||||
string sql = string.Format(@"/*dialect*/EXEC [PR_YingShouMingXi_yuyubo");
|
||||
var sqlList = DBUtils.ExecuteDynamicObject(Context, sql);
|
||||
int Rowindex = this.View.Model.GetEntryRowCount("F_MBBA_Entity_qtr");
|
||||
this.View.Model.DeleteEntryData("F_MBBA_Entity_qtr");
|
||||
if (sqlList.Count() > 0)
|
||||
{
|
||||
string sql_3 = "";
|
||||
const int batchSize = 1000; // 每批处理 1000 条数据
|
||||
for (int i = 0; i < sqlList.Count(); i++)
|
||||
{
|
||||
#region 隐藏单据体赋值
|
||||
|
||||
var f1 = sqlList[i]["F_001"];
|
||||
var f2 = sqlList[i]["销售员"];
|
||||
var f3 = sqlList[i]["SBU"];
|
||||
var f4 = sqlList[i]["明细区域"];
|
||||
var f5 = sqlList[i]["购货单位"];
|
||||
var f6 = sqlList[i]["公司性质"];
|
||||
var f7 = sqlList[i]["客户信用"];
|
||||
var f8 = sqlList[i]["合同编号"];
|
||||
var f9 = sqlList[i]["项目名称"];
|
||||
decimal f10 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(sqlList[i]["订单总额"]?.ToString()))
|
||||
{
|
||||
f10 = Convert.ToDecimal(sqlList[i]["订单总额"]);
|
||||
}
|
||||
var f11 = sqlList[i]["签订年份"];
|
||||
var f12 = sqlList[i]["订单日期"];
|
||||
var f13 = sqlList[i]["收款条件"];
|
||||
var f14 = sqlList[i]["发货日期"];
|
||||
decimal f15 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(sqlList[i]["应收比例"]?.ToString()))
|
||||
{
|
||||
f15 = Convert.ToDecimal(sqlList[i]["应收比例"]);
|
||||
}
|
||||
var f16 = sqlList[i]["开票日期"];
|
||||
decimal f17 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(sqlList[i]["累计发货金额"]?.ToString()))
|
||||
{
|
||||
f17 = Convert.ToDecimal(sqlList[i]["累计发货金额"]);
|
||||
}
|
||||
decimal f18 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(sqlList[i]["累计退货金额"]?.ToString()))
|
||||
{
|
||||
f18 = Convert.ToDecimal(sqlList[i]["累计退货金额"]);
|
||||
}
|
||||
decimal f19 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(sqlList[i]["累计开票金额"]?.ToString()))
|
||||
{
|
||||
f19 = Convert.ToDecimal(sqlList[i]["累计开票金额"]);
|
||||
}
|
||||
decimal f20 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(sqlList[i]["累计到款金额"]?.ToString()))
|
||||
{
|
||||
f20 = Convert.ToDecimal(sqlList[i]["累计到款金额"]);
|
||||
}
|
||||
decimal f21 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(sqlList[i]["应收款合计"]?.ToString()))
|
||||
{
|
||||
f21 = Convert.ToDecimal(sqlList[i]["应收款合计"]);
|
||||
}
|
||||
decimal f22 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(sqlList[i]["未出货总额"]?.ToString()))
|
||||
{
|
||||
f22 = Convert.ToDecimal(sqlList[i]["未出货总额"]);
|
||||
}
|
||||
var f23 = "";
|
||||
if (!string.IsNullOrWhiteSpace(sqlList[i]["预计到期时间"]?.ToString()))
|
||||
{
|
||||
f23 = sqlList[i]["预计到期时间"]?.ToString();
|
||||
}
|
||||
var f24 = Convert.ToDecimal(sqlList[i]["未到期金额"]);
|
||||
decimal f25 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(sqlList[i]["实际已出货应收款合计"]?.ToString()))
|
||||
{
|
||||
f25 = Convert.ToDecimal(sqlList[i]["实际已出货应收款合计"]);
|
||||
}
|
||||
var f26 = "";
|
||||
if (!string.IsNullOrWhiteSpace(sqlList[i]["到期时间"]?.ToString()))
|
||||
{
|
||||
f26 = sqlList[i]["到期时间"]?.ToString();
|
||||
}
|
||||
var f27 = Convert.ToDecimal(sqlList[i]["到期金额"]);
|
||||
var f28 = sqlList[i]["收款人"];
|
||||
var f29 = sqlList[i]["项目阶段"];
|
||||
var f30 = sqlList[i]["项目进度"];
|
||||
var f31 = sqlList[i]["项目调试时间"];
|
||||
var f32 = sqlList[i]["项目验收时间"];
|
||||
decimal f33 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(sqlList[i]["质保金天数"]?.ToString()))
|
||||
{
|
||||
f33 = Convert.ToDecimal(sqlList[i]["质保金天数"]);
|
||||
}
|
||||
var f34 = sqlList[i]["质保金到期时间"];
|
||||
var f35 = sqlList[i]["提前验收"];
|
||||
decimal f36 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(sqlList[i]["账龄月"]?.ToString()))
|
||||
{
|
||||
f36 = Convert.ToDecimal(sqlList[i]["账龄月"]);
|
||||
}
|
||||
var f37 = sqlList[i]["账龄阶段"];
|
||||
var f38 = sqlList[i]["一到六个月"];
|
||||
var f39 = sqlList[i]["七到十二个月"];
|
||||
var f40 = sqlList[i]["十三到十八个月"];
|
||||
var f41 = sqlList[i]["十九个月以上"];
|
||||
var f42 = sqlList[i]["一年以上"]; ;
|
||||
var f43 = sqlList[i]["风险评估级别"];
|
||||
var f44 = sqlList[i]["结算类别"];
|
||||
var f45 = sqlList[i]["结算类型"];
|
||||
var f46 = sqlList[i]["转专责小组时间"];
|
||||
var f47 = sqlList[i]["是否超账龄转出"];
|
||||
var f48 = sqlList[i]["超账龄是否申请归还大区"];
|
||||
var f49 = sqlList[i]["反馈表商务人员引用"];
|
||||
var f50 = sqlList[i]["反馈表引用分组"];
|
||||
var f51 = sqlList[i]["取值销售"];
|
||||
var f52 = sqlList[i]["是否坏账"];
|
||||
var f53 = sqlList[i]["是否预发货"];
|
||||
var f54 = sqlList[i]["预计回款时间"];
|
||||
decimal f55 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(sqlList[i]["预计回款金额"]?.ToString()))
|
||||
{
|
||||
f55 = Convert.ToDecimal(sqlList[i]["预计回款金额"]);
|
||||
}
|
||||
var f56 = sqlList[i]["情况分类"];
|
||||
var f57 = sqlList[i]["销售反馈情况"];
|
||||
var f58 = sqlList[i]["商务运营专责协助收款反馈情况"];
|
||||
var f59 = sqlList[i]["合同类型"];
|
||||
var f0 = sqlList[i]["组织"];
|
||||
var f60 = sqlList[i]["实际跟进人"];
|
||||
var f61 = sqlList[i]["销售收款分类"];
|
||||
var f62 = sqlList[i]["是否集采项目"];
|
||||
var f63 = sqlList[i]["天数"];
|
||||
#endregion
|
||||
|
||||
sql_3 += string.Format(@"Insert Into ReceivablesDetailsTable Values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}',
|
||||
'{10}','{11}','{12}','{13}','{14}','{15}','{16}','{17}','{18}','{19}','{20}','{21}','{22}','{23}','{24}','{25}','{26}','{27}','{28}','{29}',
|
||||
'{30}','{31}','{32}','{33}','{34}','{35}','{36}','{37}','{38}','{39}','{40}','{41}','{42}','{43}','{44}','{45}','{46}','{47}','{48}','{49}',
|
||||
'{50}','{51}','{52}','{53}','{54}','{55}','{56}','{57}','{58}','{59}','{60}','{61}','{62}','{63}'
|
||||
)", f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, f25, f26,
|
||||
f27, f28, f29, f30, f31, f32, f33, f34, f35, f36, f37, f38, f39, f40, f41, f42, f43, f44, f45, f46, f47,
|
||||
f48, f49, f50, f51, f52, f53, f54, f55, f56, f57, f58, f59, f0, f60, f61, f62, f63);
|
||||
|
||||
if ((i + 1) % batchSize == 0 || i == sqlList.Count() - 1)
|
||||
{
|
||||
DBUtils.ExecuteDynamicObject(Context, sql_3);
|
||||
sql_3 = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
var sql_List1 = DBUtils.ExecuteDynamicObject(Context, sql_1);
|
||||
int indexi = 0;
|
||||
|
Binary file not shown.
Binary file not shown.
@ -120,8 +120,8 @@ SELECT A.FID [
|
||||
left JOIN T_PerformanceSharing M WITH(NOLOCK) ON M.FSOURCEBILLNO = A.FBILLNO AND M.FDOCUMENTSTATUS = 'C'
|
||||
left JOIN T_PerformanceSharingEntry N WITH(NOLOCK) ON N.FID=M.FID
|
||||
LEFT JOIN V_BD_SALESMAN_L O WITH(NOLOCK) ON O.fid= N.FSALEID
|
||||
LEFT JOIN ERPTOHR.HYHRV3.dbo.v_erp_empinfo ACO ON ACO.츰냔=O.FNAME
|
||||
LEFT JOIN ERPTOHR.HYHRV3.dbo.v_erp_empinfo ACL ON ACL.츰냔=L.FNAME
|
||||
LEFT JOIN ERPTOHR.HYHRV3.dbo.v_erp_empinfo ACO ON ACO.名称=O.FNAME AND ISNULL(ACO.明细区域,'') != ''
|
||||
LEFT JOIN ERPTOHR.HYHRV3.dbo.v_erp_empinfo ACL ON ACL.名称=L.FNAME AND ISNULL(ACL.明细区域,'') != ''
|
||||
LEFT JOIN T_SAL_ORDERFIN fin WITH(NOLOCK) ON a.FID=fin.FID
|
||||
LEFT JOIN T_BD_CUSTOMER I WITH(NOLOCK) ON I .FCUSTID = A.FCUSTID
|
||||
lEFT JOIN V_ASSISTANTDATA K WITH(NOLOCK) ON K.FENTRYID = i.FCompanyNature
|
||||
@ -195,12 +195,13 @@ SELECT A.FID [
|
||||
ACO.区域 != '碳索智控'
|
||||
OR ACL.区域 != '碳索智控'
|
||||
OR C.FNAME NOT IN ('派诺科技(香港)有限公司','武汉派诺科技发展有限公司')
|
||||
OR L.FNAME != '菫킵悧' ) OR A.FSALEORGID != 100302
|
||||
OR L.FNAME != '兴诺总' ) OR A.FSALEORGID != 100302 AND A.FManualClose <> '1' AND A.FDocumentStatus = 'C'
|
||||
AND EXISTS(SELECT 1 FROM T_SAL_ORDERENTRY bb WHERE bb.fid=a.fid AND bb.FManualRowClose <> '1' )
|
||||
) A
|
||||
--where [销售单主键ID]= 102802
|
||||
--where [分摊比例]< 100
|
||||
--where [预计到期时间] !=''
|
||||
WHERE [憐데땐데悧띨]<>0
|
||||
WHERE [整单订单总额]<>0 AND SUBSTRING([纸质合同号],0,1)!='Z'
|
||||
ORDER BY A.[销售单主键ID],[销售员ID]
|
||||
|
||||
update [ZRP_YingShouMingXi_yuyubo] set [订单总额]=[分摊金额],[累计发货金额]=[整单累计发货金额]*[分摊比例]*0.01,[累计退货金额]=[整单累计退货金额]*[分摊比例]*0.01
|
||||
|
Loading…
x
Reference in New Issue
Block a user