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
475cbca5
Commit
475cbca5
authored
Dec 30, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物流供应商往来页面增加启动重跑服务
parent
2f3fedc1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
106 additions
and
8 deletions
+106
-8
Services.cs
Bailun.DC.DailyLogisticSupplierTransaction/Services.cs
+3
-5
LogisticsController.cs
...n.DC.Web/Areas/Reports/Controllers/LogisticsController.cs
+56
-0
SupplierTrancationReport.cshtml
...s/Reports/Views/Logistics/SupplierTrancationReport.cshtml
+39
-0
BaseController.cs
Bailun.DC.Web/Base/BaseController.cs
+6
-0
HomeController.cs
Bailun.DC.Web/Controllers/HomeController.cs
+1
-2
common.js
Bailun.DC.Web/wwwroot/js/common.js
+1
-1
No files found.
Bailun.DC.DailyLogisticSupplierTransaction/Services.cs
View file @
475cbca5
...
@@ -26,14 +26,13 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
...
@@ -26,14 +26,13 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
try
try
{
{
var
now
=
DateTime
.
Now
;
var
now
=
DateTime
.
Now
;
var
_service
=
new
Bailun
.
DC
.
Services
.
LogisticsServices
();
if
(
now
.
Hour
==
11
&&
now
.
Minute
==
57
)
//11:57分启动
if
(
now
.
Hour
==
11
&&
now
.
Minute
==
57
)
//11:57分启动
{
{
Console
.
WriteLine
(
"开始启动 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
Console
.
WriteLine
(
"开始启动 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
var
day
=
DateTime
.
Parse
(
now
.
ToShortDateString
());
var
day
=
DateTime
.
Parse
(
now
.
ToShortDateString
());
//Init(day);
Init
(
day
);
new
Bailun
.
DC
.
Services
.
LogisticsServices
().
LogisticsSupplierTransaction
(
day
);
Console
.
WriteLine
(
"任务运行完成 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
Console
.
WriteLine
(
"任务运行完成 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
}
}
...
@@ -43,8 +42,7 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
...
@@ -43,8 +42,7 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
while
(
day
.
AddDays
(
1
)
<
DateTime
.
Now
)
while
(
day
.
AddDays
(
1
)
<
DateTime
.
Now
)
{
{
Console
.
WriteLine
(
day
);
Console
.
WriteLine
(
day
);
//Init(day);
Init
(
day
);
new
Bailun
.
DC
.
Services
.
LogisticsServices
().
LogisticsSupplierTransaction
(
day
);
Console
.
WriteLine
(
"重跑 "
+
day
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
+
" 完成"
);
Console
.
WriteLine
(
"重跑 "
+
day
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
+
" 完成"
);
day
=
day
.
AddDays
(
1
);
day
=
day
.
AddDays
(
1
);
}
}
...
...
Bailun.DC.Web/Areas/Reports/Controllers/LogisticsController.cs
View file @
475cbca5
...
@@ -112,5 +112,60 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -112,5 +112,60 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
return
Json
(
list
);
return
Json
(
list
);
}
}
[
HttpPost
]
public
JsonResult
ReRunLogisticsSupplierTransaction
(
DateTime
?
start
,
DateTime
?
end
)
{
if
(!
start
.
HasValue
&&
!
end
.
HasValue
)
{
return
Json
(
new
{
success
=
false
,
msg
=
"日期不能为空"
,
});
}
if
(
isRunLogisticsSupplierTransaction
)
{
return
Json
(
new
{
success
=
false
,
msg
=
"当前有任务在重跑,请晚点再试"
,
});
}
if
(!
end
.
HasValue
)
{
end
=
DateTime
.
Now
;
}
try
{
var
_service
=
new
Services
.
LogisticsServices
();
isRunLogisticsSupplierTransaction
=
true
;
while
(
start
.
Value
<=
end
.
Value
)
{
_service
.
LogisticsSupplierTransaction
(
start
.
Value
);
start
=
start
.
Value
.
AddDays
(
1
);
}
isRunLogisticsSupplierTransaction
=
false
;
return
Json
(
new
{
success
=
true
,
msg
=
""
,
});
}
catch
(
Exception
ex
)
{
isRunLogisticsSupplierTransaction
=
false
;
return
Json
(
new
{
success
=
false
,
msg
=
ex
.
Message
,
})
;
}
}
}
}
}
}
\ No newline at end of file
Bailun.DC.Web/Areas/Reports/Views/Logistics/SupplierTrancationReport.cshtml
View file @
475cbca5
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
<label> </label>
<label> </label>
<button type="button" class="btn btn-success" onclick="list();">搜索</button>
<button type="button" class="btn btn-success" onclick="list();">搜索</button>
<button type="button" class="btn btn-primary" onclick="showConfig();">往来统计配置</button>
<button type="button" class="btn btn-primary" onclick="showConfig();">往来统计配置</button>
<button type="button" class="btn btn-warning" onclick="doTask()">重跑往来统计数据</button>
</div>
</div>
</div>
</div>
</form>
</form>
...
@@ -190,6 +191,44 @@
...
@@ -190,6 +191,44 @@
layer_show('物流供应商往来统计配置', '@Url.Content("~/Supplier/Home/ListLogisticsSupplierConfig")', '95%', '95%');
layer_show('物流供应商往来统计配置', '@Url.Content("~/Supplier/Home/ListLogisticsSupplierConfig")', '95%', '95%');
}
}
function doTask() {
var start = $('#start').val();
var end = $('#end').val();
if (start == '') {
alert('请选择开始日期');
return false;
}
if (end == '') {
alert('请选择结束日期');
return false;
}
if (confirm('确定要重跑' + start + "至" + end + "的往来数据吗?")) {
var loading = layer.load(0, {
shade: false
});
$.submit({
url: '@Url.Content("~/Reports/Logistics/ReRunLogisticsSupplierTransaction")',
paramData: 'start='+start+'&end='+end,
type: 'POST',
func: function (result) {
layer.close(loading);
if (result.success) {
alert('运行成功');
}
else {
alert(result.msg);
}
}
})
}
}
</script>
</script>
}
}
...
...
Bailun.DC.Web/Base/BaseController.cs
View file @
475cbca5
...
@@ -24,6 +24,12 @@ namespace Bailun.DC.Web.Base
...
@@ -24,6 +24,12 @@ namespace Bailun.DC.Web.Base
// }
// }
//}
//}
/// <summary>
/// 查看是否还有物流往来统计服务在跑
/// </summary>
public
static
bool
isRunLogisticsSupplierTransaction
=
false
;
#
region
Excel
表格导出
#
region
Excel
表格导出
/// <summary>
/// <summary>
...
...
Bailun.DC.Web/Controllers/HomeController.cs
View file @
475cbca5
...
@@ -51,8 +51,7 @@ namespace Bailun.DC.Web.Controllers
...
@@ -51,8 +51,7 @@ namespace Bailun.DC.Web.Controllers
//new Services.UserAuthorityServices().Add(list);
//new Services.UserAuthorityServices().Add(list);
var
str
=
"{\"poDetails\":[{\"orderUom\":\"Each\",\"lineNumber\":\"1\",\"partnerSkuId\":\"CN-FLO-87158\",\"quantity\":100,\"expectedDeliveryDate\":\"2021-01-01T07:45:46.504Z\"},{\"orderUom\":\"Each\",\"lineNumber\":\"2\",\"partnerSkuId\":\"CN-FLO-87202\",\"quantity\":100,\"expectedDeliveryDate\":\"2021-01-01T07:45:46.504Z\"},{\"orderUom\":\"Each\",\"lineNumber\":\"3\",\"partnerSkuId\":\"CN-FLO-87189\",\"quantity\":150,\"expectedDeliveryDate\":\"2021-01-01T07:45:46.504Z\"},{\"orderUom\":\"Each\",\"lineNumber\":\"4\",\"partnerSkuId\":\"CN-FLO-87219\",\"quantity\":100,\"expectedDeliveryDate\":\"2021-01-01T07:45:46.504Z\"},{\"orderUom\":\"Each\",\"lineNumber\":\"5\",\"partnerSkuId\":\"CN-FLO-87226\",\"quantity\":100,\"expectedDeliveryDate\":\"2021-01-01T07:45:46.504Z\"},{\"orderUom\":\"Each\",\"lineNumber\":\"6\",\"partnerSkuId\":\"CN-FLO-87172\",\"quantity\":100,\"expectedDeliveryDate\":\"2021-01-01T07:45:46.504Z\"},{\"orderUom\":\"Each\",\"lineNumber\":\"7\",\"partnerSkuId\":\"CN-FLO-87165\",\"quantity\":100,\"expectedDeliveryDate\":\"2021-01-01T07:45:46.504Z\"},{\"orderUom\":\"Each\",\"lineNumber\":\"8\",\"partnerSkuId\":\"CN-FLO-87196\",\"quantity\":100,\"expectedDeliveryDate\":\"2021-01-01T07:45:46.504Z\"}],\"recordCreateDate\":\"2020-12-25T07:45:46.504Z\",\"poNumber\":\"COUP194937\"}"
;
return
View
();
return
View
();
}
}
...
...
Bailun.DC.Web/wwwroot/js/common.js
View file @
475cbca5
var
baseUrl
=
'http://
localhost:59628/'
;
//'http://data.bailuntec.com';
//
var
baseUrl
=
'http://
data.bailuntec.com'
;
//'http://localhost:59628/';
//
var
globalOrderSort
=
''
;
var
globalOrderSort
=
''
;
var
globalOrderType
=
''
;
var
globalOrderType
=
''
;
...
...
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