Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
94822cc4
Commit
94822cc4
authored
Oct 12, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lin update produceNoticeAliEsp
parent
9d7bd73d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
101 additions
and
21 deletions
+101
-21
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+101
-21
No files found.
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
94822cc4
...
@@ -26,6 +26,9 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -26,6 +26,9 @@ class UtilsNeedService extends AppServiceBase {
* @param {*} actionBody
* @param {*} actionBody
*/
*/
async
submitNeed
(
pobj
,
actionBody
)
{
async
submitNeed
(
pobj
,
actionBody
)
{
if
(
actionBody
.
type
==
"esp.wangwen"
)
{
actionBody
.
area
=
this
.
wangwenAreaChange
(
actionBody
.
area
)
}
if
(
!
actionBody
.
intentionBizId
)
{
if
(
!
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"actionBody.intentionBizId can not be empty,100380"
);
return
system
.
getResult
(
null
,
"actionBody.intentionBizId can not be empty,100380"
);
}
}
...
@@ -813,6 +816,81 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -813,6 +816,81 @@ class UtilsNeedService extends AppServiceBase {
return
"35"
return
"35"
}
}
}
}
// 2020 1012 lin 新增 针对网文的地区转换。转换根据是栋源1012 11:22钉钉发来的
wangwenAreaChange
(
area
)
{
switch
(
area
)
{
case
"110000"
:
return
"北京市"
;
case
"120000"
:
return
"天津市"
case
"130000"
:
return
"河北省"
case
"140000"
:
return
"山西省"
case
"150000"
:
return
"内蒙古自治区"
case
"210000"
:
return
"辽宁省"
case
"220000"
:
return
"吉林省"
case
"230000"
:
return
"黑龙江省"
case
"310000"
:
return
"上海市"
case
"320000"
:
return
"江苏省"
case
"330000"
:
return
"浙江省"
case
"340000"
:
return
"安徽省"
case
"350000"
:
return
"福建省"
case
"360000"
:
return
"江西省"
case
"370000"
:
return
"山东省"
case
"410000"
:
return
"河南省"
case
"420000"
:
return
"湖北省"
case
"430000"
:
return
"湖南省"
case
"440000"
:
return
"广东省"
case
"450000"
:
return
"广西壮族自治区"
case
"460000"
:
return
"海南省"
case
"500000"
:
return
"重庆市"
case
"510000"
:
return
"四川省"
case
"520000"
:
return
"贵州省"
case
"530000"
:
return
"云南省"
case
"540000"
:
return
"西藏自治区"
case
"610000"
:
return
"陕西省"
case
"620000"
:
return
"甘肃省"
case
"630000"
:
return
"青海省"
case
"640000"
:
return
"宁夏回族自治区"
case
"650000"
:
return
"新疆维吾尔自治区"
// case "全外资":
// return "32"
// case "香港":
// return "33"
// case "海南":
// return "34"
// default:
// return "35"
}
}
bizTypeChange
(
bizType
)
{
bizTypeChange
(
bizType
)
{
switch
(
bizType
)
{
switch
(
bizType
)
{
case
"ICP许可证"
:
case
"ICP许可证"
:
...
@@ -893,7 +971,7 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -893,7 +971,7 @@ class UtilsNeedService extends AppServiceBase {
}
}
/**
/**
* 2020 0926 lin 新增 阿里文网文 服务商侧提供接口2.
2 关闭需求
通知服务商
* 2020 0926 lin 新增 阿里文网文 服务商侧提供接口2.
3 服务单
通知服务商
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody
* @param {*} actionBody
*/
*/
...
@@ -935,6 +1013,25 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -935,6 +1013,25 @@ class UtilsNeedService extends AppServiceBase {
return
system
.
getResult
(
null
,
"needInfo is empty"
);
return
system
.
getResult
(
null
,
"needInfo is empty"
);
}
}
// 第二部 询价
// 第二部 询价
// 询价前县查出方案
pobj
.
actionBody
.
channelSolutionNo
=
pobj
.
actionBody
.
solutionBizId
;
pobj
.
actionType
=
"receiveSolutionPayInfo"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/icapi/springBoard"
;
var
solutionrtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
if
(
!
solutionrtn
||
!
solutionrtn
.
stdout
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
var
solutiondata
=
JSON
.
parse
(
solutionrtn
.
stdout
);
if
(
solutiondata
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
if
(
!
solutiondata
.
data
)
{
return
system
.
getResultFail
(
-
5012
,
"方案查询数据为空"
);
}
if
(
solutiondata
.
data
&&
solutiondata
.
data
.
channelNeedNo
)
{
pobj
.
actionBody
.
needId
=
solutiondata
.
data
.
channelNeedNo
;
}
// 具体询价操作
pobj
.
actionBody
.
city
=
needInfoResult
.
data
.
city
pobj
.
actionBody
.
city
=
needInfoResult
.
data
.
city
pobj
.
actionBody
.
channelItemCode
=
needInfoResult
.
data
.
channelTypeCode
pobj
.
actionBody
.
channelItemCode
=
needInfoResult
.
data
.
channelTypeCode
pobj
.
actionBody
.
pathCode
=
"/zzfw/wangwen/"
// 写死 needInfo不支持
pobj
.
actionBody
.
pathCode
=
"/zzfw/wangwen/"
// 写死 needInfo不支持
...
@@ -1015,24 +1112,7 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -1015,24 +1112,7 @@ class UtilsNeedService extends AppServiceBase {
if
(
orderrtn
.
data
)
{
if
(
orderrtn
.
data
)
{
pobj
.
actionBody
.
orderNo
=
orderrtn
.
data
.
orderNo
;
pobj
.
actionBody
.
orderNo
=
orderrtn
.
data
.
orderNo
;
}
}
pobj
.
actionBody
.
channelSolutionNo
=
pobj
.
actionBody
.
bizId
;
pobj
.
actionType
=
"receiveSolutionPayInfo"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/icapi/springBoard"
;
var
solutionrtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
if
(
!
solutionrtn
||
!
solutionrtn
.
stdout
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
var
solutiondata
=
JSON
.
parse
(
solutionrtn
.
stdout
);
if
(
solutiondata
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
if
(
!
solutiondata
.
data
)
{
return
system
.
getResultFail
(
-
5012
,
"方案查询数据为空"
);
}
if
(
solutiondata
.
data
&&
solutiondata
.
data
.
channelNeedNo
)
{
pobj
.
actionBody
.
needId
=
solutiondata
.
data
.
channelNeedNo
;
}
// 第四步 整合推送参数 并推送
// 第四步 整合推送参数 并推送
var
fqobj
=
{
var
fqobj
=
{
...
@@ -1161,8 +1241,8 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -1161,8 +1241,8 @@ class UtilsNeedService extends AppServiceBase {
*/
*/
async
soulutionFeebackAliEsp
(
pobj
,
actionBody
)
{
async
soulutionFeebackAliEsp
(
pobj
,
actionBody
)
{
// 待定
// 待定
solutionBizId
//
solutionBizId
note
//
note
if
(
actionBody
.
operateType
==
"INVALID"
)
{
if
(
actionBody
.
operateType
==
"INVALID"
)
{
var
url
=
settings
.
centerOrderUrl
()
+
"action/ediApi/springBoard"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/ediApi/springBoard"
;
var
rtn
=
await
this
.
restPostUrl
(
pobj
,
url
);
var
rtn
=
await
this
.
restPostUrl
(
pobj
,
url
);
...
...
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