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
4f759f86
Commit
4f759f86
authored
Mar 18, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zhuangbing
parent
fdc1669c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
24 deletions
+62
-24
center-order/app/base/service/impl/dbneed/needsolutionSve.js
+62
-24
No files found.
center-order/app/base/service/impl/dbneed/needsolutionSve.js
View file @
4f759f86
...
...
@@ -35,6 +35,44 @@ class NeedsolutionService extends ServiceBase {
if
(
!
ab
.
solutionContent
.
solution
){
return
system
.
getResultFail
(
-
104
,
"业务方案信息不能为空"
);
}
var
solution
=
ab
.
solutionContent
.
solution
;
if
(
bizType
==
"companyreg"
){
//普通公司注册
if
(
!
solution
.
companyName
){
return
system
.
getResultFail
(
-
105
,
"公司名称不能为空"
);
}
if
(
!
solution
.
city
){
return
system
.
getResultFail
(
-
106
,
"注册城市不能为空"
);
}
if
(
!
solution
.
area
){
return
system
.
getResultFail
(
-
107
,
"注册区域不能为空"
);
}
if
(
!
solution
.
companyCategory
){
return
system
.
getResultFail
(
-
108
,
"纳税人类型不能为空"
);
}
if
(
!
solution
.
companyType
){
return
system
.
getResultFail
(
-
109
,
"公司性质不能为空"
);
}
if
(
!
solution
.
orgType
){
return
system
.
getResultFail
(
-
110
,
"组织类型不能为空"
);
}
if
(
!
solution
.
industryType
){
return
system
.
getResultFail
(
-
111
,
"从事行业不能为空"
);
}
if
(
!
solution
.
scope
){
return
system
.
getResultFail
(
-
112
,
"经营范围不能为空"
);
}
}
if
(
bizType
==
"companyreg_cloud"
){
//云上公司注册
if
(
!
solution
.
park
){
return
system
.
getResultFail
(
-
113
,
"注册园区不能为空"
);
}
if
(
!
solution
.
registerType
){
return
system
.
getResultFail
(
-
114
,
"注册类型不能为空"
);
}
if
(
!
solution
.
productType
){
return
system
.
getResultFail
(
-
115
,
"产品类型不能为空"
);
}
}
//获取需求信息
var
needinfo
=
await
this
.
needinfoDao
.
model
.
findOne
({
where
:{
needNo
:
ab
.
needNo
},
raw
:
true
...
...
@@ -142,42 +180,42 @@ class NeedsolutionService extends ServiceBase {
paramWhere
.
status
=
ab
.
status
;
}
if
(
bizType
==
"companyreg"
){
//普通公司注册
if
(
ab
.
ent
Name
)
{
//企业名称
sql
=
sql
+
" and solutionContent->'$.solution.
entName' = :ent
Name"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.
entName' = :ent
Name"
;
paramWhere
.
entName
=
ab
.
ent
Name
;
if
(
ab
.
company
Name
)
{
//企业名称
sql
=
sql
+
" and solutionContent->'$.solution.
companyName' = :company
Name"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.
companyName' = :company
Name"
;
paramWhere
.
companyName
=
ab
.
company
Name
;
}
//
if
(
ab
.
org
anization
Type
)
{
//组织类型
sql
=
sql
+
" and solutionContent->'$.solution.org
anizationType' = :organization
Type"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.org
anizationType' = :organization
Type"
;
paramWhere
.
org
anizationType
=
ab
.
organization
Type
;
if
(
ab
.
orgType
)
{
//组织类型
sql
=
sql
+
" and solutionContent->'$.solution.org
Type' = :org
Type"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.org
Type' = :org
Type"
;
paramWhere
.
org
Type
=
ab
.
org
Type
;
}
if
(
ab
.
entNatur
e
)
{
//公司性质
sql
=
sql
+
" and solutionContent->'$.solution.
entNature' = :entNatur
e"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.
entNature' = :entNatur
e"
;
paramWhere
.
entNature
=
ab
.
entNatur
e
;
if
(
ab
.
companyTyp
e
)
{
//公司性质
sql
=
sql
+
" and solutionContent->'$.solution.
companyType' = :companyTyp
e"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.
companyType' = :companyTyp
e"
;
paramWhere
.
companyType
=
ab
.
companyTyp
e
;
}
if
(
ab
.
city
)
{
//城市
sql
=
sql
+
" and solutionContent->'$.solution.city' = :city"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.city' = :city"
;
paramWhere
.
city
=
ab
.
city
;
}
if
(
ab
.
province
)
{
//省份
sql
=
sql
+
" and solutionContent->'$.solution.
province' = :province
"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.
province' = :province
"
;
paramWhere
.
province
=
ab
.
province
;
if
(
ab
.
area
)
{
//区域
sql
=
sql
+
" and solutionContent->'$.solution.
area' = :area
"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.
area' = :area
"
;
paramWhere
.
area
=
ab
.
area
;
}
if
(
ab
.
taxpayerType
)
{
//纳税人类型
sql
=
sql
+
" and solutionContent->'$.solution.
taxpayerType' = :taxpayerType
"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.
taxpayerType' = :taxpayerType
"
;
paramWhere
.
taxpayerType
=
ab
.
taxpayerType
;
if
(
ab
.
companyCategory
)
{
//纳税人类型
sql
=
sql
+
" and solutionContent->'$.solution.
companyCategory' = :companyCategory
"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.
companyCategory' = :companyCategory
"
;
paramWhere
.
companyCategory
=
ab
.
companyCategory
;
}
}
if
(
bizType
==
"companyreg_cloud"
){
//云上公司注册
if
(
ab
.
regP
ark
)
{
//注册园区
sql
=
sql
+
" and solutionContent->'$.solution.
regPark' = :regP
ark"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.
regPark' = :regP
ark"
;
paramWhere
.
regPark
=
ab
.
regP
ark
;
if
(
ab
.
p
ark
)
{
//注册园区
sql
=
sql
+
" and solutionContent->'$.solution.
park' = :p
ark"
;
sqlCount
=
sqlCount
+
" and solutionContent->'$.solution.
park' = :p
ark"
;
paramWhere
.
park
=
ab
.
p
ark
;
}
if
(
ab
.
productType
)
{
//产品类型
sql
=
sql
+
" and solutionContent->'$.solution.productType' = :productType"
;
...
...
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