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
da74c651
Commit
da74c651
authored
Mar 18, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zhuangbing
parent
5c41e79f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
53 deletions
+60
-53
center-order/app/base/service/impl/dbneed/needsolutionSve.js
+60
-53
No files found.
center-order/app/base/service/impl/dbneed/needsolutionSve.js
View file @
da74c651
...
...
@@ -36,7 +36,7 @@ class NeedsolutionService extends ServiceBase {
return
system
.
getResultFail
(
-
104
,
"业务方案信息不能为空"
);
}
var
solution
=
ab
.
solutionContent
.
solution
;
if
(
bizType
==
"companyreg"
){
//普通公司注册
if
(
bizType
==
"
esp.
companyreg"
){
//普通公司注册
if
(
!
solution
.
companyName
){
return
system
.
getResultFail
(
-
105
,
"公司名称不能为空"
);
}
...
...
@@ -62,7 +62,7 @@ class NeedsolutionService extends ServiceBase {
return
system
.
getResultFail
(
-
112
,
"经营范围不能为空"
);
}
}
if
(
bizType
==
"companyreg_cloud"
){
//云上公司注册
if
(
bizType
==
"
esp.
companyreg_cloud"
){
//云上公司注册
if
(
!
solution
.
park
){
return
system
.
getResultFail
(
-
113
,
"注册园区不能为空"
);
}
...
...
@@ -153,7 +153,7 @@ class NeedsolutionService extends ServiceBase {
if
(
pageSize
>
500
)
{
pageSize
=
500
;
}
var
bizType
=
ab
.
bizType
||
"
companyreg"
;
//
companyreg_cloud
var
bizType
=
ab
.
bizType
||
"
esp.companyreg"
;
// esp.
companyreg_cloud
var
pageIndex
=
Number
(
ab
.
pageIndex
||
1
);
var
from
=
pageIndex
==
1
?
0
:
Number
((
pageIndex
-
1
)
*
pageSize
);
//select * from log where data->'$.id' = 142;
...
...
@@ -179,7 +179,7 @@ class NeedsolutionService extends ServiceBase {
sqlCount
+=
" and status = :status"
;
paramWhere
.
status
=
ab
.
status
;
}
if
(
bizType
==
"companyreg"
){
//普通公司注册
if
(
bizType
==
"
esp.
companyreg"
){
//普通公司注册
if
(
ab
.
companyName
)
{
//企业名称
sql
=
sql
+
" and solutionContent->'$.solution.companyName' = :companyName"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.companyName' = :companyName"
;
...
...
@@ -211,7 +211,7 @@ class NeedsolutionService extends ServiceBase {
paramWhere
.
companyCategory
=
ab
.
companyCategory
;
}
}
if
(
bizType
==
"companyreg_cloud"
){
//云上公司注册
if
(
bizType
==
"
esp.
companyreg_cloud"
){
//云上公司注册
if
(
ab
.
park
)
{
//注册园区
sql
=
sql
+
" and solutionContent->'$.solution.park' = :park"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.park' = :park"
;
...
...
@@ -329,52 +329,59 @@ class NeedsolutionService extends ServiceBase {
return
system
.
getResultSuccess
();
}
// //立即支付下单保存方案
// async createSolutionByOrder(pobj){
// var ab = pobj.actionBody;
// var app = pobj.appInfo;
// if(!app || !app.uapp_id){
// return system.getResultFail(-100,"未知渠道");
// }
// if(!ab.solutionBizid){
// return system.getResultFail(-101,"需求编号不能为空");
// }
// var needinfo = await this.needinfoDao.model.findOne({
// where:{channelNeedNo:ab.intentionBizId,uapp_id:app.uapp_id},raw:true
// });
// if(!needinfo || !needinfo.id){
// return system.getResultFail(-102,"未知需求信息");
// }
// var solution = {
// "companyName":ab.companyName,
// "area":ab.area,
// "city": ab.city,
// "companyCategory": ab.companyCategory,
// "companyType": ab.companyType,
// "orgType" :ab.orgType,
// "industryType": ab,industryType,
// "scope": ab.scope,
// "remark":ab.remark
// };
// var {
// "notes":"方案备注",
// "bizType":"companyreg",
// "solution":{
// "area":"区",
// "city":"市",
// "scope":"经营范围",
// "remark":"方案备注",
// "orgType":"组织类型",
// "companyName":"测试公司名称",
// "companyType":"公司性质",
// "industryType":"行业",
// "companyCategory":"纳税人类型"
// }
// }
// var reqObj = {
// }
// }
//立即支付下单保存方案
async
createSolutionByOrder
(
pobj
){
var
ab
=
pobj
.
actionBody
;
var
app
=
pobj
.
appInfo
;
if
(
!
app
||
!
app
.
uapp_id
){
return
system
.
getResultFail
(
-
100
,
"未知渠道"
);
}
if
(
!
ab
.
solutionBizid
){
return
system
.
getResultFail
(
-
101
,
"需求编号不能为空"
);
}
var
needinfo
=
await
this
.
needinfoDao
.
model
.
findOne
({
where
:{
channelNeedNo
:
ab
.
intentionBizId
,
uapp_id
:
app
.
uapp_id
},
raw
:
true
});
if
(
!
needinfo
||
!
needinfo
.
id
){
return
system
.
getResultFail
(
-
102
,
"未知需求信息"
);
}
var
solution
=
""
;
var
bizType
=
"esp.companyreg"
;
if
(
ab
.
companyName
){
solution
=
{
"companyName"
:
ab
.
companyName
,
"area"
:
ab
.
area
,
"city"
:
ab
.
city
,
"companyCategory"
:
ab
.
companyCategory
,
"companyType"
:
ab
.
companyType
,
"orgType"
:
ab
.
orgType
,
"industryType"
:
ab
,
industryType
,
"scope"
:
ab
.
scope
,
"remark"
:
ab
.
remark
};
}
else
if
(
ab
.
park
){
solution
=
{
"park"
:
ab
.
park
,
"productType"
:
ab
.
productType
,
"remark"
:
ab
.
remark
};
bizType
=
"esp.companyreg_cloud"
;
}
var
solutionContent
=
{
"bizType"
:
bizType
,
"solution"
:
solution
};
solutionContent
=
JSON
.
stringify
(
solutionContent
);
// ab["channelNeedNo"] = needinfo.channelNeedNo;
// ab["solutionNo"] = solutionNo;
var
solutionNo
=
await
this
.
getBusUid
(
"ns"
);
var
reqObj
=
{
solutionContent
:
solutionContent
,
solutionNo
:
solutionNo
,
status
:
"ywc"
,
needNo
:
needinfo
.
needNo
,
channelNeedNo
:
needinfo
.
channelNeedNo
,
orderNo
:
ab
.
orderNo
,
createUserId
:
needinfo
.
followManUserId
};
await
this
.
dao
.
create
(
reqObj
);
return
system
.
getResultSuccess
();
}
}
module
.
exports
=
NeedsolutionService
;
...
...
@@ -391,4 +398,4 @@ module.exports = NeedsolutionService;
// industryType
// scope
// remark
// solutionBizid
\ No newline at end of file
// solutionBizidchannelNeedNo
\ No newline at end of file
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