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
9632428e
Commit
9632428e
authored
Aug 03, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
icp
parent
bfea29bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
47 deletions
+50
-47
center-order/app/base/api/impl/action/qcapi.js
+3
-1
center-order/app/base/service/impl/dbneed/needsolutionSve.js
+1
-46
center-order/app/base/service/impl/qcutils/aliyunqcSve.js
+46
-0
No files found.
center-order/app/base/api/impl/action/qcapi.js
View file @
9632428e
...
...
@@ -73,7 +73,9 @@ class QcAPI extends APIBase {
case
"closeOrderDelivery"
:
//交付商关闭交付单
opResult
=
await
this
.
aliyunqcSve
.
closeOrderDelivery
(
pobj
);
break
;
case
"abolishIcpProgrammeByNeed"
:
//前端关闭ICP需求
opResult
=
await
this
.
aliyunqcSve
.
abolishIcpProgrammeByNeed
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-order/app/base/service/impl/dbneed/needsolutionSve.js
View file @
9632428e
...
...
@@ -416,52 +416,7 @@ class NeedsolutionService extends ServiceBase {
await
this
.
dao
.
model
.
update
({
status
:
"yzf"
,
isInvalid
:
1
},
{
where
:
{
needNo
:
needinfo
.
needNo
}
});
//方案废弃
return
system
.
getResultSuccess
();
}
//根据需求关闭ICP方案(关闭需求后调用)
async
abolishIcpProgrammeByNeed
(
pobj
)
{
var
ab
=
pobj
.
actionBody
;
var
app
=
pobj
.
appInfo
;
if
(
!
app
||
!
app
.
uapp_id
)
{
return
system
.
getResultFail
(
-
100
,
"未知渠道"
);
}
if
(
!
ab
.
intentionBizId
)
{
return
system
.
getResultFail
(
-
101
,
"需求编号不能为空"
);
}
//获取需求信息
var
needinfo
=
await
this
.
needinfoDao
.
model
.
findOne
({
attributes
:[
"id"
,
"status"
,
"statusName"
,
"needNo"
],
where
:
{
channelNeedNo
:
ab
.
intentionBizId
},
raw
:
true
});
if
(
!
needinfo
||
!
needinfo
.
id
)
{
return
system
.
getResultFail
(
-
201
,
"未知需求信息"
);
}
if
(
needinfo
.
status
==
"ygb"
)
{
return
system
.
getResultFail
(
-
202
,
"该方案需求状态为"
+
needinfo
.
statusName
+
",不能执行此操作"
);
}
//获取方案信息
var
ns
=
await
this
.
dao
.
model
.
findAll
({
where
:
{
needNo
:
needinfo
.
needNo
,
isInvalid
:
0
},
raw
:
true
});
for
(
var
i
=
0
;
i
<
ns
.
length
;
i
++
)
{
var
fa
=
ns
[
i
];
if
(
fa
.
status
==
"ywc"
)
{
return
system
.
getResultFail
(
-
103
,
"方案状态错误,不能废弃已完成方案"
);
}
var
flowStatus
=
fa
.
solutionContent
&&
fa
.
solutionContent
.
status
?
fa
.
solutionContent
.
status
:
""
;
if
(
flowStatus
&&
[
"GXB_REFUSE"
,
"CLOSE"
].
indexOf
(
flowStatus
)
<
0
){
return
system
.
getResultFail
(
-
104
,
"⽅案状态为关闭或不予受理才可关闭需求"
);
}
}
var
self
=
this
;
return
await
this
.
db
.
transaction
(
async
function
(
t
)
{
var
needObj
=
{
id
:
needinfo
.
id
,
status
:
"ygb"
,
notes
:
ab
.
note
};
await
self
.
needinfoDao
.
update
(
needObj
,
t
);
//关闭需求
await
self
.
dao
.
model
.
update
({
status
:
"yzf"
,
isInvalid
:
1
},
{
where
:
{
needNo
:
needinfo
.
needNo
,
isInvalid
:
0
},
transaction
:
t
});
//方案废弃
return
system
.
getResultSuccess
();
})
}
//立即支付下单保存方案
async
createSolutionByOrder
(
pobj
)
{
var
ab
=
pobj
.
actionBody
;
...
...
center-order/app/base/service/impl/qcutils/aliyunqcSve.js
View file @
9632428e
...
...
@@ -26,6 +26,52 @@ class AliyunQcService{
512
:
"⼯商部未通过"
};
}
//根据需求关闭ICP方案(关闭需求后调用)
async
abolishIcpProgrammeByNeed
(
pobj
)
{
var
ab
=
pobj
.
actionBody
;
var
app
=
pobj
.
appInfo
;
if
(
!
app
||
!
app
.
uapp_id
)
{
return
system
.
getResultFail
(
-
100
,
"未知渠道"
);
}
if
(
!
ab
.
intentionBizId
)
{
return
system
.
getResultFail
(
-
101
,
"需求编号不能为空"
);
}
//获取需求信息
var
needinfo
=
await
this
.
needinfoDao
.
model
.
findOne
({
attributes
:[
"id"
,
"status"
,
"statusName"
,
"needNo"
],
where
:
{
channelNeedNo
:
ab
.
intentionBizId
},
raw
:
true
});
if
(
!
needinfo
||
!
needinfo
.
id
)
{
return
system
.
getResultFail
(
-
201
,
"未知需求信息"
);
}
if
(
needinfo
.
status
==
"ygb"
)
{
return
system
.
getResultFail
(
-
202
,
"该方案需求状态为"
+
needinfo
.
statusName
+
",不能执行此操作"
);
}
//获取方案信息
var
ns
=
await
this
.
needsolutionDao
.
model
.
findAll
({
where
:
{
needNo
:
needinfo
.
needNo
,
isInvalid
:
0
},
raw
:
true
});
for
(
var
i
=
0
;
i
<
ns
.
length
;
i
++
)
{
var
fa
=
ns
[
i
];
if
(
fa
.
status
==
"ywc"
)
{
return
system
.
getResultFail
(
-
103
,
"方案状态错误,不能废弃已完成方案"
);
}
var
flowStatus
=
fa
.
solutionContent
&&
fa
.
solutionContent
.
status
?
fa
.
solutionContent
.
status
:
""
;
if
(
flowStatus
&&
[
"GXB_REFUSE"
,
"CLOSE"
].
indexOf
(
flowStatus
)
<
0
){
return
system
.
getResultFail
(
-
104
,
"⽅案状态为关闭或不予受理才可关闭需求"
);
}
}
var
self
=
this
;
return
await
this
.
needsolutionDao
.
db
.
transaction
(
async
function
(
t
)
{
var
needObj
=
{
id
:
needinfo
.
id
,
status
:
"ygb"
,
notes
:
ab
.
note
};
await
self
.
needinfoDao
.
update
(
needObj
,
t
);
//关闭需求
await
self
.
needsolutionDao
.
model
.
update
({
status
:
"yzf"
,
isInvalid
:
1
},
{
where
:
{
needNo
:
needinfo
.
needNo
,
isInvalid
:
0
},
transaction
:
t
});
//方案废弃
return
system
.
getResultSuccess
();
})
}
//根据需求查看方案列表
async
getProgrammeInfoByChannelNeedNo
(
pobj
)
{
var
ab
=
pobj
.
actionBody
;
...
...
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