Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
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
data-center-auto
Commits
53eae7fa
Commit
53eae7fa
authored
Apr 09, 2019
by
lizefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
把 在库+在途>缺货的改成0
parent
51851035
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
purchase_advise.cs
AutoTurnOver.DB/purchase_advise.cs
+9
-2
ApiServices.cs
AutoTurnOver.Services/ApiServices.cs
+1
-1
HttpHelper.cs
AutoTurnOver.Utility/HttpHelper.cs
+2
-2
AutoUtility.cs
AutoTurnOver/Common/AutoUtility.cs
+2
-2
No files found.
AutoTurnOver.DB/purchase_advise.cs
View file @
53eae7fa
...
...
@@ -39,9 +39,16 @@ namespace AutoTurnOver.DB
_connection
.
Execute
(
@" update
dc_auto_turnover as t1,
dc_base_sku as t2
set t1.quantity_init_advise=
IFNULL(t1.quantity_out_stock,0
)
set t1.quantity_init_advise=
( t1.quantity_out_stock - ( t1.quantity_inventory + t1.quantity_transfer + t1.quantity_purchase )
)
where t1.bailun_sku = t2.bailun_sku
and t2.buyer_name='赵美聪' "
,
commandTimeout
:
0
);
and t2.buyer_name='赵美聪' and ( t1.quantity_inventory + t1.quantity_transfer + t1.quantity_purchase < t1.quantity_out_stock ) "
,
commandTimeout
:
0
);
// 把 在库+在途>缺货的改成0
_connection
.
Execute
(
@" update
dc_auto_turnover as t1,
dc_base_sku as t2
set t1.quantity_init_advise=0
where t1.bailun_sku = t2.bailun_sku
and t2.buyer_name='赵美聪' and ( t1.quantity_inventory + t1.quantity_transfer + t1.quantity_purchase >= t1.quantity_out_stock ) "
,
commandTimeout
:
0
);
// 生成采购建议
_connection
.
Execute
(
@"
...
...
AutoTurnOver.Services/ApiServices.cs
View file @
53eae7fa
...
...
@@ -131,7 +131,7 @@ namespace AutoTurnOver.Services
{
//查询采购建议明细
string
url
=
ConfigHelper
.
GetValue
(
"PushBuyPlan"
);
string
resultStr
=
HttpHelper
.
Request
(
url
,
RequestType
.
POST
,
"obj="
+
WebUtility
.
UrlDecode
(
data
.
ToJson
()),
timeout
:
0
);
string
resultStr
=
HttpHelper
.
Request
(
url
,
RequestType
.
POST
,
"obj="
+
WebUtility
.
UrlDecode
(
data
.
ToJson
()),
timeout
:
1000
*
60
*
60
*
24
);
var
result
=
resultStr
.
ToObj
<
BuyOutputResult
>();
if
(
result
==
null
)
{
...
...
AutoTurnOver.Utility/HttpHelper.cs
View file @
53eae7fa
...
...
@@ -16,9 +16,9 @@ namespace AutoTurnOver.Utility
public
static
string
Request
(
string
url
,
RequestType
type
,
string
data
=
""
,
string
entype
=
null
,
int
timeout
=
0
)
{
HttpWebRequest
request
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
if
(
timeout
<
0
)
if
(
timeout
<
=
0
)
{
request
.
Timeout
=
0x927c0
;
request
.
Timeout
=
1000
*
30
;
}
else
{
...
...
AutoTurnOver/Common/AutoUtility.cs
View file @
53eae7fa
...
...
@@ -25,7 +25,7 @@ namespace AutoTurnOver.Common
try
{
string
cookie
;
current
.
Request
.
Cookies
.
TryGetValue
(
"BLUserAcct"
,
out
cookie
);
current
.
Request
.
Cookies
.
TryGetValue
(
"BLUserAcct"
,
out
cookie
);
var
builder
=
new
ConfigurationBuilder
().
SetBasePath
(
Directory
.
GetCurrentDirectory
()).
AddJsonFile
(
"appsettings.json"
);
var
configurationRoot
=
builder
.
Build
();
string
url
=
ConfigHelper
.
GetValue
(
"WebHost_GetUser"
);
...
...
@@ -42,7 +42,7 @@ namespace AutoTurnOver.Common
return
data
.
data
;
}
}
catch
catch
(
Exception
ex
)
{
current
.
Response
.
StatusCode
=
(
int
)
HttpStatusCode
.
Unauthorized
;
return
null
;
...
...
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