修复一些问题
This commit is contained in:
@@ -235,9 +235,10 @@ else
|
||||
/// <param name="action"></param>
|
||||
public void FilterCallBack(FormResult action)
|
||||
{
|
||||
|
||||
Dictionary<string, decimal> dicList = new Dictionary<string, decimal>();
|
||||
if (action.ReturnData != null)
|
||||
{
|
||||
|
||||
string wheresql = " 1=1 ";
|
||||
FilterParameter returnData = action.ReturnData as FilterParameter;//过滤框返回的数据
|
||||
DynamicObject dyObj = returnData.CustomFilter as DynamicObject;
|
||||
@@ -299,22 +300,26 @@ else
|
||||
//获取表1
|
||||
var sql_1 = "";
|
||||
|
||||
sql_1 += string.Format($@"/*dialect*/Select * From (Select * From View_PerformanceSharing_yuyubo where {wheresql}
|
||||
sql_1 += string.Format($@"/*dialect*/Select * From (Select * From [ReceivablesDetailsTable] where {wheresql}
|
||||
Union ALL
|
||||
(Select
|
||||
null,null,'合计:',null,null,null,null,null,null,null,SUM(F_010),
|
||||
null,null,null,null,null,null,SUM(F_017),SUM(F_018),SUM(F_019),SUM(F_020),SUM(F_021),SUM(F_022),null,SUM(F_024),SUM(F_025),
|
||||
null,SUM(F_027),null,null,null,null,null,null,null,null,SUM(F_036),null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0,0,0,null,0
|
||||
null,null,null,null,null,null,SUM(F_017),SUM(F_018),SUM(F_019),SUM(F_020),SUM(F_021),SUM(F_022),null
|
||||
,F_024=(SELECT SUM(F_024) FROM [ReceivablesDetailsTable] hh where {wheresql})
|
||||
,SUM(F_025),
|
||||
null
|
||||
,F_027=(SELECT SUM(F_027) FROM [ReceivablesDetailsTable] hh where {wheresql})
|
||||
,null,null,null,null,null,null,null,null,SUM(F_036),null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0,0,0,null,0
|
||||
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
|
||||
(select distinct [销售单主键ID],[销售员ID],[F_010],F_017,F_018,F_019,F_020,F_021,F_022 ,0 as F_024 ,F_025,
|
||||
0 as F_027,F_036 from
|
||||
[ReceivablesDetailsTable]
|
||||
where {wheresql}
|
||||
) a )) W Order by W.F_001");
|
||||
|
||||
var sql_2 = "";
|
||||
sql_2 += string.Format(@"/*dialect*/Select top 1 * From ReceivablesDetailsTable");
|
||||
|
||||
|
||||
var sql_List2 = DBUtils.ExecuteDynamicObject(Context, sql_2);
|
||||
|
||||
|
||||
@@ -475,6 +480,8 @@ else
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Loghelp.Log("合计");
|
||||
Loghelp.Log(sql_1);
|
||||
var sql_List1 = DBUtils.ExecuteDynamicObject(Context, sql_1);
|
||||
int indexi = 0;
|
||||
|
||||
@@ -616,6 +623,23 @@ else
|
||||
this.View.Model.SetValue("F_062", item["F_062"], indexi);
|
||||
//63
|
||||
this.View.Model.SetValue("F_063", item["F_063"], indexi);
|
||||
|
||||
//【订单总额、累计发货金额、累计退货金额、累计开票金额、累计到款金额、应收款合计、未出货总额、实际已出货应收款合计、】的明细需要去重
|
||||
if (dicList.ContainsKey(item["销售单主键ID"].ToString() + "-" + item["销售员ID"].ToString()))
|
||||
{
|
||||
this.View.Model.SetValue("F_010", null, indexi);
|
||||
this.View.Model.SetValue("F_017", null, indexi);
|
||||
this.View.Model.SetValue("F_018", null, indexi);
|
||||
this.View.Model.SetValue("F_019", null, indexi);
|
||||
this.View.Model.SetValue("F_020", null, indexi);
|
||||
this.View.Model.SetValue("F_021", null, indexi);
|
||||
this.View.Model.SetValue("F_022", null, indexi);
|
||||
this.View.Model.SetValue("F_025", null, indexi);
|
||||
|
||||
}
|
||||
else
|
||||
dicList.Add(item["销售单主键ID"].ToString() + "-" + item["销售员ID"].ToString(), 0);
|
||||
|
||||
indexi++;
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user