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
be3e3dd0
Commit
be3e3dd0
authored
Jul 29, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务商通知状态变更
parent
98250206
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
12 deletions
+38
-12
center-order/app/base/service/impl/qcutils/aliyunqcSve.js
+38
-12
No files found.
center-order/app/base/service/impl/qcutils/aliyunqcSve.js
View file @
be3e3dd0
...
@@ -417,6 +417,12 @@ class AliyunQcService{
...
@@ -417,6 +417,12 @@ class AliyunQcService{
if
(
!
solutionContent
)
{
if
(
!
solutionContent
)
{
return
system
.
getResultFail
(
-
402
,
"方案交付信息有误"
);
return
system
.
getResultFail
(
-
402
,
"方案交付信息有误"
);
}
}
if
(
solutionContent
.
applicationStatus
&&
solutionContent
.
applicationStatus
>
ab
.
ApplicationStatus
)
{
return
system
.
getResultFail
(
-
403
,
"操作失败,交付流程未按顺序执行"
);
}
// if (solutionContent.ApplicationStatus && solutionContent.ApplicationStatus==ab.ApplicationStatus) {
// return system.getResultFail(-403, "操作失败,该流程状态已提交,不能重复提交");
// }
// if(solutionContent.)
// if(solutionContent.)
//获取需求信息
//获取需求信息
var
needinfo
=
await
this
.
needinfoDao
.
model
.
findOne
({
var
needinfo
=
await
this
.
needinfoDao
.
model
.
findOne
({
...
@@ -428,17 +434,12 @@ class AliyunQcService{
...
@@ -428,17 +434,12 @@ class AliyunQcService{
if
(
needinfo
.
status
==
"ycd"
||
needinfo
.
status
==
"ygb"
)
{
if
(
needinfo
.
status
==
"ycd"
||
needinfo
.
status
==
"ygb"
)
{
return
system
.
getResultFail
(
-
202
,
"该方案需求状态为"
+
needinfo
.
statusName
+
",不能执行此操作"
);
return
system
.
getResultFail
(
-
202
,
"该方案需求状态为"
+
needinfo
.
statusName
+
",不能执行此操作"
);
}
}
var
applicationStatusList
=
solutionContent
.
applicationStatusList
||
[];
var
solutionFlowList
=
solutionContent
.
solutionFlowList
||
[];
var
solutionFlowList
=
solutionContent
.
solutionFlowList
||
[];
var
statusObj
=
{
"OfficialFileURL"
:
ab
.
OfficialFileURL
||
""
,
"ApplicationStatus"
:
ab
.
ApplicationStatus
,
"ApplicationStatusName"
:
this
.
icpApplicationStatusReference
[
ab
.
ApplicationStatus
],
"created_at"
:
new
Date
()
};
applicationStatusList
.
push
(
statusObj
);
solutionContent
.
applicationStatusList
=
applicationStatusList
;
if
(
ab
.
ApplicationStatus
==
507
)
{
//完成账户注册
if
(
ab
.
ApplicationStatus
==
507
)
{
//完成账户注册
if
(
solutionContent
.
status
!=
"USER_CONFIRMED"
){
return
system
.
getResultFail
(
-
508
,
"交付流程错误,用户确认递交⽂件后才能执行此操作"
);
}
solutionContent
.
ApplicationStatus
=
507
;
solutionFlowList
.
push
({
solutionFlowList
.
push
({
file
:
ab
.
OfficialFileURL
||
""
,
file
:
ab
.
OfficialFileURL
||
""
,
status
:
"ACCOUNT_REGISTERED"
,
statusName
:
this
.
icpSolutionStatusReference
.
ACCOUNT_REGISTERED
,
updated_at
:
new
Date
()
status
:
"ACCOUNT_REGISTERED"
,
statusName
:
this
.
icpSolutionStatusReference
.
ACCOUNT_REGISTERED
,
updated_at
:
new
Date
()
...
@@ -447,6 +448,9 @@ class AliyunQcService{
...
@@ -447,6 +448,9 @@ class AliyunQcService{
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
ACCOUNT_REGISTERED
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
ACCOUNT_REGISTERED
;
}
}
if
(
ab
.
ApplicationStatus
==
508
)
{
//"服务商完成提交资料到⼯信部
if
(
ab
.
ApplicationStatus
==
508
)
{
//"服务商完成提交资料到⼯信部
if
(
solutionContent
.
status
!=
"ACCOUNT_REGISTERED"
){
return
system
.
getResultFail
(
-
508
,
"交付流程错误,请先完成账户注册"
);
}
solutionFlowList
.
push
({
solutionFlowList
.
push
({
file
:
ab
.
OfficialFileURL
||
""
,
file
:
ab
.
OfficialFileURL
||
""
,
status
:
"MATERIAL_SUBMITTED"
,
statusName
:
this
.
icpSolutionStatusReference
.
MATERIAL_SUBMITTED
,
updated_at
:
new
Date
()
status
:
"MATERIAL_SUBMITTED"
,
statusName
:
this
.
icpSolutionStatusReference
.
MATERIAL_SUBMITTED
,
updated_at
:
new
Date
()
...
@@ -455,6 +459,9 @@ class AliyunQcService{
...
@@ -455,6 +459,9 @@ class AliyunQcService{
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
MATERIAL_SUBMITTED
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
MATERIAL_SUBMITTED
;
}
}
if
(
ab
.
ApplicationStatus
==
509
)
{
//⼯商部已受理
if
(
ab
.
ApplicationStatus
==
509
)
{
//⼯商部已受理
if
(
solutionContent
.
status
!=
"MATERIAL_SUBMITTED"
){
return
system
.
getResultFail
(
-
509
,
"交付流程错误,请先完成资料递交"
);
}
solutionFlowList
.
push
({
solutionFlowList
.
push
({
file
:
ab
.
OfficialFileURL
||
""
,
file
:
ab
.
OfficialFileURL
||
""
,
status
:
"GXB_ACCEPT"
,
statusName
:
this
.
icpSolutionStatusReference
.
GXB_ACCEPT
,
updated_at
:
new
Date
()
status
:
"GXB_ACCEPT"
,
statusName
:
this
.
icpSolutionStatusReference
.
GXB_ACCEPT
,
updated_at
:
new
Date
()
...
@@ -463,6 +470,9 @@ class AliyunQcService{
...
@@ -463,6 +470,9 @@ class AliyunQcService{
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
GXB_ACCEPT
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
GXB_ACCEPT
;
}
}
if
(
ab
.
ApplicationStatus
==
510
)
{
//⼯商部不予受理
if
(
ab
.
ApplicationStatus
==
510
)
{
//⼯商部不予受理
if
(
solutionContent
.
status
!=
"MATERIAL_SUBMITTED"
){
return
system
.
getResultFail
(
-
510
,
"交付流程错误,请先完成资料递交"
);
}
solutionFlowList
.
push
({
solutionFlowList
.
push
({
file
:
ab
.
OfficialFileURL
||
""
,
file
:
ab
.
OfficialFileURL
||
""
,
status
:
"GXB_REFUSE"
,
statusName
:
this
.
icpSolutionStatusReference
.
GXB_REFUSE
,
updated_at
:
new
Date
()
status
:
"GXB_REFUSE"
,
statusName
:
this
.
icpSolutionStatusReference
.
GXB_REFUSE
,
updated_at
:
new
Date
()
...
@@ -472,6 +482,9 @@ class AliyunQcService{
...
@@ -472,6 +482,9 @@ class AliyunQcService{
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
GXB_REFUSE
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
GXB_REFUSE
;
}
}
if
(
ab
.
ApplicationStatus
==
511
)
{
//⼯商部通过
if
(
ab
.
ApplicationStatus
==
511
)
{
//⼯商部通过
if
(
solutionContent
.
status
!=
"GXB_ACCEPT"
){
return
system
.
getResultFail
(
-
511
,
"交付流程错误,⼯信部已受理后才能执行此操作"
);
}
solutionFlowList
.
push
({
solutionFlowList
.
push
({
file
:
ab
.
OfficialFileURL
||
""
,
file
:
ab
.
OfficialFileURL
||
""
,
status
:
"GXB_SUCCESS"
,
statusName
:
this
.
icpSolutionStatusReference
.
GXB_SUCCESS
,
updated_at
:
new
Date
()
status
:
"GXB_SUCCESS"
,
statusName
:
this
.
icpSolutionStatusReference
.
GXB_SUCCESS
,
updated_at
:
new
Date
()
...
@@ -481,6 +494,9 @@ class AliyunQcService{
...
@@ -481,6 +494,9 @@ class AliyunQcService{
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
GXB_SUCCESS
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
GXB_SUCCESS
;
}
}
if
(
ab
.
ApplicationStatus
==
512
)
{
//⼯信部未通过
if
(
ab
.
ApplicationStatus
==
512
)
{
//⼯信部未通过
if
(
solutionContent
.
status
!=
"GXB_ACCEPT"
){
return
system
.
getResultFail
(
-
512
,
"交付流程错误,⼯信部已受理后才能执行此操作"
);
}
solutionFlowList
.
push
({
solutionFlowList
.
push
({
file
:
ab
.
OfficialFileURL
||
""
,
file
:
ab
.
OfficialFileURL
||
""
,
status
:
"GXB_FAIL"
,
statusName
:
this
.
icpSolutionStatusReference
.
GXB_FAIL
,
updated_at
:
new
Date
()
status
:
"GXB_FAIL"
,
statusName
:
this
.
icpSolutionStatusReference
.
GXB_FAIL
,
updated_at
:
new
Date
()
...
@@ -490,6 +506,16 @@ class AliyunQcService{
...
@@ -490,6 +506,16 @@ class AliyunQcService{
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
GXB_FAIL
;
solutionContent
.
statusName
=
this
.
icpSolutionStatusReference
.
GXB_FAIL
;
}
}
solutionContent
.
solutionFlowList
=
solutionFlowList
;
solutionContent
.
solutionFlowList
=
solutionFlowList
;
var
applicationStatusList
=
solutionContent
.
applicationStatusList
||
[];
var
statusObj
=
{
"OfficialFileURL"
:
ab
.
OfficialFileURL
||
""
,
"ApplicationStatus"
:
ab
.
ApplicationStatus
,
"ApplicationStatusName"
:
this
.
icpApplicationStatusReference
[
ab
.
ApplicationStatus
],
"created_at"
:
new
Date
()
};
applicationStatusList
.
push
(
statusObj
);
solutionContent
.
applicationStatusList
=
applicationStatusList
;
solutionContent
.
applicationStatus
=
ab
.
ApplicationStatus
;
needsolutioninfo
.
solutionContent
=
JSON
.
stringify
(
solutionContent
);
needsolutioninfo
.
solutionContent
=
JSON
.
stringify
(
solutionContent
);
var
self
=
this
;
var
self
=
this
;
return
await
this
.
needsolutionDao
.
db
.
transaction
(
async
function
(
t
)
{
return
await
this
.
needsolutionDao
.
db
.
transaction
(
async
function
(
t
)
{
...
@@ -527,9 +553,9 @@ class AliyunQcService{
...
@@ -527,9 +553,9 @@ class AliyunQcService{
if
(
needinfo
.
status
==
"ycd"
||
needinfo
.
status
==
"ygb"
)
{
if
(
needinfo
.
status
==
"ycd"
||
needinfo
.
status
==
"ygb"
)
{
return
system
.
getResultFail
(
-
105
,
"该方案需求状态为"
+
needinfo
.
statusName
+
",不能执行此操作"
);
return
system
.
getResultFail
(
-
105
,
"该方案需求状态为"
+
needinfo
.
statusName
+
",不能执行此操作"
);
}
}
if
(
ns
.
status
!=
"dqr"
&&
ns
.
status
!=
"yzf"
&&
ns
.
status
!=
"ybh"
)
{
//
if (ns.status != "dqr" && ns.status != "yzf" && ns.status != "ybh") {
return
system
.
getResultFail
(
-
103
,
"方案状态错误,不能作废已完成方案"
);
//
return system.getResultFail(-103, "方案状态错误,不能作废已完成方案");
}
//
}
var
solutionContent
=
ns
.
solutionContent
;
var
solutionContent
=
ns
.
solutionContent
;
//方案流程列表
//方案流程列表
var
solutionFlowList
=
solutionContent
.
solutionFlowList
||
[];
var
solutionFlowList
=
solutionContent
.
solutionFlowList
||
[];
...
...
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