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
f418de83
Commit
f418de83
authored
Apr 13, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solutionflow
parent
f2d91310
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
95 additions
and
7 deletions
+95
-7
center-order/app/base/service/impl/dbneed/needsolutionSve.js
+95
-7
No files found.
center-order/app/base/service/impl/dbneed/needsolutionSve.js
View file @
f418de83
...
...
@@ -9,6 +9,12 @@ class NeedsolutionService extends ServiceBase {
this
.
needinfoDao
=
system
.
getObject
(
"db.dbneed.needinfoDao"
);
// this.push2aliSve = system.getObject("service.common.push2aliSve");
this
.
orderinfoDao
=
system
.
getObject
(
"db.dbcorder.orderinfoDao"
);
this
.
icpSolutionStatusReference
=
{
UN_PAID
:
"未支付"
,
PAID
:
"用户支付"
,
USER_UPLOADED
:
"用户上传资料"
,
MATERIAL_UNCONFIRM
:
"服务商递交⽂件"
,
USER_CONFIRMED
:
"⽤户已确认递交⽂件"
,
ACCOUNT_REGISTERED
:
"完成账户注册"
,
MATERIAL_SUBMITTED
:
"完成资料递交"
,
GXB_ACCEPT
:
"⼯信部已受理"
,
GXB_REFUSE
:
"⼯信部不予受理"
,
GXB_FAIL
:
"⼯信部未通过"
,
GXB_SUCCESS
:
"工信部通过"
,
CLOSE
:
"方案关闭"
};
}
//---------------------公司注册-start-----------------------------------------------------------------
//提交方案
...
...
@@ -559,7 +565,7 @@ class NeedsolutionService extends ServiceBase {
return
system
.
getResultFail
(
-
206
,
"渠道方案类型错误"
);
}
var
ns
=
await
this
.
dao
.
model
.
findAll
({
where
:{
n
eedNo
:
ab
.
needNo
},
raw
:
true
where
:{
channelN
eedNo
:
ab
.
needNo
},
raw
:
true
});
for
(
var
i
=
0
;
i
<
ns
.
length
;
i
++
){
var
fa
=
ns
[
i
];
...
...
@@ -794,6 +800,12 @@ class NeedsolutionService extends ServiceBase {
return
system
.
getResultFail
(
-
107
,
"合作方递交其他供预览文件不能为空"
);
}
solutionContent
.
material
=
ab
.
material
;
var
solutionFlowList
=
solutionContent
.
solutionFlowList
||
[];
solutionFlowList
.
push
({
status
:
"MATERIAL_UNCONFIRM"
,
statusName
:
this
.
icpSolutionStatusReference
.
MATERIAL_UNCONFIRM
,
updated_at
:
new
Date
()
});
solutionContent
.
status
=
"MATERIAL_UNCONFIRM"
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
MATERIAL_UNCONFIRM
;
needsolutioninfo
.
solutionContent
=
JSON
.
stringify
(
solutionContent
);
var
self
=
this
;
return
await
this
.
db
.
transaction
(
async
function
(
t
)
{
...
...
@@ -805,7 +817,7 @@ class NeedsolutionService extends ServiceBase {
})
}
//通知状态变更
//
服务商
通知状态变更
async
acceptIcpPartnerNotification
(
pobj
){
var
ab
=
pobj
.
actionBody
;
var
user
=
pobj
.
userInfo
;
...
...
@@ -844,14 +856,65 @@ class NeedsolutionService extends ServiceBase {
return
system
.
getResultFail
(
-
202
,
"该方案需求状态为"
+
needinfo
.
statusName
+
",不能执行此操作"
);
}
var
applicationStatusList
=
solutionContent
.
applicationStatusList
||
[];
var
solutionFlowList
=
solutionContent
.
solutionFlowList
||
[];
var
statusObj
=
{
"OfficialFileURL"
:
ab
.
OfficialFileURL
||
""
,
"ApplicationStatus"
:
ab
.
ApplicationStatus
,
"ApplicationStatusName"
:
ab
.
ApplicationStatus
,
"created_at"
:
new
Date
()
};
applicationStatusList
.
push
(
statusObj
);
solutionContent
.
applicationStatusList
=
applicationStatusList
;
// solutionContent.status = ab.ApplicationStatus;
if
(
ab
.
ApplicationStatus
==
507
){
//完成账户注册
solutionFlowList
.
push
({
status
:
"ACCOUNT_REGISTERED"
,
statusName
:
this
.
icpSolutionStatusReference
.
ACCOUNT_REGISTERED
,
updated_at
:
new
Date
()
});
solutionContent
.
status
=
"ACCOUNT_REGISTERED"
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
ACCOUNT_REGISTERED
;
// this.icpSolutionStatusReference={
// UN_PAID:"未支付",PAID:"用户支付",USER_UPLOADED:"用户上传资料",MATERIAL_UNCONFIRM:"服务商递交⽂件"
// ,USER_CONFIRMED:"⽤户已确认递交⽂件",ACCOUNT_REGISTERED:"完成账户注册",MATERIAL_SUBMITTED:"完成资料递交",
// GXB_ACCEPT:"⼯信部已受理",GXB_REFUSE:"⼯信部不予受理",GXB_FAIL:"⼯信部未通过"
// ,CLOSE:"方案关闭"
// };
}
if
(
ab
.
ApplicationStatus
==
508
){
//"服务商完成提交资料到⼯信部
solutionFlowList
.
push
({
status
:
"MATERIAL_SUBMITTED"
,
statusName
:
this
.
icpSolutionStatusReference
.
MATERIAL_SUBMITTED
,
updated_at
:
new
Date
()
});
solutionContent
.
status
=
"MATERIAL_SUBMITTED"
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
MATERIAL_SUBMITTED
;
}
if
(
ab
.
ApplicationStatus
==
509
){
//⼯商部已受理
solutionFlowList
.
push
({
status
:
"GXB_ACCEPT"
,
statusName
:
this
.
icpSolutionStatusReference
.
GXB_ACCEPT
,
updated_at
:
new
Date
()
});
solutionContent
.
status
=
"GXB_ACCEPT"
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
GXB_ACCEPT
;
}
if
(
ab
.
ApplicationStatus
==
510
){
//⼯商部不予受理
solutionFlowList
.
push
({
status
:
"GXB_REFUSE"
,
statusName
:
this
.
icpSolutionStatusReference
.
GXB_REFUSE
,
updated_at
:
new
Date
()
});
solutionContent
.
status
=
"GXB_REFUSE"
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
GXB_REFUSE
;
}
if
(
ab
.
ApplicationStatus
==
511
){
//⼯商部通过
solutionFlowList
.
push
({
status
:
"GXB_SUCCESS"
,
statusName
:
this
.
icpSolutionStatusReference
.
GXB_SUCCESS
,
updated_at
:
new
Date
()
});
needsolutioninfo
.
status
=
"ywc"
;
solutionContent
.
status
=
"GXB_SUCCESS"
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
GXB_SUCCESS
;
}
if
(
ab
.
ApplicationStatus
==
512
){
//⼯信部未通过
solutionFlowList
.
push
({
status
:
"GXB_FAIL"
,
statusName
:
this
.
icpSolutionStatusReference
.
GXB_FAIL
,
updated_at
:
new
Date
()
});
solutionContent
.
status
=
"GXB_FAIL"
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
GXB_FAIL
;
}
solutionContent
.
solutionFlowList
=
solutionFlowList
;
needsolutioninfo
.
solutionContent
=
JSON
.
stringify
(
solutionContent
);
var
self
=
this
;
return
await
this
.
db
.
transaction
(
async
function
(
t
)
{
...
...
@@ -909,7 +972,7 @@ class NeedsolutionService extends ServiceBase {
async
confirmIcpIntention
(
pobj
){
return
system
.
getResultFail
();
}
//接收方案状态变更通知
//接收
渠道
方案状态变更通知
async
receiveIcpStatusNotify
(
pobj
){
var
ab
=
pobj
.
actionBody
;
if
(
!
ab
.
BizId
){
...
...
@@ -938,7 +1001,31 @@ class NeedsolutionService extends ServiceBase {
return
system
.
getResultFail
(
-
103
,
"方案状态错误,只能废弃待确认方案"
);
}
var
solutionContent
=
ns
.
solutionContent
;
solutionContent
.
status
=
ab
.
status
;
//方案流程列表
var
solutionFlowList
=
solutionContent
.
solutionFlowList
||
[];
if
(
ab
.
status
==
"2"
){
//⽤户已上传
solutionFlowList
.
push
({
status
:
"USER_UPLOADED"
,
statusName
:
this
.
icpSolutionStatusReference
.
USER_UPLOADED
,
updated_at
:
new
Date
()
});
solutionContent
.
status
=
"USER_UPLOADED"
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
USER_UPLOADED
;
}
if
(
ab
.
status
==
"4"
){
//⽤户已确认
solutionFlowList
.
push
({
status
:
"USER_CONFIRMED"
,
statusName
:
this
.
icpSolutionStatusReference
.
USER_CONFIRMED
,
updated_at
:
new
Date
()
});
solutionContent
.
status
=
"USER_CONFIRMED"
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
USER_CONFIRMED
;
}
if
(
ab
.
status
==
"11"
){
//⽅案已关闭
solutionFlowList
.
push
({
status
:
"CLOSE"
,
statusName
:
this
.
icpSolutionStatusReference
.
CLOSE
,
updated_at
:
new
Date
()
});
solutionContent
.
status
=
"CLOSE"
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
CLOSE
;
}
solutionContent
.
solutionFlowList
=
solutionFlowList
;
var
material
=
solutionContent
.
material
||
{};
if
(
ab
.
remark
){
solutionContent
.
notes
=
ab
.
remark
;
...
...
@@ -968,9 +1055,10 @@ class NeedsolutionService extends ServiceBase {
};
if
(
ab
.
status
==
"11"
){
//⽅案已关闭
updateObj
[
"status"
]
=
"yzf"
;
}
else
if
(
ab
.
status
==
"2"
||
ab
.
status
==
"4"
){
//2, "⽤户已上传" 4, "⽤户已确认"
updateObj
[
"status"
]
=
"dqr"
;
}
// else if(ab.status == "2" || ab.status == "4"){ //2, "⽤户已上传" 4, "⽤户已确认"
// updateObj["status"]="dqr";
// }
await
this
.
dao
.
update
(
updateObj
);
//方案状态修改
ns
=
await
this
.
dao
.
model
.
findOne
({
where
:{
channelSolutionNo
:
ab
.
BizId
},
raw
:
true
...
...
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