Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
DataCenter_Core2.1_20190520
Commits
b6d5b48a
Commit
b6d5b48a
authored
Aug 19, 2021
by
zhouminghui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://code.bailuntec.com/bltdc/DataCenter_Core2.1_20190520
parents
ca1dbd70
94083150
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
438 additions
and
50 deletions
+438
-50
order_fee_value_amazon.cs
Bailun.DC.Models/DataWareHouse/order_fee_value_amazon.cs
+28
-0
PlatformOrderFeeServices.cs
Bailun.DC.Services/DataWareHouse/PlatformOrderFeeServices.cs
+41
-0
PlatformOrderServices.cs
Bailun.DC.Services/DataWareHouse/PlatformOrderServices.cs
+68
-0
PlatformOrderController.cs
...reas/DataWareHouse/Controllers/PlatformOrderController.cs
+197
-34
List.cshtml
...un.DC.Web/Areas/DataWareHouse/Views/Logistics/List.cshtml
+1
-0
FinanceAccount_OrderBilling.cshtml
...se/Views/PlatformOrder/FinanceAccount_OrderBilling.cshtml
+54
-1
OrderBillings.cshtml
...as/DataWareHouse/Views/PlatformOrder/OrderBillings.cshtml
+1
-0
HomeController.cs
Bailun.DC.Web/Controllers/HomeController.cs
+48
-15
财务会计流水导入模版.xlsx
Bailun.DC.Web/wwwroot/templatefile/财务会计流水导入模版.xlsx
+0
-0
No files found.
Bailun.DC.Models/DataWareHouse/order_fee_value_amazon.cs
View file @
b6d5b48a
...
@@ -112,5 +112,33 @@ namespace Bailun.DC.Models.DataWareHouse
...
@@ -112,5 +112,33 @@ namespace Bailun.DC.Models.DataWareHouse
/// </summary>
/// </summary>
public
string
currency
{
get
;
set
;
}
public
string
currency
{
get
;
set
;
}
/// <summary>
/// 数据类型
/// </summary>
public
int
datatype
{
get
;
set
;
}
/// <summary>
/// 是否已删除,0:未删除,1:已删除
/// </summary>
public
int
?
isdelete
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
DateTime
?
lastupdatetime
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
?
lastupdateuserid
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
lastupdateusername
{
get
;
set
;
}
}
}
}
}
Bailun.DC.Services/DataWareHouse/PlatformOrderFeeServices.cs
View file @
b6d5b48a
...
@@ -299,6 +299,47 @@ namespace Bailun.DC.Services.DataWareHouse
...
@@ -299,6 +299,47 @@ namespace Bailun.DC.Services.DataWareHouse
}
}
}
}
/// <summary>
/// 保存财务会计流水数据
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
public
string
SaveOrderFee
(
List
<
order_fee_value_amazon
>
list
,
int
uid
,
string
username
)
{
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_DW
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
using
(
var
trans
=
cn
.
BeginTransaction
())
{
try
{
foreach
(
var
item
in
list
)
{
cn
.
Insert
(
item
);
}
trans
.
Commit
();
trans
.
Dispose
();
}
catch
(
Exception
ex
)
{
trans
.
Dispose
();
return
ex
.
Message
;
}
}
}
return
""
;
}
}
}
}
}
Bailun.DC.Services/DataWareHouse/PlatformOrderServices.cs
View file @
b6d5b48a
...
@@ -247,6 +247,74 @@ namespace Bailun.DC.Services.DataWareHouse
...
@@ -247,6 +247,74 @@ namespace Bailun.DC.Services.DataWareHouse
}
}
/// <summary>
/// 获取解析成财务会计流水的配置数据
/// </summary>
/// <param name="datatype">数据类型,1:销售平台,2:物流数据</param>
/// <returns></returns>
public
List
<
Models
.
DataWareHouse
.
order_fee_config
>
ListOrderFeeConfig
(
int
datatype
)
{
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_DW
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
sql
=
"select * from order_fee_config where datatype="
+
datatype
;
return
cn
.
Query
<
Models
.
DataWareHouse
.
order_fee_config
>(
sql
).
ToList
();
}
}
/// <summary>
/// 批量删除财务会计流水数据
/// </summary>
/// <param name="datatype">数据类型,1:销售平台,2:物流商</param>
/// <param name="platform">平台类型</param>
/// <param name="website">站点</param>
/// <param name="month">月份</param>
/// <param name="uid">用户id</param>
/// <param name="username">用户名称</param>
/// <param name="count">受影响数据行数</param>
/// <returns></returns>
public
string
BatchDeleteFinanceAccountFlowing
(
int
datatype
,
string
platform
,
string
website
,
string
month
,
int
uid
,
string
username
,
ref
int
count
)
{
try
{
var
sql
=
$"select * from order_fee_value_amazon"
;
var
sqlwhere
=
$" where datatype=
{
datatype
}
and platform='
{
platform
}
' and month='
{
month
}
'"
;
if
(!
string
.
IsNullOrEmpty
(
website
))
{
sqlwhere
+=
$" and website='
{
website
}
'"
;
}
//加日志记录标记删除的值
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_DW
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
list
=
cn
.
Query
<
Models
.
DataWareHouse
.
order_fee_value_amazon
>(
sql
+
sqlwhere
).
ToList
();
count
=
cn
.
Execute
(
$"update order_fee_value_amazon set isdelete=1,lastupdatetime='
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
',lastupdateuserid=
{
uid
}
,lastupdateusername='
{
username
}
' where id in ('
{
string
.
Join
(
"','"
,
list
.
Select
(
a
=>
a
.
id
))}
')"
);
return
""
;
}
}
catch
(
Exception
ex
)
{
return
ex
.
Message
;
}
}
#
endregion
#
endregion
}
}
}
}
Bailun.DC.Web/Areas/DataWareHouse/Controllers/PlatformOrderController.cs
View file @
b6d5b48a
...
@@ -606,32 +606,25 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
...
@@ -606,32 +606,25 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
}
}
public
JsonResult
UploadFinanceAccount
()
public
JsonResult
UploadFinanceAccount
(
int
?
datatype
)
{
{
if
(!
datatype
.
HasValue
||
datatype
.
Value
<=
0
)
{
return
Json
(
new
{
success
=
false
,
msg
=
$"请选择数据类型再上传。"
,
});
}
var
file
=
Request
.
Form
.
Files
[
0
];
var
file
=
Request
.
Form
.
Files
[
0
];
var
errmsg
=
""
;
var
errmsg
=
""
;
Dictionary
<
string
,
DataTable
>
dic
=
Base
.
NpolHelper
.
ExcelToDataTable
(
file
.
OpenReadStream
(),
file
.
FileName
,
true
,
ref
errmsg
);
Dictionary
<
string
,
DataTable
>
dic
=
Base
.
NpolHelper
.
ExcelToDataTable
(
file
.
OpenReadStream
(),
file
.
FileName
,
true
,
ref
errmsg
);
if
(
dic
.
Count
>
0
)
if
(
dic
.
Count
>
0
)
{
{
var
tb
=
dic
.
FirstOrDefault
();
var
tb
=
dic
.
FirstOrDefault
();
var
listConfig
=
new
Services
.
DataWareHouse
.
PlatformOrderServices
().
ListOrderFeeConfig
(
datatype
.
Value
);
/*
var
listorder
=
new
List
<
Models
.
DataWareHouse
.
order_fee_value_amazon
>();
平台
站点
账单时间
月份
单号
费用字段说明
财务分类归集说明
数据中心费用类型
会计科目编码
项目编码
币种
原币金额
汇率
RMB金额
备注
*/
for
(
var
i
=
0
;
i
<
tb
.
Value
.
Rows
.
Count
;
i
++)
for
(
var
i
=
0
;
i
<
tb
.
Value
.
Rows
.
Count
;
i
++)
{
{
...
@@ -639,8 +632,13 @@ RMB金额
...
@@ -639,8 +632,13 @@ RMB金额
var
m
=
new
Models
.
DataWareHouse
.
order_fee_value_amazon
();
var
m
=
new
Models
.
DataWareHouse
.
order_fee_value_amazon
();
m
.
platform
=
row
[
"平台"
].
ToString
();
m
.
platform
=
row
[
"平台"
].
ToString
().
Trim
();
m
.
website
=
row
[
"站点"
].
ToString
();
m
.
website
=
row
[
"站点"
].
ToString
().
Trim
();
if
(
string
.
IsNullOrEmpty
(
m
.
platform
))
{
continue
;
}
if
(
row
[
"账单时间"
]
!=
null
&&
row
[
"账单时间"
].
ToString
()!=
""
)
if
(
row
[
"账单时间"
]
!=
null
&&
row
[
"账单时间"
].
ToString
()!=
""
)
{
{
...
@@ -655,23 +653,138 @@ RMB金额
...
@@ -655,23 +653,138 @@ RMB金额
});
});
}
}
}
m
.
month
=
row
[
"月份"
].
ToString
().
Trim
();
var
list
=
Dtb2Json
(
tb
.
Value
);
if
(
row
[
"单号"
]
!=
null
)
var
listOrders
=
new
List
<
Models
.
DataWareHouse
.
order_fee_value_amazon
>();
foreach
(
var
item
in
list
)
{
//保存数据
var
m
=
new
Models
.
DataWareHouse
.
order_fee_value_amazon
{
{
flowing_sales_id
=
0
,
m
.
orderno
=
row
[
"单号"
].
ToString
().
Trim
();
amountname
=
""
,
}
};
m
.
orderno
=
m
.
orderno
??
""
;
listOrders
.
Add
(
m
);
if
(
row
[
"数据中心费用类型"
]
==
null
)
{
return
Json
(
new
{
success
=
false
,
msg
=
$"第
{(
i
+
1
)}
行没有填写数据中心费用类型字段"
,
});
}
var
datacentercol
=
row
[
"数据中心费用类型"
].
ToString
().
Trim
();
if
(
row
[
"币种"
]==
null
)
{
return
Json
(
new
{
success
=
false
,
msg
=
$"第
{(
i
+
1
)}
行没有填写币种字段"
,
});
}
var
currency
=
row
[
"币种"
].
ToString
().
Trim
();
if
(
row
[
"原币金额"
]
==
null
)
{
return
Json
(
new
{
success
=
false
,
msg
=
$"第
{(
i
+
1
)}
行没有填写原币金额"
,
});
}
var
str_amount
=
row
[
"原币金额"
].
ToString
().
Trim
();
var
amount
=
0
m
;
decimal
.
TryParse
(
str_amount
,
out
amount
);
if
(
amount
==
0
)
{
continue
;
}
if
(
row
[
"汇率"
]
==
null
)
{
return
Json
(
new
{
success
=
false
,
msg
=
$"第
{(
i
+
1
)}
行没有填写汇率"
,
});
}
var
str_rate
=
row
[
"汇率"
].
ToString
().
Trim
();
var
rate
=
0
m
;
decimal
.
TryParse
(
str_rate
,
out
rate
);
if
(
rate
==
0
)
{
return
Json
(
new
{
success
=
false
,
msg
=
$"第
{(
i
+
1
)}
行 汇率为0"
,
});
}
if
(
row
[
"RMB金额"
]
==
null
)
{
return
Json
(
new
{
success
=
false
,
msg
=
$"第
{(
i
+
1
)}
行没有填写RMB金额"
,
});
}
var
str_rmb
=
row
[
"RMB金额"
].
ToString
().
Trim
();
var
rmb
=
0
m
;
decimal
.
TryParse
(
str_rmb
,
out
rmb
);
if
(
rmb
==
0
)
{
return
Json
(
new
{
success
=
false
,
msg
=
$"第
{(
i
+
1
)}
行 RMB金额为0"
,
});
}
var
_tempConfigs
=
listConfig
.
Where
(
a
=>
a
.
platform
.
ToLower
()
==
m
.
platform
.
ToLower
()
&&
a
.
datacenter_col
==
datacentercol
);
if
(!
string
.
IsNullOrEmpty
(
m
.
website
))
{
_tempConfigs
=
_tempConfigs
.
Where
(
a
=>
a
.
website
.
ToLower
()
==
m
.
website
.
Trim
().
ToLower
());
}
if
(
_tempConfigs
.
Count
()
>
1
&&
!
string
.
IsNullOrEmpty
(
currency
))
{
_tempConfigs
=
_tempConfigs
.
Where
(
a
=>
a
.
currency
==
currency
);
}
if
(
_tempConfigs
.
Count
()
==
0
)
{
return
Json
(
new
{
success
=
false
,
msg
=
$"第
{(
i
+
1
)}
行 找不到对应的解析成财务会计流水的配置,请检查字段值是否有误。"
,
});
}
m
.
order_fee_config_id
=
_tempConfigs
.
FirstOrDefault
().
id
;
m
.
amountname
=
""
;
m
.
amountval
=
amount
;
m
.
amountval_rmb
=
rmb
;
m
.
currency
=
currency
;
m
.
exchange_rate
=
rate
;
m
.
flowing_sales_id
=
0
;
m
.
fulfillmentname
=
""
;
m
.
fulfillmentvalue
=
""
;
m
.
typename
=
""
;
m
.
typevalue
=
""
;
m
.
descriptname
=
""
;
m
.
descriptvalue
=
""
;
m
.
platform
=
_tempConfigs
.
FirstOrDefault
().
platform
;
m
.
website
=
_tempConfigs
.
FirstOrDefault
().
website
;
m
.
datatype
=
datatype
.
Value
;
listorder
.
Add
(
m
);
}
}
var
result
=
""
;
// new Services.DataWareHouse.PlatformOrderServices().InsertOrderBilling(listOrders);
var
result
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
SaveOrderFee
(
listorder
,
0
,
""
);
return
Json
(
new
return
Json
(
new
{
{
success
=
string
.
IsNullOrEmpty
(
result
),
success
=
string
.
IsNullOrEmpty
(
result
),
...
@@ -686,6 +799,56 @@ RMB金额
...
@@ -686,6 +799,56 @@ RMB金额
});
});
}
}
/// <summary>
/// 批量删除财务流水数据
/// </summary>
/// <param name="datatype">数据类型</param>
/// <param name="platform">平台类型</param>
/// <param name="website">站点</param>
/// <param name="month">月份</param>
/// <returns></returns>
[
BailunAuthentication
(
LoginMode
.
Enforce
)]
[
HttpPost
]
public
JsonResult
BatchDeleteFinanceFlowing
(
int
datatype
,
string
platform
,
string
website
,
string
month
)
{
if
(
string
.
IsNullOrEmpty
(
platform
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"平台不能为空 platform must have value"
,
});
}
if
(
string
.
IsNullOrEmpty
(
website
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"站点不能为空 website must have value"
,
});
}
if
(
string
.
IsNullOrEmpty
(
month
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"请选择月份 please choose the month"
});
}
var
user
=
HttpContextHelper
.
Current
?.
User
;
var
count
=
0
;
var
result
=
new
Services
.
DataWareHouse
.
PlatformOrderServices
().
BatchDeleteFinanceAccountFlowing
(
datatype
,
platform
,
website
,
month
,
(
user
!=
null
?
user
.
GetUid
()
:
0
),
(
user
!=
null
?
user
.
GetUserName
()
:
""
),
ref
count
);
return
Json
(
new
{
success
=
string
.
IsNullOrEmpty
(
result
),
msg
=
result
,
count
=
count
});
}
#
endregion
#
endregion
}
}
...
...
Bailun.DC.Web/Areas/DataWareHouse/Views/Logistics/List.cshtml
View file @
b6d5b48a
...
@@ -228,6 +228,7 @@
...
@@ -228,6 +228,7 @@
$('#platform').change(function () {
$('#platform').change(function () {
platform = $('#platform').val();
platform = $('#platform').val();
website = '';
initUpload();
initUpload();
//获取平台站点
//获取平台站点
...
...
Bailun.DC.Web/Areas/DataWareHouse/Views/PlatformOrder/FinanceAccount_OrderBilling.cshtml
View file @
b6d5b48a
...
@@ -61,7 +61,9 @@
...
@@ -61,7 +61,9 @@
<label> </label>
<label> </label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i> 查询</button>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i> 查询</button>
<button type="button" class="btn btn-success" onclick="exportxls();">导出</button>
<button type="button" class="btn btn-success" onclick="exportxls();">导出</button>
<button type="button" class="btn btn-danger" onclick="deleteList();">批量删除</button>
<button id="btn_uploadFlowing" type="button" class="btn btn-warning">导入流水</button>
<button id="btn_uploadFlowing" type="button" class="btn btn-warning">导入流水</button>
<a href="@Url.Content("~/templatefile/财务会计流水导入模版.xlsx")" target="_blank">流水模版下载</a>
</div>
</div>
</div>
</div>
</form>
</form>
...
@@ -108,6 +110,9 @@
...
@@ -108,6 +110,9 @@
var tb;
var tb;
var companyid = 0;
var companyid = 0;
var websiteCount = '@ViewBag.website.Count';
$(document).ready(function () {
$(document).ready(function () {
laydate.render({ elem: '#start' });
laydate.render({ elem: '#start' });
laydate.render({ elem: '#end' });
laydate.render({ elem: '#end' });
...
@@ -126,6 +131,7 @@
...
@@ -126,6 +131,7 @@
$('#datatype').change(function () {
$('#datatype').change(function () {
//获取平台
//获取平台
getPlatform();
getPlatform();
initUpload();
})
})
initUpload();
initUpload();
...
@@ -204,7 +210,9 @@
...
@@ -204,7 +210,9 @@
paramData: '',
paramData: '',
type:'POST',
type:'POST',
func: function (result) {
func: function (result) {
websiteCount = 0;
if (result.success) {
if (result.success) {
websiteCount = result.data.length
$('#website').html('<option value="">请选择站点</option>');
$('#website').html('<option value="">请选择站点</option>');
if (result.data.length > 0) {
if (result.data.length > 0) {
for (var i in result.data) {
for (var i in result.data) {
...
@@ -248,8 +256,11 @@
...
@@ -248,8 +256,11 @@
}
}
function initUpload() {
function initUpload() {
var datatype = $('#datatype').val();
uploadfile('btn_uploadFlowing',
uploadfile('btn_uploadFlowing',
'@Url.Content("~/DataWareHouse/PlatformOrder/UploadFi
leFragment")' + '?platform=' + platform + '&website=' + website + '&month=' + month
,
'@Url.Content("~/DataWareHouse/PlatformOrder/UploadFi
nanceAccount")' + '?datatype=' + datatype
,
function(result){
function(result){
if(result.success)
if(result.success)
{
{
...
@@ -305,5 +316,47 @@
...
@@ -305,5 +316,47 @@
});
});
}
}
function deleteList() {
var datatype = $('#datatype').val();
var platform = $('#platform').val();
var website = $('#website').val();
var month = $('#month').val();
if (datatype == '') {
alert('请选择数据类型');
return false;
}
if (platform == '') {
alert('请选择平台类型');
return false;
}
if (month == '') {
alert('请选择月份');
return false;
}
if (websiteCount > 0 && website == '') {
alert('请选择站点');
return false;
}
if (confirm('是否删除当前条件下的所有数据?当前选择的条件是平台【' + platform + '】,站点【' + website + '】,月份【' + month + '】')) {
if (confirm('再次确认要删除吗?删除后将不可恢复,并且影响月销售利润报表')) {
$.submit({
url: '',
paramData: '',
type: 'POST',
func: function (result) {
}
})
}
}
}
</script>
</script>
}
}
Bailun.DC.Web/Areas/DataWareHouse/Views/PlatformOrder/OrderBillings.cshtml
View file @
b6d5b48a
...
@@ -231,6 +231,7 @@
...
@@ -231,6 +231,7 @@
$('#platform').change(function () {
$('#platform').change(function () {
platform = $('#platform').val();
platform = $('#platform').val();
website = '';
initUpload();
initUpload();
})
})
...
...
Bailun.DC.Web/Controllers/HomeController.cs
View file @
b6d5b48a
...
@@ -317,17 +317,18 @@ namespace Bailun.DC.Web.Controllers
...
@@ -317,17 +317,18 @@ namespace Bailun.DC.Web.Controllers
{
{
var
tb
=
dic
.
FirstOrDefault
();
var
tb
=
dic
.
FirstOrDefault
();
var
_service
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
();
var
list
=
new
List
<
Bailun
.
DC
.
Models
.
DataWareHouse
.
order_fee_config
>();
var
list
=
new
List
<
Bailun
.
DC
.
Models
.
DataWareHouse
.
order_fee_config
>();
var
cols
=
new
List
<
string
>();
var
columns
=
tb
.
Value
.
Columns
;
var
columns
=
tb
.
Value
.
Columns
;
cols
.
Add
(
columns
[
1
].
ColumnName
.
Split
(
'-'
)[
1
]);
cols
.
Add
(
columns
[
2
].
ColumnName
.
Split
(
'-'
)[
1
]);
cols
.
Add
(
columns
[
3
].
ColumnName
.
Split
(
'-'
)[
1
]);
for
(
var
i
=
0
;
i
<
tb
.
Value
.
Rows
.
Count
;
i
++)
for
(
var
i
=
0
;
i
<
tb
.
Value
.
Rows
.
Count
;
i
++)
{
{
var
cols
=
new
List
<
string
>();
cols
.
Add
(
columns
[
2
].
ColumnName
.
Split
(
'-'
)[
1
]);
cols
.
Add
(
columns
[
3
].
ColumnName
.
Split
(
'-'
)[
1
]);
cols
.
Add
(
columns
[
4
].
ColumnName
.
Split
(
'-'
)[
1
]);
//解析行
//解析行
var
row
=
tb
.
Value
.
Rows
[
i
];
var
row
=
tb
.
Value
.
Rows
[
i
];
...
@@ -336,9 +337,28 @@ namespace Bailun.DC.Web.Controllers
...
@@ -336,9 +337,28 @@ namespace Bailun.DC.Web.Controllers
continue
;
continue
;
}
}
var
type
=
row
[
1
].
ToString
();
var
type
=
row
[
2
].
ToString
();
var
description
=
row
[
2
].
ToString
();
var
description
=
row
[
3
].
ToString
();
var
fulfillment
=
row
[
3
].
ToString
();
var
fulfillment
=
row
[
4
].
ToString
();
var
_platform
=
""
;
var
_website
=
""
;
if
(
string
.
IsNullOrEmpty
(
platform
))
{
_platform
=
row
[
"平台"
].
ToString
().
Trim
();
_website
=
row
[
"站点"
].
ToString
().
Trim
();
type
=
""
;
description
=
""
;
fulfillment
=
""
;
if
(
string
.
IsNullOrEmpty
(
_platform
))
{
return
Content
(
"请填写平台信息。"
);
}
}
var
valcol
=
row
[
"取数列"
].
ToString
();
var
valcol
=
row
[
"取数列"
].
ToString
();
var
feetype
=
row
[
"费用类型"
].
ToString
();
var
feetype
=
row
[
"费用类型"
].
ToString
();
...
@@ -375,6 +395,19 @@ namespace Bailun.DC.Web.Controllers
...
@@ -375,6 +395,19 @@ namespace Bailun.DC.Web.Controllers
cols
.
Add
(
valcol
);
cols
.
Add
(
valcol
);
//保存需要解析的字段
var
_col_result
=
_service
.
SaveOrderFeeCol
(
new
List
<
Models
.
DataWareHouse
.
order_fee_col
>
{
new
Models
.
DataWareHouse
.
order_fee_col
{
cols
=
string
.
Join
(
"||"
,
cols
.
Distinct
().
Where
(
b
=>
b
!=
"/"
&&
!
string
.
IsNullOrEmpty
(
b
)).
ToList
()),
platform
=
(
platform
==
""
?
_platform
:
platform
),
website
=
(
website
==
""
?
_website
:
website
),
datatype
=
1
,
}});
if
(!
string
.
IsNullOrEmpty
(
_col_result
))
{
return
Content
(
"保存字段解析配置异常,请确认字段格式是否正确。"
);
}
var
m
=
new
Models
.
DataWareHouse
.
order_fee_config
{
var
m
=
new
Models
.
DataWareHouse
.
order_fee_config
{
subjectcode
=
subjectcode
,
subjectcode
=
subjectcode
,
colname_fee
=
valcol
,
colname_fee
=
valcol
,
...
@@ -384,8 +417,8 @@ namespace Bailun.DC.Web.Controllers
...
@@ -384,8 +417,8 @@ namespace Bailun.DC.Web.Controllers
financecategory
=
category
,
financecategory
=
category
,
note
=
note
,
note
=
note
,
projectcode
=
projectcode
,
projectcode
=
projectcode
,
platform
=
platform
,
platform
=
(
platform
==
""
?
_platform
:
platform
)
,
website
=
website
,
website
=
(
website
==
""
?
_website
:
website
)
,
currency
=
currency
,
currency
=
currency
,
delstatus
=
0
,
delstatus
=
0
,
datatype
=
1
,
datatype
=
1
,
...
@@ -394,10 +427,10 @@ namespace Bailun.DC.Web.Controllers
...
@@ -394,10 +427,10 @@ namespace Bailun.DC.Web.Controllers
list
.
Add
(
m
);
list
.
Add
(
m
);
}
}
var
_service
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
();
//保存需要解析的字段
//保存需要解析的字段
var
result
=
_service
.
SaveOrderFeeCol
(
new
List
<
Models
.
DataWareHouse
.
order_fee_col
>
{
new
Models
.
DataWareHouse
.
order_fee_col
{
/*
var result = _service.SaveOrderFeeCol(new List<Models.DataWareHouse.order_fee_col> { new Models.DataWareHouse.order_fee_col {
cols = string.Join("||",cols.Distinct().ToList()),
cols = string.Join("||",cols.Distinct().ToList()),
platform = platform,
platform = platform,
website = website,
website = website,
...
@@ -407,10 +440,10 @@ namespace Bailun.DC.Web.Controllers
...
@@ -407,10 +440,10 @@ namespace Bailun.DC.Web.Controllers
if (!string.IsNullOrEmpty(result))
if (!string.IsNullOrEmpty(result))
{
{
return Content("保存字段解析配置异常,请确认字段格式是否正确。");
return Content("保存字段解析配置异常,请确认字段格式是否正确。");
}
}
*/
//保存取数逻辑条件
//保存取数逻辑条件
result
=
_service
.
SaveOrderFeeConfig
(
list
);
var
result
=
_service
.
SaveOrderFeeConfig
(
list
);
if
(!
string
.
IsNullOrEmpty
(
result
))
if
(!
string
.
IsNullOrEmpty
(
result
))
{
{
return
Content
(
"保存平台费用取数逻辑配置异常:"
+
result
);
return
Content
(
"保存平台费用取数逻辑配置异常:"
+
result
);
...
...
Bailun.DC.Web/wwwroot/templatefile/财务会计流水导入模版.xlsx
0 → 100644
View file @
b6d5b48a
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment