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
f4c1e1fd
Commit
f4c1e1fd
authored
Oct 16, 2020
by
任晓松
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/center-channel' into center-channel
parents
7c5bf566
811901b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
137 additions
and
27 deletions
+137
-27
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+137
-27
No files found.
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
f4c1e1fd
...
@@ -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
.
type
==
"esp.food"
)
{
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"
);
}
}
...
@@ -204,13 +207,41 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -204,13 +207,41 @@ class UtilsNeedService extends AppServiceBase {
if
(
!
actionBody
.
intentionBizId
)
{
if
(
!
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"actionBody.intentionBizId can not be empty,100395"
);
return
system
.
getResult
(
null
,
"actionBody.intentionBizId can not be empty,100395"
);
}
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
if
(
!
actionBody
.
note
)
{
return
system
.
getResult
(
null
,
"actionBody.note can not be empty,100395"
);
}
pobj
.
actionBody
.
channelNeedNo
=
pobj
.
actionBody
.
intentionBizId
;
// 2020 1016 lin 新增 需求关闭时判断 方案状态 订单状态,打个比方如果已经生成订单了 那么肯定不能直接关闭需求
var
self
=
this
;
pobj
.
actionType
=
"abolishIcpProgrammeByNeed"
var
reqUrl
=
this
.
centerOrderUrl
+
"action/qcapi/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
// 2020 1015 lin 新增 这里为什么只推送蜂擎 没有推送交付?
// 明天找栋源确认 如果需要增加 在这个文件搜索updateChanceStatus
// 2020 1016 lin 新增 需求关闭时判断 方案状态 订单状态,打个比方如果已经生成订单了 那么肯定不能直接关闭需求
if
(
result
.
status
==
0
)
{
if
(
result
.
status
==
0
)
{
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseNeed"
);
if
(
result
.
data
)
{
pobj
.
actionBody
.
orderNo
=
result
.
data
;
var
orderrtn
=
await
self
.
utilsOrderSve
.
delOrder
(
pobj
,
pobj
.
actionBody
);
if
(
orderrtn
.
status
<
0
)
{
return
system
.
getResultFail
(
-
5022
,
"订单关闭失败"
);
}
}
//推送交付系统
var
reqParams
=
{
actionBody
:
{
intentionBizId
:
pobj
.
actionBody
.
channelNeedNo
,
status
:
"closeNeed"
},
opType
:
"updateChanceStatus"
,
appInfo
:
pobj
.
appInfo
}
self
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
else
{
}
else
{
return
system
.
getResult
(
null
,
"
推送失敗 100388
"
);
return
system
.
getResult
(
null
,
"
close fail 100389
"
);
}
}
}
}
...
@@ -818,6 +849,81 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -818,6 +849,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许可证"
:
...
@@ -898,7 +1004,7 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -898,7 +1004,7 @@ class UtilsNeedService extends AppServiceBase {
}
}
/**
/**
* 2020 0926 lin 新增 阿里文网文 服务商侧提供接口2.
2 关闭需求
通知服务商
* 2020 0926 lin 新增 阿里文网文 服务商侧提供接口2.
3 服务单
通知服务商
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody
* @param {*} actionBody
*/
*/
...
@@ -940,9 +1046,30 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -940,9 +1046,30 @@ class UtilsNeedService extends AppServiceBase {
return
system
.
getResult
(
null
,
"needInfo is empty"
);
return
system
.
getResult
(
null
,
"needInfo is empty"
);
}
}
// 第二部 询价
// 第二部 询价
pobj
.
actionBody
.
city
=
needInfoResult
.
data
.
city
// 询价前县查出方案
pobj
.
actionBody
.
channelItemCode
=
needInfoResult
.
data
.
channelTypeCode
pobj
.
actionBody
.
channelSolutionNo
=
pobj
.
actionBody
.
solutionBizId
;
pobj
.
actionBody
.
pathCode
=
"/zzfw/wangwen/"
// 写死 needInfo不支持
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
=
solutiondata
.
data
.
solutionContent
.
solution
.
solutionCity
;
// pobj.actionBody.city = needInfoResult.data.city
pobj
.
actionBody
.
channelItemCode
=
needInfoResult
.
data
.
channelTypeCode
;
pobj
.
actionBody
.
pathCode
=
"/zzfw/wangwen/"
;
// 写死 needInfo不支持
pobj
.
actionType
=
"getProductPrice"
;
pobj
.
actionType
=
"getProductPrice"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productPriceResult
=
await
this
.
restPostUrl
(
pobj
,
url
);
var
productPriceResult
=
await
this
.
restPostUrl
(
pobj
,
url
);
...
@@ -1020,24 +1147,7 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -1020,24 +1147,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
=
{
...
@@ -1166,8 +1276,8 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -1166,8 +1276,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